| | |
| | | >新增</el-button> |
| | | </div> |
| | | <div style="margin-top: 15px;margin-bottom: 15px;"> |
| | | <el-radio-group v-model="queryParams.checkType" @change="changeType"> |
| | | <el-radio-button label="all">全部</el-radio-button> |
| | | <el-radio-group v-model="queryParams.expertType" @change="changeType"> |
| | | <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> |
| | |
| | | |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true"> |
| | | <el-table-column label="用户ID" prop="userID" align="center" /> |
| | | <el-table-column label="用户ID" prop="id" align="center" /> |
| | | <el-table-column label="姓名" prop="name" align="center" /> |
| | | <el-table-column label="手机号" prop="phone" align="center" /> |
| | | <el-table-column label="用户名" prop="username" align="center" /> |
| | | <el-table-column label="性别" prop="sex" align="center" /> |
| | | <el-table-column label="所属机构" prop="institution" align="center" /> |
| | | <el-table-column label="性别" prop="sex" align="center" > |
| | | <template #default="scope"> |
| | | <span v-if="scope.row.sex === 0">男</span> |
| | | <span v-if="scope.row.sex === 1">女</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="所属机构" prop="agency.name" align="center" /> |
| | | <el-table-column label="社保" prop="socialSecurity" align="center" width="120"> |
| | | <template #default="scope"> |
| | | <div class="demo-image__preview" v-if="scope.row.socialList && scope.row.socialList.length>0"> |
| | | <div class="demo-image__preview" v-if="scope.row.socialAttach && scope.row.socialAttach.length>0"> |
| | | <el-image |
| | | style="width: 100px; height: 100px" |
| | | :src="scope.row.socialList[0]" |
| | | :src= "scope.row.socialAttach[0]" |
| | | :zoom-rate="1.2" |
| | | :max-scale="7" |
| | | :min-scale="0.2" |
| | | :preview-src-list="scope.row.socialList" |
| | | :preview-src-list="scope.row.socialAttach" |
| | | :initial-index="0" |
| | | fit="cover" |
| | | preview-teleported="true" |
| | |
| | | </el-table-column> |
| | | <el-table-column label="医保" prop="medicalInsurance" align="center" width="120"> |
| | | <template #default="scope"> |
| | | <div class="demo-image__preview" v-if="scope.row.medicalList && scope.row.medicalList.length>0"> |
| | | <div class="demo-image__preview" v-if="scope.row.medicalAttach && scope.row.medicalAttach.length>0"> |
| | | <el-image |
| | | style="width: 100px; height: 100px" |
| | | :src="scope.row.medicalList[0]" |
| | | :src="scope.row.medicalAttach[0]" |
| | | :zoom-rate="1.2" |
| | | :max-scale="7" |
| | | :min-scale="0.2" |
| | | :preview-src-list="scope.row.medicalList" |
| | | :preview-src-list="scope.row.medicalAttach" |
| | | :initial-index="0" |
| | | fit="cover" |
| | | preview-teleported="true" |
| | |
| | | </el-table-column> |
| | | <el-table-column label="工资清单" prop="salaryList" align="center" width="120"> |
| | | <template #default="scope"> |
| | | <div class="demo-image__preview" v-if="scope.row.salaryList && scope.row.salaryList.length>0"> |
| | | <div class="demo-image__preview" v-if="scope.row.salaryAttach && scope.row.salaryAttach.length>0"> |
| | | <el-image |
| | | style="width: 100px; height: 100px" |
| | | :src="scope.row.salaryList[0]" |
| | | :src= "scope.row.salaryAttach[0]" |
| | | :zoom-rate="1.2" |
| | | :max-scale="7" |
| | | :min-scale="0.2" |
| | | :preview-src-list="scope.row.salaryList" |
| | | :preview-src-list="scope.row.salaryAttach" |
| | | :initial-index="0" |
| | | fit="cover" |
| | | preview-teleported="true" |
| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="职务" prop="duty" align="center" /> |
| | | <el-table-column label="职称" prop="lecture" align="center" /> |
| | | <el-table-column label="职务" prop="post" align="center" /> |
| | | <el-table-column label="职称" prop="jobTitle" align="center" /> |
| | | <el-table-column label="专业方向" prop="major" align="center" /> |
| | | <el-table-column label="业绩汇总" prop="summary" align="center" /> |
| | | <el-table-column label="最近评价时间" prop="lastTime" align="center" width="120" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)" v-hasPermi="['system:role:edit']">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)" v-hasPermi="['system:role:remove']">删除</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)" >删除</el-button> |
| | | <el-button link type="primary" @click="openDialog('pwd',scope.row)">修改密码</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | @pagination="getList" |
| | | /> |
| | | </div> |
| | | <expert-dialog ref="expertRef" @getList="getList"></expert-dialog> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {getCurrentInstance, reactive, ref, toRefs} from "vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import {getCurrentInstance, onMounted, reactive, ref, toRefs} from "vue"; |
| | | import expertDialog from "./components/expertDialog.vue" |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import Cookies from "js-cookie"; |
| | | import {delMonitor, getExpertList, getMonitorList} from "@/api/sysUsers"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | | const expertRef = ref(); |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | checkType: "all" |
| | | |
| | | expertType: "" |
| | | }, |
| | | total: 0, |
| | | dataList: [ |
| | | ] |
| | | dataList: [] |
| | | |
| | | |
| | | }); |
| | | |
| | | const { queryParams, total, dataList } = toRefs(data); |
| | | |
| | | const getList = () => { |
| | | loading.value = true; |
| | | console.log("获取数据") |
| | | loading.value = false; |
| | | onMounted(()=>{ |
| | | getList() |
| | | }) |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getExpertList(data.queryParams) |
| | | if(res.code == 200){ |
| | | data.dataList = res.data.list.map(item => { |
| | | return{ |
| | | ...item, |
| | | socialAttach: item.socialAttach.map(s => { return import.meta.env.VITE_APP_BASE_API + '/' + s.path}), |
| | | medicalAttach: item.medicalAttach.map(s => { return import.meta.env.VITE_APP_BASE_API + '/' + s.path}), |
| | | salaryAttach: item.salaryAttach.map(s => { return import.meta.env.VITE_APP_BASE_API + '/' + s.path}) |
| | | } |
| | | }) |
| | | console.log('RES',data.dataList) |
| | | data.total = res.data.total |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | loading.value = false |
| | | } |
| | | |
| | | const openDialog = (type, value) => { |
| | |
| | | } |
| | | const changeType = (val) => { |
| | | console.log("val", val) |
| | | queryParams.checkType = val; |
| | | queryParams.expertType = val; |
| | | queryParams.pageNum = 1; |
| | | getList(); |
| | | } |
| | |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | |
| | | const res = await delMonitor(val.id) |
| | | if(res.code == 200){ |
| | | ElMessage.success('数据删除成功') |
| | | getList() |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | } |
| | | |