|
@@ -3,107 +3,45 @@
|
3
|
3
|
<div class="screenBox flex-align-center">
|
4
|
4
|
<div class="flex-align-center" style="flex: 1">
|
5
|
5
|
<datePicker title="自定义" :is_include_today="false" :pickerOptions="pickerOptions" :quickFlag="true" :afferent_time="default_time" :clearFlag="false" @changeTime="changeTime" />
|
6
|
|
- <selfInputV2 v-model="keyword" label_name="标题" placeholder="请输入关键字" labelWidth @change="onChangeKeyword" />
|
7
|
|
- <selfChannelV2 v-model="plat_type" type='promotionData' title="平台" @change="onChangePlatType" />
|
|
6
|
+ <selfInputV2 v-model="keyword" label_name="推广标题" placeholder="请输入关键字" labelWidth @change="onChangeKeyword" />
|
|
7
|
+ <selfChannelV2 v-model="plat_type" type="promotionData" title="平台" labelWidth @change="onChangePlatType" />
|
8
|
8
|
</div>
|
9
|
9
|
<div class="right">
|
10
|
|
- <el-button v-if="isCanExport" type="primary" size="mini" @click="init(1, 'export')">导出Excel</el-button>
|
|
10
|
+ <el-button v-if="isCanExport" type="primary" size="mini" @click="init(1, 'export')" >导出Excel</el-button>
|
11
|
11
|
</div>
|
12
|
12
|
</div>
|
13
|
13
|
<div class="dataInfoBox">
|
14
|
|
- <div
|
15
|
|
- class="dataInfoItem"
|
16
|
|
- v-for="(item, index) in dataInfoArrs"
|
17
|
|
- :key="index"
|
18
|
|
- >
|
|
14
|
+ <div class="dataInfoItem" v-for="(item, index) in dataInfoArrs" :key="index">
|
19
|
15
|
<div class="dataItemTitle">
|
20
|
16
|
<img :src="item.icon" style="height: 14px" class="titleIcon" />
|
21
|
17
|
<span>{{ item.label }}</span>
|
22
|
18
|
</div>
|
23
|
19
|
<div class="dataItem-data">
|
24
|
|
- {{
|
25
|
|
- dataInfo && (dataInfo[item.prop] || dataInfo[item.prop] == 0)
|
26
|
|
- ? $formatNum(dataInfo[item.prop])
|
27
|
|
- : "-"
|
28
|
|
- }}
|
29
|
|
- <span class="f15">{{
|
30
|
|
- item.brackets_prop
|
31
|
|
- ? `(${
|
32
|
|
- dataInfo &&
|
33
|
|
- (dataInfo[item.brackets_prop] ||
|
34
|
|
- dataInfo[item.brackets_prop] == 0)
|
35
|
|
- ? $formatNum(dataInfo[item.brackets_prop])
|
36
|
|
- : "-"
|
37
|
|
- })`
|
38
|
|
- : ""
|
39
|
|
- }}</span>
|
|
20
|
+ {{ dataInfo && (dataInfo[item.prop] || dataInfo[item.prop] == 0) ? $formatNum(dataInfo[item.prop]) : "-" }}
|
|
21
|
+ <span class="f15">{{ item.brackets_prop ? `(${dataInfo && (dataInfo[item.brackets_prop] || dataInfo[item.brackets_prop] == 0) ? $formatNum(dataInfo[item.brackets_prop]) : "-" })` : "" }}</span>
|
40
|
22
|
</div>
|
41
|
23
|
</div>
|
42
|
24
|
</div>
|
43
|
25
|
<div>
|
44
|
|
- <ux-grid
|
45
|
|
- ref="plxTable"
|
46
|
|
- :border="false"
|
47
|
|
- @row-click="
|
48
|
|
- () => {
|
49
|
|
- return;
|
50
|
|
- }
|
51
|
|
- "
|
52
|
|
- :header-cell-style="
|
53
|
|
- () => {
|
54
|
|
- return {
|
55
|
|
- backgroundColor: '#FFFFFF !important',
|
56
|
|
- border: 'none!important',
|
57
|
|
- };
|
58
|
|
- }
|
59
|
|
- "
|
60
|
|
- :height="height"
|
61
|
|
- show-footer-overflow="tooltip"
|
62
|
|
- show-overflow="tooltip"
|
63
|
|
- size="mini"
|
64
|
|
- >
|
65
|
|
- <ux-table-column
|
66
|
|
- v-for="item in desCol"
|
67
|
|
- v-if="!item.excelShow"
|
68
|
|
- :key="item.prop"
|
69
|
|
- :resizable="true"
|
70
|
|
- :field="item.prop"
|
71
|
|
- :title="item.label"
|
72
|
|
- :min-width="item.min_width ? item.min_width : 120"
|
73
|
|
- :fixed="item.fixed ? item.fixed : ''"
|
74
|
|
- align="center"
|
75
|
|
- >
|
|
26
|
+ <ux-grid ref="plxTable" :border="false" @row-click="() => { return; }" :header-cell-style="() => { return { backgroundColor: '#FFFFFF !important', border: 'none!important', }; } " :height="height" show-footer-overflow="tooltip" show-overflow="tooltip" size="mini">
|
|
27
|
+ <ux-table-column v-for="item in desCol" v-if="!item.excelShow" :key="item.prop" :resizable="true" :field="item.prop" :title="item.label" :min-width="item.min_width ? item.min_width : 120" :fixed="item.fixed ? item.fixed : ''" align="center">
|
76
|
28
|
<template #header>
|
77
|
|
- <div :class="['flex-align-jus-center']">
|
78
|
|
- {{ item.label
|
79
|
|
- }}{{ item.brackets_label ? `(${item.brackets_label})` : "" }}
|
80
|
|
- <el-tooltip
|
81
|
|
- v-if="item.notes"
|
82
|
|
- :content="item.notes"
|
83
|
|
- placement="top"
|
84
|
|
- >
|
85
|
|
- <div><i class="el-icon-question"></i></div>
|
|
29
|
+ <div :class="['flex-align-jus-center']">{{ item.label }}{{ item.brackets_label ? `(${item.brackets_label})` : "" }}
|
|
30
|
+ <el-tooltip v-if="item.notes" :content="item.notes" placement="top">
|
|
31
|
+ <div><i class="el-icon-question" /></div>
|
86
|
32
|
</el-tooltip>
|
87
|
33
|
</div>
|
88
|
34
|
</template>
|
89
|
35
|
<template v-slot="{ row }">
|
90
|
36
|
<span v-if="item.prop === 'pid' || item.prop === 'adq_account_id'">{{ row[item.prop] }}</span>
|
91
|
|
- <span v-else-if="item.prop === 'plat_type'">{{ row[item.prop] == 10 ? '番茄' : (row[item.prop] == 8 ? '映客' : '') }}</span>
|
92
|
|
- <span v-else>{{ row[item.prop] !== "" && (row[item.prop] || row[item.prop] === 0 || row[item.prop] === "0") ? $formatNum(row[item.prop]) : "-" }}</span>
|
93
|
|
- <span v-if="item.brackets_label" >({{ row[item.brackets_prop] != "" && (row[item.brackets_prop] || row[item.brackets_prop] == 0) ? $formatNum(row[item.brackets_prop]) : "-" }})</span>
|
|
37
|
+ <span v-else-if="item.prop === 'plat_type'">{{ row[item.prop] == 10 ? "番茄" : row[item.prop] == 8 ? "映客" : "" }}</span>
|
|
38
|
+ <span v-else>{{ row[item.prop] !== "" && (row[item.prop] || row[item.prop] === 0 || row[item.prop] === "0") ? $formatNum(row[item.prop]) : "-" }}</span>
|
|
39
|
+ <span v-if="item.brackets_label">({{ row[item.brackets_prop] != "" && (row[item.brackets_prop] || row[item.brackets_prop] == 0) ? $formatNum(row[item.brackets_prop]) : "-" }})</span>
|
94
|
40
|
</template>
|
95
|
41
|
</ux-table-column>
|
96
|
42
|
</ux-grid>
|
97
|
43
|
<div class="pagination" v-show="total > 0">
|
98
|
|
- <el-pagination
|
99
|
|
- background
|
100
|
|
- :current-page="page"
|
101
|
|
- @current-change="handleCurrentChange"
|
102
|
|
- layout="prev, pager, next, sizes, jumper"
|
103
|
|
- :page-sizes="[20, 50, 100]"
|
104
|
|
- @size-change="handleSizeChange"
|
105
|
|
- :page-count="Number(pages)"
|
106
|
|
- />
|
|
44
|
+ <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next, sizes, jumper" :page-sizes="[20, 50, 100]" @size-change="handleSizeChange" :page-count="Number(pages)" />
|
107
|
45
|
</div>
|
108
|
46
|
</div>
|
109
|
47
|
</div>
|
|
@@ -143,11 +81,11 @@ export default {
|
143
|
81
|
prop: "first_roi",
|
144
|
82
|
label: "首日roi",
|
145
|
83
|
icon: require("@/assets/img/icon/roi@2x.png"),
|
146
|
|
- }
|
|
84
|
+ },
|
147
|
85
|
],
|
148
|
86
|
dataInfo: {},
|
149
|
87
|
desCol: [
|
150
|
|
- { prop: "populariz_title", label: "推广标题", fixed: "left", min_width: "160" },
|
|
88
|
+ { prop: "populariz_title", label: "推广标题", fixed: "left", min_width: "160", },
|
151
|
89
|
{ prop: "pid", label: "推广ID", min_width: "160" },
|
152
|
90
|
{ prop: "ref_date", label: "日期", min_width: "160" },
|
153
|
91
|
{ prop: "plat_type", label: "平台" },
|
|
@@ -170,10 +108,7 @@ export default {
|
170
|
108
|
},
|
171
|
109
|
created() {
|
172
|
110
|
this.time = this.default_time;
|
173
|
|
- this.height =
|
174
|
|
- document.documentElement.clientHeight - 400 > 400
|
175
|
|
- ? document.documentElement.clientHeight - 400
|
176
|
|
- : 400;
|
|
111
|
+ this.height = document.documentElement.clientHeight - 330 > 330 ? document.documentElement.clientHeight - 330 : 330;
|
177
|
112
|
this.init(1);
|
178
|
113
|
},
|
179
|
114
|
methods: {
|
|
@@ -199,25 +134,20 @@ export default {
|
199
|
134
|
}
|
200
|
135
|
}
|
201
|
136
|
this.loading = true;
|
202
|
|
- this.$axios
|
203
|
|
- .get(this.URL.BASEURL + this.URL.dataBoard_promotionData, {
|
|
137
|
+ this.$axios.get(this.URL.BASEURL + this.URL.dataBoard_promotionData, {
|
204
|
138
|
params: {
|
205
|
139
|
send_time_start: this.time[0],
|
206
|
140
|
send_time_end: this.time[1],
|
207
|
141
|
keyword: this.keyword,
|
208
|
142
|
plat_type: this.plat_type,
|
209
|
143
|
page: type == "export" ? 1 : this.page,
|
210
|
|
- page_size:
|
211
|
|
- type == "export"
|
212
|
|
- ? this.$store.state.exportNumber
|
213
|
|
- : this.page_size,
|
|
144
|
+ page_size: type == "export" ? this.$store.state.exportNumber : this.page_size,
|
214
|
145
|
},
|
215
|
146
|
})
|
216
|
147
|
.then((res) => {
|
217
|
148
|
var res = res.data;
|
218
|
149
|
this.loading = false;
|
219
|
150
|
if (res && res.errno == 0) {
|
220
|
|
- console.log("res => ", res);
|
221
|
151
|
if (res.rst.extra) {
|
222
|
152
|
// 汇总数据
|
223
|
153
|
this.dataInfo = res.rst.extra;
|
|
@@ -276,7 +206,7 @@ export default {
|
276
|
206
|
this.init(1);
|
277
|
207
|
},
|
278
|
208
|
onChangePlatType(val) {
|
279
|
|
- this.plat_type = val || ''
|
|
209
|
+ this.plat_type = val || "";
|
280
|
210
|
this.init(1);
|
281
|
211
|
},
|
282
|
212
|
},
|