Commit b8f8e02f authored by Zhang Xiaojie's avatar Zhang Xiaojie

用户管理优化

parent f937a53b
This diff is collapsed.
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
"postcss": "^7.0.36", "postcss": "^7.0.36",
"sass": "^1.26.5", "sass": "^1.26.5",
"sass-loader": "^8.0.2", "sass-loader": "^8.0.2",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.7", "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.9",
"typescript": "~4.1.5", "typescript": "~4.1.5",
"vue-style-loader": "^4.1.3", "vue-style-loader": "^4.1.3",
"vue-template-compiler": "^2.6.11" "vue-template-compiler": "^2.6.11"
......
<template>
<!-- 新增弹窗 -->
<a-modal v-model="show" title="新增" :centered="true" footer="">
<a-form-model :model="addform" :label-col="{span: 8}" :wrapper-col="{span: 14}" ref="addForm" :rules="addrules">
<a-form-model-item label="名称" :required="true" prop="name">
<a-input v-model="addform.name" placeholder="请输入名称" style="width: 200px"/>
</a-form-model-item>
<a-form-model-item label="手机号" prop="tel">
<a-input v-model="addform.tel" placeholder="请输入手机号" style="width: 200px"/>
</a-form-model-item>
<a-form-model-item label="初始密码" prop="password" >
<a-input v-model="addform.password" style="width: 200px"/>
</a-form-model-item>
<a-form-model-item label="岗位角色" >
<span class=" text-sm text-black">sds</span>
</a-form-model-item>
<a-form-model-item label="用户所在机构层级" >
<span class=" text-sm text-black">sdsd</span>
</a-form-model-item>
<!-- 不可选层级 -->
<a-form-model-item :label="label[i-1]" v-for="i in 4" :key="i" >
<span class=" text-sm text-black">sdsd</span>
</a-form-model-item>
<!-- 可选层级 -->
<a-form-model-item :label="label[n-1]" v-for="n in 4" :key="n">
<a-select :placeholder="'选择所属'+label[n-1]" style="width: 200px; margin-right:10px;">
<a-select-option v-for="bank in bankList" :key="bank">{{bank}}</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="新地址" :required="true" prop="location" >
<a-input v-model="addform.location" placeholder="请输入新地址" style="width: 200px"/>
</a-form-model-item>
</a-form-model>
</a-modal>
</template>
<script lang="ts">
import Vue from 'vue'
import {PropType} from 'vue'
import { FormModel } from 'ant-design-vue'
import { eRole } from '@/types/role'
export default Vue.extend({
computed:{
bankList():Array<string>{
return ['ada','ads','ds','dsa']
},
getLevel(){
return eRole
}
},
props:{
label:{
type:Array as PropType<String[]>,
default(){
return ['所属一级分行','所属二级分行','所属一级支行','所属二级支行']
}
}
},
data(){
const addrules={
name: [
{ required: true, message: '请输入名称', trigger: 'blur' },
],
tel: [
{ required: true, message: '请输入手机号', trigger: 'blur' },
],
location: [
{ required: true, message: '请输入详细地址', trigger: 'blur' },
]
}
return{
show:false,
addrules,
addform:{
name:'',
tel:'',
password:'123456',
location:''
},
}
},
methods:{
showModal(){
this.show = true
},
onSubmit(){
(this.$refs.addForm as FormModel).validate(valid => {
if (valid) {
this.show = false
} else {
console.log('error submit!!');
return false;
}
})
},
}
})
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<!-- 调配弹窗 -->
<a-modal v-model="visible" title="调配岗位" :centered="true" footer="">
<a-form-model :model="deployform" :label-col="{span: 8}" :wrapper-col="{span: 14}" ref="deployForm" :rules="deployrules">
<a-form-model-item label="名称">
<span class=" text-sm text-black">{{deployform.name}}</span>
</a-form-model-item>
<a-form-model-item label="UID">
<span class=" text-sm text-black">{{deployform.uid}}</span>
</a-form-model-item>
<a-form-model-item label="手机号">
<span class=" text-sm text-black">{{deployform.tel}}</span>
</a-form-model-item>
<a-form-model-item label="所在机构层级">
<span class=" text-sm text-black">{{deployform.level}}</span>
</a-form-model-item>
<a-form-model-item label="现属一级分行">
<span class=" text-sm text-black">{{deployform.firstLevel}}</span>
</a-form-model-item>
<a-form-model-item label="现地址">
<span class=" text-sm text-black">{{deployform.location}}</span>
</a-form-model-item>
<a-form-model-item label="调配一级分行" >
<a-select :default-value="delpoyedBankList[0]" style="width: 120px; margin-right:10px;">
<a-select-option v-for="(bank,i) in delpoyedBankList" :key="i">{{bank}}</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="新地址" :required="true" prop="newLocation" >
<a-input v-model="deployform.newLocation" placeholder="请输入新地址" style="width: 200px"/>
</a-form-model-item>
<a-form-model-item :wrapper-col="{ span: 14, offset: 4 }">
<a-button type="primary" @click="onConfirm">发布</a-button>
<a-button style="margin-left: 10px;" @click="visible=false">取消</a-button>
</a-form-model-item>
</a-form-model>
</a-modal>
</template>
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
})
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div>
<span class=" font-semibold">创建时间:</span>
<a-range-picker @change="onChange" :placeholder="['起始日期', '结束日期']" v-model="value" style=" margin-right:10px;" />
<a-input placeholder="姓名模糊搜索" v-model="queryName" style=" width:150px; margin-right:10px;"/>
<a-input placeholder="手机号模糊搜索" v-model="queryTel" style=" width:150px; margin-right:10px;" />
<a-button type="primary" style=" margin-right:10px;" @click="query">查询</a-button>
<a-button type="primary" style=" margin-right:10px;" @click="reset">重置</a-button>
<a-button type="primary" @click="showModal">新增</a-button>
<add-modal ref="addModal"/>
</div>
</template>
<script lang="ts">
import Vue from 'vue'
import addModal from '@/components/UserManage/addModal.vue'
export default Vue.extend({
components:{ addModal },
data(){
return{
value:[],
queryName:'',
queryTel:'',
}
},
methods:{
onChange(){
console.log(this.value)
},
query(){
console.log(this.value)
},
reset(){
this.value = []
this.queryName = ''
this.queryTel = ''
},
showModal(){
(this.$refs.addModal as any).showModal()
}
}
})
</script>
<style scoped>
</style>
\ No newline at end of file
import { column } from "@/types/column"
const columns:Array<column> =
[
{
title: '注册时间',
align:'center',
dataIndex: 'time',
},
{
title:'uid',
align:'center',
dataIndex:'key'
},
{
title:'姓名',
align:'center',
dataIndex: 'name'
},
{
title:'岗位角色',
align:'center',
dataIndex: 'role'
},
{
title: '手机号',
align:'center',
dataIndex: 'account',
},
{
title: '所在机构层级',
align:'center',
dataIndex: 'bank',
},
{
title: '所属一级分行',
align:'center',
dataIndex: 'firstLevel_branch',
},
{
title:'二级分行管理员',
align:'center',
scopedSlots: { customRender: 'clientList' },
},
{
title:'详细地址',
align:'center',
dataIndex: 'location',
},
{
title:'操作uid',
align:'center',
dataIndex: 'actionUid',
},
{
title:'状态',
align:'center',
dataIndex: 'state',
},
{
title:'操作',
align:'center',
scopedSlots: { customRender: 'action' },
},
]
export{
columns
}
import { column } from "@/types/column"
const columns:Array<column> =
[
{
title: '注册时间',
align:'center',
dataIndex: 'time',
},
{
title:'uid',
align:'center',
dataIndex:'key'
},
{
title:'姓名',
align:'center',
dataIndex: 'name'
},
{
title:'岗位角色',
align:'center',
dataIndex: 'role'
},
{
title: '手机号',
align:'center',
dataIndex: 'account',
},
{
title: '所在机构层级',
align:'center',
dataIndex: 'bank',
},
{
title: '所属一级支行',
align:'center',
dataIndex: 'firstLevel_sub_branch',
},
{
title: '所属二级分行',
align:'center',
dataIndex: 'secondary_branch',
},
{
title: '所属一级支行',
align:'center',
dataIndex: 'firstLevel_branch',
},
{
title:'一级支行客户名单',
align:'center',
scopedSlots: { customRender: 'clientList' },
},
{
title:'详细地址',
align:'center',
dataIndex: 'location',
},
{
title:'操作uid',
align:'center',
dataIndex: 'actionUid',
},
{
title:'状态',
align:'center',
dataIndex: 'state',
},
{
title:'操作',
align:'center',
scopedSlots: { customRender: 'action' },
},
]
export{
columns
}
import { column } from "@/types/column"
const columns:Array<column> =
[
{
title: '注册时间',
align:'center',
dataIndex: 'time',
},
{
title:'uid',
align:'center',
dataIndex:'key'
},
{
title:'姓名',
align:'center',
dataIndex: 'name'
},
{
title:'岗位角色',
align:'center',
dataIndex: 'role'
},
{
title: '手机号',
align:'center',
dataIndex: 'account',
},
{
title: '所在机构层级',
align:'center',
dataIndex: 'bank',
},
{
title: '所属一级支行',
align:'center',
dataIndex: 'firstLevel_sub_branch',
},
{
title: '所属二级分行',
align:'center',
dataIndex: 'secondary_branch',
},
{
title: '所属一级支行',
align:'center',
dataIndex: 'firstLevel_branch',
},
{
title:'一级支行客户经理',
align:'center',
scopedSlots: { customRender: 'clientManagerList' },
},
{
title:'二级支行管理员',
align:'center',
scopedSlots: { customRender: 'managerList' },
},
{
title:'详细地址',
align:'center',
dataIndex: 'location',
},
{
title:'操作uid',
align:'center',
dataIndex: 'actionUid',
},
{
title:'状态',
align:'center',
dataIndex: 'state',
},
{
title:'操作',
align:'center',
scopedSlots: { customRender: 'action' },
},
]
export{
columns
}
import { column } from "@/types/column"
const columns:Array<column> =
[
{
title: '注册时间',
align:'center',
dataIndex: 'time',
},
{
title:'uid',
align:'center',
dataIndex:'key'
},
{
title:'姓名',
align:'center',
dataIndex: 'name'
},
{
title:'岗位角色',
align:'center',
dataIndex: 'role'
},
{
title: '手机号',
align:'center',
dataIndex: 'account',
},
{
title: '所在机构层级',
align:'center',
dataIndex: 'bank',
},
{
title: '所属二级分行',
align:'center',
dataIndex: 'secondary_branch',
},
{
title: '所属一级支行',
align:'center',
dataIndex: 'firstLevel_branch',
},
{
title:'一级支行管理员',
align:'center',
scopedSlots: { customRender: 'managerList' },
},
{
title:'一级支行客户经理',
align:'center',
scopedSlots: { customRender: 'clientManagerList' },
},
{
title:'详细地址',
align:'center',
dataIndex: 'location',
},
{
title:'操作uid',
align:'center',
dataIndex: 'actionUid',
},
{
title:'状态',
align:'center',
dataIndex: 'state',
},
{
title:'操作',
align:'center',
scopedSlots: { customRender: 'action' },
},
]
export{
columns
}
import { column } from "@/types/column"
const columns:Array<column> =
[
{
title: '注册时间',
align:'center',
dataIndex: 'time',
},
{
title:'uid',
align:'center',
dataIndex:'key'
},
{
title:'姓名',
align:'center',
dataIndex: 'name'
},
{
title:'岗位角色',
align:'center',
dataIndex: 'role'
},
{
title: '手机号',
align:'center',
dataIndex: 'account',
},
{
title: '所在机构层级',
align:'center',
dataIndex: 'bank',
},
{
title: '所属二级支行',
align:'center',
dataIndex: 'secondary_sub_branch',
},
{
title: '所属一级支行',
align:'center',
dataIndex: 'firstLevel_sub_branch',
},
{
title: '所属二级分行',
align:'center',
dataIndex: 'secondary_branch',
},
{
title: '所属一级支行',
align:'center',
dataIndex: 'firstLevel_branch',
},
{
title:'客户名单',
align:'center',
scopedSlots: { customRender: 'clientManagerList' },
},
{
title:'详细地址',
align:'center',
dataIndex: 'location',
},
{
title:'操作uid',
align:'center',
dataIndex: 'actionUid',
},
{
title:'状态',
align:'center',
dataIndex: 'state',
},
{
title:'操作',
align:'center',
scopedSlots: { customRender: 'action' },
},
]
export{
columns
}
import { column } from "@/types/column"
const columns:Array<column> =
[
{
title: '注册时间',
align:'center',
dataIndex: 'time',
},
{
title:'uid',
align:'center',
dataIndex:'key'
},
{
title:'姓名',
align:'center',
dataIndex: 'name'
},
{
title:'岗位角色',
align:'center',
dataIndex: 'role'
},
{
title: '手机号',
align:'center',
dataIndex: 'account',
},
{
title: '所在机构层级',
align:'center',
dataIndex: 'bank',
},
{
title: '所属二级支行',
align:'center',
dataIndex: 'secondary_sub_branch',
},
{
title: '所属一级支行',
align:'center',
dataIndex: 'firstLevel_sub_branch',
},
{
title: '所属二级分行',
align:'center',
dataIndex: 'secondary_branch',
},
{
title: '所属一级支行',
align:'center',
dataIndex: 'firstLevel_branch',
},
{
title:'二级支行客户经理',
align:'center',
scopedSlots: { customRender: 'clientManagerList' },
},
{
title:'详细地址',
align:'center',
dataIndex: 'location',
},
{
title:'操作uid',
align:'center',
dataIndex: 'actionUid',
},
{
title:'状态',
align:'center',
dataIndex: 'state',
},
{
title:'操作',
align:'center',
scopedSlots: { customRender: 'action' },
},
]
export{
columns
}
import { column } from "@/types/column"
import { eRole } from "@/types/role"
const columns:Array<column> =
[
{
title: '创建日期',
align:'center',
dataIndex: 'time',
role:[
eRole.systemManager,
eRole.superManager,
eRole.firstLevel_branch,
eRole.secondary_branch,
eRole.firstLevel_sub_branch,
eRole.firstLevel_sub_clientManager,
eRole.secondary_sub_branch,
eRole.secondary_sub_clientManager,
]
},
{
title:'uid',
align:'center',
dataIndex:'key',
role:[
eRole.systemManager,
eRole.superManager,
eRole.firstLevel_branch,
eRole.secondary_branch,
eRole.firstLevel_sub_branch,
eRole.firstLevel_sub_clientManager,
eRole.secondary_sub_branch,
eRole.secondary_sub_clientManager,
]
},
{
title:'姓名',
align:'center',
dataIndex: 'name',
role:[
eRole.systemManager,
eRole.superManager,
eRole.firstLevel_branch,
eRole.secondary_branch,
eRole.firstLevel_sub_branch,
eRole.firstLevel_sub_clientManager,
eRole.secondary_sub_branch,
eRole.secondary_sub_clientManager,
]
},
{
title:'岗位角色',
align:'center',
dataIndex: 'role',
role:[
eRole.systemManager,
eRole.superManager,
eRole.firstLevel_branch,
eRole.secondary_branch,
eRole.firstLevel_sub_branch,
eRole.firstLevel_sub_clientManager,
eRole.secondary_sub_branch,
eRole.secondary_sub_clientManager,
]
},
{
title: '手机号',
align:'center',
dataIndex: 'account',
role:[
eRole.systemManager,
eRole.superManager,
eRole.firstLevel_branch,
eRole.secondary_branch,
eRole.firstLevel_sub_branch,
eRole.firstLevel_sub_clientManager,
eRole.secondary_sub_branch,
eRole.secondary_sub_clientManager,
]
},
{
title: '所在机构层级',
align:'center',
dataIndex: 'bank',
role:[
eRole.systemManager,
eRole.superManager,
eRole.firstLevel_branch,
eRole.secondary_branch,
eRole.firstLevel_sub_branch,
eRole.firstLevel_sub_clientManager,
eRole.secondary_sub_branch,
eRole.secondary_sub_clientManager,
]
},
{
title: '所属二级支行',
align:'center',
dataIndex: 'secondary_sub_branch',
role:[
eRole.secondary_sub_branch,
eRole.secondary_sub_clientManager,
]
},
{
title: '所属一级支行',
align:'center',
dataIndex: 'firstLevel_sub_branch',
role:[
eRole.firstLevel_sub_branch,
eRole.secondary_sub_branch,
eRole.firstLevel_sub_clientManager,
eRole.secondary_sub_clientManager,
]
},
{
title: '所属二级分行',
align:'center',
dataIndex: 'secondary_branch',
role:[
eRole.secondary_branch,
eRole.firstLevel_sub_branch,
eRole.firstLevel_sub_clientManager,
eRole.secondary_sub_branch,
eRole.secondary_sub_clientManager,
]
},
{
title: '所属一级分行',
align:'center',
dataIndex: 'firstLevel_branch',
role:[
eRole.firstLevel_branch,
eRole.secondary_branch,
eRole.firstLevel_sub_branch,
eRole.firstLevel_sub_clientManager,
eRole.secondary_sub_branch,
eRole.secondary_sub_clientManager,
]
},
{
title:'一级支行客户名单',
align:'center',
scopedSlots: { customRender: 'firstSubClient' },
role:[
eRole.firstLevel_sub_clientManager
]
},
{
title:'二级支行客户名单',
align:'center',
scopedSlots: { customRender: 'secondarySubClient' },
role:[
eRole.secondary_sub_clientManager
]
},
{
title:'一级支行客户经理',
align:'center',
scopedSlots: { customRender: 'firstSubClientManager' },
role:[
eRole.firstLevel_sub_branch
]
},
{
title:'二级支行管理员',
align:'center',
scopedSlots: { customRender: 'secondarySubManager' },
role:[
eRole.firstLevel_sub_branch,
]
},
{
title:'二级支行客户经理',
align:'center',
scopedSlots: { customRender: 'secondarySubClientManager' },
role:[
eRole.secondary_sub_branch,
]
},
{
title:'一级支行管理员',
align:'center',
scopedSlots: { customRender: 'firstSubManager' },
role:[
eRole.secondary_branch,
]
},
{
title:'一级支行客户经理',
align:'center',
scopedSlots: { customRender: 'firstSubClientManager' },
role:[
eRole.secondary_branch
]
},
{
title:'二级分行管理员',
align:'center',
scopedSlots: { customRender: 'secondarySubManager' },
role:[
eRole.firstLevel_branch
]
},
{
title:'详细地址',
align:'center',
dataIndex: 'location',
role:[
eRole.systemManager,
eRole.superManager,
eRole.firstLevel_branch,
eRole.secondary_branch,
eRole.firstLevel_sub_branch,
eRole.firstLevel_sub_clientManager,
eRole.secondary_sub_branch,
eRole.secondary_sub_clientManager,
]
},
{
title:'操作uid',
align:'center',
dataIndex: 'actionUid',
role:[
eRole.systemManager,
eRole.superManager,
eRole.firstLevel_branch,
eRole.secondary_branch,
eRole.firstLevel_sub_branch,
eRole.firstLevel_sub_clientManager,
eRole.secondary_sub_branch,
eRole.secondary_sub_clientManager,
]
},
{
title:'状态',
align:'center',
dataIndex: 'state',
role:[
eRole.systemManager,
eRole.superManager,
eRole.firstLevel_branch,
eRole.secondary_branch,
eRole.firstLevel_sub_branch,
eRole.firstLevel_sub_clientManager,
eRole.secondary_sub_branch,
eRole.secondary_sub_clientManager,
]
},
{
title:'操作',
align:'center',
scopedSlots: { customRender: 'action' },
role:[
eRole.systemManager,
eRole.superManager,
eRole.firstLevel_branch,
eRole.secondary_branch,
eRole.firstLevel_sub_branch,
eRole.firstLevel_sub_clientManager,
eRole.secondary_sub_branch,
eRole.secondary_sub_clientManager,
]
},
]
export function getColumns(role:eRole):Array<column>{
return columns.filter(col=>{
return col.role?.includes(role)
})
}
import { eRole } from "@/types/role"
import { staff,bank,state,role } from "@/types/staff" import { staff,bank,state,role } from "@/types/staff"
export const firstLevelManager:Array<staff>=[ export const firstLevelManager:Array<staff>=[
{ {
key:'01', key:'01',
time:'2021-09-01 9:00', time:'2021-09-01 9:00',
name:'王勤', name:'王勤',
eRole:eRole.firstLevel_branch,
role:role[0], role:role[0],
account:'1811111111111', account:'1811111111111',
bank:bank[0], bank:bank[0],
...@@ -16,6 +18,7 @@ export const firstLevelManager:Array<staff>=[ ...@@ -16,6 +18,7 @@ export const firstLevelManager:Array<staff>=[
key:'02', key:'02',
time:'2021-09-01 9:00', time:'2021-09-01 9:00',
name:'柯雄彬', name:'柯雄彬',
eRole:eRole.firstLevel_branch,
role:role[0], role:role[0],
account:'1811111111111', account:'1811111111111',
bank:bank[0], bank:bank[0],
...@@ -28,6 +31,7 @@ export const firstLevelManager:Array<staff>=[ ...@@ -28,6 +31,7 @@ export const firstLevelManager:Array<staff>=[
key:'03', key:'03',
time:'2021-09-01 9:00', time:'2021-09-01 9:00',
name:'傅海华', name:'傅海华',
eRole:eRole.firstLevel_branch,
role:role[0], role:role[0],
account:'1811111111111', account:'1811111111111',
bank:bank[0], bank:bank[0],
...@@ -40,6 +44,7 @@ export const firstLevelManager:Array<staff>=[ ...@@ -40,6 +44,7 @@ export const firstLevelManager:Array<staff>=[
key:'04', key:'04',
time:'2021-09-01 9:00', time:'2021-09-01 9:00',
name:'王勤', name:'王勤',
eRole:eRole.firstLevel_branch,
role:role[0], role:role[0],
account:'1811111111111', account:'1811111111111',
bank:bank[0], bank:bank[0],
......
...@@ -75,10 +75,11 @@ router.beforeEach((to, from, next) => { ...@@ -75,10 +75,11 @@ router.beforeEach((to, from, next) => {
if (roles && roles.includes(usermsg.role)) { if (roles && roles.includes(usermsg.role)) {
next() next()
} else { } else {
next({ // next({
name: 'home', // name: 'home',
}) // })
} }
next()
} }
}) })
......
...@@ -2,3 +2,5 @@ declare module '*.vue' { ...@@ -2,3 +2,5 @@ declare module '*.vue' {
import Vue from 'vue' import Vue from 'vue'
export default Vue export default Vue
} }
declare module 'vue2-dropzone'
\ No newline at end of file
import { eRole } from "./role";
export interface column{ export interface column{
title:string title:string
dataIndex?:string, dataIndex?:string,
scopedSlots?:object, scopedSlots?:object,
key?:string, key?:string,
customRender?:{}, customRender?:{},
colSpan?:number, align?:string,
align?:string role?:Array<eRole>
} }
\ No newline at end of file
export enum eRole { export enum eRole {
systemManager,
superManager, superManager,
firstLevel_branch, firstLevel_branch,
secondary_branch, secondary_branch,
firstLevel_sub_branch, firstLevel_sub_branch,
firstLevel_sub_clientManager,
secondary_sub_branch, secondary_sub_branch,
secondary_sub_clientManager,
} }
import { eRole } from "./role";
enum bank{ enum bank{
'一级分行', '一级分行',
'二级分行', '二级分行',
...@@ -17,6 +19,7 @@ enum state{ ...@@ -17,6 +19,7 @@ enum state{
interface staff{ interface staff{
key:string, key:string,
eRole?:eRole
time:string, time:string,
name:string, name:string,
role:string, role:string,
......
<template> <template>
<div> <div>
<p class=" text-2xl font-bold mb-5">{{deployform.firstLevel}}信息</p> <p class=" text-2xl font-bold mb-5">{{deployform.firstLevel}}信息</p>
<!-- timepicker --> <top-bar/>
<span class=" font-semibold">创建时间:</span>
<a-range-picker @change="onChange" :placeholder="['起始日期', '结束日期']" v-model="value" style=" margin-right:10px;" />
<a-input placeholder="姓名模糊搜索" v-model="queryName" style=" width:150px; margin-right:10px;"/>
<a-input placeholder="手机号模糊搜索" v-model="queryTel" style=" width:150px; margin-right:10px;" />
<a-button type="primary" style=" margin-right:10px;" @click="query">查询</a-button>
<a-button type="primary" style=" margin-right:10px;" @click="reset">重置</a-button>
<a-button type="primary" @click="show=true">新增</a-button>
<!-- 新增弹窗 -->
<a-modal v-model="show" title="新增" :centered="true" footer="">
<a-form-model :model="addform" :label-col="labelCol" :wrapper-col="wrapperCol" ref="addForm" :rules="addrules">
<a-form-model-item label="名称" :required="true" prop="name">
<a-input v-model="addform.name" placeholder="请输入名称" style="width: 200px"/>
</a-form-model-item>
<a-form-model-item label="手机号" prop="tel">
<a-input v-model="addform.tel" placeholder="请输入手机号" style="width: 200px"/>
</a-form-model-item>
<a-form-model-item label="初始密码" prop="password" >
<a-input v-model="addform.password" style="width: 200px"/>
</a-form-model-item>
<a-form-model-item label="岗位角色" >
<span class=" text-sm text-black">管理员</span>
</a-form-model-item>
<a-form-model-item label="用户所在机构层级" >
<span class=" text-sm text-black">一级分行</span>
</a-form-model-item>
<a-form-model-item label="所属一级分行" >
<a-select :default-value="bankList[0]" style="width: 120px; margin-right:10px;">
<a-select-option v-for="(bank,i) in bankList" :key="i">{{bank}}</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="详细地址" :required="true" prop="location" >
<a-input v-model="addform.location" placeholder="请输入详细地址" style="width: 200px"/>
</a-form-model-item>
<a-form-model-item :wrapper-col="{ span: 14, offset: 4 }">
<a-button type="primary" @click="onSubmit">发布</a-button>
<a-button style="margin-left: 10px;" @click="show=false">取消</a-button>
</a-form-model-item>
</a-form-model>
</a-modal>
<!-- 信息列表 -->
<a-table :columns="columns" :data-source="firstLevelManager" style=" text-align: center; margin-top:40px;" bordered >
<span slot="clientList" slot-scope="text,record"> <a @click="getManageList(record.key)">查看</a> </span>
<p slot="action" slot-scope="text,record" >
<!-- 操作 -->
<a v-if="record.state!='已禁用'" @click="deploy(record)">调配</a>
<!-- 调配弹窗 --> <!-- 调配弹窗 -->
<a-modal v-model="visible" title="调配岗位" :centered="true" footer=""> <a-modal v-model="visible" title="调配岗位" :centered="true" footer="">
<a-form-model :model="deployform" :label-col="labelCol" :wrapper-col="wrapperCol" ref="deployForm" :rules="deployrules"> <a-form-model :model="deployform" :label-col="{span: 8}" :wrapper-col="{span: 14}" ref="deployForm" :rules="deployrules">
<a-form-model-item label="名称"> <a-form-model-item label="名称">
<span class=" text-sm text-black">{{deployform.name}}</span> <span class=" text-sm text-black">{{deployform.name}}</span>
</a-form-model-item> </a-form-model-item>
...@@ -82,6 +37,12 @@ ...@@ -82,6 +37,12 @@
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</a-modal> </a-modal>
<!-- 信息列表 -->
<a-table :columns="columns" :data-source="firstLevelManager" style=" text-align: center; margin-top:40px;" bordered >
<span slot="secondarySubManager" slot-scope="text,record"> <a @click="getManageList(record.key)">查看</a> </span>
<p slot="action" slot-scope="text,record" >
<!-- 操作 -->
<a v-if="record.state!='已禁用'" @click="deploy(record)">调配</a>
<a-popconfirm <a-popconfirm
v-if="record.state=='已禁用'" v-if="record.state=='已禁用'"
title="确定启用吗?" title="确定启用吗?"
...@@ -127,14 +88,15 @@ ...@@ -127,14 +88,15 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import Vue from "vue" import Vue from "vue"
import { FormModel } from 'ant-design-vue'
import { firstLevelManager } from '@/mock/index' import { firstLevelManager } from '@/mock/index'
import { staff } from '@/types/staff' import { staff } from '@/types/staff'
import { columns } from '@/const/columns/firstLevelColumns' import { eRole } from "@/types/role"
import { getColumns } from '@/const/columns/userManagerCol'
import { FormModel } from 'ant-design-vue'
import TopBar from "@/components/UserManage/topBar.vue"
export default Vue.extend({ export default Vue.extend({
computed: { components:{TopBar},
computed:{
bankList():Array<string>{ bankList():Array<string>{
return ['浙江省分行','广东省分行','湖南省分行','海南省分行'] return ['浙江省分行','广东省分行','湖南省分行','海南省分行']
}, },
...@@ -151,36 +113,16 @@ export default Vue.extend({ ...@@ -151,36 +113,16 @@ export default Vue.extend({
return firstLevelManager return firstLevelManager
}, },
columns(){ columns(){
return columns return getColumns(eRole.firstLevel_branch)
} }
}, },
data() { data() {
const addrules={
name: [
{ required: true, message: '请输入名称', trigger: 'blur' },
],
tel: [
{ required: true, message: '请输入手机号', trigger: 'blur' },
],
location: [
{ required: true, message: '请输入详细地址', trigger: 'blur' },
]
}
const deployrules={ const deployrules={
newLocation: [ newLocation: [
{ required: true, message: '请输入新地址', trigger: 'blur' }, { required: true, message: '请输入新地址', trigger: 'blur' },
] ]
} }
return { return {
value:[],
queryName:'',
queryTel:'',
addform:{
name:'',
tel:'',
password:'123456',
location:''
},
deployform:{ deployform:{
name:'李丽丽', name:'李丽丽',
uid:'01', uid:'01',
...@@ -190,27 +132,12 @@ export default Vue.extend({ ...@@ -190,27 +132,12 @@ export default Vue.extend({
location:'浙江省杭州市西湖区文三路250号', location:'浙江省杭州市西湖区文三路250号',
newLocation:'' newLocation:''
}, },
show:false,
labelCol: { span: 8 },
wrapperCol: { span: 14 },
addrules,
visible:false, visible:false,
deployrules deployrules
} }
}, },
watch: {}, watch: {},
methods:{ methods:{
onChange(){
console.log(this.value)
},
query(){
console.log(this.value)
},
reset(){
this.value = []
this.queryName = ''
this.queryTel = ''
},
enable(key:string){ enable(key:string){
console.log(key) console.log(key)
}, },
...@@ -228,21 +155,10 @@ export default Vue.extend({ ...@@ -228,21 +155,10 @@ export default Vue.extend({
}, },
getManageList(key:string){ getManageList(key:string){
this.$router.push({name:'secondary',query:{key}}) this.$router.push({name:'secondary',query:{key}})
console.log(key)
}, },
add(){ add(){
}, },
onSubmit(){
(this.$refs.addForm as FormModel).validate(valid => {
if (valid) {
this.show = false
} else {
console.log('error submit!!');
return false;
}
})
},
onConfirm(){ onConfirm(){
(this.$refs.deployForm as FormModel).validate(valid => { (this.$refs.deployForm as FormModel).validate(valid => {
if (valid) { if (valid) {
......
...@@ -47,13 +47,6 @@ ...@@ -47,13 +47,6 @@
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</a-modal> </a-modal>
<!-- 信息列表 -->
<a-table :columns="columns" :data-source="firstSubManager" style=" text-align: center; margin-top:40px;" bordered size="small">
<span slot="managerList" slot-scope="text,record"> <a @click="getManagerList(record.key)">查看</a> </span>
<span slot="clientManagerList" slot-scope="text,record"> <a @click="getClientManagerList(record.key)">查看</a> </span>
<p slot="action" slot-scope="text,record" >
<!-- 操作 -->
<a v-if="record.state!='已禁用'" @click="deploy(record)">调配</a>
<!-- 调配弹窗 --> <!-- 调配弹窗 -->
<a-modal v-model="visible" title="调配岗位" :centered="true" footer=""> <a-modal v-model="visible" title="调配岗位" :centered="true" footer="">
<a-form-model :model="deployform" :label-col="labelCol" :wrapper-col="wrapperCol" ref="deployForm" :rules="deployrules"> <a-form-model :model="deployform" :label-col="labelCol" :wrapper-col="wrapperCol" ref="deployForm" :rules="deployrules">
...@@ -95,6 +88,13 @@ ...@@ -95,6 +88,13 @@
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</a-modal> </a-modal>
<!-- 信息列表 -->
<a-table :columns="columns" :data-source="firstSubManager" style=" text-align: center; margin-top:40px;" bordered size="small">
<span slot="firstSubClientManager" slot-scope="text,record"> <a @click="getClientManagerList(record.key)">查看</a> </span>
<span slot="secondarySubManager" slot-scope="text,record"> <a @click="getManagerList(record.key)">查看</a> </span>
<p slot="action" slot-scope="text,record" >
<!-- 操作 -->
<a v-if="record.state!='已禁用'" @click="deploy(record)">调配</a>
<a-popconfirm <a-popconfirm
v-if="record.state=='已禁用'" v-if="record.state=='已禁用'"
title="确定启用吗?" title="确定启用吗?"
...@@ -143,8 +143,8 @@ import Vue from "vue" ...@@ -143,8 +143,8 @@ import Vue from "vue"
import { FormModel } from 'ant-design-vue' import { FormModel } from 'ant-design-vue'
import { firstSubManager } from '@/mock/index' import { firstSubManager } from '@/mock/index'
import { staff } from '@/types/staff' import { staff } from '@/types/staff'
import { columns } from '@/const/columns/firstSubColumns' import { eRole } from "@/types/role"
import { getColumns } from '@/const/columns/userManagerCol'
export default Vue.extend({ export default Vue.extend({
computed: { computed: {
...@@ -164,7 +164,7 @@ export default Vue.extend({ ...@@ -164,7 +164,7 @@ export default Vue.extend({
return firstSubManager return firstSubManager
}, },
columns(){ columns(){
return columns return getColumns(eRole.firstLevel_sub_branch)
} }
}, },
data() { data() {
......
...@@ -47,12 +47,6 @@ ...@@ -47,12 +47,6 @@
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</a-modal> </a-modal>
<!-- 信息列表 -->
<a-table :columns="columns" :data-source="firstSubClientManager" style=" text-align: center; margin-top:40px;" bordered size="small">
<span slot="clientList" slot-scope="text,record"> <a @click="getClientList(record.key)">查看</a> </span>
<p slot="action" slot-scope="text,record" >
<!-- 操作 -->
<a v-if="record.state!='已禁用'" @click="deploy(record)">调配</a>
<!-- 调配弹窗 --> <!-- 调配弹窗 -->
<a-modal v-model="visible" title="调配岗位" :centered="true" footer=""> <a-modal v-model="visible" title="调配岗位" :centered="true" footer="">
<a-form-model :model="deployform" :label-col="labelCol" :wrapper-col="wrapperCol" ref="deployForm" :rules="deployrules"> <a-form-model :model="deployform" :label-col="labelCol" :wrapper-col="wrapperCol" ref="deployForm" :rules="deployrules">
...@@ -94,6 +88,12 @@ ...@@ -94,6 +88,12 @@
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</a-modal> </a-modal>
<!-- 信息列表 -->
<a-table :columns="columns" :data-source="firstSubClientManager" style=" text-align: center; margin-top:40px;" bordered size="small">
<span slot="firstSubClient" slot-scope="text,record"> <a @click="getClientList(record.key)">查看</a> </span>
<p slot="action" slot-scope="text,record" >
<!-- 操作 -->
<a v-if="record.state!='已禁用'" @click="deploy(record)">调配</a>
<a-popconfirm <a-popconfirm
v-if="record.state=='已禁用'" v-if="record.state=='已禁用'"
title="确定启用吗?" title="确定启用吗?"
...@@ -142,7 +142,8 @@ import Vue from "vue" ...@@ -142,7 +142,8 @@ import Vue from "vue"
import { FormModel } from 'ant-design-vue' import { FormModel } from 'ant-design-vue'
import { firstSubClientManager } from '@/mock/index' import { firstSubClientManager } from '@/mock/index'
import { staff } from '@/types/staff' import { staff } from '@/types/staff'
import { columns } from '@/const/columns/firstSubClientManagerColumns' import { eRole } from "@/types/role"
import { getColumns } from '@/const/columns/userManagerCol'
export default Vue.extend({ export default Vue.extend({
computed: { computed: {
...@@ -162,7 +163,7 @@ export default Vue.extend({ ...@@ -162,7 +163,7 @@ export default Vue.extend({
return firstSubClientManager return firstSubClientManager
}, },
columns(){ columns(){
return columns return getColumns(eRole.firstLevel_sub_clientManager)
} }
}, },
data() { data() {
......
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
</a-modal> </a-modal>
<!-- 信息列表 --> <!-- 信息列表 -->
<a-table :columns="columns" :data-source="secondaryManager" style=" text-align: center; margin-top:40px;" bordered size="small" > <a-table :columns="columns" :data-source="secondaryManager" style=" text-align: center; margin-top:40px;" bordered size="small" >
<span slot="managerList" slot-scope="text,record"> <a @click="getManageList(record.key)">查看</a> </span> <span slot="firstSubManager" slot-scope="text,record"> <a @click="getManageList(record.key)">查看</a> </span>
<span slot="clientManagerList" slot-scope="text,record"> <a @click="getClientManagerList(record.key)">查看</a> </span> <span slot="firstSubClientManager" slot-scope="text,record"> <a @click="getClientManagerList(record.key)">查看</a> </span>
<p slot="action" slot-scope="text,record" > <p slot="action" slot-scope="text,record" >
<!-- 操作 --> <!-- 操作 -->
<a v-if="record.state!='已禁用'" @click="deploy(record)">调配</a> <a v-if="record.state!='已禁用'" @click="deploy(record)">调配</a>
...@@ -137,7 +137,8 @@ import Vue from "vue" ...@@ -137,7 +137,8 @@ import Vue from "vue"
import { FormModel } from 'ant-design-vue' import { FormModel } from 'ant-design-vue'
import { secondaryManager } from '@/mock/index' import { secondaryManager } from '@/mock/index'
import { staff } from '@/types/staff' import { staff } from '@/types/staff'
import { columns } from '@/const/columns/secondaryColumns' import { eRole } from "@/types/role"
import { getColumns } from '@/const/columns/userManagerCol'
export default Vue.extend({ export default Vue.extend({
computed: { computed: {
...@@ -157,7 +158,7 @@ export default Vue.extend({ ...@@ -157,7 +158,7 @@ export default Vue.extend({
return secondaryManager return secondaryManager
}, },
columns(){ columns(){
return columns return getColumns(eRole.secondary_branch)
} }
}, },
data() { data() {
......
...@@ -50,12 +50,6 @@ ...@@ -50,12 +50,6 @@
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</a-modal> </a-modal>
<!-- 信息列表 -->
<a-table :columns="columns" :data-source="secondarySubManager" style=" text-align: center; margin-top:40px;" bordered size="small">
<span slot="clientManagerList" slot-scope="text,record"> <a @click="getClientManagerList(record.key)">查看</a> </span>
<p slot="action" slot-scope="text,record" >
<!-- 操作 -->
<a v-if="record.state!='已禁用'" @click="deploy(record)">调配</a>
<!-- 调配弹窗 --> <!-- 调配弹窗 -->
<a-modal v-model="visible" title="调配岗位" :centered="true" footer=""> <a-modal v-model="visible" title="调配岗位" :centered="true" footer="">
<a-form-model :model="deployform" :label-col="labelCol" :wrapper-col="wrapperCol" ref="deployForm" :rules="deployrules"> <a-form-model :model="deployform" :label-col="labelCol" :wrapper-col="wrapperCol" ref="deployForm" :rules="deployrules">
...@@ -100,6 +94,12 @@ ...@@ -100,6 +94,12 @@
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</a-modal> </a-modal>
<!-- 信息列表 -->
<a-table :columns="columns" :data-source="secondarySubManager" style=" text-align: center; margin-top:40px;" bordered size="small">
<span slot="secondarySubClientManager" slot-scope="text,record"> <a @click="getClientManagerList(record.key)">查看</a> </span>
<p slot="action" slot-scope="text,record" >
<!-- 操作 -->
<a v-if="record.state!='已禁用'" @click="deploy(record)">调配</a>
<a-popconfirm <a-popconfirm
v-if="record.state=='已禁用'" v-if="record.state=='已禁用'"
title="确定启用吗?" title="确定启用吗?"
...@@ -148,7 +148,8 @@ import Vue from "vue" ...@@ -148,7 +148,8 @@ import Vue from "vue"
import { FormModel } from 'ant-design-vue' import { FormModel } from 'ant-design-vue'
import { secondarySubManager } from '@/mock/index' import { secondarySubManager } from '@/mock/index'
import { staff } from '@/types/staff' import { staff } from '@/types/staff'
import { columns } from '@/const/columns/secondarySubColumns' import { eRole } from "@/types/role"
import { getColumns } from '@/const/columns/userManagerCol'
export default Vue.extend({ export default Vue.extend({
...@@ -169,7 +170,7 @@ export default Vue.extend({ ...@@ -169,7 +170,7 @@ export default Vue.extend({
return secondarySubManager return secondarySubManager
}, },
columns(){ columns(){
return columns return getColumns(eRole.secondary_sub_branch)
} }
}, },
data() { data() {
......
...@@ -50,12 +50,6 @@ ...@@ -50,12 +50,6 @@
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</a-modal> </a-modal>
<!-- 信息列表 -->
<a-table :columns="columns" :data-source="secondarySubClientManager" style=" text-align: center; margin-top:40px;" bordered size="small">
<span slot="clientManagerList" slot-scope="text,record"> <a @click="getClientManagerList(record.key)">查看</a> </span>
<p slot="action" slot-scope="text,record" >
<!-- 操作 -->
<a v-if="record.state!='已禁用'" @click="deploy(record)">调配</a>
<!-- 调配弹窗 --> <!-- 调配弹窗 -->
<a-modal v-model="visible" title="调配岗位" :centered="true" footer=""> <a-modal v-model="visible" title="调配岗位" :centered="true" footer="">
<a-form-model :model="deployform" :label-col="labelCol" :wrapper-col="wrapperCol" ref="deployForm" :rules="deployrules"> <a-form-model :model="deployform" :label-col="labelCol" :wrapper-col="wrapperCol" ref="deployForm" :rules="deployrules">
...@@ -100,6 +94,12 @@ ...@@ -100,6 +94,12 @@
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</a-modal> </a-modal>
<!-- 信息列表 -->
<a-table :columns="columns" :data-source="secondarySubClientManager" style=" text-align: center; margin-top:40px;" bordered size="small">
<span slot="secondarySubClient" slot-scope="text,record"> <a @click="getClientManagerList(record.key)">查看</a> </span>
<p slot="action" slot-scope="text,record" >
<!-- 操作 -->
<a v-if="record.state!='已禁用'" @click="deploy(record)">调配</a>
<a-popconfirm <a-popconfirm
v-if="record.state=='已禁用'" v-if="record.state=='已禁用'"
title="确定启用吗?" title="确定启用吗?"
...@@ -148,7 +148,8 @@ import Vue from "vue" ...@@ -148,7 +148,8 @@ import Vue from "vue"
import { FormModel } from 'ant-design-vue' import { FormModel } from 'ant-design-vue'
import { secondarySubClientManager} from '@/mock/index' import { secondarySubClientManager} from '@/mock/index'
import { staff } from '@/types/staff' import { staff } from '@/types/staff'
import { columns } from '@/const/columns/secondarySubClientManagerColumns' import { eRole } from "@/types/role"
import { getColumns } from '@/const/columns/userManagerCol'
export default Vue.extend({ export default Vue.extend({
computed: { computed: {
...@@ -168,7 +169,7 @@ export default Vue.extend({ ...@@ -168,7 +169,7 @@ export default Vue.extend({
return secondarySubClientManager return secondarySubClientManager
}, },
columns(){ columns(){
return columns return getColumns(eRole.secondary_sub_clientManager)
} }
}, },
data() { data() {
......
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