Commit 8c0569a6 by 李乾广

修改bug

1 parent 4e9c5e94
...@@ -9,6 +9,10 @@ const menuRoute = [ ...@@ -9,6 +9,10 @@ const menuRoute = [
path: 'DataRerun', path: 'DataRerun',
component: () => import("@/views/DataRerun/DataRerun.vue"), component: () => import("@/views/DataRerun/DataRerun.vue"),
}, },
{
path: 'dayAnalysisRerun',
component: () => import("@/views/dayAnalysisRerun/dayAnalysisRerun.vue"),
},
{ {
path: 'DataRepair', path: 'DataRepair',
component: () => import("@/views/DataRepair/DataRepair.vue"), component: () => import("@/views/DataRepair/DataRepair.vue"),
......
...@@ -104,6 +104,12 @@ ...@@ -104,6 +104,12 @@
<span style="padding: 0 5px">数据重跑</span> <span style="padding: 0 5px">数据重跑</span>
</div> </div>
</a-menu-item> </a-menu-item>
<a-menu-item :key="'/Main/dayAnalysisRerun'">
<div class="flex-vertical-center">
<!-- <img :src="require('./Icons/1.svg')" style="height: auto;width:20px"/> -->
<span style="padding: 0 5px">全天分析重跑</span>
</div>
</a-menu-item>
<a-menu-item :key="'/Main/DataRepair'"> <a-menu-item :key="'/Main/DataRepair'">
<div class="flex-vertical-center"> <div class="flex-vertical-center">
<!-- <img :src="require('./Icons/2.svg')" style="height: auto;width:20px"/> --> <!-- <img :src="require('./Icons/2.svg')" style="height: auto;width:20px"/> -->
......
...@@ -122,6 +122,9 @@ ...@@ -122,6 +122,9 @@
<a-form-item style="padding: 5px 0"> <a-form-item style="padding: 5px 0">
<a-button type="primary" @click="personnelComparativeFun">人员特征对比</a-button> <a-button type="primary" @click="personnelComparativeFun">人员特征对比</a-button>
</a-form-item> </a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="updatePersonInfoByGroup">类型修正</a-button>
</a-form-item>
<a-form-item style="padding: 0px 5px;border: 1px solid #ccc;border-radius: 6px;"> <a-form-item style="padding: 0px 5px;border: 1px solid #ccc;border-radius: 6px;">
<a-button type="primary" @click="handleMutipleOperation">{{mutipleOperationText}}</a-button> <a-button type="primary" @click="handleMutipleOperation">{{mutipleOperationText}}</a-button>
<i class="el-icon-arrow-right" style="margin: 0px 10px;"></i> <i class="el-icon-arrow-right" style="margin: 0px 10px;"></i>
...@@ -156,7 +159,7 @@ ...@@ -156,7 +159,7 @@
<span class="expandWord" @click='expandChange(person)'>{{person.expand?'收起':'展开'}}</span> <span class="expandWord" @click='expandChange(person)'>{{person.expand?'收起':'展开'}}</span>
<!--修正组类型数据--> <!--修正组类型数据-->
<span class="expandWord" @click='updatePersonInfoByGroup(person)'>类型修正</span> <!-- <span class="expandWord" @click='updatePersonInfoByGroup(person)'>类型修正</span> -->
<span class="expandWord" @click='searchPersonInfoByGroup(person)'>搜索</span> <span class="expandWord" @click='searchPersonInfoByGroup(person)'>搜索</span>
<el-checkbox class="checkBox" v-model="person.checked" @change='checkChange(person)'></el-checkbox> <el-checkbox class="checkBox" v-model="person.checked" @change='checkChange(person)'></el-checkbox>
...@@ -216,7 +219,7 @@ ...@@ -216,7 +219,7 @@
<DetailDialogComparison ref="DetailDialogComparisonRef" /> <DetailDialogComparison ref="DetailDialogComparisonRef" />
<singleImgComparisonDialog ref="singleImgComparisonRef"></singleImgComparisonDialog> <singleImgComparisonDialog ref="singleImgComparisonRef"></singleImgComparisonDialog>
<PersonGroupEditor ref='personGroupEditorRef' @refresh="handleRefresh" /> <PersonGroupEditor ref='personGroupEditorRef' @refresh="handleEditorRefresh" />
<PersonGroupMover ref='personGroupMoverRef' :data-params="currentSearchCondition" :data-list="dataList" @refresh="handleRefresh" /> <PersonGroupMover ref='personGroupMoverRef' :data-params="currentSearchCondition" :data-list="dataList" @refresh="handleRefresh" />
<PersonGroupDialog ref='personGroupDialogRef' :query-form="queryForm" @refresh="handleRefresh" /> <PersonGroupDialog ref='personGroupDialogRef' :query-form="queryForm" @refresh="handleRefresh" />
</template> </template>
...@@ -469,13 +472,18 @@ export default { ...@@ -469,13 +472,18 @@ export default {
pageNum.value = 1 pageNum.value = 1
confirmSearch() confirmSearch()
} }
const handleRefresh = function() { const handleRefresh = function() {
isMultipleOperation.value = false
selectedPersonList.value = []
confirmSearch()
}
const handleEditorRefresh = function() {
isMultipleOperation.value = false isMultipleOperation.value = false
selectedPersonList.value = [] selectedPersonList.value = []
confirmSearch() confirmSearch(1)
} }
const currentSearchCondition = ref() const currentSearchCondition = ref()
const confirmSearch = function() { const confirmSearch = function(type) {
isLoading.value = true isLoading.value = true
const rawData = toRaw(queryForm) const rawData = toRaw(queryForm)
const data = filterEmptyValueInObject( const data = filterEmptyValueInObject(
...@@ -542,7 +550,9 @@ export default { ...@@ -542,7 +550,9 @@ export default {
}) })
dataList.value = r.data.persons dataList.value = r.data.persons
total.value = r.data.pageNum total.value = r.data.pageNum
document.getElementsByClassName('resultContent')[0].scrollTop = 0 if(!type) {
document.getElementsByClassName('resultContent')[0].scrollTop = 0
}
currentSearchCondition.value = data currentSearchCondition.value = data
} }
) )
...@@ -602,10 +612,29 @@ export default { ...@@ -602,10 +612,29 @@ export default {
// 人员类型修正 // 人员类型修正
const personGroupEditorRef = ref(); const personGroupEditorRef = ref();
// const isShowGroupEditor = ref(false) // const isShowGroupEditor = ref(false)
const updatePersonInfoByGroup = function(data) { const updatePersonInfoByGroup = function() {
console.log('updatePersonInfoByGroup', data) let par = {
// isShowGroupEditor.value = true person_unids:[],
personGroupEditorRef.value.initDialog(data); perrsonList:[]
}
dataList.value.forEach(item=>{
if (item.checked && item.checked == true) {
par.person_unids.push(item.person_unid)
par.perrsonList = (par.perrsonList.length==0&&item.perrsonList.length > 0)?item.perrsonList:par.perrsonList;
}
})
console.log('updatePersonInfoByGroup', par)
if(par.person_unids.length>0) {
personGroupEditorRef.value.initDialog(par);
}else{
ElMessage(
{
message: `请选择聚类图片`,
type: 'warning'
}
)
return
}
} }
// 批量操作 // 批量操作
...@@ -965,6 +994,7 @@ export default { ...@@ -965,6 +994,7 @@ export default {
downloadTrajectoryFile, downloadTrajectoryFile,
clickSearch, clickSearch,
handleRefresh, handleRefresh,
handleEditorRefresh,
currentSearchCondition, currentSearchCondition,
// ref // ref
// imgModelRef, // imgModelRef,
......
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
const initDialog = (data) => { const initDialog = (data) => {
console.log('initDialog', data) console.log('initDialog', data)
formData.value = getInitialFormData() formData.value = getInitialFormData()
formData.value.personUnid = data.person_unid formData.value.personUnid = data.person_unids
if (data.perrsonList.length > 0) { if (data.perrsonList.length > 0) {
formData.value.age = data.perrsonList[0].age formData.value.age = data.perrsonList[0].age
formData.value.gender = data.perrsonList[0].gender formData.value.gender = data.perrsonList[0].gender
......
<template>
<a-form class="data-return-form" :model="queryForm" layout="inline" :label-col="{ style: { width: '70px' } }">
<a-form-item label="集团:">
<a-select v-model:value="queryForm.account_id" style="width: 280px" mode="multiple" :maxTagCount="1" :options="accountList" @change="onAccountChange" optionFilterProp="label" show-search>
</a-select>
</a-form-item>
<a-form-item label="广场:">
<a-select v-model:value="queryForm.plaza_id" style="width: 280px" mode="multiple" :maxTagCount="1" :options="plazaList" optionFilterProp="label" show-search>
</a-select>
</a-form-item>
<a-form-item label="开始日期:">
<a-date-picker v-model:value="queryForm.startDate" />
</a-form-item>
<a-form-item label="结束日期:">
<a-date-picker v-model:value="queryForm.endDate" />
</a-form-item>
<a-form-item>
<a-button type="primary" @click="confirmSearch">开始</a-button>
</a-form-item>
</a-form>
<!--新的日志-->
<div class="card-container">
<a-card title="全天分析重跑结果" style="width: 600px">
<el-row v-for="(item,index) in msgLogList" :key="index" style="padding: 2px 0;">
<el-col :span="8">
{{item.time}}
</el-col>
<el-col :span="16">
全天分析任务已提交,正在重跑中...
</el-col>
</el-row>
</a-card>
</div>
</template>
<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 } from '@/PublicUtil/PublicUtil'
import dayAnalysisRerunApi from '@/views/dayAnalysisRerun/dayAnalysisRerunApi'
export default {
components: {
VNodes: (_, {attrs}) => {
return attrs.vnodes
},
},
setup() {
const accountList = ref([])
const plazaList = ref([])
const queryForm = reactive({
account_id: [],
plaza_id: [],
startDate: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),
endDate: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),
})
const onAccountChange = function() {
getPlazaList()
}
const getPlazaList = function() {
queryForm.plaza_id = []
plazaList.value = []
snapshotRecordApi.getPlazaList({
account_id: queryForm.account_id.toString()
}).then(
(r) => {
if (isArray(r)) {
for (const item of r) {
plazaList.value.push({
value: item.id,
label: item.name,
})
}
}
}
)
}
const getAccountList = function() {
queryForm.account_id = []
accountList.value = []
snapshotRecordApi.getAccountList().then(
(r) => {
if (isArray(r)) {
for (const item of r) {
accountList.value.push({
value: item.id,
label: item.name,
})
}
}
}
)
}
// 新需求:数据重跑
const msgLogList = ref([])
const confirmSearch = function() {
if (queryForm.account_id.length < 1) {
ElMessage({
message: `至少选择一个集团`,
type: 'error'
})
return
}
if (queryForm.plaza_id.length < 1) {
ElMessage({
message: `至少选择一个门店`,
type: 'error'
})
return
}
msgLogList.value = []
const rawData = toRaw(queryForm)
const params = {
mallIds:queryForm.plaza_id.join(','),
startDate: formatDate(rawData.startDate),
endDate: formatDate(rawData.endDate),
}
dayAnalysisRerunApi.getResult(params).then(
(r) => {
console.log('getResult', r)
if (r.msg_code==200) {
msgLogList.value.push({time:moment().format('YYYY-MM-DD HH:mm:ss')})
}
}
)
}
const __main = function() {
getAccountList()
}
__main()
return {
accountList,
plazaList,
queryForm,
onAccountChange,
confirmSearch,
msgLogList,
}
}
}
</script>
<style lang="less" scoped>
.result-wrapper-2 {
width: 50%;
min-width: 600px;
border-radius: 4px;
margin: 20px auto 0;
position: relative;
overflow: auto;
}
.card-container {
display: flex;
justify-content: center;
/deep/.ant-card-body {
height: 370px;
}
}
.data-return-form {
/deep/.ant-form-item {
margin-bottom: 10px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
import axiosInstance from "@/Request/PublicAxiosInstance"
class DayAnalysisRerunApi {
getResult(data) {
return axiosInstance.request(
{
method: 'GET',
url: `/reid/reCall`,
params: data
}
)
}
}
const dayAnalysisRerunApi = new DayAnalysisRerunApi()
export default dayAnalysisRerunApi
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!