Jelajahi Sumber

调整无周期页面

luojun 2 tahun lalu
induk
melakukan
6bb3c77a03
3 mengubah file dengan 125 tambahan dan 82 penghapusan
  1. 118 77
      src/views/check/dialog.edit.vue
  2. 4 5
      src/views/check/index.vue
  3. 3 0
      src/views/system/dept/extend.vue

+ 118 - 77
src/views/check/dialog.edit.vue

@@ -64,6 +64,33 @@
                 </el-select>
               </el-form-item>
             </el-col>
+
+            <el-col :span="6">
+              <el-form-item prop="startDate" label="开始时间:" v-if="formData.planCycle==6">
+                <el-date-picker
+                  v-model="formData.startDate"
+                  style="width: 240px"
+                  value-format="yyyy-MM-dd hh:mm:ss"
+                  placeholder="请选择开始时间"
+                  type="date"
+                  :clearable="false"
+                ></el-date-picker>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item prop="endDate" label="结束时间:" v-if="formData.planCycle==6">
+                <el-date-picker
+                  v-model="formData.endDate"
+                  style="width: 240px"
+                  value-format="yyyy-MM-dd hh:mm:ss"
+                  placeholder="请选择结束时间"
+                  type="date"
+                  :clearable="false"
+                ></el-date-picker>
+              </el-form-item>
+            </el-col>
+
             <el-col :span="6">
               <el-form-item prop="execOrgType" label="检查机构类型:">
                 <el-select
@@ -84,8 +111,8 @@
                 </el-select>
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
+          <!-- </el-row> -->
+          <!-- <el-row> -->
             <el-col :span="6">
               <el-form-item prop="roleIds" label="检查角色:">
                 <el-select
@@ -142,7 +169,7 @@
             <el-col :span="6">
               <el-form-item prop="buildTaskNow" label="立即生效:">
                 <el-checkbox
-                :disabled="id ?true:false"
+                  :disabled="id ? true : false"
                   v-model="formData.buildTaskNow"
                   size="medium"
                   @change="handleCheckboxChange"
@@ -152,25 +179,7 @@
             </el-col>
           </el-row>
           <el-row>
-            <el-col :span="6">
-              <el-form-item prop="planStatus" label="计划状态">
-                <!-- <el-select
-                  label="计划状态"
-                  v-model="formData.planStatus"
-                  placeholder="请选择计划状态"
-                  clearable
-                >
-                  <el-option
-                    v-for="item in dict.type.check_status"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  >
-                  </el-option>
-                </el-select> -->
-                <el-switch v-model="formData.planStatus" active-value="1" inactive-value="2"></el-switch>
-              </el-form-item>
-            </el-col>
+
             <el-col :span="6">
               <el-form-item :span="6" prop="execOrgIds" label="检查机构">
                 <org-tree-select
@@ -195,6 +204,29 @@
                 </org-tree-select>
               </el-form-item>
             </el-col>
+            <el-col :span="6">
+              <el-form-item prop="planStatus" label="计划状态">
+                <!-- <el-select
+                  label="计划状态"
+                  v-model="formData.planStatus"
+                  placeholder="请选择计划状态"
+                  clearable
+                >
+                  <el-option
+                    v-for="item in dict.type.check_status"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select> -->
+                <el-switch
+                  v-model="formData.planStatus"
+                  active-value="1"
+                  inactive-value="2"
+                ></el-switch>
+              </el-form-item>
+            </el-col>
           </el-row>
           <el-form-item :span="6" prop="description" label="备注">
             <el-input
@@ -203,6 +235,7 @@
               clearable
             />
           </el-form-item>
+          
         </el-form>
         <el-button @click="openSelect">新增检查内容</el-button>
 
@@ -232,7 +265,7 @@
           <el-table-column prop="itemName" label="检查项"> </el-table-column>
           <el-table-column prop="pointName" label="检查内容"> </el-table-column>
           <el-table-column prop="areaName" label="检查区域"> </el-table-column>
