|
@@ -2,22 +2,10 @@
|
2
|
2
|
<div>
|
3
|
3
|
<div class="screenBox_mini">
|
4
|
4
|
<Input ref="InputRef_text" title="关键词" placeholderTxt="关键词" @changeEvent="()=>init()" @clearEvent="()=>init()"/>
|
5
|
|
- <Select ref="acRef"
|
6
|
|
- title="账号"
|
7
|
|
- selectWidth="160px"
|
8
|
|
- @changeEvent="()=>init()" @clearEvent="()=>init()"
|
9
|
|
- :isMultiple="true"
|
10
|
|
- :optObj="{k:'account_id',la:'account_id',val:'account_id'}"
|
11
|
|
- :options="pageInfo.acList"/>
|
12
|
|
- <Select ref="statusRef"
|
13
|
|
- title="状态"
|
14
|
|
- selectWidth="160px"
|
15
|
|
- @changeEvent="()=>init()" @clearEvent="()=>init()"
|
16
|
|
- :options="pageInfo.statusList"/>
|
17
|
|
- <TimeScreen title="时间" selectWidth="260px" :haveQuick="false" :clearFlag="true" :valueIsKong="true"
|
|
5
|
+ <TimeScreen title="时间" selectWidth="260px" :haveQuick="false" :timeIdx="1"
|
18
|
6
|
ref="timeRef"
|
19
|
7
|
@init="()=>init()"></TimeScreen>
|
20
|
|
- <span class="pointer c-theme lMar10" @click="clearEvent">清空</span>
|
|
8
|
+ <!-- <span class="pointer c-theme lMar10" @click="clearEvent">清空</span> -->
|
21
|
9
|
<el-button class="lMarauto" type="primary" @click="goNewPlanEvent">新建计划</el-button>
|
22
|
10
|
</div>
|
23
|
11
|
<div>
|
|
@@ -25,60 +13,37 @@
|
25
|
13
|
<Dropdown title="批量操作" :list="tableInfo.moreList" @close="dropdownEvent" class="rMar10"
|
26
|
14
|
:disabledFlag="tableInfo.multipleSelection&&tableInfo.multipleSelection.length == 0"></Dropdown>
|
27
|
15
|
<div>已选 : <span>{{tableInfo.multipleSelection&&tableInfo.multipleSelection.length}}</span></div>
|
28
|
|
-<!-- <el-button class="lMarauto" type="primary" @click="customIndEvent">自定义指标</el-button>-->
|
29
|
16
|
|
30
|
17
|
<div class="lMarauto">
|
31
|
|
- <Indicators type="media_base" @refresh="IndicatorsRefreshList"></Indicators>
|
|
18
|
+ <Indicators type="media_base" @refresh="init()"></Indicators>
|
32
|
19
|
</div>
|
33
|
20
|
</div>
|
34
|
|
-我是账户列表
|
|
21
|
+
|
35
|
22
|
<el-table v-loading="loading" ref="tableRef" :data="tableInfo.tableList"
|
36
|
23
|
:header-cell-style="tableHeaderStyle"
|
37
|
|
- :key="tableInfo.updateKey" style="width: 100%"
|
|
24
|
+ :key="tableInfo.updateKey" style="width: 100%;"
|
38
|
25
|
border empty-text="暂无数据"
|
39
|
26
|
row-key="campaign_id"
|
40
|
27
|
max-height="calc(100vh - 294px)">
|
41
|
|
- <el-table-column fixed width="80" >
|
42
|
|
- <template #header>
|
43
|
|
- <div class="flex">
|
44
|
|
- <el-checkbox v-model="tableInfo.chooseAll" @change="allChooseCheckboxEvent"></el-checkbox>
|
45
|
|
- <el-dropdown class="lMar10" @command="handleCommandChoosePage">
|
46
|
|
- <el-icon color="#3173FF"><i-ep-ArrowDownBold /></el-icon>
|
47
|
|
- <template #dropdown>
|
48
|
|
- <el-dropdown-menu>
|
49
|
|
- <el-dropdown-item command="1">当前页</el-dropdown-item>
|
50
|
|
- <el-dropdown-item command="2">全部</el-dropdown-item>
|
51
|
|
- </el-dropdown-menu>
|
52
|
|
- </template>
|
53
|
|
- </el-dropdown>
|
54
|
|
- </div>
|
55
|
|
- </template>
|
56
|
|
- <template #default="scope">
|
57
|
|
- <div class="checkBoxSelf flex"
|
58
|
|
- @click="singleChooseCheckboxEvent(tableInfo.multipleSelection.findIndex(n=>n.campaign_id == scope.row.campaign_id),scope.row)"
|
59
|
|
- :class="tableInfo.multipleSelection.findIndex(n=>n.campaign_id == scope.row.campaign_id)>=0 ? 'active' : ''">
|
60
|
|
- <el-icon color="#fff" v-if="tableInfo.multipleSelection.findIndex(n=>n.campaign_id == scope.row.campaign_id)>=0"><i-ep-Check /></el-icon>
|
61
|
|
- </div>
|
62
|
|
- </template>
|
63
|
|
- </el-table-column>
|
|
28
|
+ <el-table-column type="selection" width="55" align="center" fixed="left"/>
|
64
|
29
|
<template v-for="item in tableInfo.descol">
|
65
|
|
- <el-table-column :fixed="item.isfixed" :min-width="item.minWidth ? item.minWidth : '80px'">
|
|
30
|
+ <el-table-column :fixed="item.isfixed" :min-width="item.label.length <= 4 ? '100px' : item.label.length <= 8 ? '150px' : '180px'">
|
66
|
31
|
<template #header>
|
67
|
32
|
<div class="flex"
|
68
|
33
|
:style="{ justifyContent: item.alignSelf ? item.alignSelf : 'center' }"
|
69
|
|
- :class="[tableInfo.sortKey == item.column ? 'active_css' : '',item.isSort ? 'pointer' : '']"
|
70
|
|
- @click="item.isSort&&sortEvent(item.column)">
|
71
|
|
- {{ item.name }}
|
72
|
|
- <el-tooltip v-if="item.notes" effect="dark" :content="item.notes"><i-ep-QuestionFilled class="lMar5 c-999 f14 pointer" /></el-tooltip>
|
|
34
|
+ :class="[tableInfo.sortKey == item.key_value ? 'active_css' : '',item.isSort ? 'pointer' : '']"
|
|
35
|
+ @click="item.isSort&&sortEvent(item.key_value)">
|
|
36
|
+ {{ item.label }}
|
|
37
|
+ <el-tooltip v-if="item.tooltip && item.tooltip != item.label" placement="top" effect="dark" :content="item.tooltip"><i-ep-QuestionFilled class="lMar5 c-999 f14 pointer" /></el-tooltip>
|
73
|
38
|
<div v-if="item.isSort">
|
74
|
|
- <div class="sortItem"><el-icon :color="tableInfo.sortKey == item.column ? '#3173FF' : ''"><i-ep-CaretBottom /></el-icon></div>
|
|
39
|
+ <div class="sortItem"><el-icon :color="tableInfo.sortKey == item.key_value ? '#3173FF' : ''"><i-ep-CaretBottom /></el-icon></div>
|
75
|
40
|
</div>
|
76
|
41
|
</div>
|
77
|
42
|
</template>
|
78
|
43
|
<template #default="scope">
|
79
|
44
|
<div class="flex" :style="{ justifyContent: item.alignSelf ? item.alignSelf : 'center' }">
|
80
|
45
|
|
81
|
|
- <div v-if="item.column == 'campaign_name'">
|
|
46
|
+ <!-- <div v-if="item.column == 'campaign_name'">
|
82
|
47
|
<span class="c-theme flex campaignName">
|
83
|
48
|
<span class="pointer" @click="goAdvertEvent(scope.row.campaign_id)">{{scope.row[item.column]}}</span>
|
84
|
49
|
<el-icon color="#3173FF" class="pointer lMarauto f16 icon" @click="edit_campaign_name_event(scope.row)"><i-ep-Edit /></el-icon>
|
|
@@ -116,15 +81,15 @@
|
116
|
81
|
</div>
|
117
|
82
|
<div class="flex c-theme pointer" v-else-if="item.column == 'daily_budget'" @click="editPlanEvent(scope.row)">
|
118
|
83
|
{{scope.row[item.column] ? NumberHandle(scope.row[item.column]) : '不限'}}
|
119
|
|
- </div>
|
|
84
|
+ </div> -->
|
120
|
85
|
|
121
|
86
|
|
122
|
|
- <div class="cellDiv" :class="tableInfo.sortKey == item.column ? 'active_css' : ''" v-else>
|
123
|
|
- <el-tooltip :disabled="!(scope.row[item.column] && scope.row[item.column].length >30)" effect="dark" :content="scope.row[item.column]+''">
|
|
87
|
+ <div class="cellDiv" :class="tableInfo.sortKey == item.key_value ? 'active_css' : ''">
|
|
88
|
+ <el-tooltip :disabled="!(scope.row[item.key_value] && scope.row[item.key_value].length >30)" effect="dark" :content="scope.row[item.key_value]+''">
|
124
|
89
|
<div class="clampTwo line21" style="flex: 1">
|
125
|
|
- {{ scope.row[item.column] || scope.row[item.column]==0 ?
|
126
|
|
- (item.cancleForMat ? (scope.row[item.column] ? scope.row[item.column] : '-') : NumberHandle(scope.row[item.column])) : '-'}}
|
127
|
|
- <span v-if="item.hasPercent&&(scope.row[item.column] || scope.row[item.column] ==0)">%</span>
|
|
90
|
+ {{ scope.row[item.key_value] || scope.row[item.key_value]==0 ?
|
|
91
|
+ (item.cancleForMat ? (scope.row[item.key_value] ? scope.row[item.key_value] : '-') : scope.row[item.key_value]) : '-'}}
|
|
92
|
+ <span v-if="item.hasPercent&&(scope.row[item.key_value] || scope.row[item.key_value] ==0)">%</span>
|
128
|
93
|
</div>
|
129
|
94
|
</el-tooltip>
|
130
|
95
|
</div>
|
|
@@ -134,14 +99,6 @@
|
134
|
99
|
</template>
|
135
|
100
|
</el-table>
|
136
|
101
|
|
137
|
|
- <div class="paginationBox flex" style="justify-content: center" v-if="Number(tableInfo.total) > 0">
|
138
|
|
- <el-pagination
|
139
|
|
- v-model:currentPage="tableInfo.currentPage"
|
140
|
|
- v-model:page-size="tableInfo.pageSize"
|
141
|
|
- background
|
142
|
|
- :total="tableInfo.total"
|
143
|
|
- @current-change="handleCurrentChange" />
|
144
|
|
- </div>
|
145
|
102
|
</div>
|
146
|
103
|
|
147
|
104
|
<EditIpt ref="planEditIptRef" title="推广计划" @confirm="planEditConfirm"></EditIpt>
|
|
@@ -161,7 +118,7 @@ import noData from '@/components/capsulationMoudle/noData.vue'
|
161
|
118
|
import {listTs} from "@/components/businessMoudle/gdtList/ts/list";
|
162
|
119
|
import {Api} from "@/api/api";
|
163
|
120
|
import {ElMessage} from "element-plus";
|
164
|
|
-import {batchGdt_edit, batchGdt_list, reactiveTableAndAny} from "@/api/ApiModel";
|
|
121
|
+import {batchGdt_edit, batchAccount_list, reactiveTableAndAny} from "@/api/ApiModel";
|
165
|
122
|
import Indicators from './indicators/index.vue'
|
166
|
123
|
|
167
|
124
|
const { proxy } = getCurrentInstance() as any;
|
|
@@ -183,19 +140,8 @@ const loading = ref<boolean>(false)
|
183
|
140
|
const tableInfo = reactive<reactiveTableAndAny>({
|
184
|
141
|
tableList:[],
|
185
|
142
|
tableList_all:[],
|
186
|
|
- descol:[
|
187
|
|
- { name:'计划名称',column:'campaign_name',slotFlag: true,isfixed:true,alignSelf:'left'},
|
188
|
|
- { name:'操作',column:'operate',slotFlag: true,isfixed:true},
|
189
|
|
- { name:'账号ID',column:'account_id',cancleForMat:true},
|
190
|
|
- { name:'计划ID',column:'campaign_id',cancleForMat:true},
|
191
|
|
- { name:'计划类型',column:'campaign_type'},
|
192
|
|
- { name:'推广目标类型',column:'promoted_object_type'},
|
193
|
|
- { name:'日预算(元)',column:'daily_budget',slotFlag: true},
|
194
|
|
- // { name:'总预算',column:'total_budget'},
|
195
|
|
- { name:'投放日期',column:'created_time'},
|
196
|
|
- { name:'客户状态',column:'configured_status',slotFlag: true},
|
197
|
|
- { name:'投放速度',column:'speed_mode',slotFlag: true},
|
198
|
|
- ],
|
|
143
|
+ descol:[],
|
|
144
|
+ summary:[],
|
199
|
145
|
multipleSelection:[],
|
200
|
146
|
updateKey:1,
|
201
|
147
|
chooseAll:false,
|
|
@@ -279,38 +225,24 @@ const sortEvent = (row:any) => {
|
279
|
225
|
}
|
280
|
226
|
|
281
|
227
|
//列表
|
282
|
|
-const init = async (page?:any,totalPages?:any) => {
|
|
228
|
+const init = async () => {
|
283
|
229
|
loading.value = true
|
284
|
|
- const paramsModel = reactive<batchGdt_list>({
|
285
|
|
- account_ids:acRef.value!.value,
|
|
230
|
+ const paramsModel = reactive<batchAccount_list>({
|
286
|
231
|
keyword:InputRef_text.value!.value,
|
287
|
|
- status:statusRef.value!.value,
|
288
|
|
- start:timeRef.value!.dateVal&&timeRef.value!.dateVal[0],
|
289
|
|
- end:timeRef.value!.dateVal&&timeRef.value!.dateVal[1],
|
290
|
|
- page:page?page:1,
|
291
|
|
- pageSize:totalPages ? totalPages : tableInfo.pageSize
|
|
232
|
+ st_date:timeRef.value!.dateVal&&timeRef.value!.dateVal[0],
|
|
233
|
+ en_date:timeRef.value!.dateVal&&timeRef.value!.dateVal[1],
|
292
|
234
|
})
|
293
|
|
- let res:any = await proxy.$http.get(Api.batchGdt_plan_list,paramsModel)
|
|
235
|
+ let res:any = await proxy.$http.get(Api.batchGdt_accountList_list,paramsModel)
|
294
|
236
|
loading.value = false
|
295
|
237
|
if(res&&res.errNo=='0'){
|
296
|
|
- if(totalPages){
|
297
|
|
- tableInfo.tableList_all = res.rst.data
|
298
|
|
- }else{
|
299
|
|
- tableInfo.tableList = res.rst.data
|
300
|
|
- tableInfo.total = res.rst.pageInfo.total
|
301
|
|
- tableInfo.totalPages = res.rst.pageInfo.total
|
302
|
|
- }
|
|
238
|
+ tableInfo.summary = res.rst.summary;
|
|
239
|
+ tableInfo.descol = res.rst.explain;
|
|
240
|
+ tableInfo.tableList = res.rst.list;
|
303
|
241
|
}else{
|
304
|
242
|
ElMessage.error(res.errMsg)
|
305
|
243
|
}
|
306
|
244
|
}
|
307
|
245
|
|
308
|
|
-//分页
|
309
|
|
-const handleCurrentChange = (val) => {
|
310
|
|
- tableInfo.currentPage = val
|
311
|
|
- init(val)
|
312
|
|
-}
|
313
|
|
-
|
314
|
246
|
|
315
|
247
|
//清空值
|
316
|
248
|
const clearChooseVal = ()=>{
|
|
@@ -336,7 +268,7 @@ const handleCommandChoosePage = async (command: string | number | object)=>{
|
336
|
268
|
clearChooseVal()
|
337
|
269
|
tableInfo.chooseAll = true
|
338
|
270
|
if(command == 2){ // 全部
|
339
|
|
- await init(1,tableInfo.totalPages)
|
|
271
|
+ await init()
|
340
|
272
|
arr = tableInfo.tableList_all
|
341
|
273
|
}
|
342
|
274
|
arr.forEach(item=>{
|
|
@@ -363,9 +295,6 @@ const singleChooseCheckboxEvent = (idx:number,row:any)=>{
|
363
|
295
|
}
|
364
|
296
|
}
|
365
|
297
|
|
366
|
|
-const IndicatorsRefreshList = () => {
|
367
|
|
- //这里刷新列表
|
368
|
|
-}
|
369
|
298
|
|
370
|
299
|
const {
|
371
|
300
|
init_acList,
|
|
@@ -389,6 +318,12 @@ onMounted(()=>{
|
389
|
318
|
})
|
390
|
319
|
</script>
|
391
|
320
|
<style lang="scss" scoped>
|
|
321
|
+.el-table th div.cell {
|
|
322
|
+ white-space: nowrap;
|
|
323
|
+ text-overflow: ellipsis;
|
|
324
|
+ overflow: hidden;
|
|
325
|
+ max-width: 600px; /* 设置最大宽度,根据需要调整 */
|
|
326
|
+}
|
392
|
327
|
.campaignName{
|
393
|
328
|
.icon{
|
394
|
329
|
color: #3173FF;
|