فهرست منبع

Merge branch 'local' of http://192.168.0.115:3000/bill/fuse-code into local

xzw 2 سال پیش
والد
کامیت
d4a4e16c01
5فایلهای تغییر یافته به همراه24 افزوده شده و 18 حذف شده
  1. 1 1
      src/api/constant.ts
  2. 7 3
      src/api/model.ts
  3. 3 1
      src/api/tagging-style.ts
  4. 1 1
      src/layout/model-list/sign.vue
  5. 12 12
      vite.config.ts

+ 1 - 1
src/api/constant.ts

@@ -43,5 +43,5 @@ export const UPDATE_GUIDE = `/laser/fusionGuide/${params.m}/edit`
 export const DELETE_GUIDE = `/laser/fusionGuide/${params.m}/delete`
 
 
-// 文件上传
+// 文件上传 不鉴权文件上传
 export const UPLOAD_FILE = `/laser/oss/${params.m}/fuse-code/upload/fire`

+ 7 - 3
src/api/model.ts

@@ -12,7 +12,8 @@ export enum ModelType {
   SWKJ = 'swkj',
   SWMX = 'glb',
   SWSS = 'laser',
-  OSGB = 'obsg'
+  OSGB = 'obsg',
+  B3DM = 'b3dm'
 }
 
 export const ModelTypeDesc: Record<ModelType, string>  = {
@@ -20,7 +21,8 @@ export const ModelTypeDesc: Record<ModelType, string>  = {
   [ModelType.SWKJ]: '四维看见',
   [ModelType.SWSS]: '四维深时',
   [ModelType.SWMX]: '三维模型',
-  [ModelType.OSGB]: 'osgb模型'
+  [ModelType.OSGB]: 'osgb模型',
+  [ModelType.B3DM]: 'b3dm模型'
 }
 
 export interface ModelAttrs {
@@ -37,6 +39,7 @@ export interface Model extends ModelAttrs {
   title: string
   fusionId?: number,
   type: ModelType
+  isSelf: boolean
   size: number,
   time: string
 }
@@ -64,6 +67,7 @@ const serviceToLocal = (serviceModel: ServiceModel): Model => ({
   show: !serviceModel.hide,
   scale: serviceModel.transform.scale[0],
   opacity: serviceModel.opacity || 1,
+  isSelf: serviceModel.type !== 3,
   bottom: serviceModel.bottom || 0,
   position: serviceModel.transform.position,
   rotation: serviceModel.transform.rotation,
@@ -71,7 +75,7 @@ const serviceToLocal = (serviceModel: ServiceModel): Model => ({
   url: serviceModel.modelUrl,
   title: serviceModel.modelTitle,
   fusionId: serviceModel.fusionId,
-  type:  serviceModel.modelDateType === 'osgb' ? ModelType.OSGB : serviceModel.type === 2 ? ModelType.SWMX : ModelType.SWMX,
+  type:  (serviceModel.modelDateType === 'b3dm' || serviceModel.modelDateType === 'osgb') ? ModelType.OSGB : serviceModel.type === 2 ? ModelType.SWMX : ModelType.SWMX,
   size: serviceModel.modelSize,
   time: serviceModel.createTime
 })

+ 3 - 1
src/api/tagging-style.ts

@@ -1,6 +1,7 @@
 import axios from './instance'
 import { TAGGING_LIST } from './constant'
 import { fetchTaggings } from './tagging'
+import { params } from '@/env'
 
 export interface TaggingStyle {
   id: string
@@ -13,10 +14,11 @@ export type TaggingStyles = TaggingStyle[]
 
 export const getTaggingStyles = async () => {
   // axios.post<TaggingStyles>(TAGGING_LIST)
+  
   return [
     {
       id: '1', 
-      icon: 'static/img_default/lQLPDhrvVzvNvTswMLAOU-UNqYnnZQG1YPJUwLwA_48_48.png',
+      icon: params.baseURL + '/profile/static/img_default/lQLPDhrvVzvNvTswMLAOU-UNqYnnZQG1YPJUwLwA_48_48.png',
       name: '111',
       default: true
     }

+ 1 - 1
src/layout/model-list/sign.vue

@@ -4,7 +4,7 @@
     <div class="model-action" @click.stop>
       <ui-input type="checkbox" v-model="show" :class="{disabled: model.error}"/>
       <ui-icon 
-        v-if="custom.modelsChangeStore && model.type !== ModelType.SWSS"
+        v-if="custom.modelsChangeStore && model.type !== ModelType.SWSS && !model.isSelf"
         type="del" 
         ctrl 
         @click="$emit('delete')" 

+ 12 - 12
vite.config.ts

@@ -28,16 +28,16 @@ export default defineConfig({
       }
     ]
   },
-  server: {
-    host: '0.0.0.0',
-    port: 5173,
-    open: true,
-    proxy: {
-      '/api': {
-        target: 'http://192.168.0.152:8088/',
-        changeOrigin: true,
-        rewrite: path => path.replace(/^\/api/, '')
-      }
-    }
-  }
+  // server: {
+  //   host: '0.0.0.0',
+  //   port: 5173,
+  //   open: true,
+  //   proxy: {
+  //     '/api': {
+  //       target: 'http://192.168.0.152:8088/',
+  //       changeOrigin: true,
+  //       rewrite: path => path.replace(/^\/api/, '')
+  //     }
+  //   }
+  // }
 })