Explorar o código

Merge branch 'shareFix' into 'master'

bugFIX

See merge request tian-group/skyeye-admin-fe!51
孙宏耀 %!s(int64=2) %!d(string=hai) anos
pai
achega
58ed9d59a6

+ 5 - 3
src/components/Table/src/components/TableActionIconsWords.vue

@@ -8,9 +8,11 @@
           </el-icon>
           <img v-if="item.type === 'img'" :src="item.icon" :style="{ width: `${props.size}px` }" />
         </el-tooltip>
-        <div v-if="item.type === 'words'" style="color: rgb(17, 153, 232); cursor: pointer">{{
-          item.label
-        }}</div>
+        <div
+          v-if="item.type === 'wordsincomplete'"
+          style="color: rgb(17, 153, 232); cursor: pointer"
+          >{{ item.label }}</div
+        >
       </div>
     </el-space>
   </div>

+ 4 - 1
src/views/cameras/overview/components/ShareCameraDetail.vue

@@ -127,7 +127,10 @@
   });
 
   const handleEdit = (_row) => {};
-  const handleDelete = (_row) => {};
+  const handleDelete = (row) => {
+    const indexToRemove = shareData.value.shareList.findIndex((item) => item.name === row.name);
+    shareData.value.shareList.splice(indexToRemove, 1);
+  };
 
   //操作列
   const actionColumn: BasicColumn = reactive({

+ 1 - 1
src/views/cameras/overview/components/SharedTable.vue

@@ -108,7 +108,7 @@
         actionIcons: [
           {
             label: '添加',
-            type: 'words',
+            type: 'words' + props.addCameraType,
             onClick: handleAdd.bind(null, record.row, props.addCameraType),
           },
           {

+ 1 - 1
src/views/cameras/overview/constant.ts

@@ -297,7 +297,7 @@ export const columns: BasicColumn[] = [
       return h(
         'img',
         {
-          src: record.row.networkingState === 0 ? connectedIcon : unConnectedIcon,
+          src: record.row.networkingState === 0 ? unConnectedIcon : connectedIcon,
           style:
             'width: 20px; height: 20px; object-fit: fill; display: inline-block; line-height: 20px; vertical-align: middle;',
         },