|
|
|
@ -79,21 +79,48 @@
|
|
|
|
|
if (DiyFieldIdS.value.length) {
|
|
|
|
|
DiyFieldIdS.value.forEach((item) => {
|
|
|
|
|
removeSchemaByField(item.value)
|
|
|
|
|
removeSchemaByField(`${item.value}-fileType`)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DiyFieldIdS.value.splice(0)
|
|
|
|
|
data.forEach((item) => {
|
|
|
|
|
appendSchemaByField(
|
|
|
|
|
{
|
|
|
|
|
field: item.value,
|
|
|
|
|
label: item.label,
|
|
|
|
|
component: 'Input',
|
|
|
|
|
colProps: { span: 6 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
placeholder: '自定义文件名称',
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
field: item.value,
|
|
|
|
|
label: item.label,
|
|
|
|
|
component: 'Input',
|
|
|
|
|
colProps: { span: 6 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
placeholder: '自定义文件名称',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: `${item.value}-fileType`,
|
|
|
|
|
label: `${item.label}-文件类型`,
|
|
|
|
|
component: 'Select',
|
|
|
|
|
colProps: { span: 6 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
placeholder: '自定义文件类型',
|
|
|
|
|
allowClear: true,
|
|
|
|
|
options: [
|
|
|
|
|
{
|
|
|
|
|
label: 'PDF',
|
|
|
|
|
value: 1,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: 'Excel',
|
|
|
|
|
value: 2,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: 'Word',
|
|
|
|
|
value: 3,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
'attachments',
|
|
|
|
|
)
|
|
|
|
|
DiyFieldIdS.value.push(item)
|
|
|
|
@ -140,6 +167,7 @@
|
|
|
|
|
isUpdate.value = !!data?.isUpdate
|
|
|
|
|
DiyFieldIdS.value.forEach((item) => {
|
|
|
|
|
removeSchemaByField(item.value)
|
|
|
|
|
removeSchemaByField(`${item.value}-fileType`)
|
|
|
|
|
})
|
|
|
|
|
DiyFieldIdS.value.splice(0)
|
|
|
|
|
if (unref(isUpdate)) {
|
|
|
|
@ -167,6 +195,7 @@
|
|
|
|
|
label: element.templateName,
|
|
|
|
|
})
|
|
|
|
|
DiyFieldIdSObj[e.templateId] = e.fileName
|
|
|
|
|
DiyFieldIdSObj[`${e.templateId}-fileType`] = e.fileType
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
@ -205,6 +234,7 @@
|
|
|
|
|
function handlecloseModal() {
|
|
|
|
|
DiyFieldIdS.value.forEach((item) => {
|
|
|
|
|
removeSchemaByField(item.value)
|
|
|
|
|
removeSchemaByField(`${item.value}-fileType`)
|
|
|
|
|
})
|
|
|
|
|
closeModal()
|
|
|
|
|
}
|
|
|
|
@ -232,6 +262,7 @@
|
|
|
|
|
taskMailId: values.id,
|
|
|
|
|
templateId: item.id,
|
|
|
|
|
fileName: values[item.id] ? values[item.id] : item.templateName,
|
|
|
|
|
fileType: values[`${item.id}-fileType`],
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -272,6 +303,7 @@
|
|
|
|
|
async function refresh() {
|
|
|
|
|
DiyFieldIdS.value.forEach((item) => {
|
|
|
|
|
removeSchemaByField(item.value)
|
|
|
|
|
removeSchemaByField(`${item.value}-fileType`)
|
|
|
|
|
})
|
|
|
|
|
DiyFieldIdS.value.splice(0)
|
|
|
|
|
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
|
|
|
|
|