소스 검색

fix: 修改bug

bill 2 년 전
부모
커밋
e9a8eaa168
3개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 0 1
      src/views/graphic/data.ts
  2. 2 0
      src/views/graphic/header.vue
  3. 1 1
      src/views/roads/tabulation.vue

+ 0 - 1
src/views/graphic/data.ts

@@ -19,7 +19,6 @@ export const useData = () => {
       if (trackMode.value) {
         return;
       }
-      console.error("reload data");
       if (!params.action) {
         data.value = null;
       } else if (params.action === "add") {

+ 2 - 0
src/views/graphic/header.vue

@@ -164,11 +164,13 @@ const saveStore = genUseLoading(async () => {
   newData.url = await uploadImage(blob);
   const origin = isRoad.value ? roadPhotos.value : accidentPhotos.value;
   const index = origin.indexOf(data.value);
+  console.log(origin, data.value, index);
   if (~index) {
     origin[index] = newData;
   } else {
     origin.push(newData);
   }
+  data.value = newData;
 });
 
 const saveHandler = async () => {

+ 1 - 1
src/views/roads/tabulation.vue

@@ -2,7 +2,7 @@
   <MainPanel>
     <template v-slot:header>
       <Header title="现场绘图 | 制表" :on-back="onBack" type="return">
-        <ui-button type="primary" @click="saveHandler" width="96px"> 保存 </ui-button>
+        <ui-button type="primary" @click="saveHandler" width="96px"> 完成 </ui-button>
       </Header>
     </template>