diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue
index 806e280..b434391 100644
--- a/src/components/MultiHeaderTable/tableColumn.vue
+++ b/src/components/MultiHeaderTable/tableColumn.vue
@@ -61,7 +61,9 @@
*{{ item.text }}
- *{{ item.text }}
+
+ *{{ item.text }}
+
*{{ item.text }}
- *{{ item.text }}
+
+ *{{ item.text }}
+
-
+
@@ -80,7 +80,7 @@
-
+
@@ -97,8 +97,10 @@
border-radius: 10px;
// width: fit-content;
background-color: v-bind(backgroundColor);
- width: 400px;
- height: 260px;
+ // width: 400px;
+ // height: 260px;
+ width: 500px;
+ height: 300px;
.left {
flex: 1;
diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue
index 806e280..b434391 100644
--- a/src/components/MultiHeaderTable/tableColumn.vue
+++ b/src/components/MultiHeaderTable/tableColumn.vue
@@ -61,7 +61,9 @@
*{{ item.text }}
- *{{ item.text }}
+
+ *{{ item.text }}
+
-
+
@@ -80,7 +80,7 @@
-
+
@@ -97,8 +97,10 @@
border-radius: 10px;
// width: fit-content;
background-color: v-bind(backgroundColor);
- width: 400px;
- height: 260px;
+ // width: 400px;
+ // height: 260px;
+ width: 500px;
+ height: 300px;
.left {
flex: 1;
diff --git a/src/views/business/taskMeasure/print/detail.vue b/src/views/business/taskMeasure/print/detail.vue
index a3db212..77490d2 100644
--- a/src/views/business/taskMeasure/print/detail.vue
+++ b/src/views/business/taskMeasure/print/detail.vue
@@ -72,6 +72,10 @@
])
// 选中
const handleSelectionChange = (e: any) => {
+ if (!e[0].identifyTypeName) {
+ ElMessage.warning('无标志类型, 不可打印')
+ return false
+ }
checkoutList.value = e
}
// 点击清空列表
@@ -115,7 +119,6 @@
// 选好设备
const confirmSelectEquipment = (val: any) => {
console.log(val)
-
if (val.length) {
val.forEach((item: any) => {
const index = list.value.findIndex((e: { deviceNo: string }) => e.deviceNo === item.equipmentNo)
@@ -221,12 +224,12 @@
-
- 打印
-
+
+ 打印
+
关闭
@@ -245,14 +248,14 @@
设备计量标识
-
+
清空列表
-
-
+ -->
+
+
+
+
+
+ {{ scope.$index + 1 }}
+
+
+
+
@@ -282,7 +303,6 @@
:date-title="printMenu[item.identifyTypeName].dateTitle"
:person-title="printMenu[item.identifyTypeName].personTitle"
:background-color="printMenu[item.identifyTypeName].backgroundColor"
- style="margin-top: 10px;"
/>
diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue
index 806e280..b434391 100644
--- a/src/components/MultiHeaderTable/tableColumn.vue
+++ b/src/components/MultiHeaderTable/tableColumn.vue
@@ -61,7 +61,9 @@
*{{ item.text }}
- *{{ item.text }}
+
+ *{{ item.text }}
+
-
+
@@ -80,7 +80,7 @@
-
+
@@ -97,8 +97,10 @@
border-radius: 10px;
// width: fit-content;
background-color: v-bind(backgroundColor);
- width: 400px;
- height: 260px;
+ // width: 400px;
+ // height: 260px;
+ width: 500px;
+ height: 300px;
.left {
flex: 1;
diff --git a/src/views/business/taskMeasure/print/detail.vue b/src/views/business/taskMeasure/print/detail.vue
index a3db212..77490d2 100644
--- a/src/views/business/taskMeasure/print/detail.vue
+++ b/src/views/business/taskMeasure/print/detail.vue
@@ -72,6 +72,10 @@
])
// 选中
const handleSelectionChange = (e: any) => {
+ if (!e[0].identifyTypeName) {
+ ElMessage.warning('无标志类型, 不可打印')
+ return false
+ }
checkoutList.value = e
}
// 点击清空列表
@@ -115,7 +119,6 @@
// 选好设备
const confirmSelectEquipment = (val: any) => {
console.log(val)
-
if (val.length) {
val.forEach((item: any) => {
const index = list.value.findIndex((e: { deviceNo: string }) => e.deviceNo === item.equipmentNo)
@@ -221,12 +224,12 @@
-
- 打印
-
+
+ 打印
+
关闭
@@ -245,14 +248,14 @@
设备计量标识
-
+
清空列表
-
-
+ -->
+
+
+
+
+
+ {{ scope.$index + 1 }}
+
+
+
+
@@ -282,7 +303,6 @@
:date-title="printMenu[item.identifyTypeName].dateTitle"
:person-title="printMenu[item.identifyTypeName].personTitle"
:background-color="printMenu[item.identifyTypeName].backgroundColor"
- style="margin-top: 10px;"
/>
diff --git a/src/views/equipement/standard/book/book-interface.ts b/src/views/equipement/standard/book/book-interface.ts
index 9cb346b..1ca7749 100644
--- a/src/views/equipement/standard/book/book-interface.ts
+++ b/src/views/equipement/standard/book/book-interface.ts
@@ -141,7 +141,7 @@
id: string
testType: string // 核查点类型
params: string // 核查项目(参数)
- checkPoint: string // 核查点
+ checkPoint: number // 核查点
unit: string // 单位
frequency: string // 频率
frequencyUnit: string // 频率单位(直接存字典value)
diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue
index 806e280..b434391 100644
--- a/src/components/MultiHeaderTable/tableColumn.vue
+++ b/src/components/MultiHeaderTable/tableColumn.vue
@@ -61,7 +61,9 @@
*{{ item.text }}
- *{{ item.text }}
+
+ *{{ item.text }}
+
-
+
@@ -80,7 +80,7 @@
-
+
@@ -97,8 +97,10 @@
border-radius: 10px;
// width: fit-content;
background-color: v-bind(backgroundColor);
- width: 400px;
- height: 260px;
+ // width: 400px;
+ // height: 260px;
+ width: 500px;
+ height: 300px;
.left {
flex: 1;
diff --git a/src/views/business/taskMeasure/print/detail.vue b/src/views/business/taskMeasure/print/detail.vue
index a3db212..77490d2 100644
--- a/src/views/business/taskMeasure/print/detail.vue
+++ b/src/views/business/taskMeasure/print/detail.vue
@@ -72,6 +72,10 @@
])
// 选中
const handleSelectionChange = (e: any) => {
+ if (!e[0].identifyTypeName) {
+ ElMessage.warning('无标志类型, 不可打印')
+ return false
+ }
checkoutList.value = e
}
// 点击清空列表
@@ -115,7 +119,6 @@
// 选好设备
const confirmSelectEquipment = (val: any) => {
console.log(val)
-
if (val.length) {
val.forEach((item: any) => {
const index = list.value.findIndex((e: { deviceNo: string }) => e.deviceNo === item.equipmentNo)
@@ -221,12 +224,12 @@
-
- 打印
-
+
+ 打印
+
关闭
@@ -245,14 +248,14 @@
设备计量标识
-
+
清空列表
-
-
+ -->
+
+
+
+
+
+ {{ scope.$index + 1 }}
+
+
+
+
@@ -282,7 +303,6 @@
:date-title="printMenu[item.identifyTypeName].dateTitle"
:person-title="printMenu[item.identifyTypeName].personTitle"
:background-color="printMenu[item.identifyTypeName].backgroundColor"
- style="margin-top: 10px;"
/>
diff --git a/src/views/equipement/standard/book/book-interface.ts b/src/views/equipement/standard/book/book-interface.ts
index 9cb346b..1ca7749 100644
--- a/src/views/equipement/standard/book/book-interface.ts
+++ b/src/views/equipement/standard/book/book-interface.ts
@@ -141,7 +141,7 @@
id: string
testType: string // 核查点类型
params: string // 核查项目(参数)
- checkPoint: string // 核查点
+ checkPoint: number // 核查点
unit: string // 单位
frequency: string // 频率
frequencyUnit: string // 频率单位(直接存字典value)
diff --git a/src/views/equipement/standard/book/components/config/first/config.vue b/src/views/equipement/standard/book/components/config/first/config.vue
index b3c100c..b37d416 100644
--- a/src/views/equipement/standard/book/components/config/first/config.vue
+++ b/src/views/equipement/standard/book/components/config/first/config.vue
@@ -6,6 +6,7 @@
import { useCheckList } from '@/commonMethods/useCheckList'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { config, getCheckItemDetail } from '@/api/equipment/standard/book'
+import { calc } from '@/utils/useCalc'
const textMap: { [key: string]: string } = {
edit: '编辑',
detail: '详情',
@@ -115,7 +116,7 @@
id: '',
testType: list[list.length - 1].testType, // 核查点类型
params: list[list.length - 1].params, // 核查项目(参数)
- checkPoint: list[list.length - 1].checkPoint, // 核查点
+ checkPoint: Number(calc(Number(list[list.length - 1].checkPoint), 1, '+')), // 核查点
unit: list[list.length - 1].unit, // 单位
frequency: '', // 频率
frequencyUnit: '', // 频率单位(直接存字典value)
@@ -135,7 +136,7 @@
id: '',
testType: title, // 核查点类型
params: '', // 核查项目(参数)
- checkPoint: '', // 核查点
+ checkPoint: 1, // 核查点
unit: '', // 单位
frequency: '', // 频率
frequencyUnit: '', // 频率单位(直接存字典value)
@@ -213,6 +214,7 @@
if (!checkList(worstList.value, '最差点表格')) { return false }
if (!checkList(modelList.value, '典型点表格')) { return false }
const params = {
+ equipmentId: equipmentId.value, // 设备id
itemCategoryId: form.value.itemCategoryId, // 核查项分类id
checkItemDataCalibratorList: [
...bestList.value.map((item: any) => {
diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue
index 806e280..b434391 100644
--- a/src/components/MultiHeaderTable/tableColumn.vue
+++ b/src/components/MultiHeaderTable/tableColumn.vue
@@ -61,7 +61,9 @@
*{{ item.text }}
- *{{ item.text }}
+
+ *{{ item.text }}
+
-
+
@@ -80,7 +80,7 @@
-
+
@@ -97,8 +97,10 @@
border-radius: 10px;
// width: fit-content;
background-color: v-bind(backgroundColor);
- width: 400px;
- height: 260px;
+ // width: 400px;
+ // height: 260px;
+ width: 500px;
+ height: 300px;
.left {
flex: 1;
diff --git a/src/views/business/taskMeasure/print/detail.vue b/src/views/business/taskMeasure/print/detail.vue
index a3db212..77490d2 100644
--- a/src/views/business/taskMeasure/print/detail.vue
+++ b/src/views/business/taskMeasure/print/detail.vue
@@ -72,6 +72,10 @@
])
// 选中
const handleSelectionChange = (e: any) => {
+ if (!e[0].identifyTypeName) {
+ ElMessage.warning('无标志类型, 不可打印')
+ return false
+ }
checkoutList.value = e
}
// 点击清空列表
@@ -115,7 +119,6 @@
// 选好设备
const confirmSelectEquipment = (val: any) => {
console.log(val)
-
if (val.length) {
val.forEach((item: any) => {
const index = list.value.findIndex((e: { deviceNo: string }) => e.deviceNo === item.equipmentNo)
@@ -221,12 +224,12 @@
-
- 打印
-
+
+ 打印
+
关闭
@@ -245,14 +248,14 @@
设备计量标识
-
+
清空列表
-
-
+ -->
+
+
+
+
+
+ {{ scope.$index + 1 }}
+
+
+
+
@@ -282,7 +303,6 @@
:date-title="printMenu[item.identifyTypeName].dateTitle"
:person-title="printMenu[item.identifyTypeName].personTitle"
:background-color="printMenu[item.identifyTypeName].backgroundColor"
- style="margin-top: 10px;"
/>
diff --git a/src/views/equipement/standard/book/book-interface.ts b/src/views/equipement/standard/book/book-interface.ts
index 9cb346b..1ca7749 100644
--- a/src/views/equipement/standard/book/book-interface.ts
+++ b/src/views/equipement/standard/book/book-interface.ts
@@ -141,7 +141,7 @@
id: string
testType: string // 核查点类型
params: string // 核查项目(参数)
- checkPoint: string // 核查点
+ checkPoint: number // 核查点
unit: string // 单位
frequency: string // 频率
frequencyUnit: string // 频率单位(直接存字典value)
diff --git a/src/views/equipement/standard/book/components/config/first/config.vue b/src/views/equipement/standard/book/components/config/first/config.vue
index b3c100c..b37d416 100644
--- a/src/views/equipement/standard/book/components/config/first/config.vue
+++ b/src/views/equipement/standard/book/components/config/first/config.vue
@@ -6,6 +6,7 @@
import { useCheckList } from '@/commonMethods/useCheckList'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { config, getCheckItemDetail } from '@/api/equipment/standard/book'
+import { calc } from '@/utils/useCalc'
const textMap: { [key: string]: string } = {
edit: '编辑',
detail: '详情',
@@ -115,7 +116,7 @@
id: '',
testType: list[list.length - 1].testType, // 核查点类型
params: list[list.length - 1].params, // 核查项目(参数)
- checkPoint: list[list.length - 1].checkPoint, // 核查点
+ checkPoint: Number(calc(Number(list[list.length - 1].checkPoint), 1, '+')), // 核查点
unit: list[list.length - 1].unit, // 单位
frequency: '', // 频率
frequencyUnit: '', // 频率单位(直接存字典value)
@@ -135,7 +136,7 @@
id: '',
testType: title, // 核查点类型
params: '', // 核查项目(参数)
- checkPoint: '', // 核查点
+ checkPoint: 1, // 核查点
unit: '', // 单位
frequency: '', // 频率
frequencyUnit: '', // 频率单位(直接存字典value)
@@ -213,6 +214,7 @@
if (!checkList(worstList.value, '最差点表格')) { return false }
if (!checkList(modelList.value, '典型点表格')) { return false }
const params = {
+ equipmentId: equipmentId.value, // 设备id
itemCategoryId: form.value.itemCategoryId, // 核查项分类id
checkItemDataCalibratorList: [
...bestList.value.map((item: any) => {
diff --git a/src/views/equipement/standard/checkData/components/first/checkDataCom.vue b/src/views/equipement/standard/checkData/components/first/checkDataCom.vue
index 0780c97..bc04d69 100644
--- a/src/views/equipement/standard/checkData/components/first/checkDataCom.vue
+++ b/src/views/equipement/standard/checkData/components/first/checkDataCom.vue
@@ -11,6 +11,7 @@
import { useUniqueArray } from '@/utils/useUniqueArray'
import { getCheckItemDetail, getJobInstructionList } from '@/api/equipment/standard/book'
import { addCheckData, calculateHandle, getHistoryIndication, getInfo, updateCheckData } from '@/api/equipment/standard/checkData'
+import { deepCopy } from '@/utils/deepCopy'
const props = defineProps({
selectStandardId: {
type: String,
@@ -28,9 +29,9 @@
const infoId = ref('')
const ruleFormRef = ref() // 表单ref
const form = ref({
- bestQualified: '1合格', // 稳定性考核是否合格_最佳点
- worstQualified: '1合格', // 稳定性考核是否合格_最差点
- modelQualified: '1合格', // 稳定性考核是否合格_典型点
+ bestQualified: '合格', // 稳定性考核是否合格_最佳点
+ worstQualified: '合格', // 稳定性考核是否合格_最差点
+ modelQualified: '合格', // 稳定性考核是否合格_典型点
})
const belongStandardEquipment = ref('1')
const itemCategoryId = ref('')
@@ -65,8 +66,8 @@
text: '示值',
value: 'indicatingValue',
align: 'center',
- required: true,
- width: '160',
+ required: false,
+ width: '180',
children: [
{ text: '1', value: 'testValueOne', align: 'center', required: true, type: 'inputNumber', customHeader: false },
{ text: '2', value: 'testValueTwo', align: 'center', required: true, type: 'inputNumber', customHeader: false },
@@ -80,7 +81,7 @@
{ text: '标准偏差S(X)', value: 'standardDeviation', align: 'center', required: true, type: 'text' },
{ text: '相对重复性', value: 'relativeRepeatability', align: 'center', type: 'text' },
])
-const stabilityColumns = ref([ // 稳定性表头
+const columnsCommon = [
{ text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' },
{ text: '核查点', value: 'checkPoint', align: 'center', required: true, type: 'text' },
{ text: '单位', value: 'unit', align: 'center', required: true, type: 'text' },
@@ -90,8 +91,8 @@
text: '示值',
value: 'indicatingValue',
align: 'center',
- required: true,
- width: '160',
+ required: false,
+ width: '180',
children: [
{ text: '-', value: 'testValueOne', align: 'center', required: true, type: 'text', customHeader: true },
{ text: '-', value: 'testValueTwo', align: 'center', required: true, type: 'text', customHeader: true },
@@ -108,7 +109,10 @@
{ text: 'Urel', value: 'urel', align: 'center', type: 'text' },
{ text: '相对重复性是否小于相对扩展不确定度Urel', value: 'lessThan', align: 'center', type: 'text' },
// { text: '稳定性考核是否合格', value: 'flit', align: 'center' },
-])
+] as TableColumn[]
+const stabilityColumnsBest = ref(columnsCommon) // 稳定性表头最佳点
+const stabilityColumnsWorst = ref(columnsCommon) // 最差点稳定性
+const stabilityColumnsModel = ref(columnsCommon) // 典型点稳定性
const bestListCheckDate = ref([]) // 最佳点重复性查询数据
const bestListStabilityCheckDate = ref([]) // 最佳点稳定性查询数据
@@ -143,8 +147,8 @@
getCheckItemDetail(params).then((res) => {
loading.close()
handleData(res.data.checkItemDataCalibratorList)
+ fetchHistoryIndication() // 获取稳定性
})
- fetchHistoryIndication()
}
// 处理数据
@@ -444,61 +448,80 @@
})
}
// ------------------------------------------------------------------------------------------
+// 处理详情数据
+const solveGetDetailData = (responseList: any) => {
+ const bestList = responseList.filter((item: { testType: string; checkType: string }) => item.testType === '最佳点' && item.checkType === '重复性').map((item: any) => {
+ return {
+ ...item,
+ editable: props.pageType !== 'detail',
+ }
+ })
+ const worstList = responseList.filter((item: { testType: string ; checkType: string }) => item.testType === '最差点' && item.checkType === '重复性').map((item: any) => {
+ return {
+ ...item,
+ editable: props.pageType !== 'detail',
+ }
+ })
+ const modelList = responseList.filter((item: { testType: string ; checkType: string }) => item.testType === '典型点' && item.checkType === '重复性').map((item: any) => {
+ return {
+ ...item,
+ editable: props.pageType !== 'detail',
+ }
+ })
+ const bestListStability = responseList.filter((item: { testType: string ; checkType: string }) => item.testType === '最佳点' && item.checkType === '稳定性').map((item: any) => {
+ return {
+ ...item,
+ lessThan: `${item.lessThan}` === '1' ? '是' : `${item.lessThan}` === '0' ? '否' : item.lessThan,
+ }
+ })
+ const worstListStability = responseList.filter((item: { testType: string; checkType: string }) => item.testType === '最差点' && item.checkType === '稳定性').map((item: any) => {
+ return {
+ ...item,
+ lessThan: `${item.lessThan}` === '1' ? '是' : `${item.lessThan}` === '0' ? '否' : item.lessThan,
+ }
+ })
+ const modelListStability = responseList.filter((item: { testType: string; checkType: string }) => item.testType === '典型点' && item.checkType === '稳定性').map((item: any) => {
+ return {
+ ...item,
+ lessThan: `${item.lessThan}` === '1' ? '是' : `${item.lessThan}` === '0' ? '否' : item.lessThan,
+ }
+ })
+ return {
+ tempBestList: bestList,
+ tempWorstList: worstList,
+ tempModelList: modelList,
+ tempBestListStability: bestListStability,
+ tempWorstListStability: worstListStability,
+ tempModelListStability: modelListStability,
+ }
+}
// 获取详情
-function fetchInfo() {
+function fetchInfo(id = '') {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- getInfo({ id: infoId.value }).then((res) => {
+ getInfo({ id: id || infoId.value }).then((res) => {
form.value = { ...res.data }
equipmentId.value = res.data.equipmentId
- if (currentDate.value !== '' && currentDate.value !== '核查数据') { // 查询的日期获得的数据
- bestListCheckDate.value = bestList.value// 最佳点重复性查询数据
- bestListStabilityCheckDate.value = bestListStability.value // 最佳点稳定性查询数据
- worstListCheckDate.value = worstList.value// 最差点重复性查询数据
- worstListStabilityCheckDate.value = worstListStability.value// 最差点稳定性查询数据
- modelListCheckDate.value = modelList.value// 典型点重复性查询数据
- modelListStabilityCheckDate.value = modelListStability.value// 典型点稳定性查询数据
+ if (id !== '') { // 查询的日期获得的数据
+ const { tempBestList, tempWorstList, tempModelList, tempBestListStability, tempWorstListStability, tempModelListStability } = solveGetDetailData(res.data.checkDataCalibratorList)
+ bestListCheckDate.value = tempBestList// 最佳点重复性查询数据
+ bestListStabilityCheckDate.value = tempWorstList // 最佳点稳定性查询数据
+ worstListCheckDate.value = tempModelList// 最差点重复性查询数据
+ worstListStabilityCheckDate.value = tempBestListStability// 最差点稳定性查询数据
+ modelListCheckDate.value = tempWorstListStability// 典型点重复性查询数据
+ modelListStabilityCheckDate.value = tempModelListStability// 典型点稳定性查询数据
}
else {
- bestList.value = res.data.checkDataCalibratorList.filter((item: { testType: string; checkType: string }) => item.testType === '最佳点' && item.checkType === '重复性').map((item: any) => {
- return {
- ...item,
- editable: props.pageType !== 'detail',
- }
- })
- worstList.value = res.data.checkDataCalibratorList.filter((item: { testType: string ; checkType: string }) => item.testType === '最差点' && item.checkType === '重复性').map((item: any) => {
- return {
- ...item,
- editable: props.pageType !== 'detail',
- }
- })
- modelList.value = res.data.checkDataCalibratorList.filter((item: { testType: string ; checkType: string }) => item.testType === '典型点' && item.checkType === '重复性').map((item: any) => {
- return {
- ...item,
- editable: props.pageType !== 'detail',
- }
- })
- bestListStability.value = res.data.checkDataCalibratorList.filter((item: { testType: string ; checkType: string }) => item.testType === '最佳点' && item.checkType === '稳定性').map((item: any) => {
- return {
- ...item,
- lessThan: `${item.lessThan}` === '1' ? '是' : `${item.lessThan}` === '0' ? '否' : item.lessThan,
- }
- })
- worstListStability.value = res.data.checkDataCalibratorList.filter((item: { testType: string; checkType: string }) => item.testType === '最差点' && item.checkType === '稳定性').map((item: any) => {
- return {
- ...item,
- lessThan: `${item.lessThan}` === '1' ? '是' : `${item.lessThan}` === '0' ? '否' : item.lessThan,
- }
- })
- modelListStability.value = res.data.checkDataCalibratorList.filter((item: { testType: string; checkType: string }) => item.testType === '典型点' && item.checkType === '稳定性').map((item: any) => {
- return {
- ...item,
- lessThan: `${item.lessThan}` === '1' ? '是' : `${item.lessThan}` === '0' ? '否' : item.lessThan,
- }
- })
+ const { tempBestList, tempWorstList, tempModelList, tempBestListStability, tempWorstListStability, tempModelListStability } = solveGetDetailData(res.data.checkDataCalibratorList)
+ bestList.value = tempBestList
+ worstList.value = tempWorstList
+ modelList.value = tempModelList
+ bestListStability.value = tempBestListStability
+ worstListStability.value = tempWorstListStability
+ modelListStability.value = tempModelListStability
}
// 表头
nextTick(() => {
@@ -529,27 +552,32 @@
// 最佳点
bestListStability.value = bestListStability.value.map((item) => {
clearDateValue(item)
- const { itemData, columnsData } = solveHistoryIndicationTableData(res.data, item, stabilityColumns.value)
- stabilityColumns.value = columnsData
+ const { itemData, columnsData } = solveHistoryIndicationTableData(res.data, item, stabilityColumnsBest.value)
+ stabilityColumnsBest.value = columnsData
return item = itemData
})
- bestListStability.value = handleSaveDateParams(stabilityColumns.value, bestListStability.value)
+ bestListStability.value = handleSaveDateParams(stabilityColumnsBest.value, bestListStability.value)
+ console.log('最佳', stabilityColumnsBest.value[5].children)
+
// 最差点
worstListStability.value = worstListStability.value.map((item) => {
clearDateValue(item)
- const { itemData, columnsData } = solveHistoryIndicationTableData(res.data, item, stabilityColumns.value)
- stabilityColumns.value = columnsData
+ const { itemData, columnsData } = solveHistoryIndicationTableData(res.data, item, stabilityColumnsWorst.value)
+ stabilityColumnsWorst.value = columnsData
return item = itemData
})
- worstListStability.value = handleSaveDateParams(stabilityColumns.value, worstListStability.value)
+ // console.log('最cha', stabilityColumnsWorst.value[5].children)
+ console.log('最佳', stabilityColumnsBest.value[5].children)
+
+ worstListStability.value = handleSaveDateParams(stabilityColumnsWorst.value, worstListStability.value)
// 典型点
- modelListStability.value = modelListStability.value.map((item) => {
- clearDateValue(item)
- const { itemData, columnsData } = solveHistoryIndicationTableData(res.data, item, stabilityColumns.value)
- stabilityColumns.value = columnsData
- return item = itemData
- })
- modelListStability.value = handleSaveDateParams(stabilityColumns.value, modelListStability.value)
+ // modelListStability.value = modelListStability.value.map((item) => {
+ // clearDateValue(item)
+ // const { itemData, columnsData } = solveHistoryIndicationTableData(res.data, item, stabilityColumnsModel.value)
+ // stabilityColumnsModel.value = columnsData
+ // return item = itemData
+ // })
+ modelListStability.value = handleSaveDateParams(stabilityColumnsModel.value, modelListStability.value)
stabilityTableLoading.value = false
}).catch(() => { stabilityTableLoading.value = false })
}
@@ -571,18 +599,25 @@
ElMessage.warning('请计算典型点重复性')
return false
}
- if (current.value === 'best' && `${bestListStability.value[0].averageValue}` === '') { // 最佳点
+ if (current.value === 'best' && `${bestListStability.value[0].lessThan}` === '') { // 最佳点
ElMessage.warning('请计算最佳点稳定性')
return false
}
- if (current.value === 'worst' && `${worstListStability.value[0].averageValue}` === '') { // 最差点
+ if (current.value === 'worst' && `${worstListStability.value[0].lessThan}` === '') { // 最差点
ElMessage.warning('请计算最差点稳定性')
return false
}
- if (current.value === 'model' && `${modelListStability.value[0].averageValue}` === '') { // 典型点
+ if (current.value === 'model' && `${modelListStability.value[0].lessThan}` === '') { // 典型点
ElMessage.warning('请计算典型点稳定性')
return false
}
+ let dateNum = 0 // 稳定性表格有几个日期
+ // 统计有几个日期
+ stabilityColumns.value[5].children?.forEach((item) => {
+ if (item.text !== '-' && item.text !== '') {
+ dateNum += 1
+ }
+ })
// 保存之前判断一下结论 如果所有的相对重复性是否小于相对扩展不确定度Urel全为是,则结论合格
if (bestListStability.value.every(item => item.lessThan === '是') && worstListStability.value.every(item => item.lessThan === '是') && modelListStability.value.every(item => item.lessThan === '是')) {
@@ -591,9 +626,9 @@
form.value.modelQualified = '合格'
}
else {
- form.value.bestQualified = '不合格'
- form.value.worstQualified = '不合格'
- form.value.modelQualified = '不合格'
+ form.value.bestQualified = dateNum < 4 ? '合格' : '不合格'
+ form.value.worstQualified = dateNum < 4 ? '合格' : '不合格'
+ form.value.modelQualified = dateNum < 4 ? '合格' : '不合格'
}
return true
@@ -605,6 +640,7 @@
console.log(val, checkDateDetailId)
// dateArrStability.value.push(val.label)
dateArrStability.value = ['核查数据', val.label]
+ fetchInfo(checkDateDetailId)
}
// 日期变化
@@ -645,7 +681,7 @@
// 监听核查日期变化
watch(() => props.checkDate, (newValue) => {
- stabilityColumns.value[5].children = [
+ stabilityColumnsBest.value[5].children = [
{ text: '-', value: 'testValueOne', align: 'center', required: true, type: 'text', customHeader: true },
{ text: '-', value: 'testValueTwo', align: 'center', required: true, type: 'text', customHeader: true },
{ text: '-', value: 'testValueThree', align: 'center', required: true, type: 'text', customHeader: true },
@@ -653,11 +689,39 @@
{ text: '-', value: 'testValueFive', align: 'center', required: true, type: 'text', customHeader: true },
{ text: '-', value: 'testValueSix', align: 'center', required: true, type: 'text', customHeader: true },
]
- const index = stabilityColumns.value.findIndex(item => item.text === '示值')
+ const index = stabilityColumnsBest.value.findIndex(item => item.text === '示值')
if (index !== -1) {
- stabilityColumns.value[index].children![5].text = newValue! // 最后一列的表头日期
+ stabilityColumnsBest.value[index].children![5].text = newValue! // 最后一列的表头日期
}
- fetchHistoryIndication() // 重新拉取稳定性日期
+
+ stabilityColumnsWorst.value[5].children = [
+ { text: '-', value: 'testValueOne', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueTwo', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueThree', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueFour', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueFive', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueSix', align: 'center', required: true, type: 'text', customHeader: true },
+ ]
+ const indexWorst = stabilityColumnsWorst.value.findIndex(item => item.text === '示值')
+ if (index !== -1) {
+ stabilityColumnsWorst.value[indexWorst].children![5].text = newValue! // 最后一列的表头日期
+ }
+
+ stabilityColumnsModel.value[5].children = [
+ { text: '-', value: 'testValueOne', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueTwo', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueThree', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueFour', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueFive', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueSix', align: 'center', required: true, type: 'text', customHeader: true },
+ ]
+ const indexModel = stabilityColumnsModel.value.findIndex(item => item.text === '示值')
+ if (index !== -1) {
+ stabilityColumnsModel.value[indexModel].children![5].text = newValue! // 最后一列的表头日期
+ }
+ nextTick(() => {
+ fetchHistoryIndication() // 重新拉取稳定性日期
+ })
}, { immediate: true })
watch(() => props.pageType, (newValue) => {
@@ -698,6 +762,7 @@
- {{ currentDate }}
*{{ item.text }}
- *{{ item.text }}
+
+ *{{ item.text }}
+
-
+
@@ -80,7 +80,7 @@
-
+
@@ -97,8 +97,10 @@
border-radius: 10px;
// width: fit-content;
background-color: v-bind(backgroundColor);
- width: 400px;
- height: 260px;
+ // width: 400px;
+ // height: 260px;
+ width: 500px;
+ height: 300px;
.left {
flex: 1;
diff --git a/src/views/business/taskMeasure/print/detail.vue b/src/views/business/taskMeasure/print/detail.vue
index a3db212..77490d2 100644
--- a/src/views/business/taskMeasure/print/detail.vue
+++ b/src/views/business/taskMeasure/print/detail.vue
@@ -72,6 +72,10 @@
])
// 选中
const handleSelectionChange = (e: any) => {
+ if (!e[0].identifyTypeName) {
+ ElMessage.warning('无标志类型, 不可打印')
+ return false
+ }
checkoutList.value = e
}
// 点击清空列表
@@ -115,7 +119,6 @@
// 选好设备
const confirmSelectEquipment = (val: any) => {
console.log(val)
-
if (val.length) {
val.forEach((item: any) => {
const index = list.value.findIndex((e: { deviceNo: string }) => e.deviceNo === item.equipmentNo)
@@ -221,12 +224,12 @@
-
- 打印
-
+
+ 打印
+
关闭
@@ -245,14 +248,14 @@
设备计量标识
-
+
清空列表
-
-
+ -->
+
+
+
+
+
+ {{ scope.$index + 1 }}
+
+
+
+
@@ -282,7 +303,6 @@
:date-title="printMenu[item.identifyTypeName].dateTitle"
:person-title="printMenu[item.identifyTypeName].personTitle"
:background-color="printMenu[item.identifyTypeName].backgroundColor"
- style="margin-top: 10px;"
/>
diff --git a/src/views/equipement/standard/book/book-interface.ts b/src/views/equipement/standard/book/book-interface.ts
index 9cb346b..1ca7749 100644
--- a/src/views/equipement/standard/book/book-interface.ts
+++ b/src/views/equipement/standard/book/book-interface.ts
@@ -141,7 +141,7 @@
id: string
testType: string // 核查点类型
params: string // 核查项目(参数)
- checkPoint: string // 核查点
+ checkPoint: number // 核查点
unit: string // 单位
frequency: string // 频率
frequencyUnit: string // 频率单位(直接存字典value)
diff --git a/src/views/equipement/standard/book/components/config/first/config.vue b/src/views/equipement/standard/book/components/config/first/config.vue
index b3c100c..b37d416 100644
--- a/src/views/equipement/standard/book/components/config/first/config.vue
+++ b/src/views/equipement/standard/book/components/config/first/config.vue
@@ -6,6 +6,7 @@
import { useCheckList } from '@/commonMethods/useCheckList'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { config, getCheckItemDetail } from '@/api/equipment/standard/book'
+import { calc } from '@/utils/useCalc'
const textMap: { [key: string]: string } = {
edit: '编辑',
detail: '详情',
@@ -115,7 +116,7 @@
id: '',
testType: list[list.length - 1].testType, // 核查点类型
params: list[list.length - 1].params, // 核查项目(参数)
- checkPoint: list[list.length - 1].checkPoint, // 核查点
+ checkPoint: Number(calc(Number(list[list.length - 1].checkPoint), 1, '+')), // 核查点
unit: list[list.length - 1].unit, // 单位
frequency: '', // 频率
frequencyUnit: '', // 频率单位(直接存字典value)
@@ -135,7 +136,7 @@
id: '',
testType: title, // 核查点类型
params: '', // 核查项目(参数)
- checkPoint: '', // 核查点
+ checkPoint: 1, // 核查点
unit: '', // 单位
frequency: '', // 频率
frequencyUnit: '', // 频率单位(直接存字典value)
@@ -213,6 +214,7 @@
if (!checkList(worstList.value, '最差点表格')) { return false }
if (!checkList(modelList.value, '典型点表格')) { return false }
const params = {
+ equipmentId: equipmentId.value, // 设备id
itemCategoryId: form.value.itemCategoryId, // 核查项分类id
checkItemDataCalibratorList: [
...bestList.value.map((item: any) => {
diff --git a/src/views/equipement/standard/checkData/components/first/checkDataCom.vue b/src/views/equipement/standard/checkData/components/first/checkDataCom.vue
index 0780c97..bc04d69 100644
--- a/src/views/equipement/standard/checkData/components/first/checkDataCom.vue
+++ b/src/views/equipement/standard/checkData/components/first/checkDataCom.vue
@@ -11,6 +11,7 @@
import { useUniqueArray } from '@/utils/useUniqueArray'
import { getCheckItemDetail, getJobInstructionList } from '@/api/equipment/standard/book'
import { addCheckData, calculateHandle, getHistoryIndication, getInfo, updateCheckData } from '@/api/equipment/standard/checkData'
+import { deepCopy } from '@/utils/deepCopy'
const props = defineProps({
selectStandardId: {
type: String,
@@ -28,9 +29,9 @@
const infoId = ref('')
const ruleFormRef = ref() // 表单ref
const form = ref({
- bestQualified: '1合格', // 稳定性考核是否合格_最佳点
- worstQualified: '1合格', // 稳定性考核是否合格_最差点
- modelQualified: '1合格', // 稳定性考核是否合格_典型点
+ bestQualified: '合格', // 稳定性考核是否合格_最佳点
+ worstQualified: '合格', // 稳定性考核是否合格_最差点
+ modelQualified: '合格', // 稳定性考核是否合格_典型点
})
const belongStandardEquipment = ref('1')
const itemCategoryId = ref('')
@@ -65,8 +66,8 @@
text: '示值',
value: 'indicatingValue',
align: 'center',
- required: true,
- width: '160',
+ required: false,
+ width: '180',
children: [
{ text: '1', value: 'testValueOne', align: 'center', required: true, type: 'inputNumber', customHeader: false },
{ text: '2', value: 'testValueTwo', align: 'center', required: true, type: 'inputNumber', customHeader: false },
@@ -80,7 +81,7 @@
{ text: '标准偏差S(X)', value: 'standardDeviation', align: 'center', required: true, type: 'text' },
{ text: '相对重复性', value: 'relativeRepeatability', align: 'center', type: 'text' },
])
-const stabilityColumns = ref([ // 稳定性表头
+const columnsCommon = [
{ text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' },
{ text: '核查点', value: 'checkPoint', align: 'center', required: true, type: 'text' },
{ text: '单位', value: 'unit', align: 'center', required: true, type: 'text' },
@@ -90,8 +91,8 @@
text: '示值',
value: 'indicatingValue',
align: 'center',
- required: true,
- width: '160',
+ required: false,
+ width: '180',
children: [
{ text: '-', value: 'testValueOne', align: 'center', required: true, type: 'text', customHeader: true },
{ text: '-', value: 'testValueTwo', align: 'center', required: true, type: 'text', customHeader: true },
@@ -108,7 +109,10 @@
{ text: 'Urel', value: 'urel', align: 'center', type: 'text' },
{ text: '相对重复性是否小于相对扩展不确定度Urel', value: 'lessThan', align: 'center', type: 'text' },
// { text: '稳定性考核是否合格', value: 'flit', align: 'center' },
-])
+] as TableColumn[]
+const stabilityColumnsBest = ref(columnsCommon) // 稳定性表头最佳点
+const stabilityColumnsWorst = ref(columnsCommon) // 最差点稳定性
+const stabilityColumnsModel = ref(columnsCommon) // 典型点稳定性
const bestListCheckDate = ref([]) // 最佳点重复性查询数据
const bestListStabilityCheckDate = ref([]) // 最佳点稳定性查询数据
@@ -143,8 +147,8 @@
getCheckItemDetail(params).then((res) => {
loading.close()
handleData(res.data.checkItemDataCalibratorList)
+ fetchHistoryIndication() // 获取稳定性
})
- fetchHistoryIndication()
}
// 处理数据
@@ -444,61 +448,80 @@
})
}
// ------------------------------------------------------------------------------------------
+// 处理详情数据
+const solveGetDetailData = (responseList: any) => {
+ const bestList = responseList.filter((item: { testType: string; checkType: string }) => item.testType === '最佳点' && item.checkType === '重复性').map((item: any) => {
+ return {
+ ...item,
+ editable: props.pageType !== 'detail',
+ }
+ })
+ const worstList = responseList.filter((item: { testType: string ; checkType: string }) => item.testType === '最差点' && item.checkType === '重复性').map((item: any) => {
+ return {
+ ...item,
+ editable: props.pageType !== 'detail',
+ }
+ })
+ const modelList = responseList.filter((item: { testType: string ; checkType: string }) => item.testType === '典型点' && item.checkType === '重复性').map((item: any) => {
+ return {
+ ...item,
+ editable: props.pageType !== 'detail',
+ }
+ })
+ const bestListStability = responseList.filter((item: { testType: string ; checkType: string }) => item.testType === '最佳点' && item.checkType === '稳定性').map((item: any) => {
+ return {
+ ...item,
+ lessThan: `${item.lessThan}` === '1' ? '是' : `${item.lessThan}` === '0' ? '否' : item.lessThan,
+ }
+ })
+ const worstListStability = responseList.filter((item: { testType: string; checkType: string }) => item.testType === '最差点' && item.checkType === '稳定性').map((item: any) => {
+ return {
+ ...item,
+ lessThan: `${item.lessThan}` === '1' ? '是' : `${item.lessThan}` === '0' ? '否' : item.lessThan,
+ }
+ })
+ const modelListStability = responseList.filter((item: { testType: string; checkType: string }) => item.testType === '典型点' && item.checkType === '稳定性').map((item: any) => {
+ return {
+ ...item,
+ lessThan: `${item.lessThan}` === '1' ? '是' : `${item.lessThan}` === '0' ? '否' : item.lessThan,
+ }
+ })
+ return {
+ tempBestList: bestList,
+ tempWorstList: worstList,
+ tempModelList: modelList,
+ tempBestListStability: bestListStability,
+ tempWorstListStability: worstListStability,
+ tempModelListStability: modelListStability,
+ }
+}
// 获取详情
-function fetchInfo() {
+function fetchInfo(id = '') {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- getInfo({ id: infoId.value }).then((res) => {
+ getInfo({ id: id || infoId.value }).then((res) => {
form.value = { ...res.data }
equipmentId.value = res.data.equipmentId
- if (currentDate.value !== '' && currentDate.value !== '核查数据') { // 查询的日期获得的数据
- bestListCheckDate.value = bestList.value// 最佳点重复性查询数据
- bestListStabilityCheckDate.value = bestListStability.value // 最佳点稳定性查询数据
- worstListCheckDate.value = worstList.value// 最差点重复性查询数据
- worstListStabilityCheckDate.value = worstListStability.value// 最差点稳定性查询数据
- modelListCheckDate.value = modelList.value// 典型点重复性查询数据
- modelListStabilityCheckDate.value = modelListStability.value// 典型点稳定性查询数据
+ if (id !== '') { // 查询的日期获得的数据
+ const { tempBestList, tempWorstList, tempModelList, tempBestListStability, tempWorstListStability, tempModelListStability } = solveGetDetailData(res.data.checkDataCalibratorList)
+ bestListCheckDate.value = tempBestList// 最佳点重复性查询数据
+ bestListStabilityCheckDate.value = tempWorstList // 最佳点稳定性查询数据
+ worstListCheckDate.value = tempModelList// 最差点重复性查询数据
+ worstListStabilityCheckDate.value = tempBestListStability// 最差点稳定性查询数据
+ modelListCheckDate.value = tempWorstListStability// 典型点重复性查询数据
+ modelListStabilityCheckDate.value = tempModelListStability// 典型点稳定性查询数据
}
else {
- bestList.value = res.data.checkDataCalibratorList.filter((item: { testType: string; checkType: string }) => item.testType === '最佳点' && item.checkType === '重复性').map((item: any) => {
- return {
- ...item,
- editable: props.pageType !== 'detail',
- }
- })
- worstList.value = res.data.checkDataCalibratorList.filter((item: { testType: string ; checkType: string }) => item.testType === '最差点' && item.checkType === '重复性').map((item: any) => {
- return {
- ...item,
- editable: props.pageType !== 'detail',
- }
- })
- modelList.value = res.data.checkDataCalibratorList.filter((item: { testType: string ; checkType: string }) => item.testType === '典型点' && item.checkType === '重复性').map((item: any) => {
- return {
- ...item,
- editable: props.pageType !== 'detail',
- }
- })
- bestListStability.value = res.data.checkDataCalibratorList.filter((item: { testType: string ; checkType: string }) => item.testType === '最佳点' && item.checkType === '稳定性').map((item: any) => {
- return {
- ...item,
- lessThan: `${item.lessThan}` === '1' ? '是' : `${item.lessThan}` === '0' ? '否' : item.lessThan,
- }
- })
- worstListStability.value = res.data.checkDataCalibratorList.filter((item: { testType: string; checkType: string }) => item.testType === '最差点' && item.checkType === '稳定性').map((item: any) => {
- return {
- ...item,
- lessThan: `${item.lessThan}` === '1' ? '是' : `${item.lessThan}` === '0' ? '否' : item.lessThan,
- }
- })
- modelListStability.value = res.data.checkDataCalibratorList.filter((item: { testType: string; checkType: string }) => item.testType === '典型点' && item.checkType === '稳定性').map((item: any) => {
- return {
- ...item,
- lessThan: `${item.lessThan}` === '1' ? '是' : `${item.lessThan}` === '0' ? '否' : item.lessThan,
- }
- })
+ const { tempBestList, tempWorstList, tempModelList, tempBestListStability, tempWorstListStability, tempModelListStability } = solveGetDetailData(res.data.checkDataCalibratorList)
+ bestList.value = tempBestList
+ worstList.value = tempWorstList
+ modelList.value = tempModelList
+ bestListStability.value = tempBestListStability
+ worstListStability.value = tempWorstListStability
+ modelListStability.value = tempModelListStability
}
// 表头
nextTick(() => {
@@ -529,27 +552,32 @@
// 最佳点
bestListStability.value = bestListStability.value.map((item) => {
clearDateValue(item)
- const { itemData, columnsData } = solveHistoryIndicationTableData(res.data, item, stabilityColumns.value)
- stabilityColumns.value = columnsData
+ const { itemData, columnsData } = solveHistoryIndicationTableData(res.data, item, stabilityColumnsBest.value)
+ stabilityColumnsBest.value = columnsData
return item = itemData
})
- bestListStability.value = handleSaveDateParams(stabilityColumns.value, bestListStability.value)
+ bestListStability.value = handleSaveDateParams(stabilityColumnsBest.value, bestListStability.value)
+ console.log('最佳', stabilityColumnsBest.value[5].children)
+
// 最差点
worstListStability.value = worstListStability.value.map((item) => {
clearDateValue(item)
- const { itemData, columnsData } = solveHistoryIndicationTableData(res.data, item, stabilityColumns.value)
- stabilityColumns.value = columnsData
+ const { itemData, columnsData } = solveHistoryIndicationTableData(res.data, item, stabilityColumnsWorst.value)
+ stabilityColumnsWorst.value = columnsData
return item = itemData
})
- worstListStability.value = handleSaveDateParams(stabilityColumns.value, worstListStability.value)
+ // console.log('最cha', stabilityColumnsWorst.value[5].children)
+ console.log('最佳', stabilityColumnsBest.value[5].children)
+
+ worstListStability.value = handleSaveDateParams(stabilityColumnsWorst.value, worstListStability.value)
// 典型点
- modelListStability.value = modelListStability.value.map((item) => {
- clearDateValue(item)
- const { itemData, columnsData } = solveHistoryIndicationTableData(res.data, item, stabilityColumns.value)
- stabilityColumns.value = columnsData
- return item = itemData
- })
- modelListStability.value = handleSaveDateParams(stabilityColumns.value, modelListStability.value)
+ // modelListStability.value = modelListStability.value.map((item) => {
+ // clearDateValue(item)
+ // const { itemData, columnsData } = solveHistoryIndicationTableData(res.data, item, stabilityColumnsModel.value)
+ // stabilityColumnsModel.value = columnsData
+ // return item = itemData
+ // })
+ modelListStability.value = handleSaveDateParams(stabilityColumnsModel.value, modelListStability.value)
stabilityTableLoading.value = false
}).catch(() => { stabilityTableLoading.value = false })
}
@@ -571,18 +599,25 @@
ElMessage.warning('请计算典型点重复性')
return false
}
- if (current.value === 'best' && `${bestListStability.value[0].averageValue}` === '') { // 最佳点
+ if (current.value === 'best' && `${bestListStability.value[0].lessThan}` === '') { // 最佳点
ElMessage.warning('请计算最佳点稳定性')
return false
}
- if (current.value === 'worst' && `${worstListStability.value[0].averageValue}` === '') { // 最差点
+ if (current.value === 'worst' && `${worstListStability.value[0].lessThan}` === '') { // 最差点
ElMessage.warning('请计算最差点稳定性')
return false
}
- if (current.value === 'model' && `${modelListStability.value[0].averageValue}` === '') { // 典型点
+ if (current.value === 'model' && `${modelListStability.value[0].lessThan}` === '') { // 典型点
ElMessage.warning('请计算典型点稳定性')
return false
}
+ let dateNum = 0 // 稳定性表格有几个日期
+ // 统计有几个日期
+ stabilityColumns.value[5].children?.forEach((item) => {
+ if (item.text !== '-' && item.text !== '') {
+ dateNum += 1
+ }
+ })
// 保存之前判断一下结论 如果所有的相对重复性是否小于相对扩展不确定度Urel全为是,则结论合格
if (bestListStability.value.every(item => item.lessThan === '是') && worstListStability.value.every(item => item.lessThan === '是') && modelListStability.value.every(item => item.lessThan === '是')) {
@@ -591,9 +626,9 @@
form.value.modelQualified = '合格'
}
else {
- form.value.bestQualified = '不合格'
- form.value.worstQualified = '不合格'
- form.value.modelQualified = '不合格'
+ form.value.bestQualified = dateNum < 4 ? '合格' : '不合格'
+ form.value.worstQualified = dateNum < 4 ? '合格' : '不合格'
+ form.value.modelQualified = dateNum < 4 ? '合格' : '不合格'
}
return true
@@ -605,6 +640,7 @@
console.log(val, checkDateDetailId)
// dateArrStability.value.push(val.label)
dateArrStability.value = ['核查数据', val.label]
+ fetchInfo(checkDateDetailId)
}
// 日期变化
@@ -645,7 +681,7 @@
// 监听核查日期变化
watch(() => props.checkDate, (newValue) => {
- stabilityColumns.value[5].children = [
+ stabilityColumnsBest.value[5].children = [
{ text: '-', value: 'testValueOne', align: 'center', required: true, type: 'text', customHeader: true },
{ text: '-', value: 'testValueTwo', align: 'center', required: true, type: 'text', customHeader: true },
{ text: '-', value: 'testValueThree', align: 'center', required: true, type: 'text', customHeader: true },
@@ -653,11 +689,39 @@
{ text: '-', value: 'testValueFive', align: 'center', required: true, type: 'text', customHeader: true },
{ text: '-', value: 'testValueSix', align: 'center', required: true, type: 'text', customHeader: true },
]
- const index = stabilityColumns.value.findIndex(item => item.text === '示值')
+ const index = stabilityColumnsBest.value.findIndex(item => item.text === '示值')
if (index !== -1) {
- stabilityColumns.value[index].children![5].text = newValue! // 最后一列的表头日期
+ stabilityColumnsBest.value[index].children![5].text = newValue! // 最后一列的表头日期
}
- fetchHistoryIndication() // 重新拉取稳定性日期
+
+ stabilityColumnsWorst.value[5].children = [
+ { text: '-', value: 'testValueOne', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueTwo', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueThree', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueFour', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueFive', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueSix', align: 'center', required: true, type: 'text', customHeader: true },
+ ]
+ const indexWorst = stabilityColumnsWorst.value.findIndex(item => item.text === '示值')
+ if (index !== -1) {
+ stabilityColumnsWorst.value[indexWorst].children![5].text = newValue! // 最后一列的表头日期
+ }
+
+ stabilityColumnsModel.value[5].children = [
+ { text: '-', value: 'testValueOne', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueTwo', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueThree', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueFour', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueFive', align: 'center', required: true, type: 'text', customHeader: true },
+ { text: '-', value: 'testValueSix', align: 'center', required: true, type: 'text', customHeader: true },
+ ]
+ const indexModel = stabilityColumnsModel.value.findIndex(item => item.text === '示值')
+ if (index !== -1) {
+ stabilityColumnsModel.value[indexModel].children![5].text = newValue! // 最后一列的表头日期
+ }
+ nextTick(() => {
+ fetchHistoryIndication() // 重新拉取稳定性日期
+ })
}, { immediate: true })
watch(() => props.pageType, (newValue) => {
@@ -698,6 +762,7 @@
- {{ currentDate }}
{
stabilityColumns[5].children![4 - index].text = e.testValueDate // 填表头
stabilityColumns[5].children![4 - index].checkDateDetailId = e.id // id用来查对应日期的详情
item[stabilityColumns[5].children![4 - index].value] = e.testValue // 填表格数据
})
+ // console.log(stabilityColumns)
+
return {
itemData: item,
columnsData: stabilityColumns,