Răsfoiți Sursa

修复缺陷

jiawuxian 1 an în urmă
părinte
comite
5f66e65366

+ 12 - 2
src/views/question/reform/dialog.vue

@@ -48,6 +48,7 @@
             <el-image
               style="width: 100px"
               v-for="url in data.images"
+              :key="url"
               :src="url"
               :preview-src-list="data.images"
             >
@@ -119,6 +120,7 @@
             <el-image
               style="width: 100px; height: 100px"
               v-for="url in data.reform.images"
+              :key="url"
               :src="url"
               :preview-src-list="data.reform.images"
             >
@@ -170,6 +172,7 @@
 import { get, reform } from "@/api/question/reform.js";
 import dayjs from "dayjs";
 import imgUpload from "@/components/ImageUpload/index.vue";
+
 export default {
   data() {
     return {
@@ -229,13 +232,20 @@ export default {
         ],
       },
       pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() > Date.now();
+        disabledDate:(time)=> {   
+          let r=false;          
+          if(this.data){ 
+             r ||=time.getTime()< dayjs(this.data.submitTime).startOf('day').valueOf();
+          }       
+          return  r || time.getTime() > Date.now();
         },
       },
     };
   },
   components: { imgUpload },
+  mounted(){
+   
+  },
   methods: {
     dayjs,
     // 取消按钮

+ 1 - 1
src/views/resumption/plan/dialog.detail.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="rule-type">
-    <DialogCom title="检查任务详情" :visible.sync="isShow" width="1500px">
+    <DialogCom title="履职任务详情" :visible.sync="isShow" width="1500px">
       <el-descriptions :column="4" border>
         <el-descriptions-item label="任务名称">{{
           formData.planName

+ 38 - 8
src/views/resumption/plan/dialog.edit.vue

@@ -205,10 +205,14 @@
             />
           </el-form-item>
         </el-form>
-        <el-button @click="openSelect" v-if="formData.id==null || formData.planOfOrgId == orgId"
+        <el-button
+          @click="openSelect"
+          v-if="formData.id == null || formData.planOfOrgId == orgId"
           ><span class="requiredlabel">选择履职内容</span></el-button
         >
-        <el-button @click="deleteSelected" v-if="formData.id==null || formData.planOfOrgId == orgId"
+        <el-button
+          @click="deleteSelected"
+          v-if="formData.id == null || formData.planOfOrgId == orgId"
           >批量删除</el-button
         >
         <el-table
@@ -222,14 +226,32 @@
             type="selection"
             :selectable="handleSelectable"
           ></el-table-column>
-          <el-table-column prop="ruleName" label="履职手册" align="center" show-overflow-tooltip> </el-table-column>
-          <el-table-column prop="itemName" label="履职项" align="center" show-overflow-tooltip> </el-table-column>
-          <el-table-column prop="pointName" label="履职内容" width="300px" align="center">
+          <el-table-column
+            prop="ruleName"
+            label="履职手册"
+            align="center"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+          <el-table-column
+            prop="itemName"
+            label="履职项"
+            align="center"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+          <el-table-column
+            prop="pointName"
+            label="履职内容"
+            width="300px"
+            align="center"
+          >
             <template slot-scope="scope">
               <pre>{{ scope.row.pointName }}</pre>
             </template>
-          </el-table-column>         
-          <el-table-column prop="areaName" label="履职区域" align="center"> </el-table-column>        
+          </el-table-column>
+          <el-table-column prop="areaName" label="履职区域" align="center">
+          </el-table-column>
           <el-table-column label="是否扫描" align="center">
             <template v-slot="{ row }">
               <el-switch
@@ -256,7 +278,10 @@
           <el-table-column label="操作" align="center">
             <template v-slot="{ row }">
               <el-button
-                v-if="getshenglianshe(row) && (formData.Id==null || formData.planOfOrgId == orgId)"
+                v-if="
+                  getshenglianshe(row) &&
+                  (formData.Id == null || formData.planOfOrgId == orgId)
+                "
                 type="text"
                 @click="removeRow(row)"
                 >删除</el-button
@@ -840,10 +865,15 @@ export default {
         if (this.formData.planStatus == "1") {
           let msg;
           let imme;
+
           if (this.formData.taskHasCompleted == 1) {
             imme = false;
             msg = "因存在已完成任务,本次修改内容将从下周期生效。";
           } else {
+            if (!this.formData.hasTaskCurrentCycle) {
+              this.update(this.formData, true);
+              return;
+            }
             imme = true;
             msg = "因不存在已完成任务,本次修改内容将立即生成。";
           }

+ 4 - 4
src/views/resumption/plan/index.vue

@@ -724,15 +724,15 @@ export default {
           msg = "本次删除将强制删除当前任务时间及以后所有任务";
         }
       } else if (row.planStatus == 2) {
-        if (row.hasTaskCurrentCycle) {
+        // if (row.hasTaskCurrentCycle) {
           if (row.planCycle == 2) {
             msg = "本次删除将强制删除今日所有任务?";
           } else {
             msg = "本次删除将强制删除当前任务时间及以后所有任务";
           }
-        } else {
-          msg = '是否确认删除名称为"' + row.planName + '"的任务?';
-        }
+        // } else {
+        //   msg = '是否确认删除名称为"' + row.planName + '"的任务?';
+        // }
       }
       this.$modal
         .confirm(msg)

+ 8 - 2
src/views/resumption/ruleManager/index.vue

@@ -133,12 +133,16 @@
                     align="center"
                     prop="areaName"
                     label="履职区域"
+                    width="200"
+                    show-overflow-tooltip
                     v-if="columns[4].visible"
                   >
                   </el-table-column>
                   <el-table-column
                     prop="checkName"
                     label="履职点位"
+                    width="200"
+                    show-overflow-tooltip
                     align="center"
                   >
                   </el-table-column>
@@ -179,13 +183,14 @@
               align="center"
               prop="pointNums"
               label="履职内容数量"
+              width="200"
               v-if="columns[2].visible"
             >
             </el-table-column>
             <el-table-column
               align="center"
               label="操作"
-              width="150"
+              width="200"
               v-if="rule && rule.orgId == orgId && rule.status == 0"
             >
               <template slot-scope="scope">
@@ -441,7 +446,8 @@ export default {
       return "border-color:#aaa;";
     },
     pointTableHeaderCellStyle(){
-      return "background-color:#d7d7d7 !important";
+      // return "background-color:#d7d7d7 !important";
+      return "";
     }
   },
 };

+ 21 - 20
src/views/resumption/taskManager/index.vue

@@ -34,7 +34,8 @@
               <!-- <el-row>
                 <el-col :span="5"> -->
               <el-form-item label="任务名称" prop="planId">
-                <el-select
+                <el-input placeholder="请输入任务名称" v-model="queryParams.taskName" clearable/>
+                <!-- <el-select
                   v-model="queryParams.planId"
                   filterable
                   placeholder="请选择任务名称"
@@ -47,7 +48,7 @@
                     :value="item.id"
                   >
                   </el-option>
-                </el-select>
+                </el-select> -->
               </el-form-item>
               <!-- </el-col>
                 <el-col :span="5"> -->
@@ -158,6 +159,7 @@
               prop="name"
               label="任务名称"
               min-width="120"
+              show-overflow-tooltip
               v-if="columns[1].visible"
             >
             </el-table-column>
@@ -301,14 +303,15 @@ export default {
       timeClearable: false,
       options: [],
       roleList: [],
-      planList: [],
+      // planList: [],
       queryParams: {
         checkSub: true,
         orgId: null,
         range: [sDate, eDate],
         executeRole: null,
         status: null,
-        planId: null,
+        // planId: null,
+        taskName:null,
         pageNum: 1,
         pageSize: 10,
       },
@@ -381,8 +384,6 @@ export default {
           new Date()
         ).format("YYYYMMDD")}.xlsx`
       );
-
-      // await api.exportResumptionRecord(this.queryParams);
     },
     showDetail(row) {
       this.$refs.detaildialog.show(row.resumptionId, row.name);
@@ -397,7 +398,7 @@ export default {
       this.selectedOrgName = node.shortName;
       this.getList();
       this.loadRoles(node.id);
-      this.loadPlanList();
+      // this.loadPlanList();
     },
     //单选框状态改变
     checkChange(state) {
@@ -412,7 +413,7 @@ export default {
       }
       this.queryParams.orgId = data.id;
       this.selectedOrgName = data.shortName;
-      this.loadPlanList();
+      // this.loadPlanList();
       this.loadRoles(data.id);
       this.getList();
     },
@@ -446,18 +447,18 @@ export default {
         .then((r) => (this.roleList = r.data));
     },
 
-    loadPlanList() {
-      api
-        .getPlans({
-          orgId: this.queryParams.orgId,
-        })
-        .then((r) => {
-          this.planList = r.data;
-          if (!this.planList.find((p) => p.id == this.queryParams.planId)) {
-            this.queryParams.planId = null;
-          }
-        });
-    },
+    // loadPlanList() {
+    //   api
+    //     .getPlans({
+    //       orgId: this.queryParams.orgId,
+    //     })
+    //     .then((r) => {
+    //       this.planList = r.data;
+    //       if (!this.planList.find((p) => p.id == this.queryParams.planId)) {
+    //         this.queryParams.planId = null;
+    //       }
+    //     });
+    // },
 
     weekChanged() {
       this.updateWeekDateRange(this.week);

+ 5 - 3
src/views/safetycheck/plan/dialog.edit.vue

@@ -136,8 +136,7 @@
                   v-model="formData.roleIds"
                   placeholder="请选择检查人员"
                   multiple   
-                  clearable               
-                  collapse-tags
+                  clearable      
                   @change="handleRolesChange"
                 >
                   <el-option
@@ -161,7 +160,6 @@
                   placeholder="请选择受检机构类型"
                   clearable
                   multiple
-                  collapse-tags
                 >
                   <el-option
                     v-for="item in orgTypeOptions"
@@ -885,6 +883,10 @@ export default {
             msg = "因存在已完成任务,本次修改内容将从下周期生效。";
           } else {
             imme = true;
+            if (!this.formData.hasTaskCurrentCycle) {
+              this.update(this.formData, imme);
+              return;
+            }            
             msg = "因不存在已完成任务,本次修改内容将立即生成。";
           }
 

+ 4 - 4
src/views/safetycheck/plan/index.vue

@@ -776,11 +776,11 @@ export default {
       } else if (row.planStatus == 1) {
         msg = "本次删除将强制删除当前任务时间及以后所有任务";
       } else if (row.planStatus == 2) {
-        if (row.hasTaskCurrentCycle) {
+        // if (row.hasTaskCurrentCycle) {
           msg = "本次删除将强制删除当前任务时间及以后所有任务";
-        } else {
-          msg = '是否确认删除名称为"' + row.planName + '"的任务?';
-        }
+        // } else {
+        //   msg = '是否确认删除名称为"' + row.planName + '"的任务?';
+        // }
       }
 
       this.$modal

+ 7 - 2
src/views/safetycheck/ruleManager/index.vue

@@ -115,6 +115,7 @@
                   :data="props.row.pointDtoList"
                   border
                   style="width: 100%"
+                  size="small"
                   :header-cell-style="pointTableHeaderCellStyle"
                 >
                   <el-table-column type="index" />
@@ -134,6 +135,8 @@
                     align="center"
                     prop="areaName"
                     label="检查区域"
+                    width="200"
+                    show-overflow-tooltip
                     v-if="columns[4].visible"
                   >
                   </el-table-column>
@@ -168,13 +171,14 @@
               align="center"
               prop="pointNums"
               label="检查内容数量"
+              width="200"
               v-if="columns[2].visible"
             >
             </el-table-column>
             <el-table-column
               align="center"
               label="操作"
-              width="140"
+              width="200"
               v-if="rule && rule.orgId == orgId && rule.status == 0"
             >
               <template slot-scope="scope">
@@ -425,7 +429,8 @@ export default {
       return "border-color:#aaa;";
     },
     pointTableHeaderCellStyle(){
-      return "background-color:#d7d7d7 !important";
+      // return "background-color:#d7d7d7 !important";
+      return "";
     }
   },
 };