b039da99 by lihua

提交和审批的相关内容都需要可以直接录入

1 parent 0ef0fe16
......@@ -14,12 +14,13 @@ import {
qualityAllow,
deleteQuality,
updatQuality,
getTenantList
getTenantList,
} from "@/api/modules/dataAsset";
import useUserStore from "@/store/modules/user";
import useDataAssetStore from "@/store/modules/dataAsset";
import {
getStaffDetailInfo
getStaffDetailInfo,
getSingleList
} from "@/api/modules/queryService";
import { isNeedApprove, rejectFlowData, revokeFlowData, getCamundaDeploymentId, getProcessNodesPromise, isMyFirstNode, passFlowData } from "@/api/modules/workFlowService";
......@@ -49,13 +50,10 @@ const deploymentId = ref('');
const tenantList: any = ref([]);
onBeforeMount(() => {
getTenantList({
bizState: 'Y',
pageSize: -1
}).then((res: any) => {
tenantList.value = [];
// 获取质量评估机构
getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12505" }).then((res: any) => {
if (res.code == proxy.$passCode) {
tenantList.value = res.data?.records || [];
tenantList.value = res.data.records || [];
formItems.value[1].options = tenantList.value;
} else {
proxy.$ElMessage.error(res.msg);
......@@ -162,6 +160,19 @@ const handleCreate = () => {
formItems.value[1].default = '';
formItems.value[2].visible = true;
formItems.value[2].default = [];
if (!needApprove.value) {
passFormItems.value[0].default = null;
passFormItems.value[1].disabled = false;
passFormItems.value[1].default = null;
passFormItems.value[2].default = '';
passFormItems.value[3].default = [];
passFormItems.value[2].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`;
dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
} else {
dialogInfo.value.contents[0].formInfo.items = formItems.value;
dialogInfo.value.contents[0].formInfo.rules = formRules.value;
}
dialogInfo.value.visible = true;
dialogInfo.value.type = '';
if (needApprove.value) {
......@@ -283,7 +294,24 @@ const tableBtnClick = (scope, btn) => {
formItems.value[1].visible = !needApprove.value;
formItems.value[1].default = row.evaluationAgencyGuid;
formItems.value[2].default = row.qualityEvaluationFile || [];
dialogInfo.value.contents[0].formInfo.items = formItems.value;
if (!needApprove.value) {
passFormItems.value[0].default = row['qualityScore'];
if (row.dataStartDate) {
passFormItems.value[1].disabled = true;
passFormItems.value[1].default = [row.dataStartDate, row.dataEndDate];
} else {
passFormItems.value[1].disabled = false;
passFormItems.value[1].default = null;
}
passFormItems.value[2].default = row.evaluationNote || '';
passFormItems.value[3].default = row.evaluationFile || [];
passFormItems.value[2].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`;
dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
} else {
dialogInfo.value.contents[0].formInfo.items = formItems.value;
dialogInfo.value.contents[0].formInfo.rules = formRules.value;
}
dialogInfo.value.visible = true;
dialogInfo.value.type = 'reSubmit';
} else {
......@@ -477,7 +505,7 @@ const formRules = ref({
const dialogInfo = ref({
visible: false,
size: 510,
size: 560,
direction: "column",
header: {
title: "质量评价发起",
......@@ -502,6 +530,22 @@ const dialogInfo = ref({
},
});
const handleDialogSelectChange = (val, row, info) => {
if (row.field == 'damGuid') {
let selectDam = val && assetListData.value.find(a => a.guid == val);
formItems.value.forEach(item => {
item.default = info[item.field];
})
passFormItems.value.forEach(item => {
item.default = info[item.field];
if (item.field == 'evaluationRange') {
item.disabled = !!selectDam?.dataStartDate;
item.default = selectDam?.dataStartDate ? [selectDam.dataStartDate, selectDam.dataEndDate] : null;
}
})
}
}
/** 编辑质量评价发起资产申请按钮处理。 */
const dialogBtnClick = (btn, info) => {
if (btn.value == 'submit') {
......@@ -521,7 +565,17 @@ const dialogBtnClick = (btn, info) => {
name: file.name,
url: file.url
}
}) || []
}) || [],
qualityScore: info.qualityScore,
evaluationRangeStart: info.evaluationRange[0],
evaluationRangeEnd: info.evaluationRange[1],
evaluationNote: info.evaluationNote,
evaluationFile: info.evaluationFile?.map(file => {
return {
name: file.name,
url: file.url
}
}) || [],
}).then((res: any) => {
dialogInfo.value.footer.btns[1].loading = false;
if (res?.code == proxy.$passCode) {
......@@ -546,7 +600,17 @@ const dialogBtnClick = (btn, info) => {
name: file.name,
url: file.url
}
}) || []
}) || [],
qualityScore: info.qualityScore,
evaluationRangeStart: info.evaluationRange[0],
evaluationRangeEnd: info.evaluationRange[1],
evaluationNote: info.evaluationNote,
evaluationFile: info.evaluationFile?.map(file => {
return {
name: file.name,
url: file.url
}
}) || [],
}).then((res: any) => {
dialogInfo.value.footer.btns[1].loading = false;
if (res?.code == proxy.$passCode) {
......@@ -779,6 +843,27 @@ const passDialogInfo = ref({
},
});
const dialogInputChange = (val, item, info) => {
if (item.field != 'qualityScore') {
return;
}
passDialogInputChange(val, item);
formItems.value.forEach(item => {
item.default = info[item.field];
})
passFormItems.value.forEach(item => {
item.default = info[item.field];
})
if (!needApprove.value) {
dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
} else {
dialogInfo.value.contents[0].formInfo.items = formItems.value;
dialogInfo.value.contents[0].formInfo.rules = formRules.value;
}
}
const passDialogInputChange = (val, item) => {
if (item.field == 'qualityScore') {
passFormItems.value[2].placeholder = `本次评估数据资产总体质量得分为${val}分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`;
......@@ -969,7 +1054,8 @@ const passCommonDialogBtnClick = (btn, info) => {
<div class="table_panel_wrap">
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
</div>
<Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" />
<Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" @inputChange="dialogInputChange"
@selectChange="handleDialogSelectChange" />
<Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange=passDialogInputChange />
<Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" />
<Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" />
......
......@@ -18,7 +18,8 @@ import {
getTenantList
} from "@/api/modules/dataAsset";
import {
getStaffDetailInfo
getStaffDetailInfo,
getSingleList
} from "@/api/modules/queryService";
import useUserStore from "@/store/modules/user";
import useDataAssetStore from "@/store/modules/dataAsset";
......@@ -63,11 +64,8 @@ onBeforeMount(() => {
tableFields.value.splice(3, 0, { label: "企业名称", field: "tenantName", width: 250, align: "left" })
tableInfo.value.fields = tableFields.value;
}
getTenantList({
bizState: 'Y',
pageSize: -1
}).then((res: any) => {
tenantList.value = [];
// 获取价值评估机构
getSingleList({ pageIndex: -1, pageSize: -1, bizState: 'Y', tenantType: "12504" }).then((res: any) => {
if (res.code == proxy.$passCode) {
tenantList.value = res.data?.records || [];
formItems.value[1].options = tenantList.value;
......@@ -197,6 +195,18 @@ const handleCreate = () => {
}
})
}
if (!needApprove.value) {
passFormItems.value[0].default = '';
passFormItems.value[1].default = null;
passFormItems.value[2].default = '';
passFormItems.value[3].default = [];
passFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。';
dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
} else {
dialogInfo.value.contents[0].formInfo.items = formItems.value;
dialogInfo.value.contents[0].formInfo.rules = formRules.value;
}
} else {
proxy.$ElMessage.error(res1.msg);
}
......@@ -313,11 +323,9 @@ const tableBtnClick = (scope, btn) => {
formItems.value[1].default = row.evaluationAgencyGuid;
formItems.value[2].default = row.costAssessmentFile || [];
// formItems.value[2].default = row.qualityScore;
formItems.value[5].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
formItems.value[4].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
// formItems.value[4].default = row.evaluationNote;
// formItems.value[5].default = row.evaluationFile || [];
dialogInfo.value.type = 'reSubmit';
dialogInfo.value.visible = true;
}
if (!row.qualityEvaluationGuid) {
formItems.value[3].visible = true;
......@@ -333,9 +341,21 @@ const tableBtnClick = (scope, btn) => {
formItems.value[4].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
formItems.value[5].default = row.evaluationNote;
formItems.value[6].default = row.evaluationFile || [];
dialogInfo.value.type = 'reSubmit';
dialogInfo.value.visible = true;
}
if (!needApprove.value) {
passFormItems.value[0].default = row['assessmentMoney'] || '';
passFormItems.value[1].default = row.assessmentDate;
passFormItems.value[2].default = row.assessmentNote || '';
passFormItems.value[3].default = row.assessmentFile || [];
passFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。';
dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
} else {
dialogInfo.value.contents[0].formInfo.items = formItems.value;
dialogInfo.value.contents[0].formInfo.rules = formRules.value;
}
dialogInfo.value.type = 'reSubmit';
dialogInfo.value.visible = true;
} else {
proxy.$ElMessage.error(res1.msg);
}
......@@ -653,6 +673,26 @@ const handleSelectChange = (val, row, info) => {
}
const dialogInputChange = (val, item, info) => {
if (item.field != 'assessmentMoney' && item.field != 'assessmentDate') {
return;
}
passDialogInputChange(val, item, info);
formItems.value.forEach(item => {
item.default = info[item.field];
})
passFormItems.value.forEach(item => {
item.default = info[item.field];
})
if (!needApprove.value) {
dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
} else {
dialogInfo.value.contents[0].formInfo.items = formItems.value;
dialogInfo.value.contents[0].formInfo.rules = formRules.value;
}
}
const passDialogInputChange = (val, item, inlineValue) => {
console.log('val', val, item, inlineValue);
if (item.field == 'assessmentMoney') {
......@@ -708,6 +748,15 @@ const dialogBtnClick = (btn, info) => {
evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
evaluationNote: info.evaluationNote || null,
evaluationAgencyGuid: info.evaluationAgencyGuid,
assessmentMoney: info.assessmentMoney,
assessmentDate: info.assessmentDate,
assessmentNote: info.assessmentNote,
assessmentFile: info.assessmentFile.map(file => {
return {
name: file.name,
url: file.url
}
}) || []
}).then((res: any) => {
dialogInfo.value.footer.btns[1].loading = false;
if (res?.code == proxy.$passCode) {
......@@ -762,6 +811,15 @@ const dialogBtnClick = (btn, info) => {
evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
evaluationNote: info.evaluationNote,
evaluationAgencyGuid: info.evaluationAgencyGuid,
assessmentMoney: info.assessmentMoney,
assessmentDate: info.assessmentDate,
assessmentNote: info.assessmentNote,
assessmentFile: info.assessmentFile.map(file => {
return {
name: file.name,
url: file.url
}
}) || []
}
}
saveCostAssess(params).then((res: any) => {
......@@ -1216,7 +1274,8 @@ const passCommonDialogBtnClick = (btn, info) => {
<div class="table_panel_wrap">
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
</div>
<Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" @selectChange="handleSelectChange" />
<Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" @selectChange="handleSelectChange"
@inputChange="dialogInputChange" />
<Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange="passDialogInputChange" />
<Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" />
<Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" />
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!