Просмотр исходного кода

首页个人信息岗位图标修改及用户信息页面禁用状态禁止点击切换岗位

shenqilong 6 месяцев назад
Родитель
Сommit
0ce14e53f6

+ 1 - 1
src/layout/header-aside/components/header-user/index.vue

@@ -102,7 +102,7 @@
           </template>
           <template v-if="dutys.length">
             <div class="title512">
-              <i class="el-icon-office-building" />岗位
+              <i class="el-icon-postcard" />岗位
               <el-tooltip
                 effect="light"
                 content="双击下方岗位可切换主岗位"

+ 8 - 6
src/views/platform/org/employee/edit/duty-info.vue

@@ -218,12 +218,14 @@ export default {
     },
 
     clickitem(row) {
-      const list = JSON.parse(JSON.stringify(row))
-      for (const item of this.dutyItemList) {
-        item.isMainPost = 'N'
-      }
-      if (list.isMainPost == 'N') {
-        row.isMainPost = 'Y'
+      if (!this.readonly) {
+        const list = JSON.parse(JSON.stringify(row))
+        for (const item of this.dutyItemList) {
+          item.isMainPost = 'N'
+        }
+        if (list.isMainPost == 'N') {
+          row.isMainPost = 'Y'
+        }
       }
     },
     // 回填显示单选、多选框的value