Procházet zdrojové kódy

[update] 系统指引默认过滤条件区分普通用户与管理员

cfort před 2 roky
rodič
revize
582d18464a

+ 1 - 1
src/views/system/dashboard/components/workbench.js

@@ -122,7 +122,7 @@ export const listSearchForm = {
         forms: [
             { prop: 'range', label: '显示范围', labelWidth: 70, fieldType: 'select', options: rangeOption, value: 'aboutMe' },
             { prop: 'suo_shu_xi_tong_', label: '所属子系统', labelWidth: 85, fieldType: 'select', options: [] },
-            { prop: 'gong_neng_mo_kuai', label: '所属功能模块', labelWidth: 90, fieldType: 'input' },
+            { prop: 'gong_neng_mo_kuai', label: '所属功能模块', labelWidth: 100, fieldType: 'input' },
             { prop: 'role', label: '执行角色', labelWidth: 70, fieldType: 'select', options: [] },
             { prop: 'biao_dan_ming_che', label: '记录表单', labelWidth: 70, fieldType: 'input' },
             { prop: 'shi_wu_lei_xing_', label: '事务类型', labelWidth: 70, fieldType: 'select', options: taskTypeOption }

+ 3 - 1
src/views/system/dashboard/components/workbench.vue

@@ -127,9 +127,11 @@ export default {
     data () {
         const { first = '', second = '' } = this.$store.getters.level || {}
         const level = second || first
-        const { userList = [], deptList = [], role = [], menus = [] } = this.$store.getters || {}
+        const { userList = [], deptList = [], role = [], menus = [], isSuper } = this.$store.getters || {}
+        const isManager = role.some(i => i.alias === 'xtgljs') || isSuper
         const roleOption = role.map(i => ({ key: i.id, value: i.id, label: i.name }))
         const sysOption = menus.map(i => ({ key: i.alias, value: i.title, label: i.title })).filter(i => !['xtgl', 'xnyz'].includes(i.key))
+        listSearchForm.guide.forms[0].value = isManager ? 'all' : 'aboutMe'
         listSearchForm.guide.forms[1].options = sysOption
         listSearchForm.guide.forms[3].options = roleOption
         const getGuide = ({ parameters, requestPage, sorts }) => {