Commit b55e0961 by 李君

特征重提

1 parent e68b0a64
...@@ -14,7 +14,7 @@ const axiosInstance = axios.create( ...@@ -14,7 +14,7 @@ const axiosInstance = axios.create(
// 请求拦截器 // 请求拦截器
axiosInstance.interceptors.request.use( axiosInstance.interceptors.request.use(
config => { config => {
// Cookies.set('atoken','e433d448-d61e-4aba-9a3e-06c2fcb4a7e5') // Cookies.set('atoken','8367538e-7bb0-4f9e-984e-d01aba8e70bd')
if(!Cookies.get('atoken')){ if(!Cookies.get('atoken')){
ElMessage({ ElMessage({
message: `登录过期,请重新登录`, message: `登录过期,请重新登录`,
......
.pagination-page {
float: right;
padding-right: 10px;
}
.result-wrapper {
/* padding: 0 20px; */
width: 100%;
min-width: 600px;
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);
border-radius: 4px;
// margin: 20px auto 0;
position: relative;
overflow: auto;
}
.result-header {
text-align: center;
font-size: 16px;
padding: 10px 0;
box-shadow: 0px 0px 3px 0 rgba(0, 0, 0, .2);
/* margin: 10px 0 0; */
}
.result-page {
margin: 8px 0;
}
.result-progress-wrapper::after,
.result-progress-wrapper::before {
content: '';
display: table;
}
.result-progress-wrapper::after {
clear: both;
}
.result-item {
padding: 10px;
}
.scrollbar-wrapper {
height: 100%;
height: 650px;
max-height: 650px;
overflow-x: hidden !important;
}
.result-intro {
float: left;
}
.result-clear-btn {
float: right;
border-radius: 20px;
}
.result-footer {
padding: 12px 20px;
font-size: 16px;
box-shadow: 0px 0px 3px 0 rgba(0, 0, 0, .2);
}
.result-footer::after,
.result-footer::before {
content: '';
display: table;
}
.result-footer::after {
clear: both;
}
<template>
<div class="result-wrapper">
<div class="result-header">结果展示</div>
<div class="scrollbar-wrapper">
<div v-for="item in resultList" class="result-item">
<div class="result-page">
<span>总处理条数 : {{ item.totalNum }}</span>
</div>
<el-row>
<el-col :span="2">
执行进度 :
</el-col>
<el-col :span="22">
<el-progress :text-inside="true" :stroke-width="26" :percentage="item?.progress"/>
</el-col>
</el-row>
<el-row>
<el-col :span="2">
</el-col>
<el-col :span="22">
<span>{{ item.current }}条/共{{ item.curPageSize }}</span>
<span class="pagination-page">{{ item.currentPage }}页/共{{ item.totalPage }}</span>
</el-col>
</el-row>
</div>
</div>
<!-- <div class="result-footer">-->
<!-- <span class="result-intro" v-if="startTiming && endTiming">{{ footerText || '数据重跑' }}完毕! 共计 {{ totalTime | formatTime }}</span>-->
<!-- <el-button class="result-clear-btn" @click="onClearClick">清空结果</el-button>-->
<!-- </div>-->
</div>
</template>
<script>
export default {
props: {
data: {
type: Array,
default: []
},
},
setup(props, {emit}) {
const resultList = props.data
return {
resultList
}
}
}
</script>
<style lang="less" scoped>
@import "./ResultDisplay.less";
</style>
<template> <template>
<a-form :model="queryForm" layout="inline"> <a-form :model="queryForm" layout="inline">
<a-form-item label="集团:"> <a-form-item label="集团:">
<!-- mode="multiple" -->
<a-select v-model:value="queryForm.account_id" <a-select v-model:value="queryForm.account_id"
style="width: 280px" style="width: 280px"
mode="multiple"
:maxTagCount="1" :maxTagCount="1"
@change="onAccountChange" @change="onAccountChange"
:options="accountList" :options="accountList"
...@@ -13,9 +14,10 @@ ...@@ -13,9 +14,10 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="广场:"> <a-form-item label="广场:">
<!-- mode="multiple" -->
<a-select v-model:value="queryForm.plaza_id" <a-select v-model:value="queryForm.plaza_id"
style="width: 280px" style="width: 280px"
mode="multiple"
:maxTagCount="1" :maxTagCount="1"
:options="plazaList" :options="plazaList"
optionFilterProp="label" optionFilterProp="label"
...@@ -27,17 +29,38 @@ ...@@ -27,17 +29,38 @@
<a-select v-model:value="queryForm.featureRevisitType" style="width: 280px"> <a-select v-model:value="queryForm.featureRevisitType" style="width: 280px">
<a-select-option :value="1">店员库重建</a-select-option> <a-select-option :value="1">店员库重建</a-select-option>
<a-select-option :value="2">顾客库重建</a-select-option> <a-select-option :value="2">顾客库重建</a-select-option>
<a-select-option :value="3">人员库重建</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="选择日期:" v-if="queryForm.featureRevisitType === 2"> <a-form-item label="选择日期:" v-if="queryForm.featureRevisitType != 3">
<a-date-picker v-model:value="queryForm.date"/> <a-date-picker v-model:value="queryForm.date"/>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button type="primary" @click="searchList" style="margin-right: 10px;">查询</a-button>
<a-button type="primary" @click="initializeWebSocket">开始</a-button> <a-button type="primary" @click="initializeWebSocket">开始</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>
<el-row :gutter="20" style="margin-top: 15px;">
<ResultDisplay :data="resultList" :key="resultList"></ResultDisplay> <el-col :span="8">
<el-table :data="libraryList" :max-height="700" border>
<el-table-column
prop="poolId"
label="库名称"
align="center">
</el-table-column>
<el-table-column
prop="personCount"
label="数量"
align="center"
width="120">
</el-table-column>
</el-table>
</el-col>
<el-col :span="16">
<ResultDisplay :data="resultList" :key="resultList"></ResultDisplay>
</el-col>
</el-row>
</template> </template>
<script> <script>
...@@ -47,7 +70,7 @@ import moment from 'moment' ...@@ -47,7 +70,7 @@ import moment from 'moment'
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'
import ResultDisplay from '@/component/ResultDisplay/ResultDisplay' import ResultDisplay from '@/component/ResultDisplay1/ResultDisplay'
export default { export default {
components: { components: {
...@@ -129,7 +152,24 @@ export default { ...@@ -129,7 +152,24 @@ export default {
let formatNum = Math.floor(floatNum * 100) let formatNum = Math.floor(floatNum * 100)
return formatNum >= 100 ? 100 : formatNum return formatNum >= 100 ? 100 : formatNum
} }
const libraryList = ref([])
const searchList = function(){
libraryList.value = []
const rawData = toRaw(queryForm)
featureLibraryRebuildApi.getLibraryList(
{
mallIds: rawData.plaza_id.toString(),
countDate:rawData.featureRevisitType==3?formatDate(new Date()):formatDate(rawData.date),
personType:rawData.featureRevisitType
}
).then(
(r) => {
if(r.data&&r.data.length>0){
libraryList.value = r.data[0].poolList
}
}
)
}
const dealMessage = function(message) { const dealMessage = function(message) {
// scheduleType // scheduleType
const {dates, mallIds, mallNames, status, stepCount, scheduleType, counter} = message const {dates, mallIds, mallNames, status, stepCount, scheduleType, counter} = message
...@@ -210,6 +250,8 @@ export default { ...@@ -210,6 +250,8 @@ export default {
const data = { const data = {
mallIds: rawData.plaza_id, mallIds: rawData.plaza_id,
scheduleType: `rebuildFeatureLib${rawData.featureRevisitType}`, scheduleType: `rebuildFeatureLib${rawData.featureRevisitType}`,
startDate: formatDate(rawData.date) + ' ' + '00:00:00',
endDate: formatDate(rawData.date) + ' ' + '23:59:59',
} }
featureLibraryRebuildApi.getStaffResult(data) featureLibraryRebuildApi.getStaffResult(data)
break break
...@@ -225,6 +267,15 @@ export default { ...@@ -225,6 +267,15 @@ export default {
featureLibraryRebuildApi.getCustomResult(data) featureLibraryRebuildApi.getCustomResult(data)
break break
} }
case 3:
{
const data = {
mallIds: rawData.plaza_id,
scheduleType: `rebuildFeatureLib${rawData.featureRevisitType}`,
}
featureLibraryRebuildApi.getPersonResult(data)
break
}
} }
} }
...@@ -244,6 +295,8 @@ export default { ...@@ -244,6 +295,8 @@ export default {
queryForm, queryForm,
onAccountChange, onAccountChange,
initializeWebSocket, initializeWebSocket,
searchList,
libraryList
} }
} }
} }
......
...@@ -21,6 +21,26 @@ class FeatureLibraryRebuildApi { ...@@ -21,6 +21,26 @@ class FeatureLibraryRebuildApi {
} }
) )
} }
getPersonResult(data) {
return axiosInstance.request(
{
method: 'POST',
url: `/person/rePool`,
data: data
}
)
}
getLibraryList(data){
return axiosInstance.request(
{
method: 'GET',
url: `/person/pools`,
params: filterEmptyValueInObject(
data
)
}
)
}
} }
const featureLibraryRebuildApi = new FeatureLibraryRebuildApi() const featureLibraryRebuildApi = new FeatureLibraryRebuildApi()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!