From c27e345edc6a92f485c1ef722ccaaa8ec6cbf5bf Mon Sep 17 00:00:00 2001
From: che_shuai <che_shuai@massclouds>
Date: 星期四, 13 七月 2023 10:22:42 +0800
Subject: [PATCH] 修复多级级联平台平台时,上级平台无法获取设备录像列表问题。问题详见  https://github.com/648540858/wvp-GB28181-pro/issues/914

---
 web_src/src/components/dialog/queryTrace.vue |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/web_src/src/components/dialog/queryTrace.vue b/web_src/src/components/dialog/queryTrace.vue
index bb12765..5063ad4 100644
--- a/web_src/src/components/dialog/queryTrace.vue
+++ b/web_src/src/components/dialog/queryTrace.vue
@@ -10,8 +10,8 @@
       @close="close()"
     >
       <div v-loading="isLoging">
-        <el-date-picker v-model="searchFrom" type="datetime" placeholder="閫夋嫨寮�濮嬫棩鏈熸椂闂�" default-time="00:00:00" size="mini" style="width: 11rem;" align="right" :picker-options="pickerOptions"></el-date-picker>
-        <el-date-picker v-model="searchTo" type="datetime" placeholder="閫夋嫨缁撴潫鏃ユ湡鏃堕棿" default-time="00:00:00" size="mini" style="width: 11rem;" align="right" :picker-options="pickerOptions"></el-date-picker>
+        <el-date-picker v-model="searchFrom" type="datetime" placeholder="閫夋嫨寮�濮嬫棩鏈熸椂闂�" default-time="00:00:00" value-format="yyyy-MM-dd HH:mm:ss" size="mini" style="width: 11rem;" align="right" :picker-options="pickerOptions"></el-date-picker>
+        <el-date-picker v-model="searchTo" type="datetime" placeholder="閫夋嫨缁撴潫鏃ユ湡鏃堕棿" default-time="00:00:00" value-format="yyyy-MM-dd HH:mm:ss" size="mini" style="width: 11rem;" align="right" :picker-options="pickerOptions"></el-date-picker>
         <el-button icon="el-icon-search" size="mini" type="primary" @click="onSubmit">鏌ヨ</el-button>
       </div>
 
@@ -72,7 +72,11 @@
     onSubmit: function () {
       console.log("onSubmit");
       this.isLoging = true;
-      this.$axios.get(`/api/position/history/${this.channel.deviceId}/${this.channel.channelId}`, {
+      let url = `/api/position/history/${this.channel.deviceId}?start=${this.searchFrom}&end=${this.searchTo}`;
+      if (this.channel.channelId) {
+        url+="&channelId=${this.channel.channelId}"
+      }
+      this.$axios.get(url, {
       }).then((res)=> {
         this.isLoging = false;
         if (typeof this.callback == "function") {

--
Gitblit v1.8.0