jiawuxian 2 年 前
コミット
11ea1314a9

+ 1 - 1
src/components/table/gx.search.table.vue

@@ -64,7 +64,7 @@
                    :page-size.sync="pageSize"
                    :current-page.sync="pageIndex"
                    layout="total, sizes, prev, pager, next, jumper"
-                   :total="total"></el-pagination>
+                   :total="parseInt(total)"></el-pagination>
 
     <div class="clearfix"></div>
   </div>

+ 2 - 0
src/views/resumption/plan/dialog.edit.vue

@@ -389,6 +389,8 @@ export default {
       if (this.tableData == null) {
         this.tableData = [];
       }
+      let selectedIds= selectList.map(i=>i.id);
+      this.tableData=this.tableData.filter(d=>selectedIds.includes(d.id))
       for (let i = 0; i < selectList.length; i++) {
         let item = selectList[i];
         let exist = this.tableData.find((d) => d.id == item.id);

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

@@ -233,7 +233,6 @@
 
 <script>
 import OrgTree from "@/components/orgTree";
-import { mapState, mapMutations } from "vuex";
 import DialogEdit from "./dialog.edit";
 import DialogHistory from "./dialog.history";
 import * as api from "@/api/resumption/protection";
@@ -285,10 +284,8 @@ export default {
   props: {},
   watch: {},
   computed: {
-    ...mapState([]),
   },
   methods: {
-    ...mapMutations([]),
     getLabel,
     getList() {
       this.loading = true;

+ 0 - 19
src/views/resumption/rule/dialog.edit.vue

@@ -25,25 +25,6 @@
               style="width: 280px"
             />
           </el-form-item>
-
-          <el-form-item prop="type" label="履职类型:">
-            <el-select
-              label="履职类型"
-              v-model="formData.type"
-              placeholder="请选择履职类型"
-              clearable
-              style="width: 280px"
-            >
-              <el-option
-                v-for="item in ruleTypeOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              >
-              </el-option>
-            </el-select>
-          </el-form-item>
-
           <el-form-item prop="orgType" label="履职机构类型:">
             <el-select
               style="width: 280px"

+ 13 - 42
src/views/resumption/rule/index.vue

@@ -30,23 +30,6 @@
               clearable
             />
           </el-form-item>
-          <el-form-item prop="type" label="履职类型">
-            <el-select
-              prop="ruleTypeId"
-              label="履职类型"
-              v-model="queryParams.type"
-              placeholder="请选择履职类型"
-              clearable
-            >
-              <el-option
-                v-for="dict in dict.type.rule_type"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
-          </el-form-item>
-
           <el-form-item prop="orgType" label="履职机构类型">
             <el-select
               prop="orgType"
@@ -92,8 +75,6 @@
               >新增</el-button
             >
           </el-col>
-
-
           <right-toolbar
             :showSearch.sync="showSearch"
             @queryTable="getList"
@@ -117,18 +98,9 @@
             v-if="columns[1].visible"
           ></el-table-column>
           <el-table-column
-            prop="typeName"
-            label="履职类型"
-            v-if="columns[2].visible"
-          >
-            <template slot-scope="r"
-              >{{ getLabel(dict.type.rule_type, r.row.type) }}
-            </template>
-          </el-table-column>
-          <el-table-column
             prop="orgType"
             label="履职机构类型"
-            v-if="columns[3].visible"
+            v-if="columns[2].visible"
           >
             <template slot-scope="r"
               >{{ getLabel(dict.type.sys_org_type, r.row.orgType) }}
@@ -137,9 +109,9 @@
           <el-table-column
             prop="orgName"
             label="发布机构"
-            v-if="columns[4].visible"
+            v-if="columns[3].visible"
           ></el-table-column>
-          <el-table-column prop="status" label="状态" v-if="columns[5].visible">
+          <el-table-column prop="status" label="状态" v-if="columns[4].visible">
             <template slot-scope="r">
               <span>{{ getLabel(dict.type.plan_status, r.row.status) }}</span>
             </template>
@@ -147,7 +119,7 @@
           <el-table-column
             prop="remark"
             label="备注"
-            v-if="columns[6].visible"
+            v-if="columns[5].visible"
           ></el-table-column>
           <el-table-column label="操作">
             <template slot-scope="r">
@@ -157,11 +129,13 @@
                 icon="el-icon-edit"
                 @click="onEdit(r.row.id)"
                 v-hasPermi="['resumption:rule:edit']"
+                v-if="orgId==r.row.orgId"
                 >编辑</el-button
               >
               <el-popconfirm
                 title="确定删除履职内容库定义?"
                 @confirm="onDel(r.row.id)"
+                v-if="orgId==r.row.orgId"
               >
                 <el-button type="text" size="small" slot="reference" icon="el-icon-delete" v-hasPermi="['resumption:rule:remove']">删除</el-button>
               </el-popconfirm>
@@ -182,7 +156,6 @@
       ref="editDialog"
       @success="getList()"
       :orgTypeOptions="dict.type.sys_org_type"
-      :ruleTypeOptions="dict.type.rule_type"
       :statusOptions="dict.type.plan_status"
     ></dialog-edit>
   </div>
@@ -190,7 +163,7 @@
 
 <script>
 import OrgTree from "@/components/orgTree";
-import { mapState, mapMutations } from "vuex";
+import { mapGetters} from "vuex";
 import DialogEdit from "./dialog.edit";
 import * as api from "@/api/resumption/rule";
 import { getLabel } from "./../../commonOption";
@@ -198,7 +171,7 @@ import {wholeTreeByType} from "@/api/system/org.js"
 
 export default {
   name: "ruletype",
-  dicts: ["sys_org_type", "rule_type", "plan_status"],
+  dicts: ["sys_org_type", "plan_status"],
   components: {
     DialogEdit,
     OrgTree,
@@ -231,21 +204,19 @@ export default {
       columns: [
         { key: 0, label: `序号`, visible: true },
         { key: 1, label: `履职库名称`, visible: true },
-        { key: 2, label: `履职库类型`, visible: true },
-        { key: 3, label: `履职机构类型`, visible: true },
-        { key: 4, label: `发布机构`, visible: true },
-        { key: 5, label: `状态`, visible: true },
-        { key: 6, label: `备注`, visible: true },
+        { key: 2, label: `履职机构类型`, visible: true },
+        { key: 3, label: `发布机构`, visible: true },
+        { key: 4, label: `状态`, visible: true },
+        { key: 5, label: `备注`, visible: true },
       ],
     };
   },
   props: {},
   watch: {},
   computed: {
-    ...mapState([]),
+    ...mapGetters(['orgId']),
   },
   methods: {
-    ...mapMutations([]),
     getLabel,
     orgTree(){
       return wholeTreeByType(3);

+ 14 - 45
src/views/resumption/ruleManager/dialog.editItem.vue

@@ -1,30 +1,14 @@
 <template>
   <div class="rule-type">
-    <DialogCom
-      :title="!formData.id ? '新增履职项' : '编辑履职项'"
-      :visible.sync="dialogVisible"
-      width="50%"
-      :show-close="true"
-      @close="onHide"
-    >
+    <DialogCom :title="!formData.id ? '新增履职项' : '编辑履职项'" :visible.sync="dialogVisible" width="50%" :show-close="true"
+      @close="onHide">
       <div class="page-body">
         <div class="box">
-          <el-form
-            ref="form"
-            :model="formData"
-            :rules="formDataRules"
-            label-width="100px"
-          >
+          <el-form ref="form" :model="formData" :rules="formDataRules" label-width="100px">
             <el-row>
-              <el-col span="20">
-                <el-form-item  prop="name" label="履职项">
-                  <el-input
-                    v-model="formData.name"
-                    :maxlength="50"
-                    name="name"
-                    placeholder="请输入履职项"
-                    clearable
-                  />
+              <el-col :span="20">
+                <el-form-item prop="name" label="履职项">
+                  <el-input v-model="formData.name" :maxlength="255" name="name" placeholder="请输入履职项" clearable />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -32,7 +16,6 @@
           </el-form>
         </div>
         <div class="box">
-          <p>履职内容</p>
           <div style="margin-bottom: 10px">
             <el-button type="primary" @click="onEdit(-1)">新增履职内容</el-button>
           </div>
@@ -42,18 +25,10 @@
             </el-table-column>
             <el-table-column label="操作" width="140">
               <template slot-scope="scope">
-                <el-button
-                  type="text"
-                  size="small"
-                  @click="onEdit(scope.$index, scope.row)"
-                  >编辑</el-button
-                >
-                <el-button
-                  type="text"
-                  size="small"
-                  @click="delitem(scope.$index)"
-                  >删除</el-button
-                >
+                <el-button type="text" size="small" @click="onEdit(scope.$index, scope.row)">编辑</el-button>
+                <el-popconfirm title="是否删除履职内容" @confirm="delitem(scope.$index)" style="margin-left: 20px;">
+                  <el-button slot="reference" type="text" size="small">删除</el-button>
+                </el-popconfirm>
               </template>
             </el-table-column>
           </el-table>
@@ -65,12 +40,7 @@
         <el-button type="primary" @click="onSubmit()">保 存</el-button>
       </div>
     </DialogCom>
-    <EditPoint
-      ref="editDialog"
-      @submit="onPointSubmit"
-      :rule="rule"
-      v-bind="$attrs"
-    ></EditPoint>
+    <EditPoint ref="editDialog" @submit="onPointSubmit" :rule="rule" v-bind="$attrs"></EditPoint>
   </div>
 </template>
 
@@ -125,7 +95,7 @@ export default {
         if (!isValidate) {
           return;
         }
-        if(!this.formData.pointDtoList || this.formData.pointDtoList.length==0){
+        if (!this.formData.pointDtoList || this.formData.pointDtoList.length == 0) {
           this.$message.warning("履职内容不能为空!");
           return;
         }
@@ -153,14 +123,13 @@ export default {
       this.formData.pointDtoList.splice(val, 1);
     },
   },
-  mounted() {},
+  mounted() { },
   components: { EditPoint },
 };
 </script>
 
 <style lang="scss" scoped>
-.box{
+.box {
   margin-bottom: 20px;
 }
-
 </style>

+ 3 - 2
src/views/resumption/ruleManager/dialog.editPoint.vue

@@ -33,7 +33,7 @@
             <el-input
               v-model="formData.name"
               placeholder="请输入履职内容"
-              maxlength="100"
+              maxlength="255"
             ></el-input>
           </el-form-item>
           <el-form-item label="履职区域" prop="areaId">
@@ -71,7 +71,8 @@
             <el-input
               type="textarea"
               v-model="formData.remark"
-              maxlength="200"
+              placeholder="请输入备注"
+              maxlength="255"
               :rows="3"
               clearable
             ></el-input>

+ 15 - 5
src/views/resumption/ruleManager/dialog.select.point.vue

@@ -1,6 +1,6 @@
 <template>
   <DialogCom
-    title="选择检查要点"
+    title="选择履职内容"
     :visible.sync="isShow"
     class="g-dialog-select-safe-check"
     :close-on-click-modal="false"
@@ -34,7 +34,7 @@
             </el-select>
           </el-form-item>
           <el-form-item prop="key" label="关键字">
-            <el-input v-model="search.key"></el-input>
+            <el-input v-model="search.key" maxlength="50"  placeholder="请输入履职项或履职内容"></el-input>
           </el-form-item>
         </template>
 
@@ -79,11 +79,21 @@ export default {
     };
   },
   computed: {},
-  watch: {},
+  watch: {
+    search:{
+      deep:true,
+      handler(v){
+        if(v.ruleId){
+          this.$refs.st.search();    
+        }       
+      }
+    }
+  },
   props: {
     // defaultSelect:{
     //   type:Array
     // },
+    
     orgType: {
       type: String,
     },
@@ -95,12 +105,12 @@ export default {
       if (defaultSelect && defaultSelect.map) {
         this.selectList = defaultSelect.map((s) => ({ id: s }));
       }
-      console.info("selectList0",this.selectList);
+
       ruleListForOrg({ orgType: this.orgType }).then((r) => {
         this.ruleList = r.data;        
         if (r.data && r.data.length > 0) {
           this.search.ruleId = r.data[0].id; 
-          this.$refs.st.search();         
+               
         }
       });
     },

+ 22 - 74
src/views/resumption/ruleManager/index.vue

@@ -14,6 +14,7 @@
           :defaultProps="defaultProps"
           :showLowerCheck="false"
           :renderContent="renderContent"
+         
         >
         </org-tree>
       </el-col>
@@ -26,10 +27,10 @@
           v-show="showSearch"
           label-width="100px"
         >
-          <el-form-item prop="itemName" label="履职项">
+          <el-form-item prop="itemName" label="履职项" class="search_itemname">
             <el-input
               v-model="queryParams.itemName"
-              placeholder="请输入内容"
+              placeholder="请输入履职项"
               maxlength="50"
               clearable
             ></el-input>
@@ -66,7 +67,7 @@
               @click="onAddItem()"
               :disabled="rule ? false : true"
               v-hasPermi="['resumption:ruleManager:add']"
-              v-if="rule && rule.orgId == orgId"
+              v-if="rule && rule.orgId == orgId && rule.ruleStatus==0"
               >新 增</el-button
             >
             <!-- <el-button
@@ -167,7 +168,7 @@
           <el-table-column
             label="操作"
             width="140"
-            v-if="rule && rule.orgId == orgId"
+            v-if="rule && rule.orgId == orgId && rule.ruleStatus==0"
           >
             <template slot-scope="scope">
               <el-button
@@ -215,7 +216,7 @@
 
 <script>
 import OrgTree from "@/components/orgTree";
-import { mapGetters, mapMutations } from "vuex";
+import { mapGetters } from "vuex";
 import { page, treeData, del } from "@/api/resumption/ruleManager.js";
 import DialogEdit from "./dialog.editItem.vue";
 
@@ -260,6 +261,12 @@ export default {
         { key: 4, label: `履职区域`, visible: true },
       ],
       currentOrgId: null,
+      // treeProp: {
+      //   disabled: function(data, node) {
+      //     console.info("data",data)
+      //     return data.isRule == 1
+      //   }
+      // }
     };
   },
 
@@ -286,7 +293,6 @@ export default {
   mounted() {},
 
   methods: {
-    ...mapMutations([]),
     treeData,
     dakai() {
       this.expandAll = !this.expandAll;
@@ -331,6 +337,7 @@ export default {
       this.getList();
     },
     clicktreenode(data, node) {
+      this.tableData = [];
       if (!data.isRule) {
         return;
       }
@@ -340,10 +347,13 @@ export default {
       this.$nextTick(() => {
         this.fresh = true;
       });
-      this.tableData = [];
+      
       this.queryParams.ruleId = data.id;
       this.rule = data;
       this.rule.orgId = node.parent.data.id;
+      if(this.rule.ruleStatus!=0){
+        this.$message.info("履职内容库已禁用,无法编辑履职项、履职内容")
+      }
       this.refresh();
     },
 
@@ -402,71 +412,9 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-// .show-ellipsis {
-//   display: block;
-//   width: 180px;
-//   overflow: hidden;
-//   white-space: nowrap;
-//   text-overflow: ellipsis;
-// }
-// .search {
-//   display: flex;
-//   flex-wrap: wrap;
-//   & > div {
-//     width: 25%;
-//     display: flex;
-//     align-items: center;
-//     margin-bottom: 12px;
-//     & > span:first-child {
-//       display: inline-block;
-//       min-width: 70px;
-//       font-size: 14px;
-//       color: #606266;
-//     }
-//     &:nth-child(2),
-//     &:nth-child(3) {
-//       margin-left: 15px;
-//     }
-//     &:nth-child(3) > span {
-//       display: inline-block;
-//       min-width: 100px;
-//       font-size: 14px;
-//       color: #606266;
-//     }
-//     &:nth-child(1) > span {
-//       display: inline-block;
-//       min-width: 100px;
-//       font-size: 14px;
-//       color: #606266;
-//     }
-//     &:nth-child(1) {
-//     }
-//   }
-// }
-// .box {
-//   border: 1px solid #eee;
-//   margin-bottom: 20px;
-//   border-radius: 5px;
-//   padding: 10px;
-//   min-height: 120px;
-//   & > p {
-//     font-size: 16px;
-//     font-weight: bold;
-//     margin-bottom: 15px;
-//   }
-// }
-// .item {
-//   margin-bottom: 14px;
-// }
-// ::v-deep .el-table__expanded-cell[class*="cell"] {
-//   padding: 0;
-//   padding-left: 47px;
-// }
-// ::v-deep .formbox {
-//   display: flex;
-//   flex-wrap: wrap;
-//   .el-form-item {
-//     width: 50%;
-//   }
-// }
+.search_itemname{
+  ::v-deep .el-form-item__label{
+    width:60px !important;
+  }
+}
 </style>

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

@@ -65,10 +65,10 @@
               ></el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="任务状态" prop="status">
+          <el-form-item label="履职进度" prop="status">
             <el-select
               v-model="queryParams.status"
-              placeHolder="请选择任务状态"
+              placeHolder="请选择履职进度"
               clearable
             >
               <el-option
@@ -305,21 +305,21 @@
             prop="orgName"
             label="履职机构"
             min-width="120"
-            v-if="columns[5].visible"
+            v-if="columns[2].visible"
           >
           </el-table-column>
           <el-table-column
             prop="roleName"
             label="履职角色"
             min-width="120"
-            v-if="columns[6].visible"
+            v-if="columns[3].visible"
             >
           </el-table-column>
           <el-table-column
             prop="status"
-            label="任务状态"
+            label="履职进度"
             width="100px"
-            v-if="columns[10].visible"
+            v-if="columns[4].visible"
           >
             <template slot-scope="r">
               <span>
@@ -336,23 +336,14 @@
             prop="planStartTime"
             label="开始时间"
             min-width="140"
-            v-if="columns[2].visible"
+            v-if="columns[5].visible"
           />
           <el-table-column
             prop="planEndTime"
-            label="结束时间"
+            label="截止时间"
             min-width="140"
-            v-if="columns[3].visible"
+            v-if="columns[6].visible"
           />
-
-          <el-table-column
-            prop="parentOrgName"
-            label="上级机构"
-            min-width="120"
-            v-if="columns[4].visible"
-          >
-          </el-table-column>
-
           <el-table-column
             prop="submitter"
             label="提交人"
@@ -525,16 +516,16 @@ export default {
       pageData: [],
       columns: [
         { key: 0, label: `序号`, visible: true },
-        { key: 1, label: `计划名称`, visible: true },
-        { key: 2, label: `开始时间`, visible: true },
-        { key: 3, label: `结束时间`, visible: true },
-        { key: 4, label: `上级机构`, visible: true },
-        { key: 5, label: `履职机构`, visible: true },
-        { key: 6, label: `履职角色`, visible: true },
+        { key: 1, label: `任务名称`, visible: true },
+        { key: 2, label: `履职机构`, visible: true },
+        { key: 3, label: `履职角色`, visible: true },
+        { key: 4, label: `履职进度`, visible: true },
+        { key: 5, label: `开始时间`, visible: true },
+        { key: 6, label: `截止时间`, visible: true },
         { key: 7, label: `提交人`, visible: true },
         { key: 8, label: `提交时间`, visible: true },
         { key: 9, label: `异常个数`, visible: true },
-        { key: 10, label: `任务状态`, visible: true },
+        
       ],
     };
   },
@@ -991,16 +982,16 @@ export default {
       let color = "";
       switch (status) {
         case "1":
-          color = "#BFBFBF";
+          color = "#00B0F0";
           break;
         case "2":
-          color = "#1890FF";
+          color = "#FFC000";
           break;
         case "3":
-          color = "#52C41A";
+          color = "#00B050";
           break;
         case "4":
-          color = "#F5222D";
+          color = "#FF0000";
           break;
       }
 

+ 0 - 19
src/views/safetycheck/rule/dialog.edit.vue

@@ -25,25 +25,6 @@
               style="width:280px;"
             />
           </el-form-item>
-
-          <el-form-item prop="type" label="检查类型:">
-            <el-select
-              label="检查类型"
-              v-model="formData.type"
-              placeholder="请选择检查类型"
-              clearable
-              style="width:280px;"
-            >
-              <el-option
-                v-for="item in ruleTypeOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              >
-              </el-option>
-            </el-select>
-          </el-form-item>
-
           <el-form-item prop="orgType" label="受检机构类型:">
             <el-select
               prop="orgType"

+ 13 - 42
src/views/safetycheck/rule/index.vue

@@ -30,23 +30,6 @@
               clearable
             />
           </el-form-item>
-          <el-form-item prop="type" label="检查类型">
-            <el-select
-              prop="ruleTypeId"
-              label="检查类型"
-              v-model="queryParams.type"
-              placeholder="请选择检查类型"
-              clearable
-            >
-              <el-option
-                v-for="dict in dict.type.rule_type"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
-          </el-form-item>
-
           <el-form-item prop="orgType" label="受检机构类型">
             <el-select
               prop="orgType"
@@ -138,20 +121,11 @@
             prop="name"
             label="检查库名称"
             v-if="columns[1].visible"
-          ></el-table-column>
-          <el-table-column
-            prop="typeName"
-            label="检查类型"
-            v-if="columns[2].visible"
-          >
-            <template slot-scope="r"
-              >{{ getLabel(dict.type.rule_type, r.row.type) }}
-            </template>
-          </el-table-column>
+          ></el-table-column>  
           <el-table-column
             prop="orgType"
             label="受检机构类型"
-            v-if="columns[3].visible"
+            v-if="columns[2].visible"
           >
             <template slot-scope="r"
               >{{ getLabel(dict.type.sys_org_type, r.row.orgType) }}
@@ -160,9 +134,9 @@
           <el-table-column
             prop="orgName"
             label="发布机构"
-            v-if="columns[4].visible"
+            v-if="columns[3].visible"
           ></el-table-column>
-          <el-table-column prop="status" label="状态" v-if="columns[5].visible">
+          <el-table-column prop="status" label="状态" v-if="columns[4].visible">
             <template slot-scope="r">
               <span>{{ getLabel(dict.type.plan_status, r.row.status) }}</span>
             </template>
@@ -170,10 +144,10 @@
           <el-table-column
             prop="remark"
             label="备注"
-            v-if="columns[6].visible"
+            v-if="columns[5].visible"
           ></el-table-column>
           <el-table-column label="操作">
-            <template slot-scope="r">
+            <template slot-scope="r" v-if="orgId==r.row.orgId">
               <el-button
                 size="mini"
                 type="text"
@@ -205,7 +179,6 @@
       ref="editDialog"
       @success="getList()"
       :orgTypeOptions="dict.type.sys_org_type"
-      :ruleTypeOptions="dict.type.rule_type"
       :statusOptions="dict.type.plan_status"
     ></dialog-edit>
   </div>
@@ -213,14 +186,14 @@
 
 <script>
 import OrgTree from "@/components/orgTree";
-import { mapState, mapMutations } from "vuex";
+import { mapGetters} from "vuex";
 import DialogEdit from "./dialog.edit";
 import * as api from "@/api/safetycheck/rule";
 import { getLabel } from "./../../commonOption";
 import {wholeTreeByType} from "@/api/system/org.js"
 export default {
   name: "safetycheckruletype",
-  dicts: ["sys_org_type", "rule_type", "plan_status"],
+  dicts: ["sys_org_type", "plan_status"],
   components: {
     DialogEdit,
     OrgTree,
@@ -254,21 +227,19 @@ export default {
       columns: [
         { key: 0, label: `序号`, visible: true },
         { key: 1, label: `检查库名称`, visible: true },
-        { key: 2, label: `检查库类型`, visible: true },
-        { key: 3, label: `检查机构类型`, visible: true },
-        { key: 4, label: `发布机构`, visible: true },
-        { key: 5, label: `状态`, visible: true },
-        { key: 6, label: `备注`, visible: true },
+        { key: 2, label: `检查机构类型`, visible: true },
+        { key: 3, label: `发布机构`, visible: true },
+        { key: 4, label: `状态`, visible: true },
+        { key: 5, label: `备注`, visible: true },
       ],
     };
   },
   props: {},
   watch: {},
   computed: {
-    ...mapState([]),
+    ...mapGetters(['orgId']),
   },
   methods: {
-    ...mapMutations([]),
     getLabel,
     orgTree(){
       return wholeTreeByType(3);

+ 3 - 6
src/views/safetycheck/ruleManager/dialog.editItem.vue

@@ -45,12 +45,9 @@
                   @click="onEdit(scope.$index, scope.row)"
                   >编辑</el-button
                 >
-                <el-button
-                  type="text"
-                  size="small"
-                  @click="delitem(scope.$index)"
-                  >删除</el-button
-                >
+                <el-popconfirm title="是否删除检查内容" @confirm="delitem(scope.$index)" style="margin-left: 20px;">
+                  <el-button slot="reference" type="text" size="small">删除</el-button>
+                </el-popconfirm>
               </template>
             </el-table-column>
           </el-table>

+ 11 - 3
src/views/safetycheck/ruleManager/dialog.select.point.vue

@@ -34,7 +34,7 @@
             </el-select>
           </el-form-item>
           <el-form-item prop="key" label="关键字">
-            <el-input v-model="search.key"></el-input>
+            <el-input v-model="search.key" maxlength="50" placeholder="请输入检查项或检查内容"></el-input>
           </el-form-item>
         </template>
 
@@ -78,7 +78,16 @@ export default {
     };
   },
   computed: {},
-  watch: {},
+  watch: {
+    search:{
+      deep:true,
+      handler(v){
+        if(v.ruleId){
+          this.$refs.st.search();    
+        }       
+      }
+    }
+  },
   props: {
     // defaultSelect:{
     //   type:Array
@@ -100,7 +109,6 @@ export default {
         
         if (r.data && r.data.length > 0) {
           this.search.ruleId = r.data[0].id;
-          this.$refs.st.search();
         }
       });
     },

+ 8 - 5
src/views/safetycheck/ruleManager/index.vue

@@ -65,7 +65,7 @@
               @click="onAddItem()"
               :disabled="rule ? false : true"
               v-hasPermi="['resumption:ruleManager:add']"
-              v-if="rule && rule.orgId == orgId"
+              v-if="rule && rule.orgId == orgId && rule.ruleStatus==0"
               >新 增</el-button
             >
             <!-- <el-button
@@ -162,7 +162,7 @@
             v-if="columns[2].visible"
           >
           </el-table-column>
-          <el-table-column label="操作" width="140" v-if="rule && rule.orgId == orgId">
+          <el-table-column label="操作" width="140" v-if="rule && rule.orgId == orgId && rule.ruleStatus==0">
             <template slot-scope="scope">
               <el-button
                 type="text"
@@ -204,7 +204,7 @@
 </template>
 
 <script>
-import { mapGetters, mapMutations } from "vuex";
+import { mapGetters } from "vuex";
 import { page, treeData, del } from "@/api/safetycheck/ruleManager.js";
 import DialogEdit from "./dialog.editItem.vue";
 import SelectPoint from './dialog.select.point.vue';
@@ -283,7 +283,6 @@ export default {
   },
 
   methods: {
-    ...mapMutations([]),
     treeData,
     dakai() {
       this.expandAll = !this.expandAll;
@@ -323,6 +322,7 @@ export default {
       this.getList();
     },
     clicktreenode(data,node) {
+      this.tableData=[]
       if (!data.isRule) {
         return;
       }
@@ -332,10 +332,13 @@ export default {
       this.$nextTick(() => {
         this.fresh = true;
       });
-      this.tableData=[]
+     
       this.queryParams.ruleId = data.id;
       this.rule = data;
       this.rule.orgId=node.parent.data.id
+      if(this.rule.ruleStatus!=0){
+        this.$message.info("履职内容库已禁用,无法编辑履职项、履职内容")
+      }
       this.refresh();
     },
     async deldata(val) {