diff --git a/epmet-oper-web/src/components/wx-index/cpt-item.vue b/epmet-oper-web/src/components/wx-index/cpt-item.vue
index af23135..93ea869 100644
--- a/epmet-oper-web/src/components/wx-index/cpt-item.vue
+++ b/epmet-oper-web/src/components/wx-index/cpt-item.vue
@@ -76,6 +76,29 @@
+
+
@@ -131,6 +138,7 @@ import MostList from './MostList'
import RoleList from './roleList'
import categoryList from './CategoryList'
import StartPage from './StartPage'
+import RoleAuth from './RoleAuth'
export default {
data () {
return {
@@ -159,7 +167,8 @@ export default {
FootbarList,
MostList,
categoryList,
- StartPage
+ StartPage,
+ RoleAuth
},
activated () {
if (this.showType === 'footbar') {
@@ -255,6 +264,12 @@ export default {
// this.$message.warning("当前功能还未开发");
},
+ // 显示权限配置
+ showRoleAuth (customerId, customerName) {
+ this.showType = 'roleAuth'
+ this.$refs['ref_roleAuth'].initData(customerId, customerName)
+ },
+
// 启动页配置
showStartPage (customerId, customerName) {
this.showType = 'startPage'
diff --git a/epmet-oper-web/src/views/modules/customer/customize/RoleAuth.vue b/epmet-oper-web/src/views/modules/customer/customize/RoleAuth.vue
new file mode 100644
index 0000000..40f0b3d
--- /dev/null
+++ b/epmet-oper-web/src/views/modules/customer/customize/RoleAuth.vue
@@ -0,0 +1,540 @@
+
+
+
+
+ {{customerName}}
+ 取消返回
+
+
+
+
+
+ 上下拖动可改变角色顺序
+ 保存顺序
+
+
+
+
+
+
+
+ {{scope.row.constName}}
+
+
+
+
+
+
+ {{item}}
+
+
+
+
+
+
+ 恢复默认
+ 修改职责
+ 功能权限
+
+
+ 保存
+ 取消
+
+ 修改名称
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 当前角色: {{roleName}}
+
+ 保存功能
+
+
+
+
+
+
+
+
+ 范围配置
+
+
+
+
+
+ 当前功能: {{funcName}}
+
+ 保存范围
+
+
+
+
+
+
+ {{scope.scopeName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/epmet-oper-web/src/views/modules/customer/customize/roleList.vue b/epmet-oper-web/src/views/modules/customer/customize/roleList.vue
index d753486..8a73e0d 100644
--- a/epmet-oper-web/src/views/modules/customer/customize/roleList.vue
+++ b/epmet-oper-web/src/views/modules/customer/customize/roleList.vue
@@ -278,6 +278,9 @@ export default {
handleSelectionChange (val) {
this.saveOperations4Role(val)
},
+
+
+
handleChangeName (row) {
row.isEdit = true
},
diff --git a/epmet-oper-web/src/views/modules/productConfig/workRoleAuth.vue b/epmet-oper-web/src/views/modules/productConfig/workRoleAuth.vue
index 2c0ae87..04475ec 100644
--- a/epmet-oper-web/src/views/modules/productConfig/workRoleAuth.vue
+++ b/epmet-oper-web/src/views/modules/productConfig/workRoleAuth.vue
@@ -19,14 +19,13 @@
border
style="width: 100%">
-
+ header-align="left"
+ align="left">
- {{scope.row.description}}
+ {{item}}
+
修改职责
+ @click="handelChangeDuty(scope.row)">修改职责
功能权限
@@ -66,7 +68,7 @@
style="display: inline-block; margin-left: 10px;">
保存
+ @click="saveName(scope.row)">保存
取消
@@ -99,7 +101,7 @@
保存
+ @click="updateRole()">保存
取消
@@ -201,6 +203,7 @@ export default {
//职责弹出框相关
dutyShow: false,
description: '',
+ roleName: '',
//功能权限弹出框相关
funcShow: false,
@@ -220,7 +223,7 @@ export default {
}
},
created () {
- this.listRolesByCustomerId()
+ this.listRoles()
},
mounted () {
this.dragRoleSort()
@@ -239,7 +242,7 @@ export default {
},
//获取角色列表
- listRolesByCustomerId () {
+ listRoles () {
this.loading1 = true
this.$http
.post('/epmetuser/govstaffrole/roletemplates')
@@ -250,7 +253,8 @@ export default {
return {
...item,
constName: item.roleName,
- isEdit: false
+ isEdit: false,
+ descriptionList: item.description.split("\n")
}
})
console.log('roleList', this.roleList)
@@ -264,39 +268,45 @@ export default {
//关闭角色职责弹出框
handleDutyClosed () {
this.selRoleId = ''
+ this.roleName = ''
this.description = ''
this.dutyShow = false
},
//显示角色职责弹出框
- handelChangeDuty (roleId, description) {
- this.selRoleId = roleId
- this.description = description
+ handelChangeDuty (row) {
+ this.selRoleId = row.id
+ this.description = row.description
+ this.roleName = row.roleName
this.dutyShow = true
},
+ handleChangeName (row) {
+ row.isEdit = true
+ },
+ saveName (row) {
+ this.selRoleId = row.id
+ this.description = row.description
+ this.roleName = row.roleName
+ this.updateRole()
+ },
- //保存角色职责
- async saveDuty () {
+ //保存角色名称、职责
+ async updateRole () {
console.log(this.description)
- const url = "/gov/access/govcustomermenu/getcustomerids"
- // const params = {
- // tableId: this.tableId
- // }
- // const { data, code, msg } = await requestPost(url, params)
- // if (code === 0) {
- // this.menuList = data
-
- // this.menuList.forEach(element => {
- // if (this.customerIdList.indexOf(element) > -1) {
- // this.menuListShow.push(element)
- // }
- // });
-
- // this.handleCheckedCitiesChange(this.menuListShow)
+ const url = "/epmetuser/govstaffrole/updatedefaultrole"
+ const params = {
+ roleId: this.selRoleId,
+ roleName: this.roleName,
+ description: this.description
+ }
+ const { data, code, msg } = await requestPost(url, params)
+ if (code === 0) {
+ this.dutyShow = false
+ this.listRoles()
- // } else {
- // this.$message.error(msg)
- // }
+ } else {
+ this.$message.error(msg)
+ }
},
//关闭功能配置弹出框
handleDialogClosed () {
@@ -426,32 +436,7 @@ export default {
this.operateSection = val
// this.saveOperations4Role(val)
},
- handleChangeName (row) {
- row.isEdit = true
- },
- handleSaveChange (row) {
- let data = {
- roleKey: row.roleKey,
- roleName: row.roleName
- }
- this.$http
- .post('/epmetuser/govstaffrole/update-role', data)
- .then(({ data: res }) => {
- console.log('ressss', res)
- if (res.code === 0 && res.msg === 'success') {
- this.$message({
- type: 'success',
- message: '保存成功'
- })
- this.listRolesByCustomerId(this.customerId)
- } else {
- this.$message({
- type: 'error',
- message: res.msg
- })
- }
- })
- },
+
dragRoleSort () {
const el = this.$refs.roleTable.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
this.sortTable = Sortable.create(el, {
@@ -473,11 +458,11 @@ export default {
handleSaveSort () {
let data = {
roleIdList: this.roleList.map(item => {
- return item.roleKey
+ return item.id
})
}
this.$http
- .post('/epmetuser/govstaffrole/save-sortorder', data)
+ .post('/epmetuser/govstaffrole/savedefaultsort', data)
.then(({ data: res }) => {
console.log('ressss', res)
if (res.code === 0 && res.msg === 'success') {
@@ -485,7 +470,7 @@ export default {
type: 'success',
message: '保存成功'
})
- this.listRolesByCustomerId(this.customerId)
+ this.listRoles()
} else {
this.$message({
type: 'error',
@@ -498,7 +483,7 @@ export default {
}
-