diff --git a/src/assets/styles/mixins.less b/src/assets/styles/mixins.less
index 07fee2f0a..c7564f51d 100644
--- a/src/assets/styles/mixins.less
+++ b/src/assets/styles/mixins.less
@@ -3,7 +3,12 @@
* @author: xx
* @date: 2018-09-01 15:11:57
*/
-
+/deep/.el-tree-node:focus > .el-tree-node__content {
+ color: #409EFF !important;
+}
+.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
+ color: #409EFF !important;
+}
.ellipsis () {
overflow: hidden;
white-space: nowrap;
diff --git a/src/components/navMenu/index.vue b/src/components/navMenu/index.vue
index 6e8bffd28..a11e76a7f 100644
--- a/src/components/navMenu/index.vue
+++ b/src/components/navMenu/index.vue
@@ -385,7 +385,7 @@ export default {
{
title: '我的板块',
path: '/plate',
- menuId: '971d576ef9bce3bddd6f0d6bcc55d184'
+ menuId: 'e4a94f03223df6f4ad70732b96f07221'
}
// {
// title: '个人信息',
diff --git a/src/pages/config/pages/mechanismManage/index.vue b/src/pages/config/pages/mechanismManage/index.vue
index 62f774fbc..5b17d5bd9 100644
--- a/src/pages/config/pages/mechanismManage/index.vue
+++ b/src/pages/config/pages/mechanismManage/index.vue
@@ -13,7 +13,9 @@
:props="defaultProps"
default-expand-all
:filter-node-method="filterNode"
+ highlight-current
ref="tree"
+ :expand-on-click-node="false"
@node-click="handleNodeClick">
@@ -109,8 +111,10 @@
:props="props"
:data="postList"
:default-checked-keys="nodeList"
+ highlight-current
check-strictly
default-expand-all
+ :expand-on-click-node="false"
show-checkbox>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
@@ -139,6 +235,24 @@ export default {
name: 'role-manage',
data () {
return {
+ type: '', // 新增/编辑状态
+ addRoleTitle: '',
+ SuperiorRoleData: {},
+ nodeList3: [],
+ SuperiorRoleModel: false,
+ addFormRules: {
+ name: [
+ { required: true, message: '请输入角色名称', trigger: 'blur' }
+ ]
+ },
+ addForm: {
+ name: '', // 角色名称
+ parentId: '', // 上级ID
+ remarks: '', // 角色描述
+ parent: '',
+ id: ''
+ },
+ addModel: false,
treeData3: [],
defaultProps3: {
children: 'children',
@@ -167,6 +281,116 @@ export default {
}
},
methods: {
+ handleCommand (command) {
+ switch (command[1]) {
+ case '编辑':
+ this.RolesAdd(0, command[0])
+ break
+ case '删除':
+ this.deleteRole(command[0])
+ break
+ }
+ },
+ deleteRole (row) { // 删除角色
+ this.$confirm('此操作将永久删除该角色, 是否继续?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.$http.delete('sarRole/role', {
+ roleId: row.id
+ }, {}, res => {
+ if (res.ok) {
+ this.$message({
+ type: 'success',
+ message: '删除成功!'
+ });
+ this.getTree()
+ }
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '已取消删除'
+ });
+ });
+ },
+ drawerCheck (data) {
+ var getlist = this.$refs.tree4.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
+ if(getlist.length == 1) {
+ }else {
+ this.$refs.tree4.setCheckedKeys([data.id]);
+ }
+ this.SuperiorRoleData = data
+ },
+ SuperiorRoleOk () { // 上级角色确定
+ this.addForm.parentId = this.SuperiorRoleData.id
+ this.addForm.parent = this.SuperiorRoleData.name
+ this.nodeList3 = []
+ this.nodeList3.push(this.addForm.parentId)
+ this.SuperiorRoleModel = false
+ },
+ SuperiorRoleCancle () { // 上级角色取消
+ this.SuperiorRoleModel = false
+ },
+ AddRoleCancel () { // 新增角色取消
+ this.$refs['addForm'].resetFields();
+ this.addModel = false
+ },
+ AddRoleOk () { // 新增角色确定
+ this.$refs['addForm'].validate((valid) => {
+ if (valid) {
+ if (this.type === 1) { // 新增
+ this.$http.postData('sarRole/role',this.addForm , {}, res=> {
+ if (res.ok) {
+ this.$message.success('新增角色成功')
+ this.addModel = false
+ this.getTree()
+ } else {
+ this.$message.warning(res.message)
+ this.addModel = false
+ }
+ })
+ } else { // 编辑
+ this.$http.putData('sarRole/role',this.addForm , {}, res=> {
+ if (res.ok) {
+ this.$message.success('修改角色信息成功')
+ this.addModel = false
+ this.getTree()
+ } else {
+ this.$message.warning(res.message)
+ this.addModel = false
+ }
+ })
+ }
+ }
+ })
+ this.addModel = false
+ },
+ SuperiorRole () { // 点击选择上级角色按钮
+ this.SuperiorRoleModel = true
+ },
+ RolesAdd (type, row) { // 新增/编辑角色按钮
+ this.type = type
+ if (type === 1) {
+ this.addRoleTitle = '新增角色'
+ this.addForm.name = ''
+ this.addForm.remarks = ''
+ this.addForm.parentId = ''
+ this.addForm.parent = ''
+ this.addForm.id = ''
+ } else {
+ this.addRoleTitle = '编辑角色'
+ this.addForm.name = row.name
+ this.addForm.remarks = row.remarks
+ this.addForm.parentId = row.parentId
+ this.addForm.parent = row.parent
+ this.addForm.id = row.id
+ this.nodeList3 = []
+ this.nodeList3.push(this.addForm.parentId)
+ }
+ this.addModel = true
+ },
getTree3 () {
this.$http.get('sarResource/ts-resource', {}, {}, res=> {
if (res.ok) {
@@ -282,6 +506,12 @@ export default {
.role-manage {
display: flex;
height: 100%;
+ /deep/.el-form-item__content {
+ width: 100%;
+ }
+ .filter-tree1 {
+ height: 100%;
+ }
.tree-close{
.tree{
left: -200px !important;
diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue
index c65ce2dc3..e94153470 100644
--- a/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue
+++ b/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue
@@ -174,6 +174,7 @@
check-strictly
@check="drawerCheck"
default-expand-all
+ :expand-on-click-node="false"
show-checkbox
ref="tree">