Commit df061c59 authored by lvweichao's avatar lvweichao

Merge branch 'dev' of https://git.yidian-inc.com:8021/bp/op-web-service into dev

parents 34dfb570 63ae2ba8
<template> <template>
<div> <div>
<!-- <router-view /> --> <!-- <router-view /> -->
<router-view v-slot="{ Component }"> <router-view v-slot="{ Component }">
<keep-alive v-if="$route.meta.keepAlive"> <keep-alive v-if="$route.meta.keepAlive">
<component :is="Component"> </component> <component :is="Component"> </component>
......
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
return row.life_account_type == 1 ? '个人' : '企业' return row.life_account_type == 1 ? '个人' : '企业'
}, },
hasStatusFormat (row) { hasStatusFormat (row) {
return row.life_account_auth_status == 1 ? '正常' : '' return row.life_account_status == 1 ? '正常' : ''
}, },
//获取列表数据 //获取列表数据
getLifeNoListFn () { getLifeNoListFn () {
......
...@@ -9,21 +9,26 @@ ...@@ -9,21 +9,26 @@
<template #label> ID </template> <template #label> ID </template>
{{ life_account.life_account_id }} {{ life_account.life_account_id }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item>
<template #label> 生活号名称 </template>
{{ life_account.life_account_name }}
</el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template #label> 状态 </template> <template #label> 状态 </template>
{{ life_account.life_account_status == 1 ? "上线" : "下线" }}
{{ life_account.life_account_status == 1 ? "正常" : "" }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template #label> 创建人 </template> <template #label> 创建人昵称 </template>
{{ life_account.create_user_nick_name }} {{ life_account.create_user_nick_name }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template #label> 创建时间 </template> <template #label> 创建人账号 </template>
{{ life_account.create_time }} {{ life_account.create_user_mobile }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template #label> 生活号名称 </template> <template #label> 创建时间 </template>
{{ life_account.life_account_name }} {{ life_account.create_time }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
...@@ -31,6 +36,17 @@ ...@@ -31,6 +36,17 @@
<h4 class="titleInfo">类型信息</h4> <h4 class="titleInfo">类型信息</h4>
<el-descriptions :column="3" border> <el-descriptions :column="3" border>
<template #extra> </template> <template #extra> </template>
<div v-if="company_auth_record">
<el-descriptions-item>
<template #label> 统一社会信用代码(注册码) </template>
{{ company_auth_record.code }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 企业注册名称 </template>
{{ company_auth_record.name }}
</el-descriptions-item>
</div>
<div v-else>
<el-descriptions-item> <el-descriptions-item>
<template #label>职业表标签 </template> <template #label>职业表标签 </template>
{{ personal_auth_record.occupation }} {{ personal_auth_record.occupation }}
...@@ -43,15 +59,6 @@ ...@@ -43,15 +59,6 @@
<template #label> 身份证号 </template> <template #label> 身份证号 </template>
{{ personal_auth_record.id_card }} {{ personal_auth_record.id_card }}
</el-descriptions-item> </el-descriptions-item>
<div v-if="company_auth_record">
<el-descriptions-item>
<template #label> 统一社会信用代码(注册码) </template>
{{ company_auth_record.code }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 企业注册名称 </template>
{{ company_auth_record.name }}
</el-descriptions-item>
</div> </div>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
......
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
}, },
getPermissionsAll () { getPermissionsAll () {
// this.user_info = this.$store.state.userInfo // this.user_info = this.$store.state.userInfo
let { email } = this.user_info let { email } = this.$store.state.userInfo
reqGetAll_role_list(email).then(res => { reqGetAll_role_list(email).then(res => {
this.permissionsAll = res this.permissionsAll = res
}) })
...@@ -167,7 +167,7 @@ export default { ...@@ -167,7 +167,7 @@ export default {
}, },
//新增角色 //新增角色
getAdd_role () { getAdd_role () {
if (!this.roleName || !this.currentRolePrivilege) { if (!this.roleName || !this.currentRolePrivilege.length) {
this.checkFn() this.checkFn()
return false return false
} }
...@@ -176,9 +176,14 @@ export default { ...@@ -176,9 +176,14 @@ export default {
permissions: this.currentRolePrivilege permissions: this.currentRolePrivilege
} }
reqGetAdd_role(parmasAdd_role).then(res => { reqGetAdd_role(parmasAdd_role).then(res => {
if (res.status === "success") {
this.dialogFormVisible = false this.dialogFormVisible = false
if (res.status === "success") {
this.getGetRole_list() this.getGetRole_list()
} else {
this.$message({
type: 'info',
message: `${res.reason}`
});
} }
}) })
}, },
...@@ -230,7 +235,7 @@ export default { ...@@ -230,7 +235,7 @@ export default {
}, },
//编辑角色 //编辑角色
getUpdate_role () { getUpdate_role () {
if (!this.roleName || !this.permissionsUpdate) { if (!this.roleName || !this.permissionsUpdate.length) {
this.checkFn() this.checkFn()
return false return false
} }
......
...@@ -22,9 +22,14 @@ ...@@ -22,9 +22,14 @@
<el-button @click="onReset">重置</el-button> <el-button @click="onReset">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form v-if="permission.get('create')"> <el-form>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onCreateRole">创建角色</el-button> <el-button
type="primary"
:disabled="!permission.get('create')"
@click="onCreateRole"
>创建角色</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -62,9 +67,10 @@ ...@@ -62,9 +67,10 @@
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template #default="scope"> <template #default="scope">
<el-button <el-button
v-if=" :disabled="
!(scope.row.role_status == 2 || scope.row.role_status == 3) && !permission.get('edit') ||
permission.get('edit') scope.row.role_status == 2 ||
scope.row.role_status == 3
" "
@click.stop="handelModify(scope.row)" @click.stop="handelModify(scope.row)"
type="text" type="text"
...@@ -72,27 +78,30 @@ ...@@ -72,27 +78,30 @@
>修改</el-button >修改</el-button
> >
<el-button <el-button
v-if="permission.get('delete')" :disabled="!permission.get('delete')"
@click.stop="handelDelete(scope.row)" @click.stop="handelDelete(scope.row)"
size="mini" size="mini"
type="text" type="text"
>删除</el-button >删除</el-button
> >
<el-button <el-button
v-if="permission.get('disable')" :disabled="!permission.get('disable')"
@click.stop="handelDisable(scope.row)" @click.stop="handelDisable(scope.row)"
size="mini" size="mini"
type="text" type="text"
>禁用</el-button >禁用</el-button
> >
<el-button <el-button
v-if="permission.get('enable')" :disabled="!permission.get('enable')"
@click.stop="handelEnable(scope.row)" @click.stop="handelEnable(scope.row)"
size="mini" size="mini"
type="text" type="text"
>启用</el-button >启用</el-button
> >
<el-button @click.stop="toRoleDetail(scope.row)" type="text" <el-button
@click.stop="toRoleDetail(scope.row)"
size="mini"
type="text"
>查看详情</el-button >查看详情</el-button
> >
</template> </template>
...@@ -196,7 +205,7 @@ export default { ...@@ -196,7 +205,7 @@ export default {
this.$router.push({ name: "RoleDetail", query: { roleId: row.role_id } }); this.$router.push({ name: "RoleDetail", query: { roleId: row.role_id } });
}, },
getPermissionsAll () { getPermissionsAll () {
let { email } = this.user_info let { email } = this.$store.state.userInfo
reqGetAll_role_list(email).then(res => { reqGetAll_role_list(email).then(res => {
this.permissionsAll = res this.permissionsAll = res
}) })
...@@ -266,7 +275,6 @@ export default { ...@@ -266,7 +275,6 @@ export default {
role_name, role_name,
} }
this.permissionsUpdate = permissions this.permissionsUpdate = permissions
// let { email } = this.$store.state.userInfo //当前用户
let role_status let role_status
if (type === "disable") { if (type === "disable") {
role_status = 2 role_status = 2
...@@ -356,7 +364,13 @@ export default { ...@@ -356,7 +364,13 @@ export default {
}, },
//确认修改 //确认修改
confirm () { confirm () {
// let { email } = this.$store.state.userInfo if (!this.currentRolePrivilege.length) {
this.$message({
type: 'error',
message: "请选择角色范围"
});
return false
}
let { role_id, role_name } = this.role_info_detail let { role_id, role_name } = this.role_info_detail
let role_status = '' let role_status = ''
this.getUpdate_role(role_name, role_id, role_status, this.currentRolePrivilege) this.getUpdate_role(role_name, role_id, role_status, this.currentRolePrivilege)
......
...@@ -4,14 +4,20 @@ ...@@ -4,14 +4,20 @@
<el-card class="management"> <el-card class="management">
<h5 style="margin-bottom: 10px">角色信息</h5> <h5 style="margin-bottom: 10px">角色信息</h5>
<el-descriptions class="margin-top" :column="2" border> <el-descriptions class="margin-top" :column="2" border>
<el-descriptions-item>
<template #label>状态 </template>
{{ role_info_detail.role_status }}
</el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template #label> ID </template> <template #label> ID </template>
{{ role_info_detail.role_id }} {{ role_info_detail.role_id }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item>
<template #label> 角色状态 </template>
{{
role_info_detail.role_status == 1
? "正常"
: role_info_detail.role_status == 2
? "禁用"
: "删除"
}}
</el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template #label> 角色名称 </template> <template #label> 角色名称 </template>
{{ role_info_detail.role_name }} {{ role_info_detail.role_name }}
...@@ -32,16 +38,6 @@ ...@@ -32,16 +38,6 @@
<template #label> 最后修改时间 </template> <template #label> 最后修改时间 </template>
{{ role_info_detail.update_time }} {{ role_info_detail.update_time }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item>
<template #label> 角色状态 </template>
{{
role_info_detail.role_status == 1
? "正常"
: role_info_detail.role_status == 2
? "禁用"
: "删除"
}}
</el-descriptions-item>
</el-descriptions> </el-descriptions>
<div class="tree" v-if="selectedOptions"> <div class="tree" v-if="selectedOptions">
<h5 style="margin-bottom: 10px">角色范围</h5> <h5 style="margin-bottom: 10px">角色范围</h5>
...@@ -100,9 +96,8 @@ export default { ...@@ -100,9 +96,8 @@ export default {
} }
}, },
activated () { activated () {
// this.user_info = this.$store.state.userInfo
this.roleId = this.$route.query.roleId this.roleId = this.$route.query.roleId
let { email } = this.user_info let { email } = this.$store.state.userInfo
reqGetAll_role_list(email).then(res => { reqGetAll_role_list(email).then(res => {
this.permissionsAll = res this.permissionsAll = res
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment