feat: There is no way the

This commit is contained in:
super_liu
2021-11-08 17:12:33 +08:00
parent 00ea0b74d5
commit 9544672566
3 changed files with 302 additions and 106 deletions
@@ -15,129 +15,169 @@
:key="index"
v-if="item.isShowImp === '0'"
>
<div class="modular-header" v-if="item.label !== '基础信息'">
<div class="modular-header-title"><i class="icon-modular-title"/><span>{{ item.label }}</span></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 class="modular-header-title"><i class="icon-modular-title" /><span>企标信息</span>-->
<!-- </div>-->
<div class="modular-header-btn">
<el-button v-if="sarStandardsInfoEO.collectId" @click="collectClick(sarStandardsInfoEO.collectId)" title="取消收藏" class="collection-btn" icon="icon-collection" :loading="isSubmit"></el-button>
<el-button v-else @click="collectClick()" title="收藏" class="collection-btn" icon="el-icon-star-off" :loading="isSubmit"></el-button>
<el-button class="relation-btn" icon="icon-relation" @click="relateEvent()">更新LOG</el-button>
</div>
</div>
<div class="modular-content">
<template v-if = "item.label === '基础信息'">
<div class="details-content-modular basic-information" style="margin-bottom: 0">
<div class="basic-information-content">
<p style="color: #C42626;"><label style=" margin-right: 171px;">企标号</label><span>{{ sarStandardsInfoEO.standCode }}</span></p>
<p><label style=" margin-right: 157px;">中文名称</label><span>{{ sarStandardsInfoEO.standName || '-' }}</span></p>
<p><label style=" margin-right: 157px;">英文名称</label><span>{{ sarStandardsInfoEO.standEnName || '-' }}</span></p>
<p>
<label style=" margin-right: 156px;"
title="“修订中”为现行有效版本;“已修订”标准的有效性需根据实际实施情况判定"
>文本状态</label><span style="color: #409EFF;">{{ sarStandardsInfoEO.standStatusShow || '-' }}</span>
</p>
<p><label style=" margin-right: 157px;">发布日期</label><span>{{ sarStandardsInfoEO.issueTime || '-' }}</span></p>
<p style="border: none;"><label style=" margin-right: 122px;">标准实施日期</label><span>{{ sarStandardsInfoEO.putTime || '-' }}</span></p>
</div>
</div>
</template>
<template
v-for="(child, childIndex) in item.child"
v-if="child.isShowImp === '0'"
>
<div
:key="childIndex"
class="modular-item"
:class="halfClass(child, item.child[childIndex + 1], childIndex)"
>
<label class="modular-content-p-name" :title="child.attrName">{{ child.attrName }}</label>
<span
v-if="child.attrField === 'ZYQCR'"
class="modular-content-p-val clearfix"
:title="child.value || '-'"
<el-collapse v-model="activeNames" @change="handleChange">
<el-collapse-item :name="item.label" @click.native="handleChange1(item.label)">
<template slot="title">
<div class="modular-header" v-if="item.label !== '基础信息'">
<div class="modular-header-title"><i class="icon-modular-title"/><span>{{ item.label }}</span></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 class="modular-header-title"><i class="icon-modular-title" /><span>企标信息</span>-->
<!-- </div>-->
<div class="modular-header-btn">
<el-button v-if="sarStandardsInfoEO.collectId" @click="collectClick(sarStandardsInfoEO.collectId)" title="取消收藏" class="collection-btn" icon="icon-collection" :loading="isSubmit"></el-button>
<el-button v-else @click="collectClick()" title="收藏" class="collection-btn" icon="el-icon-star-off" :loading="isSubmit"></el-button>
<el-button class="relation-btn" icon="icon-relation" @click="relateEvent()">更新LOG</el-button>
</div>
</div>
</template>
<div class="modular-content">
<template v-if = "item.label === '基础信息'">
<div class="details-content-modular basic-information" style="margin-bottom: 0">
<div class="basic-information-content">
<p class="half" style="color: #C42626;"><label style=" margin-right: 171px;">企标号</label><span>{{ sarStandardsInfoEO.standCode }}</span></p>
<template v-for="(child, childIndex) in item.child1">
<p class="half files-title"
v-for="(file, fileIndex) in child1Func(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>
<!-- <el-button-->
<!-- v-if="child.attrField === itemNam "-->
<!-- v-for="(itemNam,index) in itemExistList"-->
<!-- :key="index"-->
<!-- @click="showItemsModel(child.attrField)"-->
<!-- class="decomposition-btn"-->
<!-- style="right:62px"-->
<!-- icon="icon-separate"-->
<!-- >标准分解单-->
<!-- </el-button>-->
<el-button v-if="child.value.length > 1" style="color:#409EFF;border: 1px solid #409EFF;background: rgba(64, 158, 255, 0.1);"
class="decomposition-btn" icon="icon-relation" @click="relateEvent1(child.value)">更多</el-button>
</p>
</template>
<p><label style=" margin-right: 157px;">中文名称</label><span>{{ sarStandardsInfoEO.standName || '-' }}</span></p>
<p v-if="activeState"><label style=" margin-right: 157px;">英文名称</label><span>{{ sarStandardsInfoEO.standEnName || '-' }}</span></p>
<p class="half">
<label style=" margin-right: 156px;"
title="“修订中”为现行有效版本;“已修订”标准的有效性需根据实际实施情况判定"
>文本状态</label><span style="color: #409EFF;">{{ sarStandardsInfoEO.standStatusShow || '-' }}</span>
</p>
<p class="half"><label style=" margin-right: 157px;">发布日期</label><span>{{ sarStandardsInfoEO.issueTime || '-' }}</span></p>
<p class="half" style=""><label style=" margin-right: 122px;">标准实施日期</label><span>{{ sarStandardsInfoEO.putTime || '-' }}</span></p>
</div>
</div>
</template>
<template
v-for="(child, childIndex) in item.child"
v-if="child.isShowImp === '0'"
>
<div
:key="childIndex"
:class="item.label !== '过程稿件' ? 'modular-item half' : 'modular-item'"
>
<label class="modular-content-p-name" :title="child.attrName">{{ child.attrName }}</label>
<span
v-if="child.attrField === 'ZYQCR'"
class="modular-content-p-val clearfix"
:title="child.value || '-'"
>
<template v-if="child.value">
{{ child.value }}
<put-question-button
style="float: right;"
:resId="sarStandardsInfoEO.id"
:resType="saveStandType"
style="float: right;"
:resId="sarStandardsInfoEO.id"
:resType="saveStandType"
></put-question-button>
</template>
<template v-else>
{{ '-' }}
</template>
</span>
<!--规范性引用文件-->
<template v-else-if="child.attrField === 'GFXYYWJ' && child.value">
<p class="modular-content-p-val">
<!--规范性引用文件-->
<template v-else-if="child.attrField === 'GFXYYWJ' && child.value">
<p class="modular-content-p-val">
<span v-for="(item, index) in child.value.split(',')" :key="index">
<a @click="showReplaceStandInfo(item)" style="cursor: pointer;color: #0c91e5;margin-right: 5px;" class="span-line">{{item}}</a>
</span>
</p>
</template>
<!--相关流程-->
<template v-else-if="child.attrField === 'XGLC' && child.value">
<p class="modular-content-p-val">
</p>
</template>
<!--相关流程-->
<template v-else-if="child.attrField === 'XGLC' && child.value">
<p class="modular-content-p-val">
<span v-for="(item, index) in child.value.split(',')" :key="index">
<a @click="processCenterClick(item)" style="cursor: pointer;color: #0c91e5;margin-right: 5px;" class="span-line">{{item}}</a>
</span>
</p>
</template>
<!--相关计划-->
<template v-else-if="child.attrField === 'XGJH' && child.value">
</p>
</template>
<!--相关计划-->
<template v-else-if="child.attrField === 'XGJH' && child.value">
<span
v-if="child.value.length === 0"
class="modular-content-p-val"
:title="'-'"
v-if="child.value.length === 0"
class="modular-content-p-val"
:title="'-'"
>
{{ '-' }}
</span>
<p v-else class="modular-content-p-val">
<p v-else class="modular-content-p-val">
<span v-for="(item, index) in child.value" :key="index">
<a @click="showXGJH(item)" style="cursor: pointer;color: #0c91e5;margin-right: 5px;" class="span-line">查看计划</a>
</span>
</p>
</template>
<span
v-else-if="child.attrField === 'SVPPS'"
class="modular-content-p-val"
:title="child.tips || '-'"
>
</p>
</template>
<span
v-else-if="child.attrField === 'SVPPS'"
class="modular-content-p-val"
:title="child.tips || '-'"
>
{{ !child.value || child.value === 'null' ? '-' : child.value }}
</span>
<span
v-else-if="child.attrType !== 'FILE'"
class="modular-content-p-val"
:title="child.value || '-'"
>
<span
v-else-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"
>
<a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank">{{ file.oldFileName }}</a>
<i title="下载" @click="downloadFile(file.id)" class="icon-download" v-btn-permission="'9882f477aad895ec56a7464f3e9c0b11'"/>
<i title="下载带水印" @click="downloadFileByWater(file.id, file.fileSuffix)" class="icon-download2" v-btn-permission="'9bab2662fbd9d0507b39be813371a597'"/>
<span class="time-text">上传时间{{ dateFormat(file.modifyTime) }}</span>
</p>
<!-- <el-button-->
<!-- @click="showItemsModel(child.attrField)"-->
<!-- class="decomposition-btn"-->
<!-- icon="icon-separate"-->
<!-- >标准分解单</el-button>-->
</div>
</div>
<div v-else class="modular-content-p-flies">
<p
class="files-title"
v-for="(file, fileIndex) in child.value"
:key="fileIndex"
>
<a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank">{{ file.oldFileName }}</a>
<i title="下载" @click="downloadFile(file.id)" class="icon-download" v-btn-permission="'9882f477aad895ec56a7464f3e9c0b11'"/>
<i title="下载带水印" @click="downloadFileByWater(file.id, file.fileSuffix)" class="icon-download2" v-btn-permission="'9bab2662fbd9d0507b39be813371a597'"/>
<!-- <span class="time-text">上传时间{{ dateFormat(file.modifyTime) }}</span>-->
</p>
<!-- <el-button-->
<!-- @click="showItemsModel(child.attrField)"-->
<!-- class="decomposition-btn"-->
<!-- icon="icon-separate"-->
<!-- >标准分解单</el-button>-->
</div>
</div>
</template>
</div>
</template>
</div>
</el-collapse-item>
</el-collapse>
</div>
</div>
<div v-show="!isMoreAwayBtn" class="more" @click="moreClick">更多<img src="@/assets/images/shangqi/img/more.png"></div>
@@ -518,6 +558,40 @@
<el-button type="primary" @click="relateDialogClose()"> </el-button>
</span>
</el-dialog>
<el-dialog
title="更多发布稿"
:visible.sync="relateDialog1"
class="relateClass"
width="40%"
:before-close="relateDialogClose1">
<div
v-for="(file, index) in relateNowList1"
:key="index"
v-if="relateNowList1"
style="margin-bottom: 10px;line-height: 20px;max-height: 300px"
>
{{ index + 1 }}.
<a style="font-size: 16px;color: #409EFF;cursor: pointer" @click="openFileInPdf(file.id, file.oldFileName)" target="_blank" :title="file.oldFileName">{{ file.oldFileName }}</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'"
/>
<div v-if="relateNowList.length >1">
<el-divider></el-divider>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="relateDialogClose1"> </el-button>
</div>
</el-dialog>
<!-- 导入失败-->
<el-dialog :visible.sync="importFailed" :close-on-click-modal="false" width="400px">
<p slot="title" style="color:#f60">
@@ -874,13 +948,26 @@ export default {
components: {
PutQuestionButton
},
filters: {
ellipsis (value) {
if (!value) return ''
if (value.length > 12) {
return value.slice(0,12) + '...'
}
return value
}
},
data () {
return {
activeNames: ['基础信息'],
activeState: false,
visiblePlanCheck: false,
form: {},
relateDialog: false,
relateDialog1: false,
relateList: [],
relateNowList: [],
relateNowList1: [],
sarType: sarType,
loading: true,
showItemInfoModal: false,
@@ -1079,6 +1166,22 @@ export default {
watch: {
},
methods: {
child1Func(child1){
const list = []
if(child1 && child1.length > 1){
list.push(child1[0])
return list
}
return child1
},
handleChange(val) {
console.log(val)
},
handleChange1(val) {
if(val && val === '基础信息'){
this.activeState = true;
}
},
getPlanStatusName(status) {
switch (status) {
case "1":
@@ -1913,6 +2016,10 @@ export default {
})
}
},
relateEvent1(list){
this.relateDialog1 = true
this.relateNowList1 = list
},
// 更新LOG
relateEvent () {
this.$http.get('lawss/sarUpdLog/getLogList', {
@@ -1942,6 +2049,10 @@ export default {
})
},
relateDialogClose1() {
this.relateDialog1 = false
this.relateNowList = []
},
relateDialogClose () {
this.relateDialog = false
this.relateNowList = []
@@ -2051,17 +2162,42 @@ export default {
}
})
})
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 => {
// 动态属性字段-FBGBJBD 单独添加至基础信息
const list = displayLocation.filter ( item => item.label === '过程稿件');
if(location.label === '基础信息' && list && list.length > 0){
if (!list[0].child) {
location['child1'] = []
}else {
console.log(list)
const childList = list[0].child.filter ( item => item.attrField === 'FBGBUSS');
location['child1'] = childList
}
}
const child = location.child || []
const halfType = ['INPUT_STR', 'DATE_PICKER', 'SEL_OPTION', 'INPUT_NUM']
const fieldsIsTextAreaOrFile = child.filter(field => {
return !halfType.includes(field.attrType)
return field.attrField !== 'FBGBUSS' && !halfType.includes(field.attrType)
})
const fieldOthers = child.filter(field => {
return halfType.includes(field.attrType)
return halfType.includes(field.attrType)
})
console.log(fieldOthers)
location.child = [...fieldOthers, ...fieldsIsTextAreaOrFile].sort(this.compare('orderNum'))
})
console.log(displayLocation)
this.dynamicFormField = displayLocation
sessionStorage.setItem('displayLocation', JSON.stringify(displayLocation))
this.loading = false
@@ -2085,6 +2221,55 @@ export default {
<style lang="less" scoped>
@import '~@/assets/styles/mixins';
@import '~@/assets/styles/style';
/deep/ .decomposition-btn {
position: absolute;
top: 6px;
right: 0;
padding: 0 10px;
height: 30px;
line-height: 30px;
font-size: 14px;
color: #07C160;
border: 1px solid #07C160;
background: rgba(1, 193, 96, 0.1);
/deep/ .icon-separate {
display: inline-block;
margin-right: 3px;
width: 16px;
height: 16px;
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: center center;
vertical-align: sub;
background-image: url("~assets/images/shangqi/standardDetails/separate.png");
}
}
/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");
}
.other-standard-details{
padding: 15px 30px 0;
width: 1200px;
@@ -2108,6 +2293,7 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 50px;
border-bottom: 1px solid #E5E5E5;
.modular-header-title{
@@ -2122,7 +2308,8 @@ export default {
background-size: 100% 100%;
background-position: center center;
background-image: url("~assets/images/shangqi/standardDetails/modular-title.png");
vertical-align: top;
position: relative;
top: 2px;
}
& > span{
padding-left: 10px;
@@ -2186,6 +2373,7 @@ export default {
.modular-content{
& > div{
border-bottom: 1px solid #E5E5E5;
height: 41px;
.modular-content-p-name{
display: inline-block;
width: 220px;
@@ -2278,8 +2466,8 @@ export default {
}
.basic-information-content{
& > p{
min-height: 55px;
line-height: 55px;
min-height: 40px;
line-height: 40px;
border-bottom: 1px solid #E5E5E5;
}
}
@@ -18,7 +18,7 @@
v-if="item.isShowImp === '0'"
>
<el-collapse v-model="activeNames" @change="handleChange">
<el-collapse-item :name="item.label">
<el-collapse-item :name="item.label" @click.native="handleChange1(item.label)">
<template slot="title">
<div class="modular-header" v-if="item.label === '基础信息'">
<div class="modular-header-title"><i class="icon-modular-title"/><span>{{ item.label }}</span></div>
@@ -93,7 +93,7 @@
<p><label style=" margin-right: 150px;">中文名称</label><span>{{
sarStandardsInfoEO.standName || '-'
}}</span></p>
<p><label style=" margin-right: 150px;">英文名称</label><span>{{
<p v-if="activeState"><label style=" margin-right: 150px;">英文名称</label><span>{{
sarStandardsInfoEO.standEnName || '-'
}}</span></p>
<p class="half">
@@ -1415,6 +1415,7 @@
data() {
return {
activeNames: ['基础信息'],
activeState: false,
itemExistList:[],
interpretationContent: '',
relatedTermsDrawerVisible: false,
@@ -1720,7 +1721,12 @@
return child1
},
handleChange(val) {
console.log(val);
console.log(val)
},
handleChange1(val) {
if(val && val === '基础信息'){
this.activeState = true;
}
},
judgeSuffix(fileName){
if ('pdf'===fileName.substring(fileName.lastIndexOf('.') + 1)){
@@ -3161,7 +3167,6 @@
location.half = half
location.showAll = false
})
this.$http.get('sarLawsAttrDetailedList/sar-laws-attr-detailed-list', {
id: this.$route.params.id
}, {
@@ -181,9 +181,12 @@
<!-- <el-option v-for="opt in standSortOptions" :value="opt.value" :key="opt.value" :label="opt.label">{{ opt.label}}</el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-formItem label="标准号/名称" prop="numberName" class="search-item">
<el-input v-model="sarBussionessSearch.numberName" clearable placeholder="根据标准号/名称查找" :maxlength="100" @keyup.enter.native="getBussionStandTableBtn(sarBussionessSearch)"/>
<el-formItem label="标准号" prop="numberName" class="search-item">
<el-input v-model="sarBussionessSearch.standCode" clearable placeholder="根据标准号查找" :maxlength="100" @keyup.enter.native="getBussionStandTableBtn(sarBussionessSearch)"/>
</el-formItem>
<el-formItem label="标准名称" prop="standName" class="search-item">
<el-input v-model="sarBussionessSearch.standName" clearable placeholder="根据标准名称查找" :maxlength="100" @keyup.enter.native="getBussionStandTableBtn(sarBussionessSearch)"/>
</el-formItem>
<el-form-item class="search-item btn-box">
<el-button
:loading="searching"