bug修复
This commit is contained in:
@@ -100,10 +100,14 @@ class RequestHttp {
|
|||||||
// 全局错误信息拦截(防止下载文件的时候返回数据流,没有 code 直接报错)
|
// 全局错误信息拦截(防止下载文件的时候返回数据流,没有 code 直接报错)
|
||||||
if (data.code && data.code !== ResultEnum.SUCCESS) {
|
if (data.code && data.code !== ResultEnum.SUCCESS) {
|
||||||
if(data.message.includes('&')){
|
if(data.message.includes('&')){
|
||||||
const formattedMessage = data.message.split('&').join('<br>');
|
let formattedMessage = data.message.split('&').join('<br>');
|
||||||
|
if (data.message.includes(':')) {
|
||||||
|
formattedMessage = formattedMessage.replace(':', '')
|
||||||
|
}
|
||||||
ElMessage.error({ message: formattedMessage, dangerouslyUseHTMLString: true });
|
ElMessage.error({ message: formattedMessage, dangerouslyUseHTMLString: true });
|
||||||
return Promise.reject(data)
|
return Promise.reject(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
ElMessage.error(data.message)
|
ElMessage.error(data.message)
|
||||||
return Promise.reject(data)
|
return Promise.reject(data)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,8 +68,8 @@ export const exportPlan = (params: Device.ReqPqDevParams) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 下载模板
|
// 下载模板
|
||||||
export const downloadTemplate = () => {
|
export const downloadTemplate = (params: { patternId: string }) => {
|
||||||
return http.download(`/adPlan/downloadTemplate`)
|
return http.download(`/adPlan/downloadTemplate`, params)
|
||||||
}
|
}
|
||||||
// 导入检测计划
|
// 导入检测计划
|
||||||
export const importPlan = (params: Device.ReqPqDevParams) => {
|
export const importPlan = (params: Device.ReqPqDevParams) => {
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ const acceptParams = (params: ExcelParameterProps) => {
|
|||||||
// Excel 导入模板下载
|
// Excel 导入模板下载
|
||||||
const downloadTemp = () => {
|
const downloadTemp = () => {
|
||||||
if (!parameter.value.tempApi) return
|
if (!parameter.value.tempApi) return
|
||||||
useDownload(parameter.value.tempApi, `${parameter.value.title}模板`, {}, false)
|
useDownload(parameter.value.tempApi, `${parameter.value.title}模板`, {'patternId':parameter.value.patternId}, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 文件上传
|
// 文件上传
|
||||||
|
|||||||
@@ -199,6 +199,8 @@ const displayPid = computed({
|
|||||||
functionList.value = response.data as unknown as Function.ResFunction[]
|
functionList.value = response.data as unknown as Function.ResFunction[]
|
||||||
titleType.value = sign
|
titleType.value = sign
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
|
rules.value.path = [{ required: true, trigger: 'blur', message: '路由地址必填!' }];
|
||||||
|
rules.value.component = [{ required: true, trigger: 'blur', message: '组件地址必填!' }];
|
||||||
|
|
||||||
if (formContent.value.pid ==='0') {
|
if (formContent.value.pid ==='0') {
|
||||||
formContent.value.pid = '';
|
formContent.value.pid = '';
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
<el-tab-pane label="预检测项目">
|
<el-tab-pane label="预检测项目">
|
||||||
<div class="form-grid">
|
<div class="form-grid">
|
||||||
<el-checkbox v-for="(item, index) in detectionOptions" v-model="item.selected" :key="index"
|
<el-checkbox v-for="(item, index) in detectionOptions" v-model="item.selected" :key="index"
|
||||||
:label="item.name"></el-checkbox>
|
:label="item.name" disabled></el-checkbox>
|
||||||
<!-- disabled="true" -->
|
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@@ -18,7 +17,7 @@
|
|||||||
<el-step :status="step2" title="设备通讯校验"/>
|
<el-step :status="step2" title="设备通讯校验"/>
|
||||||
<el-step :status="step3" title="协议校验"/>
|
<el-step :status="step3" title="协议校验"/>
|
||||||
<el-step :status="step4" title="相序校验"/>
|
<el-step :status="step4" title="相序校验"/>
|
||||||
<el-step :status="step5" title="检测完成"/>
|
<el-step :status="step5" :title="ts === 'error'? '检测失败':ts === 'process'? '检测中':ts === 'success'? '检测成功':'待检测'"/>
|
||||||
</el-steps>
|
</el-steps>
|
||||||
</div>
|
</div>
|
||||||
<div class="dialog-right">
|
<div class="dialog-right">
|
||||||
@@ -258,9 +257,11 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
ElMessage.error(newValue.code)
|
ElMessage.error(newValue.code)
|
||||||
step1.value = 'error'
|
step1.value = 'error'
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
} else if (newValue.code == 10523) {
|
} else if (newValue.code == 10523) {
|
||||||
step1.value = 'error'
|
step1.value = 'error'
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
step1InitLog.value = [{
|
step1InitLog.value = [{
|
||||||
type: 'error',
|
type: 'error',
|
||||||
log: '源连接失败!',
|
log: '源连接失败!',
|
||||||
@@ -268,6 +269,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
} else if (newValue.code == -1) {
|
} else if (newValue.code == -1) {
|
||||||
step1.value = 'error'
|
step1.value = 'error'
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
step1InitLog.value = [{
|
step1InitLog.value = [{
|
||||||
type: 'error',
|
type: 'error',
|
||||||
log: '源未知异常!',
|
log: '源未知异常!',
|
||||||
@@ -301,6 +303,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
})
|
})
|
||||||
step2.value = 'error'
|
step2.value = 'error'
|
||||||
// ts.value = 'error'
|
// ts.value = 'error'
|
||||||
|
// step5.value = 'error'
|
||||||
} else if (newValue.code == 10551) {
|
} else if (newValue.code == 10551) {
|
||||||
step2InitLog.value.push({
|
step2InitLog.value.push({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
@@ -308,6 +311,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
})
|
})
|
||||||
step2.value = 'error'
|
step2.value = 'error'
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
} else if (newValue.code == 10552) {
|
} else if (newValue.code == 10552) {
|
||||||
//ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
//ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
||||||
step2InitLog.value = [{
|
step2InitLog.value = [{
|
||||||
@@ -316,6 +320,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
}];
|
}];
|
||||||
step2.value = 'error'
|
step2.value = 'error'
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
} else if (newValue.code == 25001) {
|
} else if (newValue.code == 25001) {
|
||||||
activeIndex.value = 2
|
activeIndex.value = 2
|
||||||
step2.value = 'success'
|
step2.value = 'success'
|
||||||
@@ -347,6 +352,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
})
|
})
|
||||||
step3.value = 'error'
|
step3.value = 'error'
|
||||||
// ts.value = 'error'
|
// ts.value = 'error'
|
||||||
|
// step5.value = 'error'
|
||||||
} else if (newValue.code == 10551) {
|
} else if (newValue.code == 10551) {
|
||||||
step3InitLog.value.push({
|
step3InitLog.value.push({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
@@ -354,6 +360,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
})
|
})
|
||||||
step3.value = 'error'
|
step3.value = 'error'
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
} else if (newValue.code == 10552) {
|
} else if (newValue.code == 10552) {
|
||||||
step3.value = 'error'
|
step3.value = 'error'
|
||||||
//ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
//ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
||||||
@@ -362,6 +369,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!',
|
log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!',
|
||||||
}];
|
}];
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'INIT_GATHER$02':
|
case 'INIT_GATHER$02':
|
||||||
@@ -384,6 +392,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
})
|
})
|
||||||
step3.value = 'error'
|
step3.value = 'error'
|
||||||
// ts.value = 'error'
|
// ts.value = 'error'
|
||||||
|
// step5.value = 'error'
|
||||||
} else if (newValue.code == 10551) {
|
} else if (newValue.code == 10551) {
|
||||||
step3InitLog.value.push({
|
step3InitLog.value.push({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
@@ -391,6 +400,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
})
|
})
|
||||||
step3.value = 'error'
|
step3.value = 'error'
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
} else if (newValue.code == 10552) {
|
} else if (newValue.code == 10552) {
|
||||||
step3.value = 'error'
|
step3.value = 'error'
|
||||||
//ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
//ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
||||||
@@ -399,6 +409,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!',
|
log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!',
|
||||||
}];
|
}];
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'INIT_GATHER$03':
|
case 'INIT_GATHER$03':
|
||||||
@@ -417,6 +428,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
})
|
})
|
||||||
step3.value = 'error'
|
step3.value = 'error'
|
||||||
// ts.value = 'error'
|
// ts.value = 'error'
|
||||||
|
// step5.value = 'error'
|
||||||
} else if (newValue.code == 10551) {
|
} else if (newValue.code == 10551) {
|
||||||
step3InitLog.value.push({
|
step3InitLog.value.push({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
@@ -424,6 +436,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
})
|
})
|
||||||
step3.value = 'error'
|
step3.value = 'error'
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
} else if (newValue.code == 10552) {
|
} else if (newValue.code == 10552) {
|
||||||
//ElMessage.error("当前步骤已经初始化,执行自动关闭,请重新发起检测!")
|
//ElMessage.error("当前步骤已经初始化,执行自动关闭,请重新发起检测!")
|
||||||
step3.value = 'error'
|
step3.value = 'error'
|
||||||
@@ -432,6 +445,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!',
|
log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!',
|
||||||
}];
|
}];
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
} else if (newValue.code == 25001) {
|
} else if (newValue.code == 25001) {
|
||||||
activeIndex.value = 3
|
activeIndex.value = 3
|
||||||
step3.value = 'success'
|
step3.value = 'success'
|
||||||
@@ -460,6 +474,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!")
|
||||||
step4.value = 'error'
|
step4.value = 'error'
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
} else if (newValue.code == 10520) {
|
} else if (newValue.code == 10520) {
|
||||||
step4.value = 'error'
|
step4.value = 'error'
|
||||||
step4InitLog.value.push({
|
step4InitLog.value.push({
|
||||||
@@ -467,6 +482,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
log: '解析报文异常',
|
log: '解析报文异常',
|
||||||
})
|
})
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -496,6 +512,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
log: '相序校验未通过!',
|
log: '相序校验未通过!',
|
||||||
})
|
})
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
} else if (newValue.code == 25001) {
|
} else if (newValue.code == 25001) {
|
||||||
step4.value = 'success'
|
step4.value = 'success'
|
||||||
step5.value = 'success'
|
step5.value = 'success'
|
||||||
@@ -522,6 +539,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
log: '源服务端连接失败!',
|
log: '源服务端连接失败!',
|
||||||
}];
|
}];
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
break;
|
break;
|
||||||
case "Dev":
|
case "Dev":
|
||||||
step2.value = 'error'
|
step2.value = 'error'
|
||||||
@@ -530,6 +548,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
log: '设备服务端连接失败!',
|
log: '设备服务端连接失败!',
|
||||||
}];
|
}];
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -542,6 +561,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
type: 'error',
|
type: 'error',
|
||||||
})
|
})
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -958,11 +958,14 @@ const handleTest = async (val: string) => {
|
|||||||
selectTestItemPopupRef.value?.open()
|
selectTestItemPopupRef.value?.open()
|
||||||
})
|
})
|
||||||
.catch((action: Action) => {
|
.catch((action: Action) => {
|
||||||
|
if(action === 'cancel'){
|
||||||
ElMessage.success('全部复检')
|
ElMessage.success('全部复检')
|
||||||
checkStore.setReCheckType(1)
|
checkStore.setReCheckType(1)
|
||||||
selectTestItemPopupRef.value?.open()
|
selectTestItemPopupRef.value?.open()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
checkStore.setReCheckType(1)
|
||||||
selectTestItemPopupRef.value?.open()
|
selectTestItemPopupRef.value?.open()
|
||||||
}
|
}
|
||||||
} else if (val === '系数校准') {
|
} else if (val === '系数校准') {
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ watch(TestStatus, function (newValue, oldValue) {
|
|||||||
|
|
||||||
watch(ActiveStatue, function (newValue, oldValue) {
|
watch(ActiveStatue, function (newValue, oldValue) {
|
||||||
if (newValue === 'error') {
|
if (newValue === 'error') {
|
||||||
// stepsActiveIndex.value = stepsTotalNum.value + 2
|
stepsActiveIndex.value = stepsTotalNum.value + 1
|
||||||
nextStepText.value = '检测失败'
|
nextStepText.value = '检测失败'
|
||||||
}
|
}
|
||||||
if (newValue === 'success' && stepsActiveIndex.value === stepsTotalNum.value - 1) {
|
if (newValue === 'success' && stepsActiveIndex.value === stepsTotalNum.value - 1) {
|
||||||
|
|||||||
@@ -157,7 +157,9 @@ import { CirclePlus, Delete, EditPen } from '@element-plus/icons-vue'
|
|||||||
// 使用 dayjs 库格式化
|
// 使用 dayjs 库格式化
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import MonitorTable from '@/views/machine/device/components/monitorTab.vue';
|
import MonitorTable from '@/views/machine/device/components/monitorTab.vue';
|
||||||
|
import {useAppSceneStore} from "@/stores/modules/mode";
|
||||||
|
|
||||||
|
const AppSceneStore = useAppSceneStore()
|
||||||
const MonIsShow = ref(false)
|
const MonIsShow = ref(false)
|
||||||
const DevIsShow = ref(false)
|
const DevIsShow = ref(false)
|
||||||
// 存储设备类型选项
|
// 存储设备类型选项
|
||||||
@@ -322,7 +324,10 @@ const rules = computed(() => {
|
|||||||
}
|
}
|
||||||
if (valid) {
|
if (valid) {
|
||||||
formContent.value.createDate = dayjs(formContent.value.createDate).format('YYYY-MM-DD');
|
formContent.value.createDate = dayjs(formContent.value.createDate).format('YYYY-MM-DD');
|
||||||
|
if (AppSceneStore.currentScene === '1') {
|
||||||
formContent.value.name = formContent.value.createId
|
formContent.value.name = formContent.value.createId
|
||||||
|
}
|
||||||
|
|
||||||
if (formContent.value.arrivedDate)
|
if (formContent.value.arrivedDate)
|
||||||
{
|
{
|
||||||
formContent.value.arrivedDate = dayjs(formContent.value.arrivedDate).format('YYYY-MM-DD');
|
formContent.value.arrivedDate = dayjs(formContent.value.arrivedDate).format('YYYY-MM-DD');
|
||||||
|
|||||||
@@ -93,8 +93,8 @@ function useMetaInfo() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const rules: reactive<Record<string, Array<FormItemRule>>> = reactive({
|
const rules: reactive<Record<string, Array<FormItemRule>>> = reactive({
|
||||||
desc: [{required: true, message: '源参数描述必填!', trigger: 'blur'}],
|
desc: [{required: true, message: '源参数描述必填!', trigger: 'blur'},{min: 1, max: 32, message: '长度为1~32个字符', trigger: 'blur'}],
|
||||||
type: [{required: true, message: '源参数类型必填!', trigger: 'blur'}],
|
type: [{required: true, message: '源参数类型必填!', trigger: 'blur'},{min: 1, max: 32, message: '长度为1~32个字符', trigger: 'blur'}],
|
||||||
sort: [{required: true, message: '排序必填!', trigger: 'blur'}]
|
sort: [{required: true, message: '排序必填!', trigger: 'blur'}]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<el-input v-model="formContent.name" placeholder="请输入名称" autocomplete="off"/>
|
<el-input v-model="formContent.name" placeholder="请输入名称" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='检测源' prop='sourceIds' :label-width='100'>
|
<el-form-item label='检测源' prop='sourceIds' :label-width='100'>
|
||||||
<el-select v-model="formContent.sourceIds" :multiple="selectByMode" collapse-tags placeholder="请选择检测源">
|
<el-select v-model="formContent.sourceIds" :multiple="selectByMode" collapse-tags placeholder="请选择检测源" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(option, index) in pqSourceArray"
|
v-for="(option, index) in pqSourceArray"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="数据源" prop="datasourceIds" :label-width="100">
|
<el-form-item label="数据源" prop="datasourceIds" :label-width="100">
|
||||||
<el-select v-model="formContent.datasourceIds" :multiple="selectByMode" collapse-tags placeholder="请选择数据源" autocomplete="off">
|
<el-select v-model="formContent.datasourceIds" :multiple="selectByMode" collapse-tags placeholder="请选择数据源" autocomplete="off" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dictStore.getDictData(dataSourceType)"
|
v-for="item in dictStore.getDictData(dataSourceType)"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="检测脚本" prop="scriptId" :label-width="100">
|
<el-form-item label="检测脚本" prop="scriptId" :label-width="100">
|
||||||
<el-select v-model="formContent.scriptId" placeholder="请选择检测脚本" autocomplete="off" :disabled="isSelectDisabled ">
|
<el-select v-model="formContent.scriptId" placeholder="请选择检测脚本" autocomplete="off" :disabled="isSelectDisabled" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(option, index) in pqScriptArray"
|
v-for="(option, index) in pqScriptArray"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="误差体系" prop="errorSysId" :label-width="100">
|
<el-form-item label="误差体系" prop="errorSysId" :label-width="100">
|
||||||
<el-select v-model="formContent.errorSysId" placeholder="请选择误差体系" autocomplete="off" :disabled="isSelectDisabled">
|
<el-select v-model="formContent.errorSysId" placeholder="请选择误差体系" autocomplete="off" :disabled="isSelectDisabled" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(option, index) in pqErrorArray"
|
v-for="(option, index) in pqErrorArray"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ const planList = ref<Plan.ResPlan[]>([]);
|
|||||||
const getTableList = async(params: any) => {
|
const getTableList = async(params: any) => {
|
||||||
let newParams = JSON.parse(JSON.stringify(params))
|
let newParams = JSON.parse(JSON.stringify(params))
|
||||||
const patternId = dictStore.getDictData('Pattern').find(item=>item.name=== modeStore.currentMode)?.id//获取数据字典中对应的id
|
const patternId = dictStore.getDictData('Pattern').find(item=>item.name=== modeStore.currentMode)?.id//获取数据字典中对应的id
|
||||||
newParams.pattern = patternId
|
newParams.patternId = patternId
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await getPlanList(newParams);
|
const result = await getPlanList(newParams);
|
||||||
@@ -356,7 +356,7 @@ const exportClick = () => {
|
|||||||
|
|
||||||
ElMessageBox.confirm('确认导出检测计划?', '温馨提示', { type: 'warning' }).then(() =>{
|
ElMessageBox.confirm('确认导出检测计划?', '温馨提示', { type: 'warning' }).then(() =>{
|
||||||
const patternId = dictStore.getDictData('Pattern').find(item=>item.name=== modeStore.currentMode)?.id//获取数据字典中对应的id
|
const patternId = dictStore.getDictData('Pattern').find(item=>item.name=== modeStore.currentMode)?.id//获取数据字典中对应的id
|
||||||
useDownload(exportPlan,'检测计划导出数据', {...proTable.value?.searchParam,pattern:patternId}, false,'.xlsx')
|
useDownload(exportPlan,'检测计划导出数据', {...proTable.value?.searchParam,patternId:patternId}, false,'.xlsx')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<el-tabs type="border-card">
|
<el-tabs type="border-card">
|
||||||
<el-tab-pane label="检测相关配置">
|
<el-tab-pane label="检测相关配置">
|
||||||
<div>
|
<div>
|
||||||
|
<el-form :model="TestConfigForm" ref='testConfigFormRef' :rules='rules'>
|
||||||
<el-divider>检测配置</el-divider>
|
<el-divider>检测配置</el-divider>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@@ -30,8 +31,8 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</el-form>
|
||||||
<el-form :model="RegResForm" ref='dialogFormRef' :rules='rules'>
|
<el-form :model="RegResForm" ref='dialogFormRef' :rules='rules'>
|
||||||
<el-divider>有效数据配置</el-divider>
|
<el-divider>有效数据配置</el-divider>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
@@ -179,13 +180,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='tsx''>
|
<script setup lang='tsx'>
|
||||||
import { type Dict } from '@/api/system/dictionary/interface'
|
|
||||||
import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
|
|
||||||
import PqPopup from '@/views/system/dictionary/dictPq/components/pqPopup.vue'
|
|
||||||
import {useDictStore} from '@/stores/modules/dict'
|
import {useDictStore} from '@/stores/modules/dict'
|
||||||
import { useHandleData } from '@/hooks/useHandleData'
|
import {computed, onMounted, Ref, ref} from 'vue'
|
||||||
import { computed, onMounted, reactive, Ref, ref, watch } from 'vue'
|
|
||||||
import {type Base} from '@/api/system/base/interface'
|
import {type Base} from '@/api/system/base/interface'
|
||||||
import {type VersionRegister} from '@/api/system/versionRegister/interface'
|
import {type VersionRegister} from '@/api/system/versionRegister/interface'
|
||||||
import {getTestConfig, updateTestConfig} from '@/api/system/base/index'
|
import {getTestConfig, updateTestConfig} from '@/api/system/base/index'
|
||||||
@@ -198,6 +195,7 @@
|
|||||||
|
|
||||||
const modeStore = useModeStore();
|
const modeStore = useModeStore();
|
||||||
const dictStore = useDictStore()
|
const dictStore = useDictStore()
|
||||||
|
const testConfigFormRef = ref()
|
||||||
const dialogFormRef = ref()
|
const dialogFormRef = ref()
|
||||||
const mode = ref()
|
const mode = ref()
|
||||||
const IsMode = ref(false)
|
const IsMode = ref(false)
|
||||||
@@ -257,17 +255,20 @@ onMounted(async () => {
|
|||||||
// 定义弹出组件元信息
|
// 定义弹出组件元信息
|
||||||
const rules = computed(() => {
|
const rules = computed(() => {
|
||||||
const baseRules: Ref<Record<string, Array<FormItemRule>>> = ref({
|
const baseRules: Ref<Record<string, Array<FormItemRule>>> = ref({
|
||||||
|
maxTime: [
|
||||||
|
{required: true, trigger: 'blur', message: '检测最大次数必填!'},
|
||||||
|
],
|
||||||
realTime: [
|
realTime: [
|
||||||
{required: true, trigger: 'blur', message: '实时数据有效组数必填!'},
|
{required: true, trigger: 'blur', message: '实时数据有效组数必填!'},
|
||||||
{ pattern: /^[0-9]\d*$/, message: '实时数据有效组数为含0的正整数', trigger: 'blur' }
|
{pattern: /^(?:[1-9]|[1-9][0-9]|[1-9][0-9]{2})$/, message: '实时数据有效组数为1~999的正整数', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
statistics: [
|
statistics: [
|
||||||
{required: true, trigger: 'blur', message: '统计数据有效组数必填!'},
|
{required: true, trigger: 'blur', message: '统计数据有效组数必填!'},
|
||||||
{ pattern: /^[0-9]\d*$/, message: '统计数据有效组数为含0的正整数', trigger: 'blur' }
|
{pattern: /^(?:[1-9]|[1-9][0-9]|[1-9][0-9]{2})$/, message: '统计数据有效组数为1~999的正整数', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
flicker: [
|
flicker: [
|
||||||
{required: true, trigger: 'blur', message: '闪变数据有效组数必填!'},
|
{required: true, trigger: 'blur', message: '闪变数据有效组数必填!'},
|
||||||
{ pattern: /^[0-9]\d*$/, message: '闪变数据有效组数为含0的正整数', trigger: 'blur' }
|
{pattern: /^(?:[1-9]|[1-9][0-9]|[1-9][0-9]{2})$/, message: '闪变数据有效组数为1~999的正整数', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -275,7 +276,7 @@ onMounted(async () => {
|
|||||||
if (mode.value == '比对式') {
|
if (mode.value == '比对式') {
|
||||||
baseRules.value.waveRecord = [
|
baseRules.value.waveRecord = [
|
||||||
{required: true, trigger: 'blur', message: '录波数据有效组数必填!'},
|
{required: true, trigger: 'blur', message: '录波数据有效组数必填!'},
|
||||||
{ pattern: /^[0-9]\d*$/, message: '录波数据有效组数为含0的正整数', trigger: 'blur' }
|
{pattern: /^(?:[1-9]|[1-9][0-9]|[1-9][0-9]{2})$/, message: '录波数据有效组数为1~999的正整数', trigger: 'blur'}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,15 +284,16 @@ onMounted(async () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const submitForm = async () => {
|
const submitForm = async () => {
|
||||||
try {
|
try {
|
||||||
dialogFormRef.value?.validate(async (valid: boolean) => {
|
testConfigFormRef.value?.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
await updateTestConfig(TestConfigForm.value);
|
await updateTestConfig(TestConfigForm.value);
|
||||||
|
|
||||||
|
dialogFormRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
//await updateTestConfig(TestConfigForm.value);
|
||||||
|
|
||||||
// 提取并传递 4 个参数
|
// 提取并传递 4 个参数
|
||||||
const {id, waveRecord, realTime, statistics, flicker} = RegResForm.value
|
const {id, waveRecord, realTime, statistics, flicker} = RegResForm.value
|
||||||
RegResForm2.value = {id, waveRecord, realTime, statistics, flicker}
|
RegResForm2.value = {id, waveRecord, realTime, statistics, flicker}
|
||||||
@@ -304,6 +306,10 @@ onMounted(async () => {
|
|||||||
ElMessage.success({message: `保存配置成功!`})
|
ElMessage.success({message: `保存配置成功!`})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('验证过程中出现错误', err)
|
console.error('验证过程中出现错误', err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
:on-exceed="BaseHandleExceed"
|
:on-exceed="BaseHandleExceed"
|
||||||
:on-remove="BaseHandleRemove"
|
:on-remove="BaseHandleRemove"
|
||||||
style="width: 100% !important;"
|
style="width: 100% !important;"
|
||||||
|
accept=".docx"
|
||||||
class="upload-container"
|
class="upload-container"
|
||||||
>
|
>
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
@@ -33,6 +34,7 @@
|
|||||||
:on-exceed="DataHandleExceed"
|
:on-exceed="DataHandleExceed"
|
||||||
:on-remove="DataHandleRemove"
|
:on-remove="DataHandleRemove"
|
||||||
style="width: 100% !important;"
|
style="width: 100% !important;"
|
||||||
|
accept=".docx"
|
||||||
class="upload-container"
|
class="upload-container"
|
||||||
>
|
>
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
|
|||||||
Reference in New Issue
Block a user