修改正式监测返回结果
This commit is contained in:
@@ -34,10 +34,20 @@
|
||||
<el-input v-model="formContent.deviceName" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通道号">
|
||||
<el-select v-model="formContent.chnNum">
|
||||
<el-select v-model="formContent.chnNum" @change="getResults">
|
||||
<el-option v-for="item in chnList" :key="item" :label="item" :value="item" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测次数">
|
||||
<el-select v-model="formContent.num" clearable @change="getResults">
|
||||
<el-option
|
||||
v-for="item in chnMapList[formContent.chnNum]"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="checkStore.showDetailType === 1">
|
||||
<el-button type="primary" :icon="Postcard">报告生成</el-button>
|
||||
</el-form-item>
|
||||
@@ -78,7 +88,7 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="原始数据" name="rawDataTab">
|
||||
<CompareDataCheckRawDataTable
|
||||
:tableData="rawTableData[currentCheckItem]"
|
||||
:tableData="currentRawTableData"
|
||||
:currentScriptTypeName="currentScriptTypeName"
|
||||
@exportRawDataHandler="exportRawDataHandler"
|
||||
/>
|
||||
@@ -125,6 +135,7 @@ let scriptType: string | null = null
|
||||
watch(searchValue, val => {
|
||||
treeRef.value!.filter(val)
|
||||
})
|
||||
const chnMapList: any = ref({})
|
||||
|
||||
// 表单数据
|
||||
const formContent = reactive<CheckData.DataCheck>({
|
||||
@@ -134,7 +145,7 @@ const formContent = reactive<CheckData.DataCheck>({
|
||||
deviceName: '',
|
||||
chnNum: '',
|
||||
deviceId: '',
|
||||
num: null
|
||||
num: ''
|
||||
})
|
||||
|
||||
// 通道下拉列表
|
||||
@@ -153,6 +164,10 @@ const currentCheckResultData = computed(() => {
|
||||
const data = checkResultData.value[currentCheckItem.value]
|
||||
return Array.isArray(data) ? data : []
|
||||
})
|
||||
const currentRawTableData = computed(() => {
|
||||
const data = rawTableData.value[currentCheckItem.value]
|
||||
return Array.isArray(data) ? data : []
|
||||
})
|
||||
const open = async (row: any, chnNum: string, deviceId: string | null, source: number) => {
|
||||
if (source == 1) {
|
||||
// 正式检测进入页面
|
||||
@@ -186,6 +201,7 @@ const getBasicInformation = async () => {
|
||||
formContent.dataRule = res.data.dataRule
|
||||
formContent.deviceName = res.data.deviceName
|
||||
formContent.errorSysId = res.data.errorSysId
|
||||
chnMapList.value = res.data.chnMap
|
||||
let chnMap: string[] = []
|
||||
for (let key in res.data.chnMap) {
|
||||
chnMap.push(key)
|
||||
@@ -204,12 +220,15 @@ const getTestItem = async () => {
|
||||
}
|
||||
// 获取结果
|
||||
const getResults = async () => {
|
||||
checkResultData.value = []
|
||||
rawTableData.value = []
|
||||
|
||||
getContrastResult({
|
||||
planId: checkStore.plan.id,
|
||||
scriptType: rowList.value.scriptType,
|
||||
deviceId: formContent.deviceId,
|
||||
chnNum: formContent.chnNum,
|
||||
num: formContent.num ?? null
|
||||
num: formContent.num == '' ? null : formContent.num
|
||||
}).then((res: any) => {
|
||||
let list: string[] = []
|
||||
for (let key in res.data.resultMap) {
|
||||
|
||||
Reference in New Issue
Block a user