对接法规技术评估

This commit is contained in:
qq787203167
2022-07-14 15:56:43 +08:00
parent d292b1424b
commit 87cab0fa11
5 changed files with 91 additions and 36 deletions
@@ -92,6 +92,7 @@
title: this.$t('relevantSections'), title: this.$t('relevantSections'),
align: 'center', align: 'center',
dataIndex: 'relatedSection', dataIndex: 'relatedSection',
ellipsis: true,
width: 180 width: 180
}, },
{ {
@@ -220,7 +220,11 @@
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else { } else {
this.$message.warning(this.$t('theDoesNotSupportPreview')) if (item.createBy == this.userInfo().username){
downloadFile('/sys/common/downLoadFile', item.name, { id: item.fileId, userName: this.userInfo().username })
}else{
this.$message.warning(this.$t('theDoesNotSupportPreview'))
}
} }
}, },
download(item) { download(item) {
@@ -2,60 +2,98 @@
<div class="monthlyReportRegulations-box"> <div class="monthlyReportRegulations-box">
<div class="header-text"> <div class="header-text">
<div class="header-text-left">{{this.$t('monthlyReportRegulations')}}</div> <div class="header-text-left">{{this.$t('monthlyReportRegulations')}}</div>
<div class="header-text-right"> <div class="header-text-right" @click="moreClick">
More More
<img src="../../../assets/gengduo.png" alt=""> <img src="../../../assets/gengduo.png" alt="">
</div> </div>
</div> </div>
<div class="monthlyReportRegulations-box-content"> <div class="monthlyReportRegulations-box-content" v-if="monthlyReportRegulationsList.length > 0">
<div class="monthlyReportRegulations-text" v-for="item in monthlyReportRegulationsList"> <div class="monthlyReportRegulations-text" v-for="item in monthlyReportRegulationsList" @click="preview(item)">
<div class="yuan"></div> <div class="yuan"></div>
<div class="text" :title="item.name">{{item.name}}</div> <div class="text" :title="item.name">{{item.name}}</div>
<div class="time">{{item.time}}</div> <div class="time">{{item.createTime}}</div>
</div> </div>
</div> </div>
<div v-else style="height: 300px;position: relative">
<JNoData/>
</div>
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
</div> </div>
</template> </template>
<script> <script>
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default { export default {
name: 'monthlyReportRegulations', name: 'monthlyReportRegulations',
data() { data() {
return { return {
monthlyReportRegulationsList: [ monthlyReportRegulationsList: [],
{ loading: false,
name: '蔚来汽车法规月报_202201_主页面 CN.docx', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
time: '2022-01-01 13:24:36' url: {
}, list: '/report/lawsMonthlyReportManageEO/page'
{ }
name: '蔚来汽车法规月报_202202_主页面 CN.docx', }
time: '2022-02-01 15:50:06' },
}, mounted() {
{ this.getList()
name: '蔚来汽车法规月报_202203_主页面 CN.docx', },
time: '2022-03-01 13:56:20' methods: {
}, ...mapGetters(['userInfo']),
{ getList() {
name: '蔚来汽车法规月报_202204_主页面 CN.docx', let query = {
time: '2022-04-01 16:24:45' pageNo: 1,
}, pageSize: 6,
{ issueStatus: '1'
name: '蔚来汽车法规月报_202205_主页面 CN.docx', }
time: '2022-06-01 17:24:06' this.loading = true
}, getAction(this.url.list, query).then((res) => {
{ if (res.success) {
name: '蔚来汽车法规月报_202206_主页面 CN.docx', this.monthlyReportRegulationsList = res.result.records || []
time: '2022-06-01 17:24:06' this.loading = false
} else {
this.loading = false
} }
] })
},
moreClick() {
this.$router.push({
path: '/monthlyRegulationReport'
})
},
preview(item) {
let fileName = item.name
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + item.fileId + '&userName=' + this.userInfo().username))
} else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
window.open(url, '_blank')
} else {
if (item.createBy == this.userInfo().username){
downloadFile('/sys/common/downLoadFile', item.name, { id: item.fileId, userName: this.userInfo().username })
}else{
this.$message.warning(this.$t('theDoesNotSupportPreview'))
}
}
} }
} }
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.monthlyReportRegulations-box { .monthlyReportRegulations-box {
width: 100%; width: 100%;
position: relative;
.header-text { .header-text {
width: 100%; width: 100%;
@@ -73,6 +111,7 @@
font-weight: 400; font-weight: 400;
color: #9B9DA9; color: #9B9DA9;
margin-top: 6px; margin-top: 6px;
cursor: pointer;
} }
} }
@@ -181,6 +181,13 @@
deleteData() { deleteData() {
this.formInline.dataList.pop() this.formInline.dataList.pop()
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
},
submitData(callBack) {
this.$refs.ruleForm.validate(valid => {
if (valid) {
callBack && callBack(this.formInline.dataList)
}
})
} }
} }
} }
@@ -142,13 +142,13 @@
res.lawsOpinionGatherId = this.queryProject.id res.lawsOpinionGatherId = this.queryProject.id
res.actiProcInstId = this.$route.query.prcId res.actiProcInstId = this.$route.query.prcId
}) })
postAction('/lawsOpinionGather/lawsOpinionAssessmentResultEO/insertBatch', { dataList:list }).then((res) => { postAction('/lawsOpinionGather/lawsOpinionAssessmentResultEO/insertBatch', { dataList: list }).then((res) => {
if (res.success) { if (res.success) {
if (num == 1) { if (num == 1) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.$router.push({ // this.$router.push({
path: '/collectionOfRegulatoryOpinions' // path: '/collectionOfRegulatoryOpinions'
}) // })
this.loading = false this.loading = false
} else { } else {
this.completeTask() this.completeTask()
@@ -162,8 +162,12 @@
}) })
}, },
submit() { submit() {
let dataList = this.$refs.feedbackInformationRef.formInline.dataList this.$refs.feedbackInformationRef.submitData((res) => {
this.insertBatch(dataList, 2) this.loading = true
this.insertBatch(res, 2)
})
// let dataList = this.$refs.feedbackInformationRef.formInline.dataList
// this.insertBatch(dataList, 2)
}, },
completeTask() { completeTask() {
let query = { let query = {