微调
This commit is contained in:
@@ -61,7 +61,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="模版名称" prop="reportTemplateName" :label-width="100" v-if="formContent.associateReport === 1">
|
<el-form-item label="模版名称" prop="reportTemplateName" :label-width="100" v-if="formContent.associateReport === 1">
|
||||||
<el-select v-model="formContent.reportTemplateName" placeholder="请选择报告模版" autocomplete="off" :disabled="isSelectDisabled" @change="handleReportChange">
|
<el-select v-model="formContent.reportTemplateName" placeholder="请选择报告模版" autocomplete="off" >
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(option, index) in pqReportName"
|
v-for="(option, index) in pqReportName"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -70,16 +70,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="模版版本号" prop="reportTemplateVersion" :label-width="100" v-if="formContent.associateReport === 1">
|
|
||||||
<el-select v-model="formContent.reportTemplateVersion" placeholder="请选择报告模版版本号" autocomplete="off" :disabled="isSelectDisabled">
|
|
||||||
<el-option
|
|
||||||
v-for="(option, index) in pqReportVersion"
|
|
||||||
:key="index"
|
|
||||||
:label="option.version"
|
|
||||||
:value="option.version"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -131,7 +122,7 @@
|
|||||||
const pqDevList=ref<Device.ResPqDev[]>([])//获取指定模式下所有检测源
|
const pqDevList=ref<Device.ResPqDev[]>([])//获取指定模式下所有检测源
|
||||||
|
|
||||||
const pqReportName = ref<{ name: string }[]>([])
|
const pqReportName = ref<{ name: string }[]>([])
|
||||||
const pqReportVersion = ref<{ version: string}[]>([])
|
|
||||||
|
|
||||||
const pqSourceArray = ref<{ label: string; value: string; }[]>()
|
const pqSourceArray = ref<{ label: string; value: string; }[]>()
|
||||||
const pqScriptArray = ref<{ label: string; value: string; }[]>()
|
const pqScriptArray = ref<{ label: string; value: string; }[]>()
|
||||||
@@ -252,7 +243,7 @@ const rules = computed(() => {
|
|||||||
|
|
||||||
if (formContent.associateReport === 1){//只有关联报告模版时需要展示
|
if (formContent.associateReport === 1){//只有关联报告模版时需要展示
|
||||||
dynamicRules.reportTemplateName= [{ required: true, message: '报告模版名称必选!', trigger: 'change' }];
|
dynamicRules.reportTemplateName= [{ required: true, message: '报告模版名称必选!', trigger: 'change' }];
|
||||||
dynamicRules.reportTemplateVersion= [{ required: true, message: '报告模版版本号必选!', trigger: 'change' }];
|
//dynamicRules.reportTemplateVersion= [{ required: true, message: '报告模版版本号必选!', trigger: 'change' }];
|
||||||
}
|
}
|
||||||
|
|
||||||
return dynamicRules;
|
return dynamicRules;
|
||||||
@@ -292,6 +283,7 @@ const rules = computed(() => {
|
|||||||
if( mode.value === '比对式'){
|
if( mode.value === '比对式'){
|
||||||
await updatePlan(formContent)
|
await updatePlan(formContent)
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
await updatePlan({...formContent,'sourceIds':[formContent.sourceIds],'datasourceIds':[formContent.datasourceIds]});
|
await updatePlan({...formContent,'sourceIds':[formContent.sourceIds],'datasourceIds':[formContent.datasourceIds]});
|
||||||
}
|
}
|
||||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
||||||
@@ -349,7 +341,6 @@ const open = async (sign: string,
|
|||||||
|
|
||||||
if(sign == 'add')
|
if(sign == 'add')
|
||||||
{
|
{
|
||||||
console.log('add',data)
|
|
||||||
const [pqSource_Result, PqScript_Result, PqErrSys_Result,pqDevList_Result,pqReportName_Result] = await Promise.all([
|
const [pqSource_Result, PqScript_Result, PqErrSys_Result,pqDevList_Result,pqReportName_Result] = await Promise.all([
|
||||||
getTestSourceList(data),
|
getTestSourceList(data),
|
||||||
getPqScriptList(data),
|
getPqScriptList(data),
|
||||||
@@ -375,6 +366,7 @@ const open = async (sign: string,
|
|||||||
unboundPqDevList.value = pqDevList.value
|
unboundPqDevList.value = pqDevList.value
|
||||||
boundPqDevList.value = [];
|
boundPqDevList.value = [];
|
||||||
}else{//编辑时先给表单赋值(这会没接收被检设备),需要手动再给被检设备复制后整体表单赋值
|
}else{//编辑时先给表单赋值(这会没接收被检设备),需要手动再给被检设备复制后整体表单赋值
|
||||||
|
|
||||||
const [pqSource_Result, PqScript_Result, PqErrSys_Result,boundPqDevList_Result, unboundPqDevList_Result,pqReportName_Result] = await Promise.all([
|
const [pqSource_Result, PqScript_Result, PqErrSys_Result,boundPqDevList_Result, unboundPqDevList_Result,pqReportName_Result] = await Promise.all([
|
||||||
getTestSourceList(data),
|
getTestSourceList(data),
|
||||||
getPqScriptList(data),
|
getPqScriptList(data),
|
||||||
@@ -464,12 +456,6 @@ const dataSourceType = computed(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const handleReportChange = async (value: string) => {
|
|
||||||
formContent.reportTemplateVersion = ''
|
|
||||||
const response = await getPqReportAllVersion({ name: value });
|
|
||||||
pqReportVersion.value = response.data.map((item: { version: string }) => ({ version: item }));
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// 对外映射
|
// 对外映射
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
:file-list="baseFileList"
|
:file-list="baseFileList"
|
||||||
:on-exceed="BaseHandleExceed"
|
:on-exceed="BaseHandleExceed"
|
||||||
:on-remove="BaseHandleRemove"
|
:on-remove="BaseHandleRemove"
|
||||||
|
style="width: 300px !important;"
|
||||||
class="upload-container"
|
class="upload-container"
|
||||||
>
|
>
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
@@ -277,4 +278,6 @@ const props = defineProps<{
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
{
|
{
|
||||||
prop: 'version',
|
prop: 'version',
|
||||||
label: '版本号',
|
label: '版本号',
|
||||||
minWidth: 100,
|
minWidth: 80,
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user