瀏覽代碼

全景禁用编辑

zhengnaiwen_citu 5 月之前
父節點
當前提交
dfe9aa74bf
共有 1 個文件被更改,包括 22 次插入17 次删除
  1. 22 17
      src/views/humanResources/roster/index.vue

+ 22 - 17
src/views/humanResources/roster/index.vue

@@ -22,7 +22,7 @@
         <m-button type="orange" size="small" icon="el-icon-download" @click="onDownload" :loading="downloadLoading">下载模板</m-button>
         <m-button type="orange" size="small" icon="el-icon-setting" @click="onChange">变更记录</m-button>
       </template>
-      <template #actions="{ row }">
+      <template #actions="{ row }" v-if="!$attrs.panorama">
         <m-button text type="primary" @click="onEdit(row)">编辑</m-button>
         <m-button text type="danger" @click="onDelete(row)">删除</m-button>
       </template>
@@ -57,22 +57,6 @@ export default {
       searchValues: {
         employeeName: null
       },
-      headers: [
-        // { text: '一级机构', align: 'start', value: 'secondLevelBranch' },
-        { label: '上级机构', prop: 'parentOrganizationName' },
-        { label: '部门', prop: 'deptName' },
-        { label: '员工名称', prop: 'employeeName' },
-        { label: '人员类别', prop: 'personnelCategory' },
-        { label: '岗位名称', prop: 'postName' },
-        { label: '岗位序列', prop: 'positionSequence' },
-        { label: '岗位类别', prop: 'positionCategory' },
-        { label: '职务层级', prop: 'jobLevel' },
-        { label: '通行证号', prop: 'passes' },
-        { label: '工行时间', prop: 'tradeUnionsTimeText' },
-        { label: '薪酬档次', align: 'center', prop: 'salaryCategory' },
-        { label: '薪酬级别', align: 'center', prop: 'salaryLevel' },
-        { label: '操作', prop: 'actions' }
-      ],
       itemData: {},
       items: [],
       orders: [],
@@ -115,6 +99,27 @@ export default {
           type: 'cascader'
         }
       ]
+    },
+    headers () {
+      const header = [
+        // { text: '一级机构', align: 'start', value: 'secondLevelBranch' },
+        { label: '上级机构', prop: 'parentOrganizationName' },
+        { label: '部门', prop: 'deptName' },
+        { label: '员工名称', prop: 'employeeName' },
+        { label: '人员类别', prop: 'personnelCategory' },
+        { label: '岗位名称', prop: 'postName' },
+        { label: '岗位序列', prop: 'positionSequence' },
+        { label: '岗位类别', prop: 'positionCategory' },
+        { label: '职务层级', prop: 'jobLevel' },
+        { label: '通行证号', prop: 'passes' },
+        { label: '工行时间', prop: 'tradeUnionsTimeText' },
+        { label: '薪酬档次', align: 'center', prop: 'salaryCategory' },
+        { label: '薪酬级别', align: 'center', prop: 'salaryLevel' }
+      ]
+      if (!this.$attrs.panorama) {
+        header.push({ label: '操作', prop: 'actions' })
+      }
+      return header
     }
   },
   created () {