Commit fbf79020 by 李君

优化

1 parent e429fe75
...@@ -2,25 +2,18 @@ import axios from 'axios' ...@@ -2,25 +2,18 @@ import axios from 'axios'
import router from '@/router/index' import router from '@/router/index'
import Cookies from "js-cookie" import Cookies from "js-cookie"
import {getTimestampString} from "@/PublicUtil/PublicUtil" import {getTimestampString} from "@/PublicUtil/PublicUtil"
import {ElMessage} from 'element-plus'
// 创建 axios 的一个实例 // 创建 axios 的一个实例
const axiosInstance = axios.create( const axiosInstance = axios.create(
{ {
baseURL: window._baseUrl baseURL: ''
} }
) )
// 请求拦截器 // 请求拦截器
axiosInstance.interceptors.request.use( axiosInstance.interceptors.request.use(
config => { config => {
if (['localhost', '192.168.1.168'].includes(window.location.hostname))
{
config.headers.Authorization = '015269a1-3214-4271-b202-1922138d021c'
}
else
{
config.headers.Authorization = Cookies.get('atoken') config.headers.Authorization = Cookies.get('atoken')
}
return config return config
} }
...@@ -30,7 +23,14 @@ axiosInstance.interceptors.request.use( ...@@ -30,7 +23,14 @@ axiosInstance.interceptors.request.use(
axiosInstance.interceptors.response.use( axiosInstance.interceptors.response.use(
(r) => { (r) => {
const responseData = r.data const responseData = r.data
if(responseData.ecode && responseData.ecode == '401'){
ElMessage({
message: `登录过期,请重新登录`,
type: 'warning'
})
// location.href=window.location.origin
return
}
return responseData return responseData
}, },
(e) => { (e) => {
......
...@@ -211,8 +211,8 @@ ...@@ -211,8 +211,8 @@
const onAccountChange = function() { const onAccountChange = function() {
getPlazaList() getPlazaList()
getZoneList() // getZoneList()
getGateList() // getGateList()
} }
const onPlazaChange = function() { const onPlazaChange = function() {
...@@ -238,6 +238,12 @@ ...@@ -238,6 +238,12 @@
label: item.name, label: item.name,
}) })
} }
if(plazaList.value.length>0){
queryForm.plaza_id.push(plazaList.value[0].value)
getZoneList()
getGateList()
confirmSearch()
}
} }
} }
) )
...@@ -297,6 +303,10 @@ ...@@ -297,6 +303,10 @@
label: item.name, label: item.name,
}) })
} }
if(accountList.value.length){
queryForm.account_id.push(accountList.value[0].value)
getPlazaList(1)
}
} }
} }
) )
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<a-row :gutter="[16,16]"> <a-row :gutter="[16,16]">
<a-col :span='4'> <a-col :span='4'>
<div style="margin: 0 5px" class="itemBox"> <div style="margin: 0 5px" class="itemBox">
<el-image :src="detailData.picture_url" :fit="'fill'" class="single-image"> <el-image :src="detailData.picture_url" :fit="'fill'" class="single-image" @click='clickItem(detailData)'>
</el-image> </el-image>
<span class="el-icon-document downloadFile" @click="downloadFile(detailData,$event)"></span> <span class="el-icon-document downloadFile" @click="downloadFile(detailData,$event)"></span>
<div>时间:{{ detailData.counttime }}</div> <div>时间:{{ detailData.counttime }}</div>
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
<a-row> <a-row>
<a-col :span="4" v-for="item in row.personList" :key='item.id' class='colItem'> <a-col :span="4" v-for="item in row.personList" :key='item.id' class='colItem'>
<div style="margin: 0 5px" class="itemBox"> <div style="margin: 0 5px" class="itemBox">
<el-image :src="item.picture_url" :fit="'fill'" class="single-image"> <el-image :src="item.picture_url" :fit="'fill'" class="single-image" @click='clickItem(item)'>
</el-image> </el-image>
<span class="el-icon-document downloadFile" @click="downloadFile(item,$event)"></span> <span class="el-icon-document downloadFile" @click="downloadFile(item,$event)"></span>
<p class="featureNum">{{(item.featureNum).toFixed(2)}}</p> <p class="featureNum">{{item.featureNum?(item.featureNum).toFixed(2):0}}</p>
<div>时间:{{ item.counttime }}</div> <div>时间:{{ item.counttime }}</div>
</div> </div>
</a-col> </a-col>
...@@ -40,17 +40,24 @@ ...@@ -40,17 +40,24 @@
<a-button @click="onCancel">返回</a-button> <a-button @click="onCancel">返回</a-button>
</template> </template>
</a-modal> </a-modal>
<imgDialog ref='imgModelRef'></imgDialog>
</template> </template>
<script> <script>
import { reactive, ref } from "vue"; import { reactive, ref } from "vue";
import {isArray } from '@/PublicUtil/Judgment' import {isArray } from '@/PublicUtil/Judgment'
import comparsionResultApi from '@/views/ComparisonCapturedPictures/api' import comparsionResultApi from '@/views/ComparisonCapturedPictures/api'
import clusterResultApi from '@/views/SnapshotCluster/ClusterResult/ClusterResultApi'
import imgDialog from '../SnapshotCluster/imgDialog.vue'
export default { export default {
components:{
imgDialog
},
setup() { setup() {
const isVisible = ref(false); const isVisible = ref(false);
const isLoading = ref(false); const isLoading = ref(false);
const detailData = ref({}); const detailData = ref({});
const imgModelRef = ref();
const dataList = ref([]) const dataList = ref([])
const initDialog = (record,parmas) => { const initDialog = (record,parmas) => {
detailData.value = record; detailData.value = record;
...@@ -62,7 +69,6 @@ export default { ...@@ -62,7 +69,6 @@ export default {
if (isArray(r.data)) { if (isArray(r.data)) {
if(r.data.length>0){ if(r.data.length>0){
r.data.forEach((item) => { r.data.forEach((item) => {
console.log(item)
item.personList.forEach((item1)=>{ item.personList.forEach((item1)=>{
if (item1.features_url) { if (item1.features_url) {
item1.features_url = window._baseImgUrl + item1.features_url item1.features_url = window._baseImgUrl + item1.features_url
...@@ -95,6 +101,11 @@ export default { ...@@ -95,6 +101,11 @@ export default {
} }
} }
} }
const clickItem = function(data){
clusterResultApi.getBodyPoint({'feature_url':data.features_url}).then((r) => {
imgModelRef.value.initDialog(data.picture_url,r.data);
})
}
const onCancel = () => { const onCancel = () => {
isVisible.value = false; isVisible.value = false;
}; };
...@@ -122,7 +133,9 @@ export default { ...@@ -122,7 +133,9 @@ export default {
initDialog, initDialog,
isLoading, isLoading,
formatDirection, formatDirection,
downloadFile downloadFile,
clickItem,
imgModelRef
}; };
}, },
}; };
...@@ -131,6 +144,7 @@ export default { ...@@ -131,6 +144,7 @@ export default {
.single-image { .single-image {
height: 200px; height: 200px;
width: 150px; width: 150px;
cursor: pointer;
} }
.rowBox{ .rowBox{
border : 2px dashed #ccc; border : 2px dashed #ccc;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<el-image :src="item.picture_url" :fit="'fill'" class="single-image"> <el-image :src="item.picture_url" :fit="'fill'" class="single-image">
</el-image> </el-image>
<span class="el-icon-document downloadFile" @click="downloadFile(item,$event)"></span> <span class="el-icon-document downloadFile" @click="downloadFile(item,$event)"></span>
<p class="featureNum">{{(item.featureNum).toFixed(2)}}</p> <p class="featureNum">{{item.featureNum?(item.featureNum).toFixed(2):0}}</p>
<div>时间:{{ item.counttime }}</div> <div>时间:{{ item.counttime }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div> <div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div> <div>地点:{{ item.gate_name }}</div>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<el-image :src="item.picture_url" :fit="'fill'" class="single-image"> <el-image :src="item.picture_url" :fit="'fill'" class="single-image">
</el-image> </el-image>
<span class="el-icon-document downloadFile" @click="downloadFile(item,$event)"></span> <span class="el-icon-document downloadFile" @click="downloadFile(item,$event)"></span>
<p class="featureNum">{{(item.featureNum).toFixed(2)}}</p> <p class="featureNum">{{item.featureNum?(item.featureNum).toFixed(2):0}}</p>
<div>时间:{{ item.counttime }}</div> <div>时间:{{ item.counttime }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div> <div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div> <div>地点:{{ item.gate_name }}</div>
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<el-image :src="item.picture_url" :fit="'fill'" class="single-image"> <el-image :src="item.picture_url" :fit="'fill'" class="single-image">
</el-image> </el-image>
<span class="el-icon-document downloadFile" @click="downloadFile(item,$event)"></span> <span class="el-icon-document downloadFile" @click="downloadFile(item,$event)"></span>
<p class="featureNum">{{(item.featureNum).toFixed(2)}}</p> <p class="featureNum">{{item.featureNum?(item.featureNum).toFixed(2):0}}</p>
<div>时间:{{ item.counttime }}</div> <div>时间:{{ item.counttime }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div> <div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div> <div>地点:{{ item.gate_name }}</div>
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
<el-image :src="item.picture_url" :fit="'fill'" class="single-image"> <el-image :src="item.picture_url" :fit="'fill'" class="single-image">
</el-image> </el-image>
<span class="el-icon-document downloadFile" @click="downloadFile(item,$event)"></span> <span class="el-icon-document downloadFile" @click="downloadFile(item,$event)"></span>
<p class="featureNum">{{(item.featureNum).toFixed(2)}}</p> <p class="featureNum">{{item.featureNum?(item.featureNum).toFixed(2):0}}</p>
<div>时间:{{ item.counttime }}</div> <div>时间:{{ item.counttime }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div> <div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div> <div>地点:{{ item.gate_name }}</div>
...@@ -223,6 +223,12 @@ ...@@ -223,6 +223,12 @@
label: item.name, label: item.name,
}) })
} }
if(plazaList.value.length>0){
queryForm.plaza_id.push(plazaList.value[0].value)
getZoneList()
getGateList()
confirmSearch()
}
} }
} }
) )
...@@ -282,6 +288,10 @@ ...@@ -282,6 +288,10 @@
label: item.name, label: item.name,
}) })
} }
if(accountList.value.length){
queryForm.account_id.push(accountList.value[0].value)
getPlazaList(1)
}
} }
} }
) )
......
...@@ -97,15 +97,25 @@ ...@@ -97,15 +97,25 @@
<a-form-item style="padding: 5px 0"> <a-form-item style="padding: 5px 0">
<a-button type="primary" @click="confirmSearch" :loading="isLoading">查询</a-button> <a-button type="primary" @click="confirmSearch" :loading="isLoading">查询</a-button>
</a-form-item> </a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="comparativeFun">特征对比</a-button>
</a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="singleComparativeFun">单张特征对比</a-button>
</a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="clerkComparativeFun">店员特征对比</a-button>
</a-form-item>
</a-form> </a-form>
<div v-loading="isLoading"> <div v-loading="isLoading">
<div v-for="person in dataList" style="margin: 10px 0;border: solid 1px black"> <div v-for="person in dataList" style="margin: 10px 0;border: solid 1px black">
<el-checkbox class="checkBox" v-model="person.checked" @change='checkChange(person)'></el-checkbox>
人id:{{ ' ' + person.person_unid }} 人id:{{ ' ' + person.person_unid }}
图片数量:{{ person.perrsonList.length }} 图片数量:{{ person.perrsonList.length }}
<el-row v-for="row in getPagedList(person.perrsonList, 8)"> <el-row v-for="row in getPagedList(person.perrsonList, 8)">
<el-col :span="3" v-for="item in row"> <el-col :span="3" v-for="item in row">
<div style="margin: 0 5px"> <div style="margin: 0 5px" @click="handleClick(item)" :class="currentItemId==item.id?'actived':''">
<div style="display:flex; justify-content: flex-end "> <div style="display:flex; justify-content: flex-end ">
<span @click="downloadFile(item.features_url)" <span @click="downloadFile(item.features_url)"
style="color: #409EFF;font-size: 15px;cursor: pointer;"> style="color: #409EFF;font-size: 15px;cursor: pointer;">
...@@ -114,9 +124,10 @@ ...@@ -114,9 +124,10 @@
</div> </div>
<el-image :src="item.picture_url" <el-image :src="item.picture_url"
:fit="'fill'" :fit="'fill'"
class="single-image" @click="handleClick(item.picture_url,item.features_url)"> class="single-image" >
</el-image> </el-image>
<div>时间:{{ item.counttime }}</div> <div>时间:{{ item.counttime }}</div>
<div>人员类型:{{ item.person_type==1?'店员':'顾客' }}</div>
<div class="direction" :class="'direction'+item.direction">方向:{{ formatDirection(item.direction) }}</div> <div class="direction" :class="'direction'+item.direction">方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div> <div>地点:{{ item.gate_name }}</div>
</div> </div>
...@@ -136,7 +147,10 @@ ...@@ -136,7 +147,10 @@
style="text-align:center" style="text-align:center"
/> />
</div> </div>
<imgDialog ref='imgModelRef'></imgDialog> <!-- <imgDialog ref='imgModelRef'></imgDialog> -->
<DetailDialog ref="DetailDialogRef" />
<DetailDialogComparison ref="DetailDialogComparisonRef" />
<singleImgComparisonDialog ref="singleImgComparisonRef"></singleImgComparisonDialog>
</template> </template>
<script> <script>
...@@ -145,10 +159,17 @@ import clusterResultApi from '@/views/SnapshotCluster/ClusterResult/ClusterResul ...@@ -145,10 +159,17 @@ import clusterResultApi from '@/views/SnapshotCluster/ClusterResult/ClusterResul
import {isArray} from '@/PublicUtil/Judgment' import {isArray} from '@/PublicUtil/Judgment'
import moment from 'moment' import moment from 'moment'
import {filterEmptyValueInObject, formatDate, formatTime, getPagedList} from '@/PublicUtil/PublicUtil' import {filterEmptyValueInObject, formatDate, formatTime, getPagedList} from '@/PublicUtil/PublicUtil'
import imgDialog from '../imgDialog.vue' // import imgDialog from '../imgDialog.vue'
import {ElMessage} from 'element-plus'
import DetailDialog from "../../ComparisonCapturedPictures/DetailDialog.vue";
import DetailDialogComparison from "../../ComparisonCapturedPictures/DetailDialogComparisonNew.vue";
import singleImgComparisonDialog from "../singleImgComparisonDialog.vue";
export default { export default {
components:{ components:{
imgDialog // imgDialog
DetailDialog,
DetailDialogComparison,
singleImgComparisonDialog
}, },
setup() { setup() {
// scalar // scalar
...@@ -156,19 +177,23 @@ export default { ...@@ -156,19 +177,23 @@ export default {
const pageSize = ref(10) const pageSize = ref(10)
const total = ref() const total = ref()
const isLoading = ref(false) const isLoading = ref(false)
const currobj = ref({})
const currentItemId = ref()
// sequence // sequence
const dataList = ref([]) const dataList = ref([])
const accountList = ref([]) const accountList = ref([])
const plazaList = ref([]) const plazaList = ref([])
const zoneList = ref([]) const zoneList = ref([])
const gateList = ref([]) const gateList = ref([])
const imgModelRef = ref(); // const imgModelRef = ref();
const pagedTableDataList = computed( const pagedTableDataList = computed(
() => { () => {
return getPagedList(dataList.value, 8) return getPagedList(dataList.value, 8)
} }
) )
const DetailDialogRef = ref();
const DetailDialogComparisonRef = ref();
const singleImgComparisonRef = ref()
const queryForm = reactive( const queryForm = reactive(
{ {
account_id: [], account_id: [],
...@@ -200,8 +225,8 @@ export default { ...@@ -200,8 +225,8 @@ export default {
const onAccountChange = function() { const onAccountChange = function() {
getPlazaList() getPlazaList()
getZoneList() // getZoneList()
getGateList() // getGateList()
} }
const onPlazaChange = function() { const onPlazaChange = function() {
...@@ -233,6 +258,12 @@ export default { ...@@ -233,6 +258,12 @@ export default {
} }
) )
} }
if(plazaList.value.length>0){
queryForm.plaza_id.push(plazaList.value[0].value)
getZoneList()
getGateList()
confirmSearch()
}
} }
} }
) )
...@@ -308,6 +339,10 @@ export default { ...@@ -308,6 +339,10 @@ export default {
} }
) )
} }
if(accountList.value.length){
queryForm.account_id.push(accountList.value[0].value)
getPlazaList(1)
}
} }
} }
) )
...@@ -389,14 +424,124 @@ export default { ...@@ -389,14 +424,124 @@ export default {
window.open(url) window.open(url)
} }
const handleClick = function(url,feature){ const handleClick = function(data){
clusterResultApi.getBodyPoint({'feature_url':feature}).then( currentItemId.value = data.id
(r) => { currobj.value = data;
imgModelRef.value.initDialog(url,r.data); // clusterResultApi.getBodyPoint({'feature_url':feature}).then(
// (r) => {
// imgModelRef.value.initDialog(url,r.data);
// }
// )
}
const checkChange = function(data){
console.log(data)
}
// 特征对比
const comparativeFun = function(){
const rawData = toRaw(queryForm)
if(!currobj.value.id){
ElMessage(
{
message: `请选择图片`,
type: 'warning'
} }
) )
return
}
if(!currobj.value.picture_url){
ElMessage(
{
message: `该图片没有特征,请选择有效的图片`,
type: 'warning'
}
)
return
}
let parmas = {
mall_id:currobj.value.mall_id,
picType:rawData.picType,
pic_id:currobj.value.id,
countdate:formatDate(rawData.date),
dataList:[]
}
dataList.value.forEach(item=>{
if (item.checked && item.checked == true) {
parmas.dataList.push(item)
}
})
if(parmas.dataList && parmas.dataList.length > 0){
DetailDialogComparisonRef.value.initDialog(currobj.value,parmas);
}else{
ElMessage(
{
message: `请选择聚类图片`,
type: 'warning'
}
)
return
}
}
//单张特征对比
const singleComparativeFun = function(){
if(!currobj.value.id){
ElMessage(
{
message: `请选择图片`,
type: 'warning'
}
)
return
}
if(!currobj.value.picture_url){
ElMessage(
{
message: `该图片没有特征,请选择有效的图片`,
type: 'warning'
}
)
return
}
const rawData = toRaw(queryForm)
let parmas = {
person_unid:currobj.value.person_unid,
pic_type:rawData.picType,
countdate:formatDate(rawData.date),
pic_id:currobj.value.id,
ip:window._baseImgUrl,
plaza_id:currobj.value.mall_id
}
singleImgComparisonRef.value.initDialog(parmas);
}
// 店员特征对比
const clerkComparativeFun = function(){
const rawData = toRaw(queryForm)
if(!currobj.value.id){
ElMessage(
{
message: `请选择图片进行对比`,
type: 'warning'
}
)
return
}
if(!currobj.value.picture_url){
ElMessage(
{
message: `该图片没有特征,请选择有效的图片`,
type: 'warning'
}
)
return
}
let parmas = {
plaza_id:currobj.value.mall_id,
pic_type:rawData.picType,
pic_id:currobj.value.id,
ip:window._baseImgUrl,
countdate:formatDate(rawData.date)
}
DetailDialogRef.value.initDialog(currobj.value,parmas);
} }
const __main = function() { const __main = function() {
getAccountList() getAccountList()
} }
...@@ -409,6 +554,8 @@ export default { ...@@ -409,6 +554,8 @@ export default {
pageNum, pageNum,
pageSize, pageSize,
total, total,
currentItemId,
currobj,
// sequence // sequence
accountList, accountList,
plazaList, plazaList,
...@@ -429,8 +576,15 @@ export default { ...@@ -429,8 +576,15 @@ export default {
downloadFile, downloadFile,
getPagedList, getPagedList,
handleClick, handleClick,
comparativeFun,
checkChange,
clerkComparativeFun,
singleComparativeFun,
// ref // ref
imgModelRef // imgModelRef,
DetailDialogRef,
DetailDialogComparisonRef,
singleImgComparisonRef
} }
} }
} }
...@@ -438,5 +592,11 @@ export default { ...@@ -438,5 +592,11 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
@import "./ClusterResult"; @import "./ClusterResult";
.actived{
border: 1px solid #1890ff;
}
.checkBox{
margin-left: 10px;
}
</style> </style>
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
聚类结果 聚类结果
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
<div v-show="currentMenu[0] === '抓拍记录'"> <div v-if="currentMenu[0] === '抓拍记录'">
<SnapshotRecord></SnapshotRecord> <SnapshotRecord></SnapshotRecord>
</div> </div>
<div v-show="currentMenu[0] === '聚类结果'"> <div v-if="currentMenu[0] === '聚类结果'">
<ClusterResult></ClusterResult> <ClusterResult></ClusterResult>
</div> </div>
</template> </template>
......
...@@ -91,12 +91,15 @@ ...@@ -91,12 +91,15 @@
<a-form-item style="padding: 5px 0"> <a-form-item style="padding: 5px 0">
<a-button type="primary" @click="confirmSearch" :loading="isLoading">查询</a-button> <a-button type="primary" @click="confirmSearch" :loading="isLoading">查询</a-button>
</a-form-item> </a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="comparativeFun">特征对比验证</a-button>
</a-form-item>
</a-form> </a-form>
<div v-loading="isLoading"> <div v-loading="isLoading">
<el-row v-for="row in pagedTableDataList"> <el-row v-for="row in pagedTableDataList">
<el-col :span="3" v-for="item in row"> <el-col :span="3" v-for="item in row">
<div style="margin: 0 5px"> <div style="margin: 0 5px;cursor: pointer;" @click="handleClick(item)" :class="currentItemId==item.id?'actived':''">
<div style="display:flex; justify-content: flex-end "> <div style="display:flex; justify-content: flex-end ">
<span @click="downloadFile(item.features_url)" <span @click="downloadFile(item.features_url)"
style="color: #409EFF;font-size: 15px;cursor: pointer;"> style="color: #409EFF;font-size: 15px;cursor: pointer;">
...@@ -105,9 +108,10 @@ ...@@ -105,9 +108,10 @@
</div> </div>
<el-image :src="item.picture_url" <el-image :src="item.picture_url"
:fit="'fill'" :fit="'fill'"
class="single-image" @click="handleClick(item.picture_url,item.features_url)"> class="single-image">
</el-image> </el-image>
<div>时间:{{ item.counttime }}</div> <div>时间:{{ item.counttime }}</div>
<div>人员类型:{{ item.person_type==1?'店员':'顾客' }}</div>
<div class="direction" :class="'direction'+item.direction">方向:{{ formatDirection(item.direction) }}</div> <div class="direction" :class="'direction'+item.direction">方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div> <div>地点:{{ item.gate_name }}</div>
</div> </div>
...@@ -127,21 +131,23 @@ ...@@ -127,21 +131,23 @@
style="text-align:center" style="text-align:center"
/> />
</div> </div>
<imgDialog ref='imgModelRef'></imgDialog> <!-- <imgDialog ref='imgModelRef'></imgDialog> -->
<DetailDialog ref="DetailDialogRef" />
</template> </template>
<script> <script>
import {computed, reactive, ref, toRaw} from 'vue' import {computed, reactive, ref, toRaw} from 'vue'
import snapshotRecordApi from '@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi' import snapshotRecordApi from '@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi'
import clusterResultApi from '@/views/SnapshotCluster/ClusterResult/ClusterResultApi'
import {isArray} from '@/PublicUtil/Judgment' import {isArray} from '@/PublicUtil/Judgment'
import moment from 'moment' import moment from 'moment'
import {filterEmptyValueInObject, formatDate, formatTime, getPagedList} from '@/PublicUtil/PublicUtil' import {filterEmptyValueInObject, formatDate, formatTime, getPagedList} from '@/PublicUtil/PublicUtil'
import imgDialog from '../imgDialog.vue' // import imgDialog from '../imgDialog.vue'
import {ElMessage} from 'element-plus'
import DetailDialog from "../../ComparisonCapturedPictures/DetailDialog.vue";
export default { export default {
components:{ components:{
imgDialog // imgDialog ,
DetailDialog
}, },
setup() { setup() {
// scalar // scalar
...@@ -156,6 +162,10 @@ export default { ...@@ -156,6 +162,10 @@ export default {
const zoneList = ref([]) const zoneList = ref([])
const gateList = ref([]) const gateList = ref([])
const imgModelRef = ref(); const imgModelRef = ref();
const currentItemId = ref()
const currobj = ref({})
// ref
const DetailDialogRef = ref();
const pagedTableDataList = computed( const pagedTableDataList = computed(
() => { () => {
return getPagedList(dataList.value, 8) return getPagedList(dataList.value, 8)
...@@ -191,8 +201,8 @@ export default { ...@@ -191,8 +201,8 @@ export default {
const onAccountChange = function() { const onAccountChange = function() {
getPlazaList() getPlazaList()
getZoneList() // getZoneList()
getGateList() // getGateList()
} }
const onPlazaChange = function() { const onPlazaChange = function() {
...@@ -224,6 +234,12 @@ export default { ...@@ -224,6 +234,12 @@ export default {
} }
) )
} }
if(plazaList.value.length){
queryForm.plaza_id.push(plazaList.value[0].value)
getZoneList()
getGateList()
confirmSearch()
}
} }
} }
) )
...@@ -299,6 +315,10 @@ export default { ...@@ -299,6 +315,10 @@ export default {
} }
) )
} }
if(accountList.value.length){
queryForm.account_id.push(accountList.value[0].value)
getPlazaList(1)
}
} }
} }
) )
...@@ -367,12 +387,34 @@ export default { ...@@ -367,12 +387,34 @@ export default {
const downloadFile = function(url) { const downloadFile = function(url) {
window.open(url) window.open(url)
} }
const handleClick = function(url,feature){ const handleClick = function(data){
clusterResultApi.getBodyPoint({'feature_url':feature}).then( currentItemId.value = data.id
(r) => { currobj.value = data;
imgModelRef.value.initDialog(url,r.data); }
const comparativeFun = function(){
if(currobj.value=={}) {
ElMessage({
message: `请选择图片进行对比验证`,
type: 'warning'
});
return false
}
if(!currobj.value.picture_url){
ElMessage({
message: `该图片没有特征,请选择有效的图片`,
type: 'warning'
})
return
} }
) const rawData = toRaw(queryForm)
let parmas = {
plaza_id:currobj.value.mall_id,
pic_type:rawData.picType,
pic_id:currobj.value.id,
ip:window._baseImgUrl,
countdate:formatDate(rawData.date)
}
DetailDialogRef.value.initDialog(currobj.value,parmas);
} }
const __main = function() { const __main = function() {
getAccountList() getAccountList()
...@@ -386,12 +428,14 @@ export default { ...@@ -386,12 +428,14 @@ export default {
pageNum, pageNum,
pageSize, pageSize,
total, total,
currobj,
// sequence // sequence
accountList, accountList,
plazaList, plazaList,
zoneList, zoneList,
gateList, gateList,
pagedTableDataList, pagedTableDataList,
currentItemId,
// mapping // mapping
queryForm, queryForm,
// function // function
...@@ -404,7 +448,9 @@ export default { ...@@ -404,7 +448,9 @@ export default {
formatDirection, formatDirection,
downloadFile, downloadFile,
handleClick, handleClick,
//ref comparativeFun,
// ref
DetailDialogRef,
imgModelRef imgModelRef
} }
} }
...@@ -413,5 +459,8 @@ export default { ...@@ -413,5 +459,8 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
@import "./SnapshotRecord"; @import "./SnapshotRecord";
.actived{
border: 1px solid #1890ff;
}
</style> </style>
...@@ -29,7 +29,6 @@ export default { ...@@ -29,7 +29,6 @@ export default {
imgUrl.value = url imgUrl.value = url
isVisible.value = true; isVisible.value = true;
setTimeout(()=>{ setTimeout(()=>{
debugger
var imgscream=document.getElementById("img"); var imgscream=document.getElementById("img");
let height = imgscream.offsetHeight; let height = imgscream.offsetHeight;
let width = imgscream.offsetWidth; let width = imgscream.offsetWidth;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!