diff --git a/.env.development b/.env.development index f9b7f5a0..4c00a28f 100644 --- a/.env.development +++ b/.env.development @@ -6,7 +6,7 @@ VITE_PUBLIC_PATH = / # Basic interface address SPA #VITE_GLOB_API_URL=/basic-api -VITE_GLOB_API_URL=http://192.168.10.102:9020 +VITE_GLOB_API_URL=http://192.168.10.102:9500 # File upload address, optional diff --git a/.env.production b/.env.production index 4920fe76..908cff62 100644 --- a/.env.production +++ b/.env.production @@ -11,7 +11,7 @@ VITE_BUILD_COMPRESS = 'none' # Basic interface address SPA -VITE_GLOB_API_URL=http://192.168.10.102:9020 +VITE_GLOB_API_URL=http://192.168.10.102:9500 # File upload address, optional # It can be forwarded by nginx or write the actual address directly diff --git a/src/components/Form/src/hooks/useFormValues.ts b/src/components/Form/src/hooks/useFormValues.ts index 2521e34f..2e061522 100644 --- a/src/components/Form/src/hooks/useFormValues.ts +++ b/src/components/Form/src/hooks/useFormValues.ts @@ -16,7 +16,6 @@ interface UseFormValuesContext { * @desription deconstruct array-link key. This method will mutate the target. */ function tryDeconstructArray(key: string, value: any, target: Recordable) { - console.log('11111111111111'); const pattern = /^\[(.+)\]$/; if (pattern.test(key)) { const match = key.match(pattern); @@ -35,7 +34,6 @@ function tryDeconstructArray(key: string, value: any, target: Recordable) { * @desription deconstruct object-link key. This method will mutate the target. */ function tryDeconstructObject(key: string, value: any, target: Recordable) { - console.log('2222222222'); const pattern = /^\{(.+)\}$/; if (pattern.test(key)) { const match = key.match(pattern); diff --git a/src/components/PermissionBtn/index.vue b/src/components/PermissionBtn/index.vue index 27bba6e0..ada39773 100644 --- a/src/components/PermissionBtn/index.vue +++ b/src/components/PermissionBtn/index.vue @@ -1,18 +1,27 @@ \ No newline at end of file + const emit = defineEmits(['btnEvent']); + diff --git a/src/components/ProcessDesigner/package/penal/PropertiesPanel.vue b/src/components/ProcessDesigner/package/penal/PropertiesPanel.vue index 2981e409..68e7d209 100644 --- a/src/components/ProcessDesigner/package/penal/PropertiesPanel.vue +++ b/src/components/ProcessDesigner/package/penal/PropertiesPanel.vue @@ -60,6 +60,13 @@ :pageType="props.pageType" :class="data.currentWfNode.type == 'bpmn:SequenceFlow' ? '' : 'hidden'" /> + + @@ -97,6 +104,7 @@ inclusiveGatewayOption, subprocessOption, mylineOption, + scriptOption, } from './page'; import { flowStore } from '@/store/modules/flow'; @@ -329,7 +337,22 @@ to: element.businessObject.targetRef.id, }; break; - + case 'bpmn:ScriptTask': + data.wfNodeName = '脚本节点'; + data.currentWfNode = { + id: element.id, + type: element.type, + isInit: true, + executeType: '1', + sqlDb: '', + sqlStr: '', + sqlStrRevoke: '', + apiUrl: '', + apiUrlRevoke: '', + ioc: '', + iocRevoke: '', + }; + break; default: break; } diff --git a/src/components/ProcessDesigner/package/penal/page.ts b/src/components/ProcessDesigner/package/penal/page.ts index c58819dc..f76cd869 100644 --- a/src/components/ProcessDesigner/package/penal/page.ts +++ b/src/components/ProcessDesigner/package/penal/page.ts @@ -8,3 +8,4 @@ export { default as exclusiveGatewayOption } from './exclusiveGateway/index.vue' export { default as inclusiveGatewayOption } from './inclusiveGateway/index.vue'; export { default as subprocessOption } from './subprocess/index.vue'; export { default as mylineOption } from './myline/index.vue'; +export { default as scriptOption } from './script/index.vue'; diff --git a/src/components/ProcessDesigner/package/penal/script/index.vue b/src/components/ProcessDesigner/package/penal/script/index.vue new file mode 100644 index 00000000..d140cc30 --- /dev/null +++ b/src/components/ProcessDesigner/package/penal/script/index.vue @@ -0,0 +1,272 @@ + + + diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts index 1366e921..c19c71d6 100644 --- a/src/store/modules/permission.ts +++ b/src/store/modules/permission.ts @@ -133,7 +133,7 @@ export const usePermissionStore = defineStore({ elements: (data.item && data.item.elements) || '', }, name: data.item.name, - hideMenu: false, + hideMenu: data.item.status == 1 ? false : true, path: data.item.url || '/formCallPage?id=' + @@ -155,7 +155,7 @@ export const usePermissionStore = defineStore({ // 注册路由 const registeredRoute = (data) => { const modules = import.meta.glob('../../views/demo/**/**/index.vue'); - if (data.children.length == 0 && data.item.parentId == 0) { + if (data.children.length == 0 && data.item.parentId == 0 && data.item.status == 1) { router.addRoute('Root', { path: data.item.url, name: data.item.code, @@ -180,6 +180,9 @@ export const usePermissionStore = defineStore({ ], }); } else { + if (data.item.status == 0) { + return; + } router.addRoute('Root', { path: data.item.url, name: data.item.code, @@ -196,7 +199,7 @@ export const usePermissionStore = defineStore({ }); if (data.children && data.children.length > 0) { data.children.forEach((element) => { - if (element.item.code) { + if (element.item.code && element.item.status == 1) { router.addRoute(element.item.code, { path: element.item.url, name: element.item.url.replaceAll('/', ''), @@ -227,6 +230,7 @@ export const usePermissionStore = defineStore({ await Promise.all(moduleRoutes); // 设置菜单列表 + console.log(moduleRoutes); _this.setFrontMenuList(moduleRoutes); } diff --git a/src/views/demo/system/menu/MenuDrawer.vue b/src/views/demo/system/menu/MenuDrawer.vue index 9f0f05bd..73ea9fb1 100644 --- a/src/views/demo/system/menu/MenuDrawer.vue +++ b/src/views/demo/system/menu/MenuDrawer.vue @@ -38,12 +38,16 @@ isUpdate.value = !!data?.isUpdate; if (unref(isUpdate)) { + const { record } = data; + if (record.type == '2') { + record.status = record.status ? 1 : 0; + } setFieldsValue({ - ...data.record, + ...record, }); } const treeData = await getMenuList(); - treeData.unshift ({ + treeData.unshift({ id: '0', key: '0', name: '根节点', @@ -90,6 +94,7 @@ } else { // 新增按钮 delete values.type; + values.status = values.status == 1 ? true : false; if (!unref(isUpdate)) { const data = await addButton(values); if (data) { diff --git a/src/views/demo/system/menu/index.vue b/src/views/demo/system/menu/index.vue index 0c43becd..d8570612 100644 --- a/src/views/demo/system/menu/index.vue +++ b/src/views/demo/system/menu/index.vue @@ -29,6 +29,7 @@ import { columns, searchFormSchema } from './menu.data'; import { PermissionBtn } from '@/components/PermissionBtn/index'; import { useMessage } from '@/hooks/web/useMessage'; + const { createConfirm, createMessage } = useMessage(); defineOptions({ name: 'MenuManagement' }); const searchInfo = reactive({}); @@ -107,9 +108,9 @@ const data = await deleteButton(query); if (data) { reload(); - return createMessage.success('成功'); + createMessage.success('成功'); } else { - return createMessage.error('失败'); + createMessage.error('失败'); } }, }); diff --git a/src/views/demo/system/menu/menu.data.ts b/src/views/demo/system/menu/menu.data.ts index 0e7026d8..fe36fd3f 100644 --- a/src/views/demo/system/menu/menu.data.ts +++ b/src/views/demo/system/menu/menu.data.ts @@ -16,7 +16,20 @@ export const columns: BasicColumn[] = [ title: '排序', dataIndex: 'sort', }, - + { + title: '样式', + dataIndex: 'class', + }, + { + title: '状态', + dataIndex: 'enabledMark', + width: 80, + customRender: ({ record }) => { + const color = record.status == 1 ? 'blue' : 'red'; + const text = record.status == 1 ? '启用' : '停用'; + return h(Tag, { color: color }, () => text); + }, + }, ]; const isDir = (type: string) => type === '0'; @@ -51,7 +64,7 @@ export const formSchema: FormSchema[] = [ field: 'id', label: '名称', component: 'Input', - ifShow:false + ifShow: false, }, { field: 'name', @@ -143,16 +156,15 @@ export const formSchema: FormSchema[] = [ }, { field: 'status', - label: '是否系统', + label: '是否启用', component: 'RadioButtonGroup', defaultValue: 1, componentProps: { options: [ - { label: '是', value: 0 }, - { label: '否', value: 1 }, + { label: '否', value: 0 }, + { label: '是', value: 1 }, ], }, - ifShow: ({ values }) => !isButton(values.type), }, // { // field: 'isExt', diff --git a/src/views/demo/workflow/h5/audit.vue b/src/views/demo/workflow/h5/audit.vue index 00d858b1..064de339 100644 --- a/src/views/demo/workflow/h5/audit.vue +++ b/src/views/demo/workflow/h5/audit.vue @@ -257,6 +257,8 @@ designerData.task = data.task; let content = JSON.parse(data.scheme.content); let wfData = content.wfData; + flowWfDataStore.setWfDataAll(wfData); + const currentNode = wfData.find((t) => t.type == 'bpmn:StartEvent'); if (currentNode.authFields.length > 0) { formVisble.value = true; diff --git a/src/views/demo/workflow/h5/scheme.vue b/src/views/demo/workflow/h5/scheme.vue index be7b87e6..e1d3cf8e 100644 --- a/src/views/demo/workflow/h5/scheme.vue +++ b/src/views/demo/workflow/h5/scheme.vue @@ -16,7 +16,7 @@ >关闭 - // scheme_preview?code=tset0411 import { h, ref, reactive } from 'vue'; - import { ProcessDesigner } from '@/components/ProcessDesigner/page'; + import { ProcessDesignerPage } from '@/components/ProcessDesigner/page'; import { SaveOutlined, CloseCircleOutlined } from '@ant-design/icons-vue'; import { postAdd, update } from '@/api/sys/WFSchemeInfo'; import { useMessage } from '@/hooks/web/useMessage';