Commit 99c2a81b authored by hzl's avatar hzl

feat: 任务页面添加删除功能和模版页面设置预算和roas的默认值

parent 944a7e39
...@@ -148,6 +148,13 @@ ...@@ -148,6 +148,13 @@
circle circle
title="开始" title="开始"
disabled></el-button> disabled></el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
circle
title="删除"
@click="handleDelete(scope.row)"></el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -1450,6 +1457,37 @@ export default { ...@@ -1450,6 +1457,37 @@ export default {
} }
}, },
// 删除单个任务
async handleDelete(row) {
try {
await this.$confirm(
`确定要删除任务 "${row.campaignNameList || 'ID:' + row.id}" 吗?`,
'删除确认',
{
confirmButtonText: '确定删除',
cancelButtonText: '取消',
type: 'warning'
}
);
// 调用删除接口
const response = await deleteCampaignTask(row.id);
if (response.status === 200) {
this.$message.success('删除成功');
// 刷新数据
this.fetchData();
} else {
this.$message.error(response.msg || '删除失败');
}
} catch (error) {
if (error !== 'cancel') {
console.error('删除任务失败:', error);
this.$message.error('删除失败:' + (error.message || '未知错误'));
}
}
},
submitForm() { submitForm() {
this.$refs.form.validate(async valid => { this.$refs.form.validate(async valid => {
if (valid) { if (valid) {
......
...@@ -487,9 +487,9 @@ export default { ...@@ -487,9 +487,9 @@ export default {
platform: 2, // 默认选择TikTok平台 platform: 2, // 默认选择TikTok平台
campaign_type: 1, campaign_type: 1,
appStore: 3, appStore: 3,
daily_budget: 0, daily_budget: 20,
bidding_type: 5, bidding_type: 5,
target_roas: 0, target_roas: 1,
app_groups: [], app_groups: [],
location_groups: [], location_groups: [],
material_groups: [], material_groups: [],
...@@ -502,7 +502,7 @@ export default { ...@@ -502,7 +502,7 @@ export default {
optimizationEvent: 'AD_REVENUE_VALUE', optimizationEvent: 'AD_REVENUE_VALUE',
deepBidType: 'VO_MIN_ROAS', deepBidType: 'VO_MIN_ROAS',
// deepCpaBid: 0, // deepCpaBid: 0,
roasBid: 0, roasBid: 1,
// vboWindow: '', // vboWindow: '',
// placements: [], // placements: [],
isSmart: false, isSmart: false,
...@@ -918,9 +918,9 @@ export default { ...@@ -918,9 +918,9 @@ export default {
platform: 2, // 默认选择TikTok平台 platform: 2, // 默认选择TikTok平台
campaign_type: 1, campaign_type: 1,
appStore: 3, appStore: 3,
daily_budget: 0, daily_budget: 20,
bidding_type: 5, bidding_type: 5,
target_roas: 0, target_roas: 1,
app_groups: [], app_groups: [],
location_groups: [], location_groups: [],
material_groups: [], material_groups: [],
...@@ -933,7 +933,7 @@ export default { ...@@ -933,7 +933,7 @@ export default {
optimizationEvent: 'AD_REVENUE_VALUE', optimizationEvent: 'AD_REVENUE_VALUE',
deepBidType: 'VO_MIN_ROAS', deepBidType: 'VO_MIN_ROAS',
// deepCpaBid: 0, // deepCpaBid: 0,
roasBid: 0, roasBid: 1,
// vboWindow: '', // vboWindow: '',
// placements: [], // placements: [],
isSmart: false, isSmart: false,
...@@ -1007,7 +1007,7 @@ export default { ...@@ -1007,7 +1007,7 @@ export default {
optimizationEvent: 'AD_REVENUE_VALUE', optimizationEvent: 'AD_REVENUE_VALUE',
deepBidType: 'VO_MIN_ROAS', deepBidType: 'VO_MIN_ROAS',
// deepCpaBid: 0, // deepCpaBid: 0,
roasBid: 0, roasBid: 1,
// vboWindow: '', // vboWindow: '',
// placements: [], // placements: [],
isSmart: false, isSmart: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment