Browse Source

feat: save

gemercheung 10 months ago
parent
commit
9de7d2edb5
1 changed files with 28 additions and 15 deletions
  1. 28 15
      src/view/case/records/index.vue

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

@@ -50,14 +50,14 @@
         <span>绘 图 人 :</span>
         <el-input
           class="input"
-          v-model="data.sendDept"
+          v-model="data.painter"
           placeholder=""
           style="width: 120px"
         />
         <span>照 相 人 :</span>
         <el-input
           class="input"
-          v-model="data.sendDept"
+          v-model="data.photographer"
           placeholder=""
           style="width: 120px"
         />
@@ -387,7 +387,11 @@
             placeholder=""
             style="width: 200px"
           />
-          <el-button link class="del-btn" type="danger" @click="removeRecorderInfo(index)"
+          <el-button
+            link
+            class="del-btn"
+            type="danger"
+            @click="removeRecorderInfo(index)"
             ><el-icon :size="18"><CircleClose /> </el-icon>
           </el-button>
         </div>
@@ -420,7 +424,11 @@
             placeholder=""
             style="width: 200px"
           />
-          <el-button class="del-btn" link type="danger" @click="removeSignatureInfo(index)"
+          <el-button
+            class="del-btn"
+            link
+            type="danger"
+            @click="removeSignatureInfo(index)"
             ><el-icon :size="18"><CircleClose /> </el-icon>
           </el-button>
         </div>
@@ -470,7 +478,11 @@
             placeholder=""
             style="width: 260px"
           />
-          <el-button link class="del-btn" type="danger" @click="removeWitnessInfo(index)"
+          <el-button
+            link
+            class="del-btn"
+            type="danger"
+            @click="removeWitnessInfo(index)"
             ><el-icon :size="18"><CircleClose /> </el-icon>
           </el-button>
         </div>
@@ -576,12 +588,13 @@ const data = reactive({
   photographySecNum: 0, //摄影数量
   recorderInfo: [...recorderInfoType, recorderInfoType[4]],
   signatureInfo: [], //现场勘验人员
-  signatureInfoNum: 4,
+
   witnessInfo: [],
-  witnessInfoNum: 2,
+
   remark: [],
 });
-
+const signatureInfoNum = 4;
+const witnessInfoNum = 2;
 const recorderInfoDialogShow = ref(false);
 const recorderInfoDialogSelect = ref();
 const initInfo = async () => {
@@ -601,14 +614,14 @@ const initInfo = async () => {
 };
 const initSignatureAndWitInfo = () => {
   data.signatureInfo.length === 0 &&
-    Array.from(new Array(data.signatureInfoNum)).forEach(() => {
+    Array.from(new Array(signatureInfoNum)).forEach(() => {
       data.signatureInfo.push({
         unit: "",
         job: "",
       });
     });
   data.witnessInfo.length === 0 &&
-    Array.from(new Array(data.witnessInfoNum)).forEach(() => {
+    Array.from(new Array(witnessInfoNum)).forEach(() => {
       data.witnessInfo.push({
         sex: 0,
         birthday: "",
@@ -668,11 +681,11 @@ const removeWitnessInfo = async (index) => {
 
 const handleSave = async () => {
   console.log("data", data);
-  const res = await saveCaseInquestInfo(props.caseId, data);
-  if (res.code === 0) {
-    ElMessage.success("保存成功!");
-    initInfo();
-  }
+  // const res = await saveCaseInquestInfo(props.caseId, data);
+  // if (res.code === 0) {
+  //   ElMessage.success("保存成功!");
+  //   initInfo();
+  // }
 };
 const handleExport = async () => {
   await saveCaseInquestInfo(props.caseId, data);