1
0
tangning 4 kuukautta sitten
vanhempi
commit
455dab71b2

+ 4 - 1
src/request/index.ts

@@ -92,7 +92,10 @@ axios.interceptors.request.use(async (config) => {
     config.data = fromData;
     config.headers["Content-Type"] = "multipart/form-data";
   }
-
+  console.log("config", config);
+  if (config.url === "/fusion/ai/getByImage") {
+    return config;
+  }
   openLoading(config.url);
   return config;
 });

+ 9 - 1
src/view/case/draw/selectMapImage.vue

@@ -88,6 +88,7 @@ type MapInfo = {
 // const layer = L.tileLayer('http://a.map.jms.gd/tile/osm/{z}/{x}/{y}.png') //内置地图
 // const layer = L.tileLayer('http://wprd04.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=6&x={x}&y={y}&z={z}&token=YOUR_API_KEY')
 const props = defineProps<{ mapId: number }>();
+const route = router.currentRoute.value;
 
 const mapOptions = ref([]);
 var baseLayers = {};
@@ -127,7 +128,14 @@ onMounted(async () => {
   // return {...ele, layer: L.tileLayer(ele.url)}
   // })
   // mapOptions.value = layerList
-  caseInfoData.value = await getCaseInfo(caseId.value);
+  if(route.name == 'drawShareFile'){
+    caseInfoData.value = {
+      mapId: 1,
+      mapUrl: '//wprd04.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}&layer=6&token=YOUR_API_KEY'
+    }
+  }else{
+    caseInfoData.value = await getCaseInfo(caseId.value);
+  }
   mapName.value.mapId = caseInfoData.value.mapId;
   mapName.value.mapUrl = caseInfoData.value.mapUrl;
   const layer = L.tileLayer(

+ 6 - 3
src/view/case/draw/slider.vue

@@ -3,8 +3,8 @@
     <h3>{{ fileDesc[type] }}</h3>
     <div class="def-image-set">
       <el-button type="primary" @click="emit('trackImage')" ghost>
-        设置{{ fileDesc[type] }}</el-button
-      >
+        {{ route.name == 'drawShareFile'?'方位图': `设置${fileDesc[type]}` }}
+      </el-button>
       <el-upload
         :multiple="false"
         :limit="1"
@@ -23,7 +23,7 @@
           :class="{ dispable: cover.percentage }"
           :style="{ width: '100%' }"
         >
-          {{ cover.percentage ? "文件上传中" : "上传" + fileDesc[type] }}
+          {{ cover.percentage ? "文件上传中" : route.name == 'drawShareFile'?'上传':("上传" + fileDesc[type]) }}
         </el-button>
       </el-upload>
     </div>
@@ -87,6 +87,7 @@ import { coverImageSize } from "@/util/image-rotate";
 import { uploadFile } from "@/store/system";
 import { ElMessage } from "element-plus";
 import { confirm } from "@/helper/message";
+import { router } from "@/router";
 
 const props = defineProps<{
   type: BoardType;
@@ -94,6 +95,8 @@ const props = defineProps<{
   addShape: MetaShapeType | null;
 }>();
 
+const route = router.currentRoute.value;
+
 const fileDesc = {
   [BoardType.scene]: "户型图",
   [BoardType.map]: "方位图",

+ 1 - 1
src/view/case/records/index.vue

@@ -515,7 +515,7 @@ border: 1px solid #D9D9D9;">
       </div>
       <div class="flex-1 text-center content-start" style="border-radius: 0px 0px 0px 0px;
 border: 1px solid #D9D9D9;min-height: 450px">
-        <span style="line-height: 450px" v-if="aiImgData.loading">识别中</span>
+        <span style="line-height: 450px" v-if="aiImgData.loading">思考中</span>
         <span style="line-height: 450px" v-else-if="!aiImgData.result">请点击【识别】获取结果</span>
         <div class="text-left" style="height: 450px;padding: 10px; overflow: auto;" v-else v-html="aiImgData.result"></div>
       </div>

+ 3 - 3
src/view/material/index.vue

@@ -4,19 +4,19 @@
       <el-tab-pane label="现场图" name="1">
         <div class="xct">
           <el-button
-            style="width: calc(50% - 7px)"
+            class="w-full mt-4"
             type="primary"
             @click="gotoDraw(BoardType.scene, -1)"
           >
             绘制平面图
           </el-button>
-          <el-button
+          <!-- <el-button
             style="width: calc(50% - 6px)"
             type="primary"
             @click="handleAiItem"
           >
             AI 平面图
-          </el-button>
+          </el-button> -->
           <el-button
             class="w-full mt-4"
             style="margin-left: 0"