From 42636c58501d68650ef5323676eee3bdea292347 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 23 八月 2023 17:08:02 +0800
Subject: [PATCH] 1.组织架构优化
---
src/views/basicSettings/roleList.vue | 33 +++++++++++++++++++++------------
1 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/src/views/basicSettings/roleList.vue b/src/views/basicSettings/roleList.vue
index 61812af..9b508f0 100644
--- a/src/views/basicSettings/roleList.vue
+++ b/src/views/basicSettings/roleList.vue
@@ -83,7 +83,7 @@
sortable="custom"
/>
<el-table-column
- prop="lm_user"
+ prop="username"
label="鍒涘缓浜哄憳"
sortable="custom"
/>
@@ -178,9 +178,9 @@
>
<el-option
v-for="item in datacodeArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
+ :key="item.datacode"
+ :label="item.dataname"
+ :value="item.datacode"
/>
</el-select>
</el-form-item>
@@ -227,7 +227,13 @@
<span slot="footer" class="dialog-footer">
<div class="footerButton">
<el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
- <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>
+ <el-button
+ v-waves
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="dialogVisibleConfirm"
+ >纭� 瀹�</el-button>
</div>
</span>
</el-dialog>
@@ -245,7 +251,7 @@
import { validateCode } from '@/utils/global'
import elDragDialog from '@/directive/el-drag-dialog'
import waves from '@/directive/waves'
-import { PrentOrganization } from '@/api/GeneralBasicData'
+import { DataPermissions, PrentOrganization } from '@/api/GeneralBasicData'
import arrayToTree from 'array-to-tree'
export default {
@@ -277,12 +283,7 @@
datapermissions: '', // 鏁版嵁鏉冮檺
status: 'Y'// 鐘舵��
},
- datacodeArr: [
- { code: 'ALL', name: '鍏ㄩ儴' },
- { code: 'CUSTOM', name: '鑷畾涔�' },
- { code: 'LEVEL', name: '鏈骇' },
- { code: 'PERSON', name: '鏈汉' }
- ],
+ datacodeArr: [],
checkboxGroupSelected: ['灞曞紑/鎶樺彔', '鐖跺瓙鑱斿姩'],
checkboxGroup: ['灞曞紑/鎶樺彔', '鍏ㄩ��/鍏ㄤ笉閫�', '鐖跺瓙鑱斿姩'],
operation: '',
@@ -310,12 +311,17 @@
this.getHeight()
this.getPrentOrganization()
+ this.getDataPermissions()
},
methods: {
async getRoleData() {
const res = await RoleData(this.form)
this.tableData = res.data
this.total = res.count
+ },
+ async getDataPermissions() {
+ const { data: res } = await DataPermissions()
+ this.datacodeArr = res
},
// 缁勭粐鏋舵瀯绾ц仈閫夋嫨鍣�
async getPrentOrganization() {
@@ -412,6 +418,7 @@
dialogVisibleConfirm() {
this.$refs.dialogForm.validate(valid => {
if (valid) {
+ this.$store.state.app.buttonIsDisabled = true
if (this.$refs.tree) {
this.dialogForm.datapermissions = this.$refs.tree.getCheckedKeys().join(',')
}
@@ -419,8 +426,10 @@
if (res.code === '200') {
this.$notify.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
this.dialogVisible = false
+ this.$store.state.app.buttonIsDisabled = false
this.getRoleData()
} else {
+ this.$store.state.app.buttonIsDisabled = false
this.$notify.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
}
})
--
Gitblit v1.9.3