wangxiao 2 yıl önce
ebeveyn
işleme
d4ba7a9547
1 değiştirilmiş dosya ile 34 ekleme ve 27 silme
  1. 34 27
      src/pages/rts/gb28181/record.vue

+ 34 - 27
src/pages/rts/gb28181/record.vue

@@ -1,31 +1,31 @@
 <template>
-  <a-card>
-    <a-row>
-      <a-space>
-        <a-col>
-          <a-range-picker v-model:value="time" :format="['DD/MM/YYYY', 'DD/MM/YYYY']"  />
-        </a-col>
-        <a-col>
-          <a-button type="primary" @click="getTrackTaskList">搜索</a-button>
-        </a-col>
-      </a-space>
-    </a-row>
-    <a-table
-        style="margin-top: 20px;"
-        :columns="columns"
-        :data-source="state.dataSource"
-        :loading="state.loading"
-    ></a-table>
-  </a-card>
+    <a-card>
+        <a-row>
+            <a-space>
+                <a-col>
+                    <a-range-picker v-model:value="time" :format="['DD/MM/YYYY', 'DD/MM/YYYY']" />
+                </a-col>
+                <a-col>
+                    <a-button type="primary" @click="getGB28181Record">搜索</a-button>
+                </a-col>
+            </a-space>
+        </a-row>
+        <a-table
+            style="margin-top: 20px;"
+            :columns="columns"
+            :data-source="state.dataSource"
+            :loading="state.loading">
+        </a-table>
+    </a-card>
 </template>
 
 <script lang="ts" setup >
 import { RtsController } from '@/controller/rts'
-import { onMounted, reactive } from 'vue'
+import { reactive } from 'vue'
 import { useRoute } from 'vue-router'
 const route = useRoute()
 const deviceId = route.query.id as string
-
+const time = ref([])
 const columns = [
   {
     title: '设备id',
@@ -62,11 +62,11 @@ const columns = [
 ]
 
 const state = reactive<{
-  dataSource: RTS.GB2881.Record[]
-  loading: boolean
-  visible: boolean
-  deviceId: string
-  detail: Partial<RTS.GB2881.Record>
+    dataSource: RTS.GB2881.Record[]
+    loading: boolean
+    visible: boolean
+    deviceId: string
+    detail: Partial<RTS.GB2881.Record>
 }>({
   loading: false,
   visible: false,
@@ -87,7 +87,14 @@ const getGB28181Record = async () => {
   state.dataSource = data
 }
 
+watch(
+  () => time.value,
+  () => {
+    queryParamsState.start = time.value[0]
+    queryParamsState.end = time.value[1]
+  }
+)
+
 </script>
 
-<style lang="less" scoped >
-</style>
+<style lang="less" scoped ></style>