|
|
|
@ -115,8 +115,8 @@
|
|
|
|
|
v-for="(item, idx) in turnDetailsList"
|
|
|
|
|
:key="idx"
|
|
|
|
|
class="monitor-list"
|
|
|
|
|
@click="rowClick(item.attUrl,'details')"
|
|
|
|
|
>
|
|
|
|
|
<!-- @click="rowClick(item.attUrl,'details')" -->
|
|
|
|
|
<span :title="item.attName">{{ item.attName }}</span>
|
|
|
|
|
<span :title="item.deptName">{{ item.deptName }}</span>
|
|
|
|
|
<span :title="item.opinionStatusName" :style="activation(item.opinionStatusName)">{{ activationName(item.opinionStatusName) }}</span>
|
|
|
|
@ -458,25 +458,25 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 上一条舆情预警信息
|
|
|
|
|
previousWarning() {
|
|
|
|
|
if (this.currentWarningIndex > 0) {
|
|
|
|
|
this.currentWarningIndex--
|
|
|
|
|
}
|
|
|
|
|
opinionWarningDetail(
|
|
|
|
|
this.warningChangeList[this.currentWarningIndex]
|
|
|
|
|
).then((res) => {
|
|
|
|
|
Object.assign(this.currentWarningObj, res.data)
|
|
|
|
|
})
|
|
|
|
|
// if (this.currentWarningIndex > 0) {
|
|
|
|
|
// this.currentWarningIndex--
|
|
|
|
|
// }
|
|
|
|
|
// opinionWarningDetail(
|
|
|
|
|
// this.warningChangeList[this.currentWarningIndex]
|
|
|
|
|
// ).then((res) => {
|
|
|
|
|
// Object.assign(this.currentWarningObj, res.data)
|
|
|
|
|
// })
|
|
|
|
|
},
|
|
|
|
|
// 下一条舆情预警信息
|
|
|
|
|
async nextWarning() {
|
|
|
|
|
const length = this.warningChangeList.length
|
|
|
|
|
if (this.currentWarningIndex < length - 1) {
|
|
|
|
|
this.currentWarningIndex++
|
|
|
|
|
}
|
|
|
|
|
const res = await opinionWarningDetail(
|
|
|
|
|
this.warningChangeList[this.currentWarningIndex]
|
|
|
|
|
)
|
|
|
|
|
this.currentWarningObj = res.data
|
|
|
|
|
// const length = this.warningChangeList.length
|
|
|
|
|
// if (this.currentWarningIndex < length - 1) {
|
|
|
|
|
// this.currentWarningIndex++
|
|
|
|
|
// }
|
|
|
|
|
// const res = await opinionWarningDetail(
|
|
|
|
|
// this.warningChangeList[this.currentWarningIndex]
|
|
|
|
|
// )
|
|
|
|
|
// this.currentWarningObj = res.data
|
|
|
|
|
},
|
|
|
|
|
// 鼠标经过暂停
|
|
|
|
|
mouseOver() {
|
|
|
|
@ -502,12 +502,18 @@ export default {
|
|
|
|
|
// const res = await getyqTsd()
|
|
|
|
|
this.tableHeader = [{ label: '标题名称', prop: 'attName' }]
|
|
|
|
|
// this.tableData = res.data
|
|
|
|
|
this.tableData = []
|
|
|
|
|
this.tableData = [{
|
|
|
|
|
attName: '民情提示单202201',
|
|
|
|
|
'文件路径': '/网信办大屏内容文档/网络舆情/舆情报告/提示单/民情提示单202201.docx'
|
|
|
|
|
}]
|
|
|
|
|
} else if (val === '转办单') {
|
|
|
|
|
// const res = await getyqZbd()
|
|
|
|
|
this.tableHeader = [{ label: '标题名称', prop: 'attName' }]
|
|
|
|
|
// this.tableData = res.data
|
|
|
|
|
this.tableData = []
|
|
|
|
|
this.tableData = [{
|
|
|
|
|
attName: '民情提示单202201',
|
|
|
|
|
'文件路径': '/网信办大屏内容文档/网络舆情/舆情报告/提示单/民情提示单202201.docx'
|
|
|
|
|
}]
|
|
|
|
|
} else {
|
|
|
|
|
const tableObject = require('./data.json')
|
|
|
|
|
this.tableData = tableObject[val]
|
|
|
|
@ -537,41 +543,43 @@ export default {
|
|
|
|
|
this.setCurrentPageData()
|
|
|
|
|
},
|
|
|
|
|
rowClick(row, type) {
|
|
|
|
|
let urlAddress
|
|
|
|
|
if (type === 'details') {
|
|
|
|
|
this.fileExtension = row.substring(row.lastIndexOf('.') + 1)
|
|
|
|
|
urlAddress = window._CONFIG['nginxUrl'] + `${row}`
|
|
|
|
|
} else {
|
|
|
|
|
if (this.dialogTitle === '提示单' || this.dialogTitle === '转办单') {
|
|
|
|
|
this.fileExtension = row.attUrl.substring(row.attUrl.lastIndexOf('.') + 1)
|
|
|
|
|
urlAddress = window._CONFIG['nginxUrl'] + `${row.attUrl}`
|
|
|
|
|
} else {
|
|
|
|
|
this.fileExtension = row['文件路径'].substring(
|
|
|
|
|
row['文件路径'].lastIndexOf('.') + 1
|
|
|
|
|
)
|
|
|
|
|
urlAddress = `${process.env.NODE_ENV === 'production'
|
|
|
|
|
? window._CONFIG['fileNginxUrl']
|
|
|
|
|
: '/fileApi'
|
|
|
|
|
}${row['文件路径']}`
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log('this.fileExtension', this.fileExtension)
|
|
|
|
|
if (this.fileExtension === 'docx' || this.fileExtension === 'doc') {
|
|
|
|
|
axios({
|
|
|
|
|
method: 'get',
|
|
|
|
|
responseType: 'blob', // 设置响应文件格式
|
|
|
|
|
url: urlAddress
|
|
|
|
|
}).then(({ data }) => {
|
|
|
|
|
if (data) {
|
|
|
|
|
this.dialogDetails = true
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
docx.renderAsync(data, this.$refs.file) // 渲染到页面预览
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else if (this.fileExtension === 'pdf') {
|
|
|
|
|
this.getNumPages(urlAddress)
|
|
|
|
|
}
|
|
|
|
|
this.dialogDetails = true
|
|
|
|
|
|
|
|
|
|
// let urlAddress
|
|
|
|
|
// if (type === 'details') {
|
|
|
|
|
// this.fileExtension = row.substring(row.lastIndexOf('.') + 1)
|
|
|
|
|
// urlAddress = window._CONFIG['nginxUrl'] + `${row}`
|
|
|
|
|
// } else {
|
|
|
|
|
// if (this.dialogTitle === '提示单' || this.dialogTitle === '转办单') {
|
|
|
|
|
// this.fileExtension = row.attUrl.substring(row.attUrl.lastIndexOf('.') + 1)
|
|
|
|
|
// urlAddress = window._CONFIG['nginxUrl'] + `${row.attUrl}`
|
|
|
|
|
// } else {
|
|
|
|
|
// this.fileExtension = row['文件路径'].substring(
|
|
|
|
|
// row['文件路径'].lastIndexOf('.') + 1
|
|
|
|
|
// )
|
|
|
|
|
// urlAddress = `${process.env.NODE_ENV === 'production'
|
|
|
|
|
// ? window._CONFIG['fileNginxUrl']
|
|
|
|
|
// : '/fileApi'
|
|
|
|
|
// }${row['文件路径']}`
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// console.log('this.fileExtension', this.fileExtension)
|
|
|
|
|
// if (this.fileExtension === 'docx' || this.fileExtension === 'doc') {
|
|
|
|
|
// axios({
|
|
|
|
|
// method: 'get',
|
|
|
|
|
// responseType: 'blob', // 设置响应文件格式
|
|
|
|
|
// url: urlAddress
|
|
|
|
|
// }).then(({ data }) => {
|
|
|
|
|
// if (data) {
|
|
|
|
|
// this.dialogDetails = true
|
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
|
// docx.renderAsync(data, this.$refs.file) // 渲染到页面预览
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// } else if (this.fileExtension === 'pdf') {
|
|
|
|
|
// this.getNumPages(urlAddress)
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
getNumPages(url) {
|
|
|
|
|
axios({
|
|
|
|
|