Browse Source

--情报板发布次数 算具体设备发布的切屏次数-- 加总数量统计

develop
mengff 3 weeks ago
parent
commit
4c4932cff3
  1. 67
      ruoyi-ui/src/views/JiHeExpressway/pages/service/publicService/components/record/index.vue

67
ruoyi-ui/src/views/JiHeExpressway/pages/service/publicService/components/record/index.vue

@ -15,17 +15,16 @@
</template>
刷新
</ButtonGradient>
<span class="sum-total">发布实际数量{{ sumtotal }}</span>
</div>
<InputSearch ref="searchComp" style="width: 480px" :formList="searchFormList"
:formConfigOptions="{ dFormData: { eventState: '0' } }" @handleSearch="handleSearch" />
</div>
<!-- 内容 -->
<div class="body">
<Table :data="tableData">
<el-table-column label="序号" type="index" :index="indexMethod" width="100" align="center"
header-align="center" />
<ElTableColumn label="发布渠道" prop="publishChannels" width="120" align="center" header-align="center">
<template slot-scope="scope">
{{ enum_channels[scope.row.publishChannels] }}
@ -52,8 +51,6 @@
</el-carousel-item>
</el-carousel>
<span v-else>{{ scope.row.contentDetails }}</span>
<!-- <span >{{ scope.row.contentDetails }}</span> -->
</template>
</ElTableColumn>
<ElTableColumn label="发布人" prop="publisher" width="100" align="center" header-align="center" />
@ -63,11 +60,6 @@
<i class="el-icon-error" style="font-size: 24px; color: #BBB;" v-else></i>
</template>
</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>
</div>
<!-- 分页 -->
@ -91,7 +83,6 @@ import InputSearch from "@screen/components/InputSearch/index.vue";
import { searchFormList } from "./data";
import moment from "moment";
import { Loading } from 'element-ui';
import { e } from 'mathjs';
export default {
name: 'boardRecord',
@ -116,13 +107,15 @@ export default {
isShowPhrases: false,
isShowDisposal: false,
total: 20,
sumtotal: 0,
eventType: 1,
searchData: {
pageSize: 20,
pageNum: 1
},
phrasesData: [],
process: []
process: [],
sum: 0 // sum data
}
},
created() {
@ -142,7 +135,7 @@ export default {
})
.then(function () {
request({
url: `/business/manage/`+id,
url: `/business/manage/${id}`,
method: "DELETE",
data: {},
}).then((result) => {
@ -171,8 +164,6 @@ export default {
data: self.searchData,
responseType: 'blob',
}).then((res) => {
console.log(res)
const url = window.URL.createObjectURL(new Blob([res]));
let link = document.createElement("a");
link.style.display = "none";
@ -218,14 +209,14 @@ export default {
return DirectionTypes[row.direction];
},
initData() {
this.sum = 0; // sum
request({
url: `/business/manage/statisticsList?pageNum=${this.searchData.pageNum}&pageSize=${this.searchData.pageSize}`,
method: "post",
params: { pageNum: this.searchData.pageNum, pageSize: this.searchData.pageSize },
data: this.searchData,
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
if (result.code != 200) return this.$message.error(result?.msg);
result.rows.forEach(e => {
if (e.publishChannels === 4 || e.publishChannels === 7) {
const contentDetailsInfo = JSON.parse(e.contentDetails)
@ -239,8 +230,7 @@ export default {
e.contentDetailsInfo = parameters
msg = ''
}
}
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') {
msg = '一键恢复操作'
}
@ -261,14 +251,30 @@ export default {
});
this.tableData = result.rows;
setTimeout(() => {
this.tableData = result.rows;
}, 200);
// this.$nextTick(()=>{
// })
this.total = result.total;
});
return request({
url: '/business/manage/statisticsListNoPage',
method: "post",
data: this.searchData,
}).then((result) => {
if (result.code != 200) return this.$message.error(result?.msg);
let sum = 0;
result.data.forEach(e => {
if (e.publishChannels === 4) {
const contentDetailsInfo = JSON.parse(e.contentDetails)
if (contentDetailsInfo.length > 0) {
if (contentDetailsInfo[0].functions.length > 1) {
const parameters = contentDetailsInfo[0].functions[1]?.params?.parameters
if (parameters && parameters.length > 0) {
e.contentDetailsInfo = parameters
sum += parameters.length - 1
}
}
}
}
});
this.sumtotal = result.data.length + sum; // sumtotal
});
},
@ -300,6 +306,12 @@ export default {
display: flex;
gap: 6px;
}
.sum-total {
margin-left: 10px;
font-weight: bold;
color: #f6f1f1;
}
}
.body {
@ -326,12 +338,15 @@ export default {
.board_shower {
margin: 4px;
}
::v-deep .el-carousel__indicators--horizontal {
line-height: 0; height: 16px;
line-height: 0;
height: 16px;
.el-carousel__indicator--horizontal {
padding: 7px 4px;
}
}
::v-deep .el-table__cell div.cell {
padding: 0 10px !important;
}

Loading…
Cancel
Save