Commit 594479e1 by 李君

优化

1 parent 65ead378
......@@ -11,6 +11,16 @@ class DataReplay {
}
)
}
getRematchList(data) {
return axiosInstance.request(
{
method: 'GET',
url: `/rematch/all`,
params: data
}
)
}
}
const DataReplayApi = new DataReplay()
......
......@@ -11,7 +11,7 @@
</a-select>
</a-form-item>
<a-form-item label="日期:" style="padding: 5px 0">
<a-range-picker v-model:value="queryForm.repairDate" style="width: 280px" />
<a-date-picker v-model:value="queryForm.countdate" style="width: 280px" />
</a-form-item>
<a-form-item label="是否重提:" style="padding: 5px 0">
<a-select v-model:value="queryForm.reExtractFeature" style="width: 280px">
......@@ -26,14 +26,20 @@
</a-select>
</a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="preview" :loading="isLoading">添加</a-button>
<a-button type="primary" @click="preview" :loading="isLoading">添加任务</a-button>
</a-form-item>
</a-form>
<!-- <a-table :dataSource="dataList" v-loading="isLoading" :columns="columns" :pagination="false">
<template #status="{ text }">
<span :class="getClass(text)">{{ text }}</span>
<a-table :dataSource="dataList" v-loading="isLoading" :columns="columns" rowKey='id' :pagination="false">
<template #countdate="{ text }">
<span >{{ moment(text).format('YYYY-MM-DD') }}</span>
</template>
<template #reExtractFeature="{ text }">
<span >{{ text?"是":'否' }}</span>
</template>
</a-table> -->
<template #reTrack="{ text }">
<span >{{ text?"是":'否' }}</span>
</template>
</a-table>
</template>
<script>
......@@ -56,58 +62,47 @@
import {
PlusOutlined
} from '@ant-design/icons-vue'
const columns = [{
title: '监控点名称',
dataIndex: 'gatename',
align: 'center',
},
{
title: '设备号',
dataIndex: 'deviceSerialnum',
align: 'center',
},
{
title: '通道号',
dataIndex: 'channelSerialnum',
align: 'center',
},
{
title: '参考范围数据条数',
dataIndex: 'sourceCount',
align: 'center',
},
import {ElMessage} from 'element-plus'
const columns = [
{
title: '修复范围数据条数',
dataIndex: 'targetCount',
title: '广场名称',
dataIndex: 'mallName',
align: 'center',
},
{
title: '参考范围客流量',
dataIndex: 'sourceInnum',
title: '重跑日期',
dataIndex: 'countdate',
align: 'center',
slots: {
customRender: 'countdate',
},
},
{
title: '修复范围客流量',
dataIndex: 'targetInnum',
title: '是否重提特征',
dataIndex: 'reExtractFeature',
align: 'center',
slots: {
customRender: 'reExtractFeature',
},
},
{
title: '状态',
dataIndex: 'status',
title: '是否重读轨迹文件',
dataIndex: 'reTrack',
align: 'center',
slots: {
customRender: 'status',
customRender: 'reTrack',
},
},
{
title: '操作',
dataIndex: 'operation',
title: '数据总数',
dataIndex: 'total',
align: 'center',
slots: {
customRender: 'operation',
},
},
{
title: '已完成数',
dataIndex: 'completedNum',
align: 'center',
}
]
export default {
......@@ -131,7 +126,7 @@
const queryForm = reactive({
accountId: '',
mallId: '',
repairDate: [moment().format('YYYY-MM-DD'),moment().format('YYYY-MM-DD')],
countdate: moment().format('YYYY-MM-DD'),
reExtractFeature:'true',
reTrack:'true'
})
......@@ -187,26 +182,51 @@
const preview = function() {
isLoading.value = true
const rawData = toRaw(queryForm)
console.log(rawData.repairDate)
dataReplayApi.getRematch(filterEmptyValueInObject({
accountId: rawData.accountId.toString(),
mallId: rawData.mallId.toString(),
countdate: rawData.countdate,
reExtractFeature: rawData.reExtractFeature,
reTrack: rawData.reTrack,
startDate:rawData.repairDate[0],
endDate:rawData.repairDate[1],
})).then(
(r) => {
console.log(r)
isLoading.value = false
if(r.code==200){
ElMessage(
{
message: `添加成功`,
type: 'success'
}
)
return
}else{
ElMessage(
{
message: `添加失败`,
type: 'error'
}
)
return
}
}
)
}
const getDataList = function(){
dataReplayApi.getRematchList().then(
(r) => {
if (isArray(r)) {
dataList.value = r
}else{
dataList.value = []
}
}
)
}
const __main = function() {
getAccountList()
getDataList()
}
__main()
return {
......@@ -221,6 +241,7 @@
// function
onAccountChange,
preview,
moment
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!