微调
This commit is contained in:
@@ -51,7 +51,11 @@
|
||||
<div class="div-log">
|
||||
<p v-for="(item, index) in step4InitLog" :key="index"
|
||||
:style="{ color: item.type === 'error' ? '#F56C6C' : 'var(--el-text-color-regular)' }">
|
||||
{{ item.log }} <br/>
|
||||
{{ item.log.split('&&')[0] }}
|
||||
<br v-if="item.log.includes('&&')">
|
||||
{{ item.log.split('&&')[1] }}
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
@@ -441,14 +445,14 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
if (newValue.code == 10200) {
|
||||
step4InitLog.value.push({
|
||||
type: 'info',
|
||||
log: '源已接通!',
|
||||
log: '源参数下发成功,等待校验中.....',
|
||||
})
|
||||
|
||||
} else if (newValue.code == 10201) {
|
||||
step4.value = 'process'
|
||||
step4InitLog.value = [{
|
||||
type: 'wait',
|
||||
log: '正在接通源.....',
|
||||
log: '源参数下发中.....',
|
||||
}];
|
||||
} else if (newValue.code == 10552) {
|
||||
ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
||||
@@ -470,9 +474,11 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
if (newValue.data.includes('不合格')) {
|
||||
type = 'error'
|
||||
}
|
||||
|
||||
newValue.data.split('<br/>')
|
||||
step4InitLog.value.push({
|
||||
type: type,
|
||||
log: '相序校验:' + newValue.data,
|
||||
log:newValue.data,
|
||||
})
|
||||
|
||||
} else if (newValue.code == 10201) {
|
||||
@@ -488,7 +494,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
log: '相序校验未通过!',
|
||||
})
|
||||
ts.value = 'error'
|
||||
}else if (newValue.code == 25001) {
|
||||
} else if (newValue.code == 25001) {
|
||||
step4.value = 'success'
|
||||
step5.value = 'success'
|
||||
step4InitLog.value.push({
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,8 +10,12 @@
|
||||
<template #tableHeader='scope'>
|
||||
<el-button v-auth.device="'add'" type='primary' :icon='CirclePlus' @click="openDialog('add')">新增</el-button>
|
||||
<el-button v-auth.device="'export'" type='primary' :icon='Upload' plain @click='downloadFile()'>导出</el-button>
|
||||
<<<<<<< HEAD
|
||||
<el-button v-auth.device="'import'" type='primary' :icon='Download' plain @click="importFile('')" v-if='modeStore.currentMode != "比对式"'>导入</el-button>
|
||||
<el-button v-auth.device="'import'" type='primary' :icon='Download' plain @click="importFile('比对式')" v-if='modeStore.currentMode === "比对式"'>导入</el-button>
|
||||
=======
|
||||
<el-button v-auth.device="'import'" type='primary' :icon='Download' plain @click='importFile()'>导入</el-button>
|
||||
>>>>>>> ab02f8f1b34e2ceeee7cb83be9f6fc79b71116ad
|
||||
<el-button v-auth.device="'delete'" type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
|
||||
@click='batchDelete(scope.selectedListIds)'>
|
||||
删除
|
||||
@@ -40,10 +44,10 @@ import { type ProTableInstance, type ColumnProps } from '@/components/ProTable/i
|
||||
import DevicePopup from '@/views/machine/device/components/devicePopup.vue'
|
||||
import { CirclePlus, Delete, EditPen, Download, Upload } from '@element-plus/icons-vue'
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
import { getPqDevList, deletePqDev, exportPqDev, downloadTemplate, importPqDev,getPqDev } from '@/api/device/device/index.ts'
|
||||
import {getPqDevList, deletePqDev, getPqDev, exportCNDev, downloadCNDevTemplate, importCNDev} from '@/api/device/device/index.ts'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { computed, onBeforeMount, onMounted, reactive, ref } from 'vue'
|
||||
import { useModeStore , useAppSceneStore} from '@/stores/modules/mode'; // 引入模式 store
|
||||
import { useModeStore , useAppSceneStore} from '@/stores/modules/mode';
|
||||
defineOptions({
|
||||
name: 'device'
|
||||
})
|
||||
@@ -197,7 +201,7 @@ const downloadFile = async () => {
|
||||
|
||||
ElMessageBox.confirm('确认导出被检设备?', '温馨提示', { type: 'warning' }).then(() =>{
|
||||
const patternId = dictStore.getDictData('Pattern').find(item=>item.name=== modeStore.currentMode)?.id//获取数据字典中对应的id
|
||||
useDownload(exportPqDev,'被检设备导出数据', {...proTable.value?.searchParam,pattern:patternId}, false,'.xlsx')
|
||||
useDownload(exportCNDev,'被检设备导出数据', {...proTable.value?.searchParam,pattern:patternId}, false,'.xlsx')
|
||||
})
|
||||
}
|
||||
|
||||
@@ -217,11 +221,12 @@ const importFile = async (pattern:string) => {
|
||||
deviceImportExcel.value?.acceptParams(params)
|
||||
}else{
|
||||
const params = {
|
||||
title: '被检设备',
|
||||
showCover: false,
|
||||
tempApi: downloadTemplate,
|
||||
|
||||
getTableList: proTable.value?.getTableList,
|
||||
title: '被检设备',
|
||||
showCover: false,
|
||||
tempApi: downloadCNDevTemplate,
|
||||
importApi: importCNDev,
|
||||
// importApi: modeStore.currentMode === "比对式"? importContrastPqDev: importCNDev,
|
||||
getTableList: proTable.value?.getTableList,
|
||||
}
|
||||
deviceImportExcel.value?.acceptParams(params)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user