tangning 2 månader sedan
förälder
incheckning
4903b7b68f
3 ändrade filer med 161 tillägg och 103 borttagningar
  1. 3 1
      src/core/player/Player.js
  2. 154 96
      src/view/case/records/index.vue
  3. 4 6
      src/view/material/index.vue

+ 3 - 1
src/core/player/Player.js

@@ -77,12 +77,13 @@ export default class Player {
     }
     //符号
     if (mode === 3) {
+      console.log("this.orthCamera", this.orthCamera);
       let pos = new THREE.Vector3(0, 0, -1);
       pos.unproject(this.orthCamera);
       pos.y = 5;
       const lastIndex = this.getLaSybIndex();
       this.symbolIndex = lastIndex + 1;
-
+      console.log("this.symbolIndex", this.symbolIndex);
       this.symbol = new CircleTextLabel(this.symbolIndex, pos);
       this.symbol.visible = false;
       this.scene.scene.add(this.symbol);
@@ -113,6 +114,7 @@ export default class Player {
       },
       { index: 0, point: [] }
     );
+    console.log("maxIndexObject", this.renderSymbols);
     return maxIndexObject.index;
   }
 

+ 154 - 96
src/view/case/records/index.vue

@@ -452,13 +452,17 @@
       align-center
       @close="recorderInfoDialogSelect = null"
     >
-    
-    <div class="border" style="    width: 500px;
-    height: 1px;
-    margin-bottom: 20px;
-    border-bottom: none;
-    position: relative;
-    left: -16px;"></div>
+      <div
+        class="border"
+        style="
+          width: 500px;
+          height: 1px;
+          margin-bottom: 20px;
+          border-bottom: none;
+          position: relative;
+          left: -16px;
+        "
+      ></div>
       <div style="width: 80%; margin: 30px auto">
         <el-select
           v-model="recorderInfoDialogSelect"
@@ -479,56 +483,106 @@
         </div>
       </template>
     </el-dialog>
-    
+
     <el-dialog
       v-model="aiImgShow"
       title="AI识别平面图"
       width="1300px"
       align-center
-      @close="aiImgData.result = null;"
+      @close="aiImgData.result = null"
     >
-    <div class="border" style="    width: 1300px;
-    height: 1px;
-    margin-bottom: 20px;
-    border-bottom: none;
-    position: relative;
-    left: -16px;"></div>
-      <div class="flex space-x-4 items-center content-center justify-center text-center">
-        <div class="flex-1" style="width: 80%;">
-        <el-select
-          v-model="aiImgData.src"
-          placeholder="请选择平面图"
-          :disabled="isOption"
-          style="display: block;"
-          size="large"
+      <div
+        class="border"
+        style="
+          width: 1300px;
+          height: 1px;
+          margin-bottom: 20px;
+          border-bottom: none;
+          position: relative;
+          left: -16px;
+        "
+      ></div>
+      <div
+        class="flex space-x-4 items-center content-center justify-center text-center"
+      >
+        <div class="flex-1" style="width: 80%">
+          <el-select
+            v-model="aiImgData.src"
+            placeholder="请选择平面图"
+            :disabled="isOption"
+            style="display: block"
+            size="large"
+          >
+            <el-option
+              v-for="item in aiImgData.list"
+              :key="item.num"
+              :label="item.title"
+              :value="item.url"
+            />
+          </el-select>
+          <div
+            class="viewImg mt-4 text-center"
+            style="
+              height: 400px;
+              line-height: 400px;
+              border-radius: 0px 0px 0px 0px;
+              border: 1px solid #d9d9d9;
+            "
+          >
+            <img
+              class="w-full h-full object-cover"
+              v-if="aiImgData.src"
+              :src="aiImgData.src"
+              alt=""
+            />
+            <span v-else>预览选中的平面图</span>
+          </div>
+        </div>
+        <div
+          class="flex-1 text-center content-start"
+          style="
+            border-radius: 0px 0px 0px 0px;
+            border: 1px solid #d9d9d9;
+            min-height: 450px;
+          "
         >
-          <el-option
-            v-for="item in aiImgData.list"
-            :key="item.num"
-            :label="item.title"
-            :value="item.url"
-          />
-        </el-select>
-        <div class="viewImg mt-4 text-center" style="height: 400px; line-height: 400px; border-radius: 0px 0px 0px 0px;
-border: 1px solid #D9D9D9;">
-          <img class="w-full h-full object-cover" v-if="aiImgData.src" :src="aiImgData.src" alt="" />
-          <span v-else>预览选中的平面图</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;
+              white-space: pre-wrap;
+            "
+            v-else
+            v-html="aiImgData.result"
+          ></div>
         </div>
       </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-else-if="!aiImgData.result">请点击【识别】获取结果</span>
