修改检测数据查询展示页面

This commit is contained in:
guanj
2025-08-26 10:37:13 +08:00
parent 5cf39e8aa8
commit 95b602e6d4
5 changed files with 73 additions and 53 deletions

View File

@@ -34,11 +34,11 @@
<el-input v-model="formContent.deviceName" :disabled="true" />
</el-form-item>
<el-form-item label="通道号">
<el-select v-model="formContent.chnNum" @change="getResults">
<el-select v-model="formContent.chnNum" @change="getResults" :disabled="sourceKey == 1">
<el-option v-for="item in chnList" :key="item" :label="item" :value="item" />
</el-select>
</el-form-item>
<el-form-item label="检测次数">
<el-form-item label="检测次数" :disabled="sourceKey == 1">
<el-select v-model="formContent.num" clearable @change="getResults">
<el-option
v-for="item in chnMapList[formContent.chnNum]"
@@ -57,7 +57,7 @@
</el-form>
</div>
<div class="data-check-body">
<div class="content-left-tree">
<div class="content-left-tree" v-if="sourceKey == 2">
<el-tree
style="width: 200px"
:data="scriptData"
@@ -94,12 +94,16 @@
<el-tab-pane label="检测结果" name="resultTab">
<CompareDataCheckResultTable
:tableData="currentCheckResultData"
:currentCheckItem="currentCheckItem"
:currentScriptTypeName="currentScriptTypeName"
v-if="activeTab === 'resultTab'"
/>
</el-tab-pane>
<el-tab-pane label="原始数据" name="rawDataTab">
<CompareDataCheckRawDataTable
v-if="activeTab === 'rawDataTab'"
:tableData="currentRawTableData"
:currentCheckItem="currentCheckItem"
:currentScriptTypeName="currentScriptTypeName"
@exportRawDataHandler="exportRawDataHandler"
/>
@@ -160,7 +164,7 @@ const formContent = reactive<CheckData.DataCheck>({
deviceId: '',
num: ''
})
const source = ref('1') //1:正式检测进入页面 2:检测数据查询进入
const sourceKey = ref(1) //1:正式检测进入页面 2:检测数据查询进入
// 通道下拉列表
const chnList: any = ref([])
@@ -188,6 +192,7 @@ const open = async (row: any, chnNum: string, deviceId: string | null, source: n
rowList.value = {}
formContent.deviceId = deviceId || ''
formContent.chnNum = chnNum
sourceKey.value = source
if (source == 1) {
// 正式检测进入页面
rowList.value = row
@@ -206,8 +211,6 @@ const open = async (row: any, chnNum: string, deviceId: string | null, source: n
Object.assign(pqErrorList, resPqErrorList)
// 获取基本信息
await getBasicInformation()
}
// 查询大项树
const initScriptData = async (row: any) => {
@@ -246,6 +249,7 @@ const getBasicInformation = async () => {
formContent.deviceName = res.data.deviceName
formContent.errorSysId = res.data.errorSysId
chnMapList.value = res.data.chnMap
formContent.num = res.data.checkNum
let chnMap: string[] = []
for (let key in res.data.chnMap) {
chnMap.push(key)