Jelajahi Sumber

修改数据权限中教学平台特殊处理

tangning 3 tahun lalu
induk
melakukan
fb7ef5e6ad
1 mengubah file dengan 22 tambahan dan 4 penghapusan
  1. 22 4
      src/view/role/index.vue

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

@@ -86,7 +86,7 @@
       :enterText="operateType == '查看'?'确定':false"
       :cornerClose="operateType == '查看'"
       @submit="newSubmit"
-      width="540"
+      width="600"
     >
       <el-form ref="form" :model="form" label-width="90px" class="user-from">
         <el-form-item label="角色名称:" class="mandatory">
@@ -135,7 +135,7 @@
                 v-if="selectShow"
                 v-model="radio"
                 @change="radioChange"
-                :disabled="operateType == '查看'"
+                :disabled="operateType == '查看' || teachingRole(selectShow.id)"
               >
                 <el-radio
                   style="line-height:28px"
@@ -261,8 +261,16 @@ export default {
       data.newShow = true;
       
     };
-    const roleSelctShow = (id) => {
-      if(data.roleLevel<= id){
+    const teachingRole = (id) => {//判断是否教学平台特殊处理
+      let teachingList = ['801','806','807','808','810',]
+      return teachingList.includes(id)
+    }
+    const roleSelctShow = (val) => {
+      let { id } = data.selectShow
+      console.log('roleSelctShow',id,teachingRole(id),'selectShow',)
+      if(teachingRole(id) && val == 0){
+        return true
+      }else if(data.roleLevel<= val){
         return true
       }else{
         return false
@@ -314,6 +322,7 @@ export default {
       ADMIN_USER_ID,
       roleKey,
       newAddclick,
+      teachingRole,
       getRoke,
     };
   },
@@ -366,6 +375,15 @@ export default {
       this.selectShow = selectShow;
       this.roleLevel = roleList(id)
       this.radio = parseInt(this.radioData[id] || this.roleLevel)
+      if(this.teachingRole(id)){
+          this.roleSelct = [ { id: this.roleLevel, value: "所属省份总队全部数据及下级数据" }, ]
+      }else{
+          this.roleSelct = [
+          { id: 1, value: "全部数据" },
+          { id: 3, value: "所属组织及下级组织数据" },
+          { id: 4, value: "所属组织内部数据" },
+          { id: 5, value: "个人创建数据" },]
+      }
       if(!this.radioData[id]&& this.operateType !== '查看')this.radioData[id] = this.roleLevel
       
     },