Commit 7211868e authored by lijin's avatar lijin

modified

parent 8e6fae5a
...@@ -145,6 +145,9 @@ ...@@ -145,6 +145,9 @@
:visible.sync="detailVisible" :visible.sync="detailVisible"
width="80%" width="80%"
> >
<div style="margin-bottom: 15px; text-align: right;">
<el-button icon="el-icon-refresh" @click="refreshTaskDetail">刷新</el-button>
</div>
<el-table :data="currentTaskDetail" border> <el-table :data="currentTaskDetail" border>
<el-table-column prop="id" label="ID"></el-table-column> <el-table-column prop="id" label="ID"></el-table-column>
<el-table-column prop="advertiserId" label="广告账户ID"></el-table-column> <el-table-column prop="advertiserId" label="广告账户ID"></el-table-column>
...@@ -222,7 +225,8 @@ export default { ...@@ -222,7 +225,8 @@ export default {
templateMap: new Map(), templateMap: new Map(),
detailVisible: false, detailVisible: false,
errorReasonVisible: false, errorReasonVisible: false,
currentTaskDetail: null currentTaskDetail: null,
currentTaskId: null
} }
}, },
created() { created() {
...@@ -347,6 +351,7 @@ export default { ...@@ -347,6 +351,7 @@ export default {
this.detailVisible = true; this.detailVisible = true;
this.detailLoading = true; this.detailLoading = true;
this.currentTaskDetail = null; this.currentTaskDetail = null;
this.currentTaskId = row.id;
getCampaignTaskDetails({taskId: row.id}).then(response => { getCampaignTaskDetails({taskId: row.id}).then(response => {
if (response.status === 200) { if (response.status === 200) {
...@@ -362,6 +367,27 @@ export default { ...@@ -362,6 +367,27 @@ export default {
}); });
}, },
refreshTaskDetail() {
if (!this.currentTaskId) {
this.$message.warning('无法刷新,任务ID不存在');
return;
}
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) { async handleStart(row) {
try { try {
const response = await axios.post(process.env.PUTIN_API + `/campaign-tasks/start?campaignTaskId=${row.id}`) 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