diff --git a/src/views/dataManagement/components/data/device.vue b/src/views/dataManagement/components/data/device.vue index 23efd69..8565f52 100644 --- a/src/views/dataManagement/components/data/device.vue +++ b/src/views/dataManagement/components/data/device.vue @@ -24,7 +24,7 @@ watch(() => props.lab, (newVal) => { if (newVal) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -439,7 +439,7 @@ onMounted(() => { year.value = String(currentYear) if (props.lab) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab setTimeout(() => { fetchData() }) diff --git a/src/views/dataManagement/components/data/device.vue b/src/views/dataManagement/components/data/device.vue index 23efd69..8565f52 100644 --- a/src/views/dataManagement/components/data/device.vue +++ b/src/views/dataManagement/components/data/device.vue @@ -24,7 +24,7 @@ watch(() => props.lab, (newVal) => { if (newVal) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -439,7 +439,7 @@ onMounted(() => { year.value = String(currentYear) if (props.lab) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab setTimeout(() => { fetchData() }) diff --git a/src/views/dataManagement/components/data/eqptDevice.vue b/src/views/dataManagement/components/data/eqptDevice.vue index 83a7083..31c6d26 100644 --- a/src/views/dataManagement/components/data/eqptDevice.vue +++ b/src/views/dataManagement/components/data/eqptDevice.vue @@ -11,6 +11,9 @@ import { getCustomerInfoList } from '@/api/resource/customer' import { getBaseInfo, getNoVerificationAmount, getDeviceSource, getDeviceType, getAlreadyMeasured, getShouldMeasured, getDevicePerformance, exportDeviceType, getDeviceSourceDept, getDeviceTypeList } from '@/api/dataManagement/data/eqptDevice' import { eqptDevice } from './img' +import { getEquipmentList } from '@/api/business/manager/order' +import { uniqueMultiArray } from '@/utils/Array' +import { SCHEDULE } from '@/utils/scheduleDict' const props = defineProps({ lab: { type: String, @@ -23,6 +26,14 @@ // 组别 const groupCodeList = ref([]) const checkDestinationList = ref([]) +// 受检设备 +const sampleNameList = ref([]) +// 规格型号 +const modelList = ref([]) +// 辅助字段 +const helpInstructionList = ref([]) +// 所有受检设备 +const allDeviceList = ref([]) // 委托方 const customerList = ref([]) setTimeout(() => { @@ -155,11 +166,14 @@ customerId: '', checkDestination: '' }) -const selectForMeasured = ref([]) +const selectForMeasured = ref([]) +setTimeout(() => { + selectForMeasured.value = [dayjs().format('YYYY-MM-DD'), dayjs().add(6, 'month').format('YYYY-MM-DD')] +}, 2000); watch(() => selectForMeasured.value, (newVal) => { if (newVal && newVal?.length === 2) { searchQueryForMeasured.value.timeStart = `${newVal[0]} 00:00:00` - searchQueryForMeasured.value.timeEnd = `${newVal[0]} 23:59:59` + searchQueryForMeasured.value.timeEnd = `${newVal[1]} 23:59:59` } else { @@ -179,23 +193,27 @@ timeEnd: searchQueryForMeasured.value.timeEnd ? searchQueryForMeasured.value.timeEnd : searchQueryResult.value.timeEnd, }).then(res => { // console.log(res.data, '受检设备已检数量趋势') - const data = [ + const initData = [ { name: '海口实验室', value: 'hAmount', - data: '' + data: '', + showLab: ['H', ''] }, { name: '西昌实验室', value: 'xAmount', - data: '' + data: '', + showLab: ['X', ''] }, { name: '外送', value: 'outAmount', - data: '' + data: '', + showLab: ['X', 'H', ''] }, ] + const data = initData.filter((item: any) => item.showLab.includes(props.lab === '全站' ? '' : props.lab)) current.xAxisData = res.data.map((item: any) => item.dimension) current.data = data.map((item: any) => ({ name: item.name, @@ -218,11 +236,14 @@ customerId: '', checkDestination: '' }) -const selectForShouldMeasured = ref([]) +const selectForShouldMeasured = ref([]) +setTimeout(() => { + selectForShouldMeasured.value = [dayjs().format('YYYY-MM-DD'), dayjs().add(6, 'month').format('YYYY-MM-DD')] +}, 2000); watch(() => selectForShouldMeasured.value, (newVal) => { if (newVal && newVal?.length === 2) { searchQueryForShouldMeasured.value.timeStart = `${newVal[0]} 00:00:00` - searchQueryForShouldMeasured.value.timeEnd = `${newVal[0]} 23:59:59` + searchQueryForShouldMeasured.value.timeEnd = `${newVal[1]} 23:59:59` fetchQueryForShouldMeasured() } else { @@ -252,23 +273,28 @@ timeEnd: searchQueryForShouldMeasured.value.timeEnd ? searchQueryForShouldMeasured.value.timeEnd : searchQueryResult.value.timeEnd, }).then(res => { // console.log(res.data, '受检设备应检数量趋势') - const data = [ + const initData = [ { name: '海口实验室', value: 'hAmount', - data: '' + data: '', + showLab: ['H', ''] }, { name: '西昌实验室', value: 'xAmount', - data: '' + data: '', + showLab: ['X', ''] }, { name: '外送', value: 'outAmount', - data: '' + data: '', + showLab: ['X', 'H', ''] }, ] + const data = initData.filter((item: any) => item.showLab.includes(props.lab === '全站' ? '' : props.lab)) + console.log(data, props.lab) current.xAxisData = res.data.map((item: any) => item.dimension) current.data = data.map((item: any) => ({ name: item.name, @@ -286,7 +312,7 @@ } watch(() => props.lab, newVal => { if (newVal) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -445,6 +471,45 @@ window.dispatchEvent(resize) }) }) +// 受检设备性能趋势查询条件 +const searchQueryForDevicePerformance = ref({ + sampleName: '', + helpInstruction: '', + model: '', + manufacturer: '' +}) +// 改变设备名称查询条件 +const changeSampleName = (value: string) => { + modelList.value = [] + helpInstructionList.value = [] + searchQueryForDevicePerformance.value.model = '' + searchQueryForDevicePerformance.value.helpInstruction = '' + modelList.value = uniqueMultiArray(allDeviceList.value.filter((item: any) => item.equipmentName === value).map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'model',) + helpInstructionList.value = modelList.value +} +// 改变规格型号查询条件 +const changeHelpInstruction = (value: string) => { + helpInstructionList.value = [] + searchQueryForDevicePerformance.value.helpInstruction = '' + helpInstructionList.value = modelList.value.filter(item => item.model === value) +} +watch(() => searchQueryForDevicePerformance.value, () => { + fetchQueryForDevicePerformance() +}, { + deep: true +}) +// 获取受检设备性能趋势数据 +const fetchQueryForDevicePerformance = () => { + const current3 = showChart.value.filter(item => item.name === '受检设备性能趋势')[0] + current3.loading = true + getDevicePerformance({ ...searchQueryForDevicePerformance.value, ...searchQueryResult.value, offset: 1, limit: 9999 }).then(res => { + // console.log(res.data, '受检设备性能趋势') + current3.data = res.data.rows.map((item: any, index: number) => ({ ...item, index: index + 1 })) + current3.loading = false + }).catch(() => { + current3.loading = false + }) +} // 获取数据 const loadingBase = ref(false) function fetchData() { @@ -575,7 +640,7 @@ onMounted(() => { // year.value = String(currentYear) if (props.lab) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab // setTimeout(() => { // fetchData() // }, 10) @@ -611,6 +676,13 @@ value: item.id })) }) + getEquipmentList({ offset: 1, limit: 9999 }).then((res) => { + console.log(res.data, '手贱设备') + allDeviceList.value = res.data.rows + sampleNameList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'sampleName',) + modelList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'model',) + helpInstructionList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'helpInstruction',) + }) } fetchDict() // 受检设备种类数量分析-列表导出 @@ -694,7 +766,12 @@ } // if (name === '受检设备来源分析') { let current = showChart.value.findIndex((item: any) => item.name === name) + if (showChart.value[current].type !== 'rank-table') { + return + } showChart.value[current] = name === '受检设备来源分析' ? deviceSourceData.value : deviceTypeData.value + // console.log(current, 'current') + showChart.value[current].loading = false // } } @@ -807,6 +884,27 @@ :value="item.value" /> +
+ + + + + + + + + + + + + + +
props.lab, (newVal) => { if (newVal) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -439,7 +439,7 @@ onMounted(() => { year.value = String(currentYear) if (props.lab) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab setTimeout(() => { fetchData() }) diff --git a/src/views/dataManagement/components/data/eqptDevice.vue b/src/views/dataManagement/components/data/eqptDevice.vue index 83a7083..31c6d26 100644 --- a/src/views/dataManagement/components/data/eqptDevice.vue +++ b/src/views/dataManagement/components/data/eqptDevice.vue @@ -11,6 +11,9 @@ import { getCustomerInfoList } from '@/api/resource/customer' import { getBaseInfo, getNoVerificationAmount, getDeviceSource, getDeviceType, getAlreadyMeasured, getShouldMeasured, getDevicePerformance, exportDeviceType, getDeviceSourceDept, getDeviceTypeList } from '@/api/dataManagement/data/eqptDevice' import { eqptDevice } from './img' +import { getEquipmentList } from '@/api/business/manager/order' +import { uniqueMultiArray } from '@/utils/Array' +import { SCHEDULE } from '@/utils/scheduleDict' const props = defineProps({ lab: { type: String, @@ -23,6 +26,14 @@ // 组别 const groupCodeList = ref([]) const checkDestinationList = ref([]) +// 受检设备 +const sampleNameList = ref([]) +// 规格型号 +const modelList = ref([]) +// 辅助字段 +const helpInstructionList = ref([]) +// 所有受检设备 +const allDeviceList = ref([]) // 委托方 const customerList = ref([]) setTimeout(() => { @@ -155,11 +166,14 @@ customerId: '', checkDestination: '' }) -const selectForMeasured = ref([]) +const selectForMeasured = ref([]) +setTimeout(() => { + selectForMeasured.value = [dayjs().format('YYYY-MM-DD'), dayjs().add(6, 'month').format('YYYY-MM-DD')] +}, 2000); watch(() => selectForMeasured.value, (newVal) => { if (newVal && newVal?.length === 2) { searchQueryForMeasured.value.timeStart = `${newVal[0]} 00:00:00` - searchQueryForMeasured.value.timeEnd = `${newVal[0]} 23:59:59` + searchQueryForMeasured.value.timeEnd = `${newVal[1]} 23:59:59` } else { @@ -179,23 +193,27 @@ timeEnd: searchQueryForMeasured.value.timeEnd ? searchQueryForMeasured.value.timeEnd : searchQueryResult.value.timeEnd, }).then(res => { // console.log(res.data, '受检设备已检数量趋势') - const data = [ + const initData = [ { name: '海口实验室', value: 'hAmount', - data: '' + data: '', + showLab: ['H', ''] }, { name: '西昌实验室', value: 'xAmount', - data: '' + data: '', + showLab: ['X', ''] }, { name: '外送', value: 'outAmount', - data: '' + data: '', + showLab: ['X', 'H', ''] }, ] + const data = initData.filter((item: any) => item.showLab.includes(props.lab === '全站' ? '' : props.lab)) current.xAxisData = res.data.map((item: any) => item.dimension) current.data = data.map((item: any) => ({ name: item.name, @@ -218,11 +236,14 @@ customerId: '', checkDestination: '' }) -const selectForShouldMeasured = ref([]) +const selectForShouldMeasured = ref([]) +setTimeout(() => { + selectForShouldMeasured.value = [dayjs().format('YYYY-MM-DD'), dayjs().add(6, 'month').format('YYYY-MM-DD')] +}, 2000); watch(() => selectForShouldMeasured.value, (newVal) => { if (newVal && newVal?.length === 2) { searchQueryForShouldMeasured.value.timeStart = `${newVal[0]} 00:00:00` - searchQueryForShouldMeasured.value.timeEnd = `${newVal[0]} 23:59:59` + searchQueryForShouldMeasured.value.timeEnd = `${newVal[1]} 23:59:59` fetchQueryForShouldMeasured() } else { @@ -252,23 +273,28 @@ timeEnd: searchQueryForShouldMeasured.value.timeEnd ? searchQueryForShouldMeasured.value.timeEnd : searchQueryResult.value.timeEnd, }).then(res => { // console.log(res.data, '受检设备应检数量趋势') - const data = [ + const initData = [ { name: '海口实验室', value: 'hAmount', - data: '' + data: '', + showLab: ['H', ''] }, { name: '西昌实验室', value: 'xAmount', - data: '' + data: '', + showLab: ['X', ''] }, { name: '外送', value: 'outAmount', - data: '' + data: '', + showLab: ['X', 'H', ''] }, ] + const data = initData.filter((item: any) => item.showLab.includes(props.lab === '全站' ? '' : props.lab)) + console.log(data, props.lab) current.xAxisData = res.data.map((item: any) => item.dimension) current.data = data.map((item: any) => ({ name: item.name, @@ -286,7 +312,7 @@ } watch(() => props.lab, newVal => { if (newVal) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -445,6 +471,45 @@ window.dispatchEvent(resize) }) }) +// 受检设备性能趋势查询条件 +const searchQueryForDevicePerformance = ref({ + sampleName: '', + helpInstruction: '', + model: '', + manufacturer: '' +}) +// 改变设备名称查询条件 +const changeSampleName = (value: string) => { + modelList.value = [] + helpInstructionList.value = [] + searchQueryForDevicePerformance.value.model = '' + searchQueryForDevicePerformance.value.helpInstruction = '' + modelList.value = uniqueMultiArray(allDeviceList.value.filter((item: any) => item.equipmentName === value).map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'model',) + helpInstructionList.value = modelList.value +} +// 改变规格型号查询条件 +const changeHelpInstruction = (value: string) => { + helpInstructionList.value = [] + searchQueryForDevicePerformance.value.helpInstruction = '' + helpInstructionList.value = modelList.value.filter(item => item.model === value) +} +watch(() => searchQueryForDevicePerformance.value, () => { + fetchQueryForDevicePerformance() +}, { + deep: true +}) +// 获取受检设备性能趋势数据 +const fetchQueryForDevicePerformance = () => { + const current3 = showChart.value.filter(item => item.name === '受检设备性能趋势')[0] + current3.loading = true + getDevicePerformance({ ...searchQueryForDevicePerformance.value, ...searchQueryResult.value, offset: 1, limit: 9999 }).then(res => { + // console.log(res.data, '受检设备性能趋势') + current3.data = res.data.rows.map((item: any, index: number) => ({ ...item, index: index + 1 })) + current3.loading = false + }).catch(() => { + current3.loading = false + }) +} // 获取数据 const loadingBase = ref(false) function fetchData() { @@ -575,7 +640,7 @@ onMounted(() => { // year.value = String(currentYear) if (props.lab) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab // setTimeout(() => { // fetchData() // }, 10) @@ -611,6 +676,13 @@ value: item.id })) }) + getEquipmentList({ offset: 1, limit: 9999 }).then((res) => { + console.log(res.data, '手贱设备') + allDeviceList.value = res.data.rows + sampleNameList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'sampleName',) + modelList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'model',) + helpInstructionList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'helpInstruction',) + }) } fetchDict() // 受检设备种类数量分析-列表导出 @@ -694,7 +766,12 @@ } // if (name === '受检设备来源分析') { let current = showChart.value.findIndex((item: any) => item.name === name) + if (showChart.value[current].type !== 'rank-table') { + return + } showChart.value[current] = name === '受检设备来源分析' ? deviceSourceData.value : deviceTypeData.value + // console.log(current, 'current') + showChart.value[current].loading = false // } } @@ -807,6 +884,27 @@ :value="item.value" />
+
+ + + + + + + + + + + + + + +
props.lab, (newVal) => { if (newVal) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -114,7 +114,7 @@ customerId: '', groupCode: '', helpInstruction: '', - labCode: props.lab, + labCode: props.lab === '全站' ? '' : props.lab, model: '', sampleName: '', timeEnd: '', @@ -168,7 +168,7 @@ ]) onMounted(() => { if (props.lab) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data @@ -284,7 +284,7 @@ function fetchData() { // 获取基础数据 loadingBase.value = true - getBaseInfo({ labCode: props.lab }).then((res) => { + getBaseInfo({ labCode: props.lab === '全站' ? '' : props.lab }).then((res) => { console.log(res.data, '获取基础数据') baseInfo.value.forEach((item) => { item.data = res.data[item.value] @@ -296,7 +296,7 @@ // 在检设备分析 const current1 = showChart.value.filter(item => item.name === '在检设备分析')[0] current1.loading = true - getDeviceAnalysis({ labCode: props.lab }).then((res) => { + getDeviceAnalysis({ labCode: props.lab === '全站' ? '' : props.lab }).then((res) => { const data = [ { name: '分包方', @@ -342,7 +342,7 @@ // 当年已检设备排行 const current2 = showChart.value.filter(item => item.name === '当年已检设备排行TOP10')[0] current2.loading = true - getAlreadyDeviceRank({ labCode: props.lab }).then((res) => { + getAlreadyDeviceRank({ labCode: props.lab === '全站' ? '' : props.lab }).then((res) => { current2.data = [] for (const i in res.data) { current2.data.push({ @@ -357,7 +357,7 @@ // 检定及时分析 const current3 = showChart.value.filter(item => item.name === '检定及时分析')[0] current3.loading = true - getTimelyAnalysis({ labCode: props.lab }).then((res) => { + getTimelyAnalysis({ labCode: props.lab === '全站' ? '' : props.lab }).then((res) => { const data = [ { name: '提前检定', diff --git a/src/views/dataManagement/components/data/device.vue b/src/views/dataManagement/components/data/device.vue index 23efd69..8565f52 100644 --- a/src/views/dataManagement/components/data/device.vue +++ b/src/views/dataManagement/components/data/device.vue @@ -24,7 +24,7 @@ watch(() => props.lab, (newVal) => { if (newVal) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -439,7 +439,7 @@ onMounted(() => { year.value = String(currentYear) if (props.lab) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab setTimeout(() => { fetchData() }) diff --git a/src/views/dataManagement/components/data/eqptDevice.vue b/src/views/dataManagement/components/data/eqptDevice.vue index 83a7083..31c6d26 100644 --- a/src/views/dataManagement/components/data/eqptDevice.vue +++ b/src/views/dataManagement/components/data/eqptDevice.vue @@ -11,6 +11,9 @@ import { getCustomerInfoList } from '@/api/resource/customer' import { getBaseInfo, getNoVerificationAmount, getDeviceSource, getDeviceType, getAlreadyMeasured, getShouldMeasured, getDevicePerformance, exportDeviceType, getDeviceSourceDept, getDeviceTypeList } from '@/api/dataManagement/data/eqptDevice' import { eqptDevice } from './img' +import { getEquipmentList } from '@/api/business/manager/order' +import { uniqueMultiArray } from '@/utils/Array' +import { SCHEDULE } from '@/utils/scheduleDict' const props = defineProps({ lab: { type: String, @@ -23,6 +26,14 @@ // 组别 const groupCodeList = ref([]) const checkDestinationList = ref([]) +// 受检设备 +const sampleNameList = ref([]) +// 规格型号 +const modelList = ref([]) +// 辅助字段 +const helpInstructionList = ref([]) +// 所有受检设备 +const allDeviceList = ref([]) // 委托方 const customerList = ref([]) setTimeout(() => { @@ -155,11 +166,14 @@ customerId: '', checkDestination: '' }) -const selectForMeasured = ref([]) +const selectForMeasured = ref([]) +setTimeout(() => { + selectForMeasured.value = [dayjs().format('YYYY-MM-DD'), dayjs().add(6, 'month').format('YYYY-MM-DD')] +}, 2000); watch(() => selectForMeasured.value, (newVal) => { if (newVal && newVal?.length === 2) { searchQueryForMeasured.value.timeStart = `${newVal[0]} 00:00:00` - searchQueryForMeasured.value.timeEnd = `${newVal[0]} 23:59:59` + searchQueryForMeasured.value.timeEnd = `${newVal[1]} 23:59:59` } else { @@ -179,23 +193,27 @@ timeEnd: searchQueryForMeasured.value.timeEnd ? searchQueryForMeasured.value.timeEnd : searchQueryResult.value.timeEnd, }).then(res => { // console.log(res.data, '受检设备已检数量趋势') - const data = [ + const initData = [ { name: '海口实验室', value: 'hAmount', - data: '' + data: '', + showLab: ['H', ''] }, { name: '西昌实验室', value: 'xAmount', - data: '' + data: '', + showLab: ['X', ''] }, { name: '外送', value: 'outAmount', - data: '' + data: '', + showLab: ['X', 'H', ''] }, ] + const data = initData.filter((item: any) => item.showLab.includes(props.lab === '全站' ? '' : props.lab)) current.xAxisData = res.data.map((item: any) => item.dimension) current.data = data.map((item: any) => ({ name: item.name, @@ -218,11 +236,14 @@ customerId: '', checkDestination: '' }) -const selectForShouldMeasured = ref([]) +const selectForShouldMeasured = ref([]) +setTimeout(() => { + selectForShouldMeasured.value = [dayjs().format('YYYY-MM-DD'), dayjs().add(6, 'month').format('YYYY-MM-DD')] +}, 2000); watch(() => selectForShouldMeasured.value, (newVal) => { if (newVal && newVal?.length === 2) { searchQueryForShouldMeasured.value.timeStart = `${newVal[0]} 00:00:00` - searchQueryForShouldMeasured.value.timeEnd = `${newVal[0]} 23:59:59` + searchQueryForShouldMeasured.value.timeEnd = `${newVal[1]} 23:59:59` fetchQueryForShouldMeasured() } else { @@ -252,23 +273,28 @@ timeEnd: searchQueryForShouldMeasured.value.timeEnd ? searchQueryForShouldMeasured.value.timeEnd : searchQueryResult.value.timeEnd, }).then(res => { // console.log(res.data, '受检设备应检数量趋势') - const data = [ + const initData = [ { name: '海口实验室', value: 'hAmount', - data: '' + data: '', + showLab: ['H', ''] }, { name: '西昌实验室', value: 'xAmount', - data: '' + data: '', + showLab: ['X', ''] }, { name: '外送', value: 'outAmount', - data: '' + data: '', + showLab: ['X', 'H', ''] }, ] + const data = initData.filter((item: any) => item.showLab.includes(props.lab === '全站' ? '' : props.lab)) + console.log(data, props.lab) current.xAxisData = res.data.map((item: any) => item.dimension) current.data = data.map((item: any) => ({ name: item.name, @@ -286,7 +312,7 @@ } watch(() => props.lab, newVal => { if (newVal) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -445,6 +471,45 @@ window.dispatchEvent(resize) }) }) +// 受检设备性能趋势查询条件 +const searchQueryForDevicePerformance = ref({ + sampleName: '', + helpInstruction: '', + model: '', + manufacturer: '' +}) +// 改变设备名称查询条件 +const changeSampleName = (value: string) => { + modelList.value = [] + helpInstructionList.value = [] + searchQueryForDevicePerformance.value.model = '' + searchQueryForDevicePerformance.value.helpInstruction = '' + modelList.value = uniqueMultiArray(allDeviceList.value.filter((item: any) => item.equipmentName === value).map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'model',) + helpInstructionList.value = modelList.value +} +// 改变规格型号查询条件 +const changeHelpInstruction = (value: string) => { + helpInstructionList.value = [] + searchQueryForDevicePerformance.value.helpInstruction = '' + helpInstructionList.value = modelList.value.filter(item => item.model === value) +} +watch(() => searchQueryForDevicePerformance.value, () => { + fetchQueryForDevicePerformance() +}, { + deep: true +}) +// 获取受检设备性能趋势数据 +const fetchQueryForDevicePerformance = () => { + const current3 = showChart.value.filter(item => item.name === '受检设备性能趋势')[0] + current3.loading = true + getDevicePerformance({ ...searchQueryForDevicePerformance.value, ...searchQueryResult.value, offset: 1, limit: 9999 }).then(res => { + // console.log(res.data, '受检设备性能趋势') + current3.data = res.data.rows.map((item: any, index: number) => ({ ...item, index: index + 1 })) + current3.loading = false + }).catch(() => { + current3.loading = false + }) +} // 获取数据 const loadingBase = ref(false) function fetchData() { @@ -575,7 +640,7 @@ onMounted(() => { // year.value = String(currentYear) if (props.lab) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab // setTimeout(() => { // fetchData() // }, 10) @@ -611,6 +676,13 @@ value: item.id })) }) + getEquipmentList({ offset: 1, limit: 9999 }).then((res) => { + console.log(res.data, '手贱设备') + allDeviceList.value = res.data.rows + sampleNameList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'sampleName',) + modelList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'model',) + helpInstructionList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'helpInstruction',) + }) } fetchDict() // 受检设备种类数量分析-列表导出 @@ -694,7 +766,12 @@ } // if (name === '受检设备来源分析') { let current = showChart.value.findIndex((item: any) => item.name === name) + if (showChart.value[current].type !== 'rank-table') { + return + } showChart.value[current] = name === '受检设备来源分析' ? deviceSourceData.value : deviceTypeData.value + // console.log(current, 'current') + showChart.value[current].loading = false // } } @@ -807,6 +884,27 @@ :value="item.value" />
+
+ + + + + + + + + + + + + + +
props.lab, (newVal) => { if (newVal) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -114,7 +114,7 @@ customerId: '', groupCode: '', helpInstruction: '', - labCode: props.lab, + labCode: props.lab === '全站' ? '' : props.lab, model: '', sampleName: '', timeEnd: '', @@ -168,7 +168,7 @@ ]) onMounted(() => { if (props.lab) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data @@ -284,7 +284,7 @@ function fetchData() { // 获取基础数据 loadingBase.value = true - getBaseInfo({ labCode: props.lab }).then((res) => { + getBaseInfo({ labCode: props.lab === '全站' ? '' : props.lab }).then((res) => { console.log(res.data, '获取基础数据') baseInfo.value.forEach((item) => { item.data = res.data[item.value] @@ -296,7 +296,7 @@ // 在检设备分析 const current1 = showChart.value.filter(item => item.name === '在检设备分析')[0] current1.loading = true - getDeviceAnalysis({ labCode: props.lab }).then((res) => { + getDeviceAnalysis({ labCode: props.lab === '全站' ? '' : props.lab }).then((res) => { const data = [ { name: '分包方', @@ -342,7 +342,7 @@ // 当年已检设备排行 const current2 = showChart.value.filter(item => item.name === '当年已检设备排行TOP10')[0] current2.loading = true - getAlreadyDeviceRank({ labCode: props.lab }).then((res) => { + getAlreadyDeviceRank({ labCode: props.lab === '全站' ? '' : props.lab }).then((res) => { current2.data = [] for (const i in res.data) { current2.data.push({ @@ -357,7 +357,7 @@ // 检定及时分析 const current3 = showChart.value.filter(item => item.name === '检定及时分析')[0] current3.loading = true - getTimelyAnalysis({ labCode: props.lab }).then((res) => { + getTimelyAnalysis({ labCode: props.lab === '全站' ? '' : props.lab }).then((res) => { const data = [ { name: '提前检定', diff --git a/src/views/dataManagement/components/data/resourceManage.vue b/src/views/dataManagement/components/data/resourceManage.vue index 377f585..1cb2985 100644 --- a/src/views/dataManagement/components/data/resourceManage.vue +++ b/src/views/dataManagement/components/data/resourceManage.vue @@ -89,7 +89,7 @@ ]) watch(() => props.lab, (newVal) => { if (newVal) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -329,10 +329,10 @@ onMounted(() => { if (props.lab) { datetimerange.value = [`${new Date().getFullYear()}-01-01`, dayjs().format('YYYY-MM-DD')] - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab // 部门 getDictByCode('bizGroupCode').then((response) => { - const tempMenu = ['电学电源组', '热工力学组', '无线电脉冲组'] + const tempMenu = ['电学电源组', '热工力学组', '无线电脉冲组', '综合管理组'] tempMenu.forEach((item) => { const tempFindData = response.data.find( (e: { name: string; value: string }) => e.name === item, diff --git a/src/views/dataManagement/components/data/device.vue b/src/views/dataManagement/components/data/device.vue index 23efd69..8565f52 100644 --- a/src/views/dataManagement/components/data/device.vue +++ b/src/views/dataManagement/components/data/device.vue @@ -24,7 +24,7 @@ watch(() => props.lab, (newVal) => { if (newVal) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -439,7 +439,7 @@ onMounted(() => { year.value = String(currentYear) if (props.lab) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab setTimeout(() => { fetchData() }) diff --git a/src/views/dataManagement/components/data/eqptDevice.vue b/src/views/dataManagement/components/data/eqptDevice.vue index 83a7083..31c6d26 100644 --- a/src/views/dataManagement/components/data/eqptDevice.vue +++ b/src/views/dataManagement/components/data/eqptDevice.vue @@ -11,6 +11,9 @@ import { getCustomerInfoList } from '@/api/resource/customer' import { getBaseInfo, getNoVerificationAmount, getDeviceSource, getDeviceType, getAlreadyMeasured, getShouldMeasured, getDevicePerformance, exportDeviceType, getDeviceSourceDept, getDeviceTypeList } from '@/api/dataManagement/data/eqptDevice' import { eqptDevice } from './img' +import { getEquipmentList } from '@/api/business/manager/order' +import { uniqueMultiArray } from '@/utils/Array' +import { SCHEDULE } from '@/utils/scheduleDict' const props = defineProps({ lab: { type: String, @@ -23,6 +26,14 @@ // 组别 const groupCodeList = ref([]) const checkDestinationList = ref([]) +// 受检设备 +const sampleNameList = ref([]) +// 规格型号 +const modelList = ref([]) +// 辅助字段 +const helpInstructionList = ref([]) +// 所有受检设备 +const allDeviceList = ref([]) // 委托方 const customerList = ref([]) setTimeout(() => { @@ -155,11 +166,14 @@ customerId: '', checkDestination: '' }) -const selectForMeasured = ref([]) +const selectForMeasured = ref([]) +setTimeout(() => { + selectForMeasured.value = [dayjs().format('YYYY-MM-DD'), dayjs().add(6, 'month').format('YYYY-MM-DD')] +}, 2000); watch(() => selectForMeasured.value, (newVal) => { if (newVal && newVal?.length === 2) { searchQueryForMeasured.value.timeStart = `${newVal[0]} 00:00:00` - searchQueryForMeasured.value.timeEnd = `${newVal[0]} 23:59:59` + searchQueryForMeasured.value.timeEnd = `${newVal[1]} 23:59:59` } else { @@ -179,23 +193,27 @@ timeEnd: searchQueryForMeasured.value.timeEnd ? searchQueryForMeasured.value.timeEnd : searchQueryResult.value.timeEnd, }).then(res => { // console.log(res.data, '受检设备已检数量趋势') - const data = [ + const initData = [ { name: '海口实验室', value: 'hAmount', - data: '' + data: '', + showLab: ['H', ''] }, { name: '西昌实验室', value: 'xAmount', - data: '' + data: '', + showLab: ['X', ''] }, { name: '外送', value: 'outAmount', - data: '' + data: '', + showLab: ['X', 'H', ''] }, ] + const data = initData.filter((item: any) => item.showLab.includes(props.lab === '全站' ? '' : props.lab)) current.xAxisData = res.data.map((item: any) => item.dimension) current.data = data.map((item: any) => ({ name: item.name, @@ -218,11 +236,14 @@ customerId: '', checkDestination: '' }) -const selectForShouldMeasured = ref([]) +const selectForShouldMeasured = ref([]) +setTimeout(() => { + selectForShouldMeasured.value = [dayjs().format('YYYY-MM-DD'), dayjs().add(6, 'month').format('YYYY-MM-DD')] +}, 2000); watch(() => selectForShouldMeasured.value, (newVal) => { if (newVal && newVal?.length === 2) { searchQueryForShouldMeasured.value.timeStart = `${newVal[0]} 00:00:00` - searchQueryForShouldMeasured.value.timeEnd = `${newVal[0]} 23:59:59` + searchQueryForShouldMeasured.value.timeEnd = `${newVal[1]} 23:59:59` fetchQueryForShouldMeasured() } else { @@ -252,23 +273,28 @@ timeEnd: searchQueryForShouldMeasured.value.timeEnd ? searchQueryForShouldMeasured.value.timeEnd : searchQueryResult.value.timeEnd, }).then(res => { // console.log(res.data, '受检设备应检数量趋势') - const data = [ + const initData = [ { name: '海口实验室', value: 'hAmount', - data: '' + data: '', + showLab: ['H', ''] }, { name: '西昌实验室', value: 'xAmount', - data: '' + data: '', + showLab: ['X', ''] }, { name: '外送', value: 'outAmount', - data: '' + data: '', + showLab: ['X', 'H', ''] }, ] + const data = initData.filter((item: any) => item.showLab.includes(props.lab === '全站' ? '' : props.lab)) + console.log(data, props.lab) current.xAxisData = res.data.map((item: any) => item.dimension) current.data = data.map((item: any) => ({ name: item.name, @@ -286,7 +312,7 @@ } watch(() => props.lab, newVal => { if (newVal) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -445,6 +471,45 @@ window.dispatchEvent(resize) }) }) +// 受检设备性能趋势查询条件 +const searchQueryForDevicePerformance = ref({ + sampleName: '', + helpInstruction: '', + model: '', + manufacturer: '' +}) +// 改变设备名称查询条件 +const changeSampleName = (value: string) => { + modelList.value = [] + helpInstructionList.value = [] + searchQueryForDevicePerformance.value.model = '' + searchQueryForDevicePerformance.value.helpInstruction = '' + modelList.value = uniqueMultiArray(allDeviceList.value.filter((item: any) => item.equipmentName === value).map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'model',) + helpInstructionList.value = modelList.value +} +// 改变规格型号查询条件 +const changeHelpInstruction = (value: string) => { + helpInstructionList.value = [] + searchQueryForDevicePerformance.value.helpInstruction = '' + helpInstructionList.value = modelList.value.filter(item => item.model === value) +} +watch(() => searchQueryForDevicePerformance.value, () => { + fetchQueryForDevicePerformance() +}, { + deep: true +}) +// 获取受检设备性能趋势数据 +const fetchQueryForDevicePerformance = () => { + const current3 = showChart.value.filter(item => item.name === '受检设备性能趋势')[0] + current3.loading = true + getDevicePerformance({ ...searchQueryForDevicePerformance.value, ...searchQueryResult.value, offset: 1, limit: 9999 }).then(res => { + // console.log(res.data, '受检设备性能趋势') + current3.data = res.data.rows.map((item: any, index: number) => ({ ...item, index: index + 1 })) + current3.loading = false + }).catch(() => { + current3.loading = false + }) +} // 获取数据 const loadingBase = ref(false) function fetchData() { @@ -575,7 +640,7 @@ onMounted(() => { // year.value = String(currentYear) if (props.lab) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab // setTimeout(() => { // fetchData() // }, 10) @@ -611,6 +676,13 @@ value: item.id })) }) + getEquipmentList({ offset: 1, limit: 9999 }).then((res) => { + console.log(res.data, '手贱设备') + allDeviceList.value = res.data.rows + sampleNameList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'sampleName',) + modelList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'model',) + helpInstructionList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({ sampleName: item.equipmentName, model: item.model, helpInstruction: item.helpInstruction, })), 'helpInstruction',) + }) } fetchDict() // 受检设备种类数量分析-列表导出 @@ -694,7 +766,12 @@ } // if (name === '受检设备来源分析') { let current = showChart.value.findIndex((item: any) => item.name === name) + if (showChart.value[current].type !== 'rank-table') { + return + } showChart.value[current] = name === '受检设备来源分析' ? deviceSourceData.value : deviceTypeData.value + // console.log(current, 'current') + showChart.value[current].loading = false // } } @@ -807,6 +884,27 @@ :value="item.value" />
+
+ + + + + + + + + + + + + + +
props.lab, (newVal) => { if (newVal) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -114,7 +114,7 @@ customerId: '', groupCode: '', helpInstruction: '', - labCode: props.lab, + labCode: props.lab === '全站' ? '' : props.lab, model: '', sampleName: '', timeEnd: '', @@ -168,7 +168,7 @@ ]) onMounted(() => { if (props.lab) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab // 实验室 getDictByCode('bizGroupCodeEquipment').then((response) => { labCodeList.value = response.data @@ -284,7 +284,7 @@ function fetchData() { // 获取基础数据 loadingBase.value = true - getBaseInfo({ labCode: props.lab }).then((res) => { + getBaseInfo({ labCode: props.lab === '全站' ? '' : props.lab }).then((res) => { console.log(res.data, '获取基础数据') baseInfo.value.forEach((item) => { item.data = res.data[item.value] @@ -296,7 +296,7 @@ // 在检设备分析 const current1 = showChart.value.filter(item => item.name === '在检设备分析')[0] current1.loading = true - getDeviceAnalysis({ labCode: props.lab }).then((res) => { + getDeviceAnalysis({ labCode: props.lab === '全站' ? '' : props.lab }).then((res) => { const data = [ { name: '分包方', @@ -342,7 +342,7 @@ // 当年已检设备排行 const current2 = showChart.value.filter(item => item.name === '当年已检设备排行TOP10')[0] current2.loading = true - getAlreadyDeviceRank({ labCode: props.lab }).then((res) => { + getAlreadyDeviceRank({ labCode: props.lab === '全站' ? '' : props.lab }).then((res) => { current2.data = [] for (const i in res.data) { current2.data.push({ @@ -357,7 +357,7 @@ // 检定及时分析 const current3 = showChart.value.filter(item => item.name === '检定及时分析')[0] current3.loading = true - getTimelyAnalysis({ labCode: props.lab }).then((res) => { + getTimelyAnalysis({ labCode: props.lab === '全站' ? '' : props.lab }).then((res) => { const data = [ { name: '提前检定', diff --git a/src/views/dataManagement/components/data/resourceManage.vue b/src/views/dataManagement/components/data/resourceManage.vue index 377f585..1cb2985 100644 --- a/src/views/dataManagement/components/data/resourceManage.vue +++ b/src/views/dataManagement/components/data/resourceManage.vue @@ -89,7 +89,7 @@ ]) watch(() => props.lab, (newVal) => { if (newVal) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -329,10 +329,10 @@ onMounted(() => { if (props.lab) { datetimerange.value = [`${new Date().getFullYear()}-01-01`, dayjs().format('YYYY-MM-DD')] - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab // 部门 getDictByCode('bizGroupCode').then((response) => { - const tempMenu = ['电学电源组', '热工力学组', '无线电脉冲组'] + const tempMenu = ['电学电源组', '热工力学组', '无线电脉冲组', '综合管理组'] tempMenu.forEach((item) => { const tempFindData = response.data.find( (e: { name: string; value: string }) => e.name === item, diff --git a/src/views/dataManagement/components/data/standardDevice.vue b/src/views/dataManagement/components/data/standardDevice.vue index 3859363..eca8c4f 100644 --- a/src/views/dataManagement/components/data/standardDevice.vue +++ b/src/views/dataManagement/components/data/standardDevice.vue @@ -21,7 +21,7 @@ }) watch(() => props.lab, (newVal) => { if (newVal) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -78,6 +78,19 @@ source: 'system', loading: false, // 加载中 isEmpty: false, // 是否为空 + gradient: false, + colors: [ + ['#2d8cf0', '#fff'], + ['#2352d6', '#fff'], + ['#fed700', '#fff'], + ['#feb501', '#fff'], + ['#2352d6', '#fff'], + ['#fed700', '#fff'], + ['#feb501', '#fff'], + ['#2352d6', '#fff'], + ['#fed700', '#fff'], + ['#feb501', '#fff'], + ], }, { name: '近一年部门核查分析', @@ -147,7 +160,7 @@ // 近五年标准装置复查趋势 const current1 = showChart.value.filter((item: any) => item.name === '近五年标准装置复查趋势')[0] current1.loading = true - getNearYearTrend({...searchQueryResult.value,timeStart: dayjs().subtract(5, 'year').format('YYYY-MM-DD'), timeEnd: dayjs().format('YYYY-MM-DD')}).then(res => { + getNearYearTrend({ ...searchQueryResult.value, timeStart: dayjs().subtract(5, 'year').format('YYYY-MM-DD'), timeEnd: dayjs().format('YYYY-MM-DD') }).then(res => { // console.log(res.data, '近五年标准装置复查趋势') current1.xAxisData = res.data.map((item: any) => item.dimension) const data = [ @@ -179,7 +192,7 @@ // 标准装置状态分析 const current2 = showChart.value.filter((item: any) => item.name === '标准装置状态分析')[0] current2.loading = true - getStandardStatusAnalysis({...searchQueryResult.value,timeStart: `${new Date().getFullYear()}-01-01`,timeEnd: dayjs().format('YYYY-MM-DD')}).then(res => { + getStandardStatusAnalysis({ ...searchQueryResult.value, timeStart: `${new Date().getFullYear()}-01-01`, timeEnd: dayjs().format('YYYY-MM-DD') }).then(res => { // console.log(res.data, '标准装置状态分析') current2.xAxisData = res.data.map((item: any) => item.approvalTypeName) const data = [ @@ -199,10 +212,10 @@ data: '' }, ] - current2.data = data.map((item: any) => ({ + current2.data = data.map((item: any, index: number) => ({ name: item.name, - // symbol: 'circle', - data: res.data.map((citem: any) => String(citem[data.filter((ccitem: any) => ccitem.name === item.name)[0].value])) + data: res.data.map((citem: any) => String(citem[data.filter((ccitem: any) => ccitem.name === item.name)[0].value])), + color: JSON.parse(JSON.stringify(colors)).reverse()[index] })) current2.loading = false }).catch(() => { @@ -211,7 +224,7 @@ // 近一年部门核查分析 const current3 = showChart.value.filter((item: any) => item.name === '近一年部门核查分析')[0] current3.loading = true - getOneYearAnalysis({...searchQueryResult.value, timeStart: `${new Date().getFullYear()}-01-01`,timeEnd: dayjs().format('YYYY-MM-DD')}).then(res => { + getOneYearAnalysis({ ...searchQueryResult.value, timeStart: `${new Date().getFullYear()}-01-01`, timeEnd: dayjs().format('YYYY-MM-DD') }).then(res => { // console.log(res.data, '近一年部门核查分析') current3.xAxisData = res.data.map((item: any) => item.dimension) const data = [ @@ -243,7 +256,7 @@ // 当年标准装置核查排行榜 const current4 = showChart.value.filter((item: any) => item.name === '当年标准装置核查排行榜')[0] current4.loading = true - getCurrentYearRank({...searchQueryResult.value,timeStart: `${new Date().getFullYear()}-01-01`,timeEnd: dayjs().format('YYYY-MM-DD')}).then(res => { + getCurrentYearRank({ ...searchQueryResult.value, timeStart: `${new Date().getFullYear()}-01-01`, timeEnd: dayjs().format('YYYY-MM-DD') }).then(res => { // console.log(res.data, '当年标准装置核查排行榜') current4.data = res.data.rows current4.loading = false @@ -293,7 +306,7 @@ // }, 100) onMounted(() => { if (props.lab) { - searchQueryResult.value.labCode = props.lab + searchQueryResult.value.labCode = props.lab === '全站' ? '' : props.lab fetchData() } }) @@ -336,7 +349,9 @@ ghost-class="ghostClass" chosen-class="chosenClass" @end="onEnd">