Compare commits
6 Commits
99b507657f
...
44f11be05c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44f11be05c | ||
|
|
7a21ab3804 | ||
|
|
6bb4802f15 | ||
|
|
cfc8f3c8e0 | ||
|
|
3f26b8b6df | ||
|
|
350ca644cf |
@@ -100,7 +100,7 @@ export default {
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
<ai-dialog v-model="dialog" title="认证材料" width="50vw" @close="userId='',getTableData()"
|
||||
<ai-dialog v-model="dialog" title="场地配置" width="50vw" @close="userId='',getTableData()"
|
||||
@open="getTreeData" customFooter>
|
||||
<el-button class="mar-b8" type="primary" @click="createNode(treeData)">新增根节点</el-button>
|
||||
<el-tree :data="treeData" :props="{label:'name'}" default-expand-all>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<el-form-item required label="行政区划" prop="areaId">
|
||||
<ai-area-get v-model.trim="dialogForm.areaId" placeholder="请选择" :instance="instance"/>
|
||||
</el-form-item>
|
||||
<el-form-item required label="账户" prop="userName">
|
||||
<el-form-item required label="账号" prop="userName">
|
||||
<el-input v-model.trim="dialogForm.userName" placeholder="请输入..." clearable :maxLength="15"/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item required label="账号密码" prop="password" v-if="!isEdit" :rules="[{ required: true, message: '请输入密码' }]">-->
|
||||
@@ -87,7 +87,7 @@ export default {
|
||||
return !!this.dialogForm.id
|
||||
},
|
||||
dialogTitle() {
|
||||
return this.isEdit ? '功能分配' : '添加账号'
|
||||
return this.isEdit ? '编辑账号' : '添加账号'
|
||||
},
|
||||
colConfigs() {
|
||||
return [
|
||||
|
||||
@@ -35,23 +35,12 @@
|
||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict"
|
||||
@selection-change="v=>multipleSelection=v">
|
||||
<el-table-column label="角色用户" slot="users" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip
|
||||
effect="light"
|
||||
placement="top"
|
||||
:disabled="scope.row.users.length <= 2"
|
||||
content="更多角色用户请点击详情按钮">
|
||||
<span v-if="scope.row.users.length">
|
||||
{{
|
||||
scope.row.users
|
||||
.slice(0, 2)
|
||||
.map((e) => e.name + "(" + e.phone + ")")
|
||||
.join(";")
|
||||
}}
|
||||
<span v-if="scope.row.users.length > 2">...</span>
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</el-tooltip>
|
||||
<template slot-scope="{row}">
|
||||
<div class="font-12 flex wrap gap-6">
|
||||
<el-tag size="mini" v-for="(item, i) in row.users" :key="i">{{ item.name }}
|
||||
<template v-if="item.phone">({{ item.phone }})</template>
|
||||
</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
||||
@@ -186,7 +175,7 @@ export default {
|
||||
colConfigs() {
|
||||
return [
|
||||
{type: "selection"},
|
||||
{label: "角色名", prop: "name", width: '100px'},
|
||||
{label: "角色名", prop: "name", width: 140},
|
||||
{label: "所属端", prop: "type", width: '100px', dict: "roleType"},
|
||||
{label: "用户数量", prop: "roleCount", align: 'center', width: '80px'},
|
||||
{slot: "users"},
|
||||
@@ -248,7 +237,8 @@ export default {
|
||||
hash: "#add",
|
||||
query: {
|
||||
id: item.id,
|
||||
name: item.name
|
||||
name: item.name,
|
||||
type: item.type,
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
@@ -58,7 +58,6 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
roleName: '',
|
||||
id: '',
|
||||
appList: [],
|
||||
roleList: [],
|
||||
@@ -73,8 +72,8 @@ export default {
|
||||
},
|
||||
created() {
|
||||
if (this.isEdit) {
|
||||
let {id, name: roleName} = this.$route.query
|
||||
this.form = {menus: [], id, roleName}
|
||||
let {id, name: roleName, type} = this.$route.query
|
||||
this.form = {menus: [], id, roleName, type}
|
||||
this.msgTitle = '编辑'
|
||||
}
|
||||
this.getPermissions()
|
||||
|
||||
@@ -95,6 +95,8 @@ export default {
|
||||
if (data?.access_token) {
|
||||
this.setToken([data.token_type, data.access_token].join(" "))
|
||||
this.handleGotoHome()
|
||||
} else {
|
||||
this.$message.error(data?.msg || "登录失败!")
|
||||
}
|
||||
},
|
||||
handleGotoHome() {
|
||||
|
||||
@@ -8,24 +8,17 @@ import extra from "../config.json"
|
||||
Vue.use(Vuex)
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
},
|
||||
state: {},
|
||||
mutations: {
|
||||
signOut(state, flag) {
|
||||
const base = extra.base || ""
|
||||
if (flag) {
|
||||
state.user.token = null;
|
||||
state.user.info = {}
|
||||
new Promise(resolve => {
|
||||
flag ? resolve() : axios.delete('/auth/token/logout').then(resolve)
|
||||
}).then(() => {
|
||||
localStorage.removeItem("vuex");
|
||||
sessionStorage.clear();
|
||||
location.href = base + '/login' + location.hash;
|
||||
} else {
|
||||
axios.delete('/auth/token/logout').then(() => {
|
||||
state.user.token = null;
|
||||
sessionStorage.clear();
|
||||
state.user.info = {}
|
||||
location.href = base + '/login';
|
||||
});
|
||||
}
|
||||
location.href = [base, '/login', location.hash].join('');
|
||||
})
|
||||
},
|
||||
},
|
||||
getters: {
|
||||
|
||||
Reference in New Issue
Block a user