812919fd by lihua

1.02版本提交

1 parent c4d5a5f7
......@@ -615,6 +615,15 @@ export const saveBizRuleConfig = (data) => request({
data
})
/** 业务规则配置-批量新增
* @param {Object}
* @path /biz-rule-config/save
*/
export const batchSaveBizRuleConfig = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/biz-rule-config/save-batch`,
method: 'post',
data
})
/**树形目录
* @param {Object}
......
......@@ -29,9 +29,9 @@ const fileFormRef = ref();
const fileFormItems: any = ref([
{
label: '选择文件上传',
tip: '支持扩展名:xlsx、xls,文件大小不超过20MB',
tip: '支持扩展名:xlsx、xls、csv,文件大小不超过20MB',
type: 'upload-file',
accept: '.xlsx, .xls',
accept: '.xlsx, .xls, .csv',
limit: 1,
limitSize: 20,
isExcel: true,
......
......@@ -476,7 +476,7 @@ const uploadFile = (file, item) => {
return Promise.resolve();
}
if (item.isExcel) {
const isExcel = file.file.type === 'application/vnd.ms-excel' || file.file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
const isExcel = file.file.type === 'application/vnd.ms-excel' || file.file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || file.file.type == 'text/csv';
if (!isExcel) {
uploadRef.value["ref" + item.field].handleRemove(file);
ElMessage.error('上传文件只能是 .xls, .xlsx 格式');
......
......@@ -36,7 +36,7 @@ const toolBar = computed(() => {
})
const onUpload = async (file, list) => {
const isExcel = file.raw.type === 'application/vnd.ms-excel' || file.raw.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
const isExcel = file.raw.type === 'application/vnd.ms-excel' || file.raw.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || file.raw.type == 'text/csv';
if (!isExcel) {
const fileUpload = fileUploadRef.value[0] || fileUploadRef.value
fileUpload?.handleRemove(file)
......
......@@ -102,7 +102,7 @@ const useUserStore = defineStore(
await process();
}
/** 轮询是否需要刷新token。如果是同步多个调用,则不处理错误的信息。 */
setInterval(async () => {
timer.value = setInterval(async () => {
process();
}, 600000);
}
......
......@@ -444,9 +444,11 @@ const handleTableEdit = (scope) => {
drawerInfo.value.visible = true;
drawerInfo.value.type = 'edit';
drawerInfo.value.header.title = '编辑合同';
drawerInfo.value.footer.visible = true;
currTableData.value = scope.row;
contractEditFormItems.value.forEach(item => {
item.default = scope.row[item.field];
item.disabled = false;
if (item.field == 'contractNodeCodes') {
item.default = scope.row.contractNodeCodes?.map(c => c.code) || [];
item.options = scope.row.contractTypeCode == '1' ? registerContractNodesList.value : (!scope.row.contractTypeCode ? [] : tradeContractNodesList.value);
......@@ -455,6 +457,7 @@ const handleTableEdit = (scope) => {
nodesInfo.value = scope.row.contractNodes?.map(node => {
let items = cloneDeep(nodeFormItems.value);
items.forEach(item => {
item.disabled = false;
item.default = node[item.field];
if (item.field == 'dateRange') {
item.default = [node.startDate, node.endDate];
......@@ -483,12 +486,44 @@ const handleTableDel = (scope) => {
})
}
const handleTableView = (scope) => {
drawerInfo.value.visible = true;
drawerInfo.value.type = 'view';
drawerInfo.value.header.title = '查看合同';
currTableData.value = scope.row;
contractEditFormItems.value.forEach(item => {
item.default = scope.row[item.field];
item.disabled = true;
if (item.field == 'contractNodeCodes') {
item.default = scope.row.contractNodeCodes?.map(c => c.code) || [];
item.options = scope.row.contractTypeCode == '1' ? registerContractNodesList.value : (!scope.row.contractTypeCode ? [] : tradeContractNodesList.value);
}
})
nodesInfo.value = scope.row.contractNodes?.map(node => {
let items = cloneDeep(nodeFormItems.value);
items.forEach(item => {
item.default = node[item.field];
item.disabled = true;
if (item.field == 'dateRange') {
item.default = [node.startDate, node.endDate];
}
})
return Object.assign({}, node, {
nodeFormItems: items,
nodeFormRules: nodeFormRules.value
})
}) || [];
drawerInfo.value.footer.visible = false;
}
const handleCreate = () => {
drawerInfo.value.visible = true;
drawerInfo.value.type = 'add';
drawerInfo.value.header.title = '新增合同';
drawerInfo.value.footer.visible = true;
contractEditFormItems.value.forEach(item => {
item.default = '';
item.disabled = false;
if (item.field == 'partyBGuid') {
item.default = userData.tenantGuid;
}
......@@ -701,8 +736,9 @@ onBeforeMount(() => {
</el-table-column>
<el-table-column label="操作" width="100px" align="left" fixed="right" show-overflow-tooltip>
<template #default="scope">
<span class="text_btn" @click="handleTableEdit(scope)">编辑</span>
<span class="text_btn ml4" @click="handleTableDel(scope)">删除</span>
<span v-if="!scope.row.createUserId || scope.row.createUserId == userData.userGuid" class="text_btn" @click="handleTableEdit(scope)">编辑</span>
<span v-if="!scope.row.createUserId || scope.row.createUserId == userData.userGuid" class="text_btn ml4" @click="handleTableDel(scope)">删除</span>
<span v-if="scope.row.createUserId && scope.row.createUserId != userData.userGuid" class="text_btn ml4" @click="handleTableView(scope)">查看</span>
</template>
</el-table-column>
</el-table>
......@@ -722,7 +758,7 @@ onBeforeMount(() => {
</div>
<!-- 新增按钮 -->
<div class="bottm_tools" v-show="nodesInfo.length < contractNodeCodes?.length" @click="addNode">
<div class="bottm_tools" v-show="nodesInfo.length < contractNodeCodes?.length && drawerInfo.type != 'view'" @click="addNode">
<el-icon>
<Plus />
</el-icon>
......
......@@ -15,12 +15,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";
......@@ -70,13 +71,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);
......@@ -181,8 +179,21 @@ const handleCreate = () => {
formItems.value[0].default = '';
formItems.value[1].visible = !needApprove.value;
formItems.value[1].default = '';
formItems.value[2].visible = true;
formItems.value[2].visible = needApprove.value;
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) {
......@@ -303,8 +314,26 @@ const tableBtnClick = (scope, btn) => {
formItems.value[0].default = row.damGuid;
formItems.value[1].visible = !needApprove.value;
formItems.value[1].default = row.evaluationAgencyGuid;
formItems.value[2].visible = needApprove.value;
formItems.value[2].default = row.qualityEvaluationFile || [];
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 {
......@@ -494,7 +523,7 @@ const formRules = ref({
const dialogInfo = ref({
visible: false,
size: 510,
size: 560,
direction: "column",
header: {
title: "质量评价发起",
......@@ -519,6 +548,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') {
......@@ -538,7 +583,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) {
......@@ -563,7 +618,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) {
......@@ -796,6 +861,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完整性:`;
......@@ -986,7 +1072,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" />
......
......@@ -255,7 +255,7 @@ const btnClick = (btn) => {
assessFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。';
qualityEvaluateFormItems.value[2].placeholder = '本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:';
if (evaDetailInfo.value.dataStartDate) {
qualityEvaluateFormItems.value[1].default = [evaDetailInfo.value.dataStartDate, aevaDetailInfo.value.dataEndDate];
qualityEvaluateFormItems.value[1].default = [evaDetailInfo.value.dataStartDate, evaDetailInfo.value.dataEndDate];
qualityEvaluateFormItems.value[1].disabled = true;
} else {
qualityEvaluateFormItems.value[1].default = null;
......@@ -1031,7 +1031,7 @@ const handleClick = () => {
</el-table-column>
</el-table>
</ContentWrap>
<ContentWrap v-if="route.query.type == 'qualityEvaluate' || route.query.type == 'costAssess'" id="id-assetContent"
<ContentWrap v-if="(route.query.type == 'qualityEvaluate' && evaDetailInfo?.qualityEvaluationFile?.length > 0) || (route.query.type == 'costAssess' && costAssessDetail?.costAssessmentFile?.length > 0)" id="id-assetContent"
title="附件信息" description="" style="margin: 16px 16px 16px">
<div class="list_panel mt4">
<div class="list_item isFile" v-if="evaDetailInfo?.qualityEvaluationFile?.length" :style="{ width: '40%' }">
......
......@@ -16,7 +16,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";
......@@ -59,11 +60,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;
......@@ -171,7 +169,7 @@ const handleCreate = () => {
formItems.value[0].default = '';
formItems.value[1].visible = !needApprove.value;
formItems.value[1].default = '';
formItems.value[2].visible = true;
formItems.value[2].visible = needApprove.value;
formItems.value[2].default = [];
formItems.value[3].visible = false;
formItems.value[3].default = '';
......@@ -193,6 +191,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);
}
......@@ -240,7 +250,7 @@ const getTableBtns = (row) => {
const approveVO = row.approveVO;
if (!approveVO && row.isApprove == 'N') {
btnsArr.push({ label: "编辑", value: "redit" });
btnsArr.push({ label: "删除", value: "del" });
btnsArr.push({ label: "删除", value: "delete" });
btnsArr.push({ label: "详情", value: "detail" });
return btnsArr;
}
......@@ -308,12 +318,18 @@ const tableBtnClick = (scope, btn) => {
formItems.value[1].visible = !needApprove.value;
formItems.value[1].default = row.evaluationAgencyGuid;
formItems.value[2].default = row.costAssessmentFile || [];
formItems.value[2].visible = needApprove.value;
// formItems.value[2].default = row.qualityScore;
formItems.value[5].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
if (row.dataStartDate) {
formItems.value[4].disabled = true;
passFormItems.value[1].default = [row.dataStartDate, row.dataEndDate];
} else {
formItems.value[4].disabled = false;
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;
......@@ -324,14 +340,33 @@ const tableBtnClick = (scope, btn) => {
formItems.value[0].default = row.damGuid;
formItems.value[1].visible = !needApprove.value;
formItems.value[1].default = row.evaluationAgencyGuid;
formItems.value[2].visible = needApprove.value;
formItems.value[2].default = row.costAssessmentFile || [];
formItems.value[3].default = changeNum(row.qualityScore || 0, 2);
if (row.dataStartDate) {
formItems.value[4].disabled = true;
passFormItems.value[1].default = [row.dataStartDate, row.dataEndDate];
} else {
formItems.value[4].disabled = false;
formItems.value[4].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
}
formItems.value[5].default = row.evaluationNote;
formItems.value[6].default = row.evaluationFile || [];
}
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);
}
......@@ -628,7 +663,9 @@ const handleSelectChange = (val, row, info) => {
if (row.field != 'registerGuid') {
return;
}
let qualityEvaluationGuid = assetListData.value.find(item => item.guid == val)?.qualityEvaluationGuid;
let selectDam = val && assetListData.value.find(item => item.guid == val);
let qualityEvaluationGuid = selectDam?.qualityEvaluationGuid;
if (!qualityEvaluationGuid) {
formItems.value[0].default = val;
formItems.value[1].default = info.evaluationAgencyGuid;
......@@ -637,6 +674,21 @@ const handleSelectChange = (val, row, info) => {
formItems.value[4].visible = true;
formItems.value[5].visible = true;
formItems.value[6].visible = true;
formItems.value.forEach(item => {
item.default = info[item.field];
if (item.field == 'evaluationFile') {
item.default = item.default || [];
} else if (item.field == 'evaluationRange') {
item.disabled = !!selectDam?.dataStartDate;
item.default = selectDam?.dataStartDate ? [selectDam.dataStartDate, selectDam.dataEndDate] : null;
}
})
passFormItems.value.forEach(item => {
item.default = info[item.field];
if (item.field == 'assessmentFile') {
item.default = item.default || [];
}
})
} else {
formItems.value[0].default = val;
formItems.value[1].default = info.evaluationAgencyGuid;
......@@ -645,10 +697,45 @@ const handleSelectChange = (val, row, info) => {
formItems.value[4].visible = false;
formItems.value[5].visible = false;
formItems.value[6].visible = false;
formItems.value.forEach(item => {
item.default = info[item.field];
if (item.field == 'evaluationFile') {
item.default = [];
} else if (item.field == 'evaluationRange') {
item.disabled = !!selectDam?.dataStartDate;
item.default = selectDam?.dataStartDate ? [selectDam.dataStartDate, selectDam.dataEndDate] : null;
}
})
passFormItems.value.forEach(item => {
item.default = info[item.field];
if (item.field == 'assessmentFile') {
item.default = item.default || [];
}
})
}
}
const dialogInputChange = (val, item, info) => {
if (item.field != 'assessmentMoney' && item.field != 'assessmentDate' && item.field != 'qualityScore') {
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') {
......@@ -668,6 +755,8 @@ const passDialogInputChange = (val, item, inlineValue) => {
let M = (val?.getMonth() + 1 < 10 ? '0' + (val?.getMonth() + 1) : val?.getMonth() + 1);
let D = (val?.getDate() + 1 < 10 ? '0' + val?.getDate() : val?.getDate());
passFormItems.value[2].placeholder = `按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币${inlineValue.assessmentMoney ? inlineValue.assessmentMoney : '***'}元。本次评估结论在评估基准日后一年内有效,即自${val ? `${val?.getFullYear()}${M}${D}日至${val?.getFullYear() + 1}${M}${D}` : '20*年*月*日至20*年*月*日'}止。超过一年,需重新举行资产评估。`;
} else if (item.field == 'qualityScore') {
formItems.value[5].placeholder = `本次评估数据资产总体质量得分为${val}分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`;
}
}
......@@ -704,6 +793,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) {
......@@ -733,6 +831,15 @@ const dialogBtnClick = (btn, info) => {
}
}) || [],
evaluationAgencyGuid: info.evaluationAgencyGuid,
assessmentMoney: info.assessmentMoney,
assessmentDate: info.assessmentDate,
assessmentNote: info.assessmentNote,
assessmentFile: info.assessmentFile.map(file => {
return {
name: file.name,
url: file.url
}
}) || []
}
} else {
//未通过质量评估发起资产申请
......@@ -758,6 +865,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) => {
......@@ -1219,7 +1335,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" />
......
......@@ -6,6 +6,7 @@
import { Warning } from "@element-plus/icons-vue";
import TableTools from '@/components/Tools/table_tools.vue';
import {
batchSaveBizRuleConfig,
saveBizRuleConfig,
getDbDirTreeList,
getDbDirTablePageList,
......@@ -1148,7 +1149,7 @@ const drawerBtnClick = async (btn, info) => {
}
try {
const res: any = await saveBizRuleConfig(params);
const res: any = await batchSaveBizRuleConfig(params);
if (res.code == proxy.$passCode) {
btn.loading = false;
proxy.$ElMessage.success('配置成功!');
......
......@@ -24,9 +24,9 @@ const fileFormRef = ref();
const fileFormItems: any = ref([
{
label: '选择文件上传',
tip: '支持扩展名:xlsx、xls,文件大小不超过20MB',
tip: '支持扩展名:xlsx、xls、csv,文件大小不超过20MB',
type: 'upload-file',
accept: '.xlsx, .xls',
accept: '.xlsx, .xls, .csv',
limit: 1,
limitSize: 20,
isExcel: true,
......
......@@ -282,7 +282,8 @@ const findDDatabasePath = (data: any[], targetGuid: string, path: string[] = [],
if (item.classifyDetailGuid === targetGuid) {
return {
path,
route
route,
item
}; // 找到目标节点,返回路径
}
if (item.children && item.children.length > 0) {
......@@ -295,34 +296,11 @@ const findDDatabasePath = (data: any[], targetGuid: string, path: string[] = [],
return null; // 未找到目标节点
};
// 存储分级数据
const gradeInfo = ref<any>();
const handleClassifyChange = (row, value) => {
console.log('row2', row, value)
const pathInfo = findDDatabasePath(treeSelectOptions.value, value)
const handleCascaderChange = (row, value) => {
const pathInfo = findDDatabasePath(treeSelectOptions.value, value?.length ? value[value.length - 1] : '')
row.classifyDetailNameRoutes = pathInfo.path;
row.classifyDetailGuidRoutes = pathInfo.route;
// if (!row.classifyDetailGuid) {
// row.gradeGuid = null;
// row.gradeOptions = [];
// return;
// }
// if (gradeInfo.value) {
// refGradeGuid.value = findRefGradeGuid(treeSelectOptions.value, row.classifyDetailGuid);
// row.classifyDetailName = refGradeGuid.value.classifyName;
// getGradeList({ classifyGradeGuid: refGradeGuid.value.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => {
// if (res.code === proxy.$passCode) {
// row.gradeOptions = res.data.records || [];
// } else {
// ElMessage.error(res.msg);
// }
// });
// }
};
const handleNodeClick = (row, node, data) => {
console.log('row1', row, node, data)
// 在gradeInfo找到item.guid === row.gradeGuid
let node = pathInfo.item;
if (gradeInfo.value) {
const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid);
if (matchedItem) {
......@@ -342,8 +320,57 @@ const handleNodeClick = (row, node, data) => {
}
});
}
};
}
// 存储分级数据
const gradeInfo = ref<any>();
// const handleClassifyChange = (row, value) => {
// console.log('row2', row, value)
// const pathInfo = findDDatabasePath(treeSelectOptions.value, value)
// row.classifyDetailNameRoutes = pathInfo.path;
// row.classifyDetailGuidRoutes = pathInfo.route;
// // if (!row.classifyDetailGuid) {
// // row.gradeGuid = null;
// // row.gradeOptions = [];
// // return;
// // }
// // if (gradeInfo.value) {
// // refGradeGuid.value = findRefGradeGuid(treeSelectOptions.value, row.classifyDetailGuid);
// // row.classifyDetailName = refGradeGuid.value.classifyName;
// // getGradeList({ classifyGradeGuid: refGradeGuid.value.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => {
// // if (res.code === proxy.$passCode) {
// // row.gradeOptions = res.data.records || [];
// // } else {
// // ElMessage.error(res.msg);
// // }
// // });
// // }
// };
// const handleNodeClick = (row, node, data) => {
// console.log('row1', row, node, data)
// // 在gradeInfo找到item.guid === row.gradeGuid
// if (gradeInfo.value) {
// const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid);
// if (matchedItem) {
// row.gradeDetailGuid = matchedItem.guid;
// row.gradeDetailName = matchedItem.name;
// }
// } else {
// getGradeList({ classifyGradeGuid: node.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => {
// if (res.code === proxy.$passCode) {
// gradeInfo.value = res.data.records || [];
// row.gradeOptions = res.data.records || [];
// const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid);
// row.gradeDetailGuid = matchedItem.guid;
// row.gradeDetailName = matchedItem.name;
// } else {
// ElMessage.error(res.msg);
// }
// });
// }
// }
const isPrevious = ref(false);
/** 上一步 */
......@@ -983,7 +1010,7 @@ onActivated(() => {
</el-table-column>
<!-- 数据库表列 -->
<el-table-column prop="tableChName" label="数据库表" width="280">
<el-table-column prop="tableChName" label="数据库表" width="200">
<template #header>
<span>主题表名称</span>
<span style="color:red;margin-left: 2px;">*</span>
......@@ -1165,15 +1192,25 @@ onActivated(() => {
<!-- 分类(不可编辑)classifyName -->
<el-table-column prop="classifyDetailNameRoutes" label="分类" width="150" show-overflow-tooltip>
<el-table-column prop="classifyDetailNameRoutes" label="分类" width="200" show-overflow-tooltip>
<template #default="scope">
<!-- 如果当前行是编辑状态,显示 tree-select -->
<div v-if="scope.row.isEdit">
<el-tree-select v-model="scope.row.classifyDetailGuid" :data="treeSelectOptions"
<el-cascader
ref="cascaderRef" v-model="scope.row.classifyDetailGuid" :options="treeSelectOptions" :props="{
checkStrictly: false,
expandTrigger: 'hover',
label: 'classifyName',
value: 'classifyDetailGuid',
}"
:show-all-levels="true" :disabled="false"
:clearable="true"
@change="val => handleCascaderChange(scope.row, val)" />
<!-- <el-tree-select v-model="scope.row.classifyDetailGuid" :data="treeSelectOptions"
:props="treeSelectProps" placeholder="请选择分类" clearable filterable
@change="(value) => handleClassifyChange(scope.row, value)"
@node-click="(node, data) => handleNodeClick(scope.row, node, data)">
</el-tree-select>
</el-tree-select> -->
</div>
<!-- 否则直接显示分类名称 -->
<div v-else>
......@@ -1360,15 +1397,25 @@ onActivated(() => {
<!-- 分类(不可编辑)classifyName -->
<el-table-column prop="classifyDetailNameRoutes" label="分类" width="150" show-overflow-tooltip>
<el-table-column prop="classifyDetailNameRoutes" label="分类" width="200" show-overflow-tooltip>
<template #default="scope">
<!-- 如果当前行是编辑状态,显示 tree-select -->
<div v-if="scope.row.isEdit">
<el-tree-select v-model="scope.row.classifyDetailGuid" :data="treeSelectOptions"
<el-cascader
ref="cascaderRef" v-model="scope.row.classifyDetailGuid" :options="treeSelectOptions" :props="{
checkStrictly: false,
expandTrigger: 'hover',
label: 'classifyName',
value: 'classifyDetailGuid',
}"
:show-all-levels="true" :disabled="false"
:clearable="true"
@change="val => handleCascaderChange(scope.row, val)" />
<!-- <el-tree-select v-model="scope.row.classifyDetailGuid" :data="treeSelectOptions"
:props="treeSelectProps" placeholder="请选择分类" clearable filterable
@change="(value) => handleClassifyChange(scope.row, value)"
@node-click="(node, data) => handleNodeClick(scope.row, node, data)">
</el-tree-select>
</el-tree-select> -->
</div>
<!-- 否则直接显示分类名称 -->
<div v-else>
......
......@@ -219,27 +219,27 @@ const findDDatabasePath = (data: any[], targetGuid: string, path: string[] = [],
};
const gradeInfo = ref<any>();
const handleClassifyChange = (row, value) => {
const pathInfo = findDDatabasePath(treeSelectOptions.value, value)
row.classifyDetailNameRoutes = pathInfo.path;
row.classifyDetailGuidRoutes = pathInfo.route;
// 查找选中的节点
// const selectedNode = getTreeNode(treeSelectOptions.value, value);
// if (selectedNode) {
// getGradeList({ classifyGradeGuid: selectedNode.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => {
// if (res.code === proxy.$passCode) {
// gradeInfo.value = res.data.records || [];
// row.gradeOptions = res.data.records || [];
// } else {
// ElMessage.error(res.msg);
// }
// });
// row.classifyDetailName = selectedNode.classifyName;
// } else {
// console.error("未找到对应的节点");
// row.classifyDetailName = ""; // 重置分类名
// }
};
// const handleClassifyChange = (row, value) => {
// const pathInfo = findDDatabasePath(treeSelectOptions.value, value)
// row.classifyDetailNameRoutes = pathInfo.path;
// row.classifyDetailGuidRoutes = pathInfo.route;
// // 查找选中的节点
// // const selectedNode = getTreeNode(treeSelectOptions.value, value);
// // if (selectedNode) {
// // getGradeList({ classifyGradeGuid: selectedNode.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => {
// // if (res.code === proxy.$passCode) {
// // gradeInfo.value = res.data.records || [];
// // row.gradeOptions = res.data.records || [];
// // } else {
// // ElMessage.error(res.msg);
// // }
// // });
// // row.classifyDetailName = selectedNode.classifyName;
// // } else {
// // console.error("未找到对应的节点");
// // row.classifyDetailName = ""; // 重置分类名
// // }
// };
const gradeOptions = ref<any>()
// 获取分级
......@@ -253,17 +253,43 @@ const getGrade = async () => {
}
}
const handleNodeClick = (row, node, data) => {
setTimeout(() => {
// 在gradeInfo找到item.guid === row.gradeGuid
// const handleNodeClick = (row, node, data) => {
// setTimeout(() => {
// // 在gradeInfo找到item.guid === row.gradeGuid
// const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid);
// if (matchedItem) {
// row.gradeDetailGuid = matchedItem.guid;
// row.gradeDetailName = matchedItem.name;
// }
// }, 300);
// }
const handleCascaderChange = (row, value) => {
const pathInfo = findDDatabasePath(treeSelectOptions.value, value?.length ? value[value.length - 1] : '')
row.classifyDetailNameRoutes = pathInfo.path;
row.classifyDetailGuidRoutes = pathInfo.route;
let node = pathInfo.item;
if (gradeInfo.value) {
const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid);
if (matchedItem) {
row.gradeDetailGuid = matchedItem.guid;
row.gradeDetailName = matchedItem.name;
}
}, 300);
}
} else {
getGradeList({ classifyGradeGuid: node.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => {
if (res.code === proxy.$passCode) {
gradeInfo.value = res.data.records || [];
row.gradeOptions = res.data.records || [];
const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid);
row.gradeDetailGuid = matchedItem.guid;
row.gradeDetailName = matchedItem.name;
} else {
ElMessage.error(res.msg);
}
});
}
};
const getTreeNode = (tree, value) => {
for (const node of tree) {
......@@ -2054,15 +2080,25 @@ const tableSelectFields = computed(() => {
<div v-else>{{ scope.row.classifyDetailName || '--' }}</div>
</template>
</el-table-column> -->
<el-table-column prop="classifyDetailNameRoutes" label="分类" width="150" show-overflow-tooltip>
<el-table-column prop="classifyDetailNameRoutes" label="分类" width="200" show-overflow-tooltip>
<template #default="scope">
<!-- 如果当前行是编辑状态,显示 tree-select -->
<div v-if="scope.row.isEdit">
<el-tree-select v-if="scope.row['isEdit']" v-model="scope.row['classifyDetailGuid']"
<el-cascader
ref="cascaderRef" v-model="scope.row.classifyDetailGuid" :options="treeSelectOptions" :props="{
checkStrictly: false,
expandTrigger: 'hover',
label: 'classifyName',
value: 'classifyDetailGuid',
}"
:show-all-levels="true" :disabled="false"
:clearable="true"
@change="val => handleCascaderChange(scope.row, val)" />
<!-- <el-tree-select v-if="scope.row['isEdit']" v-model="scope.row['classifyDetailGuid']"
:data="treeSelectOptions" :props="treeSelectProps" placeholder="请选择分类" clearable filterable
@change="(value) => handleClassifyChange(scope.row, value)"
@node-click="(node, data) => handleNodeClick(scope.row, node, data)">
</el-tree-select>
</el-tree-select> -->
</div>
<!-- 否则直接显示分类名称 -->
<div v-else>
......
......@@ -582,8 +582,8 @@ const setUploadInfo = () => {
auto: false,
cover: true,
fileList: [],
accept: '.xlsx, .xls',
tips: '当前支持xls、xlsx文件,默认使用第一个sheet'
accept: '.xlsx, .xls, .csv',
tips: '当前支持xls、xlsx、csv文件,默认使用第一个sheet'
}
}
]
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!