Commit 44ec35b4 by Tianqing Liu

feat: 优化重跑日志

1 parent e7f5b49c
......@@ -71,7 +71,7 @@
{{ item.name + ':' }}
</el-col>
<el-col :span="16">
<a-tag>{{ item.status }}</a-tag>
<a-tag :color="item.status">{{item.statusText}}</a-tag>
</el-col>
</el-row>
</a-card>
......@@ -327,7 +327,7 @@ export default {
}
msgLogList.value = []
for (const mallId of queryForm.account_id) {
for (const mallId of queryForm.plaza_id) {
// 请求接口
const rawData = toRaw(queryForm)
const params = {
......@@ -336,28 +336,30 @@ export default {
endDate: formatDate(rawData.endDate) + ' ' + '00:00:00',
}
msgLogList.value.push(getLogMsgList(mallId))
msgLogList.value.push(getLogMsgList(mallId, 'processing'))
dataRerunApi.getResult2(params).then(
(r) => {
console.log('getResult2', r)
if (r.data && r.data[0]) {
msgLogList.value.push(getLogMsgList(r.data[0].mallId), '完成!')
if (r.data) {
msgLogList.value.push(getLogMsgList(r.data.mallId))
}
}
)
}
}
const getLogMsgList = function(id, text = '开始...') {
const getLogMsgList = function(id, status = 'success') {
const targetMall = plazaList.value.find(item => item.value === id)
if (targetMall) {
return {
name: targetMall.label,
status: text,
status,
statusText: status === 'success' ? '完成' : '开始',
}
} else {
return {
name: '未知',
status: '-'
status: 'default',
statusText: '-',
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!