|
@ -3,70 +3,78 @@ |
|
|
<!-- 搜索栏 --> |
|
|
<!-- 搜索栏 --> |
|
|
<div class="filter"> |
|
|
<div class="filter"> |
|
|
<div> |
|
|
<div> |
|
|
<ButtonGradient @click="onExport"> |
|
|
<ButtonGradient @click="onExport"> |
|
|
<template #prefix> |
|
|
<template #prefix> |
|
|
<img src="@screen/images/export.svg" /> |
|
|
<img src="@screen/images/export.svg" /> |
|
|
</template> |
|
|
</template> |
|
|
导出 |
|
|
导出 |
|
|
</ButtonGradient> |
|
|
</ButtonGradient> |
|
|
<ButtonGradient @click="onRefreshForm" class="refresh-btn"> |
|
|
<ButtonGradient @click="onRefreshForm" class="refresh-btn"> |
|
|
<template #prefix> |
|
|
<template #prefix> |
|
|
<img src="./images/refresh.svg" /> |
|
|
<img src="./images/refresh.svg" /> |
|
|
</template> |
|
|
</template> |
|
|
刷新 |
|
|
刷新 |
|
|
</ButtonGradient> |
|
|
</ButtonGradient> |
|
|
<span class="sum-total">发布实际数量:{{ sumtotal }}</span> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<InputSearch ref="searchComp" style="width: 480px" :formList="searchFormList" |
|
|
<InputSearch ref="searchComp" style="width: 480px" :formList="searchFormList" |
|
|
:formConfigOptions="{ dFormData: { eventState: '0' } }" @handleSearch="handleSearch" /> |
|
|
:formConfigOptions="{ dFormData: { eventState: '0' } }" @handleSearch="handleSearch" /> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 内容 --> |
|
|
<!-- 内容 --> |
|
|
|
|
|
|
|
|
<div class="body"> |
|
|
<div class="body"> |
|
|
<Table :data="tableData"> |
|
|
<Table :data="tableData"> |
|
|
<el-table-column label="序号" type="index" :index="indexMethod" width="100" align="center" |
|
|
<el-table-column label="序号" type="index" :index="indexMethod" width="100" align="center" |
|
|
header-align="center" /> |
|
|
header-align="center" /> |
|
|
|
|
|
|
|
|
<ElTableColumn label="发布渠道" prop="publishChannels" width="120" align="center" header-align="center"> |
|
|
<ElTableColumn label="发布渠道" prop="publishChannels" width="120" align="center" header-align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
{{ enum_channels[scope.row.publishChannels] }} |
|
|
{{ enum_channels[scope.row.publishChannels] }} |
|
|
</template> |
|
|
</template> |
|
|
</ElTableColumn> |
|
|
</ElTableColumn> |
|
|
<ElTableColumn label="发布时间" prop="publishTime" align="center" width="200" header-align="center" /> |
|
|
<ElTableColumn label="发布时间" prop="publishTime" align="center" width="200" header-align="center" /> |
|
|
<ElTableColumn label="操作IP" prop="ip" align="center" width="250" header-align="center"> |
|
|
<ElTableColumn label="操作IP" prop="ip" align="center" width="250" header-align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
{{ (scope.row.ip === 'unknown' || !scope.row.ip) ? '服务器' : scope.row.ip }} |
|
|
{{ (scope.row.ip === 'unknown' || !scope.row.ip) ? '服务器': scope.row.ip}} |
|
|
</template> |
|
|
</template> |
|
|
</ElTableColumn> |
|
|
</ElTableColumn> |
|
|
<ElTableColumn label="位置/设备" prop="position" align="center" width="260" header-align="center"> |
|
|
<ElTableColumn label="位置/设备" prop="position" align="center" width="260" header-align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
{{ scope.row.position && scope.row.position.replace(/\[/, '').replace(/\]/, '') }} |
|
|
{{ scope.row.position && scope.row.position.replace(/\[/,'').replace(/\]/,'') }} |
|
|
</template> |
|
|
</template> |
|
|
</ElTableColumn> |
|
|
</ElTableColumn> |
|
|
<ElTableColumn label="发布内容" show-overflow-tooltip prop="contentDetails" align="center" header-align="center"> |
|
|
<ElTableColumn label="发布内容" show-overflow-tooltip prop="contentDetails" align="center" header-align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-carousel v-if="scope.row.publishChannels === 4 && scope.row.contentDetailsInfo" direction="horizontal" :autoplay="false" :indicator-position="scope.row.contentDetailsInfo.length === 1 ? 'none' : 'inside'" height="50px" |
|
|
<el-carousel v-if="scope.row.publishChannels === 4 && scope.row.contentDetailsInfo" direction="horizontal" :autoplay="false" :indicator-position="scope.row.contentDetailsInfo.length===1?'none':'inside'" height="50px" |
|
|
arrow="never" class="board_shower"> |
|
|
arrow="never" class="board_shower"> |
|
|
<el-carousel-item v-for="item, index in scope.row.contentDetailsInfo" |
|
|
<el-carousel-item v-for="item,index in scope.row.contentDetailsInfo" |
|
|
:key="index"> |
|
|
:key="index"> |
|
|
<BoardRecordPreview :tpl="item" style="height: 100%;" /> |
|
|
<BoardRecordPreview :tpl="item" style="height: 100%;" /> |
|
|
</el-carousel-item> |
|
|
</el-carousel-item> |
|
|
</el-carousel> |
|
|
</el-carousel> |
|
|
<span v-else>{{ scope.row.contentDetails }}</span> |
|
|
<span v-else>{{ scope.row.contentDetails }}</span> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <span >{{ scope.row.contentDetails }}</span> --> |
|
|
</template> |
|
|
</template> |
|
|
</ElTableColumn> |
|
|
</ElTableColumn> |
|
|
<ElTableColumn label="发布人" prop="publisher" width="100" align="center" header-align="center" /> |
|
|
<ElTableColumn label="发布人" prop="publisher" width="100" align="center" header-align="center" /> |
|
|
<ElTableColumn label="发布结果" prop="status" width="100" align="center" header-align="center"> |
|
|
<ElTableColumn label="发布结果" prop="status" width="100" align="center" header-align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<i class="el-icon-success" style="font-size: 24px; color: #0c0;" v-if="scope.row.publishStatus === 1"></i> |
|
|
<i class="el-icon-success" style="font-size: 24px; color:#0c0;" v-if="scope.row.publishStatus === 1"></i> |
|
|
<i class="el-icon-error" style="font-size: 24px; color: #BBB;" v-else></i> |
|
|
<i class="el-icon-error" style="font-size: 24px; color:#BBB;" v-else></i> |
|
|
</template> |
|
|
</template> |
|
|
</ElTableColumn> |
|
|
</ElTableColumn> |
|
|
|
|
|
<!-- <ElTableColumn label="操作" prop="status" width="100" align="center" header-align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-button type="danger" icon="el-icon-delete" size="mini" @click="onDelete(scope.row.id)">删除</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</ElTableColumn> --> |
|
|
</Table> |
|
|
</Table> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 分页 --> |
|
|
<!-- 分页 --> |
|
|
<div class="footer"> |
|
|
<div class="footer"> |
|
|
<Pagination @current-change="initData" @size-change="onSizeChange" width="'100%'" |
|
|
<Pagination @current-change="initData" @size-change="onSizeChange" width="'100%'" |
|
|
:page-sizes="[10, 20, 30, 40, 50]" :page-size="searchData.pageSize" :current-page.sync="searchData.pageNum" |
|
|
:page-sizes="[10, 20, 30, 40, 50]" :page-size="searchData.pageSize" :current-page.sync="searchData.pageNum" |
|
|
layout="total, sizes, prev, pager, next" :total="total"> |
|
|
layout="total, sizes, prev, pager, next" :total="total"> |
|
|
</Pagination> |
|
|
</Pagination> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -78,11 +86,12 @@ import Pagination from '@screen/components/Pagination.vue'; |
|
|
import Table from '@screen/components/Table.vue'; |
|
|
import Table from '@screen/components/Table.vue'; |
|
|
import request from "@/utils/request"; |
|
|
import request from "@/utils/request"; |
|
|
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue' |
|
|
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue' |
|
|
import { DirectionTypes } from '@screen/utils/enum.js'; |
|
|
import {DirectionTypes} from '@screen/utils/enum.js'; |
|
|
import InputSearch from "@screen/components/InputSearch/index.vue"; |
|
|
import InputSearch from "@screen/components/InputSearch/index.vue"; |
|
|
import { searchFormList } from "./data"; |
|
|
import { searchFormList } from "./data"; |
|
|
import moment from "moment"; |
|
|
import moment from "moment"; |
|
|
import { Loading } from 'element-ui'; |
|
|
import { Loading } from 'element-ui'; |
|
|
|
|
|
import { e } from 'mathjs'; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'boardRecord', |
|
|
name: 'boardRecord', |
|
@ -98,35 +107,33 @@ export default { |
|
|
DirectionTypes, |
|
|
DirectionTypes, |
|
|
moment, |
|
|
moment, |
|
|
enum_channels: { |
|
|
enum_channels: { |
|
|
4: '情报板', |
|
|
4:'情报板', |
|
|
7: '语音广播', |
|
|
7:'语音广播', |
|
|
8: '企业微信', |
|
|
8:'企业微信', |
|
|
}, |
|
|
}, |
|
|
tableData: [], |
|
|
tableData: [], |
|
|
searchFormList, |
|
|
searchFormList, |
|
|
isShowPhrases: false, |
|
|
isShowPhrases: false, |
|
|
isShowDisposal: false, |
|
|
isShowDisposal: false, |
|
|
total: 20, |
|
|
total: 20, |
|
|
sumtotal: 0, |
|
|
|
|
|
eventType: 1, |
|
|
eventType: 1, |
|
|
searchData: { |
|
|
searchData: { |
|
|
pageSize: 20, |
|
|
pageSize: 20, |
|
|
pageNum: 1 |
|
|
pageNum: 1 |
|
|
}, |
|
|
}, |
|
|
phrasesData: [], |
|
|
phrasesData: [], |
|
|
process: [], |
|
|
process: [] |
|
|
sum: 0 // 将 sum 定义为 data 属性 |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
onRefreshForm() { |
|
|
onRefreshForm(){ |
|
|
this.searchData.pageNum = 1; |
|
|
this.searchData.pageNum = 1; |
|
|
this.$refs.searchComp.handleResetForm(); |
|
|
this.$refs.searchComp.handleResetForm(); |
|
|
}, |
|
|
}, |
|
|
onDelete(id) { |
|
|
onDelete(id){ |
|
|
const self = this; |
|
|
const self = this; |
|
|
this.$confirm("是否删除?", "警告", { |
|
|
this.$confirm("是否删除?", "警告", { |
|
|
confirmButtonText: "确定", |
|
|
confirmButtonText: "确定", |
|
@ -135,7 +142,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
.then(function () { |
|
|
.then(function () { |
|
|
request({ |
|
|
request({ |
|
|
url: `/business/manage/${id}`, |
|
|
url: `/business/manage/`+id, |
|
|
method: "DELETE", |
|
|
method: "DELETE", |
|
|
data: {}, |
|
|
data: {}, |
|
|
}).then((result) => { |
|
|
}).then((result) => { |
|
@ -145,7 +152,7 @@ export default { |
|
|
}); |
|
|
}); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
onExport() { |
|
|
onExport(){ |
|
|
const self = this; |
|
|
const self = this; |
|
|
this.$confirm("是否确认导出共计查询内容?", "警告", { |
|
|
this.$confirm("是否确认导出共计查询内容?", "警告", { |
|
|
confirmButtonText: "确定", |
|
|
confirmButtonText: "确定", |
|
@ -164,6 +171,8 @@ export default { |
|
|
data: self.searchData, |
|
|
data: self.searchData, |
|
|
responseType: 'blob', |
|
|
responseType: 'blob', |
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
|
|
|
const url = window.URL.createObjectURL(new Blob([res])); |
|
|
const url = window.URL.createObjectURL(new Blob([res])); |
|
|
let link = document.createElement("a"); |
|
|
let link = document.createElement("a"); |
|
|
link.style.display = "none"; |
|
|
link.style.display = "none"; |
|
@ -176,10 +185,10 @@ export default { |
|
|
link = null; |
|
|
link = null; |
|
|
loadingInstance.close(); |
|
|
loadingInstance.close(); |
|
|
}) |
|
|
}) |
|
|
.catch((err) => { |
|
|
.catch((err) => { |
|
|
self.$message.error(err); |
|
|
self.$message.error(err); |
|
|
loadingInstance.close(); |
|
|
loadingInstance.close(); |
|
|
}); |
|
|
}); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
handleSearch(data) { |
|
|
handleSearch(data) { |
|
@ -189,72 +198,77 @@ export default { |
|
|
pageSize: 20, |
|
|
pageSize: 20, |
|
|
pageNum: 1 |
|
|
pageNum: 1 |
|
|
} |
|
|
} |
|
|
if (daterange && daterange.length > 0) { |
|
|
if(daterange && daterange.length > 0){ |
|
|
_searchData.startTime = daterange[0]; |
|
|
_searchData.startTime = daterange[0]; |
|
|
_searchData.endTime = daterange[1]; |
|
|
_searchData.endTime = daterange[1]; |
|
|
} |
|
|
} |
|
|
if (data.publishChannels) { |
|
|
if(data.publishChannels){ |
|
|
_searchData.publishChannels = data.publishChannels |
|
|
_searchData.publishChannels = data.publishChannels |
|
|
} |
|
|
} |
|
|
if (data.publishStatus) { |
|
|
if(data.publishStatus){ |
|
|
_searchData.publishStatus = data.publishStatus |
|
|
_searchData.publishStatus = data.publishStatus |
|
|
} |
|
|
} |
|
|
this.searchData = _searchData; |
|
|
this.searchData = _searchData; |
|
|
this.initData(); |
|
|
this.initData(); |
|
|
}, |
|
|
}, |
|
|
indexMethod(index) { |
|
|
indexMethod(index) { |
|
|
return this.searchData.pageSize * (this.searchData.pageNum - 1) + index + 1; |
|
|
return this.searchData.pageSize*(this.searchData.pageNum-1) + index + 1; |
|
|
}, |
|
|
}, |
|
|
formatterDirection(row, column) { |
|
|
formatterDirection(row, column) { |
|
|
return DirectionTypes[row.direction]; |
|
|
return DirectionTypes[row.direction]; |
|
|
}, |
|
|
}, |
|
|
initData() { |
|
|
initData() { |
|
|
this.sum = 0; // 每次请求前重置 sum |
|
|
|
|
|
request({ |
|
|
request({ |
|
|
url: `/business/manage/statisticsList?pageNum=${this.searchData.pageNum}&pageSize=${this.searchData.pageSize}`, |
|
|
url: `/business/manage/statisticsList?pageNum=${this.searchData.pageNum}&pageSize=${this.searchData.pageSize}`, |
|
|
method: "post", |
|
|
method: "post", |
|
|
params: { pageNum: this.searchData.pageNum, pageSize: this.searchData.pageSize }, |
|
|
params: { pageNum: this.searchData.pageNum, pageSize: this.searchData.pageSize }, |
|
|
data: this.searchData, |
|
|
data: this.searchData, |
|
|
}).then((result) => { |
|
|
}).then((result) => { |
|
|
if (result.code != 200) return this.$message.error(result?.msg); |
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
let sum = 0; |
|
|
|
|
|
result.rows.forEach(e => { |
|
|
result.rows.forEach(e => { |
|
|
if (e.publishChannels === 4 || e.publishChannels === 7) { |
|
|
if(e.publishChannels === 4 || e.publishChannels === 7){ |
|
|
const contentDetailsInfo = JSON.parse(e.contentDetails) |
|
|
const contentDetailsInfo = JSON.parse(e.contentDetails) |
|
|
if (e.publishChannels === 4) { // 情报板 |
|
|
if(e.publishChannels === 4){ //情报板 |
|
|
let msg = '情报板数据异常' // + e.contentDetails |
|
|
let msg = '情报板数据异常' // + e.contentDetails |
|
|
// 检查是否一键恢复 |
|
|
// 检查是否一键恢复 |
|
|
if (contentDetailsInfo.length > 0) { |
|
|
if(contentDetailsInfo.length > 0){ |
|
|
if (contentDetailsInfo[0].functions.length > 1) { |
|
|
if(contentDetailsInfo[0].functions.length > 1){ |
|
|
const parameters = contentDetailsInfo[0].functions[1]?.params?.parameters |
|
|
const parameters = contentDetailsInfo[0].functions[1]?.params?.parameters |
|
|
if (parameters && parameters.length > 0) { |
|
|
if(parameters && parameters.length > 0){ |
|
|
e.contentDetailsInfo = parameters |
|
|
e.contentDetailsInfo = parameters |
|
|
msg = '' |
|
|
msg = '' |
|
|
sum += parameters.length - 1 |
|
|
} |
|
|
} |
|
|
} |
|
|
} else if (contentDetailsInfo[0].functions.length > 0) { |
|
|
else if(contentDetailsInfo[0].functions.length > 0){ |
|
|
if (contentDetailsInfo[0].functions[0].functionId && contentDetailsInfo[0].functions[0].functionId === '1B') { |
|
|
if(contentDetailsInfo[0].functions[0].functionId && contentDetailsInfo[0].functions[0].functionId === '1B'){ |
|
|
msg = '一键恢复操作' |
|
|
msg = '一键恢复操作' |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
e.contentDetails = msg |
|
|
e.contentDetails = msg |
|
|
} else if(e.publishChannels === 7){ |
|
|
} else if (e.publishChannels === 7) { |
|
|
let msg = '语音广播数据异常' //+e.contentDetails |
|
|
let msg = '语音广播数据异常' //+e.contentDetails |
|
|
console.log(contentDetailsInfo) |
|
|
console.log(contentDetailsInfo) |
|
|
if(contentDetailsInfo.length > 0){ |
|
|
if (contentDetailsInfo.length > 0) { |
|
|
if(contentDetailsInfo[0].functions.length > 0){ |
|
|
if (contentDetailsInfo[0].functions.length > 0) { |
|
|
msg = contentDetailsInfo[0].functions[0].params.text |
|
|
msg = contentDetailsInfo[0].functions[0].params.text |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
e.contentDetails = msg; |
|
|
} |
|
|
} |
|
|
e.contentDetails = msg; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
this.tableData = result.rows; |
|
|
this.tableData = result.rows; |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
this.tableData = result.rows; |
|
|
|
|
|
}, 200); |
|
|
|
|
|
// this.$nextTick(()=>{ |
|
|
|
|
|
|
|
|
|
|
|
// }) |
|
|
this.total = result.total; |
|
|
this.total = result.total; |
|
|
this.sumtotal = this.total + sum; // 更新 sumtotal |
|
|
|
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -286,26 +300,20 @@ export default { |
|
|
display: flex; |
|
|
display: flex; |
|
|
gap: 6px; |
|
|
gap: 6px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sum-total { |
|
|
|
|
|
margin-left: 10px; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
color: #f6f1f1; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.body { |
|
|
.body { |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
position: relative; |
|
|
position: relative; |
|
|
overflow-y: auto; |
|
|
overflow-y: auto; |
|
|
overflow-x: hidden; |
|
|
overflow-x: hidden; |
|
|
.content { |
|
|
.content { |
|
|
position: absolute; |
|
|
position: absolute; |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
overflow: auto; |
|
|
overflow: auto; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.footer { |
|
|
.footer { |
|
|
margin-top: 15px; |
|
|
margin-top: 15px; |
|
@ -315,18 +323,15 @@ export default { |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.board_shower { |
|
|
.board_shower{ |
|
|
margin: 4px; |
|
|
margin: 4px; |
|
|
} |
|
|
} |
|
|
|
|
|
::v-deep .el-carousel__indicators--horizontal{ |
|
|
::v-deep .el-carousel__indicators--horizontal { |
|
|
line-height: 0; height: 16px; |
|
|
line-height: 0; |
|
|
.el-carousel__indicator--horizontal{ |
|
|
height: 16px; |
|
|
|
|
|
.el-carousel__indicator--horizontal { |
|
|
|
|
|
padding: 7px 4px; |
|
|
padding: 7px 4px; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
::v-deep .el-table__cell div.cell { |
|
|
::v-deep .el-table__cell div.cell { |
|
|
padding: 0 10px !important; |
|
|
padding: 0 10px !important; |
|
|
} |
|
|
} |
|
|