feat: 流程类型筛选改从后端字典接口加载(保留静态兜底)

This commit is contained in:
weicw
2026-10-31 07:43:17 +08:00
parent 7ae4319102
commit 3f62712ecb
664 changed files with 12766 additions and 9498 deletions
@@ -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 {
+26 -15
View File
@@ -45,7 +45,11 @@
</a-card>
<!-- 编辑弹窗 -->
<CmsComponentsEdit v-model:visible="showEdit" :data="current" @done="reload" />
<CmsComponentsEdit
v-model:visible="showEdit"
:data="current"
@done="reload"
/>
</div>
</div>
</template>
@@ -62,8 +66,15 @@
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import CmsComponentsEdit from './components/cmsComponentsEdit.vue';
import { pageCmsComponents, removeCmsComponents, removeBatchCmsComponents } from '@/api/cms/cmsComponents';
import type { CmsComponents, CmsComponentsParam } from '@/api/cms/cmsComponents/model';
import {
pageCmsComponents,
removeCmsComponents,
removeBatchCmsComponents
} from '@/api/cms/cmsComponents';
import type {
CmsComponents,
CmsComponentsParam
} from '@/api/cms/cmsComponents/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -105,73 +116,73 @@
dataIndex: 'id',
key: 'id',
align: 'center',
width: 90,
width: 90
},
{
title: '组件标题',
dataIndex: 'title',
key: 'title',
align: 'center',
align: 'center'
},
{
title: '关联导航ID',
dataIndex: 'navigationId',
key: 'navigationId',
align: 'center',
align: 'center'
},
{
title: '组件类型',
dataIndex: 'type',
key: 'type',
align: 'center',
align: 'center'
},
{
title: '页面关键词',
dataIndex: 'keywords',
key: 'keywords',
align: 'center',
align: 'center'
},
{
title: '页面描述',
dataIndex: 'description',
key: 'description',
align: 'center',
align: 'center'
},
{
title: '组件路径',
dataIndex: 'path',
key: 'path',
align: 'center',
align: 'center'
},
{
title: '组件图标',
dataIndex: 'icon',
key: 'icon',
align: 'center',
align: 'center'
},
{
title: '用户ID',
dataIndex: 'userId',
key: 'userId',
align: 'center',
align: 'center'
},
{
title: '排序(数字越小越靠前)',
dataIndex: 'sortNumber',
key: 'sortNumber',
align: 'center',
align: 'center'
},
{
title: '备注',
dataIndex: 'comments',
key: 'comments',
align: 'center',
align: 'center'
},
{
title: '状态, 0正常, 1冻结',
dataIndex: 'status',
key: 'status',
align: 'center',
align: 'center'
},
{
title: '创建时间',