feat: There is no way the,

This commit is contained in:
super_liu
2021-11-08 17:51:12 +08:00
parent c0fa07e8dd
commit 381c5bc125
2 changed files with 84 additions and 69 deletions
@@ -39,37 +39,39 @@
<p class="half" style="color: #C42626;"><label style=" margin-right: 171px;">企标号</label><span>{{ sarStandardsInfoEO.standCode }}</span></p> <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"> <template v-for="(child, childIndex) in item.child1">
<p class="half files-title" <p class="half files-title"
v-for="(file, fileIndex) in child1Func(child.value)"
> >
<label style=" margin-right: 102px;">{{ child.attrName }}</label> <label style=" margin-right: 102px;">{{ child.attrName }}</label>
<span> <template v-for="(file, fileIndex) in child1Func(child.value)">
<a style="font-size: 16px;color: #409EFF;cursor: pointer" @click="openFileInPdf(file.id, file.oldFileName)" target="_blank" :title="file.oldFileName">{{ file.oldFileName | ellipsis }}</a> <span>
<i <a style="font-size: 16px;color: #409EFF;cursor: pointer" @click="openFileInPdf(file.id, file.oldFileName)" target="_blank" :title="file.oldFileName">{{ file.oldFileName | ellipsis }}</a>
title="下载" <i
@click="downloadFile(file.id)" title="下载"
class="icon-download" @click="downloadFile(file.id)"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : 'a772afab2a6708883335500f3f86e771'" class="icon-download"
/> v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : 'a772afab2a6708883335500f3f86e771'"
<i />
title="下载带水印" <i
@click="downloadFileByWater(file.id, file.fileSuffix)" title="下载带水印"
class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? '02fd6eff0537c283dd071683de10689f' : '824f3bf9edef83fc7488917136167232'" class="icon-download2"
/> v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? '02fd6eff0537c283dd071683de10689f' : '824f3bf9edef83fc7488917136167232'"
<!-- <span class="time-text">上传时间{{ dateFormat(file.modifyTime) }}</span>--> />
</span> <!-- <span class="time-text">上传时间{{ dateFormat(file.modifyTime) }}</span>-->
<!-- <el-button--> </span>
<!-- v-if="child.attrField === itemNam "--> <!-- <el-button-->
<!-- v-for="(itemNam,index) in itemExistList"--> <!-- v-if="child.attrField === itemNam "-->
<!-- :key="index"--> <!-- v-for="(itemNam,index) in itemExistList"-->
<!-- @click="showItemsModel(child.attrField)"--> <!-- :key="index"-->
<!-- class="decomposition-btn"--> <!-- @click="showItemsModel(child.attrField)"-->
<!-- style="right:62px"--> <!-- class="decomposition-btn"-->
<!-- icon="icon-separate"--> <!-- 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);" <!-- </el-button>-->
class="decomposition-btn" icon="icon-relation" @click="relateEvent1(child.value)">更多</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>
</template>
<template v-if="child.value || child.value.length === 0">-</template>
</p> </p>
</template> </template>
<p><label style=" margin-right: 157px;">中文名称</label><span>{{ sarStandardsInfoEO.standName || '-' }}</span></p> <p><label style=" margin-right: 157px;">中文名称</label><span>{{ sarStandardsInfoEO.standName || '-' }}</span></p>
@@ -1168,6 +1170,7 @@ export default {
methods: { methods: {
child1Func(child1){ child1Func(child1){
const list = [] const list = []
console.log(child1)
if(child1 && child1.length > 1){ if(child1 && child1.length > 1){
list.push(child1[0]) list.push(child1[0])
return list return list
@@ -2130,6 +2133,7 @@ export default {
const [displayLocation, {attrInfoMap: dynamicFormField}, formFieldList] = values const [displayLocation, {attrInfoMap: dynamicFormField}, formFieldList] = values
// const relatedPlansRes = await this.queryRelatedPlans() // const relatedPlansRes = await this.queryRelatedPlans()
// const relatedPlans = relatedPlansRes.list // const relatedPlans = relatedPlansRes.list
console.log(formFieldList)
formFieldList.forEach((field) => { formFieldList.forEach((field) => {
displayLocation.forEach((location) => { displayLocation.forEach((location) => {
location.isShowImp = '0' location.isShowImp = '0'
@@ -2157,12 +2161,14 @@ export default {
// } // }
} }
} }
if (location.label === '文本信息') { if (location.label === '过程稿件') {
location.isShowImp = '0' location.isShowImp = '0'
} }
}) })
}) })
console.log(displayLocation)
for (let i = 0; i < displayLocation.length; i++) { for (let i = 0; i < displayLocation.length; i++) {
// sss // sss
if(displayLocation[i].label !== '基础信息' && displayLocation[i].label !== '过程稿件'){ if(displayLocation[i].label !== '基础信息' && displayLocation[i].label !== '过程稿件'){
@@ -2176,13 +2182,16 @@ export default {
displayLocation.forEach(location => { displayLocation.forEach(location => {
// 动态属性字段-FBGBJBD 单独添加至基础信息 // 动态属性字段-FBGBJBD 单独添加至基础信息
const list = displayLocation.filter ( item => item.label === '过程稿件'); const list = displayLocation.filter ( item => item.label === '过程稿件');
console.log(list)
if(location.label === '基础信息' && list && list.length > 0){ if(location.label === '基础信息' && list && list.length > 0){
if (!list[0].child) { if (!list[0].child) {
location['child1'] = [] location['child1'] = []
}else { }else {
console.log(list)
const childList = list[0].child.filter ( item => item.attrField === 'FBGBUSS'); const childList = list[0].child.filter ( item => item.attrField === 'FBGBUSS');
console.log(childList)
console.log(childList.length)
location['child1'] = childList location['child1'] = childList
console.log(location['child1'])
} }
} }
@@ -2196,6 +2205,7 @@ export default {
}) })
console.log(fieldOthers) console.log(fieldOthers)
location.child = [...fieldOthers, ...fieldsIsTextAreaOrFile].sort(this.compare('orderNum')) location.child = [...fieldOthers, ...fieldsIsTextAreaOrFile].sort(this.compare('orderNum'))
console.log(location)
}) })
console.log(displayLocation) console.log(displayLocation)
this.dynamicFormField = displayLocation this.dynamicFormField = displayLocation
@@ -57,37 +57,39 @@
<!-- <p><label style=" margin-right: 150px;">标准年份</label><span>{{ sarStandardsInfoEO.standYear || '-' }}</span></p>--> <!-- <p><label style=" margin-right: 150px;">标准年份</label><span>{{ sarStandardsInfoEO.standYear || '-' }}</span></p>-->
<template v-for="(child, childIndex) in item.child1"> <template v-for="(child, childIndex) in item.child1">
<p class="half files-title" <p class="half files-title"
v-for="(file, fileIndex) in child1Func(child.value)"
> >
<label style=" margin-right: 102px;">{{ child.attrName }}</label> <label style=" margin-right: 102px;">{{ child.attrName }}</label>
<span> <template v-for="(file, fileIndex) in child1Func(child.value)">
<a style="font-size: 16px;color: #409EFF;cursor: pointer" @click="openFileInPdf(file.id, file.oldFileName)" target="_blank" :title="file.oldFileName">{{ file.oldFileName | ellipsis }}</a> <span>
<i <a style="font-size: 16px;color: #409EFF;cursor: pointer" @click="openFileInPdf(file.id, file.oldFileName)" target="_blank" :title="file.oldFileName">{{ file.oldFileName | ellipsis }}</a>
title="下载" <i
@click="downloadFile(file.id)" title="下载"
class="icon-download" @click="downloadFile(file.id)"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : 'a772afab2a6708883335500f3f86e771'" class="icon-download"
/> v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : 'a772afab2a6708883335500f3f86e771'"
<i />
title="下载带水印" <i
@click="downloadFileByWater(file.id, file.fileSuffix)" title="下载带水印"
class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? '02fd6eff0537c283dd071683de10689f' : '824f3bf9edef83fc7488917136167232'" class="icon-download2"
/> v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? '02fd6eff0537c283dd071683de10689f' : '824f3bf9edef83fc7488917136167232'"
<!-- <span class="time-text">上传时间{{ dateFormat(file.modifyTime) }}</span>--> />
</span> <!-- <span class="time-text">上传时间{{ dateFormat(file.modifyTime) }}</span>-->
<el-button </span>
v-if="child.attrField === itemNam " <el-button
v-for="(itemNam,index) in itemExistList" v-if="child.attrField === itemNam "
:key="index" v-for="(itemNam,index) in itemExistList"
@click="showItemsModel(child.attrField)" :key="index"
class="decomposition-btn" @click="showItemsModel(child.attrField)"
style="right:62px" class="decomposition-btn"
icon="icon-separate" 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);" </el-button>
class="decomposition-btn" icon="icon-relation" @click="relateEvent1(child.value)">更多</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>
</template>
<template v-if="child.value || child.value.length === 0">-</template>
</p> </p>
</template> </template>
<p><label style=" margin-right: 150px;">中文名称</label><span>{{ <p><label style=" margin-right: 150px;">中文名称</label><span>{{
@@ -3112,18 +3114,10 @@
}) })
}) })
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 单独添加至基础信息 // 动态属性字段-FBGBJBD 单独添加至基础信息
const list = displayLocation.filter ( item => item.label === '过程稿件'); const list = displayLocation.filter ( item => item.label === '过程稿件');
console.log()
if(location.label === '基础信息' && list && list.length > 0){ if(location.label === '基础信息' && list && list.length > 0){
if (!list[0].child) { if (!list[0].child) {
location['child1'] = [] location['child1'] = []
@@ -3167,6 +3161,17 @@
location.half = half location.half = half
location.showAll = false location.showAll = false
}) })
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)
}
}
}
this.$http.get('sarLawsAttrDetailedList/sar-laws-attr-detailed-list', { this.$http.get('sarLawsAttrDetailedList/sar-laws-attr-detailed-list', {
id: this.$route.params.id id: this.$route.params.id
}, { }, {