Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
dsk-cr20g
Commits
65c6e5a4
Commit
65c6e5a4
authored
Aug 28, 2023
by
huangjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业方案
parent
a2130fca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
40 deletions
+69
-40
enterpriseManagement.js
...e-ui/src/api/enterpriseManagement/enterpriseManagement.js
+30
-0
programme.vue
dsk-operate-ui/src/views/enterpriseManagement/programme.vue
+37
-38
vue.config.js
dsk-operate-ui/vue.config.js
+2
-2
No files found.
dsk-operate-ui/src/api/enterpriseManagement/enterpriseManagement.js
0 → 100644
View file @
65c6e5a4
import
request
from
'@/utils/request'
//新增租户套餐
export
function
addTenantPackage
(
param
)
{
return
request
({
url
:
'/system/tenant/package'
,
method
:
'POST'
,
data
:
param
})
}
//获取租户套餐
export
function
detailTenantPackage
(
packageId
)
{
return
request
({
url
:
'/system/tenant/package/'
+
packageId
,
method
:
'get'
,
})
}
//租户套餐列表
export
function
getTenantPackage
(
param
)
{
return
request
({
url
:
'/system/tenant/package/list'
,
method
:
'get'
,
params
:
param
})
}
dsk-operate-ui/src/views/enterpriseManagement/programme.vue
View file @
65c6e5a4
...
...
@@ -3,7 +3,7 @@
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
>
<el-form-item
label=
"方案名称"
prop=
"roleName"
>
<el-input
v-model=
"queryParams.
rol
eName"
v-model=
"queryParams.
packag
eName"
placeholder=
"请输入方案名称"
clearable
style=
"width: 240px"
...
...
@@ -48,8 +48,8 @@
<span>
{{
(
queryParams
.
pageNum
-
1
)
*
queryParams
.
pageSize
+
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"方案名称"
prop=
"
rol
eName"
:show-overflow-tooltip=
"true"
width=
"150"
/>
<el-table-column
label=
"备注"
prop=
"r
oleKey
"
width=
"400"
>
<el-table-column
label=
"方案名称"
prop=
"
packag
eName"
:show-overflow-tooltip=
"true"
width=
"150"
/>
<el-table-column
label=
"备注"
prop=
"r
emark
"
width=
"400"
>
<
template
slot-scope=
"scope"
>
<el-popover
title=
""
...
...
@@ -57,8 +57,8 @@
width=
"400"
trigger=
"hover"
popper-class=
"popovers"
content=
"备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数
"
>
<div
class=
"over"
slot=
"reference"
>
备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数备注测试字数
</div>
:content=
"scope.row.remark
"
>
<div
class=
"over"
slot=
"reference"
>
{{
scope
.
row
.
remark
}}
</div>
</el-popover>
</
template
>
...
...
@@ -74,7 +74,7 @@
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
v-if=
"scope.row.
rol
eId !== 1"
>
<
template
slot-scope=
"scope"
v-if=
"scope.row.
packag
eId !== 1"
>
<el-button
size=
"mini"
type=
"text"
...
...
@@ -108,11 +108,16 @@
@
pagination=
"getList"
/>
<!-- 添加或修改
角色
配置对话框 -->
<!-- 添加或修改
租户套餐
配置对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
label=
"方案名称"
prop=
"roleName"
>
<el-input
v-model=
"form.roleName"
placeholder=
"请输入方案名称"
/>
<el-form-item
label=
"方案名称"
prop=
"packageName"
>
<el-input
v-model=
"form.packageName"
placeholder=
"请输入方案名称"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-radio
v-model=
"form.status"
label=
"0"
>
正常
</el-radio>
<el-radio
v-model=
"form.status"
label=
"1"
>
停用
</el-radio>
</el-form-item>
<el-form-item
label=
"角色授权"
>
<el-checkbox
v-model=
"menuExpand"
@
change=
"handleCheckedTreeExpand($event, 'menu')"
>
展开/折叠
</el-checkbox>
...
...
@@ -124,7 +129,7 @@
show-checkbox
ref=
"menu"
node-key=
"id"
:check-strictly=
"!form.menu
CheckStrictly
"
:check-strictly=
"!form.menu
Ids
"
empty-text=
"加载中,请稍候"
:props=
"defaultProps"
></el-tree>
...
...
@@ -145,6 +150,9 @@
import
{
listRole
,
getRole
,
delRole
,
addRole
,
updateRole
,
dataScope
,
changeRoleStatus
,
deptTreeSelect
}
from
"@/api/system/role"
;
import
{
treeselect
as
menuTreeselect
,
roleMenuTreeselect
}
from
"@/api/system/menu"
;
import
{
addTenantPackage
,
getTenantPackage
,
detailTenantPackage
}
from
"@/api/enterpriseManagement/enterpriseManagement"
;
export
default
{
name
:
"programme"
,
dicts
:
[
'ent_pro_status'
],
...
...
@@ -207,9 +215,7 @@
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
roleName
:
undefined
,
roleKey
:
undefined
,
status
:
undefined
packageName
:
''
,
},
// 表单参数
form
:
{},
...
...
@@ -219,15 +225,12 @@
},
// 表单校验
rules
:
{
rol
eName
:
[
{
required
:
true
,
message
:
"
角色
名称不能为空"
,
trigger
:
"blur"
}
packag
eName
:
[
{
required
:
true
,
message
:
"
套餐
名称不能为空"
,
trigger
:
"blur"
}
],
roleKey
:
[
{
required
:
true
,
message
:
"
权限字符
不能为空"
,
trigger
:
"blur"
}
status
:
[
{
required
:
true
,
message
:
"
状态
不能为空"
,
trigger
:
"blur"
}
],
roleSort
:
[
{
required
:
true
,
message
:
"角色顺序不能为空"
,
trigger
:
"blur"
}
]
}
};
},
...
...
@@ -235,10 +238,10 @@
this
.
getList
();
},
methods
:
{
/** 查询
角色
列表 */
/** 查询
方案
列表 */
getList
()
{
this
.
loading
=
true
;
listRole
(
this
.
addDateRange
(
this
.
queryParams
,
this
.
dateRange
)
).
then
(
response
=>
{
getTenantPackage
(
this
.
queryParams
).
then
(
response
=>
{
this
.
roleList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
...
...
@@ -272,7 +275,7 @@
/** 根据角色ID查询菜单树结构 */
getRoleMenuTreeselect
(
roleId
)
{
return
roleMenuTreeselect
(
roleId
).
then
(
response
=>
{
this
.
menuOptions
=
response
.
data
.
menus
;
this
.
menuOptions
=
response
.
data
;
return
response
;
});
},
...
...
@@ -303,16 +306,12 @@
this
.
deptExpand
=
true
,
this
.
deptNodeAll
=
false
,
this
.
form
=
{
rol
eId
:
undefined
,
rol
eName
:
undefined
,
r
oleKey
:
undefined
,
roleSort
:
0
,
packag
eId
:
undefined
,
packag
eName
:
undefined
,
r
emark
:
undefined
,
menuCheckStrictly
:
true
,
status
:
"0"
,
menuIds
:
[],
deptIds
:
[],
menuCheckStrictly
:
true
,
deptCheckStrictly
:
true
,
remark
:
undefined
};
this
.
resetForm
(
"form"
);
},
...
...
@@ -381,14 +380,14 @@
this
.
reset
();
this
.
getMenuTreeselect
();
this
.
open
=
true
;
this
.
title
=
"添加
角色
"
;
this
.
title
=
"添加
方案
"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
roleId
=
row
.
roleId
||
this
.
ids
const
roleMenu
=
this
.
getRoleMenuTreeselect
(
rol
eId
);
getRole
(
rol
eId
).
then
(
response
=>
{
const
packageId
=
row
.
packageId
const
roleMenu
=
this
.
getRoleMenuTreeselect
(
packag
eId
);
detailTenantPackage
(
packag
eId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
$nextTick
(()
=>
{
...
...
@@ -401,7 +400,7 @@
})
});
});
this
.
title
=
"修改
角色
"
;
this
.
title
=
"修改
方案
"
;
});
},
/** 选择角色权限范围触发 */
...
...
@@ -434,7 +433,7 @@
submitForm
:
function
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
rol
eId
!=
undefined
)
{
if
(
this
.
form
.
packag
eId
!=
undefined
)
{
this
.
form
.
menuIds
=
this
.
getMenuAllCheckedKeys
();
updateRole
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
...
...
@@ -443,7 +442,7 @@
});
}
else
{
this
.
form
.
menuIds
=
this
.
getMenuAllCheckedKeys
();
add
Rol
e
(
this
.
form
).
then
(
response
=>
{
add
TenantPackag
e
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
...
...
dsk-operate-ui/vue.config.js
View file @
65c6e5a4
...
...
@@ -35,8 +35,8 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
// target: `http://47.104.91.229:9099/prod-api`,
//
target: `http://192.168.0.165:9098`,//施
target
:
`http://192.168.60.6:9098`
,
//谭
target
:
`http://192.168.0.165:9098`
,
//施
//
target: `http://192.168.60.6:9098`,//谭
// target: `http://139.9.157.49:9099`,//测试
changeOrigin
:
true
,
pathRewrite
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment