Procházet zdrojové kódy

相机配置&主页配置bugfix

zhudie před 2 roky
rodič
revize
888150b947

+ 7 - 2
src/views/cameras/overview/components/ShareCameraDetail.vue

@@ -99,6 +99,7 @@
   import useCameraShare from '../stores/useCameraShare';
   import { getVerify } from '@/api/camera/camera-share';
   import dayjs from 'dayjs';
+  import { ElMessage } from 'element-plus';
 
   const useShare = useCameraShare();
   const { cameraShareList, queryCameraId, conditionSearch, handleDel, handleAdd, handleEdit } =
@@ -165,8 +166,12 @@
   const verifyAccount = () => {
     // shareData.value.name = 'C' + shareData.value.account;
     getVerify(shareData.value.tenantCode!).then((res) => {
-      shareData.value.tenantName = res.tenantName;
-      shareData.value.toTenantId = res.tenantId;
+      if (res) {
+        shareData.value.tenantName = res.tenantName;
+        shareData.value.toTenantId = res.tenantId;
+      } else {
+        ElMessage.error('企业账号验证失败');
+      }
     });
   };
 

+ 21 - 11
src/views/system-config/scene-manage/actionColomns.vue

@@ -2,14 +2,16 @@
   <div style="display: flex">
     <div style="display: flex; margin-right: 7px">
       <div
-        v-if="props.subItem.parentId !== undefined"
+        v-if="(props.subItem as ComAddDatas).parentId !== undefined"
         @click="changeConig"
         class="wordStyle"
         style="margin-right: 10px"
         >页面设置</div
       >
       <div v-else style="margin-right: 10px; width: 56px"></div>
-      <div @click="changeAdd" class="wordStyle" style="margin-right: 7px">添加下一级</div></div
+      <div @click="changeAdd" :class="{ wordStyle: !isWorkshop, 'style-hidden': isWorkshop }"
+        >添加下一级</div
+      ></div
     >
     <div style="width: 1px; height: 14px; color: #e9e9e9; margin-right: 14px">|</div>
     <img src="../../../assets/icons/edit.png" @click="changeEdit" class="action-img" alt="" />
@@ -20,17 +22,11 @@
 </template>
 
 <script setup lang="ts">
-  interface User {
-    name?: string;
-    tag?: string;
-    code?: string;
-    hasChildren?: boolean;
-    children?: User[];
-    parentId?: number;
-  }
+  import { computed } from 'vue';
+  import { ComAddDatas, WorkshopAddDatas, WorkspaceAddDatas } from '@/api/scene/sceneOperate.ts';
 
   const props = defineProps<{
-    subItem: User;
+    subItem: ComAddDatas | WorkshopAddDatas | WorkspaceAddDatas;
     handleConig: (row) => unknown;
     handleAdd: (row) => unknown;
     handleEdit: (row) => unknown;
@@ -39,6 +35,10 @@
     handleDown: (row) => unknown;
   }>();
 
+  const isWorkshop = computed(() => {
+    return (props.subItem as any).workshopId ? true : false;
+  });
+
   const changeConig = () => {
     props.handleConig(props.subItem);
   };
@@ -71,7 +71,17 @@
     color: #1890ff;
     line-height: 22px;
     cursor: pointer;
+    margin-right: 7px;
+  }
+
+  .style-hidden {
+    height: 22px;
+    font-size: 14px;
+    color: grey;
+    line-height: 22px;
+    margin-right: 7px;
   }
+
   .otp-btn {
     width: 52px;
     height: 26px;