|
@@ -1,67 +1,57 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
- <div class="container normal-panel mb-16">
|
|
|
|
|
- <el-button v-if="tool.checkAuth($route.name,'update')" size="small" icon="el-icon-edit" @click="$router.replace({path:'/roleEdit',query:{id:roleid}})">编 辑</el-button>
|
|
|
|
|
- <onDel v-if="tool.checkAuth($route.name,'delete')" :data="{roleid:roleid}"></onDel>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="container normal-panel mb-16">
|
|
|
|
|
- <p class="normal-title mb-16">角色信息</p>
|
|
|
|
|
- <el-row>
|
|
|
|
|
- <el-form :inline="true" :model="form" ref="form" size="small" label-position="left" class="demo-form-inline">
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="角色名称:">
|
|
|
|
|
- <p>{{form.rolename}}</p>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
|
+ <basicDetails
|
|
|
|
|
+ ref="details"
|
|
|
|
|
+ :titleText="mainData.rolename"
|
|
|
|
|
+ :oldFormPath="{edit:'HManagement/roleManage/modules'}"
|
|
|
|
|
+ :editData="mainData"
|
|
|
|
|
+ :mainAreaData="mainAreaData"
|
|
|
|
|
+ turnPageId="20221101131902"
|
|
|
|
|
+ idname="roleid"
|
|
|
|
|
+ ownertable="sys_role"
|
|
|
|
|
+ tags=""
|
|
|
|
|
+ :tabs="['授权信息']"
|
|
|
|
|
+ @pageChange="pageChange"
|
|
|
|
|
+ @onEditSuccess="queryMainData($route.query.id)">
|
|
|
|
|
+ <div slot="tags">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div slot="customOperation" >
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="container normal-panel" slot="slot0" >
|
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <tableLayout :layout="tablecols" :data="roleMainInfo.apps" height="500px" :custom="false" @rowClick="appoptionselect">
|
|
|
|
|
+ </tableLayout>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="角色描述:">
|
|
|
|
|
- <p>{{form.remarks}}</p>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
|
+ <el-col :span="11">
|
|
|
|
|
+ <el-row :gutter="40">
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <p class="title">功能</p>
|
|
|
|
|
+ <div class="flex-align-center flex-between option-item" v-for="item in appoptions" :key="item.index">
|
|
|
|
|
+ <p>{{item.optionname}}</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <p class="title">隐藏字段</p>
|
|
|
|
|
+ <div class="flex-align-center flex-between option-item" v-for="item in hiddenfields" :key="item.index">
|
|
|
|
|
+ <p>{{item.fieldname}}</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="角色类型:">
|
|
|
|
|
- <p>{{form.usertypename}}</p>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-form>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="container normal-panel mb-16">
|
|
|
|
|
- <p class="normal-title mb-16">角色授权</p>
|
|
|
|
|
- <el-row :gutter="20">
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <tableLayout :layout="tablecols" :data="roleMainInfo.apps" height="500px" :custom="false" @rowClick="appoptionselect">
|
|
|
|
|
- </tableLayout>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="11">
|
|
|
|
|
- <el-row :gutter="40">
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <p class="title">功能</p>
|
|
|
|
|
- <div class="flex-align-center flex-between option-item" v-for="item in appoptions" :key="item.index">
|
|
|
|
|
- <p>{{item.optionname}}</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <p class="title">隐藏字段</p>
|
|
|
|
|
- <div class="flex-align-center flex-between option-item" v-for="item in hiddenfields" :key="item.index">
|
|
|
|
|
- <p>{{item.fieldname}}</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </basicDetails>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import onDel from './delete_role.vue'
|
|
|
|
|
export default {
|
|
export default {
|
|
|
- components:{
|
|
|
|
|
- onDel
|
|
|
|
|
- },
|
|
|
|
|
- data () {
|
|
|
|
|
- return{
|
|
|
|
|
|
|
+ name: "detail",
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ mainData:{},
|
|
|
|
|
+ mainAreaData:{},
|
|
|
form:{
|
|
form:{
|
|
|
"roleid":0,
|
|
"roleid":0,
|
|
|
"rolename":"",
|
|
"rolename":"",
|
|
@@ -75,17 +65,18 @@ export default {
|
|
|
active_systemappid:''
|
|
active_systemappid:''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- created() {
|
|
|
|
|
|
|
+ components:{
|
|
|
},
|
|
},
|
|
|
methods:{
|
|
methods:{
|
|
|
- async roleMain () {
|
|
|
|
|
|
|
+ async queryMainData(id) {
|
|
|
const res = await this.$api.requested({
|
|
const res = await this.$api.requested({
|
|
|
"classname": "webmanage.role.role",
|
|
"classname": "webmanage.role.role",
|
|
|
"method": "query_roleMain",
|
|
"method": "query_roleMain",
|
|
|
"content": {
|
|
"content": {
|
|
|
- "roleid":this.roleid
|
|
|
|
|
|
|
+ "roleid":this.$route.query.id
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+ this.mainData = res.data
|
|
|
this.form = {
|
|
this.form = {
|
|
|
"roleid":res.data.roleid,
|
|
"roleid":res.data.roleid,
|
|
|
"rolename":res.data.rolename,
|
|
"rolename":res.data.rolename,
|
|
@@ -96,7 +87,36 @@ export default {
|
|
|
this.roleMainInfo = res.data
|
|
this.roleMainInfo = res.data
|
|
|
|
|
|
|
|
//显示默认授权信息,一般默认信息为第一条数据
|
|
//显示默认授权信息,一般默认信息为第一条数据
|
|
|
- this.appoptionselect(res.data.apps[0])
|
|
|
|
|
|
|
+ res.data.apps[0]?this.appoptionselect(res.data.apps[0]):''
|
|
|
|
|
+ this.changeDataStructure()
|
|
|
|
|
+ },
|
|
|
|
|
+ changeDataStructure() {
|
|
|
|
|
+ this.mainAreaData = [
|
|
|
|
|
+ {
|
|
|
|
|
+ label:'角色名称',
|
|
|
|
|
+ value:this.mainData.rolename
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label:'角色描述',
|
|
|
|
|
+ value:this.mainData.remarks
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label:'角色类型',
|
|
|
|
|
+ value:this.mainData.usertypename
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ // 监听切换数据,上一页,下一页
|
|
|
|
|
+ pageChange (id,rowindex,tabIndex) {
|
|
|
|
|
+ this.flag = false
|
|
|
|
|
+ tabIndex = this.$route.query.tabIndex
|
|
|
|
|
+ this.$router.replace({path:'/roleDetail',query:{id:id,rowindex:rowindex,tabIndex:tabIndex}})
|
|
|
|
|
+ this.queryMainData(id)
|
|
|
|
|
+ },
|
|
|
|
|
+ onSuccess(){
|
|
|
|
|
+ this.visible = false
|
|
|
|
|
+ this.queryMainData(this.$route.query.id)
|
|
|
|
|
+ this.$emit('onSuccess')
|
|
|
},
|
|
},
|
|
|
async appoptionselect (row) {
|
|
async appoptionselect (row) {
|
|
|
this.active_systemappid = row.systemappid
|
|
this.active_systemappid = row.systemappid
|
|
@@ -105,17 +125,17 @@ export default {
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
mounted () {
|
|
mounted () {
|
|
|
- // 获取应用表结构
|
|
|
|
|
|
|
+ // 获取应用表结构
|
|
|
this.tablecols = this.tool.tabelCol(this.$route.name).detailsAppsTable.tablecols
|
|
this.tablecols = this.tool.tabelCol(this.$route.name).detailsAppsTable.tablecols
|
|
|
|
|
|
|
|
this.roleid = this.$route.query.id
|
|
this.roleid = this.$route.query.id
|
|
|
- this.roleid !== '0'?this.roleMain():''
|
|
|
|
|
|
|
+ this.roleid !== '0'?this.queryMainData():''
|
|
|
|
|
+ },
|
|
|
|
|
+ created() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
</script>
|
|
</script>
|
|
|
-<style>
|
|
|
|
|
-</style>
|
|
|
|
|
|
|
+
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
.mb-16{
|
|
.mb-16{
|
|
|
margin-bottom:16px
|
|
margin-bottom:16px
|