Kaynağa Gözat

审核添加删除施工信息功能

wangtong 1 yıl önce
ebeveyn
işleme
836d625191

+ 36 - 5
src/components/ConstructionDetails/index.vue

@@ -20,6 +20,7 @@
         v-for="(e,idx) in currentDicts"
         :key="idx"
       >
+        <el-checkbox-group v-model="checkList" >
         <el-collapse
           class="rmOldPie"
           v-for="(e,idx) in currentCollapses"
@@ -28,10 +29,12 @@
           <el-collapse-item :name="idx">
             <template slot="title">
               <div style="display: flex;width: 100%;height: 100%;">
-                <div
-                  style="width: 15px;height: 15px;margin: auto 10px;border-radius: 73%;background-color: #a3d3ff;box-shadow: 1px 1px rgb(131 131 131 / 62%);">
-                </div>
-                <h2 style="margin-left: 1%;font-weight: 700;">{{ e.updateTime }}</h2>
+<!--                <div-->
+<!--                  style="width: 15px;height: 15px;margin: auto 10px;border-radius: 73%;background-color: #a3d3ff;box-shadow: 1px 1px rgb(131 131 131 / 62%);">-->
+<!--                </div>-->
+                <el-checkbox :label="e.id" @change="handleCheckedCitiesChange">
+                  <h2 style="margin-left: 1%;font-weight: 700;">{{ e.updateTime }}</h2>
+                </el-checkbox>
               </div>
             </template>
             <!--  人员信息 -->
@@ -399,6 +402,7 @@
             </div>
           </el-collapse-item>
         </el-collapse>
+        </el-checkbox-group>
       </el-tab-pane>
       <el-button class="check" plain type="danger" @click="checkWorking" v-show="currentStatus == 'check'  && isChecking " style="width: 80px;" :disabled="currentCollapses.length == 0">审核</el-button>
       <el-button class="check" plain type="danger" @click="updateNodeOption" style="width: 94px;cursor: pointer;" v-if="currentStatus != 'check' && status != 'read-only'  ">修改</el-button>
@@ -473,6 +477,7 @@ export default {
   data() {
     return {
       enginSort:'',
+      checkList:[],
       enginNode:'',
       currentDicts: [],              // 当前类型工程节点项
       dialogVisible: false,
@@ -518,6 +523,8 @@ export default {
       currentEnginId:null,
       reviewStatus:null,
       corrosionLevelListAll:[],
+      infoIdList:[],
+      delinfoidList:[],
       checkingRule:{
         reviewStatus: [
           {required: true, message: "审核状态不能为空", trigger: "blur"}
@@ -580,6 +587,10 @@ export default {
     }
   },
   methods: {
+    handleCheckedCitiesChange(e)
+    {
+   this.delinfoidList=this.currentCollapses.map(item=>item.id).filter(item=>this.checkList.indexOf(item)==-1)
+    },
     validateCHanged(e){
       this.reviewStatusList[e].label == '通过' ? this.checkingRule.reviewContent[0].required = true : this.checkingRule.reviewContent[0].required = false
     },
@@ -605,10 +616,26 @@ export default {
     },
     // 提交审核
     checkingSubmit(){
+      this.$confirm('此操作将删除其他施工信息, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+      this.shenhe()
+      }).catch(() => {
+        // this.$message({
+        //   type: 'info',
+        //   message: '已取消删除'
+        // });
+      });
+    },
+    shenhe()
+    {
       this.$refs.checking.validate(valid => {
         if(valid){
           try {
             this.checkingInfo.engInfoId = this.currentEnginId
+            this.checkingInfo.delInfoIdList=this.delinfoidList
             this.$emit('checkWorking',this.checkingInfo)
           } catch (error) {
             this.checkingInfo.engInfoId = null
@@ -629,7 +656,6 @@ export default {
           throw 'valid Failed'
         }
       })
-
     },
     // 查看单节点历史
     viewSource(e) {
@@ -657,6 +683,11 @@ export default {
     },
     // 单项审核
     checkWorking() {
+      if (this.checkList.length==0)
+      {
+        this.$message.warning("请选择需要审核通过的施工信息")
+        return
+      }
       if(this.currentStatus == 'check'){
         this.checkingVisible = true
       }

+ 1 - 0
src/components/ObsImageUpload/index.vue

@@ -42,6 +42,7 @@
       append-to-body
     >
       <video
+        v-if="videodialogVisible"
         :src="dialogImageUrl"
         id="video"
         autoplay