rollback^2
xy 10 months ago
parent 2bc8a295b7
commit 5f3e23397a

@ -921,6 +921,9 @@ export default function formBuilder(
: h( : h(
"el-form-item", "el-form-item",
{ {
attrs: {
'data-field-id': info.id
},
props: { props: {
prop: info.name, prop: info.name,
label: info.label_show ? info.label : "", label: info.label_show ? info.label : "",

@ -55,9 +55,9 @@
:sub-form="subConfig" :sub-form="subConfig"
:fields="fields" :fields="fields"
:original-form="form" :original-form="form"
:readable="readableFields" :readable.sync="readableFields"
:script-content="scriptContent" :script-content="scriptContent"
:writeable="writeableFields" :writeable.sync="writeableFields"
:rules="rules" :rules="rules"
:sub-rules="subRules" :sub-rules="subRules"
:logs="config.logs" :logs="config.logs"
@ -274,6 +274,8 @@ export default {
isShowAssign: false, isShowAssign: false,
info: [], info: [],
config: {}, config: {},
writeableFields: [],
readableFields: [],
subConfig: new Map(), subConfig: new Map(),
myStatus: new Map([ myStatus: new Map([
[-2, "会签退回"], [-2, "会签退回"],
@ -557,6 +559,10 @@ export default {
} }
}); });
this.config = res; this.config = res;
this.readableFields = /\/detail/.test(this.$route.path)
? this.fields?.map((i) => i.id)
: this.config?.currentNode?.readable || [];
this.writeableFields = this.config?.currentNode?.writeable || [];
// form // form
this.generateForm(this.form, fields); this.generateForm(this.form, fields);
// form // form
@ -628,6 +634,10 @@ export default {
} }
}); });
this.config = res; this.config = res;
this.readableFields = /\/detail/.test(this.$route.path)
? this.fields?.map((i) => i.id)
: this.config?.currentNode?.readable || [];
this.writeableFields = this.config?.currentNode?.writeable || [];
this.generateForm(this.form, fields); this.generateForm(this.form, fields);
this.handleDefaultJSON(); this.handleDefaultJSON();
this.form = Object.assign({}, this.form); this.form = Object.assign({}, this.form);
@ -658,6 +668,10 @@ export default {
} }
}); });
this.config = res; this.config = res;
this.readableFields = /\/detail/.test(this.$route.path)
? this.fields?.map((i) => i.id)
: this.config?.currentNode?.readable || [];
this.writeableFields = this.config?.currentNode?.writeable || [];
this.generateForm(this.form, fields); this.generateForm(this.form, fields);
this.handleDefaultJSON(); this.handleDefaultJSON();
const { data } = res?.flow; const { data } = res?.flow;
@ -828,14 +842,15 @@ export default {
fields() { fields() {
return this.config?.customModel?.fields || []; return this.config?.customModel?.fields || [];
}, },
readableFields() { // data
return /\/detail/.test(this.$route.path) // readableFields() {
? this.fields?.map((i) => i.id) // return /\/detail/.test(this.$route.path)
: this.config?.currentNode?.readable || []; // ? this.fields?.map((i) => i.id)
}, // : this.config?.currentNode?.readable || [];
writeableFields() { // },
return this.config?.currentNode?.writeable || []; // writeableFields() {
}, // return this.config?.currentNode?.writeable || [];
// },
node() { node() {
return this.config?.currentNode || {}; return this.config?.currentNode || {};
}, },

Loading…
Cancel
Save