Browse Source

子表结合关联表单预填充---效果实现

qin_s3
liwenxuan 1 month ago
parent
commit
28c292bff8
  1. 4
      src/api/DesignForm/type.ts
  2. 1
      src/components/DesignForm/app/index.vue
  3. 8
      src/views/sysworkflow/lowcodepage/pageFlow/newTableFlow.vue

4
src/api/DesignForm/type.ts

@ -158,9 +158,9 @@ export interface nodeFlow extends enableVersionId{
export interface conditionInfo{ export interface conditionInfo{
factorid:string; factorid:string;
type:number; type:number;
isCheckbox?:boolean; isCheckbox?:boolean|string;
answers?:string[]; answers?:string[];
oneanswer?:string; oneanswer?:any;
customFields?:customFieldsInfo[]; customFields?:customFieldsInfo[];
nodeUserList?:nodeUserInfo[]; nodeUserList?:nodeUserInfo[];

1
src/components/DesignForm/app/index.vue

@ -50,6 +50,7 @@ import FormPageCont from "@/components/DesignForm/tableListPage/formPageCont.vue
import NewFormPageCont from "@/components/DesignForm/tableListPage/newFormPageCont.vue"; import NewFormPageCont from "@/components/DesignForm/tableListPage/newFormPageCont.vue";
import NewTableFlow from "@/views/sysworkflow/lowcodepage/pageFlow/newTableFlow.vue"; import NewTableFlow from "@/views/sysworkflow/lowcodepage/pageFlow/newTableFlow.vue";
import TableFlow from "@/views/sysworkflow/lowcodepage/pageFlow/tableFlow.vue";

8
src/views/sysworkflow/lowcodepage/pageFlow/newTableFlow.vue

@ -467,10 +467,10 @@ const changeKeyVal = (key: any, val: any, type: any, attribute: any) => {
item.type = 3; item.type = 3;
if (type == "checkbox") { if (type == "checkbox") {
item.isCheckbox = true; item.isCheckbox = true;
item.answers = val.map(String); item.answers = val?val.map(String):[];
} else { } else {
item.isCheckbox = false; item.isCheckbox = false;
item.oneanswer = val.toString(); item.oneanswer = val?val.toString():"";
} }
if (notAsA_BasisForJudgment.indexOf(type) === -1) { if (notAsA_BasisForJudgment.indexOf(type) === -1) {
isUpdateFlowChart = true; isUpdateFlowChart = true;
@ -483,14 +483,14 @@ const changeKeyVal = (key: any, val: any, type: any, attribute: any) => {
factorid: key, factorid: key,
type: 3, type: 3,
isCheckbox: true, isCheckbox: true,
answers: val.map(String), answers: val?val.map(String):"",
}); });
} else { } else {
flowFactor.push({ flowFactor.push({
factorid: key, factorid: key,
type: 3, type: 3,
isCheckbox: false, isCheckbox: false,
oneanswer: val.toString(), oneanswer: val?val.toString():"",
}); });
} }
isUpdateFlowChart = true; isUpdateFlowChart = true;

Loading…
Cancel
Save