From 9f16b5c553b479ea12fe368a7ecc748872ea8b98 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期四, 12 六月 2025 11:11:27 +0800
Subject: [PATCH] 修改配置文件

---
 web_src/src/components/channelList.vue |   57 ++++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 40 insertions(+), 17 deletions(-)

diff --git a/web_src/src/components/channelList.vue b/web_src/src/components/channelList.vue
index 8af4269..ff1d784 100755
--- a/web_src/src/components/channelList.vue
+++ b/web_src/src/components/channelList.vue
@@ -100,9 +100,9 @@
               <span v-show="!scope.row.edit">{{ scope.row.location }}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="PTZType" label="浜戝彴绫诲瀷" min-width="100">
+          <el-table-column prop="ptzType" label="浜戝彴绫诲瀷" min-width="100">
             <template v-slot:default="scope">
-              <el-select v-show="scope.row.edit" v-model="scope.row.PTZType"
+              <el-select v-show="scope.row.edit" v-model="scope.row.ptzType"
                          placeholder="浜戝彴绫诲瀷" filterable>
                 <el-option
                   v-for="(value, key) in ptzTypes"
@@ -111,7 +111,7 @@
                   :value="key"
                 />
               </el-select>
-              <div v-show="!scope.row.edit">{{ scope.row.PTZTypeText }}</div>
+              <div v-show="!scope.row.edit">{{ scope.row.ptzTypeText }}</div>
             </template>
           </el-table-column>
           <el-table-column label="寮�鍚煶棰�" min-width="100">
@@ -178,13 +178,24 @@
                          @click="changeSubchannel(scope.row)">鏌ョ湅
               </el-button>
               <el-divider v-if="scope.row.subCount > 0 || scope.row.parental === 1" direction="vertical"></el-divider>
-              <el-button size="medium" v-bind:disabled="device == null || device.online === 0"
-                         icon="el-icon-video-camera"
-                         type="text" @click="queryRecords(scope.row)">璁惧褰曞儚
-              </el-button>
-              <el-button size="medium" v-bind:disabled="device == null || device.online === 0" icon="el-icon-cloudy"
-                         type="text" @click="queryCloudRecords(scope.row)">浜戠褰曞儚
-              </el-button>
+<!--              <el-button size="medium" v-bind:disabled="device == null || device.online === 0"-->
+<!--                         icon="el-icon-video-camera"-->
+<!--                         type="text" @click="queryRecords(scope.row)">璁惧褰曞儚-->
+<!--              </el-button>-->
+<!--              <el-button size="medium" v-bind:disabled="device == null || device.online === 0" icon="el-icon-cloudy"-->
+<!--                         type="text" @click="queryCloudRecords(scope.row)">浜戠褰曞儚-->
+<!--              </el-button>-->
+              <el-dropdown @command="(command)=>{moreClick(command, scope.row)}">
+                <el-button size="medium" type="text" >
+                  鏇村鍔熻兘<i class="el-icon-arrow-down el-icon--right"></i>
+                </el-button>
+                <el-dropdown-menu slot="dropdown">
+                  <el-dropdown-item command="records" v-bind:disabled="device == null || device.online === 0">
+                    璁惧褰曞儚</el-dropdown-item>
+                  <el-dropdown-item command="cloudRecords" v-bind:disabled="device == null || device.online === 0" >
+                    浜戠褰曞儚</el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
             </template>
           </el-table-column>
         </el-table>
@@ -312,10 +323,12 @@
           that.total = res.data.data.total;
           that.deviceChannelList = res.data.data.list;
           that.deviceChannelList.forEach(e => {
-            e.PTZType = e.PTZType + "";
+            e.ptzType = e.ptzType + "";
             that.$set(e, "edit", false);
             that.$set(e, "location", "");
-            if (e.longitude && e.latitude) {
+            if (e.customLongitude && e.customLatitude) {
+              that.$set(e, "location", e.customLongitude + "," + e.customLatitude);
+            }else if (e.longitude && e.latitude) {
               that.$set(e, "location", e.longitude + "," + e.latitude);
             }
           });
@@ -371,6 +384,13 @@
         that.isLoging = false;
         // that.$message.error("璇锋眰瓒呮椂");
       });
+    },
+    moreClick: function (command, itemData) {
+      if (command === "records") {
+        this.queryRecords(itemData)
+      }else if (command === "cloudRecords") {
+        this.queryCloudRecords(itemData)
+      }
     },
     queryRecords: function (itemData) {
       let deviceId = this.deviceId;
@@ -460,10 +480,12 @@
             this.total = res.data.data.total;
             this.deviceChannelList = res.data.data.list;
             this.deviceChannelList.forEach(e => {
-              e.PTZType = e.PTZType + "";
+              e.ptzType = e.ptzType + "";
               this.$set(e, "edit", false);
               this.$set(e, "location", "");
-              if (e.longitude && e.latitude) {
+              if (e.customLongitude && e.customLatitude) {
+                this.$set(e, "location", e.customLongitude + "," + e.customLatitude);
+              }else if (e.longitude && e.latitude) {
                 this.$set(e, "location", e.longitude + "," + e.latitude);
               }
             });
@@ -582,12 +604,13 @@
       if (row.location) {
         const segements = row.location.split(",");
         if (segements.length !== 2) {
+          console.log(1)
           this.$message.warning("浣嶇疆淇℃伅鏍煎紡鏈夎锛屼緥锛�117.234,36.378");
           return;
         } else {
-          row.longitude = parseFloat(segements[0]);
-          row.latitude = parseFloat(segements[1]);
-          if (!(row.longitude && row.latitude)) {
+          row.customLongitude = parseFloat(segements[0]);
+          row.customLatitude = parseFloat(segements[1]);
+          if (!(row.customLongitude && row.customLatitude)) {
             this.$message.warning("浣嶇疆淇℃伅鏍煎紡鏈夎锛屼緥锛�117.234,36.378");
             return;
           }

--
Gitblit v1.8.0