Commit a36caab5 authored by lvweichao's avatar lvweichao

Merge remote-tracking branch 'origin/dev'

parents bcc1c504 8f760415
...@@ -51,8 +51,6 @@ exports.getUpdate_role = async (ctx, next) => { ...@@ -51,8 +51,6 @@ exports.getUpdate_role = async (ctx, next) => {
json: true, json: true,
body: ctx.request.body body: ctx.request.body
} }
console.log(opts, 'optsoptsoptsopts888888')
console.log(ctx.request.query, 'pppp')
ctx.body = await req(ctx, opts) ctx.body = await req(ctx, opts)
} }
exports.getDelete_role = async (ctx, next) => { exports.getDelete_role = async (ctx, next) => {
......
...@@ -38,7 +38,6 @@ export const PAGEMODULE_PERMISSIONNAME = { ...@@ -38,7 +38,6 @@ export const PAGEMODULE_PERMISSIONNAME = {
enterprise: 'enterprise_certification_management', enterprise: 'enterprise_certification_management',
lifeNo: 'life_official_account_management', lifeNo: 'life_official_account_management',
role: 'role_management', role: 'role_management',
// roleAddRole: 'role_addRole',
user: 'user_management' user: 'user_management'
} }
...@@ -60,6 +59,5 @@ export const PATH_PERMISSION_NAME = { ...@@ -60,6 +59,5 @@ export const PATH_PERMISSION_NAME = {
'/enterprise/establish': 'enterprise_certification_management.create', '/enterprise/establish': 'enterprise_certification_management.create',
'/lifeNo': 'life_official_account_management', '/lifeNo': 'life_official_account_management',
'/roleManageRole': 'role_management', '/roleManageRole': 'role_management',
// '/roleAddRole': 'role_addRole',
'/user': 'user_management' '/user': 'user_management'
} }
\ No newline at end of file
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
<layout> <layout>
<div class="life-no"> <div class="life-no">
<el-form :inline="true" :model="formInline" class="demo-form-inline"> <el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="生活号名称/企业名称"> <el-form-item label="生活号名称">
<el-input <el-input
class="search_life" class="search_life"
maxlength="15" maxlength="15"
v-model="life_account.name" v-model="life_account.name"
placeholder="生活号名称/企业名称" placeholder="生活号名称"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="类型"> <el-form-item label="类型">
...@@ -22,20 +22,25 @@ ...@@ -22,20 +22,25 @@
<el-button @click="onReset">重置</el-button> <el-button @click="onReset">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table :data="LifeNoList" border style="width: 100%">
:data="LifeNoList"
border
style="width: 100%"
@row-click="toLifeDetail"
>
<el-table-column prop="life_account_id" label="ID"> </el-table-column> <el-table-column prop="life_account_id" label="ID"> </el-table-column>
<el-table-column prop="life_account_name" label="生活号名称"> <el-table-column prop="life_account_name" label="生活号名称">
</el-table-column> </el-table-column>
<el-table-column prop="life_account_type" label="类型"> <el-table-column :formatter="hasTypeFormat" label="类型">
</el-table-column> </el-table-column>
<el-table-column prop="life_account_auth_status" label="状态"> <el-table-column :formatter="hasStatusFormat" label="状态">
</el-table-column> </el-table-column>
<el-table-column prop="create_time" label="创建时间"> </el-table-column> <el-table-column prop="create_time" label="创建时间"> </el-table-column>
<el-table-column label="操作">
<template #default="scope">
<el-button
size="mini"
type="primary"
@click.stop="toLifeDetail(scope.row)"
>查看详情</el-button
>
</template>
</el-table-column>
</el-table> </el-table>
<page :totalNum="totalNum" @update="update" /> <page :totalNum="totalNum" @update="update" />
</div> </div>
...@@ -75,6 +80,12 @@ export default { ...@@ -75,6 +80,12 @@ export default {
this.getLifeNoListFn() this.getLifeNoListFn()
}, },
methods: { methods: {
hasTypeFormat (row) {
return row.life_account_type == 1 ? '个人' : '企业'
},
hasStatusFormat (row) {
return row.life_account_auth_status == 1 ? '正常' : ''
},
//获取列表数据 //获取列表数据
getLifeNoListFn () { getLifeNoListFn () {
let { name, type } = this.life_account let { name, type } = this.life_account
......
<template> <template>
<div class="life-no-detail"> <div class="life-no-detail">
<el-button type="text" @click="goBack" icon="el-icon-arrow-left" <el-page-header @back="goBack" content="生活号详情页面"> </el-page-header>
>返回</el-button
>
<el-card class="management"> <el-card class="management">
<h4 class="titleInfo">生活号信息</h4> <h4 class="titleInfo">生活号信息</h4>
<el-descriptions :column="3" border> <el-descriptions :column="3" border>
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
style="width: 100%; margin-top: 10px" style="width: 100%; margin-top: 10px"
:header-cell-style="{ background: '#e1e4e5', color: '#80878f' }" :header-cell-style="{ background: '#e1e4e5', color: '#80878f' }"
border border
@row-click="toRoleDetail"
> >
<el-table-column prop="role_name" label="角色名称" width="180"> <el-table-column prop="role_name" label="角色名称" width="180">
</el-table-column> </el-table-column>
...@@ -23,6 +22,12 @@ ...@@ -23,6 +22,12 @@
@click.stop="handleModify(scope.$index, scope.row)" @click.stop="handleModify(scope.$index, scope.row)"
>修改</el-button >修改</el-button
> >
<el-button
size="mini"
type="primary"
@click.stop="toRoleDetail(scope.row)"
>查看详情</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -119,7 +124,6 @@ export default { ...@@ -119,7 +124,6 @@ export default {
created () { created () {
this.getGetRole_list() this.getGetRole_list()
this.getPermissionsAll() this.getPermissionsAll()
}, },
methods: { methods: {
toRoleDetail (row) { toRoleDetail (row) {
...@@ -242,6 +246,12 @@ export default { ...@@ -242,6 +246,12 @@ export default {
this.dialogFormVisible = false this.dialogFormVisible = false
this.edit = true this.edit = true
this.getGetRole_list() this.getGetRole_list()
} else {
this.dialogFormVisible = false
this.$message({
type: 'info',
message: `${res.reason}`
});
} }
}) })
}, },
......
...@@ -30,9 +30,10 @@ ...@@ -30,9 +30,10 @@
</div> </div>
<!-- 角色搜索列表 --> <!-- 角色搜索列表 -->
<el-table border :data="managementList" @row-click="toRoleDetail"> <el-table border :data="managementList">
<el-table-column <el-table-column
label="ID" label="ID"
width="200px"
prop="role_id" prop="role_id"
align="center" align="center"
></el-table-column> ></el-table-column>
...@@ -43,6 +44,7 @@ ...@@ -43,6 +44,7 @@
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="状态" label="状态"
width="200px"
:formatter="hasStatusFormat" :formatter="hasStatusFormat"
align="center" align="center"
> >
...@@ -64,32 +66,35 @@ ...@@ -64,32 +66,35 @@
!(scope.row.role_status == 2 || scope.row.role_status == 3) && !(scope.row.role_status == 2 || scope.row.role_status == 3) &&
permission.get('edit') permission.get('edit')
" "
size="mini"
@click.stop="handelModify(scope.row)" @click.stop="handelModify(scope.row)"
type="primary" type="text"
size="mini"
>修改</el-button >修改</el-button
> >
<el-button <el-button
size="mini"
v-if="permission.get('delete')" v-if="permission.get('delete')"
@click.stop="handelDelete(scope.row)" @click.stop="handelDelete(scope.row)"
type="warning" size="mini"
type="text"
>删除</el-button >删除</el-button
> >
<el-button <el-button
size="mini"
v-if="permission.get('disable')" v-if="permission.get('disable')"
@click.stop="handelDisable(scope.row)" @click.stop="handelDisable(scope.row)"
type="danger" size="mini"
type="text"
>禁用</el-button >禁用</el-button
> >
<el-button <el-button
size="mini"
v-if="permission.get('enable')" v-if="permission.get('enable')"
@click.stop="handelEnable(scope.row)" @click.stop="handelEnable(scope.row)"
type="success" size="mini"
type="text"
>启用</el-button >启用</el-button
> >
<el-button @click.stop="toRoleDetail(scope.row)" type="text"
>查看详情</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -188,7 +193,7 @@ export default { ...@@ -188,7 +193,7 @@ export default {
this.$router.push({ name: 'AddRole' }); this.$router.push({ name: 'AddRole' });
}, },
toRoleDetail (row) { toRoleDetail (row) {
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.user_info
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
></el-cascader> ></el-cascader>
</div> </div>
</div> </div>
<div v-if="role_info_detail.role_account_list.length > 0"> <div v-if="role_info_detail.role_account_list.length">
<h5 style="margin: 10px 0">角色账号</h5> <h5 style="margin: 10px 0">角色账号</h5>
<div <div
class="role_account_list" class="role_account_list"
......
...@@ -5,7 +5,8 @@ import { PERMISSIONNAME_PAGEMODULE } from '../config/pageconfig' ...@@ -5,7 +5,8 @@ import { PERMISSIONNAME_PAGEMODULE } from '../config/pageconfig'
export default createStore({ export default createStore({
state: { state: {
permissions: null, permissions: null,
userInfo: null, userInfo: null
}, },
mutations: { mutations: {
updateUserPermission (state, payload) { updateUserPermission (state, payload) {
...@@ -18,6 +19,7 @@ export default createStore({ ...@@ -18,6 +19,7 @@ export default createStore({
actions: { actions: {
async updateUserPermission ({ commit }, payload) { async updateUserPermission ({ commit }, payload) {
const { permissions = [] } = await getPermissions(payload.email); const { permissions = [] } = await getPermissions(payload.email);
console.log("VUEX action updateUserPermission::", permissions); console.log("VUEX action updateUserPermission::", permissions);
commit('updateUserPermission', permissions) commit('updateUserPermission', permissions)
} }
......
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