style: 格式化代碼

This commit is contained in:
zyn
2023-12-18 17:16:37 +08:00
parent d2dad52ffe
commit 134a17c869
3 changed files with 143 additions and 180 deletions
+34 -47
View File
@@ -8,13 +8,16 @@
<template slot="title"> <template slot="title">
<div class="modular-header"> <div class="modular-header">
<div class="modular-header-title"> <div class="modular-header-title">
<i class="icon-modular-title"/><span>基础信息</span> <i class="icon-modular-title" /><span>基础信息</span>
</div> </div>
<div class="modular-header-btn"> <div class="modular-header-btn">
<el-button class="relation-btn" <el-button
icon="icon-relation" class="relation-btn"
@click.stop="relateEvent()" icon="icon-relation"
>更新记录</el-button> @click.stop="relateEvent()"
>
更新记录
</el-button>
</div> </div>
</div> </div>
</template> </template>
@@ -29,10 +32,10 @@
<label style=" margin-right: 132px;line-height: 44px">会议纪要</label> <label style=" margin-right: 132px;line-height: 44px">会议纪要</label>
<div style="min-height: 44px;padding: 8px 0;"> <div style="min-height: 44px;padding: 8px 0;">
<template v-if="form.meetingMinutesList && form.meetingMinutesList.length > 0"> <template v-if="form.meetingMinutesList && form.meetingMinutesList.length > 0">
<p class="file-item" v-for="file in form.meetingMinutesList"> <p v-for="file in form.meetingMinutesList" class="file-item">
<a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a> <a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a>
<i title="下载" class="icon-download" @click="downloadFile(file.id)"></i> <i title="下载" class="icon-download" @click="downloadFile(file.id)" />
<i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)"></i> <i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)" />
</p> </p>
</template> </template>
<p v-else>-</p> <p v-else>-</p>
@@ -45,7 +48,7 @@
<template slot="title"> <template slot="title">
<div class="modular-header"> <div class="modular-header">
<div class="modular-header-title"> <div class="modular-header-title">
<i class="icon-modular-title"/><span>会议分类</span> <i class="icon-modular-title" /><span>会议分类</span>
</div> </div>
</div> </div>
</template> </template>
@@ -58,7 +61,7 @@
<template slot="title"> <template slot="title">
<div class="modular-header"> <div class="modular-header">
<div class="modular-header-title"> <div class="modular-header-title">
<i class="icon-modular-title"/><span>会议议题</span> <i class="icon-modular-title" /><span>会议议题</span>
</div> </div>
</div> </div>
</template> </template>
@@ -68,10 +71,10 @@
<label style=" margin-right: 132px;line-height: 44px">议题材料</label> <label style=" margin-right: 132px;line-height: 44px">议题材料</label>
<div style="min-height: 44px;padding: 8px 0;"> <div style="min-height: 44px;padding: 8px 0;">
<template v-if="item.agendaMaterialsList && item.agendaMaterialsList.length > 0"> <template v-if="item.agendaMaterialsList && item.agendaMaterialsList.length > 0">
<p class="file-item" v-for="file in item.agendaMaterialsList"> <p v-for="file in item.agendaMaterialsList" class="file-item">
<a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a> <a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a>
<i title="下载" class="icon-download" @click="downloadFile(file.id)"></i> <i title="下载" class="icon-download" @click="downloadFile(file.id)" />
<i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)"></i> <i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)" />
</p> </p>
</template> </template>
<p v-else>-</p> <p v-else>-</p>
@@ -87,19 +90,20 @@
</div> </div>
<!-- 更新LOG --> <!-- 更新LOG -->
<el-dialog <el-dialog
title="更新记录" title="更新记录"
:visible.sync="relateDialog" :visible.sync="relateDialog"
width="60%" width="60%"
class="relateClass" class="relateClass"
:before-close="relateDialogClose"> :before-close="relateDialogClose"
>
<div <div
v-for="(item, index) in relateNowList" v-for="(item, index) in relateNowList"
:key="index" v-if="relateNowList"
v-if="relateNowList" :key="index"
style="margin-bottom: 10px;line-height: 20px" style="margin-bottom: 10px;line-height: 20px"
> >
{{index+1}}. {{item.creationUserName}} {{item.creationTime}} {{item.content}} {{ index+1 }}. {{ item.creationUserName }} {{ item.creationTime }} {{ item.content }}
<div v-if="relateNowList.length >1"><el-divider></el-divider></div> <div v-if="relateNowList.length >1"><el-divider /></div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="relateDialogClose()"> </el-button> <el-button type="primary" @click="relateDialogClose()"> </el-button>
@@ -110,10 +114,8 @@
</template> </template>
<script> <script>
import { getBusStandFileByAttId } from 'api/process'
export default { export default {
name: "meetingDetail", name: 'MeetingDetail',
data () { data () {
return { return {
url: { url: {
@@ -121,14 +123,14 @@ export default {
getLogList: 'lawss/sarUpdLog/getLogList', // 更新记录 getLogList: 'lawss/sarUpdLog/getLogList', // 更新记录
}, },
form: {}, form: {},
activeNames: ['1', '2'], activeNames: [ '1', '2' ],
// 更新记录 // 更新记录
relateDialog: false, relateDialog: false,
relateNowList: [], relateNowList: [],
loading: false loading: false
} }
}, },
created() { created () {
this.getData() this.getData()
}, },
methods: { methods: {
@@ -141,7 +143,7 @@ export default {
res.data.meetingTopicList.forEach((item, index) => { res.data.meetingTopicList.forEach((item, index) => {
activeNames.push(index) activeNames.push(index)
}) })
this.activeNames = [...this.activeNames, ...activeNames] this.activeNames = [ ...this.activeNames, ...activeNames ]
} }
this.$set(this, 'form', res.data) this.$set(this, 'form', res.data)
} }
@@ -158,9 +160,9 @@ export default {
if (res.ok && res.data.length > 0) { if (res.ok && res.data.length > 0) {
this.relateDialog = true this.relateDialog = true
const relateList = res.data const relateList = res.data
var i let i
for (i = 0; i < relateList.length; i++) { for (i = 0; i < relateList.length; i++) {
let obj = {creationUserName: '', creationTime: '', content: ''} const obj = { creationUserName: '', creationTime: '', content: '' }
obj.creationUserName = relateList[i].creationUserName obj.creationUserName = relateList[i].creationUserName
obj.creationTime = relateList[i].creationTime obj.creationTime = relateList[i].creationTime
obj.content = relateList[i].content obj.content = relateList[i].content
@@ -193,21 +195,6 @@ export default {
} }
} }
}, },
getBusStandFileByAttId(attId) {
return new Promise((resolve, reject) => {
getBusStandFileByAttId({
attId
}).then(res => {
if (res.ok) {
resolve(res.data)
} else {
reject()
}
}).catch(e => {
reject(e)
})
})
},
openFileInPdf (attId, fileName) { openFileInPdf (attId, fileName) {
this.$preview(attId) this.$preview(attId)
}, },
+61 -74
View File
@@ -8,13 +8,16 @@
<template slot="title"> <template slot="title">
<div class="modular-header"> <div class="modular-header">
<div class="modular-header-title"> <div class="modular-header-title">
<i class="icon-modular-title"/><span>基础信息</span> <i class="icon-modular-title" /><span>基础信息</span>
</div> </div>
<div class="modular-header-btn"> <div class="modular-header-btn">
<el-button class="relation-btn" <el-button
icon="icon-relation" class="relation-btn"
@click.stop="relateEvent()" icon="icon-relation"
>更新记录</el-button> @click.stop="relateEvent()"
>
更新记录
</el-button>
</div> </div>
</div> </div>
</template> </template>
@@ -31,10 +34,10 @@
<label style=" margin-right: 164px;line-height: 44px">协议</label> <label style=" margin-right: 164px;line-height: 44px">协议</label>
<div style="min-height: 44px;padding: 8px 0;"> <div style="min-height: 44px;padding: 8px 0;">
<template v-if="form.agreementList && form.agreementList.length > 0"> <template v-if="form.agreementList && form.agreementList.length > 0">
<p class="file-item" v-for="file in form.agreementList"> <p v-for="file in form.agreementList" class="file-item">
<a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a> <a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a>
<i title="下载" class="icon-download" @click="downloadFile(file.id)"></i> <i title="下载" class="icon-download" @click="downloadFile(file.id)" />
<i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)"></i> <i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)" />
</p> </p>
</template> </template>
<p v-else>-</p> <p v-else>-</p>
@@ -47,7 +50,7 @@
<template slot="title"> <template slot="title">
<div class="modular-header"> <div class="modular-header">
<div class="modular-header-title"> <div class="modular-header-title">
<i class="icon-modular-title"/><span>课题组会议</span> <i class="icon-modular-title" /><span>课题组会议</span>
</div> </div>
</div> </div>
</template> </template>
@@ -64,7 +67,7 @@
<template slot="title"> <template slot="title">
<div class="modular-header"> <div class="modular-header">
<div class="modular-header-title"> <div class="modular-header-title">
<i class="icon-modular-title"/><span>课题组资料</span> <i class="icon-modular-title" /><span>课题组资料</span>
</div> </div>
</div> </div>
</template> </template>
@@ -73,10 +76,10 @@
<label style=" margin-right: 132px;line-height: 44px">研究方案</label> <label style=" margin-right: 132px;line-height: 44px">研究方案</label>
<div style="min-height: 44px;padding: 8px 0;"> <div style="min-height: 44px;padding: 8px 0;">
<template v-if="form.researchPlanList && form.researchPlanList.length > 0"> <template v-if="form.researchPlanList && form.researchPlanList.length > 0">
<p class="file-item" v-for="file in form.researchPlanList"> <p v-for="file in form.researchPlanList" class="file-item">
<a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a> <a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a>
<i title="下载" class="icon-download" @click="downloadFile(file.id)"></i> <i title="下载" class="icon-download" @click="downloadFile(file.id)" />
<i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)"></i> <i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)" />
</p> </p>
</template> </template>
<p v-else>-</p> <p v-else>-</p>
@@ -86,10 +89,10 @@
<label style=" margin-right: 132px;line-height: 44px">研究成果</label> <label style=" margin-right: 132px;line-height: 44px">研究成果</label>
<div style="min-height: 44px;padding: 8px 0;"> <div style="min-height: 44px;padding: 8px 0;">
<template v-if="form.researchFindingsList && form.researchFindingsList.length > 0"> <template v-if="form.researchFindingsList && form.researchFindingsList.length > 0">
<p class="file-item" v-for="file in form.researchFindingsList"> <p v-for="file in form.researchFindingsList" class="file-item">
<a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a> <a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a>
<i title="下载" class="icon-download" @click="downloadFile(file.id)"></i> <i title="下载" class="icon-download" @click="downloadFile(file.id)" />
<i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)"></i> <i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)" />
</p> </p>
</template> </template>
<p v-else>-</p> <p v-else>-</p>
@@ -99,10 +102,10 @@
<label style=" margin-right: 164px;line-height: 44px">其他</label> <label style=" margin-right: 164px;line-height: 44px">其他</label>
<div style="min-height: 44px;padding: 8px 0;"> <div style="min-height: 44px;padding: 8px 0;">
<template v-if="form.researchGroupOtherList && form.researchGroupOtherList.length > 0"> <template v-if="form.researchGroupOtherList && form.researchGroupOtherList.length > 0">
<p class="file-item" v-for="file in form.researchGroupOtherList"> <p v-for="file in form.researchGroupOtherList" class="file-item">
<a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a> <a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a>
<i title="下载" class="icon-download" @click="downloadFile(file.id)"></i> <i title="下载" class="icon-download" @click="downloadFile(file.id)" />
<i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)"></i> <i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)" />
</p> </p>
</template> </template>
<p v-else>-</p> <p v-else>-</p>
@@ -112,10 +115,10 @@
<label style=" margin-right: 132px;line-height: 44px">会议资料</label> <label style=" margin-right: 132px;line-height: 44px">会议资料</label>
<div style="min-height: 44px;padding: 8px 0;"> <div style="min-height: 44px;padding: 8px 0;">
<template v-if="form.conferenceMaterialsList && form.conferenceMaterialsList.length > 0"> <template v-if="form.conferenceMaterialsList && form.conferenceMaterialsList.length > 0">
<p class="file-item" v-for="file in form.conferenceMaterialsList"> <p v-for="file in form.conferenceMaterialsList" class="file-item">
<a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a> <a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a>
<i title="下载" class="icon-download" @click="downloadFile(file.id)"></i> <i title="下载" class="icon-download" @click="downloadFile(file.id)" />
<i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)"></i> <i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)" />
</p> </p>
</template> </template>
<p v-else>-</p> <p v-else>-</p>
@@ -128,7 +131,7 @@
<template slot="title"> <template slot="title">
<div class="modular-header"> <div class="modular-header">
<div class="modular-header-title"> <div class="modular-header-title">
<i class="icon-modular-title"/><span>课题组联系方式</span> <i class="icon-modular-title" /><span>课题组联系方式</span>
</div> </div>
</div> </div>
</template> </template>
@@ -145,7 +148,7 @@
<template slot="title"> <template slot="title">
<div class="modular-header"> <div class="modular-header">
<div class="modular-header-title"> <div class="modular-header-title">
<i class="icon-modular-title"/><span>内部资料</span> <i class="icon-modular-title" /><span>内部资料</span>
</div> </div>
</div> </div>
</template> </template>
@@ -154,10 +157,10 @@
<label style=" margin-right: 132px;line-height: 44px">立项报告</label> <label style=" margin-right: 132px;line-height: 44px">立项报告</label>
<div style="min-height: 44px;padding: 8px 0;"> <div style="min-height: 44px;padding: 8px 0;">
<template v-if="form.insideProjectProposalReportList && form.insideProjectProposalReportList.length > 0"> <template v-if="form.insideProjectProposalReportList && form.insideProjectProposalReportList.length > 0">
<p class="file-item" v-for="file in form.insideProjectProposalReportList"> <p v-for="file in form.insideProjectProposalReportList" class="file-item">
<a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a> <a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a>
<i title="下载" class="icon-download" @click="downloadFile(file.id)"></i> <i title="下载" class="icon-download" @click="downloadFile(file.id)" />
<i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)"></i> <i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)" />
</p> </p>
</template> </template>
<p v-else>-</p> <p v-else>-</p>
@@ -167,10 +170,10 @@
<label style=" margin-right: 132px;line-height: 44px">研究方案</label> <label style=" margin-right: 132px;line-height: 44px">研究方案</label>
<div style="min-height: 44px;padding: 8px 0;"> <div style="min-height: 44px;padding: 8px 0;">
<template v-if="form.insideResearchPlanList && form.insideResearchPlanList.length > 0"> <template v-if="form.insideResearchPlanList && form.insideResearchPlanList.length > 0">
<p class="file-item" v-for="file in form.insideResearchPlanList"> <p v-for="file in form.insideResearchPlanList" class="file-item">
<a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a> <a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a>
<i title="下载" class="icon-download" @click="downloadFile(file.id)"></i> <i title="下载" class="icon-download" @click="downloadFile(file.id)" />
<i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)"></i> <i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)" />
</p> </p>
</template> </template>
<p v-else>-</p> <p v-else>-</p>
@@ -180,10 +183,10 @@
<label style=" margin-right: 132px;line-height: 44px">会议资料</label> <label style=" margin-right: 132px;line-height: 44px">会议资料</label>
<div style="min-height: 44px;padding: 8px 0;"> <div style="min-height: 44px;padding: 8px 0;">
<template v-if="form.insideConferenceMaterialsList && form.insideConferenceMaterialsList.length > 0"> <template v-if="form.insideConferenceMaterialsList && form.insideConferenceMaterialsList.length > 0">
<p class="file-item" v-for="file in form.insideConferenceMaterialsList"> <p v-for="file in form.insideConferenceMaterialsList" class="file-item">
<a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a> <a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a>
<i title="下载" class="icon-download" @click="downloadFile(file.id)"></i> <i title="下载" class="icon-download" @click="downloadFile(file.id)" />
<i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)"></i> <i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)" />
</p> </p>
</template> </template>
<p v-else>-</p> <p v-else>-</p>
@@ -193,10 +196,10 @@
<label style=" margin-right: 132px;line-height: 44px">研究成果</label> <label style=" margin-right: 132px;line-height: 44px">研究成果</label>
<div style="min-height: 44px;padding: 8px 0;"> <div style="min-height: 44px;padding: 8px 0;">
<template v-if="form.insideResearchFindingsList && form.insideResearchFindingsList.length > 0"> <template v-if="form.insideResearchFindingsList && form.insideResearchFindingsList.length > 0">
<p class="file-item" v-for="file in form.insideResearchFindingsList"> <p v-for="file in form.insideResearchFindingsList" class="file-item">
<a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a> <a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a>
<i title="下载" class="icon-download" @click="downloadFile(file.id)"></i> <i title="下载" class="icon-download" @click="downloadFile(file.id)" />
<i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)"></i> <i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)" />
</p> </p>
</template> </template>
<p v-else>-</p> <p v-else>-</p>
@@ -206,10 +209,10 @@
<label style=" margin-right: 164px;line-height: 44px">其他</label> <label style=" margin-right: 164px;line-height: 44px">其他</label>
<div style="min-height: 44px;padding: 8px 0;"> <div style="min-height: 44px;padding: 8px 0;">
<template v-if="form.insideOtherList && form.insideOtherList.length > 0"> <template v-if="form.insideOtherList && form.insideOtherList.length > 0">
<p class="file-item" v-for="file in form.insideOtherList"> <p v-for="file in form.insideOtherList" class="file-item">
<a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a> <a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a>
<i title="下载" class="icon-download" @click="downloadFile(file.id)"></i> <i title="下载" class="icon-download" @click="downloadFile(file.id)" />
<i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)"></i> <i title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)" />
</p> </p>
</template> </template>
<p v-else>-</p> <p v-else>-</p>
@@ -222,7 +225,7 @@
<template slot="title"> <template slot="title">
<div class="modular-header"> <div class="modular-header">
<div class="modular-header-title"> <div class="modular-header-title">
<i class="icon-modular-title"/><span>内部联系方式</span> <i class="icon-modular-title" /><span>内部联系方式</span>
</div> </div>
</div> </div>
</template> </template>
@@ -239,19 +242,20 @@
</div> </div>
<!-- 更新LOG --> <!-- 更新LOG -->
<el-dialog <el-dialog
title="更新记录" title="更新记录"
:visible.sync="relateDialog" :visible.sync="relateDialog"
width="60%" width="60%"
class="relateClass" class="relateClass"
:before-close="relateDialogClose"> :before-close="relateDialogClose"
>
<div <div
v-for="(item, index) in relateNowList" v-for="(item, index) in relateNowList"
:key="index" v-if="relateNowList"
v-if="relateNowList" :key="index"
style="margin-bottom: 10px;line-height: 20px" style="margin-bottom: 10px;line-height: 20px"
> >
{{index+1}}. {{item.creationUserName}} {{item.creationTime}} {{item.content}} {{ index+1 }}. {{ item.creationUserName }} {{ item.creationTime }} {{ item.content }}
<div v-if="relateNowList.length >1"><el-divider></el-divider></div> <div v-if="relateNowList.length >1"><el-divider /></div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="relateDialogClose()"> </el-button> <el-button type="primary" @click="relateDialogClose()"> </el-button>
@@ -262,10 +266,8 @@
</template> </template>
<script> <script>
import { getBusStandFileByAttId } from 'api/process'
export default { export default {
name: "policyTopicsDetail", name: 'PolicyTopicsDetail',
data () { data () {
return { return {
url: { url: {
@@ -273,14 +275,14 @@ export default {
getLogList: 'lawss/sarUpdLog/getLogList', // 更新记录 getLogList: 'lawss/sarUpdLog/getLogList', // 更新记录
}, },
form: {}, form: {},
activeNames: ['1', '2', '3'], activeNames: [ '1', '2', '3' ],
// 更新记录 // 更新记录
relateDialog: false, relateDialog: false,
relateNowList: [], relateNowList: [],
loading: false loading: false
} }
}, },
created() { created () {
this.getData() this.getData()
}, },
methods: { methods: {
@@ -298,7 +300,7 @@ export default {
res.data.insideContactInformationList.forEach((item, index) => { res.data.insideContactInformationList.forEach((item, index) => {
activeNames.push('insideContactInformationList' + index) activeNames.push('insideContactInformationList' + index)
}) })
this.activeNames = [...this.activeNames, ...activeNames] this.activeNames = [ ...this.activeNames, ...activeNames ]
this.$set(this, 'form', res.data) this.$set(this, 'form', res.data)
} }
}) })
@@ -314,9 +316,9 @@ export default {
if (res.ok && res.data.length > 0) { if (res.ok && res.data.length > 0) {
this.relateDialog = true this.relateDialog = true
const relateList = res.data const relateList = res.data
var i let i
for (i = 0; i < relateList.length; i++) { for (i = 0; i < relateList.length; i++) {
let obj = {creationUserName: '', creationTime: '', content: ''} const obj = { creationUserName: '', creationTime: '', content: '' }
obj.creationUserName = relateList[i].creationUserName obj.creationUserName = relateList[i].creationUserName
obj.creationTime = relateList[i].creationTime obj.creationTime = relateList[i].creationTime
obj.content = relateList[i].content obj.content = relateList[i].content
@@ -349,21 +351,6 @@ export default {
} }
} }
}, },
getBusStandFileByAttId(attId) {
return new Promise((resolve, reject) => {
getBusStandFileByAttId({
attId
}).then(res => {
if (res.ok) {
resolve(res.data)
} else {
reject()
}
}).catch(e => {
reject(e)
})
})
},
openFileInPdf (attId, fileName) { openFileInPdf (attId, fileName) {
this.$preview(attId) this.$preview(attId)
}, },
@@ -8,27 +8,32 @@
<template slot="title"> <template slot="title">
<div class="modular-header"> <div class="modular-header">
<div class="modular-header-title"> <div class="modular-header-title">
<i class="icon-modular-title"/><span>基础信息</span> <i class="icon-modular-title" /><span>基础信息</span>
</div> </div>
<div class="modular-header-btn"> <div class="modular-header-btn">
<el-button v-if="form.collectId" <el-button
@click.stop="collectClick(form.collectId)" v-if="form.collectId"
title="取消收藏" title="取消收藏"
class="collection-btn" class="collection-btn"
icon="el-icon-star-on" icon="el-icon-star-on"
:loading="isSubmit" :loading="isSubmit"
></el-button> @click.stop="collectClick(form.collectId)"
<el-button v-else />
@click.stop="collectClick()" <el-button
title="收藏" v-else
class="collection-btn" title="收藏"
icon="el-icon-star-off" class="collection-btn"
:loading="isSubmit" icon="el-icon-star-off"
></el-button> :loading="isSubmit"
<el-button class="relation-btn" @click.stop="collectClick()"
icon="icon-relation" />
@click.stop="relateEvent()" <el-button
>更新记录</el-button> class="relation-btn"
icon="icon-relation"
@click.stop="relateEvent()"
>
更新记录
</el-button>
</div> </div>
</div> </div>
</template> </template>
@@ -46,10 +51,10 @@
<label style=" margin-right: 156px;line-height: 44px">资料文件</label> <label style=" margin-right: 156px;line-height: 44px">资料文件</label>
<div style="min-height: 44px;padding: 8px 0;"> <div style="min-height: 44px;padding: 8px 0;">
<template v-if="form.informationFileList && form.informationFileList.length > 0"> <template v-if="form.informationFileList && form.informationFileList.length > 0">
<p class="file-item" v-for="file in form.informationFileList"> <p v-for="file in form.informationFileList" class="file-item">
<a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a> <a class="file-title" target="_blank" :title="file.oldFileName" @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName }}</a>
<i v-if="form.downloadable" title="下载" class="icon-download" @click="downloadFile(file.id)"></i> <i v-if="form.downloadable" title="下载" class="icon-download" @click="downloadFile(file.id)" />
<i v-if="form.downloadable" title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)"></i> <i v-if="form.downloadable" title="下载带水印" class="icon-download2" @click="downloadFileByWater(file.id, file.fileSuffix)" />
</p> </p>
</template> </template>
<p v-else>-</p> <p v-else>-</p>
@@ -64,19 +69,20 @@
</div> </div>
<!-- 更新LOG --> <!-- 更新LOG -->
<el-dialog <el-dialog
title="更新记录" title="更新记录"
:visible.sync="relateDialog" :visible.sync="relateDialog"
width="60%" width="60%"
class="relateClass" class="relateClass"
:before-close="relateDialogClose"> :before-close="relateDialogClose"
>
<div <div
v-for="(item, index) in relateNowList" v-for="(item, index) in relateNowList"
:key="index" v-if="relateNowList"
v-if="relateNowList" :key="index"
style="margin-bottom: 10px;line-height: 20px" style="margin-bottom: 10px;line-height: 20px"
> >
{{index+1}}. {{item.creationUserName}} {{item.creationTime}} {{item.content}} {{ index+1 }}. {{ item.creationUserName }} {{ item.creationTime }} {{ item.content }}
<div v-if="relateNowList.length >1"><el-divider></el-divider></div> <div v-if="relateNowList.length >1"><el-divider /></div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="relateDialogClose()"> </el-button> <el-button type="primary" @click="relateDialogClose()"> </el-button>
@@ -87,10 +93,8 @@
</template> </template>
<script> <script>
import { getBusStandFileByAttId } from 'api/process'
export default { export default {
name: "regulatoryMaterialsDetail", name: 'RegulatoryMaterialsDetail',
data () { data () {
return { return {
url: { url: {
@@ -100,7 +104,7 @@ export default {
updateByUserId: 'person/personCollect/updateByUserId', // 取消收藏 updateByUserId: 'person/personCollect/updateByUserId', // 取消收藏
}, },
form: {}, form: {},
activeNames: ['1'], activeNames: [ '1' ],
isSubmit: false, isSubmit: false,
// 更新记录 // 更新记录
@@ -109,7 +113,7 @@ export default {
loading: false, loading: false,
} }
}, },
created() { created () {
this.getData() this.getData()
}, },
methods: { methods: {
@@ -117,7 +121,7 @@ export default {
return (userStr && userStr !== '') ? userStr.split(',').map(item => item.split('(')[1].split(')')[0]) : [] return (userStr && userStr !== '') ? userStr.split(',').map(item => item.split('(')[1].split(')')[0]) : []
}, },
// 下载权限 // 下载权限
hasDownLoadPermission() { hasDownLoadPermission () {
const userId = this.$store.getters.userInfo.userId const userId = this.$store.getters.userInfo.userId
// 未设置可下载者 创建人和审批人可下载 // 未设置可下载者 创建人和审批人可下载
if (!this.form.downloadableBy || this.form.downloadableBy === '') { if (!this.form.downloadableBy || this.form.downloadableBy === '') {
@@ -141,7 +145,7 @@ export default {
} }
}) })
}, },
removeCommasAtStartAndEnd(inputString) { removeCommasAtStartAndEnd (inputString) {
// 检查字符串是否以逗号开头 // 检查字符串是否以逗号开头
if (inputString.charAt(0) === ',') { if (inputString.charAt(0) === ',') {
inputString = inputString.slice(1); // 去除开头的逗号 inputString = inputString.slice(1); // 去除开头的逗号
@@ -163,7 +167,7 @@ export default {
// 取消收藏 // 取消收藏
this.$http._put(this.url.updateByUserId, { this.$http._put(this.url.updateByUserId, {
id: collectId id: collectId
},{ }, {
_this: this, _this: this,
loading: 'isSubmit' loading: 'isSubmit'
}).then(res => { }).then(res => {
@@ -171,7 +175,7 @@ export default {
}) })
} else { } else {
// 加收藏 // 加收藏
let personCollect = { const personCollect = {
userId: this.$store.getters.userInfo.userId, userId: this.$store.getters.userInfo.userId,
collectResId: this.form.id, collectResId: this.form.id,
collectTitle: this.form.name, collectTitle: this.form.name,
@@ -198,9 +202,9 @@ export default {
if (res.ok && res.data.length > 0) { if (res.ok && res.data.length > 0) {
this.relateDialog = true this.relateDialog = true
const relateList = res.data const relateList = res.data
var i let i
for (i = 0; i < relateList.length; i++) { for (i = 0; i < relateList.length; i++) {
let obj = {creationUserName: '', creationTime: '', content: ''} const obj = { creationUserName: '', creationTime: '', content: '' }
obj.creationUserName = relateList[i].creationUserName obj.creationUserName = relateList[i].creationUserName
obj.creationTime = relateList[i].creationTime obj.creationTime = relateList[i].creationTime
obj.content = relateList[i].content obj.content = relateList[i].content
@@ -233,21 +237,6 @@ export default {
} }
} }
}, },
getBusStandFileByAttId(attId) {
return new Promise((resolve, reject) => {
getBusStandFileByAttId({
attId
}).then(res => {
if (res.ok) {
resolve(res.data)
} else {
reject()
}
}).catch(e => {
reject(e)
})
})
},
openFileInPdf (attId, fileName) { openFileInPdf (attId, fileName) {
this.$preview(attId) this.$preview(attId)
}, },