From 048a1d039d347cf109e053961865f7b01d721643 Mon Sep 17 00:00:00 2001 From: zhouwx <1175765986@qq.com> Date: 星期三, 27 八月 2025 16:36:27 +0800 Subject: [PATCH] 修改 --- src/views/safetyReview/projectManage/components/expertsList.vue | 38 +++++++++++++++++++++++++------------- 1 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/views/safetyReview/projectManage/components/expertsList.vue b/src/views/safetyReview/projectManage/components/expertsList.vue index 2595871..c132417 100644 --- a/src/views/safetyReview/projectManage/components/expertsList.vue +++ b/src/views/safetyReview/projectManage/components/expertsList.vue @@ -10,6 +10,7 @@ <el-input v-model.trim="queryParams.name" placeholder="姓名" + clearable style="width: 250px" /> </el-form-item> @@ -17,25 +18,27 @@ <el-input v-model.trim="queryParams.phone" placeholder="手机号" + clearable style="width: 250px" /> </el-form-item> <el-form-item label="等级"> - <el-select v-model="queryParams.ratingLevel" style="width: 250px" placeholder="等级" > + <el-select v-model="queryParams.ratingLevel" clearable style="width: 250px" placeholder="等级" > <el-option v-for="item in levelList" :key="item.id" :label="item.name" - :value="item.name" + :value="item.id" /> </el-select> </el-form-item> <el-form-item label="专业领域"> <el-cascader + clearable style="width: 100%" v-model="expertType" :options="domainList" - :props="{ expandTrigger: 'hover',value: 'id',label: 'classifyName' }" + :props="{ expandTrigger: 'hover',value: 'classifyName',label: 'classifyName' }" @change="professionChange" > </el-cascader> @@ -136,6 +139,12 @@ const openDialog = (type,choosedData,domainList) => { research() + nextTick(() => { + if(tableRef.value){ + tableRef.value.clearSelection() + } + + }) data.dialogVisible = true data.choosed = choosedData.map(item => { return{ @@ -163,6 +172,8 @@ emit('getName',data.title,data.choosed) tableRef.value.clearSelection() data.dialogVisible = false + }else{ + ElMessage.warning('请选择专家') } } @@ -174,11 +185,11 @@ return{ ...item, birthdayName: item.birthday ? item.birthday.slice(0,10) : '', - supportName: item.supportDirectionSafety.split(',') + supportName: item.supportDirectionSafety?.split(',') } }) data.expertList.forEach(item => { - item.supportName.forEach((s,index) => { + item.supportName?.forEach((s,index) => { switch (s){ case '1': item.supportName[index] = '现场检查' @@ -226,15 +237,17 @@ // tableRef.value.toggleRowSelection(item, true) // }) - // tableRef.value.clearSelection() - // if(selection.length == 0) { - // return - // } - // tableRef.value.toggleRowSelection(row, true); + tableRef.value.clearSelection() + if(selection.length == 0) { + return + } + tableRef.value.toggleRowSelection(row, true); + data.selected = [row] }) const handleSelectionChange = (val) => { - data.selected = val + // debugger + // data.selected = val } const search = ()=>{ @@ -258,8 +271,7 @@ const professionChange=(value)=> { console.log(value,'val') - data.queryParams.bigClassify = value[0] - data.queryParams.smallClassify = value[1] + data.queryParams.domain = value[1] } defineExpose({ -- Gitblit v1.9.2