格式化代码
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-collapse-item :name="item.label" @click.native="handleChange1(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>
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<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="basic-information-content">
|
||||
<!-- <p><label style=" margin-right: 150px;">标准类别</label><span>{{ sarStandardsInfoEO.standSort || '-' }}</span></p>-->
|
||||
@@ -58,9 +58,12 @@
|
||||
<p class="half files-title"
|
||||
>
|
||||
<label style=" margin-right: 102px;">{{ child.attrName }}</label>
|
||||
<template v-if="child.value && child.value.length > 0" v-for="(file, fileIndex) in child1Func(child.value)">
|
||||
<template v-if="child.value && child.value.length > 0"
|
||||
v-for="(file, fileIndex) in child1Func(child.value)">
|
||||
<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>
|
||||
<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)"
|
||||
@@ -85,10 +88,13 @@
|
||||
icon="icon-separate"
|
||||
>标准分解单
|
||||
</el-button>
|
||||
<el-button v-if="child.value && 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>
|
||||
<el-button v-if="child.value && 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 === null" >-</template>
|
||||
<template v-if="child.value === null">-</template>
|
||||
</p>
|
||||
</template>
|
||||
<p><label style=" margin-right: 150px;">中文名称</label><span>{{
|
||||
@@ -110,7 +116,8 @@
|
||||
standMap[sarStandardsInfoEO.standNature] || '-'
|
||||
}}</span></p>
|
||||
|
||||
<p class="half" v-if="saveStandType === 'INLAND_STAND'"><label style=" margin-right: 150px;">标准体系</label><span>{{
|
||||
<p class="half" v-if="saveStandType === 'INLAND_STAND'"><label
|
||||
style=" margin-right: 150px;">标准体系</label><span>{{
|
||||
sarStandardsInfoEO.standSystem || '-'
|
||||
}}</span></p>
|
||||
<p class="half">
|
||||
@@ -120,7 +127,7 @@
|
||||
</p>
|
||||
<template v-for="(child, childIndex) in item.child2">
|
||||
<p class="half">
|
||||
<label style=" margin-right: 143px;">{{child.attrName}}</label>
|
||||
<label style=" margin-right: 143px;">{{ child.attrName }}</label>
|
||||
<span>{{ child.value || '-' }}</span>
|
||||
</p>
|
||||
</template>
|
||||
@@ -390,7 +397,9 @@
|
||||
<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" :title="file.oldFileName">{{ file.oldFileName | ellipsis }}</a>
|
||||
<a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank" :title="file.oldFileName">{{
|
||||
file.oldFileName | ellipsis
|
||||
}}</a>
|
||||
<i
|
||||
title="下载"
|
||||
@click="downloadFile(file.id)"
|
||||
@@ -411,7 +420,9 @@
|
||||
<!-- <span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span>-->
|
||||
</template>
|
||||
<template v-else>
|
||||
<a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank" :title="file.oldFileName">{{ file.oldFileName | ellipsis }}</a>
|
||||
<a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank" :title="file.oldFileName">{{
|
||||
file.oldFileName | ellipsis
|
||||
}}</a>
|
||||
<i
|
||||
title="下载"
|
||||
@click="downloadFile(file.id)"
|
||||
@@ -742,7 +753,7 @@
|
||||
label="符合性状态"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.complianceRequire ? (scope.row.complianceRequire === '1' ? '是' : '否') : '-'}}
|
||||
{{ scope.row.complianceRequire ? (scope.row.complianceRequire === '1' ? '是' : '否') : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -1061,7 +1072,8 @@
|
||||
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>
|
||||
<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)"
|
||||
@@ -1404,10 +1416,10 @@ export default {
|
||||
RelatedTermsSelect
|
||||
},
|
||||
filters: {
|
||||
ellipsis (value) {
|
||||
ellipsis(value) {
|
||||
if (!value) return ''
|
||||
if (value.length > 12) {
|
||||
return value.slice(0,12) + '...'
|
||||
return value.slice(0, 12) + '...'
|
||||
}
|
||||
return value
|
||||
}
|
||||
@@ -1416,7 +1428,7 @@ export default {
|
||||
return {
|
||||
activeNames: ['基础信息'],
|
||||
activeState: true,
|
||||
itemExistList:[],
|
||||
itemExistList: [],
|
||||
interpretationContent: '',
|
||||
relatedTermsDrawerVisible: false,
|
||||
btnLoading: false,
|
||||
@@ -1444,8 +1456,8 @@ export default {
|
||||
knowType: '',
|
||||
KnowTitle: '',
|
||||
knowIdList: '',
|
||||
order:'',
|
||||
orderBy:'',
|
||||
order: '',
|
||||
orderBy: '',
|
||||
total7: 0,
|
||||
page7: 1,
|
||||
pageSize7: this.$store.getters.userInfo.configContent,
|
||||
@@ -1712,28 +1724,28 @@ export default {
|
||||
props: {},
|
||||
watch: {},
|
||||
methods: {
|
||||
child1Func(child1){
|
||||
child1Func(child1) {
|
||||
const list = []
|
||||
if(child1 && child1.length > 1){
|
||||
if (child1 && child1.length > 1) {
|
||||
list.push(child1[0])
|
||||
return list
|
||||
}
|
||||
return child1
|
||||
},
|
||||
handleChange(val) {
|
||||
console.log(val)
|
||||
console.log('1724', val)
|
||||
},
|
||||
handleChange1(val) {
|
||||
if(val && val === '基础信息'){
|
||||
if (val && val === '基础信息') {
|
||||
this.activeState = true;
|
||||
}
|
||||
},
|
||||
judgeSuffix(fileName){
|
||||
if ('pdf'===fileName.substring(fileName.lastIndexOf('.') + 1)){
|
||||
judgeSuffix(fileName) {
|
||||
if ('pdf' === fileName.substring(fileName.lastIndexOf('.') + 1)) {
|
||||
return true;
|
||||
}else return false;
|
||||
} else return false;
|
||||
},
|
||||
ocrFunction(file){
|
||||
ocrFunction(file) {
|
||||
return "ocr"
|
||||
},
|
||||
FormatDate(date) {
|
||||
@@ -2328,8 +2340,8 @@ export default {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.sarStandardsInfoEO = res.data || {}
|
||||
this.itemExistList=this.sarStandardsInfoEO.attrInfoMap.itemExistList;
|
||||
console.log("hllo",this.sarStandardsInfoEO);
|
||||
this.itemExistList = this.sarStandardsInfoEO.attrInfoMap.itemExistList;
|
||||
console.log("hllo", this.sarStandardsInfoEO);
|
||||
if (this.sarStandardsInfoEO.issueTime != null && this.sarStandardsInfoEO.issueTime !== '') {
|
||||
this.sarStandardsInfoEO.issueTime = this.sarStandardsInfoEO.issueTime.split(' ')[0]
|
||||
}
|
||||
@@ -2455,7 +2467,7 @@ export default {
|
||||
_this: this
|
||||
}, res => {
|
||||
|
||||
console.log("res.data",res.data);
|
||||
console.log("res.data", res.data);
|
||||
if (res.data) {
|
||||
let fileObj = {}
|
||||
fileObj.fileId = res.data.attId
|
||||
@@ -2553,9 +2565,9 @@ export default {
|
||||
}.bind(this)
|
||||
})
|
||||
},
|
||||
sort(column){
|
||||
this.order=column.order;
|
||||
this.orderBy=column.prop;
|
||||
sort(column) {
|
||||
this.order = column.order;
|
||||
this.orderBy = column.prop;
|
||||
this.selectSarStandItems();
|
||||
},
|
||||
// 分解单----查看标准条款相关
|
||||
@@ -2564,7 +2576,7 @@ export default {
|
||||
this.standItemSearch.fileType = this.fileType
|
||||
this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', {
|
||||
...this.standItemSearch,
|
||||
pageSize: this.pageSize7, page: this.page7,order:this.order,orderBy:this.orderBy
|
||||
pageSize: this.pageSize7, page: this.page7, order: this.order, orderBy: this.orderBy
|
||||
}, {}, res => {
|
||||
this.selectedItemList = []
|
||||
if (res.ok) {
|
||||
@@ -2617,9 +2629,9 @@ export default {
|
||||
this.standItemSearch.parts = ''
|
||||
this.standItemSearch.nameOrRequest = ''
|
||||
this.standItemSearch.fileType = ''
|
||||
this.standItemSearch.itemsName=''
|
||||
this.standItemSearch.ZCCSSRQ=''
|
||||
this.standItemSearch.XCXSSRQ=''
|
||||
this.standItemSearch.itemsName = ''
|
||||
this.standItemSearch.ZCCSSRQ = ''
|
||||
this.standItemSearch.XCXSSRQ = ''
|
||||
this.selectSarStandItems()
|
||||
},
|
||||
inputChange() {
|
||||
@@ -2918,7 +2930,7 @@ export default {
|
||||
collectResId: this.sarStandardsInfoEO.id,
|
||||
collectTitle: collectTitle,
|
||||
collectType: this.$route.params.pageType, // 国内收藏type
|
||||
userId : this.$store.getters.userInfo.userId
|
||||
userId: this.$store.getters.userInfo.userId
|
||||
|
||||
}
|
||||
this.$http.postData('person/personCollect', personCollect, {
|
||||
@@ -2931,7 +2943,7 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
relateEvent1(list){
|
||||
relateEvent1(list) {
|
||||
this.relateDialog1 = true
|
||||
this.relateNowList1 = list
|
||||
},
|
||||
@@ -3082,7 +3094,7 @@ export default {
|
||||
this.setMap(res.data.SARPROPERTY) // 标准性质
|
||||
}, e => {
|
||||
})
|
||||
Promise.all([this.queryDisplayLocation(), this.selectStandMessage(), this.getAddFormFieldList()]).then ((values) => {
|
||||
Promise.all([this.queryDisplayLocation(), this.selectStandMessage(), this.getAddFormFieldList()]).then((values) => {
|
||||
const [displayLocation, standEO, formFieldList] = values
|
||||
const dynamicFormField = standEO ? standEO.attrInfoMap : {}
|
||||
formFieldList.forEach((field) => {
|
||||
@@ -3120,34 +3132,34 @@ export default {
|
||||
console.log(displayLocation)
|
||||
displayLocation.forEach(location => {
|
||||
// 动态属性字段-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) {
|
||||
location['child1'] = []
|
||||
}else {
|
||||
const childList = list[0].child.filter ( item => item.attrField === 'FBGBJBD');
|
||||
} 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){
|
||||
const list2 = displayLocation.filter(item => item.label === '适用范围');
|
||||
if (location.label === '基础信息' && list2 && list2.length > 0) {
|
||||
if (!list2[0].child) {
|
||||
location['child2'] = []
|
||||
}else {
|
||||
const childList = list2[0].child.filter ( item => item.attrField === 'SYRZ');
|
||||
} else {
|
||||
const childList = list2[0].child.filter(item => item.attrField === 'SYRZ');
|
||||
location['child2'] = childList
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3159,7 +3171,7 @@ export default {
|
||||
if (['DATE_PICKER', 'SEL_OPTION', 'INPUT_NUM'].includes(field.attrType)) {
|
||||
half.push(field)
|
||||
} else {
|
||||
if(field.attrField && field.attrField !== 'FBGBJBD' && field.attrField !== 'SYRZ'){
|
||||
if (field.attrField && field.attrField !== 'FBGBJBD' && field.attrField !== 'SYRZ') {
|
||||
one.push(field)
|
||||
}
|
||||
}
|
||||
@@ -3247,11 +3259,11 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-collapse{
|
||||
/deep/ .el-collapse {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/deep/ .el-collapse-item__wrap{
|
||||
/deep/ .el-collapse-item__wrap {
|
||||
border: none;
|
||||
}
|
||||
|
||||
@@ -3417,6 +3429,7 @@ export default {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
|
||||
.modular-header-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
@@ -3431,8 +3444,7 @@ export default {
|
||||
background-position: center center;
|
||||
background-image: url("~assets/images/shangqi/standardDetails/modular-title.png");
|
||||
position: relative;
|
||||
top: 2px;
|
||||
;
|
||||
top: 2px;;
|
||||
}
|
||||
|
||||
& > span {
|
||||
@@ -3732,7 +3744,8 @@ export default {
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
.over{
|
||||
|
||||
.over {
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
Reference in New Issue
Block a user