Quellcode durchsuchen

修复现场缺陷

jiawuxian vor 1 Jahr
Ursprung
Commit
72e981190e

+ 34 - 36
src/components/userSelector/index.vue

@@ -38,7 +38,7 @@
           >
             <!-- 搜索 -->
             <template slot="searchs">
-              <el-form-item  prop="username" label="用户账号">
+              <el-form-item prop="username" label="用户账号">
                 <el-input v-model="search.username" clearable></el-input>
               </el-form-item>
               <el-form-item prop="name" label="用户姓名">
@@ -63,7 +63,7 @@
 
             <!-- 表格 -->
             <template slot="columns">
-              <el-table-column                
+              <el-table-column
                 label="序号"
                 type="index"
                 align="center"
@@ -116,10 +116,10 @@
 <script>
 import GSearchTable from "@/components/table/gx.search.table.vue";
 import OrgTree from "@/components/orgTree";
-import { mapGetters } from 'vuex'
-import {getLabel} from '@/views/commonOption.js'
+import { mapGetters } from "vuex";
+import { getLabel } from "@/views/commonOption.js";
 export default {
-  components: { GSearchTable,OrgTree },
+  components: { GSearchTable, OrgTree },
   data() {
     return {
       isShow: false,
@@ -127,9 +127,9 @@ export default {
       search: this.emptySearch(),
     };
   },
-  dicts:["sys_user_is_lock"],
+  dicts: ["sys_user_is_lock"],
   computed: {
-    ...mapGetters(["orgId"])
+    ...mapGetters(["orgId"]),
   },
   watch: {},
   props: {
@@ -137,10 +137,10 @@ export default {
       type: Number,
       default: 0,
     },
-    
-    customTreeRequest:{
-      type:Function
-    }
+
+    customTreeRequest: {
+      type: Function,
+    },
   },
   methods: {
     getLabel,
@@ -153,15 +153,16 @@ export default {
     // },
     /**
      * 还没有调试默认选中
-     * @param {} defaultSelect 
+     * @param {} defaultSelect
      */
     show(defaultSelect) {
-      this.search = this.emptySearch();      
-      this.isShow = true;   
-      this.refresh()   
+      this.search = this.emptySearch();
+      this.isShow = true;
+      // this.refresh()
     },
     resetQuery() {
-      this.search=this.emptySearch();
+      this.search.username = null;
+      this.search.name = null;
       // this.resetForm("search");
       // this.queryParams.orgId = undefined;
       // this.$refs.tree.setCurrentKey(null);
@@ -173,24 +174,24 @@ export default {
     onSelect(item) {
       this.selectList = item;
     },
-    refresh(){      
-        this.$nextTick(()=>{
-            this.$refs.searchTable.refresh();
-        })
+    refresh() {
+      this.$nextTick(() => {
+        this.$refs.searchTable.refresh();
+      });
     },
     getList() {
-        this.$nextTick(()=>{
-            this.$refs.searchTable.search();
-        })
+      this.$nextTick(() => {
+        this.$refs.searchTable.search();
+      });
     },
-    onSubmit() {     
+    onSubmit() {
       this.$emit("select", this.selectList);
       this.onHide();
     },
     getDefaultKey(key) {
-        // debugger
-      this.search.orgId = key;   
-      this.refresh();   
+      // debugger
+      this.search.orgId = key;
+      this.refresh();
     },
     //单选框状态改变
     checkChange(state) {
@@ -210,18 +211,15 @@ export default {
       };
     },
   },
-  mounted() {
-
-  },
+  mounted() {},
 };
 </script>
 <style lang="scss" scoped>
+.el-dialog-div {
+  height: 600px;
 
-.el-dialog-div{
-    height: 600px;
-
-    ::v-deep .tree-container{
-        height: 500px;
-    }
+  ::v-deep .tree-container {
+    height: 500px;
+  }
 }
 </style>

+ 26 - 15
src/views/check/dialog.edit.vue

@@ -427,7 +427,7 @@ export default {
           this.getRolesByOrg();
           //角色
           this.formData.roleIds = ["116"];
-          this.selectedValues= ["116"];
+          this.selectedValues = ["116"];
           //检查次数
           this.formData.count = 1;
           //检查内容
@@ -442,7 +442,7 @@ export default {
           this.getRolesByOrg();
           //角色
           this.formData.roleIds = ["118"];
-          this.selectedValues= ["118"];
+          this.selectedValues = ["118"];
           //检查次数
           this.formData.count = 2;
           //检查内容
@@ -457,8 +457,8 @@ export default {
           this.getRolesByOrg();
           //角色
           this.formData.roleIds = ["121"];
-          this.selectedValues= ["121"];
-          this.formData.checkOrgTypes=["4"];
+          this.selectedValues = ["121"];
+          this.formData.checkOrgTypes = ["4"];
           //检查次数
           this.formData.count = 3;
           //检查内容
@@ -473,7 +473,7 @@ export default {
           this.getRolesByOrg();
           //角色
           this.formData.roleIds = ["120"];
-          this.selectedValues= ["120"];
+          this.selectedValues = ["120"];
           //检查次数
           this.formData.count = 2;
           //检查内容
@@ -515,7 +515,7 @@ export default {
           this.formData.roleIds = [];
           //检查次数
           this.formData.count = 1;
-          this.formData.checkOrgTypes=[];
+          this.formData.checkOrgTypes = [];
           //检查内容
           this.tableData = null;
           break;
@@ -600,7 +600,7 @@ export default {
       this.checkOrgIds = null;
       this.formData.checkOrgList = [];
       this.formData.checkOrgIds = [];
-      this.tableData=[];
+      this.tableData = [];
     },
     tenantIdnormalizer(node, instanceId) {
       if (node.children && !node.children.length) {
@@ -780,6 +780,14 @@ export default {
       }
     },
     openSelect() {
+      if (
+        this.formData.checkOrgTypes == null ||
+        this.formData.checkOrgTypes.length === 0
+      ) {
+        this.$modal.alert("请先选择受检机构类型");
+        return;
+      }
+      
       this.$refs.DialogSelect.show(this.getIteamF());
     },
     onSubmit() {
@@ -797,14 +805,17 @@ export default {
         if (this.formData.planCycle == 6) {
           this.formData.buildTaskNow = true;
         }
-        await api.add(this.formData).then((data) => {
-          this.loading = false;
-          this.$emit("success");
-          this.onHide();
-        }).catch((err)=>{
-          this.loading = false;
-// console.log(err,"err")
-        });
+        await api
+          .add(this.formData)
+          .then((data) => {
+            this.loading = false;
+            this.$emit("success");
+            this.onHide();
+          })
+          .catch((err) => {
+            this.loading = false;
+            // console.log(err,"err")
+          });
       });
     },
     handleRolesChange(val) {

+ 1 - 0
src/views/question/list/index.vue

@@ -27,6 +27,7 @@
                   v-model="queryParams.searchKey"
                   placeholder="请输入关键字"
                   clearable
+                  maxlength="50"
                 />
               </el-form-item>
               <el-form-item prop="confirmStatus" label="隐患状态">

+ 1 - 0
src/views/question/reform/index.vue

@@ -27,6 +27,7 @@
                   v-model="queryParams.searchKey"
                   placeholder="请输入关键字"
                   clearable
+                  maxlength="50"
                 />
               </el-form-item>
               <el-form-item prop="reformStatus" label="整改状态">

+ 3 - 3
src/views/resumption/protection/index.vue

@@ -333,8 +333,7 @@ export default {
           this.loading = false;
         });
     },
-    
-   
+
     handleAdd(id, other = {}) {
       this.$refs.editDialog.show(id, other);
     },
@@ -387,6 +386,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("search");
+      this.queryParams.dateRange = null;
       // this.queryParams.orgId = undefined;
       // this.$refs.tree.setCurrentKey(null);
       this.getList();
@@ -405,7 +405,7 @@ export default {
     clickTreeNode(data) {
       this.queryParams.orgId = data.id;
       this.selectedOrgName = data.shortName;
-       this.getList();
+      this.getList();
     },
   },
   mounted() {},

+ 5 - 4
src/views/resumption/ruleManager/dialog.editItem.vue

@@ -43,10 +43,10 @@
               </template>
             </el-table-column>
             <el-table-column
-            header-align="center"
+              header-align="center"
               align="center"
               prop="areaName"
-              label="履职区域"             
+              label="履职区域"
             >
             </el-table-column>
             <el-table-column
@@ -152,9 +152,10 @@ export default {
           return;
         }
         update(this.formData).then((v) => {
+          let isAdd=this.formData.id==null || this.formData.id==0;
           this.formData = this.reset();
-          this.dialogVisible = false;
-          this.$emit("success");
+          this.dialogVisible = false;    
+          this.$emit("success", isAdd);
         });
       });
     },

+ 12 - 25
src/views/resumption/ruleManager/index.vue

@@ -328,7 +328,12 @@ export default {
       return data.label.indexOf(value) !== -1;
     },
     async refresh() {
-      this.currentPage = 1;
+      this.queryParams.pageNum = 1;
+      this.expandAll = false;
+      this.fresh = false;
+      this.$nextTick(() => {
+        this.fresh = true;
+      });
       this.getList();
     },
     async getList() {
@@ -340,23 +345,8 @@ export default {
       const data = await page(this.queryParams);
       this.tableData = data.rows;
       this.total = Number.parseInt(data.total);
-      this.expandAll = false;
       this.loading = false;
-    },
-    // async gettreelist() {
-    //   await treeData().then((v) => {
-    //     this.treedata = v.data;
-    //     this.topItemKeys = v.data.map((d) => d.id);
-    //   });
-    // },
-    handleSizeChange(val) {
-      this.pagesize = val;
-      this.getList();
-    },
-    handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
-    },
+    }, 
     clicktreenode(data, node) {
       this.tableData = [];
       this.rule = null;
@@ -366,12 +356,6 @@ export default {
         return;
       }
 
-      this.expandAll = false;
-      this.fresh = false;
-      this.$nextTick(() => {
-        this.fresh = true;
-      });
-
       this.queryParams.ruleId = data.id;
       this.rule = data;
       this.rule.orgId = node.parent.data.id;
@@ -433,8 +417,11 @@ export default {
     onSelect() {
       this.$refs.DialogSelect.show();
     },
-    onSuccess() {
-      this.refresh();
+    onSuccess(isAdd) {   
+      if (isAdd) {
+        this.queryParams.pageNum = 1;
+      }
+      this.getList();
     },
   },
 };

+ 2 - 1
src/views/safetycheck/ruleManager/dialog.editItem.vue

@@ -141,9 +141,10 @@ export default {
           return;
         }
         update(this.formData).then((v) => {
+          let isAdd = this.formData.id == null || this.formData.id == 0;
           this.formData = this.reset();
           this.dialogVisible = false;
-          this.$emit("success");
+          this.$emit("success", isAdd);
         });
       });
     },

+ 11 - 19
src/views/safetycheck/ruleManager/index.vue

@@ -293,7 +293,12 @@ export default {
       return data.label.indexOf(value) !== -1;
     },
     async refresh() {
-      this.currentPage = 1;
+      this.expandAll = false;
+      this.fresh = false;
+      this.$nextTick(() => {
+        this.fresh = true;
+      });
+      this.queryParams.pageNum = 1;
       this.getList();
     },
     async getList() {
@@ -308,15 +313,6 @@ export default {
       this.expandAll = false;
       this.loading = false;
     },
-
-    handleSizeChange(val) {
-      this.pagesize = val;
-      this.getList();
-    },
-    handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
-    },
     clicktreenode(data, node) {
       this.tableData = [];
       this.rule = null;
@@ -324,13 +320,6 @@ export default {
       if (!data.isRule) {
         return;
       }
-
-      this.expandAll = false;
-      this.fresh = false;
-      this.$nextTick(() => {
-        this.fresh = true;
-      });
-
       this.queryParams.ruleId = data.id;
       this.rule = data;
       this.rule.orgId = node.parent.data.id;
@@ -391,8 +380,11 @@ export default {
     onSelect() {
       this.$refs.DialogSelect.show();
     },
-    onSuccess() {
-      this.refresh();
+    onSuccess(isAdd) {
+      if (isAdd) {
+        this.queryParams.pageNum = 1;
+      }
+      this.getList();
     },
   },
 };