ソースを参照

履职内容库缺陷

jiawuxian 2 年 前
コミット
2722ef1f62

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

@@ -30,12 +30,12 @@
               clearable
             />
           </el-form-item>
-          <el-form-item prop="type" label="履职类型">
+          <el-form-item prop="type" label="履职类型">
             <el-select
               prop="ruleTypeId"
-              label="履职类型"
+              label="履职类型"
               v-model="queryParams.type"
-              placeholder="请选择履职类型"
+              placeholder="请选择履职类型"
               clearable
             >
               <el-option
@@ -141,7 +141,7 @@
           ></el-table-column>
           <el-table-column
             prop="typeName"
-            label="履职类型"
+            label="履职类型"
             v-if="columns[2].visible"
           >
             <template slot-scope="r"

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

@@ -77,6 +77,7 @@
               @click="onAddItem()"
               :disabled="rule ? false : true"
               v-hasPermi="['resumption:ruleManager:add']"
+              v-if="rule && rule.orgId == orgId"
               >新 增</el-button
             >
             <!-- <el-button
@@ -211,7 +212,7 @@
 </template>
 
 <script>
-import { mapState, mapMutations } from "vuex";
+import { mapGetters, mapMutations } from "vuex";
 import { page, treeData, del } from "@/api/resumption/ruleManager.js";
 import DialogEdit from "./dialog.editItem.vue";
 
@@ -231,7 +232,7 @@ export default {
       filterText: null,
       showSearch: true,
       rule: null, //选中的内容库
-
+      // orgOfRule:null,//选中内容库
       expandAll: false,
       fresh: true,
       // checked: false,
@@ -255,12 +256,14 @@ export default {
         { key: 3, label: `履职内容`, visible: true },
         { key: 4, label: `履职区域`, visible: true },
       ],
+      currentOrgId:null,
     };
   },
 
   components: { DialogEdit },
 
   computed: {
+    ...mapGetters(["orgId"])
     // ...mapState(["org", "loginUser"]),
   },
 
@@ -268,6 +271,7 @@ export default {
     filterText(val) {
       this.$refs.tree.filter(val);
     },
+    
   },
 
   async created() {
@@ -277,7 +281,9 @@ export default {
     // await this.getassetlist();
   },
 
-  mounted() {},
+  mounted() {
+
+  },
 
   methods: {
     ...mapMutations([]),
@@ -304,7 +310,7 @@ export default {
       }
       const data = await page(this.queryParams);
       this.tableData = data.rows;
-      this.total = data.total;
+      this.total =Number.parseInt(data.total);
       this.expandAll = false;
     },
     async gettreelist() {
@@ -321,7 +327,7 @@ export default {
       this.currentPage = val;
       this.getList();
     },
-    clicktreenode(data) {
+    clicktreenode(data,node) {
       if (!data.isRule) {
         return;
       }
@@ -334,6 +340,7 @@ export default {
 
       this.queryParams.ruleId = data.id;
       this.rule = data;
+      this.rule.orgId=node.parent.data.id
       this.refresh();
     },
     async deldata(val) {