From 64b6bfde07c40b9df6181044d485d437b9bb787c Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 07 五月 2024 09:21:58 +0800
Subject: [PATCH] 1.定时任务demo提交
---
src/views/basicSettings/roleList.vue | 65 ++++++++++++++++++++++++--------
1 files changed, 49 insertions(+), 16 deletions(-)
diff --git a/src/views/basicSettings/roleList.vue b/src/views/basicSettings/roleList.vue
index 61812af..0d211da 100644
--- a/src/views/basicSettings/roleList.vue
+++ b/src/views/basicSettings/roleList.vue
@@ -29,7 +29,24 @@
<el-button v-waves type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
</div>
</el-form>
-
+ <div
+ class="bodyTopFormExpand"
+ style="height:5px"
+ >
+ <!-- <svg-icon-->
+ <!-- v-show="mouseHoverType==='mouseout'"-->
+ <!-- style="cursor: pointer"-->
+ <!-- :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"-->
+ <!-- @mouseenter="mouseHoverType=$event.type"-->
+ <!-- />-->
+ <!-- <svg-icon-->
+ <!-- v-show="mouseHoverType==='mouseenter'"-->
+ <!-- style="cursor: pointer"-->
+ <!-- :icon-class="!isExpandForm?'doubleDown':'doubleUp'"-->
+ <!-- @click="isExpandForm=!isExpandForm"-->
+ <!-- @mouseout="mouseHoverType=$event.type"-->
+ <!-- />-->
+ </div>
</div>
<div class="elTableDiv">
@@ -81,9 +98,13 @@
prop="description"
label="澶囨敞"
sortable="custom"
- />
+ >
+ <template slot-scope="{row}">
+ {{ row.description?row.description:'/' }}
+ </template>
+ </el-table-column>
<el-table-column
- prop="lm_user"
+ prop="username"
label="鍒涘缓浜哄憳"
sortable="custom"
/>
@@ -131,7 +152,7 @@
<el-dropdown-menu slot="dropdown">
<el-dropdown-item icon="el-icon-circle-check" command="menuPower">鑿滃崟鏉冮檺</el-dropdown-item>
<el-dropdown-item icon="el-icon-user" command="divideUser">鍒嗛厤鐢ㄦ埛</el-dropdown-item>
- <el-dropdown-item icon="el-icon-download" command="downloadMenu">瀵煎嚭鑿滃崟</el-dropdown-item>
+ <!-- <el-dropdown-item icon="el-icon-download" command="downloadMenu">瀵煎嚭鑿滃崟</el-dropdown-item>-->
</el-dropdown-menu>
</el-dropdown>
</div>
@@ -178,9 +199,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 +248,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 +272,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 +304,7 @@
datapermissions: '', // 鏁版嵁鏉冮檺
status: 'Y'// 鐘舵��
},
- datacodeArr: [
- { code: 'ALL', name: '鍏ㄩ儴' },
- { code: 'CUSTOM', name: '鑷畾涔�' },
- { code: 'LEVEL', name: '鏈骇' },
- { code: 'PERSON', name: '鏈汉' }
- ],
+ datacodeArr: [],
checkboxGroupSelected: ['灞曞紑/鎶樺彔', '鐖跺瓙鑱斿姩'],
checkboxGroup: ['灞曞紑/鎶樺彔', '鍏ㄩ��/鍏ㄤ笉閫�', '鐖跺瓙鑱斿姩'],
operation: '',
@@ -310,12 +332,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 +439,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 +447,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' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
}
})
@@ -430,7 +460,10 @@
handleCommand(command, row) {
console.log(command, row)
if (command === 'menuPower') {
- this.$router.push('./roleList?powerId=' + row.id)// demo
+ this.$router.push('./powerDivider?rolecode=' + row.rolecode)
+ }
+ if (command === 'divideUser') {
+ this.$router.push('./roleDivider?rolecode=' + row.rolecode)
}
},
// 鑾峰彇椤甸潰楂樺害
--
Gitblit v1.9.3