diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index fdd8362..58959d0 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -247,7 +247,7 @@ > - + - + { list.value = response.data.rows.map((item: { checkDate: string; certificateValid: string }) => { return { @@ -121,7 +123,7 @@ const initDialog = (isMultiParam: boolean, getCustomerId = '') => { isMulti.value = isMultiParam // 是否多选 dialogFormVisible.value = true // 显示对话框 - listQuery.value.customerId = getCustomerId // 委托方id + customerId.value = getCustomerId // 委托方id console.log('isMultiParam', isMultiParam) fetchData() } @@ -150,6 +152,9 @@ + + + - + { list.value = response.data.rows.map((item: { checkDate: string; certificateValid: string }) => { return { @@ -121,7 +123,7 @@ const initDialog = (isMultiParam: boolean, getCustomerId = '') => { isMulti.value = isMultiParam // 是否多选 dialogFormVisible.value = true // 显示对话框 - listQuery.value.customerId = getCustomerId // 委托方id + customerId.value = getCustomerId // 委托方id console.log('isMultiParam', isMultiParam) fetchData() } @@ -150,6 +152,9 @@ + + + { - deviceNameList.value = res.data + deviceNameList.value = res.data.map((item: any) => { + return { + value: item, + } + }) deviceNameOriginList.value = res.data }) @@ -127,6 +131,11 @@ getModelAllList({}).then((res) => { allList.value = res.data modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model))) + modelList.value = modelList.value.map((item) => { + return { + value: item, + } + }) helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction))) }) } @@ -343,6 +352,19 @@ } } +// 匹配设备名称输入建议 +const querySearchDeviceName = (queryString: string, cb: any) => { + const results = queryString ? deviceNameList.value.filter((item: any) => item.value.includes(queryString)) : deviceNameList.value + // 调用 callback 返回建议列表的数据 + cb(results) +} + +// 匹配型号规格输入建议 +const querySearchDeviceModel = (queryString: string, cb: any) => { + const results = queryString ? modelList.value.filter((item: any) => item.value.includes(queryString)) : modelList.value + // 调用 callback 返回建议列表的数据 + cb(results) +} // ---------------------------------------钩子---------------------------------------------- // 监听设备名称下拉框,修改规格型号和辅助字段 watch(() => listQuery.value.deviceName, (newVal) => { @@ -351,6 +373,11 @@ // 修改规格型号和辅助字段列表 const data = allList.value.filter(item => item.equipmentName === newVal) modelList.value = Array.from(new Set(data.filter(item => item.model).map(item => item.model))) + modelList.value = modelList.value.map((item) => { + return { + value: item, + } + }) helpList.value = Array.from(new Set(data.filter(item => item.helpInstruction).map(item => item.helpInstruction))) }) // 监听规格型号下拉框,修改辅助字段 @@ -441,14 +468,26 @@ - + + - + + diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index fdd8362..58959d0 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -247,7 +247,7 @@ > - + { list.value = response.data.rows.map((item: { checkDate: string; certificateValid: string }) => { return { @@ -121,7 +123,7 @@ const initDialog = (isMultiParam: boolean, getCustomerId = '') => { isMulti.value = isMultiParam // 是否多选 dialogFormVisible.value = true // 显示对话框 - listQuery.value.customerId = getCustomerId // 委托方id + customerId.value = getCustomerId // 委托方id console.log('isMultiParam', isMultiParam) fetchData() } @@ -150,6 +152,9 @@ + + + { - deviceNameList.value = res.data + deviceNameList.value = res.data.map((item: any) => { + return { + value: item, + } + }) deviceNameOriginList.value = res.data }) @@ -127,6 +131,11 @@ getModelAllList({}).then((res) => { allList.value = res.data modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model))) + modelList.value = modelList.value.map((item) => { + return { + value: item, + } + }) helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction))) }) } @@ -343,6 +352,19 @@ } } +// 匹配设备名称输入建议 +const querySearchDeviceName = (queryString: string, cb: any) => { + const results = queryString ? deviceNameList.value.filter((item: any) => item.value.includes(queryString)) : deviceNameList.value + // 调用 callback 返回建议列表的数据 + cb(results) +} + +// 匹配型号规格输入建议 +const querySearchDeviceModel = (queryString: string, cb: any) => { + const results = queryString ? modelList.value.filter((item: any) => item.value.includes(queryString)) : modelList.value + // 调用 callback 返回建议列表的数据 + cb(results) +} // ---------------------------------------钩子---------------------------------------------- // 监听设备名称下拉框,修改规格型号和辅助字段 watch(() => listQuery.value.deviceName, (newVal) => { @@ -351,6 +373,11 @@ // 修改规格型号和辅助字段列表 const data = allList.value.filter(item => item.equipmentName === newVal) modelList.value = Array.from(new Set(data.filter(item => item.model).map(item => item.model))) + modelList.value = modelList.value.map((item) => { + return { + value: item, + } + }) helpList.value = Array.from(new Set(data.filter(item => item.helpInstruction).map(item => item.helpInstruction))) }) // 监听规格型号下拉框,修改辅助字段 @@ -441,14 +468,26 @@ - + + - + + diff --git a/src/views/business/taskMeasure/measureData/components/fourth/fourth-interface.ts b/src/views/business/taskMeasure/measureData/components/fourth/fourth-interface.ts index ebc09b9..64bce29 100644 --- a/src/views/business/taskMeasure/measureData/components/fourth/fourth-interface.ts +++ b/src/views/business/taskMeasure/measureData/components/fourth/fourth-interface.ts @@ -55,4 +55,7 @@ maxPointDeviation?: string // 最大设定点偏差绝对值 maxDifferentGap?: string // 最大切换差 + + maxIndicatingErrorRedStar?: string // 示值误差最大值标星 + maxReturnErrorRedStar?: string // 回程误差最大值标星 } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index fdd8362..58959d0 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -247,7 +247,7 @@ > - + { list.value = response.data.rows.map((item: { checkDate: string; certificateValid: string }) => { return { @@ -121,7 +123,7 @@ const initDialog = (isMultiParam: boolean, getCustomerId = '') => { isMulti.value = isMultiParam // 是否多选 dialogFormVisible.value = true // 显示对话框 - listQuery.value.customerId = getCustomerId // 委托方id + customerId.value = getCustomerId // 委托方id console.log('isMultiParam', isMultiParam) fetchData() } @@ -150,6 +152,9 @@ + + + { - deviceNameList.value = res.data + deviceNameList.value = res.data.map((item: any) => { + return { + value: item, + } + }) deviceNameOriginList.value = res.data }) @@ -127,6 +131,11 @@ getModelAllList({}).then((res) => { allList.value = res.data modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model))) + modelList.value = modelList.value.map((item) => { + return { + value: item, + } + }) helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction))) }) } @@ -343,6 +352,19 @@ } } +// 匹配设备名称输入建议 +const querySearchDeviceName = (queryString: string, cb: any) => { + const results = queryString ? deviceNameList.value.filter((item: any) => item.value.includes(queryString)) : deviceNameList.value + // 调用 callback 返回建议列表的数据 + cb(results) +} + +// 匹配型号规格输入建议 +const querySearchDeviceModel = (queryString: string, cb: any) => { + const results = queryString ? modelList.value.filter((item: any) => item.value.includes(queryString)) : modelList.value + // 调用 callback 返回建议列表的数据 + cb(results) +} // ---------------------------------------钩子---------------------------------------------- // 监听设备名称下拉框,修改规格型号和辅助字段 watch(() => listQuery.value.deviceName, (newVal) => { @@ -351,6 +373,11 @@ // 修改规格型号和辅助字段列表 const data = allList.value.filter(item => item.equipmentName === newVal) modelList.value = Array.from(new Set(data.filter(item => item.model).map(item => item.model))) + modelList.value = modelList.value.map((item) => { + return { + value: item, + } + }) helpList.value = Array.from(new Set(data.filter(item => item.helpInstruction).map(item => item.helpInstruction))) }) // 监听规格型号下拉框,修改辅助字段 @@ -441,14 +468,26 @@ - + + - + + diff --git a/src/views/business/taskMeasure/measureData/components/fourth/fourth-interface.ts b/src/views/business/taskMeasure/measureData/components/fourth/fourth-interface.ts index ebc09b9..64bce29 100644 --- a/src/views/business/taskMeasure/measureData/components/fourth/fourth-interface.ts +++ b/src/views/business/taskMeasure/measureData/components/fourth/fourth-interface.ts @@ -55,4 +55,7 @@ maxPointDeviation?: string // 最大设定点偏差绝对值 maxDifferentGap?: string // 最大切换差 + + maxIndicatingErrorRedStar?: string // 示值误差最大值标星 + maxReturnErrorRedStar?: string // 回程误差最大值标星 } diff --git a/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue index 3302354..289b7f0 100644 --- a/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue @@ -343,6 +343,7 @@ ]) // -------------------------------------------获取详情信息-------------------------------------------------- // 一般压力表、精密压力表、电接点一般压力表结果表格标*(示值误差最大值、轻敲位移最大值、回程误差最大值)标星 +// 压力变送器、数字压力计标*(示值误差最大值、回程误差最大值)标星 const handleGaugeRedStar = () => { resultList.value = resultList.value.map((item) => { let maxIndicatingErrorRedStar = 'normal' // 示值误差最大值标星 @@ -351,12 +352,21 @@ maxIndicatingErrorRedStar = Number(removeSignAll(item.maxIndicatingError!)) <= Number(removeSignAll(item.indicatingError!)) ? 'normal' : 'error' maxFrictionErrorRedStar = Number(removeSignAll(item.maxFrictionError!)) <= Number(removeSignAll(item.frictionError!)) ? 'normal' : 'error' maxReturnErrorRedStar = Number(removeSignAll(item.maxReturnError!)) <= Number(removeSignAll(item.returnError!)) ? 'normal' : 'error' + // if (itemFormData.value.itemCategoryName === '一般压力表' || itemFormData.value.itemCategoryName === '精密压力表' || itemFormData.value.itemCategoryName === '电接点一般压力表') { return { ...item, maxIndicatingErrorRedStar, maxReturnErrorRedStar, maxFrictionErrorRedStar, } + // } + // else if (itemFormData.value.itemCategoryName === '压力变送器' || itemFormData.value.itemCategoryName === '数字压力计') { + // return { + // ...item, + // maxIndicatingErrorRedStar, + // maxReturnErrorRedStar, + // } + // } }) } @@ -459,6 +469,7 @@ else if (itemFormData.value.itemCategoryName === '数字压力计') { list.value = responseList.filter((item: { dataCategory: string; dataType: string }) => item.dataType === '1' && item.dataCategory !== '2') resultList.value = responseList.filter((item: { dataCategory: string; dataType: string }) => item.dataType === '1' && item.dataCategory === '2') + handleGaugeRedStar() zeroDriftResultList.value.push({ min: '示值', zeroDriftFive: list.value[0].zeroDriftFive, @@ -824,9 +835,6 @@ return item }) // 检定数据 gaugeSecondTableRedStar() - console.log('pppppppppppppppppp') - console.log(resultListElectricContact.value) - // =====================电接点一般压力第二结果判断=========== const result = resultListElectricContact.value.every((item: any) => { return Number(removeSignAll(item.maxPointDeviation)) <= Number(removeSignAll(item.allowPointDeviation)) @@ -857,6 +865,8 @@ resultList.value = resultList.value.map((item: IDetailMeasureList) => { item.indicatingError = list.value[0].indicatingErrorBak // 示值误差 item.returnError = list.value[0].returnErrorBak // 回程误差、回程误差允许值 + item.maxIndicatingErrorRedStar = Number(removeSignAll(item.maxIndicatingError!)) <= Number(removeSignAll(list.value[0].indicatingErrorBak!)) ? 'normal' : 'error' + item.maxReturnErrorRedStar = Number(removeSignAll(item.maxReturnError!)) <= Number(removeSignAll(list.value[0].returnErrorBak!)) ? 'normal' : 'error' return item }) // 检定数据 // 判断结果:示值误差最大值、回程误差最大值均在允许值内,则合格,否则不合格。 @@ -896,10 +906,16 @@ }) const responseResultList = res.data.filter((item: { dataCategory: string }) => `${item.dataCategory}` === '2') resultList.value = responseResultList.map((item: any) => { + let maxIndicatingErrorRedStar = 'normal' // 示值误差最大值标星 + let maxReturnErrorRedStar = 'normal' // 回程误差标星 + maxIndicatingErrorRedStar = Number(removeSignAll(item.maxIndicatingError!)) <= Number(removeSignAll(list.value[0].indicatingError!)) ? 'normal' : 'error' + maxReturnErrorRedStar = Number(removeSignAll(item.maxReturnError!)) <= Number(removeSignAll(list.value[0].returnError!)) ? 'normal' : 'error' return { ...item, indicatingError: list.value[0].indicatingError, returnError: list.value[0].returnError, + maxIndicatingErrorRedStar, + maxReturnErrorRedStar, } }) // 判断结果:示值误差最大值、回程误差最大值均在允许值内,则合格,否则不合格。 @@ -1617,7 +1633,20 @@ :prop="item.value" :label="item.text" align="center" - /> + > + + + + {{ scope.row.maxIndicatingError }} + * + + + + {{ scope.row.maxReturnError }} + * + + + @@ -1636,7 +1665,20 @@ :prop="item.value" :label="item.text" align="center" - /> + > + + + + {{ scope.row.maxIndicatingError }} + * + + + + {{ scope.row.maxReturnError }} + * + + + diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index fdd8362..58959d0 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -247,7 +247,7 @@ > - + { list.value = response.data.rows.map((item: { checkDate: string; certificateValid: string }) => { return { @@ -121,7 +123,7 @@ const initDialog = (isMultiParam: boolean, getCustomerId = '') => { isMulti.value = isMultiParam // 是否多选 dialogFormVisible.value = true // 显示对话框 - listQuery.value.customerId = getCustomerId // 委托方id + customerId.value = getCustomerId // 委托方id console.log('isMultiParam', isMultiParam) fetchData() } @@ -150,6 +152,9 @@ + + + { - deviceNameList.value = res.data + deviceNameList.value = res.data.map((item: any) => { + return { + value: item, + } + }) deviceNameOriginList.value = res.data }) @@ -127,6 +131,11 @@ getModelAllList({}).then((res) => { allList.value = res.data modelList.value = Array.from(new Set(res.data.filter((item: any) => item.model).map((item: any) => item.model))) + modelList.value = modelList.value.map((item) => { + return { + value: item, + } + }) helpList.value = Array.from(new Set(res.data.filter((item: any) => item.helpInstruction).map((item: any) => item.helpInstruction))) }) } @@ -343,6 +352,19 @@ } } +// 匹配设备名称输入建议 +const querySearchDeviceName = (queryString: string, cb: any) => { + const results = queryString ? deviceNameList.value.filter((item: any) => item.value.includes(queryString)) : deviceNameList.value + // 调用 callback 返回建议列表的数据 + cb(results) +} + +// 匹配型号规格输入建议 +const querySearchDeviceModel = (queryString: string, cb: any) => { + const results = queryString ? modelList.value.filter((item: any) => item.value.includes(queryString)) : modelList.value + // 调用 callback 返回建议列表的数据 + cb(results) +} // ---------------------------------------钩子---------------------------------------------- // 监听设备名称下拉框,修改规格型号和辅助字段 watch(() => listQuery.value.deviceName, (newVal) => { @@ -351,6 +373,11 @@ // 修改规格型号和辅助字段列表 const data = allList.value.filter(item => item.equipmentName === newVal) modelList.value = Array.from(new Set(data.filter(item => item.model).map(item => item.model))) + modelList.value = modelList.value.map((item) => { + return { + value: item, + } + }) helpList.value = Array.from(new Set(data.filter(item => item.helpInstruction).map(item => item.helpInstruction))) }) // 监听规格型号下拉框,修改辅助字段 @@ -441,14 +468,26 @@ - + + - + + diff --git a/src/views/business/taskMeasure/measureData/components/fourth/fourth-interface.ts b/src/views/business/taskMeasure/measureData/components/fourth/fourth-interface.ts index ebc09b9..64bce29 100644 --- a/src/views/business/taskMeasure/measureData/components/fourth/fourth-interface.ts +++ b/src/views/business/taskMeasure/measureData/components/fourth/fourth-interface.ts @@ -55,4 +55,7 @@ maxPointDeviation?: string // 最大设定点偏差绝对值 maxDifferentGap?: string // 最大切换差 + + maxIndicatingErrorRedStar?: string // 示值误差最大值标星 + maxReturnErrorRedStar?: string // 回程误差最大值标星 } diff --git a/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue index 3302354..289b7f0 100644 --- a/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue @@ -343,6 +343,7 @@ ]) // -------------------------------------------获取详情信息-------------------------------------------------- // 一般压力表、精密压力表、电接点一般压力表结果表格标*(示值误差最大值、轻敲位移最大值、回程误差最大值)标星 +// 压力变送器、数字压力计标*(示值误差最大值、回程误差最大值)标星 const handleGaugeRedStar = () => { resultList.value = resultList.value.map((item) => { let maxIndicatingErrorRedStar = 'normal' // 示值误差最大值标星 @@ -351,12 +352,21 @@ maxIndicatingErrorRedStar = Number(removeSignAll(item.maxIndicatingError!)) <= Number(removeSignAll(item.indicatingError!)) ? 'normal' : 'error' maxFrictionErrorRedStar = Number(removeSignAll(item.maxFrictionError!)) <= Number(removeSignAll(item.frictionError!)) ? 'normal' : 'error' maxReturnErrorRedStar = Number(removeSignAll(item.maxReturnError!)) <= Number(removeSignAll(item.returnError!)) ? 'normal' : 'error' + // if (itemFormData.value.itemCategoryName === '一般压力表' || itemFormData.value.itemCategoryName === '精密压力表' || itemFormData.value.itemCategoryName === '电接点一般压力表') { return { ...item, maxIndicatingErrorRedStar, maxReturnErrorRedStar, maxFrictionErrorRedStar, } + // } + // else if (itemFormData.value.itemCategoryName === '压力变送器' || itemFormData.value.itemCategoryName === '数字压力计') { + // return { + // ...item, + // maxIndicatingErrorRedStar, + // maxReturnErrorRedStar, + // } + // } }) } @@ -459,6 +469,7 @@ else if (itemFormData.value.itemCategoryName === '数字压力计') { list.value = responseList.filter((item: { dataCategory: string; dataType: string }) => item.dataType === '1' && item.dataCategory !== '2') resultList.value = responseList.filter((item: { dataCategory: string; dataType: string }) => item.dataType === '1' && item.dataCategory === '2') + handleGaugeRedStar() zeroDriftResultList.value.push({ min: '示值', zeroDriftFive: list.value[0].zeroDriftFive, @@ -824,9 +835,6 @@ return item }) // 检定数据 gaugeSecondTableRedStar() - console.log('pppppppppppppppppp') - console.log(resultListElectricContact.value) - // =====================电接点一般压力第二结果判断=========== const result = resultListElectricContact.value.every((item: any) => { return Number(removeSignAll(item.maxPointDeviation)) <= Number(removeSignAll(item.allowPointDeviation)) @@ -857,6 +865,8 @@ resultList.value = resultList.value.map((item: IDetailMeasureList) => { item.indicatingError = list.value[0].indicatingErrorBak // 示值误差 item.returnError = list.value[0].returnErrorBak // 回程误差、回程误差允许值 + item.maxIndicatingErrorRedStar = Number(removeSignAll(item.maxIndicatingError!)) <= Number(removeSignAll(list.value[0].indicatingErrorBak!)) ? 'normal' : 'error' + item.maxReturnErrorRedStar = Number(removeSignAll(item.maxReturnError!)) <= Number(removeSignAll(list.value[0].returnErrorBak!)) ? 'normal' : 'error' return item }) // 检定数据 // 判断结果:示值误差最大值、回程误差最大值均在允许值内,则合格,否则不合格。 @@ -896,10 +906,16 @@ }) const responseResultList = res.data.filter((item: { dataCategory: string }) => `${item.dataCategory}` === '2') resultList.value = responseResultList.map((item: any) => { + let maxIndicatingErrorRedStar = 'normal' // 示值误差最大值标星 + let maxReturnErrorRedStar = 'normal' // 回程误差标星 + maxIndicatingErrorRedStar = Number(removeSignAll(item.maxIndicatingError!)) <= Number(removeSignAll(list.value[0].indicatingError!)) ? 'normal' : 'error' + maxReturnErrorRedStar = Number(removeSignAll(item.maxReturnError!)) <= Number(removeSignAll(list.value[0].returnError!)) ? 'normal' : 'error' return { ...item, indicatingError: list.value[0].indicatingError, returnError: list.value[0].returnError, + maxIndicatingErrorRedStar, + maxReturnErrorRedStar, } }) // 判断结果:示值误差最大值、回程误差最大值均在允许值内,则合格,否则不合格。 @@ -1617,7 +1633,20 @@ :prop="item.value" :label="item.text" align="center" - /> + > + + + + {{ scope.row.maxIndicatingError }} + * + + + + {{ scope.row.maxReturnError }} + * + + + @@ -1636,7 +1665,20 @@ :prop="item.value" :label="item.text" align="center" - /> + > + + + + {{ scope.row.maxIndicatingError }} + * + + + + {{ scope.row.maxReturnError }} + * + + + diff --git a/src/views/workbench/components/buttonSet.vue b/src/views/workbench/components/buttonSet.vue index a3af48a..77a727e 100644 --- a/src/views/workbench/components/buttonSet.vue +++ b/src/views/workbench/components/buttonSet.vue @@ -57,12 +57,12 @@ path: '/resume/weekList', color: '#002756', }, - { - id: '10', - name: '到期提醒', - path: '/baseInfo/remind', - color: '#6f759a', - }, + // { + // id: '10', + // name: '到期提醒', + // path: '/baseInfo/remind', + // color: '#6f759a', + // }, ] const changePage = (path: string) => { @@ -72,7 +72,7 @@ - + {{ item.name }}