Compare commits

...

2 Commits

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

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

@ -15,17 +15,16 @@
</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] }}
@ -52,8 +51,6 @@
</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" />
@ -63,11 +60,6 @@
<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>
<!-- 分页 --> <!-- 分页 -->
@ -91,7 +83,6 @@ 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',
@ -116,13 +107,15 @@ export default {
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() {
@ -142,7 +135,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) => {
@ -171,8 +164,6 @@ 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";
@ -218,14 +209,15 @@ export default {
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 Message.error(result?.msg); if (result.code != 200) return this.$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)
@ -238,9 +230,9 @@ export default {
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 = '一键恢复操作'
} }
@ -261,14 +253,8 @@ export default {
}); });
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
}); });
}, },
@ -300,6 +286,12 @@ export default {
display: flex; display: flex;
gap: 6px; gap: 6px;
} }
.sum-total {
margin-left: 10px;
font-weight: bold;
color: #f6f1f1;
}
} }
.body { .body {
@ -326,12 +318,15 @@ export default {
.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;
height: 16px;
.el-carousel__indicator--horizontal { .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;
} }

Loading…
Cancel
Save