e5656a0c by xukangle

fix

1 parent 9a7bc015
......@@ -106,7 +106,7 @@ export const updatQuality = (params) => request({
})
/** 获取可以发起资产质量评价的选项列表。 */
/** type: 1 质量评价;2 资产评估 */
/** type: 1 质量评价;2 价值评估 */
export const getRegisteredList = (type) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/get-valid-list?type=${type}`,
method: 'get'
......
......@@ -252,6 +252,9 @@ export const filterVal = (val, type) => {
case 'Y':
approval = '已通过';
break;
case 'C':
approval = '已撤销';
break;
case 'N':
approval = '草稿中';
break;
......
......@@ -197,6 +197,13 @@ const inputChange = (val, row) => {
formInline.value[row.field] = val = parseFloat(val || 0).toFixed(2);
}
}
// 新增的 inputType 处理逻辑:integerWithComma
if (row.inputType == "integerWithComma") {
val = val.replace(/[^\d]/g, ""); // 移除非数字字符
val = val.replace(/^0+(?!$)/, ""); // 去除前导零,但保留单个零输入
val = val.replace(/\B(?=(\d{3})+(?!\d))/g, ","); // 添加千位分隔符
formInline.value[row.field] = val;
}
if (row.field == "mobileNo") {
formInline.value.logonUser = formInline.value.mobileNo;
}
......@@ -241,6 +248,14 @@ const inputEventChange = (val, item) => {
formInline.value[item.field] = formInline.value[item.field].toString().replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")
formInline.value[item.field] = formInline.value[item.field].toString().replace(/^\D*(\d{0,12}(?:\.\d{0,2})?).*$/g, "$1")
return;
} else if (item.inputType == 'integerWithComma') { // 整数,带千位分隔符
// 移除非数字字符
formInline.value[item.field] = val.replace(/[^\d]/g, "");
// 去除前导零
formInline.value[item.field] = formInline.value[item.field].replace(/^0+(?!$)/, "");
// 添加千位分隔符
formInline.value[item.field] = formInline.value[item.field].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
return;
}
if (item.min != null && (formInline.value[item.field] < item.min)) {
formInline.value[item.field] = item.min;
......@@ -1281,7 +1296,8 @@ const panelChange = (scope, row) => {
<template #trigger>
<el-button :disabled="child.disabled" :icon="Upload" class="mr8">上传文件</el-button>
</template>
<el-button :icon="Download" v-if="child.templateUrl" @click="(child.templateUrl == 'auto' && child.templateClick) ? child.templateClick() : downloadTemplate(child.templateUrl)">
<el-button :icon="Download" v-if="child.templateUrl"
@click="(child.templateUrl == 'auto' && child.templateClick) ? child.templateClick() : downloadTemplate(child.templateUrl)">
下载模板
</el-button>
<template #tip>
......@@ -1362,7 +1378,8 @@ const panelChange = (scope, row) => {
<template #trigger>
<el-button :disabled="item.disabled" :icon="Upload" class="mr8">上传文件</el-button>
</template>
<el-button :icon="Download" v-if="item.templateUrl" @click="(item.templateUrl == 'auto' && item.templateClick) ? item.templateClick() : downloadTemplate(item.templateUrl)">
<el-button :icon="Download" v-if="item.templateUrl"
@click="(item.templateUrl == 'auto' && item.templateClick) ? item.templateClick() : downloadTemplate(item.templateUrl)">
下载模板
</el-button>
<template #tip>
......@@ -2480,9 +2497,9 @@ const panelChange = (scope, row) => {
margin-right: 8px;
}
.extra-textarea-class {
margin-top: 21px !important;
}
// .extra-textarea-class {
// margin-top: 21px !important;
// }
:deep(.form-and-select) {
display: flex;
......
......@@ -21,6 +21,7 @@ import {
} from "@/api/modules/queryService";
import useUserStore from "@/store/modules/user";
import useDataAssetStore from "@/store/modules/dataAsset";
import { passFlowData, rejectFlowData, revokeFlowData } from '@/api/modules/workFlowService';
const assetStore = useDataAssetStore();
......@@ -43,8 +44,40 @@ const tableFields = ref([
{ label: "资产名称", field: "daName", width: 160, align: "left" },
{ label: "登记时间", field: "registerTime", width: 120 },
// { label: "企业名称", field: "tenantName", width: 240, align: "left" },
{ label: "发证主体", field: "issuingEntityName", width: 250, align: "left" },
{ label: "状态", field: "approveState", type: "tag", width: 96, align: 'center' },
{ label: "评估机构", field: "issuingEntityName", width: 250, align: "left" },
{
label: "状态", field: "approveState", type: "tag", width: 96, align: 'center', getName: (scope) => {
const approveVO = scope.row.approveVO || {}
switch (approveVO.approveState) {
case 'N':
return '草稿中';
case 'A':
return '审批中';
case 'Y':
return '已通过';
case 'R':
return '已驳回';
case 'C':
return '已撤销';
case 'I':
return '--';
default:
return '草稿中';
}
}, tagType: (scope) => {
const approveVO = scope.row.approveVO || {}
switch (approveVO.approveState) {
case 'A':
return 'warning';
case 'Y':
return 'success';
case 'R':
return 'danger';
default:
return 'info';
}
}
},
]);
onBeforeMount(() => {
......@@ -147,6 +180,14 @@ const handleCreate = () => {
formItems.value[0].default = '';
formItems.value[1].visible = true;
formItems.value[1].default = [];
formItems.value[2].visible = false;
formItems.value[2].default = '';
formItems.value[3].visible = false;
formItems.value[3].default = '';
formItems.value[4].visible = false;
formItems.value[4].default = '';
formItems.value[5].visible = false;
formItems.value[5].default = [];
dialogInfo.value.visible = true;
dialogInfo.value.type = '';
}
......@@ -179,7 +220,7 @@ const tableInfo = ref({
actionInfo: {
label: "操作",
type: "btn",
width: 160,
width: 180,
btns: (scope) => {
let row = scope.row;
return getTableBtns(row);
......@@ -187,31 +228,73 @@ const tableInfo = ref({
}
});
const getTableBtns = (row) => {
// 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" });
// }
// if (row.approveTenantGuids?.includes(userData.tenantGuid)) {
// btnsArr.push({ label: "通过", value: "pass" });
// btnsArr.push({ label: "驳回", value: "backup" });
// }
// } 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 (row.tenantGuid == userData.tenantGuid) {
// btnsArr.push({ label: "删除", value: "delete" });
// }
// }
// return btnsArr;
// }
const getTableBtns = (row, includeDetail = true) => {
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 currentStaffGuid = userData.staffGuid
const bizApproveState = row.approveState;
const approveState = approveVO?.approveState || 'N';
const approveStaffGuids = approveVO?.approveStaffGuids || [];
const staffGuid = approveVO?.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: "edit" }, { label: "删除", value: "delete" }]
} else {
btnsArr.push({ label: "详情", value: "detail" })
if (flowState === 2) {
btnsArr.push(...[{ label: "通过", value: "pass" }, { label: "驳回", value: "reject" }])
if (isShowCancel) {
btnsArr.push({ label: "撤销", value: "revoke" })
}
} else if (flowState === 3) {
if (bizApproveState != 'D') {
btnsArr.push({ label: "重新提交", value: "edit" })
}
btnsArr.push({ label: "删除", value: "delete" })
}
return btnsArr;
}
return btnsArr
}
const currTableData: any = ref({});
const tableBtnClick = (scope, btn) => {
......@@ -260,7 +343,7 @@ const tableBtnClick = (scope, btn) => {
message: '已取消撤销'
});
});
} else if (type === 'path_detail') { // 详情
} else if (type === 'detail') { // 详情
router.push({
name: 'registerValueDetail',
query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid }
......@@ -268,6 +351,71 @@ const tableBtnClick = (scope, btn) => {
}
};
// const tableBtnClick = (scope, btn) => {
// const type = btn.value;
// const row = scope.row;
// currTableData.value = row;
// if (type === "edit") { //草稿中\已驳回\已撤销\已通过 状态,才可以编辑。
// localStorage.setItem('isRestart', btn.label == '重新提交' ? 'true' : '');
// // router.push({
// // name: 'registerStart',
// // query: { guid: row.guid, exchangeGuid: row.exchangeGuid, name: row.daName, type }
// // });
// router.push({
// name: 'registerValueDetail',
// query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid, exchangeGuid: row.exchangeGuid }
// });
// } else if (type == "delete") {
// delTableOpen("此操作将永久删除该资产登记,是否继续?", "warning");
// } else if (type === 'revoke') { // 撤销,状态为审批中时可以撤销。
// ElMessageBox.confirm('确定撤销该资产登记审批流程吗?', "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: 'warning',
// }).then(() => {
// tableInfo.value.loading = true;
// let params = {
// guid: row.approveVO.approveGuid,
// flowType: row.approveVO.flowType,
// approveStaffGuid: userData.staffGuid,
// }
// revokeFlowData(params).then((res: any) => {
// tableInfo.value.loading = false;
// if (res?.code == proxy.$passCode) {
// if (res.data) {
// ElMessage.success('该审批流程撤销成功!');
// getTableData();
// } else {
// ElMessage.error('该审批流程撤销失败!');
// }
// } else {
// ElMessage.error(res.msg);
// }
// }).catch(() => {
// tableInfo.value.loading = false;
// });
// }).catch(() => {
// ElMessage({
// type: 'info',
// message: '已取消撤销'
// });
// });
// } else if (type === 'detail') { // 详情, 若是草稿中,详情就是编辑,
// // router.push({
// // name: 'registerInfoDetail',
// // query: { guid: row.guid, name: row.daName, type: 'asset' }
// // });
// router.push({
// name: 'registerValueDetail',
// query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid }
// });
// } else if (type === 'pass') {
// passDialogInfo.value.visible = true;
// } else if (type == 'reject') {
// rejectDialogInfo.value.visible = true;
// }
// };
const delTableOpen = (msg, type, isBatch: boolean = false) => {
ElMessageBox.confirm(msg, "提示", {
confirmButtonText: "确定",
......@@ -315,21 +463,74 @@ const formItems = ref([{
options: assetListData.value,
props: {
value: 'guid',
label: 'daName'
label: 'damName'
},
visible: true,
required: true
}, {
label: '附件上传',
tip: '支持格式:xls .xlsx .doc .docx .rar .zip',
tip: '支持格式:.doc .docx .rar',
type: 'upload-file',
required: true,
accept: '.xls, .xlsx, .doc, .docx, .rar, .zip',
accept: '.doc, .docx, .rar, .png',
block: true,
default: [],
templateUrl: null,
field: 'costAssessmentFile',
}]);
},
// 质量评分 type: input
{
label: '质量评分',
type: 'input',
focusValue: true,
placeholder: '请输入',
field: 'qualityScore',
inputType: 'scoreNumber',
default: '',
clearable: true,
required: true,
block: false,
visible: false
},
// 评估时间范围
{
label: "数据时间范围",
type: "date-picker",
field: "evaluationRange",
default: '',
placeholder: "开始时间~结束时间",
clearable: true,
required: true,
visible: false
},
//
{
label: '质量评估结果',
type: 'textarea',
placeholder: '请输入质量评估结果',
field: 'evaluationNote',
default: '',
maxlength: 250,
block: true,
focusValue: true,
clearable: true,
required: true,
visible: false
},
{
label: '质量报告上传',
tip: '支持格式:pdf,单个文件不能超过200MB ',
type: 'upload-file',
required: true,
accept: '.pdf, .png',
block: true,
default: [],
templateUrl: null,
field: 'evaluationFile',
visible: false
},
]);
const formRules = ref({
registerGuid: [
......@@ -373,6 +574,30 @@ const dialogInfo = ref({
},
});
const handleSelectChange = (val, row, info) => {
let qualityEvaluationGuid = '';
assetListData.value.forEach((item) => {
if (item.guid == val) {
qualityEvaluationGuid = item.qualityEvaluationGuid;
}
});
if (!qualityEvaluationGuid) {
formItems.value[0].default = val;
formItems.value[2].visible = true;
formItems.value[3].visible = true;
formItems.value[4].visible = true;
formItems.value[5].visible = true;
} else {
formItems.value[0].default = val;
formItems.value[2].visible = false;
formItems.value[3].visible = false;
formItems.value[4].visible = false;
formItems.value[5].visible = false;
}
}
const passDialogInputChange = (val, item, inlineValue) => {
if (item.field == 'assessmentMoney') {
let M = "";
......@@ -424,14 +649,35 @@ const dialogBtnClick = (btn, info) => {
return;
}
let daInfo = assetListData.value.find(a => a.guid == info.registerGuid);
savePromise.value = saveCostAssess({
let params: any = {};
if (daInfo.qualityEvaluationGuid) {
//通过质量评估
params = {
immediateApprove: true,
tenantGuid: userData.tenantGuid,
registerGuid: info.registerGuid,
daName: daInfo.daName,
registerTime: daInfo.registerTime,
issuingEntityGuid: daInfo.exchangeGuid,
costAssessmentFile: info.costAssessmentFile?.map(f => f.url) || []
}).then((res: any) => {
daName: daInfo.damName,
damGuid: daInfo.guid,
costAssessmentFile: info.costAssessmentFile?.map(f => f.url) || [],
evaluationFile: info.evaluationFile?.map(f => f.url) || [],
qualityScore: info.qualityScore,
evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null,
evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
evaluationNote: info.evaluationNote,
}
} else {
//未通过质量评估
params = {
immediateApprove: true,
tenantGuid: userData.tenantGuid,
registerGuid: info.registerGuid,
daName: daInfo.damName,
damGuid: daInfo.guid,
costAssessmentFile: info.costAssessmentFile?.map(f => f.url) || [],
}
}
console.log('daInfo', daInfo, info);
savePromise.value = saveCostAssess(params).then((res: any) => {
savePromise.value = null;
if (res?.code == proxy.$passCode) {
ElMessage.success('价值评估发起成功');
......@@ -572,15 +818,42 @@ const passDialogInfo = ref({
},
});
// const passDialogBtnClick = (btn, info) => {
// if (btn.value == 'submit') {
// costAssessAllow({
// guid: currTableData.value.guid,
// assessmentMoney: info.assessmentMoney,
// assessmentDate: info.assessmentDate,
// assessmentNote: info.assessmentNote,
// assessmentFile: info.assessmentFile.map(f => f.url),
// }).then((res: any) => {
// if (res?.code == proxy.$passCode) {
// if (res.data) {
// ElMessage.success('审批成功');
// passDialogInfo.value.visible = false;
// getTableData();
// } else {
// ElMessage.error('审批失败');
// }
// } else {
// ElMessage.error(res.msg);
// }
// })
// } else if (btn.value == 'cancel') {
// passDialogInfo.value.visible = false;
// }
// };
const passDialogBtnClick = (btn, info) => {
if (btn.value == 'submit') {
costAssessAllow({
guid: currTableData.value.guid,
assessmentMoney: info.assessmentMoney,
assessmentDate: info.assessmentDate,
assessmentNote: info.assessmentNote,
assessmentFile: info.assessmentFile.map(f => f.url),
}).then((res: any) => {
tableInfo.value.loading = true;
let params = {
guid: currTableData.value.approveVO.approveGuid,
flowType: currTableData.value.approveVO.flowType,
approveSuggest: info.approveSuggest,
approveStaffGuid: userData.staffGuid,
}
passFlowData(params).then((res: any) => {
tableInfo.value.loading = false;
if (res?.code == proxy.$passCode) {
if (res.data) {
ElMessage.success('审批成功');
......@@ -592,12 +865,17 @@ const passDialogBtnClick = (btn, info) => {
} else {
ElMessage.error(res.msg);
}
})
}).catch(() => {
tableInfo.value.loading = false;
});
} else if (btn.value == 'cancel') {
passDialogInfo.value.visible = false;
}
};
const rejectDialogInfo = ref({
visible: false,
size: 460,
......@@ -634,31 +912,66 @@ const rejectDialogInfo = ref({
},
});
// const rejectDialogBtnClick = (btn, info) => {
// if (btn.value == 'submit') {
// if (info.approveSuggest == '') {
// ElMessage.error('请填写驳回理由');
// return
// }
// tableInfo.value.loading = true;
// let params = {
// bizGuid: currTableData.value.guid,
// funcCode: currTableData.value.funcCode,
// approveSuggest: info.approveSuggest
// }
// registerApproveBackup(params).then((res: any) => {
// tableInfo.value.loading = false;
// if (res?.code == proxy.$passCode) {
// if (res.data) {
// ElMessage.success('驳回成功');
// getTableData();
// rejectDialogInfo.value.visible = false;
// } else {
// ElMessage.error('驳回失败');
// }
// } else {
// ElMessage.error(res.msg);
// }
// });
// } else if (btn.value == 'cancel') {
// rejectDialogInfo.value.visible = false;
// }
// };
const rejectDialogBtnClick = (btn, info) => {
if (btn.value == 'submit') {
if (info.approveSuggest == '') {
ElMessage.error('请填写驳回理由');
return
}
console.log('currTableData', currTableData.value, info);
tableInfo.value.loading = true;
let params = {
bizGuid: currTableData.value.guid,
funcCode: currTableData.value.funcCode,
approveSuggest: info.approveSuggest
guid: currTableData.value.approveVO.approveGuid,
flowType: currTableData.value.approveVO.flowType,
approveSuggest: info.approveSuggest,
approveStaffGuid: userData.staffGuid,
}
registerApproveBackup(params).then((res: any) => {
rejectFlowData(params).then((res: any) => {
tableInfo.value.loading = false;
if (res?.code == proxy.$passCode) {
if (res.data) {
ElMessage.success('驳回成功');
getTableData();
rejectDialogInfo.value.visible = false;
getTableData();
} else {
ElMessage.error('驳回失败');
}
} else {
ElMessage.error(res.msg);
}
}).catch(() => {
tableInfo.value.loading = false;
});
} else if (btn.value == 'cancel') {
rejectDialogInfo.value.visible = false;
......@@ -678,7 +991,7 @@ const rejectDialogBtnClick = (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" @selectChange="handleSelectChange" />
<Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange="passDialogInputChange" />
<Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" />
</div>
......
......@@ -9,7 +9,7 @@ import useUserStore from "@/store/modules/user";
import { ElMessage, ElMessageBox } from "element-plus";
import useDataAssetStore from "@/store/modules/dataAsset";
import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList, getListingCount, productRejectFlowData } from "@/api/modules/dataProduct";
import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList, getListingCount, productRejectFlowData, listingUpdateGateway, listingSave, listingUpdate } from "@/api/modules/dataProduct";
import { TableColumnWidth } from '@/utils/enum';
import TableTools from "@/components/Tools/table_tools.vue";
......@@ -20,6 +20,7 @@ import {
changeNum,
} from "@/utils/common";
import { passFlowData, rejectFlowData, revokeFlowData } from "@/api/modules/workFlowService";
import { content } from "html2canvas/dist/types/css/property-descriptors/content";
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
......@@ -149,7 +150,6 @@ const tableInfo = ref({
if (flowState !== 1) {
list.push({ label: "详情", value: "detail" })
}
return list
},
}
......@@ -359,6 +359,92 @@ const tableBtnClick = (scope, btn) => {
if (type == 'up') {
// tableSwitchChange('Y', scope, 'listingStatus')
console.log('上架', scope)
let params: any = {}
if (scope.row.exchangeGuid) {
// 数交所上架 [params.commitmentLetterInfo[0].url]
params = {
guid: scope.row.guid,
accreditFile: [scope.row.accreditFile[0].url],
caseNumber: scope.row.caseNumber,
commitmentLetter: [scope.row.commitmentLetter[0].url],
content: scope.row.productDesc,
costAssessmentInstitution: scope.row.costAssessmentInstitution,
costAssessmentInstitutionGuid: scope.row.costAssessmentInstitutionGuid,
coverageArea: scope.row.coverageArea,
damCode: scope.row.damCode,
damGuid: scope.row.damGuid,
damName: scope.row.damName,
damType: scope.row.damType,
dataScale: scope.row.dataScale,
deliveryWay: scope.row.deliveryWay,
evaluationFile: [scope.row.evaluationFile[0].url],
exchangeGuid: scope.row.exchangeGuid,
feeDesc: scope.row.feeDesc,
immediateApprove: true,
priceUnit: scope.row.priceUnit,
pricingWay: scope.row.pricingWay,
productPic: scope.row.productPic,
productPrice: scope.row.productPrice,
qualityEvaluationInstitution: scope.row.qualityEvaluationInstitution,
qualityEvaluationInstitutionGuid: scope.row.qualityEvaluationInstitutionGuid,
timeAreaStart: scope.row.timeAreaStart,
timeAreaEnd: scope.row.timeAreaEnd,
registrationCertificate: scope.row.registrationCertificate,
productDetail: [scope.row.productDetail[0].url],
assessmentFile: [scope.row.assessmentFile[0].url],
}
listingUpdate(params).then((res: any) => {
if (res.code == proxy.$passCode) {
ElMessage({
type: "success",
message: '提交成功',
});
getTableData();
} else {
ElMessage({
type: "error",
message: res.msg,
});
}
})
} else {
// 门户数据专区上架
params = {
guid: scope.row.guid,
caseNumber: scope.row.caseNumber,
content: scope.row.productDesc,
coverageArea: scope.row.coverageArea,
damGuid: scope.row.damGuid,
damName: scope.row.damName,
damType: scope.row.damType,
dataScale: scope.row.dataScale,
deliveryWay: scope.row.deliveryWay,
feeDesc: scope.row.feeDesc,
immediateApprove: true,
priceUnit: scope.row.priceUnit,
pricingWay: scope.row.pricingWay,
productPic: scope.row.productPic,
productPrice: scope.row.productPrice,
timeAreaStart: scope.row.timeAreaStart,
timeAreaEnd: scope.row.timeAreaEnd,
}
listingUpdateGateway(params).then((res: any) => {
if (res.code == proxy.$passCode) {
ElMessage({
type: "success",
message: '提交成功',
});
getTableData();
} else {
ElMessage({
type: "error",
message: res.msg,
});
}
})
console.log('上架', scope)
}
}
if (type == 'down') {
// 需要二次确认
......@@ -394,7 +480,7 @@ const passSubmit = () => {
formInfo.value.items.forEach((item) => {
assetsSafeInfo.value.forEach((item1) => {
if (item.label == item1.label) {
complianceInfoMap[`"${item1.value}"`] = listingFormRef.value.formInline[item.field];
complianceInfoMap[item1.value] = listingFormRef.value.formInline[item.field];
}
})
})
......@@ -404,6 +490,7 @@ const passSubmit = () => {
approveSuggest: approveSuggest.value,
approveStaffGuid: userData.staffGuid,
complianceInfoMap: complianceInfoMap,
approveState: 'Y',
bizGuid: row.approveVO.bizGuid,
}).then((res: any) => {
if (res.code == '00000') {
......@@ -444,7 +531,7 @@ const rejectSubmit = async () => {
formInfo.value.items.forEach((item) => {
assetsSafeInfo.value.forEach((item1) => {
if (item.label == item1.label) {
complianceInfoMap[`"${item1.value}"`] = listingFormRef.value.formInline[item.field];
complianceInfoMap[item1.value] = listingFormRef.value.formInline[item.field];
}
})
})
......@@ -455,6 +542,7 @@ const rejectSubmit = async () => {
approveStaffGuid: userData.staffGuid,
complianceInfoMap: complianceInfoMap,
bizGuid: row.approveVO.bizGuid,
approveState: 'R'
}).then((res: any) => {
if (res.code == '00000') {
fullscreenLoading.value = false;
......
......@@ -218,6 +218,7 @@ const formInfo = ref<any>({
field: 'dataScale',
maxlength: 19,
regexp: /\D/g,
inputType: 'integerWithComma',
default: '',
disabled: false,
required: true
......@@ -227,6 +228,9 @@ const formInfo = ref<any>({
placeholder: '请输入',
field: 'caseNumber',
default: '',
inputType: 'integerWithComma',
maxlength: 19,
regexp: /\D/g,
disabled: false,
required: false
}, {
......@@ -834,9 +838,9 @@ const submitForm = (btn, formEl, tosub = false) => {
// if (params.content) {
// params.productDesc = truncateHTML(params.content, 400);
// }
console.log(params, formInfo.value.items.at(4).defaultValue, formInfo.value, '-----------------');
params.dataScale = formInfo.value.items.at(4).defaultValue || formInfo.value.items.at(4).default;
params.caseNumber = formInfo.value.items.at(5).defaultValue || formInfo.value.items.at(4).default;
console.log(params, formInfo.value.items.at(3).defaultValue, formInfo.value, '-----------------');
params.caseNumber = parseInt(params.caseNumber.replace(/,/g, ''), 10),
params.dataScale = parseInt(params.dataScale.replace(/,/g, ''), 10),
params.timeAreaStart = params.dateRange ? params.dateRange[0] : '';
params.timeAreaEnd = params.dateRange ? params.dateRange[1] : '';
// 删除dateRange字段
......@@ -960,7 +964,7 @@ const submitForm = (btn, formEl, tosub = false) => {
params.registrationCertificate = params.registrationCertificateInfo.length ? { name: params.registrationCertificateInfo[0].name, url: params.registrationCertificateInfo[0].url } : {};
params.accreditFile = params.accreditFileInfo.length ? [params.accreditFileInfo[0].url] : null;
params.commitmentLetter = params.commitmentLetterInfo.length ? [params.commitmentLetterInfo[0].url] : [];
params.costAssessmentFile = params.costAssessmentFileInfo.length ? [params.costAssessmentFileInfo[0].url] : [];
params.assessmentFile = params.costAssessmentFileInfo.length ? [params.costAssessmentFileInfo[0].url] : [];
params.productDetail = params.productDetailInfo.length ? [params.productDetailInfo[0].url] : [];
params.evaluationFile = params.qualityEvaluationFileInfo.length ? [params.qualityEvaluationFileInfo[0].url] : [];
params.exchangeGuid = route.query.exchangeGuid;
......
......@@ -18,6 +18,7 @@ import { changeNum } from "@/utils/common";
import useUserStore from "@/store/modules/user";
import Moment from "moment";
import platformIndexNewBigScreen from "./platformIndexNewBigScreen.vue";
import { getDownFileSignByUrl, obsDownloadRequest, parseAndDecodeUrl } from "@/api/modules/obsService";
// import platformIndex from "./data_asset/platformIndex.vue";
const router = useRouter();
......@@ -415,7 +416,7 @@ const assetTableRef = ref();
const rolltimer = ref();
onBeforeMount(() => {
if (userData.tenantType == 1) {
if (userData.tenantType != 1) {
// 获取数据表格
getAssetTableData();
......@@ -486,6 +487,46 @@ function fetchQualityInfo() {
}
// 获取注册文档 URL
// function fetchRegisterUrl() {
// docUrlLoading.value = true;
// getRegisterUrl({
// startTime: startTime.value || '',
// endTime: endTime.value || '',
// }).then((res: any) => {
// docUrlLoading.value = false;
// if (res.code == proxy.$passCode) {
// const data = res.data || [];
// if (data.length) {
// const promises = data.map(async (d) => {
// d.documentTypeDesc = d.documentType === 1 ? 'A证' : d.documentType === 2 ? 'B证' : 'C证';
// // const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(d.documentFile[0]).fileName);
// // if (!refSignInfo?.data) {
// // refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
// // return;
// // }
// // const res: any = await obsDownloadRequest(refSignInfo?.data);
// return getImageContent(d.documentFile[0]).then((res: any) => (res ? URL.createObjectURL(res) : null));
// });
// Promise.all(promises).then((urls: any[]) => {
// docUrl.value = urls;
// docUrlList.value = urls.map((url) => [{ url }]);
// nextTick(() => {
// processImgDesc();
// });
// });
// } else {
// docUrl.value = [];
// docUrlList.value = [];
// }
// } else {
// ElMessage.error(res.msg);
// }
// });
// }
// 获取注册文档 URL
function fetchRegisterUrl() {
docUrlLoading.value = true;
getRegisterUrl({
......@@ -496,9 +537,19 @@ function fetchRegisterUrl() {
if (res.code == proxy.$passCode) {
const data = res.data || [];
if (data.length) {
const promises = data.map((d) => {
console.log(data, 'data');
const promises = data.map(async (d) => {
d.documentTypeDesc = d.documentType === 1 ? 'A证' : d.documentType === 2 ? 'B证' : 'C证';
return getImageContent(d.documentFile[0]).then((res: any) => (res ? URL.createObjectURL(res) : null));
// 使用注释替换的代码逻辑
const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(d.documentFile[0]).fileName);
if (!refSignInfo?.data) {
refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
return null;
}
const res: any = await obsDownloadRequest(refSignInfo?.data);
console.log(res, 'res');
return res ? URL.createObjectURL(res) : null;
});
Promise.all(promises).then((urls: any[]) => {
......@@ -518,6 +569,7 @@ function fetchRegisterUrl() {
});
}
const processImgDesc = () => {
let domImg = document.getElementById('register-img');
if (!domImg) {
......@@ -648,7 +700,7 @@ const handleChangeTime = (val) => {
<template>
<div style="width: 100%;height: 100%">
<div class="right-filter-main" v-if="userData.tenantType == 1">
<div class="right-filter-main" v-if="userData.tenantType != 1">
<div class="right-filter">
<div class="filter-btns">
<div class="btn" :class="{ 'is-active': filterDate == 'today' }" @click="handleFilterClick('today')">今日</div>
......@@ -662,7 +714,7 @@ const handleChangeTime = (val) => {
ref="datePickerRef" />
</div>
</div>
<div v-if="userData.tenantType == 1" class="main-content">
<div v-if="userData.tenantType != 1" class="main-content">
<div class="one-row">
<div class="row-per">
<div class="header">
......@@ -778,9 +830,9 @@ const handleChangeTime = (val) => {
<el-image class="top-img" :src="img.url" :zoom-rate="1.2" :max-scale="10" :min-scale="0.2"
:preview-src-list="docUrl" :initial-index="i" :preview-teleported="true" />
<div class="right-content">
<div class="title">{{ docData[i].damName }}</div>
<div class="desc">{{ docData[i].applicationScenarios || '--' }}</div>
<div class="desc1">{{ docData[i].issuingEntity || '--' }}</div>
<div class="title">{{ docData[i]?.damName || '--' }}</div>
<div class="desc">{{ docData[i]?.applicationScenarios || '--' }}</div>
<div class="desc1">{{ docData[i]?.issuingEntity || '--' }}</div>
<!-- <el-tag class="dam-tag">{{ docData[i].documentTypeDesc }}</el-tag> -->
</div>
</template>
......@@ -818,7 +870,7 @@ const handleChangeTime = (val) => {
</div>
</div>
<!-- <platformIndex v-else-if="userData.tenantType != 1" /> -->
<platformIndexNewBigScreen v-else-if="userData.tenantType != 1" />
<platformIndexNewBigScreen v-else-if="userData.tenantType == 1" />
<div v-else class="main-placeholder">
<img width="210" height="100" src="../../public/swzl_logo.png" />
</div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!