浏览代码

修改权限项

zhaoke 3 年之前
父节点
当前提交
22680b2c43
共有 2 个文件被更改,包括 12 次插入5 次删除
  1. 10 3
      src/components/organization/index.vue
  2. 2 2
      src/components/rulesofcompetency/index.vue

+ 10 - 3
src/components/organization/index.vue

@@ -14,9 +14,16 @@
         <div class="dptBox" v-show="active == 0">
           <el-scrollbar style="height: 100%">
             <el-tree :data="data" :check-strictly="true" show-checkbox @node-click="nodeClick" @check-change="currentChange" :props="defaultProps" default-expand-all :default-checked-keys="checkedKeys" :expand-on-click-node="false" :node-key="nodekey" ref="tree" highlight-current>
-              <span slot-scope="{ data }" :title="data.OrganName" class="org-data-tree-node">
-                {{ data.OrganName }}
-              </span>
+              <template v-if="orgType == 'org'">
+                <span slot-scope="{ data }" :title="data.OrganName" class="org-data-tree-node">
+                  {{ data.OrganName }}
+                </span>
+              </template>
+              <template v-else>
+                <span slot-scope="{ data }" :title="data.AuthName" class="org-data-tree-node">
+                  {{ data.AuthName }}
+                </span>
+              </template>
             </el-tree>
           </el-scrollbar>
         </div>

+ 2 - 2
src/components/rulesofcompetency/index.vue

@@ -163,7 +163,7 @@ export default {
         EditRow: this.form.input5,
         DeleteRow: this.form.input3
       }
-      this.$emit('get-data', obj)
+      this.$emit('getData', obj)
       const arr = this.$store.getters.authArrs
       const datas = _.unionBy(arr, 'AuthId')
       const id = this.$store.getters.authId
@@ -171,7 +171,7 @@ export default {
       if (datas.length) {
         // const dat = datas[datas.length - 1]
         let dat = datas[datas.length - 1]
-        datas.map(item=>{
+        datas.map(item => {
           if (item.AuthId == id) {
             dat = item;
           }