bill 8 months ago
parent
commit
1335a79288

BIN
public/favicon.ico


+ 0 - 1
src/api/fuse-model.ts

@@ -54,7 +54,6 @@ export const uploadMaterialToModel = async (uploadId: number) => {
 
 export const getSceneUrl = (sceneData: Scene) => {
   let url: any = [""];
-  console.log(sceneData, sceneData.type);
   if (
     [SceneType.SWSS, SceneType.SWYDSS].includes(sceneData.type)
   ) {

+ 1 - 1
src/api/instance.ts

@@ -60,7 +60,7 @@ addResErrorHandler((response, data) => {
     if (data.code === ResCode.TOKEN_INVALID) {
       gotoLogin();
     } else {
-      Message.error(msg);
+      Message.error(msg || '服务出现异常,请稍后再试');
     }
   }
 });

+ 2 - 1
src/components/materials/index.vue

@@ -58,7 +58,7 @@
             </template>
             <template v-else-if="column.key === 'action'">
               <span>
-                <a @click="delHandler(column.id)">删除</a>
+                <a @click="delHandler(record.id)">删除</a>
               </span>
             </template>
           </template>
@@ -210,6 +210,7 @@ const addHandler = async (file: File) => {
 };
 const delHandler = async (id: Material["id"]) => {
   if (await Dialog.confirm("确定要删除此数据吗?")) {
+    console.error(id);
     await delMaterial(id);
     refresh();
   }

+ 6 - 1
src/layout/edit/scene-select.vue

@@ -53,7 +53,7 @@
     </div>
   </Modal>
 
-  <div>
+  <div class="slot-layout">
     <Dropdown placement="bottom">
       <slot></slot>
       <template #overlay>
@@ -226,6 +226,11 @@ const selectModel = async () => {
   max-height: 500px;
   overflow-y: auto;
 }
+.slot-layout {
+  display: flex;
+  align-items: center;
+  height: 100%;
+}
 </style>
 
 <style lang="less">

+ 1 - 1
src/layout/model-list/style.scss

@@ -70,4 +70,4 @@
 
   }
 
-}
+}

+ 29 - 15
src/layout/scene-list/index.vue

@@ -4,9 +4,12 @@
       <slot name="action" />
     </template>
     <template #atom="{ item }">
-      <div v-if="item.raw === fuseModel" @click="updateCurrent(item.raw)">
+      <div
+        v-if="item.raw === fuseModel"
+        @click="updateCurrent(item.raw)"
+        class="all-scene-model-list"
+      >
         <ModelList
-          class="scene-model-list"
           :class="{ active: current === fuseModel }"
           :title="getModelTypeDesc(fuseModel as any)"
           :show-content="showModelList"
@@ -26,18 +29,22 @@
         @click="updateCurrent(item.raw)"
         v-else
       >
-        <p>{{ item.raw.name }}</p>
-        <p>
-          {{ SceneTypeDesc[item.raw.type as SceneType] }}
-          <span
-            style="float: right"
-            v-if="canSync(item as Scene)"
-            @click.stop="sync(item as Scene)"
-            class="fun-ctrl"
-          >
-            同屏勘验
-          </span>
-        </p>
+        <div>
+          <p>{{ item.raw.name }}</p>
+          <p>
+            {{ SceneTypeDesc[item.raw.type as SceneType] }}
+          </p>
+        </div>
+        <Button
+          size="small"
+          type="primary"
+          ghost
+          style="float: right"
+          v-if="canSync(item as Scene)"
+          @click.stop="sync(item as Scene)"
+        >
+          同屏勘验
+        </Button>
       </div>
     </template>
   </List>
@@ -56,6 +63,7 @@ import {
 import List from "@/components/list/index.vue";
 import ModelList from "../model-list/index.vue";
 import { fuseModel, getModelTypeDesc } from "@/model";
+import { Button } from "ant-design-vue";
 
 import type { ModelType, FuseModelType } from "@/model";
 import type { Scene } from "@/store";
@@ -116,6 +124,12 @@ const stopWatch = watch(
 
 .scene {
   padding: 0 20px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  > div {
+    flex: 1;
+  }
 
   p {
     height: 1.5em;
@@ -126,7 +140,7 @@ const stopWatch = watch(
   }
 }
 
-.scene-model-list.list {
+.all-scene-model-list .scene-model-list {
   margin-bottom: -20px;
   margin-top: -20px;
 

+ 1 - 1
src/store/scene.ts

@@ -62,7 +62,7 @@ export const getSWKKSyncLink = async (scene: Scene) => {
     // domain: location.href,
     // fromMiniApp: "0",
     role: "leader",
-    avatar: userInfo.avatar,
+    avatar: './favicon.ico',
     redirect: encodeURIComponent(location.href),
     name: userInfo.userName,
     m: scene.num,

+ 1 - 1
src/views/folder/floder-view.vue

@@ -47,7 +47,7 @@
 
   <Modal
     v-if="root.modal"
-    width="800px"
+    width="1200px"
     :title="root.title"
     @cancel="showChildren = false"
     :open="showChildren"

+ 20 - 6
src/views/folder/modal-floder-view.vue

@@ -2,16 +2,21 @@
   <ui-group v-if="floders.length">
     <ui-group-option>
       <span @click="canAll && (showAll = !showAll)" :class="{ ['fun-ctrl']: canAll }">
-        {{ root.title }}
         <template v-if="canAll">
           <UpOutlined v-if="showAll" />
           <DownOutlined v-else />
         </template>
+        {{ root.title }}
       </span>
     </ui-group-option>
     <ui-group-option>
       <div class="items">
-        <div class="img-item" v-for="(_, i) in showLen" :key="floders[i].filesId">
+        <div
+          class="img-item"
+          v-for="(_, i) in showLen"
+          :key="floders[i].filesId"
+          :style="{ '--rawLen': samLen }"
+        >
           <div class="img-item-content">
             <img :src="floders[i].filesUrl" @click="clickHandler(floders[i])" />
           </div>
@@ -20,7 +25,7 @@
     </ui-group-option>
   </ui-group>
 
-  <Tabs v-if="!emptyTabs" v-model:activeKey="activeTab">
+  <Tabs v-if="!emptyTabs" v-model:activeKey="activeTab" class="f-tabs">
     <template v-for="children in root.children">
       <TabPane
         :tab="children.title"
@@ -78,7 +83,7 @@ const children = computed(() => {
 });
 const len = computed(() => floders.value.length);
 const showAll = ref(false);
-const samLen = 3;
+const samLen = 6;
 const showLen = computed(() => (showAll.value ? len.value : Math.min(samLen, len.value)));
 const canAll = computed(() => len.value > samLen);
 </script>
@@ -89,8 +94,8 @@ const canAll = computed(() => len.value > samLen);
   flex-wrap: wrap;
 }
 .img-item {
-  width: 33.33%;
-  padding: 5px;
+  width: calc(100% / var(--rawLen));
+  padding-right: 5px;
   .img-item-content {
     padding-top: 56.25%;
     position: relative;
@@ -112,3 +117,12 @@ const canAll = computed(() => len.value > samLen);
   --swiper-navigation-size: 30px;
 }
 </style>
+
+<style>
+.f-tabs.ant-tabs-top > .ant-tabs-nav {
+  margin-bottom: 30px;
+}
+.f-tabs.ant-tabs-top > .ant-tabs-nav::before {
+  display: none !important;
+}
+</style>