From e59123d3692270276fe901388df0000f316c5c09 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Fri, 13 Dec 2024 17:42:30 +0800 Subject: [PATCH] 1 --- src/utils/formBuilder.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/utils/formBuilder.js b/src/utils/formBuilder.js index 34cb0c7..f946704 100644 --- a/src/utils/formBuilder.js +++ b/src/utils/formBuilder.js @@ -1553,6 +1553,38 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab ), ]); break; + case 'relation-flow': + if (!this.flows[info.name]) { + flowList('all', { + page: 1, + page_size: 9999, + custom_model_id: info.stub + }).then(res => { + this.$set(this.flows, info.name, res.data.data) + console.log(this.flows) + }) + } + formItem = h( + "van-cell", + { + attrs: { + for: info.name + }, + props: { + title: info.label, + value: row ? row[info.name]?.toString()?.split(',').map(j => { + return this.flows[info.name]?.find((i) => + i.id == j + )?.title; + })?.toString() : this.form[info.name]?.toString()?.split(',').map(j => { + return this.flows[info.name]?.find((i) => + i.id == j + )?.title; + })?.toString() + } + }, + ); + break; default: formItem = h('van-cell',{ attrs: {