tangning 3 سال پیش
والد
کامیت
e50cff3e34
3فایلهای تغییر یافته به همراه6 افزوده شده و 4 حذف شده
  1. 1 1
      src/view/role/const.js
  2. 4 2
      src/view/role/index.vue
  3. 1 1
      src/view/vrmodel/index.vue

+ 1 - 1
src/view/role/const.js

@@ -84,6 +84,6 @@ export const roleList = (key) =>{
             809:'no',
         }
     }
-    console.log('list[roleLevel].key',list[roleLevel][key],roleLevel,key)
+    console.log('roleList',list[roleLevel][key] || obj[roleLevel])
     return list[roleLevel][key] || obj[roleLevel]
 }

+ 4 - 2
src/view/role/index.vue

@@ -349,7 +349,7 @@ export default {
     radioChange(val) {
       let id = this.selectShow.id;
       this.radioData[id] = val;
-      console.log("radioChange", this.radioData);
+      console.log("radioChange", this.radioData,val);
     },
     handClick(data) {
       let checkedNodes = this.$refs.tree.getCheckedNodes();
@@ -360,8 +360,10 @@ export default {
       console.log("handClick",data);
     },
     setselectShow(selectShow, id) {
+      console.log('setselectShow ',selectShow, id)
       this.selectShow = selectShow;
       this.roleLevel = roleList(id)
+      console.log('this.roleLevel ',this.roleLevel,this.radioData,id)
       this.radio = parseInt(this.radioData[id] || this.roleLevel)
       if(!this.radioData[id]&& this.operateType !== '查看')this.radioData[id] = 1
     },
@@ -369,7 +371,7 @@ export default {
       console.log("handcurrentChange", a, b);
       console.log("ref", this.selectShow);
     },
-    assembleData(val) {
+    assembleData(val) { 
       let data = val.map(ele => {
         ele.children && ele.children(ele => ele.disabled = true)
         return ele

+ 1 - 1
src/view/vrmodel/index.vue

@@ -52,7 +52,7 @@
       >
       <el-table-column label="操作" v-slot:default="{ row }">
         <span class="oper-span" v-power="'view'" @click="shareHandle(row)">查看</span>
-        <span class="oper-span" :class="{disable:!butisShow}" v-power="'edit'" @click="editModel(row)">编辑</span>
+        <span class="oper-span" :class="{disable:!(butisShow && user.info.id == row.creatorId)}" v-power="'edit'" @click="editModel(row)">编辑</span>
         <span class="oper-span" @click="download(row)" v-if="row.num" >下载</span>
         <span :class="!((butisShow)&&~user.info.cameraSns.indexOf(row.snCode))?'disable oper-span':'oper-span'" v-power="'del'" @click="dataList.delete(row)" style="color: var(--primaryColor)"  >删除</span
         >