-        <div class="text-left" style="height: 450px;padding: 10px; overflow: auto;white-space: pre-wrap" v-else v-html="aiImgData.result"></div>
-      </div>
-      </div>
       <template #footer>
         <div class="dialog-footer text-center flex">
           <div style="width: 50%">
-            <el-button type="primary" :disabled="isOption || !aiImgData.src || aiImgData.loading" @click="handleAI"> 识别 </el-button>
+            <el-button
+              type="primary"
+              :disabled="isOption || !aiImgData.src || aiImgData.loading"
+              @click="handleAI"
+            >
+              识别
+            </el-button>
           </div>
           <div style="width: 50%">
-            <el-button :disabled="isOption || !aiImgData.result" @click="handleCopy"> 复制 </el-button>
+            <el-button
+              :disabled="isOption || !aiImgData.result"
+              @click="handleCopy"
+            >
+              复制
+            </el-button>
           </div>
         </div>
       </template>
@@ -559,14 +613,14 @@ console.log("router.currentRoute", router.currentRoute.value?.params);
 const fileId = computed(() => router.currentRoute.value?.params?.fileId);
 const caseId = computed(() => router.currentRoute.value?.params?.caseId);
 const isDisableExport = ref(false);
-const aiImgShow = ref(false)
+const aiImgShow = ref(false);
 const isOption = ref(false);
 const aiImgData = ref({
-  src: '',
+  src: "",
   result: ``,
   loading: false,
   list: [],
-})
+});
 
 const data = reactive({
   title: "",
@@ -607,11 +661,14 @@ const data = reactive({
     unit: "",
     job: "",
   }, //现场勘验指挥人
-  inquestSituation: "案发现场以XXX小区为中心,东侧为XXX路,西侧是XXX街,北侧为XXX路,南侧是XXX路。", //现场勘验情况
+  inquestSituation:
+    "案发现场以XXX小区为中心,东侧为XXX路,西侧是XXX街,北侧为XXX路,南侧是XXX路。", //现场勘验情况
   imageNum: 0, //现场勘验制图数量
   photographNum: 0, //照相数量
   photographyMinNum: 0, //摄影数量
   photographySecNum: 0, //摄影数量
+  recordingMinNum: "",
+  recordingSecNum: "",
   recorderInfo: JSON.parse(JSON.stringify(recorderInfoType)),
   signatureInfo: [], //现场勘验人员
   witnessInfo: [],
@@ -637,6 +694,7 @@ const initInfo = async (inquestFileId) => {
       }
     }
   }
+  console.log("data", data, res.data);
   setTimeout(() => {
     initSignatureAndWitInfo();
   }, 500);
@@ -644,59 +702,61 @@ const initInfo = async (inquestFileId) => {
 const handleCopy = () => {
   copyTextToClipboard(aiImgData.value.result);
   ElMessage.success("复制成功!");
-}
+};
 const handleShowAi = async () => {
-  const list = await getFloorList(caseId.value)
+  const list = await getFloorList(caseId.value);
   aiImgData.value.list = list.filter((i) => i.url);
-  aiImgData.value.src = aiImgData.value.src?aiImgData.value.src:list[0]?.url;
+  aiImgData.value.src = aiImgData.value.src
+    ? aiImgData.value.src
+    : list[0]?.url;
   aiImgData.value.loading = false;
   aiImgShow.value = true;
   isOption.value = false;
-}
+};
 //判断是否deepseek
 let isThink = ref(false);
 let testRegex = /deepseek/;
 const handleAI = async () => {
   aiImgData.value.loading = true;
-  aiImgData.value.result = '';
+  aiImgData.value.result = "";
   isOption.value = true;
-  const item = aiImgData.value.list.find(i => i.url == aiImgData.value.src)
+  const item = aiImgData.value.list.find((i) => i.url == aiImgData.value.src);
   try {
-  // const res = await getAiByImage({imageUrl: imageUrl})
-  chat('', item.params + item.paramContent).then(async stream => {
-    if(!aiImgShow.value){
-      abort()
-    }
-    for await (const part of stream) {
+    // const res = await getAiByImage({imageUrl: imageUrl})
+    chat("", item.params + item.paramContent).then(async (stream) => {
+      if (!aiImgShow.value) {
+        abort();
+      }
+      for await (const part of stream) {
         // chatHistory.value.at(idx).text += part.message.content;
         let tep_mesg = part.message.content;
         console.log("isThinktep", tep_mesg);
         //判断是否是deepseek模型
         // if (testRegex.test(agentInfo.value.model)) {
-          if (tep_mesg == "\u003c/think\u003e") {
-            // isThink.value = true;
-            aiImgData.value.loading = false;
-          }
-          if (!aiImgData.value.loading) {
-            //清除think
-            if (
-              tep_mesg == "\u003cthink\u003e" ||
-              tep_mesg == "\u003c/think\u003e"
-            ) {
-              // chatHistory.value.at(idx).think += "";
-            } else {
-              console.log("isThinktep_mesg", tep_mesg);
-              aiImgData.value.result += tep_mesg;
-              // chatHistory.value.at(idx).think += tep_mesg;
-            }
-            //如果结尾标签则停止拼接
-            if (tep_mesg == "\u003c/think\u003e") {
-              // isThink.value = false;
-            }
+        if (tep_mesg == "\u003c/think\u003e") {
+          // isThink.value = true;
+          aiImgData.value.loading = false;
+        }
+        if (!aiImgData.value.loading) {
+          //清除think
+          if (
+            tep_mesg == "\u003cthink\u003e" ||
+            tep_mesg == "\u003c/think\u003e"
+          ) {
+            // chatHistory.value.at(idx).think += "";
           } else {
-            // aiImgData.value.result += tep_mesg;
-            // chatHistory.value.at(idx).text += tep_mesg;
+            console.log("isThinktep_mesg", tep_mesg);
+            aiImgData.value.result += tep_mesg;
+            // chatHistory.value.at(idx).think += tep_mesg;
+          }
+          //如果结尾标签则停止拼接
+          if (tep_mesg == "\u003c/think\u003e") {
+            // isThink.value = false;
           }
+        } else {
+          // aiImgData.value.result += tep_mesg;
+          // chatHistory.value.at(idx).text += tep_mesg;
+        }
         // } else {
         //   // chatHistory.value.at(idx).text += tep_mesg;
         //   aiImgData.value.result += tep_mesg;
@@ -704,16 +764,15 @@ const handleAI = async () => {
         // autoScrollSwitch.value && scrollToBottom(true);
       }
       isOption.value = false;
-      console.log("handleAI完成", aiImgData.value.result)
-  })
-  // console.log("handleAI", res)
-  // aiImgData.value.result = res
-  // aiImgData.value.loading = false
+      console.log("handleAI完成", aiImgData.value.result);
+    });
+    // console.log("handleAI", res)
+    // aiImgData.value.result = res
+    // aiImgData.value.loading = false
   } catch (error) {
-  console.log("handleAI", error)
-  aiImgData.value.loading = false;
+    console.log("handleAI", error);
+    aiImgData.value.loading = false;
   }
-
 };
 const initSignatureAndWitInfo = () => {
   (data.recorderInfo.length === 0 || !data.recorderInfo) &&
@@ -738,9 +797,9 @@ const initSignatureAndWitInfo = () => {
 };
 
 onMounted(() => {
-  listModels().then(res => {
-    console.log("listModels", res)
-    })
+  listModels().then((res) => {
+    console.log("listModels", res);
+  });
   initInfo();
 });
 
@@ -833,10 +892,9 @@ const handleExport = async () => {
 </script>
 
 <style lang="scss">
-
-.el-popper{
-    max-width: 100% !important;
-  }
+.el-popper {
+  max-width: 100% !important;
+}
 .records {
   max-width: 1280px;
   margin: 0 auto;

+ 4 - 6
src/view/material/index.vue

@@ -174,19 +174,17 @@ const getcaseByCaseIdList = async () =>{
   let fwt = await getcaseByCaseId(caseId.value)
 
     list.value.pmt = pmt.map(ele =>{
-      let mapUrl = ele.mapUrl,
-      cover = ele.cover && JSON.parse(ele.cover) || {}
+      let mapUrl = ele.mapUrl || ele.listCover
       return {
         ...ele,
-        mapUrl: mapUrl || cover.url
+        mapUrl: mapUrl,
       }
     })
     list.value.fwt = fwt.map(ele =>{
-      let mapUrl = ele.mapUrl,
-      cover = ele.cover && JSON.parse(ele.cover) || {}
+      let mapUrl = ele.mapUrl || ele.listCover
       return {
         ...ele,
-        mapUrl: mapUrl || cover.url
+        mapUrl: mapUrl,
       }
     })
   //   console.log('getcaseByCaseId', res)