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