Commit 43acc8b6 by Tianqing Liu

feat: 增加分类重跑接口

1 parent 51887078
......@@ -77,6 +77,7 @@
<script>
import {reactive, ref, toRaw} from 'vue'
import moment from 'moment'
import {ElMessage} from 'element-plus'
import snapshotRecordApi from '@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi'
import {isArray} from '@/PublicUtil/Judgment'
import {formatDate, formatTime} from '@/PublicUtil/PublicUtil'
......@@ -311,10 +312,27 @@ export default {
// 新需求:数据重跑
const confirmSearch2 = function() {
resultList.value = []
informationList.value = []
for (const scheduleType of queryForm.scheduleTypeList) {
if (queryForm.account_id.length < 1) {
ElMessage({
message: `至少选择一个集团`,
type: 'error'
})
return
}
for (const mallId of queryForm.account_id) {
// 请求接口
const rawData = toRaw(queryForm)
const params = {
mallId,
startDate: formatDate(rawData.startDate) + ' ' + '00:00:00',
endDate: formatDate(rawData.endDate) + ' ' + '00:00:00',
}
dataRerunApi.getResult2(params).then(
(r) => {
console.log('getResult2', r)
}
)
}
}
......
......@@ -22,13 +22,13 @@ class DataRerunApi {
}
)
}
//
getResult2(data, type) {
// 分类重跑:https://store.keliuyun.com/btool/allData/reCal?mallId=xx&startDate=2024-04-10&endDate=2024-04-10
getResult2(data) {
return axiosInstance.request(
{
method: 'POST',
url: `${map[type]}`,
data: data
method: 'GET',
url: `/btool/allData/reCal`,
params: data
}
)
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!