@@ -241,17 +241,17 @@ watch(webMsgSend,function (newValue,oldValue){
item.devName === newValue.data.devName);
if (firstCoefficientVO) { // 检查 firstCoefficientVO 是否存在
firstCoefficientVO.aVuData = parseFloat(newValue.data.aVuData).toFixed(4);
- firstCoefficientVO.aVuXi = newValue.data.aVuXi;
+ firstCoefficientVO.aVuXi = parseFloat((newValue.data.aVuXi / 10000).toFixed(4)).toString();
firstCoefficientVO.bVuData = parseFloat(newValue.data.bVuData).toFixed(4);
- firstCoefficientVO.bVuXi = newValue.data.bVuXi;
+ firstCoefficientVO.bVuXi = parseFloat((newValue.data.bVuXi / 10000).toFixed(4)).toString();
firstCoefficientVO.cVuData = parseFloat(newValue.data.cVuData).toFixed(4);
- firstCoefficientVO.cVuXi = newValue.data.cVuXi;
+ firstCoefficientVO.cVuXi = parseFloat((newValue.data.cVuXi / 10000).toFixed(4)).toString();
firstCoefficientVO.aIeData = parseFloat(newValue.data.aIeData).toFixed(4);
- firstCoefficientVO.aIeXi = newValue.data.aIeXi;
+ firstCoefficientVO.aIeXi = parseFloat((newValue.data.aVuXi / 10000).toFixed(4)).toString();
firstCoefficientVO.bIeData = parseFloat(newValue.data.bIeData).toFixed(4);
- firstCoefficientVO.bIeXi = newValue.data.bIeXi;
+ firstCoefficientVO.bIeXi = parseFloat((newValue.data.bVuXi / 10000).toFixed(4)).toString();
firstCoefficientVO.cIeData = parseFloat(newValue.data.cIeData).toFixed(4);
- firstCoefficientVO.cIeXi = newValue.data.cIeXi;
+ firstCoefficientVO.cIeXi = parseFloat((newValue.data.cVuXi / 10000).toFixed(4)).toString();
//console.log(newValue.data.devName + '对象:', firstCoefficientVO);
activeIndex.value++;
} else {
@@ -511,6 +511,11 @@ const updateErrorState = (index: number, hasError: boolean) => {
//console.log('tableDataMap',tableDataMap);
}
+
+ const emit = defineEmits<{
+ (e: 'quitClicked'): void;
+ }>();
+
const handleCancel=() => {
// 清空 name, channel, total
name.value = [];
@@ -521,6 +526,7 @@ const updateErrorState = (index: number, hasError: boolean) => {
active.value = 0
dialogVisible.value = false
editableTabsValue.value = '0'
+ emit('quitClicked'); // 触发事件
}
const getTableDataForChannel = (index: number): any[] => {
diff --git a/frontend/src/views/home/components/channelsTestTable.vue b/frontend/src/views/home/components/channelsTestTable.vue
index 63bb9c4..9f7749a 100644
--- a/frontend/src/views/home/components/channelsTestTable.vue
+++ b/frontend/src/views/home/components/channelsTestTable.vue
@@ -9,8 +9,8 @@
-
-
+
+
@@ -20,7 +20,7 @@
-
+
-
-
+
+
@@ -65,7 +65,7 @@
-
+
-
-
+
+
@@ -104,7 +104,7 @@
-
+
-
-
+
+
@@ -145,7 +145,7 @@
-
+
-
-
+
+
@@ -184,7 +184,7 @@
-
+
-
-
+
+
@@ -223,7 +223,7 @@
-
+
-
-
-
+
+
+
-
+
diff --git a/frontend/src/views/home/components/dataCheckResultTable.vue b/frontend/src/views/home/components/dataCheckResultTable.vue
index 3a0ee3e..ef23c7b 100644
--- a/frontend/src/views/home/components/dataCheckResultTable.vue
+++ b/frontend/src/views/home/components/dataCheckResultTable.vue
@@ -9,7 +9,7 @@
-
+
@@ -26,7 +26,7 @@
-
+
@@ -43,7 +43,7 @@
-
+
@@ -63,7 +63,7 @@
-
+
diff --git a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue
index 0f4b154..28c7d29 100644
--- a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue
+++ b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue
@@ -206,8 +206,8 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => {
scriptType,
code: parseInt(checkStore.planCode)
})
- updateTreeFly(resTreeDataTemp, 2)
updateTreeFly(resTreeDataTemp, 4)
+ updateTreeFly(resTreeDataTemp, 2)
Object.assign(treeDataAll, resTreeDataTemp)
@@ -237,16 +237,7 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => {
watch(currentCheckItem, (newVal, oldVal) => {
// console.log("当前检测项", newVal);
if (newVal) {
- // let key = newVal.toString() === 'Voltage' ? '电压幅值' : '持续时间'
- let resCheckResult: CheckData.ResCheckResult = resTableData.resultData.get(newVal)
- setCheckResultData(resCheckResult)
-
- let tempRawData = resTableData.rawData.get(newVal)
- if (tempRawData) {
- setRawData(tempRawData)
- } else {
- setRawData([])
- }
+ doCurrentCheckItemUpdate(newVal)
}
activeTab.value = 'resultTab'
})
@@ -312,6 +303,13 @@ const updateTableData = async () => {
let resCheckResult: CheckData.ResCheckResult = {}
let resRawData: CheckData.RawDataItem[] = []
+ if (keys1.length === 0) {
+ checkList.length = 0
+ checkResultData.length = 0
+ rawTableData.length = 0
+ currentCheckItem.value = ''
+ }
+
if (keys1.length === 1) {
resCheckResult = resTableData.resultData.get(keys1[0])
resRawData = resTableData.rawData.get(keys2[0])
@@ -364,10 +362,12 @@ const updateTableData = async () => {
})
}
- // debugger
Object.assign(checkList, tempCheckList)
-
- currentCheckItem.value = checkList[0].value
+ if (currentCheckItem.value == tempCheckList[0].value) {
+ doCurrentCheckItemUpdate(tempCheckList[0].value)
+ } else {
+ currentCheckItem.value = tempCheckList[0].value
+ }
}
}
@@ -378,6 +378,20 @@ const updateTableData = async () => {
}
}
+const doCurrentCheckItemUpdate = (newVal: string)=>{
+ let resCheckResult: CheckData.ResCheckResult = resTableData.resultData.get(newVal)
+ setCheckResultData(resCheckResult)
+
+ let tempRawData = resTableData.rawData.get(newVal)
+ if (tempRawData) {
+ setRawData(tempRawData)
+ } else {
+ setRawData([])
+ }
+
+ activeTab.value = 'resultTab'
+}
+
const open = async (_deviceId: string, chnNum: string, _scriptType: string | null) => {
deviceId = _deviceId
scriptType = _scriptType
@@ -433,9 +447,13 @@ const close = () => {
visible.value = false;
};
-const setCheckResultData = (data: CheckData.ResCheckResult) => {
+const setCheckResultData = (data: CheckData.ResCheckResult|null) => {
// console.log("检测结果", data);
let result: CheckData.CheckResult[] = []
+ if (data == null || data == undefined) {
+ Object.assign(checkResultData, [])
+ return
+ }
if (data.dataA != null && data.dataB != null && data.dataC != null) {
result.push({
stdA: numberToFixed(data.dataA.resultData),
diff --git a/frontend/src/views/home/components/table.vue b/frontend/src/views/home/components/table.vue
index 6024cbc..347b417 100644
--- a/frontend/src/views/home/components/table.vue
+++ b/frontend/src/views/home/components/table.vue
@@ -87,9 +87,9 @@
>
- 报告下载
+ > -->
+
Q/GDW 1650.2-2016 报告
GBT 19862-2016 报告
-