master
weizong song 8 months ago
parent d20e7f971e
commit da807f041b

@ -263,3 +263,60 @@ export function getOvertimeHoliday(params,isLoading=false) {
isLoading
})
}
// 获取预算年度选项
export function getBudgetYearOptions(isLoading=false) {
return request({
method: 'get',
url: '/api/budget/budget-data-year-options',
isLoading
})
}
// 获取预算数据树
export function getBudgetDataTree(params, isLoading=false) {
return request({
method: 'get',
url: '/api/budget/budget-data',
params,
isLoading
})
}
// 获取流程详情用于合同预填
export function getFlowDetailForContract(flowId, isLoading = false) {
return request({
method: 'get',
url: `/api/oa/flow/detail-for-contract/${flowId}`,
isLoading
})
}
// 获取合同设置
export function getContractSettings(flowId = null, isLoading = false) {
return request({
method: 'get',
url: '/api/oa/flow/contract-settings',
params: flowId ? { flow_id: flowId } : {},
isLoading
})
}
// 根据flow_id获取合同详情
export function getContractByFlowId(flowId, isLoading = false) {
return request({
method: 'get',
url: `/api/oa/flow/contract-by-flow/${flowId}`,
isLoading
})
}
// 创建合同
export function createContract(data, isLoading = false) {
return request({
method: 'post',
url: '/api/oa/flow/create-contract',
data,
isLoading
})
}

