|
|
|
|
@ -305,7 +305,7 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
"application/msword,image/jpeg,application/pdf,image/png,application/vnd.ms-powerpoint,text/plain,application/x-zip-compressed,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
|
|
|
multiple: !!info.multiple,
|
|
|
|
|
limit: info.multiple ? 20 : 1,
|
|
|
|
|
fileList: this.form[info.name].map(i => {
|
|
|
|
|
fileList: this.form[info.name]?.map(i => {
|
|
|
|
|
if (i.hasOwnProperty('original_name')) {
|
|
|
|
|
i.name = i.original_name
|
|
|
|
|
}
|
|
|
|
|
@ -569,7 +569,7 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
"min-height": "200px",
|
|
|
|
|
border: true,
|
|
|
|
|
stripe: true,
|
|
|
|
|
data: this.form[info.name],
|
|
|
|
|
data: (this.form[info.name] && typeof this.form[info.name] !== 'string') ? this.form[info.name] : [],
|
|
|
|
|
"keep-source": true,
|
|
|
|
|
"column-config": { resizable: true },
|
|
|
|
|
"show-overflow": true,
|
|
|
|
|
@ -800,11 +800,42 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
color: "#333",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
this.form[info.name]?.toString()?.split(',').map(j => {
|
|
|
|
|
return this.flows[info.name]?.find((i) =>
|
|
|
|
|
this.form[info.name]?.toString()?.split(',')?.map(j => {
|
|
|
|
|
let flow = this.flows[info.name]?.find((i) =>
|
|
|
|
|
i.id == j
|
|
|
|
|
)?.title;
|
|
|
|
|
})?.toString()
|
|
|
|
|
)
|
|
|
|
|
return flow ? h('el-link', {
|
|
|
|
|
props: {
|
|
|
|
|
type: 'primary'
|
|
|
|
|
},
|
|
|
|
|
style: {
|
|
|
|
|
'line-height': '1.5'
|
|
|
|
|
},
|
|
|
|
|
on: {
|
|
|
|
|
click: _ => {
|
|
|
|
|
let target = this.$router.resolve({
|
|
|
|
|
path: '/flow/detail',
|
|
|
|
|
query: {
|
|
|
|
|
module_id: flow.custom_model_id,
|
|
|
|
|
flow_id: flow.id,
|
|
|
|
|
isSinglePage: 1
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.modalRender = h => h('iframe',{
|
|
|
|
|
attrs: {
|
|
|
|
|
src: target.href,
|
|
|
|
|
},
|
|
|
|
|
style: {
|
|
|
|
|
border: 'none',
|
|
|
|
|
width: '100%',
|
|
|
|
|
height: '100%'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.isShowModal = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},flow.title) : ''
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
break;
|
|
|
|
|
case "file":
|
|
|
|
|
@ -836,7 +867,7 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
accept:
|
|
|
|
|
"application/msword,image/jpeg,application/pdf,image/png,application/vnd.ms-powerpoint,text/plain,application/x-zip-compressed,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
|
|
|
multiple: true,
|
|
|
|
|
fileList: (this.form[info.name] instanceof Array) ? this.form[info.name].map(i => {
|
|
|
|
|
fileList: (this.form[info.name] instanceof Array) ? this.form[info.name]?.map(i => {
|
|
|
|
|
if (i.hasOwnProperty('original_name')) {
|
|
|
|
|
i.name = i.original_name
|
|
|
|
|
}
|
|
|
|
|
@ -1215,12 +1246,12 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
accept:
|
|
|
|
|
"application/msword,image/jpeg,application/pdf,image/png,application/vnd.ms-powerpoint,text/plain,application/x-zip-compressed,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
|
|
|
multiple: !!info.multiple,
|
|
|
|
|
fileList: row ? row[info.name].map(i => {
|
|
|
|
|
fileList: row ? row[info.name]?.map(i => {
|
|
|
|
|
if (i.hasOwnProperty('original_name')) {
|
|
|
|
|
i.name = i.original_name
|
|
|
|
|
}
|
|
|
|
|
return i
|
|
|
|
|
}) : this.form[info.name].map(i => {
|
|
|
|
|
}) : this.form[info.name]?.map(i => {
|
|
|
|
|
if (i.hasOwnProperty('original_name')) {
|
|
|
|
|
i.name = i.original_name
|
|
|
|
|
}
|
|
|
|
|
@ -1408,7 +1439,7 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
]),
|
|
|
|
|
h(
|
|
|
|
|
"div",
|
|
|
|
|
this.form[info.name].map((sForm, sIndex) =>
|
|
|
|
|
this.form[info.name] instanceof Array ? this.form[info.name]?.map((sForm, sIndex) =>
|
|
|
|
|
h(
|
|
|
|
|
"van-cell-group",
|
|
|
|
|
{
|
|
|
|
|
@ -1463,7 +1494,7 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
) : ''
|
|
|
|
|
),
|
|
|
|
|
]);
|
|
|
|
|
break;
|
|
|
|
|
@ -1579,7 +1610,7 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
}),
|
|
|
|
|
h(
|
|
|
|
|
"div",
|
|
|
|
|
this.form[info.name]?.map((sForm, sIndex) =>
|
|
|
|
|
this.form[info.name] instanceof Array ? this.form[info.name]?.map((sForm, sIndex) =>
|
|
|
|
|
h(
|
|
|
|
|
"van-cell-group",
|
|
|
|
|
{
|
|
|
|
|
@ -1620,7 +1651,7 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
) : ''
|
|
|
|
|
),
|
|
|
|
|
]);
|
|
|
|
|
break;
|
|
|
|
|
@ -1642,18 +1673,45 @@ export default function formBuilder(device, info, h, row, pWrite = false,pReadab
|
|
|
|
|
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) =>
|
|
|
|
|
title: info.label
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
this.form[info.name]?.toString()?.split(',')?.map(j => {
|
|
|
|
|
let flow = this.flows[info.name]?.find((i) =>
|
|
|
|
|
i.id == j
|
|
|
|
|
)?.title;
|
|
|
|
|
})?.toString()
|
|
|
|
|
)
|
|
|
|
|
return flow ? h('el-link', {
|
|
|
|
|
props: {
|
|
|
|
|
type: 'primary'
|
|
|
|
|
},
|
|
|
|
|
style: {
|
|
|
|
|
'line-height': '1.5'
|
|
|
|
|
},
|
|
|
|
|
on: {
|
|
|
|
|
click: _ => {
|
|
|
|
|
let target = this.$router.resolve({
|
|
|
|
|
path: '/flow/detail',
|
|
|
|
|
query: {
|
|
|
|
|
module_id: flow.custom_model_id,
|
|
|
|
|
flow_id: flow.id,
|
|
|
|
|
isSinglePage: 1
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.modalRender = h => h('iframe',{
|
|
|
|
|
attrs: {
|
|
|
|
|
src: target.href,
|
|
|
|
|
},
|
|
|
|
|
style: {
|
|
|
|
|
border: 'none',
|
|
|
|
|
width: '100%',
|
|
|
|
|
height: '100%'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.isShowModal = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},flow.title) : ''
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
|