Commit a2d2f863 authored by lvweichao's avatar lvweichao

Merge branch 'dev'

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