-          <el-table-column prop="businessType" label="数据来源"> 
+          <el-table-column prop="businessType" label="数据来源">
             <template slot-scope="r">
               {{
                 getLabel(dict.type.point_data_source, `${r.row.businessType}`)
@@ -270,10 +303,16 @@ import korgTree from "@/components/k-orgTree";
 import * as api from "@/api/safetycheck/plan";
 import { statusOptions } from "@/views/commonOption";
 import { findAllRole } from "@/api/system/role";
-import {  getLabel } from "@/views/commonOption";
+import { getLabel } from "@/views/commonOption";
 import DialogSelect from "@/views/safetycheck/ruleManager/dialog.select.point.vue";
 export default {
-  dicts: ["sys_org_type", "check_type", "check_cycle", "check_status","point_data_source"],
+  dicts: [
+    "sys_org_type",
+    "check_type",
+    "check_cycle",
+    "check_status",
+    "point_data_source",
+  ],
   data() {
     return {
       defaultSelect: [],
@@ -344,8 +383,7 @@ export default {
         children: node.children,
       };
     },
-    handleCheckboxChange() {
-    },
+    handleCheckboxChange() {},
     reset() {
       return {
         planName: null,
@@ -374,8 +412,8 @@ export default {
         checkOrgIds: null,
         execOrgIds: null,
         rulePointIds: null,
-        checkOrgType:null,
-        checkType:null,
+        checkOrgType: null,
+        checkType: null,
       };
     },
     getRolesByOrg() {
@@ -390,56 +428,58 @@ export default {
       this.count = value;
     },
     async refresh(id, other) {
-      if(id!=null&&id!=undefined){
-        await api.get(id).then(res=>{
-          this.formData =res.data;
-          this.formData.buildTaskNow
+      if (id != null && id != undefined) {
+        await api.get(id).then((res) => {
+          this.formData = res.data;
+          this.formData.buildTaskNow;
           this.tableData = res.data.rulePointList;
           if (this.formData.execOrgType) {
-        this.formData.roleIds = this.formData.roleList.map((role) => role.id);
-        this.formData.execOrgIds = this.formData.execOrgList.map(
-          (org) => org.id
-        );
-        this.formData.checkOrgIds = this.formData.checkOrgList.map(
-          (org) => org.id
-        );
-        this.getRolesByOrg();
-      }
-        })
-
-      }else{
-        this.formData.id=null;
-        this.formData.planName= null;
-        this.formData.planType= null;
-        this.formData.planCycle= null;
-        this.formData.planStatus= null;
-        this.formData.execOrgType= null;
-        this.formData.checkOrgType= null;
-        this.formData.checkType= null;
-        this.formData.roleNames= null;
-        this.formData.count= null;
-        this.formData.description= null;
-        this.formData.tableData= null;
-        this.formData.itemList= null;
-        this.formData.planExec= null;
-        this.formData.count= 0;
-        this.formData.note= null;
-        this.formData.planCreateOrgId= null;
-        this.formData.planCreateOrgName= null;
-        this.formData.roleList= null;
-        this.formData.roleIds= null;
-        this.formData.execOrg= null;
-        this.formData.checkOrg= null;
-        this.formData.buildTaskNow= false;
-        this.formData.checkOrgList= [];
-        this.formData.execOrgList= [];
-        this.formData.rulePointList= null;
-        this.formData.checkOrgIds= null;
-        this.formData.execOrgIds= null;
-        this.formData.rulePointIds= null;
+            this.formData.roleIds = this.formData.roleList.map(
+              (role) => role.id
+            );
+            this.formData.execOrgIds = this.formData.execOrgList.map(
+              (org) => org.id
+            );
+            this.formData.checkOrgIds = this.formData.checkOrgList.map(
+              (org) => org.id
+            );
+            this.getRolesByOrg();
+          }
+        });
+      } else {
+        this.formData.id = null;
+        this.formData.planName = null;
+        this.formData.planType = null;
+        this.formData.planCycle = null;
+        this.formData.planStatus = null;
+        this.formData.execOrgType = null;
+        this.formData.checkOrgType = null;
+        this.formData.checkType = null;
+        this.formData.roleNames = null;
+        this.formData.count = null;
+        this.formData.description = null;
+        this.formData.tableData = null;
+        this.formData.itemList = null;
+        this.formData.planExec = null;
+        this.formData.count = 0;
+        this.formData.note = null;
+        this.formData.planCreateOrgId = null;
+        this.formData.planCreateOrgName = null;
+        this.formData.roleList = null;
+        this.formData.roleIds = null;
+        this.formData.execOrg = null;
+        this.formData.checkOrg = null;
+        this.formData.buildTaskNow = false;
+        this.formData.checkOrgList = [];
+        this.formData.execOrgList = [];
+        this.formData.rulePointList = null;
+        this.formData.checkOrgIds = null;
+        this.formData.execOrgIds = null;
+        this.formData.rulePointIds = null;
       }
     },
     onSelect(selectList) {
+      // console.log(selectList,"selectList");
       for (let i = 0; i < selectList.length; i++) {
         let tem = {
           pointScan: selectList[i].pointScan,
@@ -450,7 +490,7 @@ export default {
           areaName: selectList[i].areaName,
           itemId: selectList[i].itemId,
           id: selectList[i].id,
-          businessType:selectList[i].businessType,
+          businessType: selectList[i].businessType,
         };
         if (this.tableData == null) {
           this.tableData = [];
@@ -497,11 +537,12 @@ export default {
         this.formData.planCreateOrgId = this.orgId;
         this.formData.planCreateOrgName = this.orgName;
         if (!isValidate) return;
-        this.formData.rulePointList = this.tableData == null ? [] : this.tableData;
+        this.formData.rulePointList =
+          this.tableData == null ? [] : this.tableData;
         this.formData.roleList = null;
         this.formData.roleIds =
           this.selectedValues.length == 0 ? null : this.selectedValues;
-          
+
         await api.add(this.formData);
         this.$emit("success");
         this.onHide();

+ 4 - 5
src/views/check/index.vue

@@ -408,12 +408,11 @@ export default {
     ...mapMutations([]),
         //已完成下发的计划不显示下发按钮
     checkCanPublish(row) {
-      // console.log(row.planOfOrgType,"row.planOfOrgType")
-      // console.log(row.planOfOrgType == "1"&& row.children.length == 0,"row.children.length")
+      // console.log(row.planOfOrgType == "1","row.planOfOrgType")
+      // console.log(row.planOfOrgType == "1"&& row.distribute==null,"row.distribute")
   
-      
-      if (row.planOfOrgType == "1"&& row.distribute==null) {
-        // console.log("1111")
+      //如果计划所属机构为省联社并且计划下发为null并且计划检查机构类型不为省联社和办事处(只有一个无法下发)
+      if (row.planOfOrgType == "1"&& row.distribute==null&&row.execOrgType!="1"&&row.execOrgType!="2") {
         return true
       }
     

+ 3 - 0
src/views/system/dept/extend.vue

@@ -119,6 +119,9 @@
               </el-select>
             </el-form-item>
           </el-col>
+
+
+          
           <el-col :span="8">
             <el-form-item v-if="type == 10" label="平台供应商品牌">
               <el-select