Commit 43acc8b6 by Tianqing Liu

feat: 增加分类重跑接口

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