tangning 7 ヶ月 前
コミット
fd4b1024f1

+ 1 - 1
src/components/viewImg/index.vue

@@ -148,7 +148,7 @@ watchEffect(() => {
   if (props.list.length) {
     console.log(props.list, "watchEffect");
     let newlist = props.list.map(item => item.filesUrl || item.fileUrl);
-    initFileList.value = newlist;
+    initFileList.value = newlist.filter(item => item.type == 1);
   }
 });
 

+ 25 - 15
src/view/case/records/index.vue

@@ -1,8 +1,10 @@
 <template>
   <div class="records">
-    <div class="header" style="flex-direction: row-reverse;">
-      <el-button  @click="backPageHandler">返回</el-button>
-      <el-button style="margin: 0px 10px" type="primary" @click="handleSave">保存</el-button>
+    <div class="header" style="flex-direction: row-reverse">
+      <el-button @click="backPageHandler">返回</el-button>
+      <el-button style="margin: 0px 10px" type="primary" @click="handleSave"
+        >保存</el-button
+      >
       <el-button :disabled="isDisableExport" @click="handleExport"
         >导出</el-button
       >
@@ -10,7 +12,7 @@
     <h3 class="title">现 场 勘 验 笔 录</h3>
 
     <div class="content">
-        <div class="line" style="flex-direction: row-reverse;">
+      <div class="line" style="flex-direction: row-reverse">
         <el-input
           class="input"
           v-model="data.inquestNum"
@@ -48,6 +50,7 @@
             v-model="data.inquestTime"
             type="datetime"
             placeholder="勘验时间"
+            value-format="YYYY-MM-DD HH:mm:ss"
             style="width: 200px"
           />
         </div>
@@ -183,7 +186,7 @@
           class="input"
           v-model="data.weatherInfo.humidity"
           style="width: 80px"
-          /><span>%</span>
+        /><span>%</span>
         <span style="margin-left: 20px; font-size: 12px">风向: &nbsp;</span>
         <el-input
           class="input"
@@ -469,7 +472,7 @@
   </div>
 </template>
 <script setup>
-import { onMounted, ref, watch, h, computed  } from "vue";
+import { onMounted, ref, watch, h, computed } from "vue";
 import { reactive } from "vue";
 import { router, RouteName } from "@/router";
 import {
@@ -484,7 +487,7 @@ import { CirclePlus, CircleClose } from "@element-plus/icons-vue";
 import { recorderInfoType, ChangeReasonType } from "./formData.ts";
 import { confirm } from "@/helper/message";
 const props = defineProps({ caseId: Number, title: String });
-console.log('router.currentRoute', router.currentRoute.value?.params);
+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);
@@ -501,7 +504,8 @@ const data = reactive({
   times: [], // startTime ,endTime
   address: "", // 勘验地址
   inquestTime: "", //勘验时间
-  inquestResource: "报警人:xxx(性别:xxx 电话:xxx)报警称:xxx发生一起:xxx案,现场需勘察。接报后技术科科长:xxx带领技术员:xxx、法医:xxx立即赶赴现场进行勘察.", //勘验范围
+  inquestResource:
+    "报警人:xxx(性别:xxx 电话:xxx)报警称:xxx发生一起:xxx案,现场需勘察。接报后技术科科长:xxx带领技术员:xxx、法医:xxx立即赶赴现场进行勘察.", //勘验范围
   protector: {
     name: "",
     unit: "",
@@ -542,7 +546,7 @@ const recorderInfoDialogShow = ref(false);
 const recorderInfoDialogSelect = ref();
 const initInfo = async (inquestFileId) => {
   const res = await getCaseInquestInfoOld(inquestFileId || fileId.value);
-  console.log('initInfo',res);
+  console.log("initInfo", res);
   if (!res.data) {
     isDisableExport.value = true;
   } else {
@@ -587,12 +591,19 @@ onMounted(() => {
 });
 
 const addRecorderInfo = () => {
+  console.log("recorderInfoDialogSelect", recorderInfoType);
   recorderInfoDialogShow.value = false;
   if (recorderInfoDialogSelect.value) {
     const newCrew = recorderInfoType.find(
       (i) => i.type === recorderInfoDialogSelect.value
     );
-    data.recorderInfo.push(newCrew);
+    console.log("recorderInfoDialogSelect", newCrew);
+    data.recorderInfo.push({
+      ...newCrew,
+      job: "",
+      name: "",
+      unit: "",
+    });
     // debugger;
   }
 };
@@ -643,24 +654,24 @@ const handleSave = async () => {
       }
     }
   }
-  let inquestFileId = fileId.value == -1 ? '' : fileId.value;
+  let inquestFileId = fileId.value == -1 ? "" : fileId.value;
   let params = { ...data, caseId: caseId.value, inquestFileId };
   const res = await saveCaseInquestInfo(params);
   initInfo(res.data.inquestFileId);
   console.log("saveCaseInquestInfo", res);
-  if(fileId.value == -1){
+  if (fileId.value == -1) {
     router.replace({
       name: RouteName.records,
       params: { caseId: caseId.value, fileId: res.data?.inquestFileId },
     });
-    return
+    return;
   }
   if (res.code === 0) {
     ElMessage.success("保存成功!");
   }
 };
 const handleExport = async () => {
-  let inquestFileId = fileId.value == -1 ? '' : fileId.value;
+  let inquestFileId = fileId.value == -1 ? "" : fileId.value;
   let params = { ...data, caseId: caseId.value, inquestFileId };
   await saveCaseInquestInfo(params);
   const res = await exportCaseInquestInfo(fileId.value);
@@ -683,7 +694,6 @@ const handleExport = async () => {
     top: 10px;
     z-index: 1000;
     background-color: white;
-
   }
 
   .input {

+ 4 - 4
src/view/vrmodel/index.vue

@@ -91,10 +91,10 @@ async function submitForm() {
 }
 
 async function handleAdd() {
-  if(isEdit.value){
-    await confirm("请先保存当前移除的场景信息!")
-    return
-  }
+  // if(isEdit.value){
+  //   await confirm("请先保存当前移除的场景信息!")
+  //   return
+  // }
   let numList = list.value.map((item) => item.num);
   console.log("handleAdd", numList);
   let val = await tableModelScene({numList: numList});