工作流路由重构
This commit is contained in:
		| @ -65,7 +65,9 @@ | |||||||
|         <!-- <el-table-column label="变更费用估算" align="center" prop="costEstimation" /> --> |         <!-- <el-table-column label="变更费用估算" align="center" prop="costEstimation" /> --> | ||||||
|         <el-table-column label="变更文件" align="center"> |         <el-table-column label="变更文件" align="center"> | ||||||
|           <template #default="scope"> |           <template #default="scope"> | ||||||
|             <span v-if="scope.row.file" style="color: rgb(41 145 255); cursor: pointer" @click="onOpen(scope.row.file.url)"> {{ scope.row.file.originalName }}</span> |             <span v-if="scope.row.file" style="color: rgb(41 145 255); cursor: pointer" @click="onOpen(scope.row.file.url)"> | ||||||
|  |               {{ scope.row.file.originalName }}</span | ||||||
|  |             > | ||||||
|           </template> |           </template> | ||||||
|         </el-table-column> |         </el-table-column> | ||||||
|         <el-table-column label="流程状态" align="center" prop="status"> |         <el-table-column label="流程状态" align="center" prop="status"> | ||||||
| @ -99,7 +101,7 @@ | |||||||
|  |  | ||||||
| <script setup name="DesignChange" lang="ts"> | <script setup name="DesignChange" lang="ts"> | ||||||
| import { listDesignChange, delDesignChange } from '@/api/design/designChange'; | import { listDesignChange, delDesignChange } from '@/api/design/designChange'; | ||||||
| import { DesignChangeVO, } from '@/api/design/designChange/types'; | import { DesignChangeVO } from '@/api/design/designChange/types'; | ||||||
| import { useUserStoreHook } from '@/store/modules/user'; | import { useUserStoreHook } from '@/store/modules/user'; | ||||||
| import wordDetial from '@/components/wordDetial/index'; | import wordDetial from '@/components/wordDetial/index'; | ||||||
|  |  | ||||||
| @ -134,7 +136,7 @@ const data = reactive({ | |||||||
|     changeReason: undefined, |     changeReason: undefined, | ||||||
|     status: undefined, |     status: undefined, | ||||||
|     params: {} |     params: {} | ||||||
|   }, |   } | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const { queryParams } = toRefs(data); | const { queryParams } = toRefs(data); | ||||||
| @ -171,7 +173,7 @@ const handleSelectionChange = (selection: DesignChangeVO[]) => { | |||||||
| const handleAdd = () => { | const handleAdd = () => { | ||||||
|   proxy.$tab.closePage(proxy.$route); |   proxy.$tab.closePage(proxy.$route); | ||||||
|   proxy.$router.push({ |   proxy.$router.push({ | ||||||
|     path: `/workflows/designChange/indexEdit`, |     path: `/test/designChange/indexEdit`, | ||||||
|     query: { |     query: { | ||||||
|       type: 'add' |       type: 'add' | ||||||
|     } |     } | ||||||
| @ -182,7 +184,7 @@ const handleAdd = () => { | |||||||
| const handleUpdate = async (row?: DesignChangeVO) => { | const handleUpdate = async (row?: DesignChangeVO) => { | ||||||
|   proxy.$tab.closePage(proxy.$route); |   proxy.$tab.closePage(proxy.$route); | ||||||
|   proxy.$router.push({ |   proxy.$router.push({ | ||||||
|     path: `/workflows/designChange/indexEdit`, |     path: `/test/designChange/indexEdit`, | ||||||
|     query: { |     query: { | ||||||
|       id: row.id, |       id: row.id, | ||||||
|       type: 'update' |       type: 'update' | ||||||
| @ -193,7 +195,7 @@ const handleUpdate = async (row?: DesignChangeVO) => { | |||||||
| const handleViewInfo = (row) => { | const handleViewInfo = (row) => { | ||||||
|   proxy.$tab.closePage(proxy.$route); |   proxy.$tab.closePage(proxy.$route); | ||||||
|   proxy.$router.push({ |   proxy.$router.push({ | ||||||
|     path: `/workflows/designChange/indexEdit`, |     path: `/test/designChange/indexEdit`, | ||||||
|     query: { |     query: { | ||||||
|       id: row.id, |       id: row.id, | ||||||
|       type: 'view' |       type: 'view' | ||||||
|  | |||||||
| @ -88,7 +88,7 @@ | |||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script setup name="Drawing" lang="ts"> | <script setup name="Drawing" lang="ts"> | ||||||
| import { listDrawing,delDrawing, } from '@/api/design/drawing'; | import { listDrawing, delDrawing } from '@/api/design/drawing'; | ||||||
| import { DrawingVO } from '@/api/design/drawing/types'; | import { DrawingVO } from '@/api/design/drawing/types'; | ||||||
| import { useUserStoreHook } from '@/store/modules/user'; | import { useUserStoreHook } from '@/store/modules/user'; | ||||||
| import { LeaveVO } from '@/api/workflow/leave/types'; | import { LeaveVO } from '@/api/workflow/leave/types'; | ||||||
| @ -124,7 +124,7 @@ const data = reactive({ | |||||||
|     originalName: undefined, |     originalName: undefined, | ||||||
|     newest: undefined, |     newest: undefined, | ||||||
|     params: {} |     params: {} | ||||||
|   }, |   } | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const { queryParams } = toRefs(data); | const { queryParams } = toRefs(data); | ||||||
| @ -161,7 +161,7 @@ const handleSelectionChange = (selection: DrawingVO[]) => { | |||||||
| const handleAdd = () => { | const handleAdd = () => { | ||||||
|   proxy.$tab.closePage(proxy.$route); |   proxy.$tab.closePage(proxy.$route); | ||||||
|   proxy.$router.push({ |   proxy.$router.push({ | ||||||
|     path: `/workflows/drawing/indexEdit`, |     path: `/test/drawing/indexEdit`, | ||||||
|     query: { |     query: { | ||||||
|       type: 'add' |       type: 'add' | ||||||
|     } |     } | ||||||
| @ -172,7 +172,7 @@ const handleAdd = () => { | |||||||
| const handleUpdate = async (row?: DrawingVO) => { | const handleUpdate = async (row?: DrawingVO) => { | ||||||
|   proxy.$tab.closePage(proxy.$route); |   proxy.$tab.closePage(proxy.$route); | ||||||
|   proxy.$router.push({ |   proxy.$router.push({ | ||||||
|     path: `/workflows/drawing/indexEdit`, |     path: `/test/drawing/indexEdit`, | ||||||
|     query: { |     query: { | ||||||
|       id: row.id, |       id: row.id, | ||||||
|       type: 'update' |       type: 'update' | ||||||
| @ -198,7 +198,7 @@ const handleView = (row) => { | |||||||
| const handleViewInfo = (row?: LeaveVO) => { | const handleViewInfo = (row?: LeaveVO) => { | ||||||
|   proxy.$tab.closePage(proxy.$route); |   proxy.$tab.closePage(proxy.$route); | ||||||
|   proxy.$router.push({ |   proxy.$router.push({ | ||||||
|     path: `/workflows/drawing/indexEdit`, |     path: `/test/drawing/indexEdit`, | ||||||
|     query: { |     query: { | ||||||
|       id: row.id, |       id: row.id, | ||||||
|       type: 'view' |       type: 'view' | ||||||
|  | |||||||
| @ -115,7 +115,7 @@ const data = reactive({ | |||||||
|     originalName: undefined, |     originalName: undefined, | ||||||
|     status: undefined, |     status: undefined, | ||||||
|     params: {} |     params: {} | ||||||
|   }, |   } | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const { queryParams } = toRefs(data); | const { queryParams } = toRefs(data); | ||||||
| @ -152,7 +152,7 @@ const handleSelectionChange = (selection: SpecialSchemeVO[]) => { | |||||||
| const handleAdd = () => { | const handleAdd = () => { | ||||||
|   proxy.$tab.closePage(proxy.$route); |   proxy.$tab.closePage(proxy.$route); | ||||||
|   proxy.$router.push({ |   proxy.$router.push({ | ||||||
|     path: `/workflows/specialScheme/indexEdit`, |     path: `/test/specialScheme/indexEdit`, | ||||||
|     query: { |     query: { | ||||||
|       type: 'add' |       type: 'add' | ||||||
|     } |     } | ||||||
| @ -163,7 +163,7 @@ const handleAdd = () => { | |||||||
| const handleUpdate = async (row?: SpecialSchemeVO) => { | const handleUpdate = async (row?: SpecialSchemeVO) => { | ||||||
|   proxy.$tab.closePage(proxy.$route); |   proxy.$tab.closePage(proxy.$route); | ||||||
|   proxy.$router.push({ |   proxy.$router.push({ | ||||||
|     path: `/workflows/specialScheme/indexEdit`, |     path: `/test/specialScheme/indexEdit`, | ||||||
|     query: { |     query: { | ||||||
|       id: row.id, |       id: row.id, | ||||||
|       type: 'update' |       type: 'update' | ||||||
| @ -186,7 +186,7 @@ const handleView = (row) => { | |||||||
| const handleViewInfo = (row) => { | const handleViewInfo = (row) => { | ||||||
|   proxy.$tab.closePage(proxy.$route); |   proxy.$tab.closePage(proxy.$route); | ||||||
|   proxy.$router.push({ |   proxy.$router.push({ | ||||||
|     path: `/workflows/specialScheme/indexEdit`, |     path: `/test/specialScheme/indexEdit`, | ||||||
|     query: { |     query: { | ||||||
|       id: row.id, |       id: row.id, | ||||||
|       type: 'view' |       type: 'view' | ||||||
|  | |||||||
| @ -167,7 +167,7 @@ const handleSelectionChange = (selection: LeaveVO[]) => { | |||||||
| const handleAdd = () => { | const handleAdd = () => { | ||||||
|   proxy.$tab.closePage(proxy.$route); |   proxy.$tab.closePage(proxy.$route); | ||||||
|   proxy.$router.push({ |   proxy.$router.push({ | ||||||
|     path: `/workflows/leaveEdit/index`, |     path: `/test/leaveEdit/index`, | ||||||
|     query: { |     query: { | ||||||
|       type: 'add' |       type: 'add' | ||||||
|     } |     } | ||||||
| @ -178,7 +178,7 @@ const handleAdd = () => { | |||||||
| const handleUpdate = (row?: LeaveVO) => { | const handleUpdate = (row?: LeaveVO) => { | ||||||
|   proxy.$tab.closePage(proxy.$route); |   proxy.$tab.closePage(proxy.$route); | ||||||
|   proxy.$router.push({ |   proxy.$router.push({ | ||||||
|     path: `/workflows/leaveEdit/index`, |     path: `/test/leaveEdit/index`, | ||||||
|     query: { |     query: { | ||||||
|       id: row.id, |       id: row.id, | ||||||
|       type: 'update' |       type: 'update' | ||||||
| @ -190,7 +190,7 @@ const handleUpdate = (row?: LeaveVO) => { | |||||||
| const handleView = (row?: LeaveVO) => { | const handleView = (row?: LeaveVO) => { | ||||||
|   proxy.$tab.closePage(proxy.$route); |   proxy.$tab.closePage(proxy.$route); | ||||||
|   proxy.$router.push({ |   proxy.$router.push({ | ||||||
|     path: `/workflows/leaveEdit/index`, |     path: `/test/leaveEdit/index`, | ||||||
|     query: { |     query: { | ||||||
|       id: row.id, |       id: row.id, | ||||||
|       type: 'view' |       type: 'view' | ||||||
| @ -210,7 +210,7 @@ const handleDelete = async (row?: LeaveVO) => { | |||||||
| /** 导出按钮操作 */ | /** 导出按钮操作 */ | ||||||
| const handleExport = () => { | const handleExport = () => { | ||||||
|   proxy?.download( |   proxy?.download( | ||||||
|     'workflows/leave/export', |     'workflow/leave/export', | ||||||
|     { |     { | ||||||
|       ...queryParams.value |       ...queryParams.value | ||||||
|     }, |     }, | ||||||
|  | |||||||
| @ -30,7 +30,7 @@ const open = async (definitionId, disabled) => { | |||||||
| }; | }; | ||||||
| /** 关闭按钮 */ | /** 关闭按钮 */ | ||||||
| function close() { | function close() { | ||||||
|   const obj = { path: '/workflows/processDefinition', query: { activeName: proxy.$route.query.activeName } }; |   const obj = { path: '/test/test/processDefinition', query: { activeName: proxy.$route.query.activeName } }; | ||||||
|   proxy.$tab.closeOpenPage(obj); |   proxy.$tab.closeOpenPage(obj); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | |||||||
| @ -442,7 +442,7 @@ const handlerImportDefinition = (data: UploadRequestOptions): XMLHttpRequest => | |||||||
|  */ |  */ | ||||||
| const design = async (row: FlowDefinitionVo) => { | const design = async (row: FlowDefinitionVo) => { | ||||||
|   proxy.$router.push({ |   proxy.$router.push({ | ||||||
|     path: `/workflows/design/index`, |     path: `/test/design/index`, | ||||||
|     query: { |     query: { | ||||||
|       definitionId: row.id, |       definitionId: row.id, | ||||||
|       disabled: false, |       disabled: false, | ||||||
| @ -456,7 +456,7 @@ const design = async (row: FlowDefinitionVo) => { | |||||||
|  * @param row |  * @param row | ||||||
|  */ |  */ | ||||||
| const designView = async (row: FlowDefinitionVo) => { | const designView = async (row: FlowDefinitionVo) => { | ||||||
|   proxy.$tab.openPage(`/workflows/design/index`, '', { |   proxy.$tab.openPage(`/test/design/index`, '', { | ||||||
|     definitionId: row.id, |     definitionId: row.id, | ||||||
|     disabled: true, |     disabled: true, | ||||||
|     activeName: activeName.value |     activeName: activeName.value | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user