合并冲突
This commit is contained in:
@@ -902,3 +902,7 @@ tr.el-table__row{
|
|||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.filter-tree-input {
|
||||||
|
margin: 10px;
|
||||||
|
width: calc(~'100% - 20px');
|
||||||
|
}
|
||||||
|
|||||||
@@ -269,16 +269,21 @@ export default {
|
|||||||
// path: '/dynamicInformationManage',
|
// path: '/dynamicInformationManage',
|
||||||
// menuId: '6V2QZ9STRZ'
|
// menuId: '6V2QZ9STRZ'
|
||||||
// },
|
// },
|
||||||
// {
|
{
|
||||||
// title: '机构管理',
|
title: '机构管理',
|
||||||
// path: '/MechanismManage',
|
path: '/MechanismManage',
|
||||||
// menuId: '7MWCQK6NNH'
|
menuId: '7MWCQK6NNH'
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// title: '角色管理',
|
title: '角色管理',
|
||||||
// path: '/roleManage',
|
path: '/roleManage',
|
||||||
// menuId: 'NVU76EMB7N'
|
menuId: 'NVU76EMB7N'
|
||||||
// },
|
},
|
||||||
|
{
|
||||||
|
title: '岗位管理',
|
||||||
|
path: '/postManage',
|
||||||
|
menuid: ''
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// title: '用户管理',
|
// title: '用户管理',
|
||||||
// path: '/userManage',
|
// path: '/userManage',
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,210 @@
|
|||||||
|
<!-- 配置管理 - 岗位管理 -->
|
||||||
|
<template>
|
||||||
|
<div id="post-manage">
|
||||||
|
<div class="action-bar">
|
||||||
|
<el-button type="primary"
|
||||||
|
class="common-button-primary add-button"
|
||||||
|
@click="addModal"
|
||||||
|
size="mini">新增</el-button>
|
||||||
|
<el-button type="primary"
|
||||||
|
class="common-button-primary add-button"
|
||||||
|
@click="addRole"
|
||||||
|
size="mini">配置角色</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<el-table
|
||||||
|
ref="multipleTable"
|
||||||
|
:data="data"
|
||||||
|
tooltip-effect="dark"
|
||||||
|
border
|
||||||
|
style="width: 100%; flex: auto;"
|
||||||
|
class="drag-table"
|
||||||
|
height="100%"
|
||||||
|
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
|
||||||
|
fontWeight: 'bold', height: '48px'}"
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55"
|
||||||
|
align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="岗位名称"
|
||||||
|
width="170px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop=""
|
||||||
|
label="绑定角色">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="operator"
|
||||||
|
label="操作人"
|
||||||
|
width="170px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
label="操作时间"
|
||||||
|
width="170px">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<loading :loading="Loading">加载中...</loading>
|
||||||
|
<el-dialog
|
||||||
|
title="新增岗位"
|
||||||
|
:visible.sync="modalshowflag"
|
||||||
|
:wrapperClosable="false"
|
||||||
|
size="800px"
|
||||||
|
@close="resetForm"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="sarStandardsInfoForm"
|
||||||
|
:model="sarStandardsInfoEO"
|
||||||
|
:rules="sarStandardsInfoRules"
|
||||||
|
class="label-input-form"
|
||||||
|
>
|
||||||
|
<el-form-item label="岗位名称" prop="name" label-width="150px" class="add-form-item">
|
||||||
|
<el-input v-model="sarStandardsInfoEO.name"
|
||||||
|
placeholder="请输入岗位名称"
|
||||||
|
clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="demo-drawer-footer">
|
||||||
|
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="resetForm">取消</el-button>
|
||||||
|
<el-button type="primary" size="mini" class="common-button-primary" icon="el-icon-check" @click="submit">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
<el-drawer
|
||||||
|
title="配置角色"
|
||||||
|
:visible.sync="modalRole"
|
||||||
|
:wrapperClosable="false"
|
||||||
|
size="800px"
|
||||||
|
@close="resetFormRole"
|
||||||
|
>
|
||||||
|
<el-tree
|
||||||
|
ref="tree"
|
||||||
|
node-key="id"
|
||||||
|
class="filter-tree"
|
||||||
|
v-if="modalRole"
|
||||||
|
:props="props"
|
||||||
|
:data="roleList"
|
||||||
|
show-checkbox
|
||||||
|
@check="handleCheckChange">
|
||||||
|
</el-tree>
|
||||||
|
<el-button @click="add"></el-button>
|
||||||
|
</el-drawer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'PostManage',
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
selectList: [],
|
||||||
|
data: [],
|
||||||
|
Loading: false,
|
||||||
|
modalshowflag: false,
|
||||||
|
sarStandardsInfoEO: {
|
||||||
|
name: ''
|
||||||
|
},
|
||||||
|
sarStandardsInfoRules: {
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '请输入岗位名称', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
modalRole: false,
|
||||||
|
roleList: [],
|
||||||
|
props: {
|
||||||
|
label: 'name',
|
||||||
|
children: 'children'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
console.log(this.$refs.tree.getCheckedNodes());
|
||||||
|
console.log(this.$refs.tree.getCheckedKeys());
|
||||||
|
},
|
||||||
|
handleCheckChange (checkedNodes, checkedKeys) {
|
||||||
|
var list = []
|
||||||
|
for (var a = 0; a < checkedKeys.checkedNodes.length; a++) {
|
||||||
|
list.push(checkedKeys.checkedNodes[a].id)
|
||||||
|
}
|
||||||
|
console.log(list);
|
||||||
|
},
|
||||||
|
getRole () {
|
||||||
|
this.$http.get('sarRole/role', {}, {}, res=> {
|
||||||
|
this.roleList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSelectionChange (val) { // 选中角色
|
||||||
|
this.selectList = val
|
||||||
|
},
|
||||||
|
addRole () { // 点击配置角色按钮
|
||||||
|
if (this.selectList.length > 0) {
|
||||||
|
this.modalRole = true
|
||||||
|
} else {
|
||||||
|
this.$message.warning('请选择要配置角色的岗位')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getData () { // 获取岗位数据
|
||||||
|
this.$http.get('sarPosition/position', {}, {
|
||||||
|
_this: this,
|
||||||
|
loading: 'Loading'
|
||||||
|
}, res=> {
|
||||||
|
this.data = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addModal () { // 点击新增按钮
|
||||||
|
this.modalshowflag = true
|
||||||
|
},
|
||||||
|
resetForm () { // 新增岗位关闭事件
|
||||||
|
this.$refs['sarStandardsInfoForm'].resetFields();
|
||||||
|
this.modalshowflag = false
|
||||||
|
},
|
||||||
|
resetFormRole () { // 配置角色关闭事件
|
||||||
|
},
|
||||||
|
submit () { // 新增角色确认
|
||||||
|
this.$refs['sarStandardsInfoForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$http.post('sarPosition/position', {
|
||||||
|
createById: this.$store.getters.userInfo.userId,
|
||||||
|
operator: this.$store.getters.userInfo.account,
|
||||||
|
name: this.sarStandardsInfoEO.name
|
||||||
|
}, {
|
||||||
|
_this: this,
|
||||||
|
loading: 'Loading'
|
||||||
|
}, res=> {
|
||||||
|
if (res.ok) {
|
||||||
|
this.$message.success('新增成功')
|
||||||
|
this.modalshowflag = false
|
||||||
|
this.getData()
|
||||||
|
} else {
|
||||||
|
this.$message.warning('新增失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
mounted () {
|
||||||
|
this.getData()
|
||||||
|
this.getRole()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
@import '~@/assets/styles/mixins';
|
||||||
|
#post-manage {
|
||||||
|
height: 100%;
|
||||||
|
.content {
|
||||||
|
height: calc(~'100% - 53px')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -950,6 +950,17 @@ const routes = [
|
|||||||
menuId: '7MWCQK6NNH'
|
menuId: '7MWCQK6NNH'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/postManage',
|
||||||
|
name: 'postManage',
|
||||||
|
component: () =>
|
||||||
|
import('@/pages/config/pages/postManage/index'),
|
||||||
|
meta: {
|
||||||
|
requireAuth: true,
|
||||||
|
title: '岗位管理',
|
||||||
|
menuId: '7MWCQK6NNH'
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/roleManage',
|
path: '/roleManage',
|
||||||
name: 'RoleManage',
|
name: 'RoleManage',
|
||||||
|
|||||||
Reference in New Issue
Block a user