4f6d2e10 by lihua

添加发起失败

1 parent d4bc7e00
...@@ -71,3 +71,10 @@ export const getCrossDetailList = (params) => request({ ...@@ -71,3 +71,10 @@ export const getCrossDetailList = (params) => request({
71 method: 'post', 71 method: 'post',
72 data: params 72 data: params
73 }) 73 })
74
75 /** 重新发起失败的流程 */
76 export const crossPlatformApprove = (params) => request({
77 url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/approve-detail-cross/list`,
78 method: 'post',
79 data: params
80 })
......
1 <script lang="ts" setup name="DialogApproval"> 1 <script lang="ts" setup name="DialogApproval">
2 import { TableColumnWidth } from '@/utils/enum'; 2 import { TableColumnWidth } from '@/utils/enum';
3 import { 3 import {
4 getCrossDetailList 4 getCrossDetailList,
5 crossPlatformApprove
5 } from '@/api/modules/workFlowService'; 6 } from '@/api/modules/workFlowService';
6 7
7 const { proxy } = getCurrentInstance() as any; 8 const { proxy } = getCurrentInstance() as any;
...@@ -38,6 +39,7 @@ watch(() => props.visible, () => { ...@@ -38,6 +39,7 @@ watch(() => props.visible, () => {
38 dialogInfo.value.visible = props.visible; 39 dialogInfo.value.visible = props.visible;
39 if (props.visible) { 40 if (props.visible) {
40 tableInfo.value.data = []; 41 tableInfo.value.data = [];
42 tableInfo.value.actionInfo.show = props.currentRowInfo?.crossPlatformApproveState == 'E';
41 gettableList(); 43 gettableList();
42 } 44 }
43 }, { 45 }, {
...@@ -56,7 +58,7 @@ const gettableList = () => { ...@@ -56,7 +58,7 @@ const gettableList = () => {
56 if (res.code == proxy.$passCode) { 58 if (res.code == proxy.$passCode) {
57 const data = res.data || []; 59 const data = res.data || [];
58 tableInfo.value.data = data?.map(d => { 60 tableInfo.value.data = data?.map(d => {
59 d.approveState = d.approveState == null ? undefined : d.approveState; 61 d.approveState = d.approveState == null ? undefined : d.approveState;
60 return d; 62 return d;
61 }); 63 });
62 } else { 64 } else {
...@@ -65,6 +67,8 @@ const gettableList = () => { ...@@ -65,6 +67,8 @@ const gettableList = () => {
65 }) 67 })
66 } 68 }
67 69
70 const isReSubmit = ref(false);
71
68 const tableInfo = ref({ 72 const tableInfo = ref({
69 id: 'approval-table', 73 id: 'approval-table',
70 loading: false, 74 loading: false,
...@@ -73,32 +77,56 @@ const tableInfo = ref({ ...@@ -73,32 +77,56 @@ const tableInfo = ref({
73 fields: [ 77 fields: [
74 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center", fixed: "left" }, 78 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center", fixed: "left" },
75 { 79 {
76 label: "节点", field: "processName", width: 100 80 label: "节点", field: "processName", width: 90
77 }, 81 },
78 { label: "处理对象", field: "operator", width: TableColumnWidth.USERNAME }, 82 { label: "处理对象", field: "operator", width: TableColumnWidth.USERNAME },
79 { label: "操作时间", field: "operatingTime", width: TableColumnWidth.DATETIME, }, 83 { label: "操作时间", field: "operatingTime", width: TableColumnWidth.DATETIME, },
80 { 84 {
81 label: "审批状态", field: "approveState", width: 120, type: 'tag' 85 label: "审批状态", field: "approveState", width: 120, type: 'tag', align: 'center'
82 }, 86 },
83 { label: "审批原因", field: "approveSuggest", width: TableColumnWidth.DESCRIPTION }, 87 { label: "审批原因", field: "approveSuggest", width: TableColumnWidth.DESCRIPTION },
84 ], 88 ],
85 data: [], 89 data: [],
86 showPage: false, 90 showPage: false,
87 actionInfo: { 91 actionInfo: {
88 show: false 92 show: props.currentRowInfo?.crossPlatformApproveState == 'E',
93 label: "操作",
94 type: "btn",
95 width: 100,
96 btns: [{
97 label: '重新发起',
98 click: (scope) => {
99 tableInfo.value.loading = true;
100 crossPlatformApprove({ approveGuid: props.currentRowInfo.approveVO.approveGuid, guid: props.currentRowInfo.guid }).then((res: any) => {
101 tableInfo.value.loading = false;
102 if (res.code == proxy.$passCode) {
103 proxy.$ElMessage({
104 type: "success",
105 message: '重新发起成功',
106 });
107 isReSubmit.value = true;
108 tableInfo.value.actionInfo.show = false;
109 } else {
110 proxy.$ElMessage({
111 type: "error",
112 message: res.msg,
113 });
114 }
115 })
116 }
117 }]
89 } 118 }
90 }); 119 });
91 120
92 const handleDialogCancel = () => { 121 const handleDialogCancel = () => {
93 dialogInfo.value.visible = false; 122 dialogInfo.value.visible = false;
94 emits("dialogCancel"); 123 emits("dialogCancel", isReSubmit.value);
95 } 124 }
96 125
97 </script> 126 </script>
98 127
99 <template> 128 <template>
100 <!-- 版本信息 --> 129 <el-dialog v-model="dialogInfo.visible" :title="dialogInfo.header.title" width="700" :modal="true"
101 <el-dialog v-model="dialogInfo.visible" :title="dialogInfo.header.title" :width="dialogInfo.size" :modal="true"
102 :close-on-click-modal="true" destroy-on-close align-center @close="handleDialogCancel"> 130 :close-on-click-modal="true" destroy-on-close align-center @close="handleDialogCancel">
103 <Table ref="tableRef" :tableInfo="tableInfo" class="approval-table" /> 131 <Table ref="tableRef" :tableInfo="tableInfo" class="approval-table" />
104 </el-dialog> 132 </el-dialog>
......
...@@ -452,6 +452,7 @@ export const tagType = (row, type): any => { ...@@ -452,6 +452,7 @@ export const tagType = (row, type): any => {
452 case "Y": 452 case "Y":
453 state = 'success' 453 state = 'success'
454 break; 454 break;
455 case "E":
455 case "R": 456 case "R":
456 state = 'danger' 457 state = 'danger'
457 break; 458 break;
...@@ -722,6 +723,9 @@ export const tagMethod = (row, type) => { ...@@ -722,6 +723,9 @@ export const tagMethod = (row, type) => {
722 case "C": 723 case "C":
723 tag = '已撤销' 724 tag = '已撤销'
724 break; 725 break;
726 case "E":
727 tag = '发起失败'
728 break;
725 default: 729 default:
726 tag = type == 'crossPlatformApproveState' ? '未发起' : '--' 730 tag = type == 'crossPlatformApproveState' ? '未发起' : '--'
727 break; 731 break;
......
...@@ -35,8 +35,11 @@ const systemApproveCurrentRowInfo: any = ref({}) ...@@ -35,8 +35,11 @@ const systemApproveCurrentRowInfo: any = ref({})
35 35
36 const approvalDialogVisible = ref(false); 36 const approvalDialogVisible = ref(false);
37 37
38 const handleApprovalDialogCancel = () => { 38 const handleApprovalDialogCancel = (reSubmit) => {
39 approvalDialogVisible.value = false; 39 approvalDialogVisible.value = false;
40 if (reSubmit) {
41 getTableData();
42 }
40 } 43 }
41 44
42 /** 数据来源于该企业申请登记的数据资产已通过且剔除数据质量评价中已通过、审批中的资产。 */ 45 /** 数据来源于该企业申请登记的数据资产已通过且剔除数据质量评价中已通过、审批中的资产。 */
......
...@@ -100,8 +100,11 @@ const systemApproveCurrentRowInfo: any = ref({}) ...@@ -100,8 +100,11 @@ const systemApproveCurrentRowInfo: any = ref({})
100 100
101 const approvalDialogVisible = ref(false); 101 const approvalDialogVisible = ref(false);
102 102
103 const handleApprovalDialogCancel = () => { 103 const handleApprovalDialogCancel = (reSubmit) => {
104 approvalDialogVisible.value = false; 104 approvalDialogVisible.value = false;
105 if (reSubmit) {
106 getTableData();
107 }
105 } 108 }
106 109
107 const tableFields = ref([{ label: "序号", type: "index", width: 56, align: "center" }, 110 const tableFields = ref([{ label: "序号", type: "index", width: 56, align: "center" },
...@@ -143,7 +146,7 @@ const tableFields = ref([{ label: "序号", type: "index", width: 56, align: "ce ...@@ -143,7 +146,7 @@ const tableFields = ref([{ label: "序号", type: "index", width: 56, align: "ce
143 } 146 }
144 }, 147 },
145 { 148 {
146 label: "主平台审批状态", field: "crossPlatformApproveState", type: "approveTagBtn", width: 150, align: 'center', btn: { 149 label: "主平台审批状态", field: "crossPlatformApproveState", type: "approveTagBtn", width: 170, align: 'center', btn: {
147 label: '查看', visible: (scope) => { 150 label: '查看', visible: (scope) => {
148 return scope.row.crossPlatformApproveState != null; 151 return scope.row.crossPlatformApproveState != null;
149 }, click: (scope) => { 152 }, click: (scope) => {
......
...@@ -14,7 +14,6 @@ import { ...@@ -14,7 +14,6 @@ import {
14 deleteCostAssess, 14 deleteCostAssess,
15 costAssessAllow 15 costAssessAllow
16 } from "@/api/modules/dataAsset"; 16 } from "@/api/modules/dataAsset";
17 import DialogApproval from '@/components/ApprovalProcess/dialog_approval.vue';
18 import { 17 import {
19 getStaffDetailInfo 18 getStaffDetailInfo
20 } from "@/api/modules/queryService"; 19 } from "@/api/modules/queryService";
...@@ -37,14 +36,6 @@ const isCompanyPlatform = ref(userData.tenantType == 1); ...@@ -37,14 +36,6 @@ const isCompanyPlatform = ref(userData.tenantType == 1);
37 /** 数据来源于该企业申请登记的数据资产已通过且剔除数据价值评估中已通过、审批中的资产。 */ 36 /** 数据来源于该企业申请登记的数据资产已通过且剔除数据价值评估中已通过、审批中的资产。 */
38 const assetListData: any = ref([]); 37 const assetListData: any = ref([]);
39 38
40 const systemApproveCurrentRowInfo: any = ref({})
41
42 const approvalDialogVisible = ref(false);
43
44 const handleApprovalDialogCancel = () => {
45 approvalDialogVisible.value = false;
46 }
47
48 const tableFields = ref([ 39 const tableFields = ref([
49 { label: "序号", type: "index", width: 56, align: "center" }, 40 { label: "序号", type: "index", width: 56, align: "center" },
50 { label: "资产名称", field: "daName", width: 160, align: "left", type: 'text_btn', value: 'productDetail', columClass: 'text_btn' }, 41 { label: "资产名称", field: "daName", width: 160, align: "left", type: 'text_btn', value: 'productDetail', columClass: 'text_btn' },
...@@ -54,16 +45,6 @@ const tableFields = ref([ ...@@ -54,16 +45,6 @@ const tableFields = ref([
54 { 45 {
55 label: "审批状态", field: "approveVO", type: "approveTag", width: 96, align: 'center' 46 label: "审批状态", field: "approveVO", type: "approveTag", width: 96, align: 'center'
56 }, 47 },
57 {
58 label: "主平台审批状态", field: "crossPlatformApproveState", type: "approveTagBtn", width: 150, align: 'center', btn: {
59 label: '查看', visible: (scope) => {
60 return scope.row.crossPlatformApproveState != null;
61 }, click: (scope) => {
62 systemApproveCurrentRowInfo.value = scope.row;
63 approvalDialogVisible.value = true;
64 }
65 }
66 },
67 ]); 48 ]);
68 49
69 const deploymentId = ref(''); 50 const deploymentId = ref('');
...@@ -1177,7 +1158,6 @@ const passCommonDialogBtnClick = (btn, info) => { ...@@ -1177,7 +1158,6 @@ const passCommonDialogBtnClick = (btn, info) => {
1177 <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange="passDialogInputChange" /> 1158 <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange="passDialogInputChange" />
1178 <Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" /> 1159 <Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" />
1179 <Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" /> 1160 <Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" />
1180 <DialogApproval :visible="approvalDialogVisible" :currentRowInfo="systemApproveCurrentRowInfo" @dialog-cancel="handleApprovalDialogCancel"></DialogApproval>
1181 </div> 1161 </div>
1182 </template> 1162 </template>
1183 1163
......
...@@ -81,8 +81,11 @@ const systemApproveCurrentRowInfo: any = ref({}) ...@@ -81,8 +81,11 @@ const systemApproveCurrentRowInfo: any = ref({})
81 81
82 const approvalDialogVisible = ref(false); 82 const approvalDialogVisible = ref(false);
83 83
84 const handleApprovalDialogCancel = () => { 84 const handleApprovalDialogCancel = (reSubmit) => {
85 approvalDialogVisible.value = false; 85 approvalDialogVisible.value = false;
86 if (reSubmit) {
87 getTableData();
88 }
86 } 89 }
87 90
88 const tableInfo = ref({ 91 const tableInfo = ref({
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!