@ -0,0 +1,297 @@
<template>
<div class="budget-source-field">
<!-- 提交用隐藏字段 -->
<input :name="fieldName" type="hidden" :value="normalizedValue" />
<!-- 当前展示文本有值时展示 -->
<span v-if="hasValue && displayText" class="budget-source-label" :title="displayText">
{{ displayText }}
</span>
<span
v-else-if="hasValue"
class="budget-source-label budget-source-label--muted"
:title="normalizedValue"
>
ID: {{ normalizedValue }}
</span>
<el-button type="primary" size="small" @click="openDialog"></el-button>
<el-button v-if="hasValue" size="small" @click="clearValue"></el-button>
<el-dialog
title="选择预算来源"
:visible.sync="dialogVisible"
width="720px"
:close-on-click-modal="false"
append-to-body
@open="onDialogOpen"
@close="onDialogClose"
>
<div style="margin-bottom: 12px">
<el-select
v-model="yearId"
placeholder="请选择年份"
filterable
style="width: 100%"
:loading="yearLoading"
@change="onYearChange"
>
<el-option
v-for="y in yearOptions"
:key="String(y.value)"
:label="y.label"
:value="y.value"
/>
</el-select>
</div>
<div v-loading="treeLoading" style="max-height: 420px; overflow: auto">
<div v-if="departmentTree.length" class="tree-block">
<div class="tree-title">部门预算</div>
<el-tree
:data="departmentTree"
node-key="id"
:props="treeProps"
highlight-current
default-expand-all
:expand-on-click-node="false"
:current-node-key="pendingId"
@node-click="onNodeClick"
/>
</div>
<div v-if="projectTree.length" class="tree-block" style="margin-top: 16px">
<div class="tree-title">自有账户</div>
<el-tree
:data="projectTree"
node-key="id"
:props="treeProps"
highlight-current
default-expand-all
:expand-on-click-node="false"
:current-node-key="pendingId"
@node-click="onNodeClick"
/>
</div>
<div
v-if="!treeLoading && departmentTree.length === 0 && projectTree.length === 0"
style="text-align: center; color: #909399; padding: 32px 0"
>
暂无数据
</div>
</div>
<template #footer>
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" :disabled="!pendingId" @click="confirmPick">
确定
</el-button>
</template>
</el-dialog>
</div>
</template>
<script>
import request from "@/utils/request";
import { getBudgetYearOptions, getBudgetDataTree } from "@/api/flow";
export default {
name: "BudgetSourcePickerField",
props: {
fieldName: { type: String, required: true },
value: { type: [String, Number], default: "" },
display: { type: String, default: "" },
},
data() {
return {
dialogVisible: false,
yearLoading: false,
treeLoading: false,
yearOptions: [],
yearId: null,
treeData: [],
pendingId: null,
};
},
computed: {
normalizedValue() {
return this.value === null || this.value === undefined ? "" : String(this.value);
},
hasValue() {
return this.normalizedValue !== "";
},
displayText() {
// `{}_display`
// 退 id 1
return this.hasValue ? (this.display || "") : "";
},
treeProps() {
return {
children: "children",
label: "name",
disabled: (data) => !data?.is_leaf,
};
},
departmentTree() {
return (this.treeData || []).filter((n) => n?.budget_type !== "project");
},
projectTree() {
return (this.treeData || []).filter((n) => n?.budget_type === "project");
},
},
methods: {
openDialog() {
this.dialogVisible = true;
},
onDialogOpen() {
this.pendingId = null;
this.ensureInit();
},
onDialogClose() {
this.pendingId = null;
},
async ensureInit() {
if (!this.yearOptions || this.yearOptions.length === 0) {
await this.loadYearOptions();
}
if (!this.yearId && this.yearOptions.length > 0) {
// value year_id
const fromValue = await this.tryResolveYearIdByValue();
this.yearId = fromValue || this.yearOptions[0].value;
}
if (this.yearId) {
await this.loadTree(this.yearId);
}
},
async loadYearOptions() {
this.yearLoading = true;
try {
const res = await getBudgetYearOptions(false);
const arr = Array.isArray(res) ? res : [];
this.yearOptions = arr.map((y) => ({
value: y.value,
label: y.label || (y.year ? `${y.year}` : `${y.value}`),
year: y.year,
}));
} finally {
this.yearLoading = false;
}
},
async tryResolveYearIdByValue() {
if (!this.hasValue) return null;
try {
const detail = await request({
method: "get",
url: `/api/budget/budget-data/${this.normalizedValue}`,
isLoading: false,
});
const yearId = detail?.year_id ?? null;
return yearId;
} catch (e) {
return null;
}
},
async loadTree(yearId) {
if (!yearId) return;
this.treeLoading = true;
try {
const res = await getBudgetDataTree({ year_id: yearId }, false);
this.treeData = Array.isArray(res) ? res : [];
} finally {
this.treeLoading = false;
}
},
async onYearChange(val) {
this.pendingId = null;
this.treeData = [];
await this.loadTree(val);
},
onNodeClick(node) {
if (!node || !node.is_leaf) return;
this.pendingId = node.id;
},
findPathNames(tree, id, path = []) {
if (!Array.isArray(tree)) return null;
for (const n of tree) {
const nextPath = [...path, n];
if (String(n.id) === String(id)) return nextPath;
if (n.children && n.children.length) {
const found = this.findPathNames(n.children, id, nextPath);
if (found) return found;
}
}
return null;
},
getYearLabel() {
const opt = (this.yearOptions || []).find(
(y) => String(y.value) === String(this.yearId)
);
return opt?.label || (this.yearId ? `${this.yearId}` : "");
},
confirmPick() {
if (!this.pendingId) return;
const nodes = this.findPathNames(this.treeData, this.pendingId) || [];
const names = nodes.map((n) => n?.name).filter(Boolean);
const leaf = nodes[nodes.length - 1];
const typeText =
leaf?.budget_type === "project"
? "自有账户"
: leaf?.budget_type === "department"
? "部门预算"
: leaf?.budget_type
? String(leaf.budget_type)
: "";
const yearLabel = this.getYearLabel();
const display = [yearLabel, typeText, ...names].filter(Boolean).join(" / ");
// /
this.$emit("input", String(this.pendingId));
this.$emit("update:display", display);
this.dialogVisible = false;
this.pendingId = null;
},
clearValue() {
this.$emit("input", "");
this.$emit("update:display", "");
},
},
};
</script>
<style scoped>
.budget-source-field {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.budget-source-label {
color: #606266;
font-size: 14px;
flex: 1;
min-width: 160px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.budget-source-label--muted {
color: #909399;
}
.tree-title {
font-size: 14px;
font-weight: 600;
color: #606266;
margin-bottom: 8px;
padding-bottom: 8px;
border-bottom: 1px solid #e4e7ed;
}
</style>

@ -0,0 +1,470 @@
<template>
<div class="contract-sign-field">
<!-- 提交用隐藏字段 -->
<input :name="fieldName" type="hidden" :value="normalizedValue" />
<!-- 当前展示文本有值时展示 -->
<span v-if="hasValue && displayText" class="contract-sign-label" :title="displayText">
{{ displayText }}
</span>
<span
v-else-if="hasValue"
class="contract-sign-label contract-sign-label--muted"
:title="normalizedValue"
>
ID: {{ normalizedValue }}
</span>
<el-button v-if="!hasValue" type="primary" size="small" @click="openDialog"></el-button>
<el-button v-if="hasValue" type="primary" size="small" @click="openDialog"></el-button>
<el-button v-if="hasValue" size="small" @click="clearValue"></el-button>
<el-dialog
title="合同签订"
:visible.sync="dialogVisible"
width="60%"
:close-on-click-modal="false"
append-to-body
@open="onDialogOpen"
@close="onDialogClose"
>
<el-form
:model="form"
:rules="rules"
ref="formRef"
label-width="120px"
v-loading="loading"
>
<el-form-item label="合同编号" prop="contract_no">
<el-input v-model="form.contract_no" />
</el-form-item>
<el-form-item label="标题">
<el-input v-model="form.title" />
</el-form-item>
<el-form-item label="甲方">
<el-input v-model="form.party_a" />
</el-form-item>
<el-form-item label="乙方">
<el-input v-model="form.party_b" />
</el-form-item>
<el-form-item label="总额">
<el-input-number v-model="form.amount_total" :min="0" :step="1000" style="width: 100%" />
</el-form-item>
<el-form-item label="金额类型">
<el-select v-model="form.amount_type" placeholder="请选择金额类型" style="width: 100%">
<el-option label="闭口合同(金额确定)" value="fixed" />
<el-option label="框架协议/开口合同(金额不确定)" value="open" />
</el-select>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="form.status" style="width: 100%">
<el-option label="草稿" value="draft" />
<el-option label="生效" value="approved" />
<el-option label="终止" value="terminated" />
</el-select>
</el-form-item>
<el-form-item label="签订日期">
<el-date-picker
v-model="form.sign_date"
type="date"
value-format="yyyy-MM-dd"
style="width: 100%"
/>
</el-form-item>
<el-form-item label="开始日期">
<el-date-picker
v-model="form.start_date"
type="date"
value-format="yyyy-MM-dd"
style="width: 100%"
/>
</el-form-item>
<el-form-item label="结束日期">
<el-date-picker
v-model="form.end_date"
type="date"
value-format="yyyy-MM-dd"
style="width: 100%"
/>
</el-form-item>
<el-divider content-position="left">付款计划</el-divider>
<div class="payplan-toolbar">
<el-button type="primary" size="small" @click="addPayPlan"></el-button>
</div>
<el-table :data="form.pay_plans" border size="small" class="mb-16">
<el-table-column prop="phase_no" label="期次" width="100">
<template #default="{ row }">
<el-input-number v-model="row.phase_no" :min="1" size="small" />
</template>
</el-table-column>
<el-table-column prop="due_date" label="计划付款日" width="150">
<template #default="{ row }">
<el-date-picker
v-model="row.due_date"
type="date"
value-format="yyyy-MM-dd"
size="small"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column prop="amount_plan" label="计划金额" width="140">
<template #default="{ row }">
<el-input-number
v-model="row.amount_plan"
:min="0"
:step="1000"
size="small"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column label="操作" width="100">
<template #default="{ $index }">
<el-button type="danger" link size="small" @click="removePayPlan($index)"></el-button>
</template>
</el-table-column>
</el-table>
</el-form>
<template #footer>
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" :loading="saving" @click="handleSubmit"></el-button>
</template>
</el-dialog>
</div>
</template>
<script>
import request from "@/utils/request";
import { Message } from 'element-ui';
import {
getFlowDetailForContract,
getContractSettings,
getContractByFlowId,
createContract,
} from "@/api/flow";
export default {
name: "ContractSignField",
props: {
fieldName: { type: String, required: true },
value: { type: [String, Number], default: "" },
display: { type: String, default: "" },
flowId: { type: [String, Number], default: "" },
},
data() {
return {
dialogVisible: false,
loading: false,
saving: false,
formRef: null,
form: {
contract_no: "",
title: "",
party_a: "",
party_b: "",
amount_total: 0,
amount_type: "fixed",
status: "draft",
sign_date: "",
start_date: "",
end_date: "",
pay_plans: [],
},
rules: {
contract_no: [{ required: true, message: "请填写合同编号", trigger: "blur" }],
},
};
},
computed: {
normalizedValue() {
return this.value === null || this.value === undefined ? "" : String(this.value);
},
hasValue() {
return this.normalizedValue !== "";
},
displayText() {
return this.hasValue ? this.display || "" : "";
},
},
methods: {
openDialog() {
this.dialogVisible = true;
},
async onDialogOpen() {
this.resetForm();
if (this.flowId) {
// flow_id
const contractExists = await this.loadExistingContract();
if (!contractExists) {
//
this.loadFlowDataAndPrefill();
}
}
},
onDialogClose() {
//
},
resetForm() {
this.form = {
contract_no: "",
title: "",
party_a: "",
party_b: "",
amount_total: 0,
amount_type: "fixed",
status: "draft",
sign_date: "",
start_date: "",
end_date: "",
pay_plans: [],
};
if (this.$refs.formRef) {
this.$refs.formRef.clearValidate();
}
},
async loadExistingContract() {
if (!this.flowId) {
return false;
}
this.loading = true;
try {
const res = await getContractByFlowId(this.flowId);
const contractData = res?.data || res;
if (contractData) {
//
this.form.contract_no = contractData.contract_no || "";
this.form.title = contractData.title || "";
this.form.party_a = contractData.party_a || "";
this.form.party_b = contractData.party_b || "";
this.form.amount_total = contractData.amount_total || 0;
this.form.amount_type = contractData.amount_type || "fixed";
this.form.status = contractData.status || "draft";
this.form.sign_date = contractData.sign_date || "";
this.form.start_date = contractData.start_date || "";
this.form.end_date = contractData.end_date || "";
//
if (contractData.pay_plans && Array.isArray(contractData.pay_plans)) {
this.form.pay_plans = contractData.pay_plans.map((plan) => ({
phase_no: plan.phase_no || 1,
due_date: plan.due_date || "",
amount_plan: plan.amount_plan || 0,
}));
} else {
this.form.pay_plans = [];
}
return true;
}
return false;
} catch (e) {
console.error("加载已有合同失败:", e);
Message.error("加载已有合同失败");
return false;
} finally {
this.loading = false;
}
},
async loadFlowDataAndPrefill() {
if (!this.flowId) {
return;
}
this.loading = true;
try {
// flow
const [flowDetailRes, settingsRes] = await Promise.all([
getFlowDetailForContract(this.flowId),
getContractSettings(this.flowId),
]);
const flowDetail = flowDetailRes?.data || flowDetailRes;
const settings = settingsRes?.data || settingsRes;
if (!flowDetail?.flow?.data) {
return;
}
const flowData = flowDetail.flow.data;
const contractMapping = (settings?.contract_field_mapping || []);
const payplanMapping = (settings?.payplan_field_mapping || []);
//
if (contractMapping && contractMapping.length > 0) {
contractMapping.forEach((map) => {
const budgetField = map.budget_field;
const oaField = map.oa_field;
if (budgetField && oaField && flowData[oaField] !== undefined) {
if (this.form.hasOwnProperty(budgetField)) {
this.form[budgetField] = flowData[oaField];
}
}
});
}
//
if (settings.oa_custom_model_id_for_payplan && flowDetail.customModel) {
//
const payplanField = flowDetail.customModel.fields.find(
(f) => f.type === "relation" && f.sub_custom_model_id === settings.oa_custom_model_id_for_payplan
);
if (payplanField && flowData[payplanField.name]) {
let payplanRows = flowData[payplanField.name];
if (typeof payplanRows === "string") {
try {
payplanRows = JSON.parse(payplanRows);
} catch (e) {
payplanRows = [];
}
}
if (Array.isArray(payplanRows) && payplanRows.length > 0) {
this.form.pay_plans = this.mapPayPlans(payplanRows, payplanMapping);
}
}
} else if (flowData.pay_plans && Array.isArray(flowData.pay_plans)) {
// pay_plans
this.form.pay_plans = this.mapPayPlans(flowData.pay_plans, payplanMapping);
}
} catch (e) {
console.error("加载流程数据失败:", e);
Message.error("加载流程数据失败");
} finally {
this.loading = false;
}
},
mapPayPlans(rows, mapping) {
if (!Array.isArray(rows) || !Array.isArray(mapping) || mapping.length === 0) {
return [];
}
return rows.map((row, index) => {
const item = {};
mapping.forEach((map) => {
const budgetField = map.budget_field;
const oaField = map.oa_field;
if (budgetField && oaField && row[oaField] !== undefined) {
item[budgetField] = row[oaField];
}
});
if (!item.phase_no) {
item.phase_no = index + 1;
}
if (item.amount_plan === undefined) {
item.amount_plan = 0;
}
return item;
});
},
addPayPlan() {
const maxPhaseNo =
this.form.pay_plans.length > 0
? Math.max(...this.form.pay_plans.map((p) => p.phase_no || 0))
: 0;
this.form.pay_plans.push({
phase_no: maxPhaseNo + 1,
due_date: "",
amount_plan: 0,
});
},
removePayPlan(index) {
this.form.pay_plans.splice(index, 1);
},
async handleSubmit() {
if (!this.$refs.formRef) {
return;
}
this.$refs.formRef.validate(async (valid) => {
if (!valid) {
return false;
}
this.saving = true;
try {
const payload = {
flow_id: this.flowId ? parseInt(this.flowId) : null,
contract: {
contract_no: this.form.contract_no,
title: this.form.title,
party_a: this.form.party_a,
party_b: this.form.party_b,
amount_total: this.form.amount_total,
amount_type: this.form.amount_type,
status: this.form.status,
sign_date: this.form.sign_date || null,
start_date: this.form.start_date || null,
end_date: this.form.end_date || null,
},
pay_plans: this.form.pay_plans.map((p) => ({
phase_no: p.phase_no,
due_date: p.due_date || null,
amount_plan: p.amount_plan || 0,
})),
};
const res = await createContract(payload);
const data = res?.data || res;
if (data?.id) {
const displayText = data.contract_no + (data.title ? ` / ${data.title}` : "");
this.$emit("input", String(data.id));
this.$emit("update:display", displayText);
this.dialogVisible = false;
Message.success("合同创建成功");
} else {
Message.error("创建合同失败");
}
} catch (e) {
console.error("创建合同失败:", e);
const msg = e?.response?.data?.msg || e?.message || "创建合同失败";
Message.error(msg);
} finally {
this.saving = false;
}
});
},
clearValue() {
this.$emit("input", "");
this.$emit("update:display", "");
},
},
};
</script>
<style scoped>
.contract-sign-field {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.contract-sign-label {
color: #606266;
font-size: 14px;
flex: 1;
min-width: 160px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.contract-sign-label--muted {
color: #909399;
}
.payplan-toolbar {
margin-bottom: 12px;
}
.mb-16 {
margin-bottom: 16px;
}
</style>

@ -7,6 +7,8 @@ import axios from "axios";
import { flowList } from "@/api/flow";
import MobilePicker from '@/components/MobilePicker/index.vue';
import MobileMultipleSelect from "@/components/MobileMultipleSelect/index.vue";
import BudgetSourcePickerField from "@/components/BudgetSourcePickerField.vue";
import ContractSignField from "@/components/ContractSignField.vue";
import { Message } from 'element-ui'
function isJSON(str) {
if (typeof str !== 'string') return false;
@ -231,6 +233,45 @@ export default function formBuilder(
)
);
break;
case "budget-source":
// 可写hidden input + “选取”按钮 + 弹窗(在独立组件内实现)
formItem = h(BudgetSourcePickerField, {
props: {
fieldName: info.name,
value: target[info.name],
display: target[`${info.name}_display`],
},
on: {
input: (val) => {
this.$set(target, info.name, val);
},
"update:display": (txt) => {
// 用于回显(只读/展示)
this.$set(target, `${info.name}_display`, txt);
},
},
});
break;
case "contract-sign":
// 合同签订字段hidden input + "合同签订"按钮 + 弹窗(在独立组件内实现)
formItem = h(ContractSignField, {
props: {
fieldName: info.name,
value: target[info.name],
display: target[`${info.name}_display`],
flowId: this.$route?.query?.flow_id || "",
},
on: {
input: (val) => {
this.$set(target, info.name, val);
},
"update:display": (txt) => {
// 用于回显(只读/展示)
this.$set(target, `${info.name}_display`, txt);
},
},
});
break;
case "file":
formItem = row
? h("vxe-upload", {
@ -1068,6 +1109,28 @@ export default function formBuilder(
]
);
break;
case "budget-source":
// 只读模式下显示后端返回的 _display 值
const displayFieldName = info.name + '_display';
const displayValue = target[displayFieldName] || target[info.name] || '';
console.log('[budget-source] 只读模式渲染', {
fieldName: info.name,
displayFieldName,
displayValue,
originalValue: target[info.name],
targetKeys: Object.keys(target).filter(k => k.includes(info.name)),
target: target
});
formItem = h(
"span",
{
style: {
color: "#333",
},
},
displayValue
);
break;
default:
formItem = h(
"span",
@ -2056,6 +2119,25 @@ export default function formBuilder(
})
);
break;
case "budget-source":
// 只读模式下显示后端返回的 _display 值
const displayFieldNameMobile = info.name + '_display';
const displayValueMobile = target[displayFieldNameMobile] || target[info.name] || '';
console.log('[budget-source] 只读模式渲染(移动端)', {
fieldName: info.name,
displayFieldName: displayFieldNameMobile,
displayValue: displayValueMobile,
originalValue: target[info.name],
targetKeys: Object.keys(target).filter(k => k.includes(info.name)),
target: target
});
formItem = h("van-field", {
props: {
value: displayValueMobile,
readonly: true,
},
});
break;
default:
formItem = h("van-field", {
props: {

@ -99,7 +99,7 @@
style="width: 100%;"
:disabled="type === 'view'"
>
<el-option label="&ldquo;三重一大&rdquo;事项" value="&ldquo;三重一大&rdquo;事项"></el-option>
<el-option label="“三重一大”事项" value="“三重一大”事项"></el-option>
<el-option label="资金申请" value="资金申请"></el-option>
<el-option label="资金支付" value="资金支付"></el-option>
<el-option label="其他" value="其他"></el-option>

@ -720,7 +720,8 @@ export default {
this.form[key] = jsonObj;
}
} catch (err) {
if (this.form.hasOwnProperty(key)) {
// _display
if (this.form.hasOwnProperty(key) || key.endsWith('_display')) {
if (data[key] instanceof Array) {
if (data[key].length > 0 && data[key][0].hasOwnProperty('url')) {
this.form[key] = data[key].map(i => ({
@ -731,8 +732,9 @@ export default {
} else {
this.form[key] = ''
}
} else {
this.form[key] = data[key];
}
this.form[key] = data[key];
}
}
}

@ -521,6 +521,10 @@ export default {
} else {
if (/\/detail/.test(this.$route.path) && this.$route.query.flow_id) {
object[field.name] = "";
// budget-source _display
if (field.type === 'budget-source') {
object[field.name + '_display'] = "";
}
} else {
if (this.writeableFields.indexOf(field.id) !== -1 || this.readableFields.indexOf(field.id) !== -1) {
object[field.name] = (this.writeableFields.indexOf(field.id) !== -1 && field.default_value) ? field.default_value : (field.type === 'file' ? [] : "");
@ -599,7 +603,8 @@ export default {
this.form[key] = jsonObj;
}
} catch (err) {
if (this.form.hasOwnProperty(key)) {
// _display
if (this.form.hasOwnProperty(key) || key.endsWith('_display')) {
if (data[key] instanceof Array) {
if (data[key].length > 0 && data[key][0].hasOwnProperty('url')) {
this.form[key] = data[key].map(i => ({
@ -610,8 +615,9 @@ export default {
} else {
this.form[key] = ''
}
} else {
this.form[key] = data[key];
}
this.form[key] = data[key];
}
}
}
@ -707,7 +713,8 @@ export default {
this.form[key] = jsonObj;
}
} catch (err) {
if (this.form.hasOwnProperty(key)) {
// _display
if (this.form.hasOwnProperty(key) || key.endsWith('_display')) {
if (data[key] instanceof Array) {
if (data[key].length > 0) {
this.form[key] = data[key];

Loading…
Cancel
Save