|
|
@ -124,13 +124,20 @@ |
|
|
|
/** 添加/修改操作 */ |
|
|
|
const basicFormRef = ref() |
|
|
|
const openForm = (type : string, row ?: any) => { |
|
|
|
if (row&&row.filePathList && row.filePathList.length > 0) { |
|
|
|
row.filePathListView = row.filePathList.map((item) => { |
|
|
|
return { |
|
|
|
name: item, |
|
|
|
url: item |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
basicFormRef.value.open(type, row) |
|
|
|
} |
|
|
|
|
|
|
|
// form表单提交 |
|
|
|
const formsSuccess = async (formType, data) => { |
|
|
|
if (data.expireTime == 0) data.expireTime = null; |
|
|
|
data.filePathList = data.filePathList.map(item=>item.url) |
|
|
|
data.filePathList = data.filePathListView.map(item=>item.url) |
|
|
|
if (formType === 'create') { |
|
|
|
await ReplaceItemDesApi.createReplaceItemDes(data) |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|