33be468e by xukangle

Merge branch 'develop' into dev_20241202_xukangle

2 parents e98b429c ee58ebe9
......@@ -82,7 +82,7 @@ export const onUploadFilePreview = async (params) => {
export const setFileName = (name) => {
if(name && name.indexOf('_') > -1){
const s = name.indexOf("_");
const e = name.indexOf(".");
const e = name.lastIndexOf(".");
const newName = name.slice(0, s) + name.slice(e);
return newName
} else {
......
......@@ -114,7 +114,7 @@ export const getRegisteredList = (type) => request({
/** 质量评价审批通过 */
export const qualityAllow = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/allow`,
url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/submit-flow`,
method: 'post',
data: params
});
......
......@@ -38,13 +38,13 @@ export const getFlowData = (params) => request({
method: 'post',
data: params
})
export const getCamundaDeploymentId = (flowType) => request({
export const getCamundaDeploymentId = (flowType, tenantGuid = null, staffGuid = null) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/get-camunda-deployment-id`,
method: 'post',
data: {
tenantGuid: userData.tenantGuid,
tenantGuid: tenantGuid || userData.tenantGuid,
flowType:flowType,
staffGuid: userData.staffGuid,
staffGuid: staffGuid || userData.staffGuid,
}
})
......
......@@ -982,7 +982,7 @@ const panelChange = (scope, row) => {
</div>
<div v-if="item.example" class="panel_header-expample">{{ item.example }}</div>
<el-input ref="exampleTextareaRef" :id="item.field"
:class="[item.col, { is_block: item.block, 'extra-textarea-class': item.type === 'textarea' && !item.label }]"
:class="[item.col, { is_block: item.block }]"
v-model="formInline[item.field]" :rows="item.rows ?? 4" type="textarea" :placeholder="item.placeholder"
:disabled="item.disabled || readonly" :readonly="item.readonly" resize="none"
:maxlength="item.maxlength ?? 500" show-word-limit @focus="(event) => inputFocus(event, item)"
......
......@@ -86,7 +86,19 @@ const routes: RouteRecordRaw[] = [
cache: true,
reuse: true
}
},
{
path: 'register-catalog-detail',
name: 'evaCatalogDetail',
component: () => import('@/views/data_asset/registerCatalogDetail.vue'),
meta: {
title: '详情-',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true
}
},
],
},
{
......
......@@ -51,14 +51,14 @@ const useUserStore = defineStore(
//获取用户信息
account.value = res.data.logonUser
userId.value = res.data.userId
userName.value = res.data.userName
// userData.value = JSON.stringify(res.data.data);
currentTenantGuid.value = res.data.tenantInfoList && res.data.tenantInfoList.length ? res.data.tenantInfoList[0].guid : '';
localStorage.setItem('currentTenantGuid', currentTenantGuid.value);
let currentTenant = res.data.tenantInfoList?.[0];
getCurrentUserInfo({tenantGuid: currentTenantGuid.value}).then((res: any) => {
console.log(res, 'getCurrentUserInfo');
if (res.code == '00000') {
userName.value = res.data.staffName;
localStorage.setItem('userName', res.data?.staffName);
localStorage.setItem('userData', JSON.stringify(res.data));
} else {
ElMessage.error(res.msg)
......@@ -66,7 +66,6 @@ const useUserStore = defineStore(
})
return getSystemMenu({ tenantGuid: currentTenantGuid.value }).then((info: any) => {
if (info.code == '00000') {
localStorage.setItem('userName', currentTenant?.name)
localStorage.setItem('userInfoData', JSON.stringify(info.data));
userInfoData.value = info.data;
} else {
......
......@@ -11,15 +11,13 @@ import {
getQualityEvaList,
getRegisteredList,
saveQuality,
registerApproveCancel,
registerApproveBackup,
qualityAllow,
deleteQuality,
updatQuality
} from "@/api/modules/dataAsset";
import useUserStore from "@/store/modules/user";
import useDataAssetStore from "@/store/modules/dataAsset";
import { passFlowData, rejectFlowData, revokeFlowData, getCamundaDeploymentId, getProcessNodesPromise } from "@/api/modules/workFlowService";
import { rejectFlowData, revokeFlowData, getCamundaDeploymentId, getProcessNodesPromise } from "@/api/modules/workFlowService";
const assetStore = useDataAssetStore();
......@@ -44,7 +42,7 @@ const tableFields = ref([
const deploymentId = ref('');
onBeforeMount(() => {
getCamundaDeploymentId('10018').then((res: any) => {
getCamundaDeploymentId('10018', userData.tenantGuid, userData.staffGuid).then((res: any) => {
if (res.code == proxy.$passCode) {
deploymentId.value = res.data;
} else {
......@@ -168,7 +166,7 @@ const tableInfo = ref({
actionInfo: {
label: "操作",
type: "btn",
width: 160,
width: 175,
btns: (scope) => {
let row = scope.row;
return getTableBtns(row);
......@@ -178,25 +176,43 @@ const tableInfo = ref({
const getTableBtns = (row) => {
let btnsArr: any[] = [];
if (row.approveState == 'A') {//审批中
btnsArr.push({ label: "详情", value: "path_detail" })
if (row.tenantGuid == userData.tenantGuid) {
btnsArr.push({ label: "撤销", value: "revoke" });
const approveVO = row.approveVO || {};
const approveState = row.approveState || null;
const approveStaffGuids = approveVO.approveStaffGuids || [];
const staffGuid = approveVO.staffGuid || '';
const bizApproveState = row.bizApproveState;
const currentStaffGuid = userData.staffGuid
let isShowCancel = false;
let flowState;
if (approveState == 'N') {
flowState = 1;
}
if (row.approveTenantGuids?.includes(userData.tenantGuid)) {
btnsArr.push({ label: "通过", value: "pass" });
btnsArr.push({ label: "驳回", value: "backup" });
if (approveState == 'A' && approveStaffGuids.indexOf(currentStaffGuid) > -1) {
flowState = 2;
}
} else if (row.approveState == 'Y') {//已通过的不能删除。
btnsArr.push({ label: "详情", value: "path_detail" })
} else if (row.approveState == 'R' || row.approveState == 'C') {//已驳回或已撤销
btnsArr.push({ label: "详情", value: "path_detail" });
if (row.tenantGuid == userData.tenantGuid) {
btnsArr.push({ label: "重新提交", value: "edit", disabled: false })
if ((approveState == 'C' || approveState == 'R') && staffGuid == currentStaffGuid) {
flowState = 3;
}
if (row.tenantGuid == userData.tenantGuid) {
btnsArr.push({ label: "删除", value: "delete" });
if (approveVO && approveVO.approveState == 'A' && staffGuid == currentStaffGuid) {
isShowCancel = true;
}
if (flowState === 1) {
btnsArr = [{ label: "删除", value: "del" }]
}
if (flowState === 2) {
btnsArr = [{ label: "通过", value: "pass" }, { label: "驳回", value: "reject" }]
}
if (flowState === 3) {
btnsArr.push({ label: "删除", value: "del" })
}
if (flowState === 3 && bizApproveState != 'D') {
btnsArr.push({ label: "重新提交", value: "redit" })
}
if (isShowCancel) {
btnsArr.push({ label: "撤销", value: "revoke" })
}
if (flowState !== 1) {
btnsArr.push({ label: "详情", value: "detail" })
}
return btnsArr;
}
......@@ -207,15 +223,15 @@ const tableBtnClick = (scope, btn) => {
const type = btn.value;
const row = scope.row;
currTableData.value = row;
if (type == "edit") {
if (type == "redit") {
dialogInfo.value.visible = true;
dialogInfo.value.type = 'reSubmit';
formItems.value[0].visible = false;
formItems.value[0].default = row.registerGuid;
formItems.value[1].default = row.qualityEvaluationFile || [];
} else if (type == "delete") {
} else if (type == "del") {
delTableOpen("此操作将永久删除该资产质量评价,是否继续?", "warning");
} else if (type === 'backup') {
} else if (type === 'reject') {
rejectDialogInfo.value.visible = true;
} else if (type === 'pass') {
passDialogInfo.value.visible = true;
......@@ -251,7 +267,7 @@ const tableBtnClick = (scope, btn) => {
message: '已取消撤销'
});
});
} else if (type === 'path_detail') { // 详情
} else if (type === 'detail') { // 详情
if (row.registerApproveState == 'Y') {
router.push({
name: 'registerDetail',
......@@ -259,14 +275,14 @@ const tableBtnClick = (scope, btn) => {
});
} else {
router.push({
name: 'registerCatalogDetail',
query: { guid: row.damGuid, type: 'asset' }
name: 'evaCatalogDetail',
query: { guid: row.damGuid, evaGuid: row.guid, type: 'qualityEvaluate' }
});
}
} else if (type == 'productDetail') {
router.push({
name: 'registerCatalogDetail',
query: { guid: row.damGuid, type: 'asset' }
query: { guid: row.damGuid }
});
}
};
......@@ -403,9 +419,10 @@ const dialogBtnClick = (btn, info) => {
damGuid: currTableData.value.damGuid,
daName: currTableData.value.daName,
immediateApprove: true,
issuingEntityGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
qualityEvaluationFile: info.qualityEvaluationFile?.map(f => f.url) || []
evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
qualityEvaluationFile: info.qualityEvaluationFile || []
}).then((res: any) => {
dialogInfo.value.footer.btns[1].loading = false;
if (res?.code == proxy.$passCode) {
ElMessage.success('该资产质量评价重新提交成功');
dialogInfo.value.visible = false;
......@@ -422,10 +439,10 @@ const dialogBtnClick = (btn, info) => {
damGuid: info.damGuid,
daName: daInfo.damName,
immediateApprove: true,
// registerTime: daInfo.registerTime,
issuingEntityGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
qualityEvaluationFile: info.qualityEvaluationFile?.map(f => f.url) || []
evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
qualityEvaluationFile: info.qualityEvaluationFile || []
}).then((res: any) => {
dialogInfo.value.footer.btns[1].loading = false;
if (res?.code == proxy.$passCode) {
ElMessage.success('质量评价发起成功');
dialogInfo.value.visible = false;
......@@ -568,7 +585,7 @@ const passDialogInfo = ref({
footer: {
btns: [
{ type: "default", label: "取消", value: "cancel" },
{ type: "primary", label: "确定", value: "submit" },
{ type: "primary", label: "确定", value: "submit", loading: false },
],
},
});
......@@ -581,14 +598,19 @@ const passDialogInputChange = (val, item) => {
const passDialogBtnClick = (btn, info) => {
if (btn.value == 'submit') {
passDialogInfo.value.footer.btns[1].loading = true;
qualityAllow({
guid: currTableData.value.guid,
guid: currTableData.value.approveVO.approveGuid,
bizGuid: currTableData.value.guid,
flowType: currTableData.value.approveVO.flowType,
approveStaffGuid: userData.staffGuid,
qualityScore: info.qualityScore,
evaluationRangeStart: info.evaluationRange[0],
evaluationRangeEnd: info.evaluationRange[1],
evaluationNote: info.evaluationNote,
evaluationFile: info.evaluationFile.map(f => f.url),
evaluationFile: info.evaluationFile || [],
}).then((res: any) => {
passDialogInfo.value.footer.btns[1].loading = false;
if (res?.code == proxy.$passCode) {
if (res.data) {
ElMessage.success('审批成功');
......@@ -648,13 +670,15 @@ const rejectDialogBtnClick = (btn, info) => {
ElMessage.error('请填写驳回理由');
return
}
let row = currTableData.value;
tableInfo.value.loading = true;
let params = {
bizGuid: currTableData.value.guid,
funcCode: currTableData.value.funcCode,
guid: row.approveVO.approveGuid,
flowType: row.approveVO.flowType,
approveStaffGuid: userData.staffGuid,
approveSuggest: info.approveSuggest
}
registerApproveBackup(params).then((res: any) => {
rejectFlowData(params).then((res: any) => {
tableInfo.value.loading = false;
if (res?.code == proxy.$passCode) {
if (res.data) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!