三项不平衡原始数据表头修改
This commit is contained in:
@@ -6,14 +6,17 @@
|
|||||||
style="width: 100%;">
|
style="width: 100%;">
|
||||||
<el-table-column type="index" label="序号" width="70" fixed="left"/>
|
<el-table-column type="index" label="序号" width="70" fixed="left"/>
|
||||||
<el-table-column prop="time" label="数据时间"/>
|
<el-table-column prop="time" label="数据时间"/>
|
||||||
<template v-if="phaseT === 0">
|
<template v-if="!isThreePhase && phaseT === 0">
|
||||||
<el-table-column prop="dataA" :label="'A相'+(unit==''?'':'('+unit+')')"/>
|
<el-table-column prop="dataA" :label="'A相'+(unit==''?'':'('+unit+')')"/>
|
||||||
<el-table-column prop="dataB" :label="'B相'+(unit==''?'':'('+unit+')')"/>
|
<el-table-column prop="dataB" :label="'B相'+(unit==''?'':'('+unit+')')"/>
|
||||||
<el-table-column prop="dataC" :label="'C相'+(unit==''?'':'('+unit+')')"/>
|
<el-table-column prop="dataC" :label="'C相'+(unit==''?'':'('+unit+')')"/>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="phaseT === 1">
|
<template v-if="!isThreePhase && phaseT === 1">
|
||||||
<el-table-column prop="dataT" :label="tableHeader+(unit==''?'':'('+unit+')')"/>
|
<el-table-column prop="dataT" :label="tableHeader+(unit==''?'':'('+unit+')')"/>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="isThreePhase">
|
||||||
|
<el-table-column prop="dataB" :label="'负序不平衡度'+(unit==''?'':'('+unit+')')"/>
|
||||||
|
</template>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -46,6 +49,10 @@ const tableHeader = computed(() => {
|
|||||||
return currentScriptTypeName
|
return currentScriptTypeName
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const isThreePhase = computed(() => {
|
||||||
|
return currentScriptTypeName.includes('三相电压不平衡度') || currentScriptTypeName.includes('三相电流不平衡度')
|
||||||
|
})
|
||||||
|
|
||||||
const exportData = () => {
|
const exportData = () => {
|
||||||
emit('exportRawDataHandler')
|
emit('exportRawDataHandler')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
<DataCheckResultTable :tableData="checkResultData" :currentScriptTypeName="currentScriptTypeName"/>
|
<DataCheckResultTable :tableData="checkResultData" :currentScriptTypeName="currentScriptTypeName"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="原始数据" name="rawDataTab">
|
<el-tab-pane label="原始数据" name="rawDataTab">
|
||||||
<DataCheckRawDataTable :tableData="rawTableData" :currentScriptTypeName="currentScriptTypeName"/>
|
<DataCheckRawDataTable :tableData="rawTableData" :currentScriptTypeName="currentScriptTypeName" @exportRawDataHandler="exportRawDataHandler"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@@ -173,6 +173,7 @@ const popoverWidth: ComputedRef<string> = computed(() => {
|
|||||||
return `${940 - (currentScriptTypeName.value.length + 7) * 14 - (checkList.length ? 220 : 0)}px`
|
return `${940 - (currentScriptTypeName.value.length + 7) * 14 - (checkList.length ? 220 : 0)}px`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// 原始数据表格数据
|
// 原始数据表格数据
|
||||||
const rawTableData = reactive<CheckData.RawDataItem[]>([])
|
const rawTableData = reactive<CheckData.RawDataItem[]>([])
|
||||||
|
|
||||||
@@ -194,6 +195,7 @@ const handleNodeClick = async (data: any) => {
|
|||||||
|
|
||||||
if (checkIndex.value) {
|
if (checkIndex.value) {
|
||||||
await updateTableData()
|
await updateTableData()
|
||||||
|
activeTab.value = 'resultTab'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -241,20 +243,14 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => {
|
|||||||
|
|
||||||
|
|
||||||
watch(currentCheckItem, (newVal, oldVal) => {
|
watch(currentCheckItem, (newVal, oldVal) => {
|
||||||
// console.log("当前检测项", newVal);
|
console.log("当前检测项", newVal);
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
doCurrentCheckItemUpdate(newVal)
|
doCurrentCheckItemUpdate(newVal)
|
||||||
|
} else {
|
||||||
|
activeTab.value = 'resultTab'
|
||||||
}
|
}
|
||||||
activeTab.value = 'resultTab'
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// const handleSwitchChange = async (data: any) => {
|
|
||||||
// console.log("切换不合格测试项、全部测试项", data);
|
|
||||||
//
|
|
||||||
// defaultOperate()
|
|
||||||
// await updateTableData()
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 默认操作
|
// 默认操作
|
||||||
const defaultOperate = () => {
|
const defaultOperate = () => {
|
||||||
let node = getDefaultNode(treeDataAll)
|
let node = getDefaultNode(treeDataAll)
|
||||||
@@ -320,47 +316,13 @@ const updateTableData = async () => {
|
|||||||
resCheckResult = resTableData.resultData.get(keys1[0])
|
resCheckResult = resTableData.resultData.get(keys1[0])
|
||||||
resRawData = resTableData.rawData.get(keys2[0])
|
resRawData = resTableData.rawData.get(keys2[0])
|
||||||
|
|
||||||
// Object.assign(harmNumList, [])
|
|
||||||
// currentHarmNum.value = '-1'
|
|
||||||
|
|
||||||
resRawData = (resRawData == null || resRawData == undefined ? [] : resRawData)
|
resRawData = (resRawData == null || resRawData == undefined ? [] : resRawData)
|
||||||
resCheckResult = (resCheckResult == null || resCheckResult == undefined ? {} : resCheckResult)
|
resCheckResult = (resCheckResult == null || resCheckResult == undefined ? {} : resCheckResult)
|
||||||
setCheckResultData(resCheckResult)
|
setCheckResultData(resCheckResult)
|
||||||
setRawData(resRawData)
|
setRawData(resRawData)
|
||||||
checkList.length = 0
|
checkList.length = 0
|
||||||
currentCheckItem.value = ''
|
currentCheckItem.value = ''
|
||||||
} else
|
} else if (keys1.length != 0) {
|
||||||
// if (resTableData.resultData.get('电压幅值') || resTableData.resultData.get('持续时间')) {
|
|
||||||
// let tempCheckList = []
|
|
||||||
// if (resTableData.resultData.get('电压幅值')) {
|
|
||||||
// tempCheckList.push({value: 'Voltage', label: '电压幅值'})
|
|
||||||
// //resCheckResult = resTableData.resultData.get('电压幅值')
|
|
||||||
// }
|
|
||||||
// if (resTableData.resultData.get('持续时间')) {
|
|
||||||
// tempCheckList.push({value: 'Duration', label: '持续时间'})
|
|
||||||
// //resCheckResult = resTableData.resultData.get('持续时间')
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// Object.assign(checkList, tempCheckList)
|
|
||||||
// currentCheckItem.value = checkList[0].value
|
|
||||||
//
|
|
||||||
// Object.assign(harmNumList, [])
|
|
||||||
// currentHarmNum.value = '-1'
|
|
||||||
//
|
|
||||||
// //setCheckResultData(resCheckResult)
|
|
||||||
// } else
|
|
||||||
if (keys1.length != 0) {
|
|
||||||
// let tempHarmNumList: { value: string, label: string }[] = []
|
|
||||||
// for (let [key, value] of resTableData.resultData) {
|
|
||||||
// tempHarmNumList.push({
|
|
||||||
// value: key,
|
|
||||||
// label: value.isData === 1 ? key : value.isData === 4 ? `${formatHarmNum(key)}(/)` : `${formatHarmNum(key)}(不符合)`
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// Object.assign(harmNumList, tempHarmNumList)
|
|
||||||
// currentHarmNum.value = harmNumList.length > 0 ? harmNumList[0].value : '-1'
|
|
||||||
|
|
||||||
let tempCheckList = []
|
let tempCheckList = []
|
||||||
for (let [key, value] of resTableData.resultData) {
|
for (let [key, value] of resTableData.resultData) {
|
||||||
let hum = formatHarmNum(key)
|
let hum = formatHarmNum(key)
|
||||||
|
|||||||
Reference in New Issue
Block a user