Commit e6d6c59b authored by lijin's avatar lijin

modified

parent b90fa713
......@@ -156,7 +156,13 @@
:visible.sync="detailVisible"
width="80%"
>
<el-table :data="currentTaskDetail" border>
<div class="header-actions">
<el-button type="primary" @click="showAddDialog">创建任务</el-button>
<div class="header-right">
<el-button icon="el-icon-refresh" @click="refreshDetail" :loading="detailLoading">刷新</el-button>
</div>
</div>
<el-table :data="currentTaskDetail" border :loading="detailLoading">
<el-table-column prop="id" label="ID" width="80"></el-table-column>
<el-table-column prop="advertiserId" label="广告账户ID" align="center" sortable></el-table-column>
<el-table-column prop="campaignId" label="广告计划ID" align="center" sortable></el-table-column>
......@@ -373,7 +379,9 @@ export default {
videoPlayVisible: false,
currentVideoUrl: '',
errorMessageVisible: false,
currentErrorMsg: ''
currentErrorMsg: '',
currentTaskId: null,
detailLoading: false,
}
},
created() {
......@@ -498,6 +506,7 @@ export default {
this.detailVisible = true;
this.detailLoading = true;
this.currentTaskDetail = null;
this.currentTaskId = row.id;
getCampaignTaskDetails({taskId: row.id}).then(response => {
if (response.status === 200) {
......@@ -513,6 +522,22 @@ export default {
});
},
refreshDetail() {
this.detailLoading = true;
getCampaignTaskDetails({taskId: this.currentTaskId}).then(response => {
if (response.status === 200) {
this.currentTaskDetail = response.result.data;
} else {
this.$message.error(response.msg || '获取任务详情失败');
}
}).catch(error => {
console.error('获取任务详情失败:', error);
this.$message.error('获取任务详情失败: ' + error.message);
}).finally(() => {
this.detailLoading = false;
});
},
async handleStart(row) {
try {
const response = await axios.post(process.env.PUTIN_API + `/campaign-tasks/start?campaignTaskId=${row.id}`)
......
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