feat: There is no way the,#50742

This commit is contained in:
super_liu
2021-11-05 10:52:10 +08:00
parent 6f7cd05a01
commit b8b1792eb5
3 changed files with 520 additions and 324 deletions
+1 -1
View File
@@ -6655,7 +6655,7 @@ var PDFPageView = function () {
watermark_y_space: 180,//水印y轴间隔 watermark_y_space: 180,//水印y轴间隔
watermark_color: 'rgba(192, 192, 192)',//水印字体颜色 watermark_color: 'rgba(192, 192, 192)',//水印字体颜色
watermark_alpha: 0.5,//水印透明度 watermark_alpha: 0.5,//水印透明度
watermark_fontsize: '20px',//水印字体大小 watermark_fontsize: '25px',//水印字体大小
watermark_font: '微软雅黑',//水印字体 watermark_font: '微软雅黑',//水印字体
watermark_width: 120,//水印宽度 watermark_width: 120,//水印宽度
watermark_height: 80,//水印长度 watermark_height: 80,//水印长度
+1 -1
View File
@@ -1,6 +1,6 @@
<template> <template>
<div class="details"> <div class="details">
<com-header :isCollapsed="sideClose"></com-header> <!-- <com-header :isCollapsed="sideClose"></com-header>-->
<div class="main"> <div class="main">
<div class="details-container" :class="{ 'side-close': sideClose }"> <div class="details-container" :class="{ 'side-close': sideClose }">
<router-view /> <router-view />
+222 -26
View File
@@ -17,9 +17,9 @@
:key="index" :key="index"
v-if="item.isShowImp === '0'" v-if="item.isShowImp === '0'"
> >
<div class="modular-header" v-if="item.label !== '基础信息'"> <el-collapse v-model="activeNames" @change="handleChange">
<div class="modular-header-title"><i class="icon-modular-title"/><span>{{ item.label }}</span></div> <el-collapse-item :name="item.label">
</div> <template slot="title">
<div class="modular-header" v-if="item.label === '基础信息'"> <div class="modular-header" v-if="item.label === '基础信息'">
<div class="modular-header-title"><i class="icon-modular-title"/><span>{{ item.label }}</span></div> <div class="modular-header-title"><i class="icon-modular-title"/><span>{{ item.label }}</span></div>
<div class="details-content-modular basic-information" style="border-top:none"> <div class="details-content-modular basic-information" style="border-top:none">
@@ -38,6 +38,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="modular-header" v-if="item.label !== '基础信息'">
<div class="modular-header-title"><i class="icon-modular-title"/><span>{{ item.label }}</span></div>
</div>
</template>
<div class="modular-content"> <div class="modular-content">
<template v-if="item.label === '基础信息'" > <template v-if="item.label === '基础信息'" >
<div class="details-content-modular basic-information" style="border-top:none"> <div class="details-content-modular basic-information" style="border-top:none">
@@ -51,13 +55,33 @@
<span v-else>{{ sarStandardsInfoEO.standSort + ' ' + sarStandardsInfoEO.standNumber }}</span> <span v-else>{{ sarStandardsInfoEO.standSort + ' ' + sarStandardsInfoEO.standNumber }}</span>
</p> </p>
<!-- <p><label style=" margin-right: 150px;">标准年份</label><span>{{ sarStandardsInfoEO.standYear || '-' }}</span></p>--> <!-- <p><label style=" margin-right: 150px;">标准年份</label><span>{{ sarStandardsInfoEO.standYear || '-' }}</span></p>-->
<p class="half"><label style=" margin-right: 150px;">标准性质</label><span>{{ <template v-for="(child, childIndex) in item.child1">
standMap[sarStandardsInfoEO.standNature] || '-' <p class="half files-title"
}}</span></p> v-for="(file, fileIndex) in child.value"
>
<label style=" margin-right: 102px;">{{ child.attrName }}</label>
<span>
<a style="font-size: 16px;color: #409EFF;cursor: pointer" @click="openFileInPdf(file.id, file.oldFileName)" target="_blank" :title="file.oldFileName">{{ file.oldFileName | ellipsis }}</a>
<i
title="下载"
@click="downloadFile(file.id)"
class="icon-download"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : 'a772afab2a6708883335500f3f86e771'"
/>
<i
title="下载带水印"
@click="downloadFileByWater(file.id, file.fileSuffix)"
class="icon-download2"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? '02fd6eff0537c283dd071683de10689f' : '824f3bf9edef83fc7488917136167232'"
/>
<!-- <span class="time-text">上传时间{{ dateFormat(file.modifyTime) }}</span>-->
</span>
</p>
</template>
<p><label style=" margin-right: 150px;">中文名称</label><span>{{ <p><label style=" margin-right: 150px;">中文名称</label><span>{{
sarStandardsInfoEO.standName || '-' sarStandardsInfoEO.standName || '-'
}}</span></p> }}</span></p>
<p style="border: none;"><label style=" margin-right: 150px;">英文名称</label><span>{{ <p><label style=" margin-right: 150px;">英文名称</label><span>{{
sarStandardsInfoEO.standEnName || '-' sarStandardsInfoEO.standEnName || '-'
}}</span></p> }}</span></p>
<p class="half"> <p class="half">
@@ -68,15 +92,26 @@
</p> </p>
<p class="half"><label style=" margin-right: 150px;">发布日期</label><span>{{ <p class="half"><label style=" margin-right: 150px;">发布日期</label><span>{{
sarStandardsInfoEO.issueTime || '-' sarStandardsInfoEO.issueTime || '-'
}}</span></p>
<p class="half"><label style=" margin-right: 150px;">标准性质</label><span>{{
standMap[sarStandardsInfoEO.standNature] || '-'
}}</span></p>
<p class="half" v-if="saveStandType === 'INLAND_STAND'"><label style=" margin-right: 150px;">标准体系</label><span>{{
sarStandardsInfoEO.standSystem || '-'
}}</span></p> }}</span></p>
<p class="half"> <p class="half">
<label style=" margin-right: 84px;">是否纳入认证清单</label><span>{{ <label style=" margin-right: 84px;">是否纳入认证清单</label><span>{{
sarStandardsInfoEO.isRelateAccess ? (sarStandardsInfoEO.isRelateAccess === '1' ? '是' : '否') : '-' sarStandardsInfoEO.isRelateAccess ? (sarStandardsInfoEO.isRelateAccess === '1' ? '是' : '否') : '-'
}}</span> }}</span>
</p> </p>
<p class="half" v-if="saveStandType === 'INLAND_STAND'"><label style=" margin-right: 150px;">标准体系</label><span>{{ <template v-for="(child, childIndex) in item.child2">
sarStandardsInfoEO.standSystem || '-' <p class="half">
}}</span></p> <label style=" margin-right: 143px;">{{child.attrName}}</label><span>
{{ child.value || '-' }}
</span>
</p>
</template>
<!-- <p><label>文本说明</label><span style="color: #999999">{{ sarStandardsInfoEO.synopsis || '-' }}</span></p>--> <!-- <p><label>文本说明</label><span style="color: #999999">{{ sarStandardsInfoEO.synopsis || '-' }}</span></p>-->
<!-- <p><label>重要度</label><span>{{ sarStandardsInfoEO.isRelateAccess === '1' ? 'A' : 'B'}}</span></p>--> <!-- <p><label>重要度</label><span>{{ sarStandardsInfoEO.isRelateAccess === '1' ? 'A' : 'B'}}</span></p>-->
<!-- <p><label>纳入标准法规清单的国家/地区</label><span>{{ sarStandardsInfoEO.accessCountry || '-' }}</span></p>--> <!-- <p><label>纳入标准法规清单的国家/地区</label><span>{{ sarStandardsInfoEO.accessCountry || '-' }}</span></p>-->
@@ -190,7 +225,7 @@
class="icon-download2" class="icon-download2"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? '02fd6eff0537c283dd071683de10689f' : '824f3bf9edef83fc7488917136167232'" v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? '02fd6eff0537c283dd071683de10689f' : '824f3bf9edef83fc7488917136167232'"
/> />
<span class="time-text">上传时间{{ dateFormat(file.modifyTime) }}</span> <!-- <span class="time-text">上传时间{{ dateFormat(file.modifyTime) }}</span>-->
</template> </template>
<template v-else> <template v-else>
<a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank">{{ file.oldFileName }}</a> <a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank">{{ file.oldFileName }}</a>
@@ -206,7 +241,7 @@
class="icon-download2" class="icon-download2"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : '824f3bf9edef83fc7488917136167232'" v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : '824f3bf9edef83fc7488917136167232'"
/> />
<span class="time-text">上传时间{{ dateFormat(file.modifyTime) }}</span> <!-- <span class="time-text">上传时间{{ dateFormat(file.modifyTime) }}</span>-->
</template> </template>
<!-- <el-button--> <!-- <el-button-->
<!-- @click="showItemsModel(child.attrField)"--> <!-- @click="showItemsModel(child.attrField)"-->
@@ -287,7 +322,7 @@
/> />
<!-- <el-button v-if="file.fileSuffix='pdf'" type="primary" round>OCR</el-button>--> <!-- <el-button v-if="file.fileSuffix='pdf'" type="primary" round>OCR</el-button>-->
<span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span> <!-- <span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span>-->
</template> </template>
<template v-else> <template v-else>
<a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank">{{ file.oldFileName }}</a> <a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank">{{ file.oldFileName }}</a>
@@ -303,7 +338,7 @@
class="icon-download2" class="icon-download2"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : '824f3bf9edef83fc7488917136167232'" v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : '824f3bf9edef83fc7488917136167232'"
/> />
<span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span> <!-- <span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span>-->
</template> </template>
</p> </p>
<!-- <el-button--> <!-- <el-button-->
@@ -318,7 +353,84 @@
</template> </template>
<template <template
v-for="(child, childIndex) in item.one" v-for="(child, childIndex) in item.one"
v-if="child.isShowImp === '0' && item.label !== '关联信息' && (item.label !== '实施日期' || (childIndex < 6 || item.showAll))" v-if="child.isShowImp === '0' && item.label == '文本信息'"
>
<div
:key="child.id"
:class="'modular-item'"
>
<label class="modular-content-p-name" :title="child.attrName">{{ child.attrName }}</label>
<span
v-if="child.attrType !== 'FILE'"
class="modular-content-p-val"
:title="child.value || '-'"
>
{{ child.value || '-' }}
</span>
<div v-else class="modular-content-p-flies">
<p
class="files-title"
v-for="(file, fileIndex) in child.value"
:key="fileIndex"
>
<!-- <span style="cursor: pointer;" @click="openFileInPdf(file.id, file.oldFileName)">|{{file.id}}|</span>-->
<!--发布稿、增补件单独设置下载权限-->
<template v-if="child.attrField === 'XGD' || child.attrField === 'FBGBJBD' || child.attrField === 'BPG'
|| child.attrField === 'SSG'|| child.attrField === 'ZQYJG'|| child.attrField === 'CA'
|| child.attrField === 'JDWJ' || child.attrField === 'GLWJ'">
<a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank">{{ file.oldFileName }}</a>
<i
title="下载"
@click="downloadFile(file.id)"
class="icon-download"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? '02fd6eff0537c283dd071683de10689f' : 'a772afab2a6708883335500f3f86e771'"
/>
<i
title="下载带水印"
@click="downloadFileByWater(file.id, file.fileSuffix)"
class="icon-download2"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : '824f3bf9edef83fc7488917136167232'"
/>
<!-- OCR按钮,根据文件名取后缀判断是否出现-->
<!-- <el-button v-if="judgeSuffix(file.fileName)" type="primary" size="mini" style="margin: 5px" @click="ocrFunction(file)" plain>OCR</el-button>-->
<!-- <span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span>-->
</template>
<template v-else>
<a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank">{{ file.oldFileName }}</a>
<i
title="下载"
@click="downloadFile(file.id)"
class="icon-download"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? '02fd6eff0537c283dd071683de10689f' : 'a772afab2a6708883335500f3f86e771'"
/>
<i
title="下载带水印"
@click="downloadFileByWater(file.id, file.fileSuffix)"
class="icon-download2"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : '824f3bf9edef83fc7488917136167232'"
/>
<!-- <span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span>-->
</template>
</p>
<el-button
v-if="child.attrField === itemNam "
v-for="(itemNam,index) in itemExistList"
:key="index"
@click="showItemsModel(child.attrField)"
class="decomposition-btn"
icon="icon-separate"
>标准分解单
</el-button>
</div>
</div>
</template>
<template
v-for="(child, childIndex) in item.one"
v-if="child.isShowImp === '0' && item.label !== '关联信息' && item.label !== '文本信息' && (item.label !== '实施日期' || (childIndex < 6 || item.showAll))"
> >
<div <div
:key="child.id" :key="child.id"
@@ -367,9 +479,7 @@
> >
<!-- <span style="cursor: pointer;" @click="openFileInPdf(file.id, file.oldFileName)">|{{file.id}}|</span>--> <!-- <span style="cursor: pointer;" @click="openFileInPdf(file.id, file.oldFileName)">|{{file.id}}|</span>-->
<!--发布稿、增补件单独设置下载权限--> <!--发布稿、增补件单独设置下载权限-->
<template v-if="child.attrField === 'XGD' || child.attrField === 'FBGBJBD' || child.attrField === 'BPG' <template v-if="child.attrField === 'GLWJ'">
|| child.attrField === 'SSG'|| child.attrField === 'ZQYJG'|| child.attrField === 'CA'
|| child.attrField === 'JDWJ' || child.attrField === 'GLWJ'">
<a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank">{{ file.oldFileName }}</a> <a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank">{{ file.oldFileName }}</a>
<i <i
title="下载" title="下载"
@@ -388,7 +498,7 @@
<!-- <el-button v-if="judgeSuffix(file.fileName)" type="primary" size="mini" style="margin: 5px" @click="ocrFunction(file)" plain>OCR</el-button>--> <!-- <el-button v-if="judgeSuffix(file.fileName)" type="primary" size="mini" style="margin: 5px" @click="ocrFunction(file)" plain>OCR</el-button>-->
<span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span> <!-- <span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span>-->
</template> </template>
<template v-else> <template v-else>
<a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank">{{ file.oldFileName }}</a> <a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank">{{ file.oldFileName }}</a>
@@ -404,7 +514,7 @@
class="icon-download2" class="icon-download2"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : '824f3bf9edef83fc7488917136167232'" v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : '824f3bf9edef83fc7488917136167232'"
/> />
<span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span> <!-- <span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span>-->
</template> </template>
</p> </p>
<el-button <el-button
@@ -428,10 +538,12 @@
</div> </div>
</div> </div>
</div> </div>
</el-collapse-item>
</el-collapse>
</div> </div>
</div> </div>
<div v-show="!isMoreAwayBtn" class="more" @click="moreClick">更多<img src="@/assets/images/shangqi/img/more.png"> <!-- <div v-show="!isMoreAwayBtn" class="more" @click="moreClick">更多<img src="@/assets/images/shangqi/img/more.png">-->
</div> <!-- </div>-->
<!-- <div v-show="isMoreAwayBtn" class="put-away" @click="putAwayClick">收起<img src="@/assets/images/shangqi/img/more.png"></div>--> <!-- <div v-show="isMoreAwayBtn" class="put-away" @click="putAwayClick">收起<img src="@/assets/images/shangqi/img/more.png"></div>-->
<!--查看分解单--> <!--查看分解单-->
<el-drawer <el-drawer
@@ -1245,8 +1357,18 @@
CustomOrg, CustomOrg,
RelatedTermsSelect RelatedTermsSelect
}, },
filters: {
ellipsis (value) {
if (!value) return ''
if (value.length > 25) {
return value.slice(0,25) + '...'
}
return value
}
},
data() { data() {
return { return {
activeNames: ['基础信息'],
itemExistList:[], itemExistList:[],
interpretationContent: '', interpretationContent: '',
relatedTermsDrawerVisible: false, relatedTermsDrawerVisible: false,
@@ -1541,6 +1663,9 @@
props: {}, props: {},
watch: {}, watch: {},
methods: { methods: {
handleChange(val) {
console.log(val);
},
judgeSuffix(fileName){ judgeSuffix(fileName){
if ('pdf'===fileName.substring(fileName.lastIndexOf('.') + 1)){ if ('pdf'===fileName.substring(fileName.lastIndexOf('.') + 1)){
return true; return true;
@@ -2916,7 +3041,38 @@
} }
}) })
}) })
for (let i = 0; i < displayLocation.length; i++) {
// sss
if(displayLocation[i].label !== '基础信息' && displayLocation[i].label !== '文本信息'){
const childList = displayLocation[i].child.filter ( item => item.value !== null && item.value !== '');
if(childList.length === 0){
displayLocation.splice(i,1)
}
}
}
displayLocation.forEach(location => { displayLocation.forEach(location => {
// 动态属性字段-FBGBJBD 单独添加至基础信息
const list = displayLocation.filter ( item => item.label === '文本信息');
if(location.label === '基础信息' && list && list.length > 0){
if (!list[0].child) {
location['child1'] = []
}else {
const childList = list[0].child.filter ( item => item.attrField === 'FBGBJBD');
location['child1'] = childList
}
}
// 动态属性字段-SYRZ 单独添加至基础信息
const list2 = displayLocation.filter ( item => item.label === '适用范围');
if(location.label === '基础信息' && list2 && list2.length > 0){
if (!list[0].child) {
location['child2'] = []
}else {
const childList = list2[0].child.filter ( item => item.attrField === 'SYRZ');
location['child2'] = childList
}
}
const child = location.child || [] const child = location.child || []
const one = [] const one = []
const half = [] const half = []
@@ -2924,8 +3080,10 @@
if (['DATE_PICKER', 'SEL_OPTION', 'INPUT_NUM'].includes(field.attrType)) { if (['DATE_PICKER', 'SEL_OPTION', 'INPUT_NUM'].includes(field.attrType)) {
half.push(field) half.push(field)
} else { } else {
if(field.attrField && field.attrField !== 'FBGBJBD'){
one.push(field) one.push(field)
} }
}
}) })
const fieldsIsTextAreaOrFile = child.filter(field => { const fieldsIsTextAreaOrFile = child.filter(field => {
return field.attrType === 'TEXTAREA' || field.attrType === 'FILE' return field.attrType === 'TEXTAREA' || field.attrType === 'FILE'
@@ -2958,7 +3116,6 @@
}) })
this.dynamicFormField = displayLocation this.dynamicFormField = displayLocation
}) })
console.log(displayLocation)
sessionStorage.setItem('displayLocation', JSON.stringify(displayLocation)) sessionStorage.setItem('displayLocation', JSON.stringify(displayLocation))
this.loading = false this.loading = false
}) })
@@ -2985,6 +3142,13 @@
@import '~@/assets/styles/mixins'; @import '~@/assets/styles/mixins';
@import '~@/assets/styles/style'; @import '~@/assets/styles/style';
/deep/ .el-collapse-item__content {
padding-bottom: 0px;
font-size: 13px;
color: #303133;
line-height: 1.769230769230769;
}
/deep/ .btn1 #question { /deep/ .btn1 #question {
padding: 0 10px; padding: 0 10px;
margin-left: 10px; margin-left: 10px;
@@ -3031,6 +3195,32 @@
margin-bottom: 10px; margin-bottom: 10px;
} }
/deep/ .icon-download {
display: inline-block;
margin-left: 3px;
width: 18px;
height: 16px;
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: center center;
vertical-align: sub;
cursor: pointer;
background-image: url("~assets/images/shangqi/img/download.png");
}
/deep/ .icon-download2 {
display: inline-block;
margin-left: 3px;
width: 18px;
height: 16px;
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: center center;
vertical-align: sub;
cursor: pointer;
background-image: url("~assets/images/shangqi/img/download2.png");
}
.action-bar { .action-bar {
border-top: 0px; border-top: 0px;
} }
@@ -3111,6 +3301,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%;
height: 50px; height: 50px;
border-bottom: 1px solid #E5E5E5; border-bottom: 1px solid #E5E5E5;
.modular-header-title { .modular-header-title {
@@ -3126,7 +3317,9 @@
background-size: 100% 100%; background-size: 100% 100%;
background-position: center center; background-position: center center;
background-image: url("~assets/images/shangqi/standardDetails/modular-title.png"); background-image: url("~assets/images/shangqi/standardDetails/modular-title.png");
vertical-align: top; position: relative;
top: 2px;
;
} }
& > span { & > span {
@@ -3232,6 +3425,9 @@
& > div:not(.modular-item-more) { & > div:not(.modular-item-more) {
border-bottom: 1px solid #E5E5E5; border-bottom: 1px solid #E5E5E5;
min-height: 43px;
line-height: 43px;
height: 44px;
.modular-content-p-name { .modular-content-p-name {
display: inline-block; display: inline-block;
@@ -3336,8 +3532,8 @@
.basic-information-content { .basic-information-content {
& > p { & > p {
min-height: 55px; min-height: 43px;
line-height: 55px; line-height: 43px;
border-bottom: 1px solid #E5E5E5; border-bottom: 1px solid #E5E5E5;
} }
} }