d6e60d1a by lxs

Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop

2 parents 1eac2669 8097a47c
......@@ -73,6 +73,9 @@ VITE_API_MESSAGE = ms-swzl-message-notification-service
#新门户接口
VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service
# 附件模板
VITE_APP_ATTACHMENT_TEMPLATE = ms-daop-personel-service
#人员服务
VITE_APP_PERSONAL_URL = 'ms-daop-personel-service'
......
......@@ -97,6 +97,9 @@ VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal
#新门户接口
VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service
# 附件模板
VITE_APP_ATTACHMENT_TEMPLATE = ms-daop-personel-service
#人员服务
VITE_APP_PERSONAL_URL = 'ms-daop-personel-service'
#数据资产接口地址
......
import { ElMessage } from 'element-plus'
import { getDownloadUrl, download } from "@/utils/common";
import { getImageContent } from "@/api/modules/queryService";
import { getDownFileSignByUrl, obsDownloadRequest, parseAndDecodeUrl } from './obsService';
export const onUploadFilePreview = (file) => {
let url = file.url;
getImageContent(url).then((res: any) => {
// export const onUploadFilePreview = (file) => {
// let url = file.url;
// getImageContent(url).then((res: any) => {
// if (res && !res.msg) {
// let name = file.name;
// var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1).toLowerCase() : '';
// if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf') { //浏览器可以支持图片和pdf预览
// let fileUrl = <string>getDownloadUrl(res, name, fileSuffix);
// let win = window.open(fileUrl, name);
// win && (win.document.title = name);
// } else {
// download(res, name, fileSuffix);
// }
// } else {
// res?.msg && ElMessage.error(res?.msg);
// }
// })
// }
// export const onUploadFileDownload = (file) => {
// let url = file.url;
// getImageContent(url).then((res: any) => {
// if (res && !res.msg) {
// let name = file.name;
// var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
// download(res, name, fileSuffix);
// } else {
// res?.msg && ElMessage.error(res?.msg);
// }
// })
// }
export const onUploadFileDownload = async (params) => {
const {name, url} = params;
const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(url).fileName);
if (!refSignInfo?.data) {
refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
return;
}
obsDownloadRequest(refSignInfo?.data).then((res: any) => {
if (res && !res.msg) {
var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
download(res, name, fileSuffix);
} else {
res?.msg && ElMessage.error(res?.msg);
}
})
}
export const onUploadFilePreview = async (params) => {
console.log(params, 'params');
const {name, url} = params;
// let f = formInline.value[item.field].find(i => i.name == file.name);
// let url = f.url;
let fileName: string = parseAndDecodeUrl(url).fileName;
const refSignInfo: any = await getDownFileSignByUrl(fileName);
if (!refSignInfo?.data) {
refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
return;
}
obsDownloadRequest(refSignInfo?.data).then((res: any) => {
if (res && !res.msg) {
let name = file.name;
var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1).toLowerCase() : '';
if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf') { //浏览器可以支持图片和pdf预览
let fileUrl = <string>getDownloadUrl(res, name, fileSuffix);
......@@ -18,18 +75,5 @@ export const onUploadFilePreview = (file) => {
} else {
res?.msg && ElMessage.error(res?.msg);
}
})
}
export const onUploadFileDownload = (file) => {
let url = file.url;
getImageContent(url).then((res: any) => {
if (res && !res.msg) {
let name = file.name;
var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
download(res, name, fileSuffix);
} else {
res?.msg && ElMessage.error(res?.msg);
}
})
});
}
......
......@@ -186,6 +186,12 @@ export const getProductTypeList = () => request({
method: 'post',
data: { paramCode: "PRODUCT_TYPE" }
})
/**获取模板附件 */
export const getTemplateFile = (params) => request({
url: `${import.meta.env.VITE_APP_ATTACHMENT_TEMPLATE}/attachment-template/list-attachment?tenantGuid=${params.tenantGuid}`,
method: 'get',
})
// 数据要素乘
export const dataElements = [{
......@@ -239,6 +245,9 @@ export const filterVal = (val, type) => {
case 'Y':
approval = '已通过';
break;
case 'N':
approval = '草稿中';
break;
case 'F':
approval = '通过并结束';
break;
......@@ -252,3 +261,4 @@ export const filterVal = (val, type) => {
return approval;
}
}
......
......@@ -9,6 +9,8 @@ import {
} from "@/api/modules/dataAsset";
import { pinyin } from 'pinyin-pro';
import useUserStore from "@/store/modules/user";
import { getDictionaryTree } from '@/api/modules/dataInventory';
import { pa } from 'element-plus/es/locale';
const emits = defineEmits([
"cancelImport",
......@@ -92,16 +94,36 @@ const getFieldTypeList = () => {
}
const getParamsListData = () => {
getParamsList({
dictType: "业务归属"
}).then((res: any) => {
const params = {
paramCode: '数据字典类型'
}
getDictionaryTree(params).then((res: any) => {
paramsList.value = [];
if (res.code == proxy.$passCode) {
paramsList.value = res.data || [];
res.data.forEach((item: any) => {
if (item.children) {
item.children.forEach((child: any) => {
paramsList.value.push({
label: child.name,
value: child.guid
})
})
}
})
} else {
proxy.$ElMessage.error(res.msg);
}
})
// getParamsList({
// dictType: "业务归属"
// }).then((res: any) => {
// paramsList.value = [];
// if (res.code == proxy.$passCode) {
// paramsList.value = res.data || [];
// } else {
// proxy.$ElMessage.error(res.msg);
// }
// })
}
const changeStep = (val) => {
......
......@@ -129,7 +129,7 @@ const baseInfoFormItems = ref([
visible: true
},
{
label: '权主体',
label: '权主体',
type: 'input',
placeholder: '请输入',
field: 'rightMain',
......@@ -296,6 +296,7 @@ const baseInfoFormRules = ref({
propertyDescription: [required('请填写资源描述')],
sceneDescription: [required('请填写应用场景描述')],
sceneLimit: [required('请填写应用场景限制')],
rightMain: [required('请填写权利主体')],
});
const getTableFieldPromise: any = ref({});
......
......@@ -317,7 +317,7 @@ const handleCreate = () => {
<div class="type">{{ item.subjectDomainName || item.subjectDomain }}</div>
<div class="type">{{ item.damTypeName || '--' }}</div>
<div class="type">{{ item.isRegister == 'Y' ? '已登记' : '未登记' }}</div>
<div class="type">{{ item.foundMode == '1' ? '自建' : '加工交付' }}</div>
<div class="type">{{ item.foundMode ? (item.foundMode === '1' ? '自建' : '加工交付') : '--' }}</div>
</div>
<div class="desc">{{ item.propertyDescription }}</div>
<el-popover v-model="cardBtnVisible" placement="bottom" width="96" trigger="click"
......
......@@ -31,7 +31,8 @@ import {
exportDictionaryFileds,
checkDeleteDictionary,
checkDeleteDictionaryScheme,
checkDictionaryData
checkDictionaryData,
getNewDataTypeList
} from '@/api/modules/dataInventory';
const { proxy } = getCurrentInstance() as any;
......@@ -353,6 +354,10 @@ const editTableInfo = ref({
field: 'fieldType',
default: '',
options: [],
props: {
label: 'label',
value: 'value'
},
clearable: true,
required: true
},
......@@ -603,21 +608,14 @@ const setFormItems = (row: any = null) => {
}
// 获取数据类型列表
const getDataType = (type) => {
const getDataType = () => {
let params = {
paramCode: type
dictType: "字段类型"
}
getParamsList(params).then((res: any) => {
getNewDataTypeList(params).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data
if (type == 'DATA_TYPE') {
data.map(item => {
item.label = item.paramName
item.value = item.paramValue
})
dataTypeList.value = data
editTableInfo.value['fieldType'].options = data
}
editTableInfo.value['fieldType'].options = data
} else {
ElMessage({
type: 'error',
......@@ -1751,7 +1749,7 @@ onActivated(() => {
})
onBeforeMount(() => {
getDataType('DATA_TYPE')
getDataType()
getTreeData()
})
......
......@@ -83,8 +83,8 @@ const tableInfo = ref({
}
},
{
label: '上架状态', field: 'listingStatus', type: 'switch', activeValue: 'Y', inactiveValue: 'N', switchWidth: 28, width: 100, align: 'center', isDisabled: (scope) => {
return scope.row.approveState != 'Y';
label: '上架状态', field: 'listingStatus', width: 100, getName: (scope) => {
return scope.row.listingStatus == 'Y' ? '已上架' : '未上架';
}
},
{ label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME },
......@@ -263,20 +263,36 @@ const tableBtnClick = (scope, btn) => {
name: 'productListingDetail',
query: {
guid: row.guid,
type: 'detail'
type: 'detail',
name: row.damName,
exchangeGuid: row.exchangeGuid ? row.exchangeGuid : ''
}
});
}
if (type == "edit" || type == "redit") {
router.push({
name: 'productListingDetail',
query: {
guid: row.guid,
type: type == 'edit' ? 'edit' : 'redit',
case: '2',
name: row.damName
}
});
if (row.exchangeGuid) {
router.push({
name: 'productListingDetail',
query: {
guid: row.guid,
exchangeName: row.exchangeName,
type: type == 'edit' ? 'edit' : 'redit',
case: '1',
name: row.damName,
exchangeGuid: row.exchangeGuid
}
})
} else {
router.push({
name: 'productListingDetail',
query: {
guid: row.guid,
type: type == 'edit' ? 'edit' : 'redit',
case: '2',
name: row.damName
}
});
}
}
if (type == 'del') {
ElMessageBox.confirm(`数据删除后不可恢复,确定是否删除?`, "提示", {
......@@ -496,21 +512,27 @@ onBeforeMount(() => {
const defaultItemLogo = new URL('@/assets/images/home-finance-product.png', import.meta.url).href
const demandListData: any = ref([
{ companyName: '北数所', listedNum: 16, processNum: 1235 },
{ companyName: '深数所', listedNum: 16, processNum: 1235 },
{ companyName: '苏数所', listedNum: 16, processNum: 1235 },
]);
const btnClick = (item) => {
console.log(item)
router.push({
name: "productListingDetail",
query: {
exchangeGuid: item.exchangeGuid,
exchangeName: item.exchangeName,
type: 'add',
groundingPick: '登记得数交所',
},
});
if (item.exchangeGuid) {
router.push({
name: "productListingDetail",
query: {
exchangeGuid: item.exchangeGuid,
exchangeName: item.exchangeName,
type: 'add',
},
});
} else {
router.push({
name: "productListingDetail",
query: {
type: 'add',
case: '2',
},
});
}
}
......@@ -520,10 +542,10 @@ const btnClick = (item) => {
<div class="container_wrap">
<div class="table_tool_wrap">
<TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" />
<div class="tools_btns">
<!-- <div class="tools_btns">
<el-button type="primary" @click="toPatn('add')" v-preReClick>新建</el-button>
<el-button type="primary" @click="toPatn1('add', 'add1')" v-preReClick>新建</el-button>
</div>
</div> -->
</div>
<div class="list-content">
<div class="card-content" v-for="item in demandListData" :key="item.guid">
......@@ -544,9 +566,9 @@ const btnClick = (item) => {
</div>
</div>
</div>
<div class="operator-btn">
<div class="operator-btn" @click="btnClick(item)">
<!-- <div class="left-btn borderRight" @click="btnClick(item)">更新模板</div> -->
<div class="left-btn" @click="btnClick(item)">资产登记</div>
<div class="left-btn">资产登记</div>
</div>
</div>
</div>
......@@ -571,7 +593,7 @@ const btnClick = (item) => {
<style scoped lang="scss">
.table_tool_wrap {
width: 100%;
height: 84px !important;
height: 50px !important;
padding: 0 8px;
.tools_btns {
......@@ -644,6 +666,8 @@ const btnClick = (item) => {
width: 100%;
height: 40px;
line-height: 40px;
background: #4fa1a4;
color: #fff;
cursor: pointer;
// &::after {
// content: '';
......@@ -662,9 +686,9 @@ const btnClick = (item) => {
// text-align: center;
// cursor: pointer;
&:hover {
color: #4fa1a4;
}
// &:hover {
// color: #4fa1a4;
// }
// }
}
......
......@@ -15,7 +15,7 @@ import { changeNum } from '@/utils/common';
import { onUploadFilePreview, onUploadFileDownload } from '@/api/modules/common';
import { getAreaData, getServiceTenants, getSingleList } from "@/api/modules/queryService";
import { getApproveList, getTenantApprove, registerApproveAllow, registerApproveBackup, getParamsList, getServiceDetail } from "@/api/modules/dataAsset";
import { getProductList, getAddedProductList, getListingDetail, listingSave, listingUpdate, listingSavePortal, getParamsDataList, listingUpdateGateway, getDataExchangeProductList } from "@/api/modules/dataProduct";
import { getProductList, getAddedProductList, getListingDetail, listingSave, listingUpdate, listingSavePortal, getParamsDataList, listingUpdateGateway, getDataExchangeProductList, getTemplateFile } from "@/api/modules/dataProduct";
import { getMatchDetail } from "@/api/modules/dataFinance";
import { useValidator } from '@/hooks/useValidator';
import { getCamundaDeploymentId } from "@/api/modules/workFlowService";
......@@ -139,7 +139,7 @@ const exchangeName = computed(() => {
const listingFormRef = ref();
const subForm = ref({});
const formInfo = ref({
const formInfo = ref<any>({
id: 'check-form',
col: 'col3',
items: [
......@@ -297,7 +297,6 @@ const formInfo = ref({
disabled: false,
required: true,
},
{
label: '定价金额',
type: 'input',
......@@ -324,62 +323,17 @@ const formInfo = ref({
disabled: false,
required: true,
},
// {
// label: '产品价格',
// type: 'checkbox-input-item',
// placeholder: '面议',
// field: 'isDiscussPersonally',
// default: 'Y',
// trueValue: 'Y',
// falseValue: 'N',
// children: [
// {
// label: '',
// type: 'input',
// placeholder: '请输入产品参考价',
// field: 'productPrice',
// default: '',
// maxlength: 10,
// disabled: false,
// clearable: true,
// visible: false,
// style: { width: '100%', margin: 0 }
// }
// ],
// required: true,
// col: 'checkbox-input'
// },
// {
// label: '审核后自动上架',
// type: 'switch-checkbox-group',
// field: 'autoGrounding',
// children: [
// {
// label: '',
// type: 'switch',
// field: 'isApproveGrounding',
// default: 'Y',
// activeValue: 'Y',
// inactiveValue: 'N',
// visible: true
// },
// ],
// clearable: false,
// required: true,
// },
{
label: "登记数交所",
type: "input",
placeholder: "请输入",
field: "exchangeName",
default: exchangeName,
default: route.query.exchangeName ? route.query.exchangeName : '',
clearable: true,
disabled: true,
required: true,
visible: true
},
{
}, {
label: '产品描述',
type: 'textarea-rich',
placeholder: '该数据资产主要包含的信息,数据更新方式等',
......@@ -424,7 +378,7 @@ const formInfo = ref({
accept: '.jpg, .png, .jpeg ',
type: 'upload-file',
placeholder: '请选择',
field: 'registrationCertificate',
field: 'registrationCertificateInfo',
default: [],
limit: 1,
block: false,
......@@ -437,7 +391,7 @@ const formInfo = ref({
accept: '.png, .pdf',
type: 'upload-file',
placeholder: '请选择',
field: 'qualityEvaluationFile',
field: 'qualityEvaluationFileInfo',
default: [],
limit: 1,
block: false,
......@@ -448,12 +402,12 @@ const formInfo = ref({
label: "质量评估机构",
type: "select",
placeholder: "请选择",
field: "qualityEvaluationInstitutionGuid",
field: "qualityEvaluationInstitution",
default: '',
options: [],
props: {
value: 'value',
label: 'label'
value: 'tenantName',
label: 'tenantName'
},
allowCreate: true,
filterable: true,
......@@ -472,7 +426,7 @@ const formInfo = ref({
accept: '.png, .pdf',
type: 'upload-file',
placeholder: '请选择',
field: 'costAssessmentFile',
field: 'costAssessmentFileInfo',
default: [],
limit: 1,
block: false,
......@@ -483,11 +437,11 @@ const formInfo = ref({
label: "价值评估机构",
type: "select",
placeholder: "请选择",
field: "costAssessmentInstitutionGuid",
field: "costAssessmentInstitution",
default: '',
options: [],
props: {
value: 'guid',
value: 'tenantName',
label: 'tenantName'
},
allowCreate: true,
......@@ -503,12 +457,12 @@ const formInfo = ref({
accept: '.png, .pdf',
type: 'upload-file',
placeholder: '请选择',
field: 'commitmentLetter',
field: 'commitmentLetterInfo',
templateUrl: 'http://www.baidu.com',
default: [],
limit: 1,
block: true,
required: false,
required: true,
visible: true
},
{
......@@ -517,12 +471,12 @@ const formInfo = ref({
accept: '.png, .pdf',
type: 'upload-file',
placeholder: '请选择',
field: 'accreditFile',
field: 'accreditFileInfo',
templateUrl: 'http://www.baidu.com',
default: [],
limit: 1,
block: true,
required: false,
required: true,
visible: true
},
{
......@@ -531,12 +485,12 @@ const formInfo = ref({
accept: '.png, .pdf',
type: 'upload-file',
placeholder: '请选择',
field: 'productDetail',
field: 'productDetailInfo',
templateUrl: 'http://www.baidu.com',
default: [],
limit: 1,
block: true,
required: false,
required: true,
visible: true
},
{
......@@ -568,14 +522,29 @@ const formInfo = ref({
priceUnit: [
{ required: true, message: "请选择价格单位", trigger: "change", },
],
damType: [
{ required: true, message: "请选择资产类型", trigger: "change", },
],
damCode: [
{ required: true, message: "请填写证书编号", trigger: "blur", },
],
dateRange: [
{ required: true, message: "请选择数据时间范围", trigger: "change", },
],
dataScale: [
{ required: true, message: "请填写数据规模", trigger: "blur", },
],
exchangeName: [
{ required: true, message: "请填写登记数交所", trigger: "blur", },
],
content: [
{
validator: (rule: any, value: any, callback: any) => {
let formInline = listingFormRef.value.formInline;
if (formInline.damType == '1' || formInline.damType == '2') {
callback();
return;
}
// if (formInline.damType == '1' || formInline.damType == '2') {
// callback();
// return;
// }
if (!value?.length) {
callback(new Error('请填写产品描述'))
} else {
......@@ -584,14 +553,15 @@ const formInfo = ref({
}, trigger: 'change'
},
],
feeDesc: [
{
validator: (rule: any, value: any, callback: any) => {
let formInline = listingFormRef.value.formInline;
if (formInline.damType == '1' || formInline.damType == '2') {
callback();
return;
}
// if (formInline.damType == '1' || formInline.damType == '2') {
// callback();
// return;
// }
if (!value?.length) {
callback(new Error('请填写收费说明'))
} else {
......@@ -611,6 +581,46 @@ const formInfo = ref({
// }, trigger: 'change'
// },
// ],
// 校验承诺函
commitmentLetterInfo: [
{
validator: (rule: any, value: any, callback: any) => {
let formInline = listingFormRef.value.formInline;
if (!value?.length) {
callback(new Error('请上传承诺函'))
} else {
callback();
}
}, trigger: 'change'
},
],
// 校验授权文件
accreditFileInfo: [
{
validator: (rule: any, value: any, callback: any) => {
let formInline = listingFormRef.value.formInline;
if (!value?.length) {
callback(new Error('请上传授权文件'))
} else {
callback();
}
}, trigger: 'change'
},
],
// 校验商品详细介绍
productDetailInfo: [
{
validator: (rule: any, value: any, callback: any) => {
let formInline = listingFormRef.value.formInline;
if (!value?.length) {
callback(new Error('请上传商品详细介绍'))
} else {
callback();
}
}, trigger: 'change'
},
],
}
})
......@@ -695,7 +705,7 @@ const getTableInfo = () => {
})
}
const getProductDetail = () => {
const getProductDetail = async () => {
flowDetailLoading.value = true;
getListingDetail({ guid }).then((res: any) => {
flowDetailLoading.value = false;
......@@ -704,7 +714,21 @@ const getProductDetail = () => {
flowDetail.value = data;
deploymentId.value = data.approveVO.camundaDeploymentId
processInstanceId.value = data.approveVO.camundaInstanceId
console.log(data, '-----------------');
// if (res.data.qualityEvaluationFile && res.data.qualityEvaluationFile.length) {
// flowDetail.value.qualityEvaluationFile = { name: res.data.qualityEvaluationFile[0].name, url: res.data.qualityEvaluationFile[0].url }
// }
// if (res.data.costAssessmentFile && res.data.costAssessmentFile.length) {
// flowDetail.value.costAssessmentFile = { name: res.data.costAssessmentFile[0].name, url: res.data.costAssessmentFile[0].url }
// }
// if (res.data.commitmentLetter && res.data.commitmentLetter.length) {
// flowDetail.value.commitmentLetter = { name: res.data.commitmentLetter[0].name, url: res.data.commitmentLetter[0].url }
// }
// if (res.data.accreditFile && res.data.accreditFile.length) {
// flowDetail.value.accreditFile = { name: res.data.accreditFile[0].name, url: res.data.accreditFile[0].url }
// }
// if (res.data.productDetail && res.data.productDetail.length) {
// flowDetail.value.productDetail = { name: res.data.productDetail[0].name, url: res.data.productDetail[0].url }
// }
let coverageArea = data.coverageArea || [];
if (data.coverageArea?.[0]?.[0] == 'all') {
setFormItems({ ...flowDetail.value, coverageArea: coverageArea }, true);
......@@ -731,13 +755,16 @@ const getProductDetail = () => {
message: res.msg,
});
}
}).catch((res) => {
flowDetailLoading.value = false;
ElMessage({
type: "error",
message: '获取详情失败',
});
});
})
// .catch((res) => {
// flowDetailLoading.value = false;
// console.log(res, '-----------------');
// ElMessage({
// type: "error",
// message: '获取详情失败',
// });
// });
}
// 获取审批信息
......@@ -879,42 +906,101 @@ const submitForm = (btn, formEl, tosub = false) => {
} else {
if (detailType == 'add') {
// 上架交易所
console.log(params, '--------上架交易所 ---------');
params.immediateApprove = btn.value == 'submit' ? true : 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] : '';
params.commitmentLetter = params.commitmentLetterInfo.length ? [params.commitmentLetterInfo[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;
params.qualityEvaluationInstitutionGuid = qualityEvaluationData.value.find((item: any) => item.tenantName == params.qualityEvaluationInstitution)?.guid || '';
params.costAssessmentInstitutionGuid = costAssessmentData.value.find((item: any) => item.tenantName == params.costAssessmentInstitution)?.guid || '';
delete params.exchangeName;
delete params.registrationCertificateInfo;
delete params.accreditFileInfo;
delete params.commitmentLetterInfo;
delete params.costAssessmentFileInfo;
delete params.productDetailInfo;
delete params.qualityEvaluationFileInfo;
console.log(params, '-------rwrwerwer----------');
listingSave(params).then((res: any) => {
if (res.code == proxy.$passCode) {
ElMessage({
type: "success",
message: '提交成功',
});
flowDetailLoading.value = false;
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
assetStore.set(true);
router.push({
name: "productListing",
query: {},
});
} else {
ElMessage({
type: "error",
message: res.msg,
});
flowDetailLoading.value = false;
}
}).catch((res) => {
ElMessage({
type: "error",
message: '提交失败',
});
flowDetailLoading.value = false;
});
} else {
// listingUpdate
// 上架交易所
params.guid = guid;
params.immediateApprove = btn.value == 'submit' ? true : false;
params.accreditFile = params.accreditFile.length ? { name: params.accreditFile[0].name, url: params.accreditFile[0].url } : {};
params.commitmentLetter = params.commitmentLetter.length ? { name: params.commitmentLetter[0].name, url: params.commitmentLetter[0].url } : {};
params.costAssessmentFile = params.costAssessmentFile.length ? { name: params.costAssessmentFile[0].name, url: params.costAssessmentFile[0].url } : {};
params.productDetail = params.productDetail.length ? { name: params.productDetail[0].name, url: params.productDetail[0].url } : {};
params.qualityEvaluationFile = params.qualityEvaluationFile.length ? { name: params.qualityEvaluationFile[0].name, url: params.qualityEvaluationFile[0].url } : {};
params.registrationCertificate = params.registrationCertificate.length ? { name: params.registrationCertificate[0].name, url: params.registrationCertificate[0].url } : {};
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.productDetail = params.productDetailInfo.length ? [params.productDetailInfo[0].url] : [];
params.evaluationFile = params.qualityEvaluationFileInfo.length ? [params.qualityEvaluationFileInfo[0].url] : [];
params.exchangeGuid = route.query.exchangeGuid;
console.log(params, '-----------------');
// listingSave(params).then((res: any) => {
// if (res.code == proxy.$passCode) {
// ElMessage({
// type: "success",
// message: '提交成功',
// });
// flowDetailLoading.value = false;
// userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
// assetStore.set(true);
// router.push({
// name: "productListing",
// query: {},
// });
// } else {
// ElMessage({
// type: "error",
// message: res.msg,
// });
// flowDetailLoading.value = false;
// }
// }).catch((res) => {
// ElMessage({
// type: "error",
// message: '提交失败',
// });
// flowDetailLoading.value = false;
// });
params.qualityEvaluationInstitutionGuid = qualityEvaluationData.value.find((item: any) => item.tenantName == params.qualityEvaluationInstitution)?.guid || '';
params.costAssessmentInstitutionGuid = costAssessmentData.value.find((item: any) => item.tenantName == params.costAssessmentInstitution)?.guid || '';
delete params.exchangeName;
delete params.registrationCertificateInfo;
delete params.accreditFileInfo;
delete params.commitmentLetterInfo;
delete params.costAssessmentFileInfo;
delete params.productDetailInfo;
delete params.qualityEvaluationFileInfo;
console.log(params, '-------rwrwerwer----------');
listingUpdate(params).then((res: any) => {
if (res.code == proxy.$passCode) {
ElMessage({
type: "success",
message: '提交成功',
});
flowDetailLoading.value = false;
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
assetStore.set(true);
router.push({
name: "productListing",
query: {},
});
} else {
ElMessage({
type: "error",
message: res.msg,
});
flowDetailLoading.value = false;
}
}).catch((res) => {
ElMessage({
type: "error",
message: '提交失败',
});
flowDetailLoading.value = false;
});
}
}
......@@ -979,9 +1065,10 @@ const btnClick = (btn) => {
const setFormItems = (row: any = null, isDetail = false) => {
console.log(row, '--------1---------');
formInfo.value.items.map((item: any) => {
formInfo.value.items.forEach((item: any) => {
if (item.field == 'productImg') {
item.default = row ? (row.productPic ? [row.productPic] : row[item.field] || []) : []
// item.default = row ? (row.productPic ? [row.productPic] : row[item.field] || []) : []
item.default = row.productPic && Object.keys(row.productPic).length ? [row.productPic] : []
} else if (item.field == 'coverageAreas') {
if (row) {
if (row.coverageAreas == 'Y') {
......@@ -1008,12 +1095,6 @@ const setFormItems = (row: any = null, isDetail = false) => {
}
child.visible = item.default == 'N'
})
} else if (item.field == 'isDiscussPersonally') {
item.default = row ? row[item.field] : 'Y'
item.children.map(child => {
child.default = row ? row[child.field] : child.default;
child.visible = item.default == 'N'
})
} else if (item.field == 'dataScale') {
if (isDetail) {
item.defaultValue = row.dataScale;
......@@ -1028,24 +1109,50 @@ const setFormItems = (row: any = null, isDetail = false) => {
} else {
item.default = row ? row[item.field] : (item.default || '')
}
} else if (item.field == 'dateRange') {
console.log(row, '--------2-22--------');
if (row.dateRange) {
item.default = row.dateRange;
}
if (row.timeAreaStart && row.timeAreaEnd) {
item.default = [row.timeAreaStart, row.timeAreaEnd];
}
// else {
// item.default = row ? [row.timeAreaStart, row.timeAreaEnd] : null;
// }
} else if (item.field == 'registrationCertificateInfo') {
// item.default = row ? (row.registrationCertificate ? [row.registrationCertificate] : row[item.field] || []) : []
item.default = row.registrationCertificate && Object.keys(row.registrationCertificate).length ? [row.registrationCertificate] : []
}
else if (item.field == 'dateRange') {
item.default = row ? [row.timeAreaStart, row.timeAreaEnd] : null;
else if (item.field == 'costAssessmentFileInfo') {
item.default = row ? (row.assessmentFile ? row.assessmentFile : row[item.field] || []) : []
} else if (item.field == 'commitmentLetterInfo') {
item.default = row ? (row.commitmentLetter ? row.commitmentLetter : row[item.field] || []) : []
}
else if (item.field == 'accreditFileInfo') {
item.default = row ? (row.accreditFile ? row.accreditFile : row[item.field] || []) : []
}
else if (item.field == 'productDetailInfo') {
item.default = row ? (row.productDetail ? row.productDetail : row[item.field] || []) : []
}
else if (item.field == 'qualityEvaluationFileInfo') {
item.default = row ? (row.evaluationFile ? row.evaluationFile : row[item.field] || []) : []
}
else {
item.default = row[item.field] !== undefined ? row[item.field] : (item.default || '');
// if (item && item.hasOwnProperty('default')) {
// item.default = row ? row[item.field] : (item.default || '');
// } else {
// console.warn(`Item does not have the 'default' property`);registrationCertificate
// }
}
// else {
// if (item && item.hasOwnProperty('default')) {
// item.default = row ? row[item.field] : (item.default || '');
// } else {
// console.warn(`Item does not have the 'default' property`);
// }
// }
})
}
const selectChange = async (val, row, info) => {
if (row.field == 'damName') {
const data = row.options.filter(o => o.damName == val);
console.log(data, '-----------------');
console.log(data, '-------123----------');
let coverageArea = (data.length && data[0].coverageArea) ? data[0].coverageArea : [];
await setFormItems({ ...info, coverageArea: coverageArea });
formInfo.value.items.at(0).default = val;
......@@ -1053,12 +1160,12 @@ const selectChange = async (val, row, info) => {
// formInfo.value.items.at(2).default = data.length ? data[0].subjectDomain : '';
formInfo.value.items.at(2).default = data.length ? data[0].damCode : '';
formInfo.value.items.at(4).defaultValue = data.length ? data[0].dataScale : '';
formInfo.value.items.at(4).default = data.length && data[0].dataScale != null ? changeNum(data[0].dataScale, 0) : '--';
formInfo.value.items.at(4).default = data.length && data[0].dataScale != null ? changeNum(data[0].dataScale, 0) : '';
formInfo.value.items.at(5).defaultValue = data.length ? data[0].caseNumber : '';
formInfo.value.items.at(5).default = data.length && data[0].caseNumber != null ? changeNum(data[0].caseNumber, 0) : '--';
formInfo.value.items.at(5).default = data.length && data[0].caseNumber != null ? changeNum(data[0].caseNumber, 0) : '';
formInfo.value.items.at(-1).default = data.length ? data[0].damGuid : '';
formInfo.value.items.at(-3).required = data[0].damType != '1' && data[0].damType != '2';
formInfo.value.items.at(-4).required = data[0].damType != '1' && data[0].damType != '2';
// formInfo.value.items.at(-3).required = data[0].damType != '1' && data[0].damType != '2';
// formInfo.value.items.at(-4).required = data[0].damType != '1' && data[0].damType != '2';
if (data.length && data[0].coverageArea?.[0]?.[0] != 'all' && data[0].coverageArea) {
let p: any = [];
data[0].coverageArea.forEach(area => {
......@@ -1181,6 +1288,9 @@ onActivated(() => {
case 'edit':
tab.meta.title = `编辑-${damName}`;
break;
case 'redit':
tab.meta.title = `编辑-${damName}`;
break;
case 'check':
tab.meta.title = `详情-${damName}`;
break;
......@@ -1201,7 +1311,7 @@ onBeforeMount(() => {
// case 1: 数交易所 case 2: 门户
if (route.query.case == '2') {
formInfo.value.items.forEach(item => {
if (item.field == 'damCode' || item.field == 'exchangeGuids' || item.field == 'registrationCertificate' || item.field == 'qualityEvaluationFile' || item.field == 'qualityEvaluationInstitutionGuid' || item.field == 'costAssessmentFile' || item.field == 'costAssessmentInstitutionGuid' || item.field == 'commitmentLetter' || item.field == 'accreditFile' || item.field == 'productDetail') {
if (item.field == 'damCode' || item.field == 'exchangeName' || item.field == 'registrationCertificateInfo' || item.field == 'qualityEvaluationFileInfo' || item.field == 'qualityEvaluationInstitution' || item.field == 'costAssessmentFileInfo' || item.field == 'costAssessmentInstitution' || item.field == 'commitmentLetterInfo' || item.field == 'accreditFileInfo' || item.field == 'productDetailInfo') {
item.visible = false;
}
})
......@@ -1291,7 +1401,7 @@ onBeforeMount(() => {
getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12505" }).then((res: any) => {
if (res.code == proxy.$passCode) {
qualityEvaluationData.value = res.data.records || [];
let item = formInfo.value.items.find(item => item.field == 'qualityEvaluationInstitutionGuid');
let item = formInfo.value.items.find(item => item.field == 'qualityEvaluationInstitution');
item && (item.options = qualityEvaluationData.value);
} else {
proxy.$ElMessage.error(res.msg);
......@@ -1301,7 +1411,7 @@ onBeforeMount(() => {
getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12504" }).then((res: any) => {
if (res.code == proxy.$passCode) {
costAssessmentData.value = res.data.records || [];
let item = formInfo.value.items.find(item => item.field == 'costAssessmentInstitutionGuid');
let item = formInfo.value.items.find(item => item.field == 'costAssessmentInstitution');
item && (item.options = costAssessmentData.value);
} else {
proxy.$ElMessage.error(res.msg);
......@@ -1312,8 +1422,41 @@ onBeforeMount(() => {
} else {
getProducts();
}
getTemplateInfo();
})
// 获取模板信息
const getTemplateInfo = () => {
console.log(userData, '--------route.query.exchangeGuid---------');
getTemplateFile({ tenantGuid: userData.tenantGuid }).then((res: any) => {
if (res.code == proxy.$passCode) {
} else {
ElMessage({
type: "error",
message: res.msg,
});
}
})
}
const priceWayInfo = computed(() => {
return pricingMethodList.value.find(item => item.value == flowDetail.value.pricingWay)?.label || '--';
})
const timeRangeInfo = computed(() => {
if (flowDetail.value.timeAreaStart && flowDetail.value.timeAreaEnd) {
const startDate = flowDetail.value.timeAreaStart.split('T')[0];
const endDate = flowDetail.value.timeAreaEnd.split('T')[0];
return `${startDate} - ${endDate}`;
}
return '--';
});
const prcieInfo = computed(() => {
// 还需要把flowDetail.value.productPrice 拼接priceUnitList.value.find(item => item.value == flowDetail.value.priceUnit)?.label
return flowDetail.value.productPrice ? `${flowDetail.value.productPrice} ${priceUnitList.value.find(item => item.value == flowDetail.value.priceUnit)?.label}` : '--';
})
</script>
<template>
......@@ -1379,6 +1522,7 @@ onBeforeMount(() => {
:col="formInfo.col" @selectChange="selectChange" @checkboxChange="checkboxChange"
@switchChange="switchChange" />
</div>
<div class="list_panel" v-else>
<div class="list_item">
<span class="item_label">数据产品名称:</span>
......@@ -1388,13 +1532,13 @@ onBeforeMount(() => {
<span class="item_label">资产类型:</span>
<span class="item_value">{{ flowDetail.damTypeName || '--' }}</span>
</div>
<div class="list_item">
<div class="list_item" v-if="route.query.exchangeGuid">
<span class="item_label">证书编号:</span>
<span class="item_value">{{ flowDetail.damCode || '--' }}</span>
</div>
<div class="list_item">
<span class="item_label">数据时间范围:</span>
<span class="item_value">{{ (flowDetail.timeAreaStart - flowDetail.timeAreaEnd) || '--' }}</span>
<span class="item_value">{{ timeRangeInfo || '--' }}</span>
</div>
<div class="list_item">
<span class="item_label">交付方式:</span>
......@@ -1402,11 +1546,11 @@ onBeforeMount(() => {
</div>
<div class="list_item">
<span class="item_label">定价方式:</span>
<span class="item_value">{{ flowDetail.pricingWayName || '--' }}</span>
<span class="item_value">{{ priceWayInfo || '--' }}</span>
</div>
<div class="list_item">
<span class="item_label">定价金额:</span>
<span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span>
<span class="item_value">{{ prcieInfo || '--' }}</span>
</div>
<!-- <div class="list_item">
<span class="item_label">所属主题:</span>
......@@ -1433,9 +1577,9 @@ onBeforeMount(() => {
'--')
}}</span>
</div> -->
<div class="list_item">
<div class="list_item" v-if="route.query.exchangeGuid">
<span class="item_label">登记数交所:</span>
<span class="item_value">{{ flowDetail.isApproveGrounding == 'Y' ? `自动上架` : '手动上架' }}</span>
<span class="item_value">{{ flowDetail.exchangeName || '--' }}</span>
</div>
<!-- <div class="list_item is_block">
<span class="item_label">上架交易所:</span>
......@@ -1457,7 +1601,7 @@ onBeforeMount(() => {
<span class="item_label">收费说明:</span>
<span class="item_value">{{ flowDetail.feeDesc || '--' }}</span>
</div>
<div class="list_item is_block">
<div class="list_item1 is_block1">
<div class="file_item" v-if="flowDetail.productPic && flowDetail.productPic.name">
<span class="item_label">产品图片:</span>
<span class="item_value">
......@@ -1499,7 +1643,344 @@ onBeforeMount(() => {
</div>
</span>
</div>
<div class="file_item" v-else>
<span class="item_label">产品图片:</span>
<span class="item_value">--</span>
</div>
</div>
<div class="list_item1 is_block1">
<div class="file_item" v-if="route.query.exchangeGuid">
<span class="item_label">登记证照:</span>
<span class="item_value"
v-if="flowDetail.registrationCertificate && flowDetail.registrationCertificate.name">
<div class="file-operate">
<template
v-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'csv'">
<img class="file-img" src="../../assets/images/excel.png" />
</template>
<template
v-else-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'">
<img class="file-img" src="../../assets/images/word.png" />
</template>
<template
v-else-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'zip'">
<img class="file-img" src="../../assets/images/zip.png" />
</template>
<template
v-else-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'rar'">
<img class="file-img" src="../../assets/images/RAR.png" />
</template>
<template
v-else-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'pdf'">
<img class="file-img" src="../../assets/images/PDF.png" />
</template>
<template
v-else-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'png'">
<img class="file-img" src="../../assets/images/png.png" />
</template>
<template
v-else-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'">
<img class="file-img" src="../../assets/images/jpg.png" />
</template>
<div class="file-name">{{ flowDetail.registrationCertificate.name }}</div>
<div :style="{ right: '36px' }"
v-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'pdf' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'png' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'"
class="file-preview" @click="onUploadFilePreview(flowDetail.registrationCertificate)">查看</div>
<div :style="{ right: '0px' }" class="file-preview"
@click="onUploadFileDownload(flowDetail.registrationCertificate)">下载
</div>
</div>
</span>
<span class="item_value" v-else>--</span>
</div>
</div>
<div class="list_item1 is_block1">
<!-- <div class="file_item"
v-if="flowDetail.registrationCertificate && flowDetail.registrationCertificate.name">
<span class="item_label">质量评估报告:</span>
<span class="item_value">
<div class="file-operate">
<template
v-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'csv'">
<img class="file-img" src="../../assets/images/excel.png" />
</template>
<template
v-else-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'docx'">
<img class="file-img" src="../../assets/images/word.png" />
</template>
<template
v-else-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'zip'">
<img class="file-img" src="../../assets/images/zip.png" />
</template>
<template
v-else-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'rar'">
<img class="file-img" src="../../assets/images/RAR.png" />
</template>
<template
v-else-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'pdf'">
<img class="file-img" src="../../assets/images/PDF.png" />
</template>
<template
v-else-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'png'">
<img class="file-img" src="../../assets/images/png.png" />
</template>
<template
v-else-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'">
<img class="file-img" src="../../assets/images/jpg.png" />
</template>
<div class="file-name">{{ flowDetail.qualityEvaluationFile[0].name }}</div>
<div :style="{ right: '36px' }"
v-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'pdf' || flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'png' || flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'"
class="file-preview" @click="onUploadFilePreview(flowDetail.qualityEvaluationFile[0])">查看</div>
<div :style="{ right: '0px' }" class="file-preview"
@click="onUploadFileDownload(flowDetail.qualityEvaluationFile[0])">下载</div>
</div>
</span>
</div> -->
<div class="file_item" v-if="route.query.exchangeGuid">
<span class="item_label">质量评估报告:</span>
<span class="item_value">
<div class="file-operate">
<template v-if="flowDetail?.evaluationFile?.length > 0">
<template
v-if="flowDetail.evaluationFile[0].name?.substring(flowDetail.evaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
<img class="file-img" src="../../assets/images/PDF.png" />
</template>
<template
v-else-if="flowDetail.evaluationFile[0].name?.substring(flowDetail.evaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
<img class="file-img" src="../../assets/images/png.png" />
</template>
<template
v-else-if="['jpg', 'jpeg'].includes(flowDetail.evaluationFile[0].name?.substring(flowDetail.evaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase())">
<img class="file-img" src="../../assets/images/jpg.png" />
</template>
<div class="file-name">{{ flowDetail.evaluationFile[0].name }}</div>
<div
v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(flowDetail.evaluationFile[0].name?.substring(flowDetail.evaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase())"
:style="{ right: '36px' }" class="file-preview"
@click="onUploadFilePreview(flowDetail.evaluationFile[0])">
查看
</div>
<div :style="{ right: '0px' }" class="file-preview"
@click="onUploadFileDownload(flowDetail.evaluationFile[0])">
下载
</div>
</template>
<template v-else>
--
</template>
</div>
</span>
</div>
</div>
<div class="list_item1 is_block1">
<div class="file_item" v-if="route.query.exchangeGuid">
<span class="item_label">质量评估机构:</span>
<span class="item_value">
{{ flowDetail.qualityEvaluationInstitution || '--' }}
</span>
</div>
</div>
<div class="list_item1 is_block1">
<!-- <div class="file_item"
v-if="flowDetail.registrationCertificate && flowDetail.registrationCertificate.name">
<span class="item_label">价值评估报告:</span>
<span class="item_value">
<div class="file-operate">
<template
v-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'csv'">
<img class="file-img" src="../../assets/images/excel.png" />
</template>
<template
v-else-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'docx'">
<img class="file-img" src="../../assets/images/word.png" />
</template>
<template
v-else-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'zip'">
<img class="file-img" src="../../assets/images/zip.png" />
</template>
<template
v-else-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'rar'">
<img class="file-img" src="../../assets/images/RAR.png" />
</template>
<template
v-else-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'pdf'">
<img class="file-img" src="../../assets/images/PDF.png" />
</template>
<template
v-else-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'png'">
<img class="file-img" src="../../assets/images/png.png" />
</template>
<template
v-else-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'">
<img class="file-img" src="../../assets/images/jpg.png" />
</template>
<div class="file-name">{{ flowDetail.costAssessmentFile[0].name }}</div>
<div :style="{ right: '36px' }"
v-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'pdf' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'png' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'"
class="file-preview" @click="onUploadFilePreview(flowDetail.costAssessmentFile[0])">查看</div>
<div :style="{ right: '0px' }" class="file-preview"
@click="onUploadFileDownload(flowDetail.costAssessmentFile[0])">下载</div>
</div>
</span>
</div> -->
<div class="file_item" v-if="route.query.exchangeGuid">
<span class="item_label">价值评估报告:</span>
<span class="item_value">
<div class="file-operate">
<template v-if="flowDetail?.assessmentFile?.length > 0">
<template
v-if="flowDetail.assessmentFile[0].name?.substring(flowDetail.assessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
<img class="file-img" src="../../assets/images/PDF.png" />
</template>
<template
v-else-if="flowDetail.assessmentFile[0].name?.substring(flowDetail.assessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
<img class="file-img" src="../../assets/images/png.png" />
</template>
<template
v-else-if="['jpg', 'jpeg'].includes(flowDetail.assessmentFile[0].name?.substring(flowDetail.assessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase())">
<img class="file-img" src="../../assets/images/jpg.png" />
</template>
<div class="file-name">{{ flowDetail.assessmentFile[0].name }}</div>
<div
v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(flowDetail.assessmentFile[0].name?.substring(flowDetail.assessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase())"
:style="{ right: '36px' }" class="file-preview"
@click="onUploadFilePreview(flowDetail.assessmentFile[0])">
查看
</div>
<div :style="{ right: '0px' }" class="file-preview"
@click="onUploadFileDownload(flowDetail.assessmentFile[0])">
下载
</div>
</template>
<template v-else>
--
</template>
</div>
</span>
</div>
</div>
<div class="list_item1 is_block1">
<div class="file_item" v-if="route.query.exchangeGuid">
<span class="item_label">价值估评机构:</span>
<span class="item_value">
{{ flowDetail.costAssessmentInstitution || '--' }}
</span>
</div>
</div>
<div class="list_item is_block">
<div class="file_item" v-if="route.query.exchangeGuid">
<span class="item_label">承诺函:</span>
<span class="item_value">
<div class="file-operate">
<template v-if="flowDetail?.commitmentLetter?.length > 0">
<template
v-if="flowDetail.commitmentLetter[0].name?.substring(flowDetail.commitmentLetter[0].name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
<img class="file-img" src="../../assets/images/PDF.png" />
</template>
<template
v-else-if="flowDetail.commitmentLetter[0].name?.substring(flowDetail.commitmentLetter[0].name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
<img class="file-img" src="../../assets/images/png.png" />
</template>
<template
v-else-if="['jpg', 'jpeg'].includes(flowDetail.commitmentLetter[0].name?.substring(flowDetail.commitmentLetter[0].name.lastIndexOf('.') + 1).toLowerCase())">
<img class="file-img" src="../../assets/images/jpg.png" />
</template>
<div class="file-name">{{ flowDetail.commitmentLetter[0].name }}</div>
<div
v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(flowDetail.commitmentLetter[0].name?.substring(flowDetail.commitmentLetter[0].name.lastIndexOf('.') + 1).toLowerCase())"
:style="{ right: '36px' }" class="file-preview"
@click="onUploadFilePreview(flowDetail.commitmentLetter[0])">
查看
</div>
<div :style="{ right: '0px' }" class="file-preview"
@click="onUploadFileDownload(flowDetail.commitmentLetter[0])">
下载
</div>
</template>
<template v-else>
--
</template>
</div>
</span>
</div>
</div>
<div class="list_item is_block">
<div class="file_item" v-if="route.query.exchangeGuid">
<span class="item_label">授权文件:</span>
<span class="item_value">
<div class="file-operate">
<template v-if="flowDetail?.accreditFile?.length > 0">
<template
v-if="flowDetail.accreditFile[0].name?.substring(flowDetail.accreditFile[0].name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
<img class="file-img" src="../../assets/images/PDF.png" />
</template>
<template
v-else-if="flowDetail.accreditFile[0].name?.substring(flowDetail.accreditFile[0].name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
<img class="file-img" src="../../assets/images/png.png" />
</template>
<template
v-else-if="['jpg', 'jpeg'].includes(flowDetail.accreditFile[0].name?.substring(flowDetail.accreditFile[0].name.lastIndexOf('.') + 1).toLowerCase())">
<img class="file-img" src="../../assets/images/jpg.png" />
</template>
<div class="file-name">{{ flowDetail.accreditFile[0].name }}</div>
<div
v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(flowDetail.accreditFile[0].name?.substring(flowDetail.accreditFile[0].name.lastIndexOf('.') + 1).toLowerCase())"
:style="{ right: '36px' }" class="file-preview"
@click="onUploadFilePreview(flowDetail.accreditFile[0])">
查看
</div>
<div :style="{ right: '0px' }" class="file-preview"
@click="onUploadFileDownload(flowDetail.accreditFile[0])">
下载
</div>
</template>
<template v-else>
--
</template>
</div>
</span>
</div>
</div>
<div class="list_item is_block">
<div class="file_item" v-if="route.query.exchangeGuid">
<span class="item_label">商品详细介绍(盖章版):</span>
<span class="item_value">
<div class="file-operate">
<template v-if="flowDetail?.productDetail?.length > 0">
<template
v-if="flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
<img class="file-img" src="../../assets/images/PDF.png" />
</template>
<template
v-else-if="flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
<img class="file-img" src="../../assets/images/png.png" />
</template>
<template
v-else-if="['jpg', 'jpeg'].includes(flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase())">
<img class="file-img" src="../../assets/images/jpg.png" />
</template>
<div class="file-name">{{ flowDetail.productDetail[0].name }}</div>
<div
v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase())"
:style="{ right: '36px' }" class="file-preview"
@click="onUploadFilePreview(flowDetail.productDetail[0])">
查看
</div>
<div :style="{ right: '0px' }" class="file-preview"
@click="onUploadFileDownload(flowDetail.productDetail[0])">
下载
</div>
</template>
<template v-else>
--
</template>
</div>
</span>
</div>
</div>
</div>
</div>
</div>
......@@ -1577,7 +2058,7 @@ onBeforeMount(() => {
<div class="btns">
<el-button @click="btnClick({ value: 'cancel' })">返回</el-button>
<el-button @click="btnClick({ value: 'draft' })"
v-if="route.query.type == 'add' || route.query.type == 'redit' || route.query.type == 'edit'">保存草稿</el-button>
v-if="route.query.type == 'add' || route.query.type == 'edit'">保存草稿</el-button>
<el-button type="primary" @click="btnClick({ value: 'submit' })">提交流程</el-button>
</div>
</div>
......@@ -1723,6 +2204,74 @@ onBeforeMount(() => {
}
}
.list_item1 {
width: 50%;
line-height: 32px;
font-size: 14px;
color: #666666;
display: flex;
justify-content: space-between;
.item_label {
width: 100px;
text-align: right;
}
.file_item {
width: 100%;
display: flex;
justify-content: space-between;
}
.item_value {
color: var(--el-color-regular);
padding: 0 16px;
flex: 1;
text-align: justify;
.file-operate {
display: flex;
align-items: center;
position: relative;
.file-img {
width: 24px;
height: 24px;
}
&:hover {
background-color: #f5f5f5;
}
.file-name {
color: var(--el-color-regular);
margin-left: 4px;
}
.file-preview {
position: absolute;
cursor: pointer;
color: var(--el-color-primary);
margin-right: 8px;
}
}
.area_text+.area_text {
&::before {
content: '、',
}
}
}
// &.is_block {
// width: 100%;
// .item_value {
// white-space: pre-wrap;
// }
// }
}
:deep(.el-form) {
width: 100%;
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!