浏览代码

修改

master
yangpeilai 1周前
父节点
当前提交
91a0ea189e
共有 1 个文件被更改,包括 71 次插入10 次删除
  1. 71
    10
      src/views/system/userManage/index.vue

+ 71
- 10
src/views/system/userManage/index.vue 查看文件

} }
"> ">
<template #search> <template #search>
<el-input v-trim clearable v-model="searchForm.serviceHallName" style="width: 180px" placeholder="请输入网点名" />
<el-input v-trim clearable v-model="searchForm.agencyId" style="width: 180px" placeholder="请输入渠道编号" />
<el-input v-trim clearable v-model="searchForm.agencyName" style="width: 180px" placeholder="请输入渠道名称" />
<el-select clearable filterable v-model="searchForm.agencyId" style="width: 180px" @change="agencyIdChange" placeholder="请选择渠道名称">
<el-option v-for="item in agencyAllList" :key="item.value" :label="item.label" :value="item.value"/>
</el-select>

<el-tree-select class="my-tree-select" :data="treeData" filterable style="width: 180px" placeholder="请选择网点名称"
v-model="searchForm.serviceHallIds" :props="{
label: 'servicehallName',
children: 'childrens',
value: 'servicehallId',
}" value-key="servicehallId"
:check-strictly="true" :render-after-expand="false"
:collapse-tags="true" :max-collapse-tags="1"
node-key="servicehallId" multiple clearable />

<!-- <el-input v-trim clearable v-model="searchForm.serviceHallName" style="width: 180px" placeholder="请输入网点名" />-->
<el-input v-trim clearable v-model="searchForm.staffName" style="width: 180px" placeholder="请输入员工姓名" /> <el-input v-trim clearable v-model="searchForm.staffName" style="width: 180px" placeholder="请输入员工姓名" />
<el-input v-trim clearable v-model="searchForm.mobile" style="width: 180px" placeholder="请输入手机号" /> <el-input v-trim clearable v-model="searchForm.mobile" style="width: 180px" placeholder="请输入手机号" />
<!-- <el-select clearable v-model="searchForm.rbacSource" style="width: 180px" placeholder="请选择所属来源方"> <!-- <el-select clearable v-model="searchForm.rbacSource" style="width: 180px" placeholder="请选择所属来源方">
<el-option v-for="item in rbacSourceList" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in rbacSourceList" :key="item.value" :label="item.label" :value="item.value" />
</el-select> --> </el-select> -->
<el-select clearable v-model="searchForm.identityType" style="width: 180px" placeholder="请选择身份标识">
<el-option v-for="item in STAFF_IDENTITY_TYPE" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<!-- <el-select clearable v-model="searchForm.identityType" style="width: 180px" placeholder="请选择身份标识">-->
<!-- <el-option v-for="item in STAFF_IDENTITY_TYPE" :key="item.value" :label="item.label" :value="item.value" />-->
<!-- </el-select>-->
<el-select clearable v-model="searchForm.status" style="width: 180px" placeholder="请选择状态"> <el-select clearable v-model="searchForm.status" style="width: 180px" placeholder="请选择状态">
<el-option v-for="item in STATUS" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in STATUS" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
tableData: [] as IObject[], tableData: [] as IObject[],
formLoding: false, formLoding: false,
searchForm: { searchForm: {
serviceHallName: '',
serviceHallIds: [],
mobile: '', mobile: '',
agencyName: '',
agencyIds: '',
staffName: '', staffName: '',
staffId: '', staffId: '',
rbacSource: '', rbacSource: '',
value: 2, value: 2,
}, },
] ]
const agencyAllList: any = ref([])
function getAgencyAll() {
BaseService.postN('/userw/agency/queryAgencyqueryAll').then((res: any) => {
if (res && res.code === 0) {
//数据渲染
//data为
let data = res.data || []
agencyAllList.value = data.map(item => ({
label: item.name,
value: item.agencyId,
}))
}
})
}

const treeData = ref<any>([])
const agencyIdChange = (value) => {
// console.log('====>value', value)
treeData.value = []
searchForm.value.serviceHallIds = []
if (!value) {
return
}
BaseService.postN('/userw/serviceHall/serviceHallSonSelect', {agencyId: value}).then((res: any) => {
if (res?.code === 0) {
let bizContent = res.data
let data = bizContent || []
let list = [] as IObject[]
data.map((item) => {
list.push({
servicehallName: item.servicehallName,
childrens: item.childrens || [],
servicehallId: item.servicehallId,
})
})
treeData.value = list
}
})
}
//表单数据配置 //表单数据配置
const field = ref({ const field = ref({
tabSize: 'small', //Table 的尺寸 large / default /small (默认default) tabSize: 'small', //Table 的尺寸 large / default /small (默认default)
function refreshLeft() { function refreshLeft() {
field.value.paging.currentPage = 1 field.value.paging.currentPage = 1
searchForm.value = { searchForm.value = {
serviceHallName: '',
serviceHallIds: [],
mobile: '', mobile: '',
agencyId: '', agencyId: '',
agencyName: '',
staffName: '', staffName: '',
staffId: '', staffId: '',
rbacSource: '', rbacSource: '',
getList() getList()
} }
function getList() { function getList() {
getAgencyAll()
if(!IsPermission(route, 'QUERY_BASE')){ if(!IsPermission(route, 'QUERY_BASE')){
ElMessage.error('您没有权限,请联系管理员!') ElMessage.error('您没有权限,请联系管理员!')
return return
params[key] = searchFormList[key] params[key] = searchFormList[key]
} }
} }
let agencyIds = []
if (searchFormList.agencyId) {
agencyIds = [searchFormList.agencyId]
}else {
agencyIds = []
}
params.agencyIds = agencyIds
BaseService.postN('/userw/staff/page', params).then((res: any) => { BaseService.postN('/userw/staff/page', params).then((res: any) => {
if (res && res.code === 0) { if (res && res.code === 0) {
let bizContent = res.data let bizContent = res.data
bottom: 20px; bottom: 20px;
right: 20px; right: 20px;
} }
::v-deep .my-tree-select .el-tag{
max-width: 80px!important;
}
</style> </style>

正在加载...
取消
保存