From faca3d41bf615f238a43018f4729cf44f7c3210e Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 20 三月 2025 15:45:31 +0800
Subject: [PATCH] 最新版本541200007
---
admin/src/components/system/role/OperaSystemRoleDataWindow.vue | 87 +++++++++++++++++++++++--------------------
1 files changed, 47 insertions(+), 40 deletions(-)
diff --git a/admin/src/components/system/role/OperaSystemRoleDataWindow.vue b/admin/src/components/system/role/OperaSystemRoleDataWindow.vue
index 9528a0b..1f81396 100644
--- a/admin/src/components/system/role/OperaSystemRoleDataWindow.vue
+++ b/admin/src/components/system/role/OperaSystemRoleDataWindow.vue
@@ -1,32 +1,16 @@
<template>
- <GlobalWindow
- :title="title"
- width="60%"
- :visible.sync="visible"
- :confirm-working="isWorking"
- @confirm="confirm"
- >
- <p class="tip">姝e湪涓鸿鑹层�� <em>{{role.name || '-'}}</em>銆� 閰嶇疆鏁版嵁鏉冮檺</p>
+ <GlobalWindow :title="title" width="80%" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm">
+ <p class="tip">姝e湪涓鸿鑹层�� <em>{{ role.name || '-' }}</em>銆� 閰嶇疆鏁版嵁鏉冮檺</p>
<p class="tip-warn"><i class="el-icon-warning"></i>鎻愰啋锛氭潈闄愰厤缃悗闇�閲嶆柊鐧诲綍鍚庣敓鏁�</p>
<el-form :model="form" ref="form" style="margin-top:15px">
<el-form-item label="鏉冮檺绫诲瀷锛�" prop="type">
<el-select v-model="form.type" clearable filterable placeholder="璇烽�夋嫨鏉冮檺绫诲瀷">
- <el-option
- v-for="(item, index) in options"
- :key="index"
- :label="item.name"
- :value="item.id"
- >
+ <el-option v-for="(item, index) in options" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item v-if="form.type == 4" label="鑷畾涔夐儴闂細" prop="customData">
- <el-cascader
- :options="departments"
- v-model="form.customData"
- :props=defaultProps
- clearable
- ></el-cascader>
+ <el-cascader :options="departments" v-model="form.customData" :props=defaultProps clearable></el-cascader>
</el-form-item>
</el-form>
@@ -38,20 +22,21 @@
import GlobalWindow from '@/components/common/GlobalWindow'
import { createRoleDataPermission } from '@/api/system/role'
import { fetchList } from '@/api/business/company'
- // import the styles
+// import the styles
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
name: 'OperaSystemRoleWindow',
extends: BaseOpera,
components: { GlobalWindow },
- data () {
+ data() {
return {
options: [
{ name: '鍏ㄩ儴', id: 0 },
{ name: '鎵�灞為儴闂ㄥ強涓嬪睘閮ㄩ棬', id: 1 },
{ name: '鎵�灞為儴闂ㄥ強鍏跺瓙瀛欓儴闂�', id: 2 },
{ name: '浠呮墍灞為儴闂�', id: 3 },
- { name: '鑷畾涔夐儴闂�', id: 4 }
+ { name: '鑷畾涔夐儴闂�', id: 4 },
+ { name: '鍙湅鑷繁', id: -1 },
],
// 琛ㄥ崟鏁版嵁
form: {
@@ -71,11 +56,11 @@
value: 'id',
emitPath: false
},
- role:{},
+ role: {},
departments: []
}
},
- created () {
+ created() {
this.config({
api: '/system/role',
'field.id': 'id'
@@ -84,18 +69,18 @@
},
methods: {
// 閮ㄩ棬鏍戠姸缁撴瀯鏁版嵁
- treeComList () {
+ treeComList() {
fetchList()
.then(res => {
// this.departments = this.tree([res])
- this.departments =this.newTree(res)
+ this.departments = this.newTree(res)
})
},
- open (title, target,role) {
+ open(title, target, role) {
// console.log(title, target)
this.title = title
this.visible = true
- this.role=role
+ this.role = role
// 鏂板缓
if (target == null) {
this.$nextTick(() => {
@@ -109,33 +94,33 @@
for (const key in this.form) {
this.form[key] = target[key]
}
- console.log(target);
- if (target.customData === undefined ||target.customData === null || target.customData === '') {
+ console.log(target)
+ if (target.customData === undefined || target.customData === null || target.customData === '') {
this.form.customData = []
} else {
- const customD = this.form.customData.split(',')
+ const customD = this.form.customData.split(',')
this.form.customData = customD.map((item) => { return parseInt(item) })
}
})
},
newTree(tree) {
- if(tree ==null){
+ if (tree == null) {
return []
}
return tree.map(item => {
- let newItem = {...item}
- if(newItem){
- newItem.children=newItem.childList
+ let newItem = { ...item }
+ if (newItem) {
+ newItem.children = newItem.childList
}
if (item.children && item.children.length == 0) {
- this.$delete( newItem, 'children' )
+ this.$delete(newItem, 'children')
} else {
newItem.children = this.newTree(newItem.children)
}
return newItem
- });
+ })
},
- __confirmCreate () {
+ __confirmCreate() {
// console.log(JSON.stringify(this.form.customData));
// return
this.$refs.form.validate((valid) => {
@@ -164,7 +149,7 @@
})
})
},
- __confirmEdit () {
+ __confirmEdit() {
// console.log(JSON.stringify(this.form.customData));
// return
this.$refs.form.validate((valid) => {
@@ -196,3 +181,25 @@
}
}
</script>
+<style scoped lang="scss">
+.transfer {
+ height: 600px;
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ ::v-deep .el-transfer-panel {
+ flex: 1;
+ height: 100%;
+ }
+
+ ::v-deep .el-transfer-panel__body {
+ height: 500px;
+ }
+
+ ::v-deep .el-transfer-panel__list.is-filterable {
+ height: 480px;
+ }
+}
+</style>
--
Gitblit v1.9.3