From 9617b90429133e5a896817c6a3ee2a569a63ac35 Mon Sep 17 00:00:00 2001 From: zhouwx <1175765986@qq.com> Date: 星期三, 11 十二月 2024 17:03:40 +0800 Subject: [PATCH] bug修改 --- .env.development | 4 +- src/views/homePage.vue | 4 +- src/api/backManage/insitution.js | 8 ++++ src/views/safetyReview/userManage/expertUsers/index.vue | 62 +++++++++++++++++++++++++++++-- src/views/safetyReview/userManage/institutionUsers/index.vue | 16 +++++++- 5 files changed, 84 insertions(+), 10 deletions(-) diff --git a/.env.development b/.env.development index 77a3fcf..9d8beb7 100644 --- a/.env.development +++ b/.env.development @@ -8,8 +8,8 @@ #黄镇 #VITE_APP_BASE_API = 'http://192.168.0.47:8085' -#孔哥 -VITE_APP_BASE_API = 'http://192.168.2.15:8088/api' +#贺哥 +VITE_APP_BASE_API = 'http://192.168.2.11:8088/api' #线上 #VITE_APP_BASE_API = 'http://106.15.95.149:8088/api' diff --git a/src/api/backManage/insitution.js b/src/api/backManage/insitution.js index 1c31720..a2c2bb9 100644 --- a/src/api/backManage/insitution.js +++ b/src/api/backManage/insitution.js @@ -23,3 +23,11 @@ params: params }) } + +export function getAllAgency(params) { + return request({ + url: '/system/agency/agencyLists', + method: 'get', + params: params + }) +} diff --git a/src/views/homePage.vue b/src/views/homePage.vue index e6384f0..926f51f 100644 --- a/src/views/homePage.vue +++ b/src/views/homePage.vue @@ -36,8 +36,8 @@ <List style="width: 1em; height: 1em; margin-right: 8px" /> <div>机构公示</div> </div> - <div :class="state.activeMenu == 5?'active': ''" style="margin-left: 168px" @click="toExpert"> - <el-icon><Medal /></el-icon> + <div :class="state.activeMenu == 5?'active': ''" style="margin-left: 160px" @click="toExpert"> + <el-icon style="width: 1em; height: 1em; margin-right: 8px"><Medal /></el-icon> <div>应急专家管理</div> </div> </div> diff --git a/src/views/safetyReview/userManage/expertUsers/index.vue b/src/views/safetyReview/userManage/expertUsers/index.vue index 4279d1b..562d129 100644 --- a/src/views/safetyReview/userManage/expertUsers/index.vue +++ b/src/views/safetyReview/userManage/expertUsers/index.vue @@ -28,6 +28,26 @@ placeholder="手机号" style="width: 220px;margin-right: 12px" /> + <el-select + v-model="queryParams.agencyName" + filterable + remote + @change="selectValue" + reserve-keyword + placeholder="所属机构" + remote-show-suffix + :remote-method="getCompanyList" + :loading="loadingCompany" + style="width: 240px;margin-right: 12px" + clearable + > + <el-option + v-for="item in data.companyList" + :key="item.id" + :label="item.name" + :value="item.name" + /> + </el-select> <el-select v-model="queryParams.level" style="width: 220px;margin-right: 12px" placeholder="评价师等级" > <el-option v-for="item in levelList" @@ -44,7 +64,7 @@ :value="item.id" /> </el-select> - <el-select v-model="queryParams.post" style="width: 220px;margin-right: 12px" placeholder="请选择职务"> + <el-select v-model="queryParams.post" style="width: 220px;margin-right: 12px" placeholder="职务"> <el-option v-for="item in postList" :key="item.id" @@ -179,6 +199,7 @@ import noPic from '@/assets/images/noPic.png' import Cookies from "js-cookie"; import {delMonitor, getExpertList, getMonitorList} from "@/api/sysUsers"; +import {getAllAgency} from "@/api/backManage/insitution"; const { proxy } = getCurrentInstance(); const loading = ref(false); const expertRef = ref(); @@ -192,7 +213,8 @@ phone: '', level: '', major: null, - post: '' + post: '', + agencyName: '' }, total: 0, dataList: [], @@ -236,7 +258,8 @@ id: '5', name: '员工' }, - ] + ], + companyList: [] }); const { queryParams, total, dataList, majorList, levelList, postList } = toRefs(data); @@ -244,6 +267,23 @@ getList() getMajor() }) +const loadingCompany = ref(false) +const getCompanyList = async (val)=>{ + if(val != ""){ + loadingCompany.value = true; + const queryParams = { + name: val + } + const res = await getAllAgency(queryParams) + if (res.code == 200) { + loadingCompany.value = false; + data.companyList = res.data + + } else { + ElMessage.warning(res.message) + } + } +} const getList = async () => { loading.value = true const res = await getExpertList(data.queryParams) @@ -295,8 +335,10 @@ phone: '', level: '', major: null, - post: '' + post: '', + agencyName: '' } + data.companyList = [] getList() } @@ -337,6 +379,18 @@ }) } +const selectValue = (val) => { + console.log('val',val) + if(val == ""){ + data.companyList = [] + } + // data.companyList.forEach(item => { + // if(item.name === val){ + // data.queryParams.companyId = item.id + // } + // }) +} + </script> <style scoped lang="scss"> .demo-image__error .image-slot { diff --git a/src/views/safetyReview/userManage/institutionUsers/index.vue b/src/views/safetyReview/userManage/institutionUsers/index.vue index 15b4c5f..4915282 100644 --- a/src/views/safetyReview/userManage/institutionUsers/index.vue +++ b/src/views/safetyReview/userManage/institutionUsers/index.vue @@ -1,5 +1,12 @@ <template> <div class="app-container"> + <div style="margin-top: 15px;margin-bottom: 15px;"> + <el-radio-group v-model="queryParams.attribute" @change="changeBtn"> + <el-radio-button label="">全部</el-radio-button> + <el-radio-button label="0">疆内</el-radio-button> + <el-radio-button label="1">疆外</el-radio-button> + </el-radio-group> + </div> <div style="margin-bottom: 10px"> <el-form :inline="true" style="display: flex;align-items: flex-start;flex-wrap: wrap;" > <el-form-item label="机构名称:" > @@ -121,7 +128,8 @@ pageNum: 1, pageSize: 10, agencyName: '', - state: null + state: null, + attribute: "", }, total: 0, dataList: [], @@ -232,6 +240,9 @@ }) } +const changeBtn = (val) => { + getList() +} const handleDelete = (val) => { @@ -265,7 +276,8 @@ pageNum: 1, pageSize: 10, agencyName: '', - state: null + state: null, + attribute: "", } getList(); } -- Gitblit v1.9.2