|
@@ -24,8 +24,8 @@
|
24
|
24
|
<div v-loading="loading">
|
25
|
25
|
<div class="bMar10 flex">
|
26
|
26
|
<Dropdown title="批量操作" :list="tableInfo.moreList" @close="dropdownEvent" class="rMar10"
|
27
|
|
- :disabledFlag="tableInfo.multipleSelection&&tableInfo.multipleSelection.length == 0"></Dropdown>
|
28
|
|
- <div>已选 : <span>{{tableInfo.multipleSelection&&tableInfo.multipleSelection.length}}</span></div>
|
|
27
|
+ :disabledFlag="tableInfo.multipleSelection?.length == 0"></Dropdown>
|
|
28
|
+ <div>已选 : <span>{{tableInfo.multipleSelection?.length}}</span></div>
|
29
|
29
|
<div class="lMarauto">
|
30
|
30
|
<Indicators type="ad_base" @refresh="init"></Indicators>
|
31
|
31
|
</div>
|
|
@@ -99,12 +99,25 @@
|
99
|
99
|
<span v-else-if="scope.row[item.key_value] == 'SPEED_MODE_FAST'">加速投放</span>
|
100
|
100
|
<span v-else>-</span>
|
101
|
101
|
</div>
|
|
102
|
+
|
102
|
103
|
<div v-else-if="item.key_value == 'operate'">
|
103
|
104
|
<div class="flex">
|
104
|
|
-<!-- <span class="c-theme pointer" @click="copyEvent(scope.row)">复制</span>-->
|
105
|
|
- <span class="c-theme pointer lMar10" @click="goDetial(scope.row)">详情</span>
|
|
105
|
+ <span class="c-theme pointer" @click="goDetial(scope.row)">详情</span>
|
|
106
|
+ <span class="lMar10"
|
|
107
|
+ :class="scope.row.configured_status == 'AD_STATUS_NORMAL' ? 'pointer-drop c-green-opa' : 'pointer c-green'"
|
|
108
|
+ @click="scope.row.configured_status == 'AD_STATUS_SUSPEND'&&batchPlanEvent(scope.row,1)">启用</span>
|
|
109
|
+ </div>
|
|
110
|
+ <div>
|
|
111
|
+ <span :class="scope.row.configured_status == 'AD_STATUS_SUSPEND' ? 'pointer-drop c-red-opa' : 'pointer c-red'"
|
|
112
|
+ @click="scope.row.configured_status == 'AD_STATUS_NORMAL'&&batchPlanEvent(scope.row,2)">禁用</span>
|
|
113
|
+ <Popconfirm key="dele" @confirm="batchPlanEvent(scope.row,3)" :slotFlag="true">
|
|
114
|
+ <template #con>
|
|
115
|
+ <span class="pointer lMar10">删除</span>
|
|
116
|
+ </template>
|
|
117
|
+ </Popconfirm>
|
106
|
118
|
</div>
|
107
|
119
|
</div>
|
|
120
|
+
|
108
|
121
|
<div class="flex c-theme" v-else-if="item.key_value == 'daily_budget'">
|
109
|
122
|
{{scope.row[item.key_value] ? NumberHandle(scope.row[item.key_value]) : '不限'}}
|
110
|
123
|
</div>
|
|
@@ -176,6 +189,7 @@ import Indicators from './indicators/index.vue'
|
176
|
189
|
import {commonlistTs} from "@/components/businessMoudle/ts/commonList";
|
177
|
190
|
import {getCurrentTime} from "@/common/common";
|
178
|
191
|
import _ from "lodash";
|
|
192
|
+import Popconfirm from '@/components/capsulationMoudle/_popconfirm.vue'
|
179
|
193
|
|
180
|
194
|
|
181
|
195
|
const { proxy } = getCurrentInstance() as any;
|
|
@@ -210,7 +224,7 @@ const tableInfo = reactive<reactiveTableAndAny>({
|
210
|
224
|
{value:'4',label:'修改日预算'},
|
211
|
225
|
{value:'5',label:'修改出价'},
|
212
|
226
|
{value:'6',label:'深度优化出价'},
|
213
|
|
- {value:'7',label:'期望roi'},
|
|
227
|
+ {value:'7',label:'期望ROI'},
|
214
|
228
|
{value:'8',label:'推广日期'},
|
215
|
229
|
{value:'9',label:'投放时段'},
|
216
|
230
|
{value:'10',label:'开启一键起量'},
|
|
@@ -225,6 +239,16 @@ const tableInfo = reactive<reactiveTableAndAny>({
|
225
|
239
|
sortType:'',
|
226
|
240
|
})
|
227
|
241
|
|
|
242
|
+const batchPlanEvent = async (row?:any,val?:any) => {
|
|
243
|
+ loading.value = true
|
|
244
|
+ let infos:any = []
|
|
245
|
+ infos.push({
|
|
246
|
+ account_id:row.account_id,
|
|
247
|
+ adgroup_id:row.adgroup_id
|
|
248
|
+ })
|
|
249
|
+ batchEventApi(infos,val)
|
|
250
|
+}
|
|
251
|
+
|
228
|
252
|
const batchEventApi = async (infos?:any,flag?:any,flagVal?:any,callback?:any) => {
|
229
|
253
|
const paramsModel = reactive<batchGdt_ads_edit>({
|
230
|
254
|
infos:JSON.stringify(infos),
|
|
@@ -246,8 +270,8 @@ const batchEventApi = async (infos?:any,flag?:any,flagVal?:any,callback?:any) =>
|
246
|
270
|
//得到新的符合条件的数组
|
247
|
271
|
const getNewArr = (key:string,val?:any) => {
|
248
|
272
|
let arr:any = []
|
249
|
|
- tableInfo.multipleSelection.findIndex(item=>{
|
250
|
|
- if(item[key] == val){
|
|
273
|
+ tableInfo.multipleSelection.forEach(item=>{
|
|
274
|
+ if(item[key] == val || !item[key]){}else{
|
251
|
275
|
arr.push(item)
|
252
|
276
|
}
|
253
|
277
|
})
|
|
@@ -266,9 +290,17 @@ const dropdownEvent = (val: string | number | object) => {
|
266
|
290
|
if(val == 4){ //修改日预算
|
267
|
291
|
BatchEditDayBudgetRef.value!.switchShow(true,tableInfo.multipleSelection)
|
268
|
292
|
}else if(val == 6){ // 深度优化出价
|
269
|
|
- EditDeepBidRef.value!.switchShow(true,tableInfo.multipleSelection)
|
|
293
|
+ if(getNewArr('deep_bid_amount',0)?.length == 0){
|
|
294
|
+ ElMessage.error('所选暂无深度优化出价')
|
|
295
|
+ return
|
|
296
|
+ }
|
|
297
|
+ EditDeepBidRef.value!.switchShow(true,getNewArr('deep_bid_amount',0))
|
270
|
298
|
}else if(val == 7){ // 期望roi
|
271
|
|
- EditExpectedRoiRef.value!.switchShow(true,tableInfo.multipleSelection)
|
|
299
|
+ if(getNewArr('deep_conversion_worth_roi',0)?.length == 0){
|
|
300
|
+ ElMessage.error('所选暂无期望ROI')
|
|
301
|
+ return
|
|
302
|
+ }
|
|
303
|
+ EditExpectedRoiRef.value!.switchShow(true,getNewArr('deep_conversion_worth_roi',0))
|
272
|
304
|
}else if(val == 10){ // 开启一键起量
|
273
|
305
|
if(getNewArr('auto_acquisition_enabled',0)?.length == 0){
|
274
|
306
|
ElMessage.error('所选暂无关闭状态的一键起量')
|
|
@@ -435,6 +467,17 @@ const singleChooseCheckboxEvent = (idx:number,row:any)=>{
|
435
|
467
|
}
|
436
|
468
|
}
|
437
|
469
|
|
|
470
|
+//清空
|
|
471
|
+const clearEvent = () => {
|
|
472
|
+ nextTick(()=>{
|
|
473
|
+ InputRef_text.value!.value = ''
|
|
474
|
+ acRef.value!.value = []
|
|
475
|
+ statusRef.value!.value = ''
|
|
476
|
+ timeRef.value!.dateVal = ''
|
|
477
|
+ init()
|
|
478
|
+ })
|
|
479
|
+}
|
|
480
|
+
|
438
|
481
|
|
439
|
482
|
const {
|
440
|
483
|
init_acList,
|
|
@@ -443,7 +486,6 @@ const {
|
443
|
486
|
acRef,
|
444
|
487
|
statusRef,
|
445
|
488
|
InputRef_text,
|
446
|
|
- clearEvent,
|
447
|
489
|
tableHeaderStyle,
|
448
|
490
|
init_ad_statusList
|
449
|
491
|
} = listTs()
|