Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
d5324849
authored
2023-02-24 10:57:16 +0800
by
yangwei
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://yun.pashanhoo.com:9090/bdc/bdcjg-web
2 parents
e9594835
bdde9e93
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1260 additions
and
1088 deletions
.gitignore
src/api/config.js
src/api/quanxianmanagement.js
src/common/echart/index.vue
src/components/EditDialog/index.vue
src/components/JsonEditor.vue
src/utils/tool.js
src/views/jsbwcx/data/index.js
src/views/statistics/dataReceiveQuality/index.vue
src/views/statistics/nullTermRatio/index.vue
src/views/statistics/registerBookQuality/index.vue
src/views/sthj/sbbwcx/index.vue
src/views/system/menus/authorizationdiglog.vue
src/views/system/menus/edit-dialog.vue
src/views/system/menus/index.vue
src/views/system/roles/index.vue
src/views/system/roles/roleslistdiglog.vue
.gitignore
View file @
d532484
...
...
@@ -21,6 +21,4 @@ yarn-error.log*
*.njsproj
*.sln
*.sw?
/src/api/config.js
package-lock.json
...
...
src/api/config.js
0 → 100644
View file @
d532484
export
default
{
// SERVERAPI: '/service-bdcsjsb-th', //浩浩
// SERVERAPI: '/service-bdcsjsb-zz',
SERVERAPI
:
'/bdcsjsb'
,
//赵千
MANAGEMENTAPI
:
'http://192.168.2.236/management'
// SERVERAPI: '/bdcsjsb-service'
// SERVERAPI: '/bdcsjsb-jiao0'
}
// 汉中
// export default {
// // SERVERAPI: '/service-bdcsjsb-th', //线上
// SERVERAPI: '/bdcsjsb', //赵千
// MANAGEMENTAPI: 'http://172.16.56.32:8877/management'
// }
src/api/quanxianmanagement.js
View file @
d532484
...
...
@@ -16,7 +16,7 @@ export const getRolesById = categoryId => {
conditions
:
[
{
property
:
'category'
,
value
:
categoryId
,
value
:
categoryId
,
operator
:
'EQ'
}
],
...
...
@@ -81,3 +81,43 @@ export const getParentMenuListAction = (id) => {
const
params
=
getParams
(
conditionGroup
)
return
getAction
(
api
.
menus
,
params
)
}
// 获取权限列表
export
const
getAuthorityListAction
=
(
productId
,
subsystemCode
)
=>
{
const
conditionGroup
=
{
conditions
:
[
{
property
:
'productId'
,
value
:
productId
,
operator
:
'EQ'
},
{
property
:
'code'
,
value
:
subsystemCode
+
'_MENU'
,
operator
:
'EQ'
}
],
queryRelation
:
'AND'
}
const
params
=
getParams
(
conditionGroup
)
return
getAction
(
api
.
resourceCategory
,
params
)
}
/**
* 获取角色的权限 id operationCodes resourceCategoryCode
* id 授权id
* operationCodes 操作符集合
* resourceCategoryCode 菜单默认MENU
*/
export
const
getRoleAuthorityList
=
(
id
,
operationCodes
,
resourceCategoryCode
)
=>
{
return
getAction
(
`
${
api
.
rolePermissions
}
/
${
id
}
`
,
{
operationCodes
:
operationCodes
,
resourceCategoryCode
:
resourceCategoryCode
})
}
// 角色授权
export
const
roleAuthority
=
(
id
,
permissionDtos
)
=>
{
return
putAction
(
`
${
api
.
rolePermissions
}
/
${
id
}
`
,
permissionDtos
)
}
...
...
src/common/echart/index.vue
View file @
d532484
...
...
@@ -64,7 +64,7 @@ export default {
})
},
beforeDestroy
()
{
this
.
chart
.
dispose
();
//
this.chart.dispose();
this
.
chart
=
null
;
},
methods
:
{
...
...
src/components/EditDialog/index.vue
View file @
d532484
<
template
>
<!-- 编辑 -->
<el-dialog
:close-on-click-modal=
"false"
top=
"0"
@
close=
"closeDialog"
custom-class=
"dialogBox editDialogBox mainCenter"
:visible
.
sync=
"dialogVisible"
width=
"85%"
>
<el-dialog
:close-on-click-modal=
"false"
top=
"0"
@
close=
"closeDialog"
custom-class=
"dialogBox editDialogBox mainCenter"
:visible
.
sync=
"dialogVisible"
width=
"85%"
>
<div
slot=
"title"
class=
"dialog_title"
ref=
"dialogTitle"
>
{{
title
||
'标题'
}}
</div>
...
...
@@ -96,6 +95,10 @@
<component
:is=
"editItem"
ref=
"editItem"
:class=
"
{ 'editForm': $store.state.business.Edit }"
:bsmYwsjb="bsmYwsjb" :bsmSjsb="dataReport.bsmReport || dataReport.bsmSjsb" />
</div>
<div
class=
"d-center"
v-if=
"!$store.state.business.Edit"
>
<btn
nativeType=
"cz"
@
click=
"dialogVisible = false"
>
取 消
</btn>
<btn
nativeType=
"cx"
@
click=
"submitForm"
>
确 定
</btn>
</div>
</div>
<div
v-if=
"titleName == 'xyjg'"
>
<Xyjg
:form-data=
'dataReport'
></Xyjg>
...
...
@@ -160,7 +163,6 @@ export default {
digitalSign
:
""
,
},
images
:
require
(
"./images/success.gif"
),
saveloding
:
false
,
dialogVisible
:
false
,
activeName
:
undefined
,
editItem
:
""
,
...
...
@@ -234,51 +236,25 @@ export default {
this
.
headerList
=
[];
},
submitForm
()
{
let
_this
=
this
;
this
.
$store
.
dispatch
(
"business/setRules"
,
this
.
$store
.
state
.
business
.
subRules
);
this
.
$nextTick
(()
=>
{
this
.
$refs
[
"editItem"
]
&&
this
.
$refs
[
"editItem"
].
verificationForm
().
then
((
res
)
=>
{
if
(
!
res
)
{
_this
.
$message
({
message
:
"请检查表单必填项是否完整"
,
type
:
"warning"
,
});
return
false
;
}
else
{
_this
.
saveloding
=
true
;
_this
.
$refs
[
"editItem"
]
.
handleUpdateForm
()
.
then
((
res
)
=>
{
if
(
res
==
200
)
{
_this
.
$alert
(
'<p><img class="success-images" src="'
+
this
.
images
+
'"/>编辑成功!</p>'
,
"提示"
,
{
showConfirmButton
:
false
,
dangerouslyUseHTMLString
:
true
,
}
);
setTimeout
(()
=>
{
MessageBox
.
close
(
false
);
},
1500
);
}
})
.
catch
(
function
(
error
)
{
_this
.
$alert
(
error
,
"提示"
,
{
confirmButtonText
:
"确定"
,
type
:
"error"
,
});
});
_this
.
saveloding
=
false
;
}
});
});
// this.$store.dispatch(
// "business/setRules",
// this.$store.state.business.subRules
// );
this
.
$refs
[
"editItem"
].
handleUpdateForm
()
.
then
((
res
)
=>
{
if
(
res
==
200
)
{
this
.
$message
({
message
:
'修改成功'
,
type
:
'success'
})
}
})
.
catch
(
function
(
error
)
{
this
.
$alert
(
error
,
"提示"
,
{
confirmButtonText
:
"确定"
,
type
:
"error"
})
})
}
}
}
...
...
@@ -315,6 +291,8 @@ export default {
}
.sjmx
{
padding-bottom
:
25px
;
/deep/.el-tabs__item
{
height
:
50px
;
padding-top
:
6px
;
...
...
@@ -390,7 +368,7 @@ export default {
}
.edit-content
{
height
:
4
5
0px
;
height
:
4
2
0px
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
padding-right
:
1px
;
...
...
src/components/JsonEditor.vue
View file @
d532484
<
template
>
<el-input
type=
"textarea"
:rows=
"6"
disabled
placeholder=
"配置参数"
v-model=
"resultInfo"
>
</el-input>
<div>
<el-input
type=
"textarea"
:rows=
"6"
:disabled=
"$store.state.business.Edit"
placeholder=
"配置参数"
v-model=
"resultInfo"
>
</el-input>
<div
class=
"d-center"
v-if=
"!$store.state.business.Edit"
>
<btn
nativeType=
"cz"
@
click=
"dialogVisible = false"
>
取 消
</btn>
<btn
nativeType=
"cx"
@
click=
"submitForm"
>
确 定
</btn>
</div>
</div>
</
template
>
<
script
>
// 引入json编译器
...
...
@@ -29,7 +35,7 @@ export default {
<
style
scoped
lang=
"scss"
>
/* jsoneditor右上角默认有一个链接,加css去掉了 */
/
deep
/
.el-textarea__inner
{
min-height
:
7
3
vh
!important
;
min-height
:
7
6
vh
!important
;
background-color
:
#08346F
!important
;
color
:
#ffffff
;
border
:
none
!important
;
...
...
src/utils/tool.js
View file @
d532484
import
Vue
from
'vue'
// 下载,导出
Vue
.
prototype
.
$download
=
function
(
name
,
href
)
{
Vue
.
prototype
.
$download
=
function
(
name
,
href
)
{
var
a
=
document
.
createElement
(
'a'
)
// 创建a标签
var
e
=
document
.
createEvent
(
'MouseEvents'
)
// 创建鼠标事件对象
e
.
initEvent
(
'click'
,
false
,
false
)
// 初始化事件对象
...
...
@@ -10,7 +10,7 @@ Vue.prototype.$download = function(name, href) {
a
.
dispatchEvent
(
e
)
// 给指定的元素,执行事件click事件
}
// 导出json文件
Vue
.
prototype
.
$downloadJson
=
function
(
data
,
name
)
{
Vue
.
prototype
.
$downloadJson
=
function
(
data
,
name
)
{
// 1 生成文件的 blob 对象
const
blobData
=
new
Blob
([
JSON
.
stringify
(
data
)],
{
type
:
'application/octet-stream'
...
...
@@ -84,7 +84,7 @@ const checkCode = (rule, value, callback) => {
// }
// }
// 日期格式转换 "yyyy-MM-dd HH:mm:ss"
Vue
.
prototype
.
$formdate
=
function
(
date
)
{
Vue
.
prototype
.
$formdate
=
function
(
date
)
{
if
(
!
date
)
{
return
""
}
...
...
@@ -95,22 +95,22 @@ Vue.prototype.$formdate = function(date) {
var
hh
=
(
d
.
getHours
()
<
10
?
'0'
+
d
.
getHours
()
:
d
.
getHours
())
+
':'
;
var
mm
=
(
d
.
getMinutes
()
<
10
?
'0'
+
d
.
getMinutes
()
:
d
.
getMinutes
())
+
':'
;
var
ss
=
(
d
.
getSeconds
()
<
10
?
'0'
+
d
.
getSeconds
()
:
d
.
getSeconds
());
return
YY
+
MM
+
DD
+
" "
+
hh
+
mm
+
ss
return
YY
+
MM
+
DD
+
" "
+
hh
+
mm
+
ss
}
// 时间格式过滤
Vue
.
filter
(
'timeFilter'
,
function
(
timeStr
)
{
Vue
.
filter
(
'timeFilter'
,
function
(
timeStr
)
{
if
(
timeStr
)
{
return
timeStr
.
substring
(
0
,
10
)
}
})
export
function
getType
(
o
)
{
export
function
getType
(
o
)
{
return
Object
.
prototype
.
toString
.
call
(
o
).
slice
(
8
,
-
1
)
}
export
function
isKeyType
(
o
,
type
)
{
export
function
isKeyType
(
o
,
type
)
{
return
getType
(
o
).
toLowerCase
()
===
type
.
toLowerCase
()
}
// 深拷贝全局挂载
Vue
.
prototype
.
$deepCopy
=
function
(
sth
)
{
Vue
.
prototype
.
$deepCopy
=
function
(
sth
)
{
// 深度复制数组
// if (Object.prototype.toString.call(obj) === "[object Array]") {
// const object = [];
...
...
@@ -196,7 +196,7 @@ Vue.prototype.$dealArrNotDisabled = arr => {
}
}
}
function
nodeDeal
(
arr
)
{
function
nodeDeal
(
arr
)
{
arr
.
forEach
(
item
=>
{
delete
item
.
disabled
if
(
item
.
children
)
{
...
...
@@ -222,7 +222,7 @@ Vue.prototype.$dealArrDisabled = (arr, id) => {
}
}
}
function
nodeDeal
(
arr
)
{
function
nodeDeal
(
arr
)
{
arr
.
forEach
(
item
=>
{
item
[
'disabled'
]
=
true
if
(
item
.
children
)
{
...
...
@@ -249,10 +249,9 @@ Vue.prototype.$getNodeRoute = (val, id) => {
}
}
})
function
nodefun
(
newVal
,
newId
,
newCid_list
)
{
function
nodefun
(
newVal
,
newId
,
newCid_list
)
{
let
flag
=
false
newVal
.
forEach
(
j
=>
{
// console.log(j)
if
(
j
.
id
===
newId
)
{
newCid_list
.
push
(
j
.
id
)
flag
=
true
...
...
@@ -272,7 +271,7 @@ Vue.prototype.$getNodeRoute = (val, id) => {
return
newCid_list
}
}
function
result
(
cid_list
)
{
function
result
(
cid_list
)
{
const
arr
=
cid_list
.
concat
()
arr
.
pop
()
return
arr
...
...
@@ -325,7 +324,7 @@ Vue.prototype.$findParent = (list, id) => {
Vue
.
prototype
.
$findChildren
=
(
list
,
nodeId
)
=>
{
let
newArray
=
[]
let
flag
=
false
function
dealList
(
list
,
nodeId
)
{
function
dealList
(
list
,
nodeId
)
{
if
(
list
.
length
!==
0
)
{
list
.
forEach
(
item
=>
{
if
(
!
flag
)
{
...
...
src/views/jsbwcx/data/index.js
View file @
d532484
...
...
@@ -46,7 +46,7 @@ class data extends filter {
{
prop
:
"bizMsgid"
,
label
:
"业务报文ID"
,
width
:
9
0
,
width
:
9
8
,
},
{
prop
:
"createdate"
,
...
...
src/views/statistics/dataReceiveQuality/index.vue
View file @
d532484
...
...
@@ -25,7 +25,7 @@
<el-form-item>
<btn
nativeType=
"cz"
@
click=
"handleResetForm"
>
重置
</btn>
<btn
nativeType=
"cx"
@
click=
"handleSearch"
>
查询
</btn>
<btn
nativeType=
"cx"
@
click=
"handlesetExport2Excel(2121)"
>
导出
</btn>
<btn
nativeType=
"cx"
@
click=
"handlesetExport2Excel(2121)"
>
导出
1
</btn>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -33,9 +33,8 @@
</div>
<!-- 列表区域 -->
<div
class=
"from-clues-content"
>
<lb-table
ref=
"table"
:id=
"'mytable'"
:page-size=
"pageData.size"
:header-cell-style=
"headerStyle"
:current-page
.
sync=
"pageData.current"
:total=
"tableData.total"
@
size-change=
"handleSizeChange"
@
p-current-change=
"handleCurrentChange"
:column=
"tableData.columns"
:data=
"tableData.data"
>
<lb-table
ref=
"table"
:id=
"'mytable'"
:header-cell-style=
"headerStyle"
:pagination=
"false"
:column=
"tableData.columns"
:data=
"tableData.data"
>
</lb-table>
</div>
</div>
...
...
@@ -105,13 +104,7 @@ export default {
}
]
.
concat
(
data
.
columns
()),
data
:
[],
},
// 分页
pageData
:
{
total
:
0
,
pageSize
:
10
,
current
:
1
data
:
[]
}
}
},
...
...
@@ -119,6 +112,7 @@ export default {
this
.
handleResetForm
()
},
methods
:
{
handleSearch
()
{
},
headerStyle
({
row
,
rowIndex
})
{
if
(
rowIndex
==
3
)
{
row
[
2
].
rowSpan
=
2
;
...
...
src/views/statistics/nullTermRatio/index.vue
View file @
d532484
...
...
@@ -34,9 +34,7 @@
</div>
<!-- 列表区域 -->
<div
class=
"from-clues-content"
>
<lb-table
ref=
"table"
:page-size=
"pageData.size"
:id=
"'mytable'"
:current-page
.
sync=
"pageData.current"
:total=
"tableData.total"
@
size-change=
"handleSizeChange"
@
p-current-change=
"handleCurrentChange"
:column=
"tableData.columns"
:data=
"tableData.data"
>
<lb-table
ref=
"table"
:id=
"'mytable'"
:pagination=
"false"
:column=
"tableData.columns"
:data=
"tableData.data"
>
</lb-table>
</div>
</div>
...
...
@@ -107,12 +105,6 @@ export default {
]
.
concat
(
data
.
columns
()),
data
:
[],
},
// 分页
pageData
:
{
total
:
0
,
pageSize
:
10
,
current
:
1
}
};
},
...
...
@@ -120,6 +112,7 @@ export default {
this
.
handleResetForm
()
},
methods
:
{
handleSearch
()
{
},
handlesetExport2Excel
(
val
)
{
setExport2Excel
(
val
)
},
...
...
src/views/statistics/registerBookQuality/index.vue
View file @
d532484
...
...
@@ -33,9 +33,7 @@
</div>
<!-- 列表区域 -->
<div
class=
"from-clues-content"
>
<lb-table
ref=
"table"
:id=
"'mytable'"
:page-size=
"pageData.size"
:current-page
.
sync=
"pageData.current"
:total=
"tableData.total"
@
size-change=
"handleSizeChange"
@
p-current-change=
"handleCurrentChange"
:column=
"tableData.columns"
:data=
"tableData.data"
>
<lb-table
ref=
"table"
:id=
"'mytable'"
:pagination=
"false"
:column=
"tableData.columns"
:data=
"tableData.data"
>
</lb-table>
</div>
</div>
...
...
@@ -106,19 +104,14 @@ export default {
]
.
concat
(
data
.
columns
()),
data
:
[],
},
// 分页
pageData
:
{
total
:
0
,
pageSize
:
10
,
current
:
1
},
}
}
},
created
()
{
this
.
handleResetForm
()
},
methods
:
{
handleSearch
()
{
},
handlesetExport2Excel
(
val
)
{
setExport2Excel
(
val
)
},
...
...
src/views/sthj/sbbwcx/index.vue
View file @
d532484
...
...
@@ -79,7 +79,7 @@
<!-- 引入详情组件 -->
<!-- 编辑 -->
<dataDetails
ref=
"editLog"
:title=
"title"
:visiableXml=
"true"
/>
</div>
</div>
</
template
>
<
script
>
// 上报报文查询
...
...
@@ -201,6 +201,11 @@ export default {
handleDetail
(
row
)
{
this
.
title
=
row
.
rectypeName
;
this
.
$refs
.
editLog
.
isShow
(
row
);
if
(
row
.
exchangeState
==
2
)
{
this
.
$store
.
dispatch
(
'business/setReportLogEdit'
)
}
else
{
this
.
$store
.
dispatch
(
'business/setEdit'
)
}
},
// 重置
resetForm
()
{
...
...
src/views/system/menus/authorizationdiglog.vue
deleted
100644 → 0
View file @
e959483
<
template
>
<Dialog
:title=
"title"
class=
"tableClass"
:show
.
sync=
"visible"
:width=
"'715px'"
@
close=
"close()"
>
<template
slot=
"content"
>
<lb-table
ref=
"multipleTable"
:pagination=
"false"
:column=
"tableData.column"
:data=
"tableData.data"
@
selection-change=
"handleSelectionChange"
>
</lb-table>
</
template
>
<
template
slot=
"footer"
>
<el-button
type=
"primary"
class=
"save"
@
click=
"handleSaveMember()"
>
保存
</el-button
>
<el-button
class=
"cancel-button"
@
click=
"close()"
>
取消
</el-button>
</
template
>
</Dialog>
</template>
<
script
>
import
Dialog
from
"@/components/Dialog/"
;
export
default
{
name
:
""
,
components
:
{
Dialog
},
props
:
{},
data
()
{
return
{
title
:
"人员配置"
,
visible
:
false
,
tableData
:
{
column
:
[
{
type
:
'selection'
},
{
prop
:
'name'
,
label
:
'角色名称'
},
{
prop
:
'type'
,
label
:
'角色类型'
},
{
prop
:
'departmentName'
,
label
:
'角色描述'
},
],
data
:
[
{
id
:
"3127e455-43ba-45ff-9326-0e02ef89485e"
,
createdAt
:
null
,
updatedAt
:
"2022-08-04T03:38:27.626+0000"
,
createdBy
:
null
,
updatedBy
:
"3127e455-43ba-45ff-9326-0e02ef89485e"
,
sort
:
1
,
name
:
"超级管理员"
,
loginName
:
"admin"
,
password
:
"05eb15777e8fd1d61c840472e7267f61d432f63340d86b59"
,
passwordSalt
:
"5178114777136485"
,
email
:
null
,
lastLoginTime
:
null
,
mobilePhone
:
"18291003568"
,
status
:
"ACTIVE"
,
passwordChangeTime
:
"2021-12-10T08:01:01.569+0000"
,
idCard
:
"612725202111021521"
,
departmentId
:
"2eae5304-544f-4f5b-b354-8f5d47433c9b"
,
organizationId
:
"0bca67ae-1d9e-4b41-b057-f165586d24aa"
,
sex
:
"0"
,
isDuty
:
true
,
type
:
""
,
code
:
"123324"
,
jobLevel
:
null
,
telephone
:
"028-87720898"
,
address
:
"办公地点修改测试"
,
isLocked
:
false
,
departmentName
:
"研发部"
,
_X_ROW_KEY
:
"row_276"
,
},
{
name
:
'数据管理员'
,
type
:
"1"
,
},
{
name
:
'数据管理员2'
,
type
:
"d"
,
}
]
},
multipleSelection
:
[]
}
},
computed
:
{},
watch
:
{},
created
()
{},
mounted
()
{},
methods
:
{
authorization
()
{
this
.
visible
=
true
;
},
close
()
{
// this.resetForm()
this
.
visible
=
false
;
},
// 保存事件
handleSaveMember
()
{
// if (this.memberList.length === 0) {
// this.$message.warning("请添加待选人员");
// return false;
// }
// const idList = this.memberList.map(item => item.id)
// updateUser(this.roleId, idList).then(res => {
// if (res.status === 1) {
// this.$message.success({ message: '保存成功', showClose: true })
// this.showMemberConfigDialog = false
// this.$emit('setUsers', this.roleId)
// this.resetMemberConfig()
// } else this.$message.error({ message: res.message, showClose: true })
// })
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
}
}
};
</
script
>
<
style
scoped
lang=
"scss"
>
/
deep
/
.el-dialog__header
{
text-align
:
center
;
margin-bottom
:
10px
;
.el-dialog__title{
color
:
white
;
}
}
</
style
>
src/views/system/menus/edit-dialog.vue
View file @
d532484
...
...
@@ -166,6 +166,7 @@ export default {
methods
:
{
// 获取父级菜单
getParentMenuList
(
id
)
{
getParentMenuListAction
(
id
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
const
list
=
this
.
$dealArrChildren
(
res
.
content
)
...
...
@@ -195,7 +196,7 @@ export default {
},
// 新增菜单
add
()
{
this
.
getParentMenuList
(
this
.
productId
)
this
.
getParentMenuList
(
"2925fdeb-ddeb-4c15-8ee0-7bc3aa75ec2b"
)
this
.
visible
=
true
this
.
type
=
0
this
.
form
.
jumpMode
=
1
...
...
src/views/system/menus/index.vue
View file @
d532484
...
...
@@ -19,178 +19,176 @@
:data=
"tablelistData"
row-key=
"id"
default-expand-all
:tree-props=
"
{ children: 'children', hasChildren: 'hasChildren' }"
>
:tree-props=
"
{ children: 'children', hasChildren: 'hasChildren' }">
</lb-table>
</div>
<edit-dialog
ref=
"dialogForm"
:product-id=
"productId"
:resource-category-id=
"resourceCategoryId"
@
ok=
"reloadTableData"
/>
@
ok=
"reloadTableData"
/>
<!--
<authorizationdiglog
ref=
"rolesForm"
/>
-->
</div>
</
template
>
<
script
>
// 定时任务
import
data
from
"./data"
;
import
{
deleteAction
,
getAction
,
api
}
from
"@/api/manageApi"
;
import
EditDialog
from
"./edit-dialog.vue"
;
// import authorizationdiglog from "./authorizationdiglog.vue";
export
default
{
name
:
"menus"
,
components
:
{
EditDialog
,
// authorizationdiglog,
},
data
()
{
return
{
tablelistData
:
[],
resourceCategoryId
:
""
,
taskData
:
null
,
form
:
{
job_name
:
""
,
currentPage
:
1
,
},
title
:
""
,
queryParam
:
{},
selectType
:
"0"
,
queryName
:
""
,
organizationId
:
""
,
// 组织机构ID
departmentId
:
""
,
// 部门ID
departmentList
:
[],
// 部门列表
levelList
:
[],
// 职务级别
sexList
:
[],
selectionList
:
[],
tableData
:
{
columns
:
[].
concat
(
data
.
columns
()).
concat
([
{
label
:
"操作"
,
width
:
380
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
button
type
=
"text"
size
=
"mini"
icon
=
"el-icon-edit"
onClick
=
{()
=>
{
this
.
handleEdit
(
scope
.
row
);
}}
>
修改
<
/el-button
>
<
el
-
button
type
=
"text"
size
=
"mini"
icon
=
"el-icon-delete"
style
=
"color:#F56C6C"
onClick
=
{()
=>
{
this
.
handleDelete
(
scope
.
row
.
id
,
scope
.
row
.
name
);
}}
>
删除
<
/el-button
>
<
/div
>
);
},
},
]),
data
:
[],
},
pageData
:
{
total
:
5
,
pageSize
:
15
,
current
:
1
,
},
tableUrl
:
api
.
menus
,
// 菜单接口地址
meumurlid
:
api
.
subsystem
,
// 项目id接口地址
productId
:
""
//项目id
};
},
created
()
{
this
.
getTableList
();
},
methods
:
{
// 加载表格数据
getTableList
()
{
// 定时任务
import
data
from
"./data"
;
import
{
deleteAction
,
getAction
,
api
}
from
"@/api/manageApi"
;
import
EditDialog
from
"./edit-dialog.vue"
;
// import authorizationdiglog from "./authorizationdiglog.vue";
export
default
{
name
:
"menus"
,
components
:
{
EditDialog
,
// authorizationdiglog,
},
data
()
{
return
{
tablelistData
:
[],
resourceCategoryId
:
""
,
taskData
:
null
,
form
:
{
job_name
:
""
,
currentPage
:
1
,
},
title
:
""
,
queryParam
:
{},
selectType
:
"0"
,
queryName
:
""
,
organizationId
:
""
,
// 组织机构ID
departmentId
:
""
,
// 部门ID
departmentList
:
[],
// 部门列表
levelList
:
[],
// 职务级别
sexList
:
[],
const
queryOptionsid
=
{
conditionGroup
:
{
queryRelation
:
"AND"
,
conditions
:
[
selectionList
:
[],
tableData
:
{
columns
:
[].
concat
(
data
.
columns
()).
concat
([
{
property
:
"code"
,
value
:
"BDCJGPT"
,
operator
:
"EQ"
,
label
:
"操作"
,
width
:
380
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
button
type
=
"text"
size
=
"mini"
icon
=
"el-icon-edit"
onClick
=
{()
=>
{
this
.
handleEdit
(
scope
.
row
);
}}
>
修改
<
/el-button
>
<
el
-
button
type
=
"text"
size
=
"mini"
icon
=
"el-icon-delete"
style
=
"color:#F56C6C"
onClick
=
{()
=>
{
this
.
handleDelete
(
scope
.
row
.
id
,
scope
.
row
.
name
);
}}
>
删除
<
/el-button
>
<
/div
>
);
},
},
],
]),
data
:
[],
},
pageData
:
{
total
:
5
,
pageSize
:
15
,
current
:
1
,
},
tableUrl
:
api
.
menus
,
// 菜单接口地址
meumurlid
:
api
.
subsystem
,
// 项目id接口地址
productId
:
""
//项目id
};
const
params
=
{
queryOptions
:
queryOptionsid
,
};
// 获取系统id
getAction
(
this
.
meumurlid
,
params
)
.
then
((
res
)
=>
{
this
.
productId
=
res
.
content
[
0
].
id
;
let
queryOptions
=
{
conditionGroup
:
{
conditions
:
[
{
property
:
"productId"
,
value
:
this
.
productId
,
operator
:
"EQ"
,
},
],
queryRelation
:
"AND"
,
},
orderBys
:
[{
property
:
"sort"
,
direction
:
"desc"
}],
};
if
(
!
this
.
tableUrl
)
{
console
.
log
(
"请设置tableUrl属性为接口地址!"
);
return
;
}
if
(
this
.
queryOptions
!==
""
)
{
this
.
queryParam
.
queryOptions
=
JSON
.
stringify
(
queryOptions
);
}
// 查询系统菜单
getAction
(
this
.
tableUrl
,
this
.
queryParam
)
.
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
loading
=
false
;
this
.
tablelistData
=
res
.
content
;
console
.
log
(
"this.tablelistData"
,
this
.
tablelistData
);
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
});
this
.
loading
=
false
;
}
})
.
catch
((
error
)
=>
{
console
.
log
(
"errrrrrorrrrr"
,
error
);
this
.
loading
=
false
;
});
})
.
catch
((
error
)
=>
{
console
.
log
(
"errrrrrorrrrr"
,
error
);
});
},
// 新增菜单
handleAdd
()
{
this
.
$refs
.
dialogForm
.
add
();
this
.
$refs
.
dialogForm
.
title
=
"添加"
;
created
()
{
this
.
getTableList
();
},
methods
:
{
// 加载表格数据
getTableList
()
{
// 修改
handleEdit
(
record
)
{
this
.
$refs
.
dialogForm
.
edit
(
record
);
this
.
$refs
.
dialogForm
.
title
=
"修改"
;
},
// 删除
handleDelete
(
id
,
content
)
{
this
.
$confirm
(
`<div class="customer-message-wrapper">
const
queryOptionsid
=
{
conditionGroup
:
{
queryRelation
:
"AND"
,
conditions
:
[
{
property
:
"code"
,
value
:
"BDCJGPT"
,
operator
:
"EQ"
,
},
],
},
};
const
params
=
{
queryOptions
:
queryOptionsid
,
};
// 获取系统id
getAction
(
this
.
meumurlid
,
params
)
.
then
((
res
)
=>
{
this
.
productId
=
res
.
content
[
0
].
id
;
let
queryOptions
=
{
conditionGroup
:
{
conditions
:
[
{
property
:
"productId"
,
value
:
this
.
productId
,
operator
:
"EQ"
,
},
],
queryRelation
:
"AND"
,
},
orderBys
:
[{
property
:
"sort"
,
direction
:
"desc"
}],
};
if
(
!
this
.
tableUrl
)
{
console
.
log
(
"请设置tableUrl属性为接口地址!"
);
return
;
}
if
(
this
.
queryOptions
!==
""
)
{
this
.
queryParam
.
queryOptions
=
JSON
.
stringify
(
queryOptions
);
}
// 查询系统菜单
getAction
(
this
.
tableUrl
,
this
.
queryParam
)
.
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
loading
=
false
;
this
.
tablelistData
=
res
.
content
;
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
});
this
.
loading
=
false
;
}
})
.
catch
((
error
)
=>
{
console
.
log
(
"er"
,
error
);
this
.
loading
=
false
;
});
})
.
catch
((
error
)
=>
{
console
.
log
(
"er"
,
error
);
});
},
// 新增菜单
handleAdd
()
{
this
.
$refs
.
dialogForm
.
add
();
this
.
$refs
.
dialogForm
.
title
=
"添加"
;
},
// 修改
handleEdit
(
record
)
{
this
.
$refs
.
dialogForm
.
edit
(
record
);
this
.
$refs
.
dialogForm
.
title
=
"修改"
;
},
// 删除
handleDelete
(
id
,
content
)
{
this
.
$confirm
(
`<div class="customer-message-wrapper">
<h5 class="title">您确认要执行该操作用于以下信息:</h5>
<p class="content" aria-controls="
${
content
}
">
${
content
}
</p>
...
...
@@ -198,49 +196,49 @@ export default {
<span >无法恢复</span>
</p>
</div>`
,
'执行确认'
,
{
dangerouslyUseHTMLString
:
true
,
customClass
:
'customer-delete'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}
)
.
then
(()
=>
{
if
(
!
this
.
tableUrl
)
{
this
.
$message
.
error
({
message
:
'请设置tableUrl属性为接口地址!'
,
showClose
:
true
})
return
'执行确认'
,
{
dangerouslyUseHTMLString
:
true
,
customClass
:
'customer-delete'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}
const
url
=
this
.
tableUrl
+
'/'
+
id
deleteAction
(
url
).
then
(
res
=>
{
if
(
res
.
status
===
1
)
{
this
.
$message
.
success
({
message
:
res
.
message
,
showClose
:
true
})
this
.
reloadTableData
()
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
})
)
.
then
(()
=>
{
if
(
!
this
.
tableUrl
)
{
this
.
$message
.
error
({
message
:
'请设置tableUrl属性为接口地址!'
,
showClose
:
true
})
return
}
const
url
=
this
.
tableUrl
+
'/'
+
id
deleteAction
(
url
).
then
(
res
=>
{
if
(
res
.
status
===
1
)
{
this
.
$message
.
success
({
message
:
res
.
message
,
showClose
:
true
})
this
.
reloadTableData
()
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
})
}
})
})
})
.
catch
(()
=>
{})
},
// 新增、编辑回显
reloadTableData
()
{
this
.
getTableList
()
.
catch
(()
=>
{
})
},
// 新增、编辑回显
reloadTableData
()
{
this
.
getTableList
()
},
},
},
};
};
</
script
>
<
style
scoped
lang=
"scss"
>
@import
"~@/styles/mixin.scss"
;
@import
"~@/styles/public.scss"
;
.btnColRight
{
margin-top
:
20px
;
}
/
deep
/
.el-table__expand-icon
{
color
:
#fff
;
}
@import
"~@/styles/mixin.scss"
;
@import
"~@/styles/public.scss"
;
.btnColRight
{
margin-top
:
20px
;
}
/
deep
/
.el-table__expand-icon
{
color
:
#fff
;
}
</
style
>
...
...
src/views/system/roles/index.vue
View file @
d532484
...
...
@@ -22,8 +22,7 @@
:column=
"tableData.columns"
:data=
"listdata"
:expand-row-keys=
"keyList"
row-key=
"id"
>
row-key=
"id"
>
</lb-table>
</div>
<EditDialog
ref=
"addEditDialog"
@
ok=
"reloadTableData"
/>
...
...
@@ -31,281 +30,400 @@
</div>
</
template
>
<
script
>
import
{
getUuid
,
judgeSort
,
realMove
,
findParents
,
removeTreeListItem
,
}
from
"@/utils/operation"
;
import
{
getRolesById
,
getUserRoles
}
from
"@/api/quanxianmanagement"
;
import
data
from
"./data"
;
import
sjsbTask
from
"@/api/sjsbTask.js"
;
import
{
api
,
getAction
,
deleteAction
}
from
"@/api/manageApi"
;
import
tableMixin
from
"@/mixins/tableMixin.js"
;
import
EditDialog
from
"./edit-dialog.vue"
;
import
Roleslistdiglog
from
"./roleslistdiglog.vue"
;
export
default
{
name
:
"menus"
,
mixins
:
[
tableMixin
],
components
:
{
EditDialog
,
Roleslistdiglog
,
},
data
()
{
return
{
personlist
:
null
,
waitMemberList
:
[],
keyList
:
[],
listdata
:
[],
tableUrl
:
api
.
roles
,
form
:
{
job_name
:
""
,
currentPage
:
1
,
},
// 当前所选角色id
roleId
:
""
,
title
:
""
,
queryParam
:
{},
selectType
:
"0"
,
queryName
:
""
,
organizationId
:
""
,
// 组织机构ID
departmentId
:
""
,
// 部门ID
departmentList
:
[],
// 部门列表
levelList
:
[],
// 职务级别
sexList
:
[],
typeOptions
:
[
{
value
:
"0"
,
label
:
"姓名"
,
},
{
value
:
"1"
,
label
:
"工号"
,
},
{
value
:
"2"
,
label
:
"部门"
,
},
{
value
:
"3"
,
label
:
"机构"
,
import
{
getUuid
,
judgeSort
,
realMove
,
findParents
,
removeTreeListItem
,
}
from
"@/utils/operation"
;
import
{
getRolesById
,
getUserRoles
,
getAuthorityListAction
}
from
"@/api/quanxianmanagement"
;
import
data
from
"./data"
;
// import {
// getOrganizationAuthorityList,
// getDepartmentAuthorityList,
// getRoleAuthorityList,
// getUserAuthorityList,
// getAuthorityListAction
// } from '@/api/authorityManage'
import
sjsbTask
from
"@/api/sjsbTask.js"
;
import
{
api
,
getAction
,
deleteAction
}
from
"@/api/manageApi"
;
import
tableMixin
from
"@/mixins/tableMixin.js"
;
import
EditDialog
from
"./edit-dialog.vue"
;
import
Roleslistdiglog
from
"./roleslistdiglog.vue"
;
export
default
{
name
:
"menus"
,
mixins
:
[
tableMixin
],
components
:
{
EditDialog
,
Roleslistdiglog
,
},
data
()
{
return
{
personlist
:
null
,
waitMemberList
:
[],
keyList
:
[],
listdata
:
[],
tableUrl
:
api
.
roles
,
form
:
{
job_name
:
""
,
currentPage
:
1
,
},
],
selectionList
:
[],
tableData
:
{
columns
:
[
// 当前所选角色id
roleId
:
""
,
title
:
""
,
queryParam
:
{},
multipleSelection
:
[],
// 菜单列表
menutablelistData
:
[],
tableUrl
:
api
.
menus
,
// 菜单接口地址
meumurlid
:
api
.
subsystem
,
// 项目id接口地址
selectType
:
"0"
,
queryName
:
""
,
organizationId
:
""
,
// 组织机构ID
departmentId
:
""
,
// 部门ID
departmentList
:
[],
// 部门列表
levelList
:
[],
// 职务级别
sexList
:
[],
operationCodes
:
null
,
// 操作符对象
operationList
:
[],
// 获取授权列表需要提交的操作符数组
typeOptions
:
[
{
value
:
"0"
,
label
:
"姓名"
,
},
{
value
:
"1"
,
label
:
"工号"
,
},
{
label
:
"序号"
,
type
:
"index"
,
width
:
"50"
,
index
:
this
.
indexMethod
,
value
:
"2"
,
label
:
"部门"
,
},
]
.
concat
(
data
.
columns
())
.
concat
([
{
value
:
"3"
,
label
:
"机构"
,
},
],
selectionList
:
[],
tableData
:
{
columns
:
[
{
label
:
"排序"
,
width
:
380
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
button
type
=
"text"
disabled
=
{
scope
.
row
.
isTop
}
onClick
=
{()
=>
{
this
.
moveUpward
(
scope
.
$index
,
scope
.
row
);
}}
>
上移
<
/el-button
>
<
el
-
button
type
=
"text"
disabled
=
{
scope
.
row
.
isBottom
}
onClick
=
{()
=>
{
this
.
moveDown
(
scope
.
$index
,
scope
.
row
);
}}
>
下移
<
/el-button
>
<
/div
>
);
},
label
:
"序号"
,
type
:
"index"
,
width
:
"50"
,
index
:
this
.
indexMethod
,
},
])
.
concat
([
{
label
:
"操作"
,
width
:
380
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
tooltip
class
=
"item"
effect
=
"dark"
disabled
=
{
scope
.
row
.
type
!==
'Everyone'
}
content
=
"没有点击的权限"
placement
=
"top"
>
<
span
>
<
el
-
button
disabled
=
{
scope
.
row
.
type
===
'Everyone'
}
type
=
"text"
size
=
"mini"
icon
=
"el-icon-video-pause"
onClick
=
{()
=>
{
this
.
getUserList
(
scope
.
row
);
}}
>
配置
<
/el-button
>
<
/span
>
<
/el-tooltip
>
<
el
-
tooltip
class
=
"item"
effect
=
"dark"
disabled
=
{
scope
.
row
.
category
!==
1
}
content
=
"系统内置角色 不允许修改"
placement
=
"top"
>
<
span
>
<
el
-
button
disabled
=
{
scope
.
row
.
category
===
1
}
type
=
"text"
size
=
"mini"
icon
=
"el-icon-edit"
onClick
=
{()
=>
{
this
.
handleAddEdit
(
scope
.
row
);
}}
>
修改
<
/el-button
>
<
/span
>
<
/el-tooltip
>
<
el
-
tooltip
class
=
"item"
effect
=
"dark"
disabled
=
{
scope
.
row
.
category
!==
1
}
content
=
"系统内置角色 不允许删除"
placement
=
"top"
>
<
span
>
<
el
-
button
type
=
"text"
disabled
=
{
scope
.
row
.
category
===
1
}
size
=
"mini"
icon
=
"el-icon-delete"
// style="color:#F56C6C"
onClick
=
{()
=>
{
this
.
handleDelete
(
scope
.
row
.
id
,
scope
.
row
.
name
);
}}
>
删除
<
/el-button
>
<
/span
>
<
/el-tooltip
>
<
/div
>
);
]
.
concat
(
data
.
columns
())
.
concat
([
{
label
:
"排序"
,
width
:
380
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
button
type
=
"text"
disabled
=
{
scope
.
row
.
isTop
}
onClick
=
{()
=>
{
this
.
moveUpward
(
scope
.
$index
,
scope
.
row
);
}}
>
上移
<
/el-button
>
<
el
-
button
type
=
"text"
disabled
=
{
scope
.
row
.
isBottom
}
onClick
=
{()
=>
{
this
.
moveDown
(
scope
.
$index
,
scope
.
row
);
}}
>
下移
<
/el-button
>
<
/div
>
);
},
},
},
]),
data
:
[],
},
pageData
:
{
total
:
5
,
pageSize
:
15
,
current
:
1
,
},
};
},
created
()
{
this
.
getTableData
();
},
mounted
()
{},
methods
:
{
// 获取角色列表
getTableData
()
{
let
Builtinrole
=
[]
let
Publicrole
=
[]
getRolesById
(
1
)
.
then
((
res
)
=>
{
Builtinrole
=
res
.
content
;
getRolesById
(
2
)
.
then
((
res
)
=>
{
Publicrole
=
res
.
content
;
])
.
concat
([
{
label
:
"操作"
,
width
:
380
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
tooltip
class
=
"item"
effect
=
"dark"
disabled
=
{
scope
.
row
.
type
!==
"Everyone"
}
content
=
"没有点击的权限"
placement
=
"top"
>
<
span
>
<
el
-
button
disabled
=
{
scope
.
row
.
type
===
"Everyone"
}
type
=
"text"
size
=
"mini"
icon
=
"el-icon-video-pause"
onClick
=
{()
=>
{
this
.
getUserList
(
scope
.
row
);
}}
>
配置
<
/el-button
>
<
/span
>
<
/el-tooltip
>
<
el
-
tooltip
class
=
"item"
effect
=
"dark"
disabled
=
{
scope
.
row
.
category
!==
1
}
content
=
"系统内置角色 不允许修改"
placement
=
"top"
>
<
span
>
<
el
-
button
disabled
=
{
scope
.
row
.
category
===
1
}
type
=
"text"
size
=
"mini"
icon
=
"el-icon-edit"
onClick
=
{()
=>
{
this
.
handleAddEdit
(
scope
.
row
);
}}
>
修改
<
/el-button
>
<
/span
>
<
/el-tooltip
>
<
el
-
tooltip
class
=
"item"
effect
=
"dark"
disabled
=
{
scope
.
row
.
category
!==
1
}
content
=
"系统内置角色 不允许删除"
placement
=
"top"
>
<
span
>
<
el
-
button
type
=
"text"
disabled
=
{
scope
.
row
.
category
===
1
}
size
=
"mini"
icon
=
"el-icon-delete"
// style="color:#F56C6C"
onClick
=
{()
=>
{
this
.
handleDelete
(
scope
.
row
.
id
,
scope
.
row
.
name
);
}}
>
删除
<
/el-button
>
<
/span
>
<
/el-tooltip
>
<
/div
>
);
},
},
]),
data
:
[],
},
pageData
:
{
total
:
5
,
pageSize
:
15
,
current
:
1
,
},
};
},
created
()
{
this
.
getTableData
();
this
.
getTableList
()
},
mounted
()
{
},
methods
:
{
// 获取角色列表
getTableData
()
{
let
Builtinrole
=
[];
let
Publicrole
=
[];
this
.
listdata
=
Builtinrole
.
concat
(
Publicrole
);
getRolesById
(
1
)
.
then
((
res
)
=>
{
Builtinrole
=
res
.
content
;
getRolesById
(
2
)
.
then
((
res
)
=>
{
Publicrole
=
res
.
content
;
this
.
listdata
=
judgeSort
(
this
.
listdata
);
})
.
catch
((
e
)
=>
console
.
error
(
e
));
})
.
catch
((
e
)
=>
console
.
error
(
e
));
this
.
listdata
=
Builtinrole
.
concat
(
Publicrole
);
this
.
listdata
=
judgeSort
(
this
.
listdata
);
})
.
catch
((
e
)
=>
console
.
error
(
e
));
})
.
catch
((
e
)
=>
console
.
error
(
e
));
},
},
// 人员配置
getUserList
(
row
)
{
const
params
=
{};
const
queryOptions
=
{
conditionGroup
:
{
conditions
:
[
{
property
:
"organizationId"
,
value
:
row
.
organizationId
,
operator
:
"EQ"
,
},
{
property
:
"departmentId"
,
value
:
row
.
departmentId
,
operator
:
"EQ"
,
},
],
queryRelation
:
"AND"
,
},
orderBys
:
[{
property
:
"sort"
,
direction
:
"desc"
}],
};
params
.
queryOptions
=
JSON
.
stringify
(
queryOptions
);
getUserRoles
(
row
.
id
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
personlist
=
res
.
content
;
getAction
(
api
.
users
,
params
).
then
((
res
)
=>
{
// 获取菜单列表
getTableList
()
{
const
queryOptionsid
=
{
conditionGroup
:
{
queryRelation
:
"AND"
,
conditions
:
[
{
property
:
"code"
,
value
:
"BDCJGPT"
,
operator
:
"EQ"
,
},
],
},
};
const
params
=
{
queryOptions
:
queryOptionsid
,
};
// 获取系统id
getAction
(
this
.
meumurlid
,
params
)
.
then
((
res
)
=>
{
this
.
productId
=
res
.
content
[
0
].
id
;
this
.
getAuthorityList
(
res
.
content
[
0
].
id
,
res
.
content
[
0
].
code
)
this
.
selectedSubsystemCode
=
res
.
content
[
0
].
code
let
queryOptions
=
{
conditionGroup
:
{
conditions
:
[
{
property
:
"productId"
,
value
:
this
.
productId
,
operator
:
"EQ"
,
},
],
queryRelation
:
"AND"
,
},
orderBys
:
[{
property
:
"sort"
,
direction
:
"desc"
}],
};
if
(
!
this
.
tableUrl
)
{
console
.
log
(
"请设置tableUrl属性为接口地址!"
);
return
;
}
if
(
this
.
queryOptions
!==
""
)
{
this
.
queryParam
.
queryOptions
=
JSON
.
stringify
(
queryOptions
);
}
// 查询系统菜单
getAction
(
this
.
tableUrl
,
this
.
queryParam
)
.
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
loading
=
false
;
this
.
menutablelistData
=
res
.
content
;
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
});
this
.
loading
=
false
;
}
})
.
catch
((
error
)
=>
{
console
.
log
(
"er"
,
error
);
this
.
loading
=
false
;
});
})
.
catch
((
error
)
=>
{
console
.
log
(
"er"
,
error
);
});
},
// 获取权限列表
getAuthorityList
(
productId
,
code
)
{
getAuthorityListAction
(
productId
,
code
).
then
(
res
=>
{
if
(
res
.
status
===
1
)
{
this
.
waitMemberList
=
res
.
content
;
if
(
this
.
personlist
)
{
this
.
waitMemberList
.
forEach
((
item
,
i
)
=>
{
this
.
personlist
.
forEach
((
val
)
=>
{
if
(
item
.
id
===
val
.
id
)
{
this
.
waitMemberList
[
i
].
selectStatus
=
0
;
}
});
});
if
(
res
.
content
.
length
!==
0
)
{
this
.
operationCodes
=
res
.
content
[
0
].
operations
this
.
operationList
=
[]
for
(
var
k
in
this
.
operationCodes
)
{
this
.
operationList
.
push
(
k
)
}
}
this
.
$refs
.
rolesForm
.
adds
(
this
.
waitMemberList
,
row
.
id
);
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
})
;
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
})
}
});
this
.
$refs
.
rolesForm
.
title
=
"人员配置"
;
}
else
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
});
});
},
// 新增、修改角色
handleAddEdit
(
value
)
{
this
.
$refs
.
addEditDialog
.
menuType
=
this
.
menuType
;
this
.
$refs
.
addEditDialog
.
roleId
=
value
.
id
;
this
.
roleSort
=
value
.
sort
?
value
.
sort
:
0
;
if
(
value
.
id
)
{
this
.
$refs
.
addEditDialog
.
dialogForm
.
roleName
=
value
.
name
;
this
.
$refs
.
addEditDialog
.
dialogForm
.
roleType
=
value
.
type
;
this
.
$refs
.
addEditDialog
.
dialogForm
.
roleTextArea
=
value
.
description
;
}
this
.
$refs
.
addEditDialog
.
showAddEditDialog
=
true
;
this
.
$refs
.
addEditDialog
.
dialogTitle
=
value
.
id
?
"修改"
:
"新增"
;
},
// 上移下移
moveUpward
(
index
,
row
)
{
realMove
(
row
.
id
,
"UP"
,
this
.
listdata
);
this
.
key
++
;
let
id
=
findParents
(
this
.
listdata
,
row
.
id
);
this
.
keyList
=
id
;
},
moveDown
(
index
,
row
)
{
realMove
(
row
.
id
,
"DOWN"
,
this
.
listdata
);
this
.
key
++
;
let
id
=
findParents
(
this
.
listdata
,
row
.
id
);
this
.
keyList
=
id
;
},
}
)
},
// 删除
handleDelete
:
function
(
id
,
content
=
''
)
{
this
.
$confirm
(
`<div class="customer-message-wrapper">
// 配置
getUserList
(
row
)
{
this
.
getTableList
()
const
params
=
{};
const
queryOptions
=
{
conditionGroup
:
{
conditions
:
[
{
property
:
"organizationId"
,
value
:
row
.
organizationId
,
operator
:
"EQ"
,
},
{
property
:
"departmentId"
,
value
:
row
.
departmentId
,
operator
:
"EQ"
,
},
],
queryRelation
:
"AND"
,
},
orderBys
:
[{
property
:
"sort"
,
direction
:
"desc"
}],
};
params
.
queryOptions
=
JSON
.
stringify
(
queryOptions
);
getUserRoles
(
row
.
id
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
personlist
=
res
.
content
;
getAction
(
api
.
users
,
params
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
waitMemberList
=
res
.
content
;
if
(
this
.
personlist
)
{
this
.
waitMemberList
.
forEach
((
item
,
i
)
=>
{
this
.
personlist
.
forEach
((
val
)
=>
{
if
(
item
.
id
===
val
.
id
)
{
this
.
waitMemberList
[
i
].
selectStatus
=
0
;
}
});
});
}
this
.
$refs
.
rolesForm
.
personlist
(
this
.
waitMemberList
,
row
.
id
);
// this.$refs.rolesForm.getMenuData();
this
.
$refs
.
rolesForm
.
menulist
(
this
.
operationList
,
row
.
id
,
this
.
selectedSubsystemCode
,
this
.
menutablelistData
,
this
.
operationCodes
);
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
});
}
});
this
.
$refs
.
rolesForm
.
title
=
"人员配置"
;
}
else
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
});
});
},
// 新增、修改角色
handleAddEdit
(
value
)
{
this
.
$refs
.
addEditDialog
.
menuType
=
this
.
menuType
;
this
.
$refs
.
addEditDialog
.
roleId
=
value
.
id
;
this
.
roleSort
=
value
.
sort
?
value
.
sort
:
0
;
if
(
value
.
id
)
{
this
.
$refs
.
addEditDialog
.
dialogForm
.
roleName
=
value
.
name
;
this
.
$refs
.
addEditDialog
.
dialogForm
.
roleType
=
value
.
type
;
this
.
$refs
.
addEditDialog
.
dialogForm
.
roleTextArea
=
value
.
description
;
}
this
.
$refs
.
addEditDialog
.
showAddEditDialog
=
true
;
this
.
$refs
.
addEditDialog
.
dialogTitle
=
value
.
id
?
"修改"
:
"新增"
;
},
// 上移下移
moveUpward
(
index
,
row
)
{
realMove
(
row
.
id
,
"UP"
,
this
.
listdata
);
this
.
key
++
;
let
id
=
findParents
(
this
.
listdata
,
row
.
id
);
this
.
keyList
=
id
;
},
moveDown
(
index
,
row
)
{
realMove
(
row
.
id
,
"DOWN"
,
this
.
listdata
);
this
.
key
++
;
let
id
=
findParents
(
this
.
listdata
,
row
.
id
);
this
.
keyList
=
id
;
},
// 删除
handleDelete
:
function
(
id
,
content
=
""
)
{
this
.
$confirm
(
`<div class="customer-message-wrapper">
<h5 class="title">您确认要执行该操作用于以下信息:</h5>
<p class="content" aria-controls="
${
content
}
">
${
content
}
</p>
...
...
@@ -313,47 +431,47 @@ export default {
<span >无法恢复</span>
</p>
</div>`
,
'执行确认'
,
{
dangerouslyUseHTMLString
:
true
,
customClass
:
'customer-delete'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}
)
.
then
(()
=>
{
if
(
!
this
.
tableUrl
)
{
this
.
$message
.
error
({
message
:
'请设置tableUrl属性为接口地址!'
,
showClose
:
true
})
return
"执行确认"
,
{
dangerouslyUseHTMLString
:
true
,
customClass
:
"customer-delete"
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
}
const
url
=
this
.
tableUrl
+
'/'
+
id
deleteAction
(
url
).
then
(
res
=>
{
if
(
res
.
status
===
1
)
{
this
.
$message
.
success
({
message
:
res
.
message
,
showClose
:
true
})
this
.
getTableData
()
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
})
)
.
then
(()
=>
{
if
(
!
this
.
tableUrl
)
{
this
.
$message
.
error
({
message
:
"请设置tableUrl属性为接口地址!"
,
showClose
:
true
,
});
return
;
}
const
url
=
this
.
tableUrl
+
"/"
+
id
;
deleteAction
(
url
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
$message
.
success
({
message
:
res
.
message
,
showClose
:
true
});
this
.
getTableData
();
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
});
}
});
})
})
.
catch
(()
=>
{})
},
.
catch
(()
=>
{
});
},
// 新增回显
reloadTableData
()
{
this
.
getTableData
()
reloadTableData
()
{
this
.
getTableData
();
},
},
},
};
};
</
script
>
<
style
scoped
lang=
"scss"
>
@import
"~@/styles/mixin.scss"
;
@import
"~@/styles/public.scss"
;
.btnColRight
{
margin-left
:
-30px
;
margin-top
:
20px
;
}
@import
"~@/styles/mixin.scss"
;
@import
"~@/styles/public.scss"
;
.btnColRight
{
margin-left
:
-30px
;
margin-top
:
20px
;
}
</
style
>
...
...
src/views/system/roles/roleslistdiglog.vue
View file @
d532484
...
...
@@ -5,8 +5,7 @@
@
click=
"close()"
custom-class=
"dialogBox editDialogBox mainCenter"
:visible
.
sync=
"visible"
width=
"85%"
>
width=
"85%"
>
<div
slot=
"title"
class=
"dialog_title"
ref=
"dialogTitle"
>
{{
title
||
"标题"
}}
</div>
...
...
@@ -15,424 +14,595 @@
<el-tab-pane
label=
"人员配置"
name=
"first"
></el-tab-pane>
<el-tab-pane
label=
"菜单配置"
name=
"second"
></el-tab-pane>
</el-tabs>
<!--
<div
class=
"editDialogBox-box"
v-if=
"activeName == 'first'"
>
-->
<lb-table
v-
if
=
"activeName == 'first'"
v-
show
=
"activeName == 'first'"
ref=
"multipleTable"
:pagination=
"false"
:column=
"usertableData.column"
:data=
"usertableData.data"
@
selection-change=
"handleSelectionChange"
@
row-click=
"handleClickTableRow"
>
@
row-click=
"handleClickTableRow"
>
>
</lb-table>
<
!--
</div>
-->
<!--
<div
class=
"editDialogBox-box"
v-else=
"activeName !== 'first'"
>
-->
<lb-table
v-else=
"activeName !== 'first'
"
<
lb-table
:key=
"menukey"
v-show=
"activeName == 'second'"
ref=
"multipleTable1
"
:pagination=
"false"
:column=
"menutableData.column
s
"
:data=
"
menutableData
"
:column=
"menutableData.column"
:data=
"
lastMenuList
"
row-key=
"id"
default-expand-all
@
selection-change=
"handleSelectionChanges"
@
row-click=
"handleClickTableRows"
:tree-props=
"
{ children: 'children', hasChildren: 'hasChildren' }"
>
:tree-props=
"
{children: 'children', hasChildren: 'hasChildren'}">
</lb-table>
<!--
</div>
-->
</div>
<template
slot=
"footer"
>
<el-button
type=
"primary"
class=
"save"
@
click=
"handleSaveMember()"
>
保存
</el-button
>
<el-button
type=
"primary"
class=
"save"
@
click=
"handleSaveMember()"
>
保存
</el-button>
<el-button
class=
"cancel-button"
@
click=
"close()"
>
取消
</el-button>
</
template
>
</el-dialog>
</template>
<
script
>
import
{
updateUser
}
from
"@/api/quanxianmanagement"
;
export
default
{
name
:
""
,
data
()
{
return
{
title
:
"人员配置"
,
visible
:
false
,
menutableData
:
{
column
:
[
{
type
:
"selection"
,
},
{
prop
:
"name"
,
label
:
"菜单名称"
,
},
],
},
usertableData
:
{
column
:
[
{
type
:
"selection"
,
},
{
prop
:
"name"
,
label
:
"姓名"
,
},
{
prop
:
"loginName"
,
label
:
"用户名"
,
},
],
},
// 角色id
roleId
:
""
,
activeName
:
"first"
,
multipleSelection
:
[],
};
},
computed
:
{},
created
()
{},
mounted
()
{},
methods
:
{
// 人员配置点击行勾选数据
handleClickTableRow
(
row
,
event
)
{
this
.
checkNum
=
0
;
this
.
isCheck
=
false
;
if
(
event
.
label
==
"操作"
)
{
return
;
}
else
{
if
(
row
.
status
==
"0"
)
{
import
{
api
}
from
"@/api/manageApi"
;
import
{
updateUser
,
getRoleAuthorityList
,
roleAuthority
}
from
"@/api/quanxianmanagement"
;
export
default
{
name
:
""
,
data
()
{
return
{
title
:
"人员配置"
,
visible
:
false
,
menutableData
:
{
column
:
[
{
label
:
"序号"
,
type
:
"index"
,
width
:
"50"
,
// index: this.indexMethod,
},
{
prop
:
"name"
,
width
:
330
,
label
:
"菜单名称"
,
}
].
concat
([
{
label
:
"权限"
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
checkbox
v
-
model
=
{
scope
.
row
.
checkArr
[
0
].
value
}
disabled
=
{
scope
.
row
.
checkArr
[
0
].
disabled
}
label
=
{
scope
.
row
.
checkArr
[
0
].
name
}
onChange
=
{(
checked
)
=>
{
this
.
changeCheck
(
checked
,
scope
.
row
.
checkArr
[
0
].
id
,
scope
);
}}
/
>
<
el
-
checkbox
v
-
model
=
{
scope
.
row
.
checkArr
[
1
].
value
}
disabled
=
{
scope
.
row
.
checkArr
[
0
].
disabled
}
label
=
{
scope
.
row
.
checkArr
[
1
].
name
}
onChange
=
{(
checked
)
=>
{
this
.
changeCheck
(
checked
,
scope
.
row
.
checkArr
[
1
].
id
,
scope
);
}}
/
>
<
/div
>
);
},
},
]),
},
usertableData
:
{
column
:
[
{
type
:
"selection"
,
width
:
330
,
},
{
prop
:
"name"
,
width
:
330
,
label
:
"姓名"
,
},
{
prop
:
"loginName"
,
label
:
"用户名"
,
},
],
data
:
[]
},
// 角色id
roleId
:
""
,
menuList
:
[],
// 菜单列表
queryParam
:
{},
menukey
:
0
,
activeName
:
"first"
,
lastMenuList
:
[],
// 重构完成的菜单表格数据
usermultipleSelection
:
[],
// 选中菜单列表
menumultipleSelection
:
[],
tableUrl
:
api
.
menus
,
// 菜单接口地址
meumurlid
:
api
.
subsystem
,
// 项目id接口地址
checkArr
:
[],
// 重构操作符列表
authorityList
:
[],
// 授权回显数组
checklistbor
:
[],
// 授权对象数据
menuprams
:
{},
// 系统code
selectedSubsystemCode
:
""
};
},
computed
:
{},
created
()
{
},
mounted
()
{
},
methods
:
{
// 人员配置点击行勾选数据
handleClickTableRow
(
row
,
event
)
{
this
.
checkNum1
=
0
;
this
.
isCheck1
=
false
;
if
(
event
.
label
==
"操作"
)
{
return
;
}
else
{
if
(
this
.
multipleSelection
.
length
>
0
)
{
if
(
JSON
.
stringify
(
this
.
multipleSelection
).
indexOf
(
JSON
.
stringify
(
row
)
)
==
-
1
)
{
this
.
multipleSelection
.
push
(
row
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
true
);
if
(
row
.
status
==
"0"
)
{
return
;
}
else
{
if
(
this
.
usermultipleSelection
.
length
>
0
)
{
if
(
JSON
.
stringify
(
this
.
usermultipleSelection
).
indexOf
(
JSON
.
stringify
(
row
)
)
==
-
1
)
{
this
.
usermultipleSelection
.
push
(
row
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
true
);
}
else
{
this
.
usermultipleSelection
.
map
((
item
,
index
)
=>
{
if
(
item
.
id
==
row
.
id
)
{
this
.
usermultipleSelection
.
splice
(
index
,
1
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
false
);
}
});
}
}
else
{
this
.
multipleSelection
.
map
((
item
,
index
)
=>
{
if
(
item
.
id
==
row
.
id
)
{
this
.
multipleSelection
.
splice
(
index
,
1
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
false
);
}
});
this
.
usermultipleSelection
.
push
(
row
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
true
);
}
}
}
if
(
this
.
usermultipleSelection
.
length
>
0
)
{
this
.
checkNum1
=
this
.
usermultipleSelection
.
length
;
this
.
isCheck1
=
true
;
}
else
{
this
.
isCheck1
=
false
;
}
},
// 获取授权主体的菜单权限
// getMenuAuthorityList
menulist
(
operationList
,
id
,
Code
,
menutablelistData
,
operationCodes
)
{
this
.
selectedSubsystemCode
=
Code
this
.
menuList
=
menutablelistData
;
getRoleAuthorityList
(
id
,
operationList
.
toString
(),
Code
+
'_MENU'
).
then
(
res
=>
{
if
(
res
.
status
===
1
)
{
this
.
authorityList
=
res
.
content
this
.
getRecursionTreeData
(
this
.
menuList
,
this
.
authorityList
,
operationCodes
)
this
.
getAuthorizedInfo
()
// this.setCheckAllArr()
// this.getAuthorizedInfo()
}
else
{
this
.
multipleSelection
.
push
(
row
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
true
);
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
})
}
})
},
/**
* 递归渲染列表数据
* list:原始数组
* authorityList:已授权数组
*/
getRecursionTreeData
(
list
,
authorityList
,
operationCodes
)
{
++
this
.
menukey
this
.
checkArr
=
[]
for
(
const
k
in
operationCodes
)
{
const
obj
=
{}
obj
.
name
=
operationCodes
[
k
]
obj
.
id
=
k
obj
.
value
=
false
obj
.
disabled
=
false
// obj.isAll = false;
this
.
checkArr
.
push
(
obj
)
}
}
if
(
this
.
multipleSelection
.
length
>
0
)
{
this
.
checkNum
=
this
.
multipleSelection
.
length
;
this
.
isCheck
=
true
;
}
else
{
this
.
isCheck
=
false
;
}
},
// 菜单配置点击行勾选数据
handleClickTableRow
(
row
,
event
)
{
this
.
checkNum
=
0
;
this
.
isCheck
=
false
;
if
(
event
.
label
==
"操作"
)
{
return
;
}
else
{
if
(
row
.
status
==
"0"
)
{
return
;
for
(
const
[
index
,
item
]
of
Object
.
entries
(
list
))
{
this
.
setAuthorizedConditions
(
authorityList
,
this
.
$deepCopy
(
this
.
checkArr
),
item
)
if
(
item
.
children
&&
item
.
children
!==
null
&&
item
.
children
.
length
!==
0
)
{
item
.
children
.
forEach
((
child
,
j
)
=>
{
this
.
setAuthorizedConditions
(
authorityList
,
this
.
$deepCopy
(
this
.
checkArr
),
child
)
})
this
.
getRecursionTreeData
(
item
.
children
,
authorityList
,
operationCodes
)
}
}
this
.
lastMenuList
=
list
// this.setCheckAllArr(list)
},
// 授权条件
setAuthorizedConditions
(
authorityList
,
checkArr
,
item
)
{
if
(
this
.
roleId
===
''
)
{
checkArr
.
forEach
(
ele
=>
{
ele
.
disabled
=
true
ele
.
value
=
false
})
}
else
{
if
(
this
.
multipleSelection
.
length
>
0
)
{
if
(
JSON
.
stringify
(
this
.
multipleSelection
).
indexOf
(
JSON
.
stringify
(
row
)
)
==
-
1
)
{
this
.
multipleSelection
.
push
(
row
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
true
);
if
(
authorityList
.
length
!==
0
)
{
if
(
authorityList
[
0
].
superPermission
===
true
)
{
checkArr
.
forEach
(
ele
=>
{
ele
.
value
=
true
ele
.
disabled
=
true
})
}
else
{
this
.
multipleSelection
.
map
((
item
,
index
)
=>
{
if
(
item
.
id
==
row
.
id
)
{
this
.
multipleSelection
.
splice
(
index
,
1
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
false
);
}
});
const
repeatArr
=
authorityList
.
filter
(
authorityItem
=>
{
return
authorityItem
.
resourceUri
===
item
.
id
})
repeatArr
.
forEach
(
element
=>
{
checkArr
.
forEach
(
ele
=>
{
if
(
element
.
operationCode
===
ele
.
id
)
{
ele
.
value
=
true
if
(
this
.
roleId
!==
element
.
subjectId
)
{
ele
.
disabled
=
true
}
}
})
})
}
}
else
{
this
.
multipleSelection
.
push
(
row
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
true
);
}
}
}
if
(
this
.
multipleSelection
.
length
>
0
)
{
this
.
checkNum
=
this
.
multipleSelection
.
length
;
this
.
isCheck
=
true
;
}
else
{
this
.
isCheck
=
false
;
}
},
// 获取人员列表做筛选
adds
(
a
,
rid
)
{
this
.
roleId
=
rid
;
this
.
visible
=
true
;
this
.
usertableData
.
data
=
a
;
this
.
usertableData
.
data
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
selectStatus
===
0
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
this
.
usertableData
.
data
[
index
],
true
);
});
this
.
$set
(
item
,
'checkArr'
,
this
.
$deepCopy
(
checkArr
))
},
// 获取拼接授权信息
getAuthorizedInfo
()
{
const
lastArr
=
[]
const
authorizedList
=
[]
const
wholeArr
=
this
.
$deepCopy
(
this
.
lastMenuList
)
const
arr
=
this
.
$treeConvertToArr
(
wholeArr
)
arr
.
forEach
(
ele
=>
{
ele
.
checkArr
.
forEach
(
val
=>
{
if
(
val
.
value
===
true
&&
val
.
disabled
===
false
)
{
const
obj
=
{
operationCode
:
val
.
id
,
name
:
ele
.
name
,
id
:
ele
.
id
}
lastArr
.
push
(
obj
)
}
})
})
lastArr
.
forEach
(
element
=>
{
authorizedList
.
push
({
operationCode
:
element
.
operationCode
,
// 标识符
productCode
:
this
.
selectedSubsystemCode
,
// 子系统code
resourceCategoryCode
:
this
.
selectedSubsystemCode
+
'_MENU'
,
// 资源类别code默认为MENU
resourceName
:
element
.
name
,
resourceUri
:
element
.
id
,
// 授权菜单id
subjectId
:
this
.
roleId
,
// 授权对象id
subjectType
:
'ROLE'
// 授权对象类别
})
})
this
.
menuprams
=
{
subjectId
:
this
.
roleId
,
authorizedList
:
authorizedList
}
});
},
// 关闭事件
close
()
{
this
.
visible
=
false
;
},
// 保存事件
handleSaveMember
()
{
const
idList
=
this
.
multipleSelection
.
map
((
item
)
=>
{
return
item
.
id
;
});
updateUser
(
this
.
roleId
,
idList
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
$message
.
success
({
message
:
"保存成功"
,
showClose
:
true
});
this
.
visible
=
false
;
// this.$emit("setUsers", this.roleId);
// this.resetMemberConfig();
}
else
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
});
});
},
// 勾选人员事件
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
},
// 勾选菜单事件
handleSelectionChanges
(
val
)
{
this
.
multipleSelection
=
val
;
},
// 获取人员列表做筛选
personlist
(
a
,
rid
)
{
this
.
roleId
=
rid
;
this
.
visible
=
true
;
this
.
usertableData
.
data
=
a
;
this
.
usertableData
.
data
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
selectStatus
===
0
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
this
.
usertableData
.
data
[
index
],
true
);
});
}
});
},
// 关闭事件
close
()
{
this
.
visible
=
false
;
},
// 保存事件
handleSaveMember
()
{
// 人员授权
const
idList
=
this
.
usermultipleSelection
.
map
((
item
)
=>
{
return
item
.
id
;
})
updateUser
(
this
.
roleId
,
idList
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
$message
.
success
({
message
:
"保存成功"
,
showClose
:
true
});
this
.
visible
=
false
;
}
else
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
});
});
// 菜单授权
roleAuthority
(
this
.
menuprams
.
subjectId
,
this
.
menuprams
.
authorizedList
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
$message
.
success
({
message
:
res
.
message
,
})
// this.authorizedContChange()
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
})
}
})
},
// 勾选人员事件
handleSelectionChange
(
val
)
{
this
.
usermultipleSelection
=
val
;
},
// 数据筛选
setarrdata
(
scope
,
arr
)
{
arr
.
forEach
((
item
,
index
,
arr
)
=>
{
if
(
item
.
id
==
scope
.
row
.
id
)
{
this
.
checklistbor
=
[...
arr
]
}
else
if
(
item
.
id
!==
scope
.
row
.
id
&&
item
.
children
)
{
this
.
setarrdata
(
scope
,
item
.
children
)
}
})
},
// 勾选菜单事件
changeCheck
(
flag
,
checkId
,
scope
)
{
this
.
checklistbor
=
[]
this
.
setarrdata
(
scope
,
this
.
lastMenuList
)
const
parents
=
this
.
$findParent
(
this
.
lastMenuList
,
scope
.
row
.
parentId
)
const
childs
=
this
.
$findChildren
(
this
.
lastMenuList
,
scope
.
row
.
id
)
this
.
$setChildArr
(
this
.
lastMenuList
,
scope
.
row
.
id
,
checkId
,
flag
,
this
.
checklistbor
,
parents
,
childs
)
this
.
getAuthorizedInfo
()
},
},
},
};
};
</
script
>
<
style
scoped
lang=
"scss"
>
@import
"~@/styles/mixin.scss"
;
@import
"~@/styles/dialogBox.scss"
;
.editForm
{
/deep/.el-textarea__inner
{
border
:
1px
solid
#224c7c
!important
;
margin
:
0
0
10px
0
!important
;
width
:
100%
!important
;
color
:
#dadde3
!important
;
background
:
transparent
!important
;
@import
"~@/styles/mixin.scss"
;
@import
"~@/styles/dialogBox.scss"
;
.editForm
{
/deep/.el-textarea__inner
{
border
:
1px
solid
#224c7c
!important
;
margin
:
0
0
10px
0
!important
;
width
:
100%
!important
;
color
:
#dadde3
!important
;
background
:
transparent
!important
;
}
/
deep
/
.el-input__inner
{
border
:
1px
solid
#224c7c
!important
;
margin
:
0
!important
;
width
:
100%
!important
;
color
:
#dadde3
!important
;
background
:
transparent
!important
;
}
}
/
deep
/
.el-input__inner
{
border
:
1px
solid
#224c7c
!important
;
margin
:
0
!important
;
width
:
100%
!important
;
color
:
#dadde3
!important
;
background
:
transparent
!important
;
/
deep
/
.el-dialog__body
{
display
:
flex
;
flex-direction
:
column
;
}
}
/
deep
/
.el-dialog__body
{
display
:
flex
;
flex-direction
:
column
;
}
/
deep
/
.el-tabs
{
color
:
#cef8ff
;
}
/
deep
/
.el-tabs
{
color
:
#cef8ff
;
}
.sjmx
{
/deep/.el-tabs__item
{
height
:
50px
;
padding-top
:
6px
;
}
}
.sjmx
{
/
deep
/
.el-tabs__item
{
height
:
50px
;
padding-top
:
6px
;
color
:
#cef8ff
!important
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
center
;
background
:
url("~@/image/tabitem.png")
no-repeat
;
background-size
:
100%
100%
;
border
:
none
!important
;
}
}
/
deep
/
.el-tabs__item
{
color
:
#cef8ff
!important
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
center
;
background
:
url("~@/image/tabitem.png")
no-repeat
;
background-size
:
100%
100%
;
border
:
none
!important
;
}
.obligee-item-name
{
background
:
#05275b
;
color
:
#ffffff
;
background
:
url("~@/image/itembg.png")
no-repeat
;
background-size
:
100%
100%
;
}
/
deep
/
.el-tabs__nav-scroll
{
background
:
none
;
}
/
deep
/
.el-tabs__nav
{
display
:
flex
;
border
:
none
!important
;
}
/
deep
/
.el-tabs__item.is-top
{
border
:
1px
solid
#dfe4ed
;
border-top
:
1px
solid
#dfe4ed
;
border-bottom
:
1px
solid
transparent
;
}
/
deep
/
.el-tabs__header
{
border
:
none
;
margin-bottom
:
0
;
}
/
deep
/
.el-tabs__item.is-top
:not
(
:last-child
)
{
margin-right
:
5px
;
}
/
deep
/
.el-tabs__item.is-top
{
background-color
:
none
!important
;
}
/
deep
/
.el-tabs__item.is-active
{
background
:
url("~@/image/tabitemse.png")
no-repeat
;
background-size
:
100%
100%
;
}
.success-images
{
width
:
30px
;
height
:
30px
;
position
:
relative
;
top
:
10px
;
right
:
3px
;
}
.tab-pane-item
{
line-height
:
20px
;
color
:
#02d9fd
;
p
{
text-align
:
center
;
.obligee-item-name
{
background
:
#05275b
;
color
:
#ffffff
;
background
:
url("~@/image/itembg.png")
no-repeat
;
background-size
:
100%
100%
;
}
}
.edit-content
{
height
:
450px
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
padding-right
:
1px
;
margin-bottom
:
10px
;
border-top
:
none
;
}
/
deep
/
.editDialogBox
{
border-radius
:
8px
;
overflow
:
hidden
;
min-width
:
1228px
;
height
:
825px
!important
;
.dialog-from
{
padding
:
13px
;
border-radius
:
2px
;
box-sizing
:
border-box
;
.el-row
{
display
:
flex
;
flex-wrap
:
nowrap
;
/
deep
/
.el-tabs__nav-scroll
{
background
:
none
;
}
/
deep
/
.el-tabs__nav
{
display
:
flex
;
border
:
none
!important
;
}
/
deep
/
.el-tabs__item.is-top
{
border
:
1px
solid
#dfe4ed
;
border-top
:
1px
solid
#dfe4ed
;
border-bottom
:
1px
solid
transparent
;
}
/
deep
/
.el-tabs__header
{
border
:
none
;
margin-bottom
:
0
;
}
/
deep
/
.el-tabs__item.is-top
:not
(
:last-child
)
{
margin-right
:
5px
;
}
/
deep
/
.el-tabs__item.is-top
{
background-color
:
none
!important
;
}
/
deep
/
.el-tabs__item.is-active
{
background
:
url("~@/image/tabitemse.png")
no-repeat
;
background-size
:
100%
100%
;
}
.success-images
{
width
:
30px
;
height
:
30px
;
position
:
relative
;
top
:
10px
;
right
:
3px
;
}
.tab-pane-item
{
line-height
:
20px
;
color
:
#02d9fd
;
p
{
text-align
:
center
;
}
}
.el-col
{
line-height
:
18px
;
display
:
flex
;
align-items
:
center
;
margin-bottom
:
3px
;
color
:
#b5d6dc
;
.edit-content
{
height
:
450px
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
padding-right
:
1px
;
margin-bottom
:
10px
;
border-top
:
none
;
}
/
deep
/
.editDialogBox
{
border-radius
:
8px
;
overflow
:
hidden
;
min-width
:
1228px
;
height
:
825px
!important
;
.dialog-from
{
padding
:
13px
;
border-radius
:
2px
;
border
:
1px
solid
#224c7c
;
margin
:
5px
;
span
{
display
:
inline-block
;
padding
:
3px
;
border-radius
:
3px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-align
:
left
;
color
:
#02d9fd
;
box-sizing
:
border-box
;
.el-row
{
display
:
flex
;
flex-wrap
:
nowrap
;
}
p
{
flex
:
1
;
width
:
100%
;
padding-left
:
5px
;
line-height
:
20px
;
color
:
#c0c4cc
;
cursor
:
not-allowed
;
white-space
:
nowrap
;
margin-right
:
5px
;
text-align
:
right
;
.el-col
{
line-height
:
18px
;
display
:
flex
;
align-items
:
center
;
margin-bottom
:
3px
;
color
:
#b5d6dc
;
border-radius
:
2px
;
border
:
1px
solid
#224c7c
;
margin
:
5px
;
span
{
display
:
inline-block
;
padding
:
3px
;
border-radius
:
3px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-align
:
left
;
color
:
#02d9fd
;
}
p
{
flex
:
1
;
width
:
100%
;
padding-left
:
5px
;
line-height
:
20px
;
color
:
#c0c4cc
;
cursor
:
not-allowed
;
white-space
:
nowrap
;
margin-right
:
5px
;
text-align
:
right
;
}
}
}
}
.dialog_title
{
display
:
flex
;
position
:
relative
;
font-size
:
24px
;
top
:
-11px
;
width
:
38%
;
height
:
40px
;
margin-left
:
28px
;
justify-content
:
center
;
}
.dialog_title
{
display
:
flex
;
position
:
relative
;
font-size
:
24px
;
top
:
-11px
;
width
:
38%
;
height
:
40px
;
margin-left
:
28px
;
justify-content
:
center
;
}
.el-dialog__header
{
display
:
flex
;
margin-bottom
:
15px
;
}
.el-dialog__header
{
display
:
flex
;
margin-bottom
:
15px
;
}
.dialog_footer
{
flex-direction
:
column
;
.dialog_footer
{
flex-direction
:
column
;
.dialog_button
{
margin-top
:
8px
;
.dialog_button
{
margin-top
:
8px
;
}
}
}
.divider
{
width
:
100%
;
border-bottom
:
1px
solid
#ccc
;
.divider
{
width
:
100%
;
border-bottom
:
1px
solid
#ccc
;
}
}
}
.el-dialog__wrapper
{
overflow
:
hidden
;
}
/
deep
/
.el-table
{
background
:
none
;
th.el-table__cell
{
background-color
:
#073781
;
color
:
#02d9fd
;
.el-dialog__wrapper
{
overflow
:
hidden
;
}
tr
{
/
deep
/
.el-table
{
background
:
none
;
th.el-table__cell
{
background-color
:
#073781
;
color
:
#02d9fd
;
}
tr
{
background
:
none
;
td
{
color
:
white
;
td
{
color
:
white
;
}
}
}
}
//
#08346F
!
important
;
//
#08346F
!
important
;
</
style
>
...
...
Please
register
or
sign in
to post a comment