Commit 594479e1 by 李君

优化

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