Commit 19d706bc by 李伟康

修复: 修复考试管理模块新增页和详情页的表单问题

修改src/views/serviceCentre/examinationManagement/add.vue:
- 优化品牌字段的校验提示文本格式,修正标点符号和空格
- 修复岗位名称赋值逻辑,根据岗位编码同步表单岗位名称字段
修改src/views/serviceCentre/examinationManagement/detail.vue:
- 新增表单项条件渲染逻辑,支持通过hide方法控制表单项显示
- 为品牌展示字段添加隐藏判断,无品牌数据时自动隐藏该栏
1 parent c6b6751a
Pipeline #245 for 19d706bc failed in 0 seconds
......@@ -244,7 +244,7 @@ export default {
{
label: "品牌",
name: "carBrand",
message: "数据来源:车联网平台门店-主营品牌;非必选,未选时所有品牌驻店均需学习",
message: "数据来源:车联网平台门店-主营品牌; 非必选,未选时所有品牌驻店均需学习",
addHtml: "carBrandHtml",
isHide: true,
},
......@@ -399,8 +399,10 @@ export default {
return;
}
let { postTypeOpt } = this.baseData;
if (!positionName) {
positionName = postTypeOpt.find(item => item.oid == positionCode)?.name || "";
let name = postTypeOpt.find(item => item.oid == positionCode)?.name || "";
if (name) {
positionName = name;
this.addForm.positionName = name;
}
const carBrandList = await getCarBrandList({
positionName,
......
......@@ -21,7 +21,9 @@
:rules="rules">
<el-row :gutter="20">
<template v-for="(item, key) in item.infoData">
<el-col :key="key" :span="item.col ? item.col : 12">
<el-col v-if="!item.hide || !item.hide(detailInfo)"
:key="key"
:span="item.col ? item.col : 12">
<el-form-item :label="`${item.title}:`"
:prop="item.key">
<template v-if="item.type == 'imgList'">
......@@ -320,6 +322,9 @@ export default {
title: "品牌",
key: "brandNames",
col: 24,
hide: (row) => {
return !row.brandNames;
},
},
{
title: "考试时间",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!