From 68338b19f9dc2ad9725326b7e699a3e191030cb8 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 24 八月 2023 17:27:59 +0800
Subject: [PATCH] 1.角色分配
---
src/views/basicSettings/personList.vue | 74 ++++++++++++++++++++++++++++++++-----
1 files changed, 64 insertions(+), 10 deletions(-)
diff --git a/src/views/basicSettings/personList.vue b/src/views/basicSettings/personList.vue
index 49e5599..5bc9d2c 100644
--- a/src/views/basicSettings/personList.vue
+++ b/src/views/basicSettings/personList.vue
@@ -23,7 +23,7 @@
<el-tree
ref="treeLeftRef"
style="padding: 10px;overflow: auto;"
- :style="{height:(tableHeight+140)+'px'}"
+ :style="{height:(tableHeight+180)+'px'}"
:data="treeLeft"
node-key="torg_code"
highlight-current
@@ -55,6 +55,25 @@
<el-form-item label="鐢ㄦ埛鍚嶇О" style=" display: flex;">
<el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />
</el-form-item>
+ <el-form-item label="鐢ㄦ埛缂栫爜" style=" display: flex;">
+ <el-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="鐢ㄦ埛鍚嶇О" style=" display: flex;">
+ <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+
+ <el-form-item v-show="isExpandForm" label="鐢ㄦ埛缂栫爜" style=" display: flex;">
+ <el-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="鐢ㄦ埛鍚嶇О" style=" display: flex;">
+ <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="鐢ㄦ埛缂栫爜" style=" display: flex;">
+ <el-input v-model="form.usercode" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="鐢ㄦ埛鍚嶇О" style=" display: flex;">
+ <el-input v-model="form.username" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
</div>
<div
class="bodySearchReset"
@@ -64,7 +83,23 @@
<el-button v-waves type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
</div>
</el-form>
-
+ <div
+ class="bodyTopFormExpand"
+ >
+ <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">
@@ -72,10 +107,10 @@
ref="tableDataRef"
class="tableFixed"
:data="tableData"
- :height="tableHeight+'px'"
+ :height="isExpandForm?tableHeight:(tableHeight+80)+'px'"
border
row-class-name="custom-row"
- :style="{width: 100+'%',height:tableHeight+'px',}"
+ :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px',}"
highlight-current-row
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
@@ -154,7 +189,16 @@
</template>
</el-table-column>
<el-table-column
- prop="lm_user"
+ prop="group_name"
+ label="鐝粍"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.group_name ? row.group_name : '/' }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="createusername"
label="鍒涘缓浜哄憳"
sortable="custom"
/>
@@ -318,7 +362,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>
@@ -375,6 +425,8 @@
}
}
return {
+ mouseHoverType: 'mouseout',
+ isExpandForm: false,
mainHeight: 0,
tableHeight: 0,
form: {
@@ -596,7 +648,6 @@
handleClose() {
this.dialogForm.usercode = ''
this.dialogForm.username = ''
- this.dialogForm.storg_code = ''
this.dialogForm.status = 'Y'
this.dialogForm.post_code = []
@@ -605,6 +656,8 @@
this.dialogForm.password = '123456'
this.dialogForm.mobile = ''
this.dialogForm.email = ''
+
+ // this.dialogForm.storg_code = ''
this.$refs.cascader.checkedValue = ''
this.$refs.dialogForm.clearValidate()
@@ -617,18 +670,19 @@
dialogVisibleConfirm() {
this.$refs.dialogForm.validate(valid => {
if (valid) {
+ this.$store.state.app.buttonIsDisabled = true
this.dialogForm.group_code = this.dialogForm.group_code.join(',')
this.dialogForm.post_code = this.dialogForm.post_code.join(',')
this.dialogForm.role_code = this.dialogForm.role_code.join(',')
this.dialogForm.storg_code = this.dialogForm.storg_code[this.dialogForm.storg_code.length - 1]
-
- console.log(JSON.parse(JSON.stringify(this.dialogForm)))
AddUpdateUserSave(this.dialogForm).then(res => {
if (res.code === '200') {
this.$notify.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
this.dialogVisible = false
+ this.$store.state.app.buttonIsDisabled = false
this.getUserData()
} else {
+ this.$store.state.app.buttonIsDisabled = false
this.$notify.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
}
})
@@ -639,7 +693,7 @@
getHeight() {
this.$nextTick(() => {
this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 200
+ this.tableHeight = this.mainHeight - 295
this.$refs.tableDataRef.doLayout()
})
}
--
Gitblit v1.9.3