Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
9
91isoft_sys_web
Project
Project
Details
Activity
Releases
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
张伯涛
91isoft_sys_web
Commits
61bb2d1b
Commit
61bb2d1b
authored
Jul 01, 2022
by
mzx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统管理修改提交
parent
bbdd90c7
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
450 additions
and
126 deletions
+450
-126
menu.js
src/api/menu.js
+1
-0
user.js
src/api/system/user.js
+22
-2
header.vue
src/layout/components/header.vue
+4
-3
index.vue
src/views/system/dept/index.vue
+1
-1
index.vue
src/views/system/dict/index.vue
+30
-14
index.vue
src/views/system/menu/index.vue
+15
-13
index.vue
src/views/system/role/index.vue
+95
-28
index.vue
src/views/system/user/index.vue
+282
-65
No files found.
src/api/menu.js
View file @
61bb2d1b
...
...
@@ -8,3 +8,4 @@ export const getRouters = () => {
// params: { path: '/zhongtai' }
})
}
src/api/system/user.js
View file @
61bb2d1b
import
request
from
'@/utils/request'
import
{
praseStrEmpty
}
from
'@/utils/common'
import
Qs
from
'qs'
import
{
error
}
from
"autoprefixer/lib/utils"
;
import
test
from
"@/views/test/test"
;
// 查询用户列表
export
function
listUser
(
query
)
{
return
request
({
...
...
@@ -40,10 +42,10 @@ export function addUser(data) {
// 修改用户
export
function
updateUser
(
data
)
{
const
businessId
=
data
.
businessId
//
const businessId = data.businessId
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/system/user/update
/'
+
businessId
,
url
:
'/system/user/update
'
,
method
:
'put'
,
data
:
data
,
headers
:
{
...
...
@@ -52,6 +54,24 @@ export function updateUser(data) {
})
}
// let instabce = axios.create({
// timeout: 3000,
// headers: {
// 'Content-Type': 'application/x-www-form-urlencoded'
// }
// })
// instabce.interceptors.request.use(
// config => {
// config.data = qs.stringify(config.data)
// return config
// },
// error => Promise.error(error)
// )
// export const getInfo = (data) => {
// return instabce.post(testSystemUrl + '/user/pageList/',data);
// };
// 删除用户
export
function
delUser
(
userId
)
{
return
request
({
...
...
src/layout/components/header.vue
View file @
61bb2d1b
...
...
@@ -80,10 +80,11 @@ export default {
'avatar'
])
},
mounted
()
{
this
.
getInAdhibitions
()
},
methods
:
{
mounted
()
{
this
.
getInAdhibitions
()
},
handleCommand
(
param
)
{
if
(
param
)
{
window
.
location
.
href
=
param
...
...
src/views/system/dept/index.vue
View file @
61bb2d1b
...
...
@@ -328,7 +328,7 @@ export default {
leader
:
undefined
,
phone
:
undefined
,
email
:
undefined
,
flag
:
'
0
'
flag
:
'
1
'
}
this
.
resetForm
(
'form'
)
},
...
...
src/views/system/dict/index.vue
View file @
61bb2d1b
...
...
@@ -96,7 +96,7 @@
@
click=
"handleExport"
>
导出
</el-button>
</el-col>
<right-toolbar
:show-search
.
sync=
"showSearch"
@
queryTable=
"getList"
/
>
<!--
<right-toolbar
:show-search
.
sync=
"showSearch"
@
queryTable=
"getList"
/>
--
>
</el-row>
</el-form>
<div
class=
"placeholder"
/>
...
...
@@ -181,14 +181,16 @@
<el-input
v-model
.
trim=
"form.dictType"
:maxlength=
"30"
placeholder=
"请输入字典类型"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"flag"
>
<el-radio-group
v-model=
"form.flag"
>
<el-radio
v-for=
"dict in statusOptions"
:key=
"dict.dictValue"
:label=
"dict.dictValue"
>
{{ dict.dictLabel }}
</el-radio>
</el-radio-group>
<el-radio
v-model=
"radio"
label=
"1"
>
启用
</el-radio>
<el-radio
v-model=
"radio"
label=
"0"
>
停用
</el-radio>
<!-- <el-radio-group v-model="form.flag">-->
<!-- <el-radio-->
<!-- v-for="dict in statusOptions"-->
<!-- :key="dict.dictValue"-->
<!-- :label="dict.dictValue"-->
<!-- >{{ dict.dictLabel }}-->
<!-- </el-radio>-->
<!-- </el-radio-group>-->
</el-form-item>
<el-form-item
label=
"父字典名称"
>
<el-select
v-model=
"form.parentId"
style=
"width: 100%"
clearable
placeholder=
"请选择父字典类型"
@
change=
"getOptions"
>
...
...
@@ -235,7 +237,7 @@ import { listType,
updateType
,
exportType
,
clearCache
,
optionselect
,
//
optionselect,
selectRegionCode
,
checkDictNameUnique
,
selectDictType
...
...
@@ -300,6 +302,11 @@ export default {
}
}
return
{
showSearch
:
''
,
getOptions
:
''
,
statusOptions
:
''
,
//状态默认选择
radio
:
'1'
,
test
:
''
,
options
:
[],
optionsDict
:
[],
...
...
@@ -320,7 +327,16 @@ export default {
// 是否显示弹出层
open
:
false
,
// 状态数据字典
statusOptions
:
[],
// statusOptions: [
// {
// dictLabel: '正常',
// dictValue: '1'
// },
// {
// dictLabel: '停用',
// dictValue: '0'
// }
// ],
// 日期范围
dateRange
:
[],
// 查询参数
...
...
@@ -373,9 +389,9 @@ export default {
this
.
getDicts
(
dictCons
[
'NORMAL_DISABLE'
]).
then
(
response
=>
{
this
.
statusOptions
=
response
.
data
})
optionselect
().
then
(
response
=>
{
this
.
options
=
response
.
data
})
//
optionselect().then(response => {
//
this.options = response.data
//
})
},
methods
:
{
/** 查询字典类型列表 */
...
...
src/views/system/menu/index.vue
View file @
61bb2d1b
...
...
@@ -197,14 +197,14 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col
:span=
"12"
style=
"margin-right: -1px"
>
<el-form-item
v-if=
"form.menuType !== 'F'"
label=
"是工作流"
>
<el-radio-group
v-model=
"form.isProcess"
>
<el-radio
label=
"0"
>
是
</el-radio
>
<el-radio
label=
"1"
>
否
</el-radio
>
</el-radio-group
>
</el-form-item
>
</el-col
>
<!-- <el-col :span="12" style="margin-right: -1px">--
>
<!-- <el-form-item v-if="form.menuType !== 'F'" label="是工作流">--
>
<!-- <el-radio-group v-model="form.isProcess">--
>
<!-- <el-radio label="0">是</el-radio>--
>
<!-- <el-radio label="1">否</el-radio>--
>
<!-- </el-radio-group>--
>
<!-- </el-form-item>--
>
<!-- </el-col>--
>
<el-col
:span=
"12"
>
<el-form-item
v-if=
"form.menuType !== 'F'"
label=
"显示状态"
>
<el-radio-group
v-model=
"form.visible"
>
...
...
@@ -218,6 +218,7 @@
<el-radio-group
v-model=
"form.flag"
>
<el-radio
label=
"1"
>
启用
</el-radio>
<el-radio
label=
"0"
>
停用
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
...
...
@@ -290,11 +291,11 @@ export default {
statusOptions
:
[
{
dictLabel
:
'正常'
,
dictValue
:
'
0
'
dictValue
:
'
1
'
},
{
dictLabel
:
'停用'
,
dictValue
:
'
1
'
dictValue
:
'
0
'
}
],
// 查询参数
...
...
@@ -304,7 +305,8 @@ export default {
},
// 表单参数
form
:
{
parentId
:
0
parentId
:
0
,
visible
:
'1'
},
// 表单校验
rules
:
{
...
...
@@ -447,9 +449,9 @@ export default {
menuType
:
'M'
,
orderNum
:
undefined
,
isFrame
:
'1'
,
visible
:
'
0
'
,
visible
:
'
1
'
,
isProcess
:
'1'
,
flag
:
'
0
'
flag
:
'
1
'
}
this
.
resetForm
(
'form'
)
},
...
...
src/views/system/role/index.vue
View file @
61bb2d1b
...
...
@@ -188,28 +188,48 @@
<el-form-item
label=
"角色名称"
>
<el-input
v-model
.
trim=
"form.roleName"
placeholder=
"请输入角色名称"
show-word-limit
:maxlength=
"30"
:disabled=
"true"
/>
</el-form-item>
<el-table
v-loading=
"loading"
:data=
"menuList"
row-key=
"businessId"
:tree-props=
"{children: 'children', hasChildren: 'hasChildren'}"
max-height=
"400px"
>
<!-- <el-form-item label="权限字符">-->
<!-- <el-input v-model.trim="form.roleKey" placeholder="请输入角色名称" show-word-limit :maxlength="30" :disabled="true" />-->
<!-- </el-form-item>-->
<el-table-column
prop=
"menuName"
label=
"菜单名称"
:show-overflow-tooltip=
"true"
width=
"160"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-circle-check"
@
click=
"handleDataScope(scope.row)"
>
修改
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- <el-table-->
<!-- v-loading="loading"-->
<!-- :data="menuList"-->
<!-- row-key="businessId"-->
<!-- :tree-props="{children: 'children', hasChildren: 'hasChildren'}"-->
<!-- max-height="400px"-->
<!-- >-->
<!-- <el-form-item label="权限字符">-->
<!-- <el-input v-model.trim="form.roleKey" placeholder="请输入角色名称" show-word-limit :maxlength="30" :disabled="true" />-->
<!-- </el-form-item>-->
<el-form-item
label=
"菜单权限"
>
<el-tree
ref=
"menu2"
class=
"tree-border"
:data=
"menuOptions"
:show-checkbox=
"false"
node-key=
"id"
empty-text=
"加载中,请稍后"
:props=
"{defaultProps, disabled: () => true}"
:default-checked-keys=
"[]"
:current-node-key=
"toString()"
:expand-on-click-node=
"false"
:check-strictly=
"false"
:filter-node-method=
"filterNodeMethod"
@
node-click=
"nodeClick"
>
</el-tree>
</el-form-item>
<!-- :default-expand-all="true"-->
<!-- <el-table-column prop="" label="菜单名称" :show-overflow-tooltip="true" width="160" />-->
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-circle-check"-->
<!-- @click="handleDataScope(scope.row)"-->
<!-- >修改</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
</el-form>
</el-col>
<el-col
style=
"width: 1%"
>
...
...
@@ -219,11 +239,11 @@
</el-col>
<el-col
style=
"width: 49%"
>
<el-form
:model=
"form"
label-width=
"80px"
>
<el-form-item
label=
"菜单名称"
prop=
"
roleName"
>
<el-input
v-model=
"form.menu
Name"
placeholder=
"未选择菜单名称"
disabled
/>
<el-form-item
label=
"菜单名称"
prop=
"
menuId"
>
<el-input
v-model=
"form.menu
Id"
placeholder=
"未选择菜单名称"
disabled
/>
</el-form-item>
<el-form-item
label=
"权限范围"
>
<el-select
v-model=
"form.dataScope"
>
<el-select
v-model=
"form.dataScope"
>
<el-option
v-for=
"item in dataScopeOptions"
:key=
"item.value"
...
...
@@ -263,11 +283,15 @@
import
{
listRole
,
getRole
,
delRole
,
addRole
,
updateRole
,
exportRole
,
dataScope
,
changeRoleStatus
}
from
'@/api/system/role'
import
{
roleMenuTreeselectMC
,
treeselect
as
menuTreeselect
,
roleMenuTreeselect
}
from
'@/api/system/menu'
import
{
treeselect
as
deptTreeselect
,
roleDeptTreeselect
}
from
'@/api/system/dept'
import
{
getMenuList
}
from
'@/api/instance-payApply'
import
{
error
}
from
"autoprefixer/lib/utils"
;
// import { getRolesByInsId } from '../../../api/businessManage/template'
export
default
{
name
:
'Role'
,
data
()
{
return
{
data
:
[],
// 遮罩层
loading
:
true
,
// 选中数组
...
...
@@ -341,7 +365,12 @@ export default {
flag
:
undefined
},
// 表单参数
form
:
{},
form
:
{
menuId
:
''
,
deptCheckStrictly
:
''
,
deptIds
:
''
,
businessId
:
''
},
defaultProps
:
{
children
:
'children'
,
label
:
'label'
...
...
@@ -382,7 +411,29 @@ export default {
// this.statusOptions = response.data;
// });
},
// watch: {
// menuOptions() {
// this.menuOptions.forEach(item => {
// this.defaultExpandedKey.push(item.id)
// })
// this.$forceUpdate()
// }
// },
methods
:
{
nodeClick
(
data
)
{
console
.
log
(
data
)
this
.
form
.
menuId
=
data
.
label
this
.
$forceUpdate
()
},
// // 显示组件树选中节点
filterNodeMethod
(
value
,
data
,
node
)
{
if
(
node
.
checked
===
true
)
{
return
true
}
else
{
return
false
}
},
/** 查询角色列表 */
getList
()
{
this
.
loading
=
true
...
...
@@ -398,6 +449,9 @@ export default {
getMenuTreeselect
()
{
menuTreeselect
().
then
(
response
=>
{
this
.
menuOptions
=
response
.
data
console
.
log
(
this
.
menuOptions
,
'this.menuOptions'
)
})
},
/** 查询菜单列表 */
...
...
@@ -490,7 +544,7 @@ export default {
roleName
:
undefined
,
roleKey
:
undefined
,
roleSort
:
0
,
flag
:
undefined
,
flag
:
'1'
,
menuIds
:
[],
menuName
:
undefined
,
deptIds
:
[],
...
...
@@ -575,8 +629,14 @@ export default {
handleMenu
(
row
)
{
this
.
reset
()
const
roleId
=
row
.
businessId
||
this
.
ids
this
.
getMenuList
(
roleId
)
// 查询菜单列表树形显示
console
.
log
(
'row'
,
row
)
// this.getMenuList(roleId) // 查询菜单列表树形显示
getRole
(
roleId
).
then
(
response
=>
{
this
.
getRoleMenuTreeselect
(
roleId
).
then
(
res
=>
{
//
this
.
$refs
.
menu2
.
setCheckedKeys
(
res
.
data
.
checkedKeys
)
//
this
.
$refs
.
menu2
.
setChecked
(
res
.
data
.
checked
)
//
this
.
$refs
.
menu2
.
filter
([])
//
})
this
.
form
=
response
.
data
this
.
openDataScope
=
true
this
.
title
=
'分配数据权限'
...
...
@@ -589,6 +649,10 @@ export default {
const
roleId
=
this
.
form
.
businessId
this
.
form
.
menuId
=
row
.
businessId
this
.
form
.
menuName
=
row
.
menuName
// this.form.businessId = row.businessId
// this.form.deptCheckStrictly = false
// this.form.deptIds = row.deptIds
const
roleDeptTreeselect
=
this
.
getRoleDeptTreeselect
(
roleId
,
this
.
form
.
menuId
)
this
.
$nextTick
(()
=>
{
roleDeptTreeselect
.
then
(
res
=>
{
...
...
@@ -621,6 +685,7 @@ export default {
},
/** 提交按钮(数据权限) */
submitDataScope
:
function
()
{
if
(
this
.
form
.
businessId
!==
undefined
&&
this
.
form
.
menuId
!==
undefined
)
{
this
.
form
.
deptIds
=
this
.
getDeptAllCheckedKeys
()
dataScope
(
this
.
form
).
then
(
response
=>
{
...
...
@@ -628,6 +693,8 @@ export default {
this
.
openDataScope
=
false
this
.
getList
()
})
console
.
log
(
'form'
,
this
.
form
)
// console.log('tree', this.deptOptions)
}
},
/** 删除按钮操作 */
...
...
src/views/system/user/index.vue
View file @
61bb2d1b
This diff is collapsed.
Click to expand it.
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