feat: 流程类型筛选改从后端字典接口加载(保留静态兜底)
This commit is contained in:
@@ -106,7 +106,10 @@
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { Form, message } from 'ant-design-vue';
|
||||
import { assignObject, uuid } from 'ele-admin-pro';
|
||||
import { addCmsComponents, updateCmsComponents } from '@/api/cms/cmsComponents';
|
||||
import {
|
||||
addCmsComponents,
|
||||
updateCmsComponents
|
||||
} from '@/api/cms/cmsComponents';
|
||||
import { CmsComponents } from '@/api/cms/cmsComponents/model';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -209,7 +212,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsComponents : addCmsComponents;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsComponents
|
||||
: addCmsComponents;
|
||||
saveOrUpdate(formData)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
@@ -232,12 +237,12 @@
|
||||
images.value = [];
|
||||
if (props.data) {
|
||||
assignObject(form, props.data);
|
||||
if(props.data.image){
|
||||
if (props.data.image) {
|
||||
images.value.push({
|
||||
uid: uuid(),
|
||||
url: props.data.image,
|
||||
status: 'done'
|
||||
})
|
||||
});
|
||||
}
|
||||
isUpdate.value = true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user