Commit 6e12fa4d789d232a890ab06251cba1c553afba5a
1 parent
5df6addb
fix: some warn
Showing
24 changed files
with
81 additions
and
117 deletions
yudao-ui-admin-vue3/src/api/bpm/model/index.ts
yudao-ui-admin-vue3/src/components/XTable/src/XTable.vue
| ... | ... | @@ -5,7 +5,7 @@ |
| 5 | 5 | </template> |
| 6 | 6 | </VxeGrid> |
| 7 | 7 | </template> |
| 8 | -<script lang="ts" setup name="XTable"> | |
| 8 | +<script setup lang="ts" name="XTable"> | |
| 9 | 9 | import { PropType } from 'vue' |
| 10 | 10 | import { SizeType, VxeGridInstance } from 'vxe-table' |
| 11 | 11 | import { useAppStore } from '@/store/modules/app' | ... | ... |
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/listeners/UserTaskListeners.vue
| ... | ... | @@ -287,7 +287,7 @@ |
| 287 | 287 | </el-dialog> |
| 288 | 288 | </div> |
| 289 | 289 | </template> |
| 290 | -<script lang="ts" setup name="UserTaskListeners"> | |
| 290 | +<script setup lang="ts" name="UserTaskListeners"> | |
| 291 | 291 | import { ElMessageBox } from 'element-plus' |
| 292 | 292 | import { createListenerObject, updateElementExtensions } from '../../utils' |
| 293 | 293 | import { initListenerForm, initListenerType, eventType, listenerType, fieldType } from './utilSelf' | ... | ... |
yudao-ui-admin-vue3/src/views/Error/403.vue
yudao-ui-admin-vue3/src/views/Error/404.vue
yudao-ui-admin-vue3/src/views/Error/500.vue
yudao-ui-admin-vue3/src/views/bpm/definition/definition.data.ts
| 1 | -import { reactive } from 'vue' | |
| 2 | -import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas' | |
| 3 | - | |
| 4 | -import { DICT_TYPE } from '@/utils/dict' | |
| 1 | +import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' | |
| 5 | 2 | |
| 6 | 3 | // CrudSchema |
| 7 | 4 | const crudSchemas = reactive<VxeCrudSchema>({ | ... | ... |
yudao-ui-admin-vue3/src/views/bpm/definition/index.vue
| ... | ... | @@ -46,20 +46,16 @@ |
| 46 | 46 | </ContentWrap> |
| 47 | 47 | </template> |
| 48 | 48 | <script setup lang="ts"> |
| 49 | -// 全局相关的 import | |
| 50 | -import { ref } from 'vue' | |
| 51 | - | |
| 52 | 49 | // 业务相关的 import |
| 53 | 50 | import * as DefinitionApi from '@/api/bpm/definition' |
| 54 | 51 | // import * as ModelApi from '@/api/bpm/model' |
| 55 | 52 | import { allSchemas } from './definition.data' |
| 53 | +import { setConfAndFields2 } from '@/utils/formCreate' | |
| 56 | 54 | |
| 57 | 55 | const message = useMessage() // 消息弹窗 |
| 58 | 56 | const router = useRouter() // 路由 |
| 59 | 57 | const { query } = useRoute() // 查询参数 |
| 60 | 58 | |
| 61 | -import { setConfAndFields2 } from '@/utils/formCreate' | |
| 62 | - | |
| 63 | 59 | // ========== 列表相关 ========== |
| 64 | 60 | const queryParams = reactive({ |
| 65 | 61 | key: query.key | ... | ... |
yudao-ui-admin-vue3/src/views/bpm/form/form.data.ts
yudao-ui-admin-vue3/src/views/bpm/form/index.vue
| 1 | 1 | <template> |
| 2 | 2 | <ContentWrap> |
| 3 | 3 | <!-- 列表 --> |
| 4 | - <div> | |
| 5 | - <XTable @register="registerTable"> | |
| 6 | - <!-- 操作:新增 --> | |
| 7 | - <template #toolbar_buttons> | |
| 8 | - <XButton | |
| 9 | - type="primary" | |
| 10 | - preIcon="ep:zoom-in" | |
| 11 | - :title="t('action.add')" | |
| 12 | - v-hasPermi="['system:post:create']" | |
| 13 | - @click="handleCreate()" | |
| 14 | - /> | |
| 15 | - </template> | |
| 16 | - <template #actionbtns_default="{ row }"> | |
| 17 | - <!-- 操作:修改 --> | |
| 18 | - <XTextButton | |
| 19 | - preIcon="ep:edit" | |
| 20 | - :title="t('action.edit')" | |
| 21 | - v-hasPermi="['bpm:form:update']" | |
| 22 | - @click="handleUpdate(row.id)" | |
| 23 | - /> | |
| 24 | - <!-- 操作:详情 --> | |
| 25 | - <XTextButton | |
| 26 | - preIcon="ep:view" | |
| 27 | - :title="t('action.detail')" | |
| 28 | - v-hasPermi="['bpm:form:query']" | |
| 29 | - @click="handleDetail(row.id)" | |
| 30 | - /> | |
| 31 | - <!-- 操作:删除 --> | |
| 32 | - <XTextButton | |
| 33 | - preIcon="ep:delete" | |
| 34 | - :title="t('action.del')" | |
| 35 | - v-hasPermi="['bpm:form:delete']" | |
| 36 | - @click="deleteData(row.id)" | |
| 37 | - /> | |
| 38 | - </template> | |
| 39 | - </XTable> | |
| 40 | - <!-- 表单详情的弹窗 --> | |
| 41 | - <XModal v-model="detailOpen" width="800" title="表单详情"> | |
| 42 | - <form-create :rule="detailPreview.rule" :option="detailPreview.option" v-if="detailOpen" /> | |
| 43 | - </XModal> | |
| 44 | - </div> | |
| 4 | + <XTable @register="registerTable"> | |
| 5 | + <!-- 操作:新增 --> | |
| 6 | + <template #toolbar_buttons> | |
| 7 | + <XButton | |
| 8 | + type="primary" | |
| 9 | + preIcon="ep:zoom-in" | |
| 10 | + :title="t('action.add')" | |
| 11 | + v-hasPermi="['system:post:create']" | |
| 12 | + @click="handleCreate()" | |
| 13 | + /> | |
| 14 | + </template> | |
| 15 | + <template #actionbtns_default="{ row }"> | |
| 16 | + <!-- 操作:修改 --> | |
| 17 | + <XTextButton | |
| 18 | + preIcon="ep:edit" | |
| 19 | + :title="t('action.edit')" | |
| 20 | + v-hasPermi="['bpm:form:update']" | |
| 21 | + @click="handleUpdate(row.id)" | |
| 22 | + /> | |
| 23 | + <!-- 操作:详情 --> | |
| 24 | + <XTextButton | |
| 25 | + preIcon="ep:view" | |
| 26 | + :title="t('action.detail')" | |
| 27 | + v-hasPermi="['bpm:form:query']" | |
| 28 | + @click="handleDetail(row.id)" | |
| 29 | + /> | |
| 30 | + <!-- 操作:删除 --> | |
| 31 | + <XTextButton | |
| 32 | + preIcon="ep:delete" | |
| 33 | + :title="t('action.del')" | |
| 34 | + v-hasPermi="['bpm:form:delete']" | |
| 35 | + @click="deleteData(row.id)" | |
| 36 | + /> | |
| 37 | + </template> | |
| 38 | + </XTable> | |
| 39 | + <!-- 表单详情的弹窗 --> | |
| 40 | + <XModal v-model="detailOpen" width="800" title="表单详情"> | |
| 41 | + <form-create :rule="detailPreview.rule" :option="detailPreview.option" v-if="detailOpen" /> | |
| 42 | + </XModal> | |
| 45 | 43 | </ContentWrap> |
| 46 | 44 | </template> |
| 47 | 45 | |
| 48 | 46 | <script setup lang="ts" name="BpmForm"> |
| 49 | -// 全局相关的 import | |
| 50 | 47 | // 业务相关的 import |
| 51 | 48 | import * as FormApi from '@/api/bpm/form' |
| 52 | 49 | import { allSchemas } from './form.data' |
| ... | ... | @@ -54,7 +51,7 @@ import { allSchemas } from './form.data' |
| 54 | 51 | import { setConfAndFields2 } from '@/utils/formCreate' |
| 55 | 52 | |
| 56 | 53 | const { t } = useI18n() // 国际化 |
| 57 | -const router = useRouter() // 路由 | |
| 54 | +const { push } = useRouter() // 路由 | |
| 58 | 55 | |
| 59 | 56 | // 列表相关的变量 |
| 60 | 57 | const [registerTable, { deleteData }] = useXTable({ |
| ... | ... | @@ -65,14 +62,14 @@ const [registerTable, { deleteData }] = useXTable({ |
| 65 | 62 | |
| 66 | 63 | // 新增操作 |
| 67 | 64 | const handleCreate = () => { |
| 68 | - router.push({ | |
| 65 | + push({ | |
| 69 | 66 | name: 'bpmFormEditor' |
| 70 | 67 | }) |
| 71 | 68 | } |
| 72 | 69 | |
| 73 | 70 | // 修改操作 |
| 74 | 71 | const handleUpdate = async (rowId: number) => { |
| 75 | - await router.push({ | |
| 72 | + await push({ | |
| 76 | 73 | name: 'bpmFormEditor', |
| 77 | 74 | query: { |
| 78 | 75 | id: rowId | ... | ... |
yudao-ui-admin-vue3/src/views/bpm/group/group.data.ts
yudao-ui-admin-vue3/src/views/bpm/model/model.data.ts
| 1 | -import { reactive } from 'vue' | |
| 2 | -import { useI18n } from '@/hooks/web/useI18n' | |
| 3 | -import { required } from '@/utils/formRules' | |
| 4 | -import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas' | |
| 1 | +import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' | |
| 5 | 2 | |
| 6 | -import { DICT_TYPE } from '@/utils/dict' | |
| 7 | 3 | const { t } = useI18n() // 国际化 |
| 8 | 4 | |
| 9 | 5 | // 表单校验 | ... | ... |
yudao-ui-admin-vue3/src/views/bpm/model/modelEditor.vue
| ... | ... | @@ -27,7 +27,6 @@ |
| 27 | 27 | </template> |
| 28 | 28 | |
| 29 | 29 | <script setup lang="ts"> |
| 30 | -import { ref, onMounted } from 'vue' | |
| 31 | 30 | // import { translations } from '@/components/bpmnProcessDesigner/src/translations' |
| 32 | 31 | // 自定义元素选中时的弹出菜单(修改 默认任务 为 用户任务) |
| 33 | 32 | import CustomContentPadProvider from '@/components/bpmnProcessDesigner/package/designer/plugins/content-pad' |
| ... | ... | @@ -36,11 +35,10 @@ import CustomPaletteProvider from '@/components/bpmnProcessDesigner/package/desi |
| 36 | 35 | // import xmlObj2json from "./utils/xml2json"; |
| 37 | 36 | // import myProcessDesigner from '@/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue' |
| 38 | 37 | // import MyProcessPalette from '@/components/bpmnProcessDesigner/package/palette/ProcessPalette.vue' |
| 39 | -import { createModelApi, getModelApi, updateModelApi } from '@/api/bpm/model' | |
| 38 | +import { createModelApi, getModelApi, updateModelApi, ModelVO } from '@/api/bpm/model' | |
| 40 | 39 | |
| 41 | -import { useRouter } from 'vue-router' | |
| 42 | -import { ElMessage } from 'element-plus' | |
| 43 | 40 | const router = useRouter() |
| 41 | +const message = useMessage() | |
| 44 | 42 | |
| 45 | 43 | // 自定义侧边栏 |
| 46 | 44 | // import MyProcessPanel from "../package/process-panel/ProcessPanel"; |
| ... | ... | @@ -63,14 +61,14 @@ const controlForm = ref({ |
| 63 | 61 | // CustomPaletteProvider |
| 64 | 62 | // }) |
| 65 | 63 | // 流程模型的信息 |
| 66 | -const model = ref({}) | |
| 64 | +const model = ref<ModelVO>() | |
| 67 | 65 | onMounted(() => { |
| 68 | 66 | // 如果 modelId 非空,说明是修改流程模型 |
| 69 | 67 | const modelId = router.currentRoute.value.query && router.currentRoute.value.query.modelId |
| 70 | 68 | console.log(modelId, 'modelId') |
| 71 | 69 | if (modelId) { |
| 72 | 70 | // let data = '4b4909d8-97e7-11ec-8e20-862bc1a4a054' |
| 73 | - getModelApi(modelId).then((data) => { | |
| 71 | + getModelApi(modelId as unknown as number).then((data) => { | |
| 74 | 72 | console.log(data, 'response') |
| 75 | 73 | xmlString.value = data.bpmnXml |
| 76 | 74 | model.value = { |
| ... | ... | @@ -109,9 +107,9 @@ const initModeler = (item) => { |
| 109 | 107 | } |
| 110 | 108 | |
| 111 | 109 | const save = (bpmnXml) => { |
| 112 | - const data = { | |
| 110 | + const data: ModelVO = { | |
| 113 | 111 | ...model.value, |
| 114 | - bpmnXml: bpmnXml // this.bpmnXml 只是初始化流程图,后续修改无法通过它获得 | |
| 112 | + bpmnXml: bpmnXml // bpmnXml 只是初始化流程图,后续修改无法通过它获得 | |
| 115 | 113 | } |
| 116 | 114 | console.log(data, 'data') |
| 117 | 115 | |
| ... | ... | @@ -119,9 +117,7 @@ const save = (bpmnXml) => { |
| 119 | 117 | if (data.id) { |
| 120 | 118 | updateModelApi(data).then((response) => { |
| 121 | 119 | console.log(response, 'response') |
| 122 | - // this.$modal.msgSuccess("修改成功") | |
| 123 | - ElMessage.success('修改成功') | |
| 124 | - | |
| 120 | + message.success('修改成功') | |
| 125 | 121 | // 跳转回去 |
| 126 | 122 | close() |
| 127 | 123 | }) |
| ... | ... | @@ -130,15 +126,13 @@ const save = (bpmnXml) => { |
| 130 | 126 | // 添加的提交 |
| 131 | 127 | createModelApi(data).then((response) => { |
| 132 | 128 | console.log(response, 'response1') |
| 133 | - // this.$modal.msgSuccess("保存成功") | |
| 134 | - ElMessage.success('保存成功') | |
| 129 | + message.success('保存成功') | |
| 135 | 130 | // 跳转回去 |
| 136 | 131 | close() |
| 137 | 132 | }) |
| 138 | 133 | } |
| 139 | 134 | /** 关闭按钮 */ |
| 140 | 135 | const close = () => { |
| 141 | - // this.$tab.closeOpenPage({ path: "/bpm/manager/model" }) | |
| 142 | 136 | router.push({ path: '/bpm/manager/model' }) |
| 143 | 137 | } |
| 144 | 138 | </script> | ... | ... |
yudao-ui-admin-vue3/src/views/bpm/oa/leave/create.vue
| ... | ... | @@ -21,7 +21,7 @@ import { rules, allSchemas } from './leave.data' |
| 21 | 21 | |
| 22 | 22 | const { t } = useI18n() // 国际化 |
| 23 | 23 | const message = useMessage() // 消息弹窗 |
| 24 | -const router = useRouter() // 路由 | |
| 24 | +const { push } = useRouter() // 路由 | |
| 25 | 25 | |
| 26 | 26 | // 表单参数 |
| 27 | 27 | const actionLoading = ref(false) // 按钮 Loading |
| ... | ... | @@ -41,15 +41,13 @@ const submitForm = async () => { |
| 41 | 41 | const data = unref(formRef)?.formModel as LeaveApi.LeaveVO |
| 42 | 42 | // data.startTime = XEUtils.toDateString(data.startTime, 'yyyy-MM-dd HH:mm:ss') |
| 43 | 43 | // data.endTime = XEUtils.toDateString(data.endTime, 'yyyy-MM-dd HH:mm:ss') |
| 44 | - data.startTime = Date.parse(new Date(data.startTime).toString()) | |
| 45 | - data.endTime = Date.parse(new Date(data.endTime).toString()) | |
| 44 | + data.startTime = Date.parse(new Date(data.startTime).toString()).toString() | |
| 45 | + data.endTime = Date.parse(new Date(data.endTime).toString()).toString() | |
| 46 | 46 | // 添加的提交 |
| 47 | 47 | await LeaveApi.createLeaveApi(data) |
| 48 | 48 | message.success(t('common.createSuccess')) |
| 49 | 49 | // 关闭窗口 |
| 50 | - router.push({ | |
| 51 | - path: '/bpm/oa/leave' | |
| 52 | - }) | |
| 50 | + push('/bpm/oa/leave') | |
| 53 | 51 | } finally { |
| 54 | 52 | actionLoading.value = false |
| 55 | 53 | } | ... | ... |
yudao-ui-admin-vue3/src/views/bpm/oa/leave/detail.vue
yudao-ui-admin-vue3/src/views/bpm/oa/leave/index.vue
| ... | ... | @@ -33,7 +33,7 @@ import * as ProcessInstanceApi from '@/api/bpm/processInstance' |
| 33 | 33 | |
| 34 | 34 | const { t } = useI18n() // 国际化 |
| 35 | 35 | const message = useMessage() // 消息弹窗 |
| 36 | -const router = useRouter() // 路由 | |
| 36 | +const { push } = useRouter() // 路由 | |
| 37 | 37 | |
| 38 | 38 | const [registerTable, { reload }] = useXTable({ |
| 39 | 39 | allSchemas: allSchemas, |
| ... | ... | @@ -42,7 +42,7 @@ const [registerTable, { reload }] = useXTable({ |
| 42 | 42 | |
| 43 | 43 | // 发起请假 |
| 44 | 44 | const handleCreate = () => { |
| 45 | - router.push({ | |
| 45 | + push({ | |
| 46 | 46 | name: 'OALeaveCreate' |
| 47 | 47 | }) |
| 48 | 48 | } |
| ... | ... | @@ -63,7 +63,7 @@ const cancelLeave = (row) => { |
| 63 | 63 | |
| 64 | 64 | // 详情 |
| 65 | 65 | const handleDetail = (row) => { |
| 66 | - router.push({ | |
| 66 | + push({ | |
| 67 | 67 | name: 'OALeaveDetail', |
| 68 | 68 | query: { |
| 69 | 69 | id: row.id |
| ... | ... | @@ -73,7 +73,7 @@ const handleDetail = (row) => { |
| 73 | 73 | |
| 74 | 74 | // 审批进度 |
| 75 | 75 | const handleProcessDetail = (row) => { |
| 76 | - router.push({ | |
| 76 | + push({ | |
| 77 | 77 | name: 'BpmProcessInstanceDetail', |
| 78 | 78 | query: { |
| 79 | 79 | id: row.processInstanceId | ... | ... |
yudao-ui-admin-vue3/src/views/bpm/oa/leave/leave.data.ts
yudao-ui-admin-vue3/src/views/bpm/processInstance/process.create.ts
yudao-ui-admin-vue3/src/views/bpm/processInstance/process.data.ts
| 1 | -import { reactive } from 'vue' | |
| 2 | -import { useI18n } from '@/hooks/web/useI18n' | |
| 3 | -import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas' | |
| 4 | -import { DICT_TYPE } from '@/utils/dict' | |
| 1 | +import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' | |
| 2 | + | |
| 5 | 3 | const { t } = useI18n() // 国际化 |
| 6 | 4 | |
| 7 | 5 | // CrudSchema | ... | ... |
yudao-ui-admin-vue3/src/views/bpm/task/done/done.data.ts
yudao-ui-admin-vue3/src/views/bpm/task/done/index.vue
| ... | ... | @@ -12,13 +12,12 @@ |
| 12 | 12 | </XTable> |
| 13 | 13 | </ContentWrap> |
| 14 | 14 | </template> |
| 15 | - | |
| 16 | 15 | <script setup lang="ts"> |
| 17 | 16 | // 业务相关的 import |
| 18 | 17 | import { allSchemas } from './done.data' |
| 19 | 18 | import * as TaskApi from '@/api/bpm/task' |
| 20 | 19 | |
| 21 | -const router = useRouter() // 路由 | |
| 20 | +const { push } = useRouter() // 路由 | |
| 22 | 21 | |
| 23 | 22 | const [registerTable] = useXTable({ |
| 24 | 23 | allSchemas: allSchemas, |
| ... | ... | @@ -27,7 +26,7 @@ const [registerTable] = useXTable({ |
| 27 | 26 | |
| 28 | 27 | // 处理审批按钮 |
| 29 | 28 | const handleAudit = (row) => { |
| 30 | - router.push({ | |
| 29 | + push({ | |
| 31 | 30 | name: 'BpmProcessInstanceDetail', |
| 32 | 31 | query: { |
| 33 | 32 | id: row.processInstance.id | ... | ... |
yudao-ui-admin-vue3/src/views/bpm/task/todo/index.vue
| ... | ... | @@ -18,7 +18,7 @@ |
| 18 | 18 | import { allSchemas } from './todo.data' |
| 19 | 19 | import * as TaskApi from '@/api/bpm/task' |
| 20 | 20 | |
| 21 | -const router = useRouter() // 路由 | |
| 21 | +const { push } = useRouter() // 路由 | |
| 22 | 22 | |
| 23 | 23 | const [registerTable] = useXTable({ |
| 24 | 24 | allSchemas: allSchemas, |
| ... | ... | @@ -27,7 +27,7 @@ const [registerTable] = useXTable({ |
| 27 | 27 | |
| 28 | 28 | // 处理审批按钮 |
| 29 | 29 | const handleAudit = (row) => { |
| 30 | - router.push({ | |
| 30 | + push({ | |
| 31 | 31 | name: 'BpmProcessInstanceDetail', |
| 32 | 32 | query: { |
| 33 | 33 | id: row.processInstance.id | ... | ... |
yudao-ui-admin-vue3/src/views/bpm/task/todo/todo.data.ts