kimi
2020-03-18 fadf2795757ac6df1c792546725ea177c93d9d7a
src/views/calendarTask.vue
@@ -16,7 +16,7 @@
            <span>{{task_itm.desp}}</span>
            <div v-for="(type_itm, k_) in task_itm.children" :key="k_" class="right_row_">
               <span>{{k_+1}}、{{type_itm.typeStr}}</span>
               <el-button size="mini" type="primary" style="float: right; margin-top: 10px;" @click="handleTask(type_itm.id, type_itm.mustAttach, type_itm)">处理任务</el-button>
               <el-button size="mini" type="primary" v-if="userId === task_itm.userId" style="float: right; margin-top: 10px;" @click="handleTask(type_itm.id, type_itm.mustAttach, type_itm)">处理任务</el-button>
            </div>
         </div>
      </div>
@@ -30,12 +30,14 @@
            <el-upload
               class="upload-demo"
               :action="upload_url"
               :data="upData"
               :limit="1"
               :file-list="fileList"
               :auto-upload='false'
               ref="upload"
               :on-success="upSuccess"
               :on-error="upError"
               >
               <el-button size="medium" type="text">选择文件</el-button>
               <div slot="tip" class="el-upload__tip">文件不超过50M</div>
@@ -77,7 +79,7 @@
                  ],
                  prop:'date' ,//对应日期字段名
                  DayDataTree: [],
                  userId:undefined,
                  dialog_1: false,
                  handleTaskType: {},
                  upload_url: "",
@@ -97,7 +99,7 @@
               let iformat = imoment.format('YYYY-MM');
               let systemDate = iformat + '-01 00:00:00';
               this.getDatedef(systemDate);
               this.userId = localStorage.getItem('userId');
            },
            
        methods: {
@@ -133,11 +135,15 @@
               doHandleTask() {
                  //此id的明细任务完成
                  let id = this.handleTaskType.id;
                  if (!this.desc_task) {
                     this.$message('请填写描述');
                     return
                  }
                  this.upData = {//设置要传的参数
                     desp: this.desc_task
                  };
                  if(this.handleTaskType.mustAttach) {
                     this.upData = {//设置要传的参数
                        desp: this.desc_task
                     },
                     this.$refs.upload.submit();//开始上传
                  }
                  else {
@@ -167,15 +173,23 @@
                  }
               },
               
               // submitUpload() {
               //    this.handleTaskType; //要处理的明细数据
            submitUpload() {
               this.handleTaskType; //要处理的明细数据
               this.upData = {//设置要传的参数
                  
               //    this.upData = {//设置要传的参数
               //    },
               //    this.upload_url = ""; //设置上传接口
               //   this.$refs.upload.submit();//开始上传
               // },
               },
               this.upload_url; //设置上传接口
                this.$refs.upload.submit();//开始上传
             },
             upSuccess(response, file, fileList) {
                this.$message('上传成功');
             },
             upError(err, file, fileList) {
                this.$message('上传失败');
             },
               
               Cancel() {
                  this.dialog_1 = false;