From 6b58c8e4220f78cbe8bee04b4a08d5b97ef34ad1 Mon Sep 17 00:00:00 2001 From: wanglei Date: Thu, 31 Oct 2024 09:47:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=A3=E6=A1=88=E7=9B=AE=E5=BD=95=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dangan-ui/src/store/modules/user.js | 5 +++++ dangan-ui/src/views/dangan/catalog/index.vue | 11 +++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dangan-ui/src/store/modules/user.js b/dangan-ui/src/store/modules/user.js index 4916d31..72e867a 100644 --- a/dangan-ui/src/store/modules/user.js +++ b/dangan-ui/src/store/modules/user.js @@ -3,6 +3,7 @@ import { getToken, setToken, removeToken } from '@/utils/auth' const user = { state: { + admin:'', token: getToken(), id: '', name: '', @@ -13,6 +14,9 @@ const user = { }, mutations: { + SET_ADMIN: (state, admin) => { + state.admin = admin + }, SET_TOKEN: (state, token) => { state.token = token }, @@ -66,6 +70,7 @@ const user = { } else { commit('SET_ROLES', ['ROLE_DEFAULT']) } + commit('SET_ADMIN', user.admin) commit('SET_ID', user.userId) commit('SET_NAME', user.userName) commit('SET_AVATAR', avatar) diff --git a/dangan-ui/src/views/dangan/catalog/index.vue b/dangan-ui/src/views/dangan/catalog/index.vue index 42b48ca..9ea02e6 100644 --- a/dangan-ui/src/views/dangan/catalog/index.vue +++ b/dangan-ui/src/views/dangan/catalog/index.vue @@ -379,7 +379,6 @@ export default { }, created() { this.getList(); - // this.getParentOption(); }, methods: { /** 查询目录列表 */ @@ -456,7 +455,7 @@ export default { this.form.pid = 0; } - if(row&&row.id!==0){ + if(row&&row.id!==0&&row.id!==undefined){ getCatalogNumber(row.id).then(response => { this.form.orderNum = response.orderNum; }); @@ -537,7 +536,7 @@ export default { this.form.muName = this.dict.type.yw_type.find(option => option.value === val).label; }, /** 查询乡镇列表 */ - /*getParentOption() { + getParentOption() { listAreaSort({ pageNum: 1, pageSize: 1000000000, @@ -545,9 +544,10 @@ export default { }).then(response => { this.xzcsq.parentOption = response.rows; }); - },*/ + }, // 选择乡镇 村/社区 selectXZCSQ(areaType){ + this.getParentOption(); this.xzcsq.list = []; this.xzcsq.queryParams.pageNum = 1; this.xzcsq.queryParams.pageSize = 10; @@ -603,8 +603,7 @@ export default { }, /** 查询档案图片信息记录列表 */ getListPicture(row) { - - if(this.$store.state.user.permissions.indexOf('dangan:pictureRecard:list')>0){ + if(this.$store.state.user.admin || this.$store.state.user.permissions.indexOf('dangan:pictureRecard:list')>0){ this.lssc.open = true; listPictureRecard({muId: row.id,pageSize: 1000000000}).then(response => { this.lssc.list = response.rows;