Explorar el Código

Merge branch 'dev' of http://192.168.0.115:3000/bill/traffic-laser into dev

jinx hace 1 año
padre
commit
7e5288fa45
Se han modificado 2 ficheros con 48 adiciones y 13 borrados
  1. 3 3
      src/main.ts
  2. 45 10
      src/views/scene/index.vue

+ 3 - 3
src/main.ts

@@ -1,9 +1,9 @@
 import VConsole from "vconsole";
 import { useParams } from "@/hook/useParams";
 
-if (useParams().console === "true") {
-  new VConsole();
-}
+// if (useParams().console === "true") {
+new VConsole();
+// }
 
 import "@/assets/theme.editor.scss";
 import "@/assets/public.scss";

+ 45 - 10
src/views/scene/index.vue

@@ -3,7 +3,13 @@
     <template v-slot:header>
       <div class="photos-header">
         <div class="left">
-          <ui-icon class="back-icon" type="return" ctrl style="margin-right: 10px" @click="back" />
+          <ui-icon
+            class="back-icon"
+            type="return"
+            ctrl
+            style="margin-right: 10px"
+            @click="back"
+          />
           <span> 案件 </span>
         </div>
       </div>
@@ -14,15 +20,28 @@
         <div class="info-top-left" :class="{ full: viewStatus }">
           <Container @loaded="loaded = true" />
           <template v-if="loaded && !trackMode">
-            <Menus v-if="viewStatus" @active="(data) => (activeMenuKeys = data)" @enter-child="childPage = true" @leave-child="childPage = false" />
+            <Menus
+              v-if="viewStatus"
+              @active="(data) => (activeMenuKeys = data)"
+              @enter-child="childPage = true"
+              @leave-child="childPage = false"
+            />
             <!-- v-if="currentView" -->
             <BasePoints />
             <FixPoints />
             <Measures />
             <Photo />
-            <Range v-if="activeMenuKeys[0] === 'range'" :rangeKey="activeMenuKeys.slice(1).join(':')" />
+            <Range
+              v-if="activeMenuKeys[0] === 'range'"
+              :rangeKey="activeMenuKeys.slice(1).join(':')"
+            />
             <!-- <ButtonPane class="back fun-ctrl" size="48" @click="router.push('/scene')" v-if="!childPage"> -->
-            <ButtonPane class="back fun-ctrl" :size="viewStatus ? 64 : 48" @click="onScale" v-if="!childPage">
+            <ButtonPane
+              class="back fun-ctrl"
+              :size="viewStatus ? 64 : 48"
+              @click="onScale"
+              v-if="!childPage"
+            >
               <ui-icon :type="viewStatus ? 'screen_c' : 'screen_f'" class="icon" />
             </ButtonPane>
             <Mode />
@@ -43,12 +62,24 @@
           </div>
           <div class="text-item">
             <p>事故描述:</p>
-            <textarea class="info-textarea" v-model="sceneInfo.accidentDesc" @input="inputHandler"></textarea>
+            <textarea
+              class="info-textarea"
+              v-model="sceneInfo.accidentDesc"
+              @input="inputHandler"
+            ></textarea>
           </div>
           <div class="info-btn">
-            <div class="right-btn" @click="router.push('/roads?back=1')">现场绘图({{ sceneSortPhotos.length }})</div>
-            <!-- <div class="right-btn" @click="router.push('/accidents?back=1')">事故照片({{ accodentSortPhotos.length }})</div> -->
-            <div class="right-btn" @click="router.push('/accidents?back=1')">事故照片({{ sortPhotos.length }})</div>
+            <div
+              class="right-btn"
+              @click="
+                router.push({ name: writeRouteName.roads, params: { type: 'table' } })
+              "
+            >
+              现场绘图({{ sceneSortPhotos.length }})
+            </div>
+            <div class="right-btn" @click="router.push('/accidents?back=1')">
+              事故照片({{ accodentSortPhotos.length }})
+            </div>
           </div>
         </div>
       </div>
@@ -80,7 +111,7 @@ import { ref, watchEffect, computed, onMounted, onActivated, nextTick } from "vu
 import { back } from "@/store/sync";
 import { trackMode } from "@/views/scene/trackMeasureWidth";
 import { currentView } from "./currentScene";
-import { router } from "@/router";
+import { router, writeRouteName } from "@/router";
 import { roadPhotos } from "@/store/roadPhotos";
 import { types, accidentPhotos } from "@/store/accidentPhotos";
 import { debounce } from "@/utils";
@@ -101,7 +132,11 @@ const enum TypeEnum {
   Table,
 }
 const currentType = ref(TypeEnum.Draw);
-const sceneSortPhotos = computed(() => roadPhotos.value.filter((item) => (currentType.value === TypeEnum.Draw ? !item.table : !!item.table)).reverse());
+const sceneSortPhotos = computed(() =>
+  roadPhotos.value
+    .filter((item) => (currentType.value === TypeEnum.Draw ? !item.table : !!item.table))
+    .reverse()
+);
 
 const loaded = ref(false);
 const childPage = ref(false);