王震
2023-12-22 2b885af197394576f92f0a70d3aba535aa7ca00c
src/views/plan/productionschedul/index.vue
@@ -7,8 +7,11 @@
            <el-col :span="24">
              <div style="height:40vh;padding: 0px 10px;">
                <span style="position: relative;top:40px;">未完成</span>
                <span style="position: relative;top:30px;left:73%;z-index: 11">
                <span style="position: relative;top:30px;left:60%;z-index: 11">
                  <el-button @click="tagFinished" size="mini" round type="primary">标记已完成</el-button>
                  <el-button size="mini" round type="primary"
                  v-if="permissions.plan_productionschedul_edit_line"
                  @click="openEditDialog">编辑时间线</el-button>
                </span>
                <avue-crud 
                :data="tableData" 
@@ -42,7 +45,7 @@
          <el-row>
            <el-col :span="24">
              <div style="height:40vh;padding: 0px 10px;">
                <span style="position: relative;top:40px;">已完成</span>
                <span style="position: relative;top:40px">已完成</span>
                <avue-crud 
                :data="finishedTableData" 
                ref="finished" 
@@ -52,7 +55,7 @@
                @current-change="handleCurrentChange"
                @size-change="handleSizeChange"
                :page="finishedPage" 
                @selection-change="selectionRow">
                @selection-change="selectionFinishedRow">
                <!-- <template #menu="{ row, index }">
                  <el-button 
                  v-if="permissions.plan_productionschedul_del" 
@@ -71,7 +74,6 @@
            <el-card>
              <div slot="header" class="clearfix">
                <span>调度时间线</span>
                <el-button v-if="permissions.plan_productionschedul_edit_line && scheduleList.length>0" @click="openEditDialog" style="float: right; padding: 3px 0" type="text">编辑</el-button>
              </div>
              <div style="height:70vh;overflow-y: scroll;">
                <el-timeline>
@@ -541,6 +543,10 @@
      }
    },
    openEditDialog(){
      if(this.multipleSelection.length<1){
        this.$message.error("请至少选择一条数据")
        return
      }
      this.scheduleEditList = JSON.parse(JSON.stringify(this.scheduleList))
      this.dialogVisible = true
    },
@@ -642,6 +648,17 @@
      this.multipleSelection = val
      // this.getScheduleById(val[0].id)
    },
    selectionFinishedRow(val){
      console.log(val);
      if (val.length > 1) {
        const preVal = val.shift();
        this.$refs.finished.toggleRowSelection(preVal, false);
      }
      else{
        this.scheduleList=[]
      }
      this.getScheduleById(val[0].mid)
    },
    formatDate(row, cellValue){
      if (cellValue) {
        const dutyDateList = /\d{4}-\d{1,2}-\d{1,2}/g.exec(cellValue)