fix:解决打包问题
Showing
3 changed files
with
151 additions
and
0 deletions
| ... | @@ -17,6 +17,7 @@ declare module '@vue/runtime-core' { | ... | @@ -17,6 +17,7 @@ declare module '@vue/runtime-core' { |
| 17 | Copyright: typeof import('./src/components/Copyright/index.vue')['default'] | 17 | Copyright: typeof import('./src/components/Copyright/index.vue')['default'] |
| 18 | Day: typeof import('./src/components/Schedule/component/day.vue')['default'] | 18 | Day: typeof import('./src/components/Schedule/component/day.vue')['default'] |
| 19 | Dialog: typeof import('./src/components/Dialog/index.vue')['default'] | 19 | Dialog: typeof import('./src/components/Dialog/index.vue')['default'] |
| 20 | Dialog_approval: typeof import('./src/components/ApprovalProcess/dialog_approval.vue')['default'] | ||
| 20 | Dialog_form: typeof import('./src/components/Dialog/dialog_form.vue')['default'] | 21 | Dialog_form: typeof import('./src/components/Dialog/dialog_form.vue')['default'] |
| 21 | Dialog_grid: typeof import('./src/components/Dialog/dialog_grid.vue')['default'] | 22 | Dialog_grid: typeof import('./src/components/Dialog/dialog_grid.vue')['default'] |
| 22 | Dialog_pane: typeof import('./src/components/Dialog/dialog_pane.vue')['default'] | 23 | Dialog_pane: typeof import('./src/components/Dialog/dialog_pane.vue')['default'] | ... | ... |
| 1 | <script lang="ts" setup name="DialogApproval"> | ||
| 2 | import { TableColumnWidth } from '@/utils/enum'; | ||
| 3 | import { | ||
| 4 | getCrossDetailList, | ||
| 5 | crossPlatformApprove | ||
| 6 | } from '@/api/modules/workFlowService'; | ||
| 7 | |||
| 8 | const { proxy } = getCurrentInstance() as any; | ||
| 9 | |||
| 10 | const emits = defineEmits([ | ||
| 11 | "dialogCancel" | ||
| 12 | ]); | ||
| 13 | |||
| 14 | const props = defineProps({ | ||
| 15 | visible: { | ||
| 16 | type: Boolean, | ||
| 17 | default: false | ||
| 18 | }, | ||
| 19 | currentRowInfo: { | ||
| 20 | type: Object, | ||
| 21 | default: { | ||
| 22 | } | ||
| 23 | }, | ||
| 24 | isBizGuid: { | ||
| 25 | type: Boolean, | ||
| 26 | default: false | ||
| 27 | } | ||
| 28 | }) | ||
| 29 | |||
| 30 | const dialogInfo = ref({ | ||
| 31 | visible: false, | ||
| 32 | size: 700, | ||
| 33 | direction: "column", | ||
| 34 | header: { | ||
| 35 | title: "主平台审批节点", | ||
| 36 | }, | ||
| 37 | footer: { | ||
| 38 | visible: false | ||
| 39 | } | ||
| 40 | }); | ||
| 41 | |||
| 42 | watch(() => props.visible, () => { | ||
| 43 | dialogInfo.value.visible = props.visible; | ||
| 44 | if (props.visible) { | ||
| 45 | isReSubmit.value = false; | ||
| 46 | tableInfo.value.data = []; | ||
| 47 | tableInfo.value.actionInfo.show = props.currentRowInfo?.crossPlatformApproveState == 'E'; | ||
| 48 | gettableList(); | ||
| 49 | } | ||
| 50 | }, { | ||
| 51 | immediate: true | ||
| 52 | }) | ||
| 53 | |||
| 54 | /** 获取版本信息数据 */ | ||
| 55 | const gettableList = () => { | ||
| 56 | tableInfo.value.loading = true; | ||
| 57 | getCrossDetailList({ | ||
| 58 | pageIndex: 1, | ||
| 59 | pageSize: -1, | ||
| 60 | bizGuid: props.isBizGuid ? props.currentRowInfo.bizGuid : props.currentRowInfo.guid | ||
| 61 | }).then((res: any) => { | ||
| 62 | tableInfo.value.loading = false; | ||
| 63 | if (res.code == proxy.$passCode) { | ||
| 64 | const data = res.data || []; | ||
| 65 | tableInfo.value.data = data?.map(d => { | ||
| 66 | d.approveState = d.approveState == null ? undefined : d.approveState; | ||
| 67 | return d; | ||
| 68 | }); | ||
| 69 | tableInfo.value.actionInfo.show = tableInfo.value.data?.[0] && data?.[0]?.approveState == 'E'; | ||
| 70 | } else { | ||
| 71 | proxy.$ElMessage.error(res.msg); | ||
| 72 | } | ||
| 73 | }) | ||
| 74 | } | ||
| 75 | |||
| 76 | const isReSubmit = ref(false); | ||
| 77 | |||
| 78 | const tableInfo = ref({ | ||
| 79 | id: 'approval-table', | ||
| 80 | loading: false, | ||
| 81 | minPanelHeight: "60px", | ||
| 82 | minHeight: "60px", | ||
| 83 | fields: [ | ||
| 84 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center", fixed: "left" }, | ||
| 85 | { | ||
| 86 | label: "节点", field: "processName", width: 90 | ||
| 87 | }, | ||
| 88 | { label: "处理对象", field: "operator", width: TableColumnWidth.USERNAME }, | ||
| 89 | { label: "操作时间", field: "operatingTime", width: TableColumnWidth.DATETIME, }, | ||
| 90 | { | ||
| 91 | label: "审批状态", field: "approveState", width: 120, type: 'tag', align: 'center' | ||
| 92 | }, | ||
| 93 | { label: "审批原因", field: "approveSuggest", width: TableColumnWidth.DESCRIPTION }, | ||
| 94 | ], | ||
| 95 | data: [], | ||
| 96 | showPage: false, | ||
| 97 | actionInfo: { | ||
| 98 | show: props.currentRowInfo?.crossPlatformApproveState == 'E', | ||
| 99 | label: "操作", | ||
| 100 | type: "btn", | ||
| 101 | width: 100, | ||
| 102 | btns: [{ | ||
| 103 | label: '重新发起', | ||
| 104 | click: (scope) => { | ||
| 105 | tableInfo.value.loading = true; | ||
| 106 | crossPlatformApprove({ approveGuid: props.currentRowInfo.approveVO.approveGuid, guid: props.isBizGuid ? props.currentRowInfo.bizGuid : props.currentRowInfo.guid }).then((res: any) => { | ||
| 107 | tableInfo.value.loading = false; | ||
| 108 | if (res.code == proxy.$passCode) { | ||
| 109 | proxy.$ElMessage({ | ||
| 110 | type: "success", | ||
| 111 | message: '重新发起成功', | ||
| 112 | }); | ||
| 113 | gettableList(); | ||
| 114 | isReSubmit.value = true; | ||
| 115 | } else { | ||
| 116 | proxy.$ElMessage({ | ||
| 117 | type: "error", | ||
| 118 | message: res.msg, | ||
| 119 | }); | ||
| 120 | } | ||
| 121 | }) | ||
| 122 | } | ||
| 123 | }] | ||
| 124 | } | ||
| 125 | }); | ||
| 126 | |||
| 127 | const handleDialogCancel = () => { | ||
| 128 | dialogInfo.value.visible = false; | ||
| 129 | emits("dialogCancel", isReSubmit.value); | ||
| 130 | } | ||
| 131 | |||
| 132 | </script> | ||
| 133 | |||
| 134 | <template> | ||
| 135 | <el-dialog v-model="dialogInfo.visible" :title="dialogInfo.header.title" width="700" :modal="true" | ||
| 136 | :close-on-click-modal="true" destroy-on-close align-center @close="handleDialogCancel"> | ||
| 137 | <Table ref="tableRef" :tableInfo="tableInfo" class="approval-table" /> | ||
| 138 | </el-dialog> | ||
| 139 | </template> | ||
| 140 | |||
| 141 | <style lang="scss" scoped> | ||
| 142 | .approval-table { | ||
| 143 | height: 180px !important; | ||
| 144 | } | ||
| 145 | |||
| 146 | :deep(.cusror-inherit) { | ||
| 147 | cursor: inherit; | ||
| 148 | } | ||
| 149 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -17,6 +17,7 @@ declare module '@vue/runtime-core' { | ... | @@ -17,6 +17,7 @@ declare module '@vue/runtime-core' { |
| 17 | Copyright: typeof import('./../components/Copyright/index.vue')['default'] | 17 | Copyright: typeof import('./../components/Copyright/index.vue')['default'] |
| 18 | Day: typeof import('./../components/Schedule/component/day.vue')['default'] | 18 | Day: typeof import('./../components/Schedule/component/day.vue')['default'] |
| 19 | Dialog: typeof import('./../components/Dialog/index.vue')['default'] | 19 | Dialog: typeof import('./../components/Dialog/index.vue')['default'] |
| 20 | Dialog_approval: typeof import('./../components/ApprovalProcess/dialog_approval.vue')['default'] | ||
| 20 | Dialog_form: typeof import('./../components/Dialog/dialog_form.vue')['default'] | 21 | Dialog_form: typeof import('./../components/Dialog/dialog_form.vue')['default'] |
| 21 | Dialog_grid: typeof import('./../components/Dialog/dialog_grid.vue')['default'] | 22 | Dialog_grid: typeof import('./../components/Dialog/dialog_grid.vue')['default'] |
| 22 | Dialog_pane: typeof import('./../components/Dialog/dialog_pane.vue')['default'] | 23 | Dialog_pane: typeof import('./../components/Dialog/dialog_pane.vue')['default'] | ... | ... |
-
Please register or sign in to post a comment