|
@@ -31,19 +31,19 @@
|
|
|
<div class="info-top-right" :class="{ full: viewStatus }">
|
|
|
<div class="input-item">
|
|
|
<p>事故时间:</p>
|
|
|
- <input type="text" />
|
|
|
+ <input type="text" v-model="sceneInfo.accidentTime" @input="inputHandler" />
|
|
|
</div>
|
|
|
<div class="input-item">
|
|
|
<p>天气:</p>
|
|
|
- <input type="text" />
|
|
|
+ <input type="text" v-model="sceneInfo.weather" @input="inputHandler" />
|
|
|
</div>
|
|
|
<div class="input-item">
|
|
|
<p>地点:</p>
|
|
|
- <input type="text" />
|
|
|
+ <input type="text" v-model="sceneInfo.address" @input="inputHandler" />
|
|
|
</div>
|
|
|
<div class="text-item">
|
|
|
<p>事故描述:</p>
|
|
|
- <textarea class="info-textarea"></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>
|
|
@@ -82,7 +82,8 @@ import { currentView } from "./currentScene";
|
|
|
import { router } from "@/router";
|
|
|
import { roadPhotos } from "@/store/roadPhotos";
|
|
|
import { types, accidentPhotos } from "@/store/accidentPhotos";
|
|
|
-
|
|
|
+import { debounce } from "@/utils";
|
|
|
+import { tables } from "@/store/tables";
|
|
|
const layoutRef = ref(null);
|
|
|
const activeMenuKeys = ref<string[]>([]);
|
|
|
const accodentSortPhotos = computed(() => {
|
|
@@ -107,6 +108,16 @@ const stopReg = watchEffect(() => {
|
|
|
disabledMap.measure = false;
|
|
|
}
|
|
|
});
|
|
|
+const sceneInfo = ref({
|
|
|
+ accidentTime: "",
|
|
|
+ weather: "",
|
|
|
+ address: "",
|
|
|
+ accidentDesc: "",
|
|
|
+});
|
|
|
+const inputHandler = debounce(() => {
|
|
|
+ console.error(1);
|
|
|
+ tables.value["sceneInfo"] = sceneInfo.value;
|
|
|
+}, 300);
|
|
|
const viewStatus = ref(false);
|
|
|
const onScale = () => {
|
|
|
viewStatus.value = !viewStatus.value;
|
|
@@ -166,6 +177,10 @@ onMounted(() => {
|
|
|
var screenHeight = document.body.clientHeight;
|
|
|
layoutRef.value.style.height = screenHeight + "px";
|
|
|
document.body.style.height = screenHeight + "px";
|
|
|
+
|
|
|
+ if (tables.value && tables.value["sceneInfo"]) {
|
|
|
+ sceneInfo.value = tables.value["sceneInfo"];
|
|
|
+ }
|
|
|
});
|
|
|
onActivated(async () => {
|
|
|
await nextTick();
|