4f6d2e10 by lihua

添加发起失败

1 parent d4bc7e00
......@@ -71,3 +71,10 @@ export const getCrossDetailList = (params) => request({
method: 'post',
data: params
})
/** 重新发起失败的流程 */
export const crossPlatformApprove = (params) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/approve-detail-cross/list`,
method: 'post',
data: params
})
......
<script lang="ts" setup name="DialogApproval">
import { TableColumnWidth } from '@/utils/enum';
import {
getCrossDetailList
getCrossDetailList,
crossPlatformApprove
} from '@/api/modules/workFlowService';
const { proxy } = getCurrentInstance() as any;
......@@ -38,6 +39,7 @@ watch(() => props.visible, () => {
dialogInfo.value.visible = props.visible;
if (props.visible) {
tableInfo.value.data = [];
tableInfo.value.actionInfo.show = props.currentRowInfo?.crossPlatformApproveState == 'E';
gettableList();
}
}, {
......@@ -65,6 +67,8 @@ const gettableList = () => {
})
}
const isReSubmit = ref(false);
const tableInfo = ref({
id: 'approval-table',
loading: false,
......@@ -73,32 +77,56 @@ const tableInfo = ref({
fields: [
{ label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center", fixed: "left" },
{
label: "节点", field: "processName", width: 100
label: "节点", field: "processName", width: 90
},
{ label: "处理对象", field: "operator", width: TableColumnWidth.USERNAME },
{ label: "操作时间", field: "operatingTime", width: TableColumnWidth.DATETIME, },
{
label: "审批状态", field: "approveState", width: 120, type: 'tag'
label: "审批状态", field: "approveState", width: 120, type: 'tag', align: 'center'
},
{ label: "审批原因", field: "approveSuggest", width: TableColumnWidth.DESCRIPTION },
],
data: [],
showPage: false,
actionInfo: {
show: false
show: props.currentRowInfo?.crossPlatformApproveState == 'E',
label: "操作",
type: "btn",
width: 100,
btns: [{
label: '重新发起',
click: (scope) => {
tableInfo.value.loading = true;
crossPlatformApprove({ approveGuid: props.currentRowInfo.approveVO.approveGuid, guid: props.currentRowInfo.guid }).then((res: any) => {
tableInfo.value.loading = false;
if (res.code == proxy.$passCode) {
proxy.$ElMessage({
type: "success",
message: '重新发起成功',
});
isReSubmit.value = true;
tableInfo.value.actionInfo.show = false;
} else {
proxy.$ElMessage({
type: "error",
message: res.msg,
});
}
})
}
}]
}
});
const handleDialogCancel = () => {
dialogInfo.value.visible = false;
emits("dialogCancel");
emits("dialogCancel", isReSubmit.value);
}
</script>
<template>
<!-- 版本信息 -->
<el-dialog v-model="dialogInfo.visible" :title="dialogInfo.header.title" :width="dialogInfo.size" :modal="true"
<el-dialog v-model="dialogInfo.visible" :title="dialogInfo.header.title" width="700" :modal="true"
:close-on-click-modal="true" destroy-on-close align-center @close="handleDialogCancel">
<Table ref="tableRef" :tableInfo="tableInfo" class="approval-table" />
</el-dialog>
......
......@@ -452,6 +452,7 @@ export const tagType = (row, type): any => {
case "Y":
state = 'success'
break;
case "E":
case "R":
state = 'danger'
break;
......@@ -722,6 +723,9 @@ export const tagMethod = (row, type) => {
case "C":
tag = '已撤销'
break;
case "E":
tag = '发起失败'
break;
default:
tag = type == 'crossPlatformApproveState' ? '未发起' : '--'
break;
......
......@@ -35,8 +35,11 @@ const systemApproveCurrentRowInfo: any = ref({})
const approvalDialogVisible = ref(false);
const handleApprovalDialogCancel = () => {
const handleApprovalDialogCancel = (reSubmit) => {
approvalDialogVisible.value = false;
if (reSubmit) {
getTableData();
}
}
/** 数据来源于该企业申请登记的数据资产已通过且剔除数据质量评价中已通过、审批中的资产。 */
......
......@@ -100,8 +100,11 @@ const systemApproveCurrentRowInfo: any = ref({})
const approvalDialogVisible = ref(false);
const handleApprovalDialogCancel = () => {
const handleApprovalDialogCancel = (reSubmit) => {
approvalDialogVisible.value = false;
if (reSubmit) {
getTableData();
}
}
const tableFields = ref([{ label: "序号", type: "index", width: 56, align: "center" },
......@@ -143,7 +146,7 @@ const tableFields = ref([{ label: "序号", type: "index", width: 56, align: "ce
}
},
{
label: "主平台审批状态", field: "crossPlatformApproveState", type: "approveTagBtn", width: 150, align: 'center', btn: {
label: "主平台审批状态", field: "crossPlatformApproveState", type: "approveTagBtn", width: 170, align: 'center', btn: {
label: '查看', visible: (scope) => {
return scope.row.crossPlatformApproveState != null;
}, click: (scope) => {
......
......@@ -14,7 +14,6 @@ import {
deleteCostAssess,
costAssessAllow
} from "@/api/modules/dataAsset";
import DialogApproval from '@/components/ApprovalProcess/dialog_approval.vue';
import {
getStaffDetailInfo
} from "@/api/modules/queryService";
......@@ -37,14 +36,6 @@ const isCompanyPlatform = ref(userData.tenantType == 1);
/** 数据来源于该企业申请登记的数据资产已通过且剔除数据价值评估中已通过、审批中的资产。 */
const assetListData: any = ref([]);
const systemApproveCurrentRowInfo: any = ref({})
const approvalDialogVisible = ref(false);
const handleApprovalDialogCancel = () => {
approvalDialogVisible.value = false;
}
const tableFields = ref([
{ label: "序号", type: "index", width: 56, align: "center" },
{ label: "资产名称", field: "daName", width: 160, align: "left", type: 'text_btn', value: 'productDetail', columClass: 'text_btn' },
......@@ -54,16 +45,6 @@ const tableFields = ref([
{
label: "审批状态", field: "approveVO", type: "approveTag", width: 96, align: 'center'
},
{
label: "主平台审批状态", field: "crossPlatformApproveState", type: "approveTagBtn", width: 150, align: 'center', btn: {
label: '查看', visible: (scope) => {
return scope.row.crossPlatformApproveState != null;
}, click: (scope) => {
systemApproveCurrentRowInfo.value = scope.row;
approvalDialogVisible.value = true;
}
}
},
]);
const deploymentId = ref('');
......@@ -1177,7 +1158,6 @@ const passCommonDialogBtnClick = (btn, info) => {
<Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange="passDialogInputChange" />
<Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" />
<Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" />
<DialogApproval :visible="approvalDialogVisible" :currentRowInfo="systemApproveCurrentRowInfo" @dialog-cancel="handleApprovalDialogCancel"></DialogApproval>
</div>
</template>
......
......@@ -81,8 +81,11 @@ const systemApproveCurrentRowInfo: any = ref({})
const approvalDialogVisible = ref(false);
const handleApprovalDialogCancel = () => {
const handleApprovalDialogCancel = (reSubmit) => {
approvalDialogVisible.value = false;
if (reSubmit) {
getTableData();
}
}
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!