| | |
| | | @click="openDialog('add',{})" |
| | | >新增</el-button> |
| | | </div> |
| | | <div style="margin-top: 15px;margin-bottom: 15px;"> |
| | | <el-radio-group v-model="queryParams.expertType" @change="changeType"> |
| | | <div style="margin-top: 15px;margin-bottom: 15px"> |
| | | <el-radio-group v-model="queryParams.expertType"> |
| | | <el-radio-button label="">全部</el-radio-button> |
| | | <el-radio-button label="1">安全评价</el-radio-button> |
| | | <el-radio-button label="2">检验检测</el-radio-button> |
| | | </el-radio-group> |
| | | </div> |
| | | <div style="margin-bottom: 15px; display: flex;align-items: center"> |
| | | <el-input |
| | | v-model="queryParams.name" |
| | | placeholder="姓名" |
| | | style="width: 220px;margin-right: 12px" |
| | | /> |
| | | <el-input |
| | | v-model="queryParams.phone" |
| | | placeholder="手机号" |
| | | style="width: 220px;margin-right: 12px" |
| | | /> |
| | | <el-select v-model="queryParams.level" style="width: 220px;margin-right: 12px" placeholder="评价师等级" > |
| | | <el-option |
| | | v-for="item in levelList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | /> |
| | | </el-select> |
| | | <el-select v-model="queryParams.major" value-key="id" style="width: 220px;margin-right: 12px" placeholder="专业方向"> |
| | | <el-option |
| | | v-for="item in majorList" |
| | | :key="item.id" |
| | | :label="item.label" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | <el-select v-model="queryParams.post" style="width: 220px;margin-right: 12px" placeholder="请选择职务"> |
| | | <el-option |
| | | v-for="item in postList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | /> |
| | | </el-select> |
| | | <el-button type="primary" icon="Filter" @click="search">查询</el-button> |
| | | <el-button type="primary" icon="Filter" @click="research">重置</el-button> |
| | | </div> |
| | | |
| | | <!-- 表格数据 --> |
| | |
| | | v-model:limit="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | <expert-dialog ref="expertRef" @getList="getList"></expert-dialog> |
| | | <expert-dialog ref="expertRef" @getList="getList" :majorList="majorList" :levelList="levelList" :postList="postList"></expert-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {getCurrentInstance, onMounted, reactive, ref, toRefs} from "vue"; |
| | | import expertDialog from "./components/expertDialog.vue" |
| | | import {getDictList} from "@/api/backManage/evaluate"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import Cookies from "js-cookie"; |
| | | import {delMonitor, getExpertList, getMonitorList} from "@/api/sysUsers"; |
| | |
| | | const expertRef = ref(); |
| | | const data = reactive({ |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | expertType: "" |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | expertType: "", |
| | | name: '', |
| | | phone: '', |
| | | level: '', |
| | | major: null, |
| | | post: '' |
| | | }, |
| | | total: 0, |
| | | dataList: [] |
| | | |
| | | |
| | | dataList: [], |
| | | majorList: [], |
| | | levelList: [ |
| | | { |
| | | id: '1', |
| | | name: '一级' |
| | | }, |
| | | { |
| | | id: '2', |
| | | name: '二级' |
| | | }, |
| | | { |
| | | id: '3', |
| | | name: '三级' |
| | | }, |
| | | { |
| | | id: '4', |
| | | name: '其他' |
| | | }, |
| | | ], |
| | | postList: [ |
| | | { |
| | | id: '1', |
| | | name: '法人' |
| | | }, |
| | | { |
| | | id: '2', |
| | | name: '过程控制负责人' |
| | | }, |
| | | { |
| | | id: '3', |
| | | name: '机构负责人' |
| | | }, |
| | | { |
| | | id: '4', |
| | | name: '技术负责人' |
| | | }, |
| | | { |
| | | id: '5', |
| | | name: '员工' |
| | | }, |
| | | ] |
| | | }); |
| | | |
| | | const { queryParams, total, dataList } = toRefs(data); |
| | | const { queryParams, total, dataList, majorList, levelList, postList } = toRefs(data); |
| | | onMounted(()=>{ |
| | | getList() |
| | | getMajor() |
| | | }) |
| | | const getList = async () => { |
| | | loading.value = true |
| | |
| | | loading.value = false |
| | | } |
| | | |
| | | const getMajor = async () => { |
| | | const queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 50, |
| | | dictType: 'sys_major_orientation' |
| | | } |
| | | const res = await getDictList(queryParams); |
| | | if(res.code === 200){ |
| | | data.majorList = res.data.list |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | |
| | | const search = ()=>{ |
| | | data.queryParams.pageNum = 1 |
| | | getList() |
| | | } |
| | | |
| | | const research = ()=>{ |
| | | data.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | expertType: "", |
| | | name: '', |
| | | phone: '', |
| | | level: '', |
| | | major: null, |
| | | post: '' |
| | | } |
| | | getList() |
| | | } |
| | | |
| | | const openDialog = (type, value) => { |
| | | expertRef.value.openDialog(type, value); |
| | | } |
| | | const changeType = (val) => { |
| | | console.log("val", val) |
| | | queryParams.expertType = val; |
| | | queryParams.pageNum = 1; |
| | | getList(); |
| | | } |
| | | |
| | | /** 重置新增的表单以及其他数据 */ |