From 5d61e3ea816a74f4491276e2d73cca2e42af3b10 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 17 二月 2025 10:55:18 +0800
Subject: [PATCH] 文件档案第二次添加附件报错

---
 src/components/do/a6-device/check-and-accept.vue | 1013 ++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 888 insertions(+), 125 deletions(-)

diff --git a/src/components/do/a6-device/check-and-accept.vue b/src/components/do/a6-device/check-and-accept.vue
index 2fc1fd5..d8f5350 100644
--- a/src/components/do/a6-device/check-and-accept.vue
+++ b/src/components/do/a6-device/check-and-accept.vue
@@ -1,147 +1,900 @@
+<!-- 璁惧楠屾敹 -->
 <template>
   <div>
     <div class="search">
       <div class="search_thing">
-        <div class="search_label">鍏抽敭瀛楋細</div>
-        <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
-            v-model="value" @keyup.enter.native="refreshTable()"></el-input></div>
+        <div class="search_label">娴佺▼缂栧彿锛�</div>
+        <div class="search_input"><el-input v-model="search.processNumber" clearable placeholder="璇疯緭鍏�" size="small"
+            @keyup.enter.native="getDeviceAList(clickNodeVal.value)"></el-input></div>
+        <el-button size="small" style="margin-left: 10px" @click="resetSearch">閲� 缃�</el-button>
+        <el-button size="small" type="primary" @click="getDeviceAList(clickNodeVal.value)">鏌� 璇�</el-button>
       </div>
-      <div class="search_thing" style="padding-left: 30px;">
-        <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
-      </div>
-      <div class="btns">
-        <el-button size="small" type="primary">鏂板缓</el-button>
-        <el-button size="small" type="primary">瀵煎嚭</el-button>
+      <div class="search_thing">
+        <el-button size="small" type="primary" @click="dialogVisible = true">娣诲姞楠屾敹</el-button>
+        <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">瀵煎嚭</el-button>
       </div>
     </div>
-    <div class="tables" style="margin-top: 16px;">
-      <ValueTable ref="ValueTable"
-				:url="$api.auxiliaryWorkingHoursDay.selectAuxiliaryWorkingHoursDay"
-				:delUrl="$api.auxiliaryWorkingHoursDay.deleteAuxiliaryWorkingHoursDay" :componentData="componentData" :key="upIndex"/>
+    <div class="tables">
+      <el-table ref="table" :data="tableDataAlist" height="100%">
+        <el-table-column label="搴忓彿" type="index" width="60">
+          <template v-slot="scope">
+            <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="娴佺▼缂栧彿" min-width="150" prop="processNumber" show-overflow-tooltip/>
+        <el-table-column label="璁惧鍚嶇О" min-width="140" prop="deviceName" show-overflow-tooltip/>
+        <el-table-column label="绠$悊缂栧彿" min-width="140" prop="managementNumber" show-overflow-tooltip/>
+        <el-table-column label="搴忓垪鍙�" min-width="80" prop="serialNumber" />
+        <el-table-column label="鎻愪氦鑰�" min-width="100" prop="submitUser" />
+        <el-table-column label="鎻愪氦鏃ユ湡" min-width="150" prop="createTime" />
+        <el-table-column label="褰撳墠鐘舵��" min-width="140" prop="currentState" />
+        <el-table-column label="褰撳墠璐熻矗浜�" min-width="120" prop="currentResponsible" />
+        <el-table-column fixed="right" label="鎿嶄綔" min-width="180">
+          <template #default="{ row }">
+            <el-button size="small" type="text" @click="handleAttachmentClick(row)">闄勪欢</el-button>
+            <el-button size="small" type="text" @click="handleViewClick(row)">鏌ョ湅</el-button>
+            <el-button size="small" type="text" @click="handleDownOne(row)">瀵煎嚭</el-button>
+            <el-button size="small" type="text" @click="handleDeleteClick(row)">鍒犻櫎</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]"
+        :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
+        @current-change="handleCurrentChange">
+      </el-pagination>
     </div>
+    <!-- 娣诲姞璁惧鏁呴殰璁板綍 -->
+    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible" title="浠櫒璁惧楠屾敹璁板綍"
+      width="60%" @open="openRecordAcceptance">
+      <el-steps :active="currentStep" finish-status="success">
+        <el-step v-for="(v, i) in steps" :key="i" :title="v" style="cursor:pointer"
+          @click.native="choiceStep(i)"></el-step>
+      </el-steps>
+      <el-form ref="form" :model="form" :rules="rules" label-width="130px">
+        <div v-show="currentStepClick === 0">
+          <el-card style="margin-top: 1em; height: 56vh; overflow-y: scroll;">
+            <!-- 鏂板璁惧浜嬭褰曞崱鐗� -->
+            <el-row>
+              <el-col :span="24">
+                <el-form-item label="娴佺▼缂栧彿锛�" prop="processNumber">
+                  <el-input v-model="form.processNumber" disabled size="small"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="璁惧鍚嶇О锛�">
+                  <el-input v-model="form.deviceName" disabled size="small"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="鐢熶骇鍘傚锛�">
+                  <el-input v-model="form.manufacturer" disabled size="small"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="璁惧鍨嬪彿锛�">
+                  <el-input v-model="form.specificationModel" disabled size="small"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="绠$悊缂栧彿锛�">
+                  <el-input v-model="form.managementNumber" disabled size="small"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item :rules="[{ required: currentStep === 0, message: '璇疯緭鍏ュ簭鍒楀彿', trigger: 'blur' }]" label="搴忓垪鍙凤細"
+                  prop="serialNumber">
+                  <el-input v-model="form.serialNumber" :disabled="currentStep !== 0" size="small"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item :rules="[{ required: currentStep === 0, message: '璇疯緭鍏ヨ澶囩被鍒�', trigger: 'change' }]" label="璁惧绫诲埆锛�"
+                  prop="deviceClass">
+                  <el-radio-group v-model="form.deviceClass" :disabled="currentStep !== 0">
+                    <el-radio label="0precision">绮惧瘑鍨嬭澶�</el-radio>
+                    <el-radio label="1conventional">甯歌璁惧</el-radio><br />
+                    <el-radio label="2auxiliary_class">杈呭姪绫昏澶�</el-radio>
+                    <el-radio label="4environmental">鐜绫昏澶�</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item :rules="[{ required: currentStep === 0, message: '璇疯緭鍏ュ紑绠卞墠妫�鏌ュ鍖呰鏈夋棤鐮存崯', trigger: 'blur' }]" label="寮�绠卞墠妫�鏌ュ鍖呰鏈夋棤鐮存崯锛�" label-width="220px"
+                  prop="checkOuterPackaging">
+                  <el-input v-model="form.checkOuterPackaging" :disabled="currentStep !== 0" size="small"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="鐩稿叧闄勪欢锛�" prop="fileName">
+                  <el-input v-model="form.fileName" :style="`width: ${currentStep == 0 ? '88%' : '100%'};`" disabled
+                    size="small">
+                    <el-button v-if="currentStep === 0" slot="append" icon="el-icon-delete-solid"
+                      @click="deleteFile"></el-button>
+                  </el-input>
+                  <el-upload ref="upload" :action="action" :on-success="onSuccess" :show-file-list="false"
+                    style="float: right;">
+                    <el-button v-if="currentStep === 0" slot="trigger" class="uploadFile" size="small"
+                      style="position: relative;top: -4px" type="primary">闄勪欢涓婁紶</el-button>
+                  </el-upload>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item :rules="[{ required: currentStep === 0, message: '璇烽�夋嫨涓嬬幆鑺傝矗浠讳汉', trigger: 'change' }]" label="涓嬬幆鑺傝矗浠讳汉锛�"
+                  prop="submitNextPesponsible">
+                  <el-select v-model="form.submitNextPesponsible" :disabled="currentStep !== 0" clearable filterable
+                    placeholder="璇烽�夋嫨涓嬬幆鑺傝礋璐d汉" size="small" style="width: 50%;">
+                    <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.name">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item :rules="[{ required: currentStep === 0, message: '璇疯緭鍏ヨ澶囧紑绠遍獙鏀剁粨璁�', trigger: 'change' }]" label="璁惧寮�绠遍獙鏀剁粨璁猴細" label-width="150px"
+                  prop="unpackingAcceptanceConclusion">
+                  <el-radio-group v-model="form.unpackingAcceptanceConclusion" :disabled="currentStep !== 0">
+                    <el-radio :label="'0qualified'">鍚堟牸</el-radio>
+                    <el-radio :label="'1unqualified'">涓嶅悎鏍硷紝缂哄皯澶囦欢渚涘簲鍟嗚ˉ鍙�</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <div style="margin-bottom: 20px; width: 100%;">
+                  <label>澶囦欢纭锛�</label>
+                  <el-button v-if="currentStep === 0" size="small" style="float: right;"
+                    type="primary" @click="addTableRow('sparePartsConfirmationList')">澧炲姞琛�</el-button>
+                </div>
+                <el-table :data="form.sparePartsConfirmationList" border stripe style="width: 100%; min-height: 30vh">
+                  <el-table-column label="搴忓彿" prop="搴忓彿" type="index" width="80" />
+                  <el-table-column label="鍚嶇О" min-width="120" prop="name">
+                    <template v-slot="scope">
+                      <el-input v-if="currentStep === 0" v-model="scope.row.name" size="small"></el-input>
+                      <label v-else>{{ scope.row.name }}</label>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="鏁伴噺" min-width="120" prop="number">
+                    <template v-slot="scope">
+                      <el-input v-if="currentStep === 0" v-model="scope.row.number" size="small"></el-input>
+                      <label v-else>{{ scope.row.number }}</label>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="澶囨敞" min-width="120" prop="note">
+                    <template v-slot="scope">
+                      <el-input v-if="currentStep === 0" v-model="scope.row.note" size="small"></el-input>
+                      <label v-else>{{ scope.row.note }}</label>
+                    </template>
+                  </el-table-column>
+                  <el-table-column v-if="currentStep === 0" fixed="right" label="鎿嶄綔" width="90">
+                    <template slot-scope="scope">
+                      <el-button icon="el-icon-delete" type="text"
+                        @click="deleteRow(scope.$index, scope.row, 'sparePartsConfirmationList')">鍒犻櫎</el-button>
+                    </template>
+                  </el-table-column>
+                </el-table>
+              </el-col>
+              <el-col :span="24">
+                <div style="margin: 20px 0; width: 100%;">
+                  <label>鏂囦欢绫荤‘璁わ細</label>
+                  <el-button v-if="currentStep === 0" size="small" style="float: right;"
+                    type="primary" @click="addTableRow('fileClassConfirmationList')">澧炲姞琛�</el-button>
+                </div>
+                <el-table :data="form.fileClassConfirmationList" border stripe style="width: 100%; min-height: 30vh">
+                  <el-table-column label="搴忓彿" prop="搴忓彿" type="index" width="80" />
+                  <el-table-column label="搴旀湁鍐屾暟" min-width="120" prop="expectedCopies">
+                    <template v-slot="scope">
+                      <el-input v-if="currentStep === 0" v-model="scope.row.expectedCopies" size="small"></el-input>
+                      <label v-else>{{ scope.row.expectedCopies }}</label>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="瀹為檯鏀跺埌鍐屾暟" min-width="120" prop="actualCopies">
+                    <template v-slot="scope">
+                      <el-input v-if="currentStep === 0" v-model="scope.row.actualCopies" size="small"></el-input>
+                      <label v-else>{{ scope.row.actualCopies }}</label>
+                    </template>
+                  </el-table-column>
+                  <el-table-column v-if="currentStep === 0" fixed="right" label="鎿嶄綔" width="90">
+                    <template v-slot="scope">
+                      <el-button icon="el-icon-delete" type="text"
+                        @click="deleteRow(scope.$index, scope.row, 'fileClassConfirmationList')">鍒犻櫎</el-button>
+                    </template>
+                  </el-table-column>
+                </el-table>
+              </el-col>
+              <el-col :span="24" style="margin-top: 10px;">
+                <el-form-item label="澶囨敞锛�" label-width="90px">
+                  <el-input v-model="form.submitRemarks" :disabled="currentStep !== 0" size="small"
+                    type="textarea"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-card>
+          <el-row style="margin-top: 1em;">
+            <el-col :span="4">
+              鎿嶄綔浜猴細{{ form.submitOperatingPersonnel }}
+            </el-col>
+            <el-col :span="6">
+              鏃ユ湡锛歿{ form.submitDate }}
+            </el-col>
+          </el-row>
+        </div>
+        <div v-show="currentStepClick === 1">
+          <el-card style="margin-top: 1em; height: 56vh; overflow-y: scroll;">
+            <el-row>
+              <el-col :span="24">
+                <el-form-item label="澶嶆牳鎰忚锛�" prop="accidentDescription">
+                  <el-input v-model="form.unpackingReviewOpinion" :disabled="currentStep !== 1" size="small"
+                    type="textarea"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item :rules="[{ required: currentStep === 1, message: '璇疯緭鍏ヤ笅鐜妭璐d换浜�', trigger: 'change' }]" label="涓嬬幆鑺傝矗浠讳汉锛�"
+                  prop="unpackingNextPesponsible">
+                  <el-select v-model="form.unpackingNextPesponsible" :disabled="currentStep !== 1" clearable filterable
+                    placeholder="璇烽�夋嫨涓嬬幆鑺傝礋璐d汉" size="small" style="width: 50%;">
+                    <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.name">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-card>
+          <el-row style="margin-top: 1em;">
+            <el-col :span="4">
+              鎿嶄綔浜猴細{{ form.unpackingOperatingPersonnel }}
+            </el-col>
+            <el-col :span="6">
+              鏃ユ湡锛歿{ form.unpackingDate }}
+            </el-col>
+          </el-row>
+        </div>
+        <div v-show="currentStepClick === 2">
+          <el-card style="margin-top: 1em; height: 56vh; overflow-y: scroll;">
+            <el-row>
+              <el-col :span="24">
+                <el-form-item :rules="[{ required: currentStep === 2, message: '璇疯緭鍏ュ畨瑁呬綅缃�', trigger: 'blur' }]" label="瀹夎浣嶇疆锛�"
+                  prop="installLocation">
+                  <el-input v-model="form.installLocation" :disabled="currentStep !== 2" clearable placeholder="璇疯緭鍏ュ畨瑁呬綅缃�"
+                    size="small"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="澶囨敞锛�">
+                  <el-input v-model="form.installRemarks" :disabled="currentStep !== 2" size="small"
+                    type="textarea"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item :rules="[{ required: currentStep === 2, message: '璇疯緭鍏ヤ笅鐜妭璐d换浜�', trigger: 'blur' }]" label="涓嬬幆鑺傝矗浠讳汉锛�"
+                  prop="installNextPesponsible">
+                  <el-select v-model="form.installNextPesponsible" :disabled="currentStep !== 2" clearable filterable
+                    placeholder="璇烽�夋嫨涓嬬幆鑺傝礋璐d汉" size="small" style="width: 50%;">
+                    <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.name">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <div style="margin-bottom: 20px; width: 100%;">
+                  <label>瀹夎楠屾敹璁板綍</label>
+                  <el-button v-if="currentStep === 2" size="small" style="float: right;"
+                    type="primary" @click="addTableRow('installationAcceptanceRecordList')">澧炲姞琛�</el-button>
+                </div>
+                <el-table :data="form.installationAcceptanceRecordList" border stripe
+                  style="width: 100%; min-height: 30vh">
+                  <el-table-column label="搴忓彿" prop="搴忓彿" type="index" width="80" />
+                  <el-table-column label="椤圭洰" min-width="120" prop="installationProject">
+                    <template v-slot="scope">
+                      <el-input v-if="currentStep === 2" v-model="scope.row.installationProject"
+                        size="small"></el-input>
+                      <label v-else>{{ scope.row.installationProject }}</label>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="瀹夎鎯呭喌" min-width="120" prop="installationSituation">
+                    <template v-slot="scope">
+                      <el-input v-if="currentStep === 2" v-model="scope.row.installationSituation"
+                        size="small"></el-input>
+                      <label v-else>{{ scope.row.installationSituation }}</label>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="瀹夎瀹屾垚" min-width="120" prop="installationCompleted">
+                    <template v-slot="scope">
+                      <el-select v-if="currentStep === 2" v-model="scope.row.installationCompleted" placeholder="璇烽�夋嫨">
+                        <el-option label="鏄�" value="0yes"></el-option>
+                        <el-option label="鍚�" value="1no"></el-option>
+                      </el-select>
+                      <label v-else>{{ scope.row.installationCompleted === '0yes' ? '鏄�' :
+                        scope.row.installationCompleted === '1no' ? '鍚�' : '' }}</label>
+                    </template>
+                  </el-table-column>
+                  <el-table-column v-if="currentStep === 2" fixed="right" label="鎿嶄綔" width="90">
+                    <template slot-scope="scope">
+                      <el-button icon="el-icon-delete" type="text"
+                        @click="deleteRow(scope.$index, scope.row, 'installationAcceptanceRecordList')">鍒犻櫎</el-button>
+                    </template>
+                  </el-table-column>
+                </el-table>
+              </el-col>
+            </el-row>
+          </el-card>
+          <el-row style="margin-top: 1em;">
+            <el-col :span="4">
+              鎿嶄綔浜猴細{{ form.installOperatingPersonnel }}
+            </el-col>
+            <el-col :span="6">
+              鏃ユ湡锛歿{ form.installDate }}
+            </el-col>
+          </el-row>
+        </div>
+        <div v-show="currentStepClick === 3">
+          <el-card style="margin-top: 1em; height: 56vh; overflow-y: scroll;">
+            <el-row>
+              <el-col :span="24">
+                <el-form-item :rules="[{ required: currentStep === 3, message: '璇疯緭鍏ュ鍚堟剰瑙�', trigger: 'blur' }]" label="澶嶅悎鎰忚锛�"
+                  prop="installationAcceptanceCompoundOpinion">
+                  <el-input v-model="form.installationAcceptanceCompoundOpinion" :disabled="currentStep !== 3"
+                    size="small" type="textarea"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item :rules="[{ required: currentStep === 3, message: '璇疯緭鍏ヤ笅鐜妭璐熻矗浜�', trigger: 'change' }]" label="涓嬬幆鑺傝矗浠讳汉锛�"
+                  prop="installationAcceptanceNextPesponsible">
+                  <el-select v-model="form.installationAcceptanceNextPesponsible" :disabled="currentStep !== 3" clearable
+                    filterable placeholder="璇烽�夋嫨涓嬬幆鑺傝礋璐d汉" size="small" style="width: 50%;">
+                    <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.name">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-card>
+          <el-row style="margin-top: 1em;">
+            <el-col :span="4">
+              鎿嶄綔浜猴細{{ form.installationAcceptanceOperatingPersonnel }}
+            </el-col>
+            <el-col :span="6">
+              鏃ユ湡锛歿{ form.installationAcceptanceDate }}
+            </el-col>
+          </el-row>
+        </div>
+        <div v-show="currentStepClick === 4">
+          <el-card style="margin-top: 1em; height: 56vh; overflow-y: scroll;">
+            <div style="margin-bottom: 20px; width: 100%;">
+              <label>楠屾敹鏍告煡璁板綍锛�</label>
+              <el-button v-if="currentStep === 4" size="small" style="float: right;"
+                type="primary" @click="addTableRow('acceptanceCheckRecordList')">澧炲姞琛�</el-button>
+            </div>
+            <el-table :data="form.acceptanceCheckRecordList" border style="width: 100%; min-height: 30vh">
+              <el-table-column label="搴忓彿" prop="sequence" width="80">
+              </el-table-column>
+              <el-table-column label="浠櫒妯″潡" min-width="120" prop="instrumentModule">
+                <template v-slot="scope">
+                  <el-input v-if="currentStep === 4" v-model="scope.row.instrumentModule" size="small"></el-input>
+                  <label v-else>{{ scope.row.instrumentModule }}</label>
+                </template>
+              </el-table-column>
+              <el-table-column label="鏍告煡鍙傛暟" min-width="120" prop="verificationParameter">
+                <template v-slot="scope">
+                  <el-input v-if="currentStep === 4" v-model="scope.row.verificationParameter" size="small"></el-input>
+                  <label v-else>{{ scope.row.verificationParameter }}</label>
+                </template>
+              </el-table-column>
+              <el-table-column label="鍙帴鏀堕檺" min-width="120" prop="acceptableLimit">
+                <template v-slot="scope">
+                  <el-input v-if="currentStep === 4" v-model="scope.row.acceptableLimit" size="small"></el-input>
+                  <label v-else>{{ scope.row.acceptableLimit }}</label>
+                </template>
+              </el-table-column>
+              <el-table-column label="鏍告煡缁撴灉" min-width="120" prop="verificationResult">
+                <template v-slot="scope">
+                  <el-input v-if="currentStep === 4" v-model="scope.row.verificationResult" size="small"></el-input>
+                  <label v-else>{{ scope.row.verificationResult }}</label>
+                </template>
+              </el-table-column>
+              <el-table-column label="鏍告煡缁撹" min-width="120" prop="verificationConclusion">
+                <template v-slot="scope">
+                  <el-select v-if="currentStep === 4" v-model="scope.row.verificationConclusion" placeholder="璇烽�夋嫨">
+                    <el-option label="绗﹀悎" value="0accordWith"></el-option>
+                    <el-option label="涓嶇鍚�" value="1inconformity"></el-option>
+                  </el-select>
+                  <label v-else>{{ scope.row.verificationConclusion }}</label>
+                </template>
+              </el-table-column>
+              <el-table-column v-if="currentStep === 4" fixed="right" label="鎿嶄綔" width="90">
+                <template slot-scope="scope">
+                  <el-button size="small" type="text"
+                    @click="deleteRow(scope.$index, scope.row, 'acceptanceCheckRecordList')">鍒犻櫎</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+            <el-form-item :rules="[{ required: currentStep === 4, message: '璇疯緭鍏ヨ澶囧紑绠遍獙鏀剁粨璁�', trigger: 'change' }]" label="璁惧寮�绠遍獙鏀剁粨璁猴細"
+              label-width="150px" prop="acceptanceCheckUnpackingConclusion">
+              <el-radio-group v-model="form.acceptanceCheckUnpackingConclusion" :disabled="currentStep !== 4">
+                <el-radio :label="'0qualified'">鍚堟牸</el-radio>
+                <el-radio :label="'1unqualified'">涓嶅悎鏍硷紝缂哄皯澶囦欢渚涘簲鍟嗚ˉ鍙�</el-radio>
+              </el-radio-group>
+            </el-form-item>
+            <el-form-item :rules="[{ required: currentStep === 4, message: '璇疯緭鍏ヤ笅鐜妭璐d换浜�', trigger: 'change' }]" label="涓嬬幆鑺傝矗浠讳汉锛�"
+              prop="acceptanceCheckNextPesponsible">
+              <el-select v-model="form.acceptanceCheckNextPesponsible" :disabled="currentStep !== 4" clearable
+                filterable placeholder="璇烽�夋嫨涓嬬幆鑺傝礋璐d汉" size="small" style="width: 50%;">
+                <el-option v-for="item in responsibleOptions" :key="item.value" :label="item.label" :value="item.name">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-card>
+          <el-row style="margin-top: 1em;">
+            <el-col :span="4">
+              鎿嶄綔浜猴細{{ form.acceptanceCheckOperatingPersonnel }}
+            </el-col>
+            <el-col :span="6">
+              鏃ユ湡锛歿{ form.acceptanceCheckDate }}
+            </el-col>
+          </el-row>
+        </div>
+        <div v-show="currentStepClick === 5">
+          <el-card style="margin-top: 1em; height: 56vh; overflow-y: scroll;">
+            <el-row>
+              <el-col :span="24">
+                <el-form-item :rules="[{ required: currentStep === 5, message: '璇疯緭鍏ュ鏍告剰瑙�', trigger: 'blur' }]" label="瀹℃牳鎰忚锛�"
+                  prop="acceptanceAuditAuditOpinion">
+                  <el-input v-model="form.acceptanceAuditAuditOpinion" :disabled="currentStep !== 5" size="small"
+                    type="textarea"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-card>
+          <el-row style="margin-top: 1em;">
+            <el-col :span="4">
+              鎿嶄綔浜猴細{{ form.acceptanceAuditOperatingPersonnel }}
+            </el-col>
+            <el-col :span="6">
+              鏃ユ湡锛歿{ form.acceptanceAuditDate }}
+            </el-col>
+          </el-row>
+        </div>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button v-if="currentStep !== 0 && currentStep !== 6" @click="submitForm('3reject')">椹冲洖</el-button>
+        <el-button v-if="currentStep === 0" @click="submitForm('2save')">淇濆瓨</el-button>
+        <el-button v-if="currentStep !== 6" type="primary" @click="submitForm('1submit')">{{ currentStep === 0 ? '鎻愪氦' :
+          '閫氳繃'
+          }}</el-button>
+      </span>
+    </el-dialog>
   </div>
+  <!-- 鏌ュ崟缂栬緫妗� -->
 </template>
 
 <script>
-import ValueTable from '../../tool/value-table.vue'
+import { dateFormat } from '../../../util/date'
+import file from '../../../util/file';
+
 export default {
-  components: {
-    ValueTable
-  },
-  data(){
-    return {
-      value:'',
-      componentData: {
-        entity: {
-          week: null,
-          weekDay: null,
-          dateTime: null,
-          name:null,
-          orderBy: {
-            field: 'id',
-            order: 'desc'
-          }
-        },
-        isIndex: true,
-        showSelect: false,
-        select: false,
-        do: [{
-          id: 'getFile',
-          font: '闄勪欢',
-          type: 'text',
-          method: 'getFile'
-        }, {
-          id: 'handleLook',
-          font: '鏌ョ湅',
-          type: 'text',
-          method: 'handleLook'
-        },{
-          id: 'delete',
-          font: '鍒犻櫎',
-          type: 'text',
-          method: 'doDiy',
-          disabFun: (row, index) => {
-            return row.state === '宸插鏍�' || row.state === '宸叉壒鍑�'
-          }
-        }],
-        tagField: {
-          shift:{
-            select:[]
-          },
-          state:{
-            select:[
-              {
-                label:'宸叉彁浜�',
-                value:'宸叉彁浜�',
-                type:'primary'
-              },
-              {
-                label:'宸插鏍�',
-                value:'宸插鏍�',
-                type:'warning'
-              },
-              {
-                label:'宸叉壒鍑�',
-                value:'宸叉壒鍑�',
-                type:'success'
-              },
-            ]
-          },
-          weekDay:{
-            select:[]
-          }
-        },
-        linkEvent: {},
-        selectField: {
-          shift:{
-            select:[]
-          },
-          state:{
-            select:[
-              {
-                label:'宸叉彁浜�',
-                value:'宸叉彁浜�',
-                type:'primary'
-              },
-              {
-                label:'宸插鏍�',
-                value:'宸插鏍�',
-                type:'warning'
-              },
-              {
-                label:'宸叉壒鍑�',
-                value:'宸叉壒鍑�',
-                type:'success'
-              },
-            ]
-          },
-          weekDay:{
-            select:[]
-          }
-        },
-        requiredAdd: [],
-        requiredUp: []
-			},
-      upIndex:0,
+  props: {
+    clickNodeVal: {
+      type: Object,
+      default: () => {
+        return {};
+      }
     }
   },
-  methods:{
-    refreshTable(){}
+  data() {
+    return {
+      //浜嬫晠璁惧淇℃伅
+      tableDataAlist: [], // 鏇存敼鍙橀噺鍚嶇О
+      dialogVisible: false,
+      rules: {
+        quantity: [{ required: true, message: '璇疯緭鍏ユ暟閲�', trigger: 'blur' }],
+      },
+      currentStep: 0, // 姝ラ鏉℃樉绀虹鍑犳
+      currentStepClick: 0, // 鐐瑰嚮姝ラ鏉″彉鍖�
+      steps: ['鎻愪氦', '寮�绠遍獙鏀跺鏍�', '瀹夎楠屾敹妫�鏌�', '瀹夎楠屾敹澶嶆牳', '楠屾敹鏍告煡', '楠屾敹鏍告煡瀹℃牳'],
+      form: {
+        sparePartsConfirmationList: [], // 澶囦欢纭List
+        fileClassConfirmationList: [], // 鏂囦欢纭List
+        installationAcceptanceRecordList: [], // 瀹夎楠屾敹璁板綍
+        acceptanceCheckRecordList: [], // 楠屾敹鏍告煡璁板綍
+        fileName: '', // 鏂囦欢鍚嶇О
+        systemFileName: '', // 绯荤粺鏂囦欢鍚嶇О
+      },
+      outLoading: false,
+      responsibleOptions: [], // 涓嬬幆鑺傝礋璐d汉list
+      isUpdate: false,
+      search: {
+        size: 20,
+        current: 1,
+        total: 0,
+        processNumber: '',
+      },
+    }
+  },
+  computed: {
+    action() {
+      return this.javaApi + this.$api.personnel.saveCNASFile
+    }
+  },
+  mounted() {
+    // 鑾峰彇璁惧浜嬫晠淇℃伅
+    this.getDeviceAList(this.clickNodeVal.value);
+    window.excelClosed = this.closed
+  },
+  methods: {
+    handleSizeChange(val) {
+      this.search.size = val
+      this.getPersonnelTraining(this.clickNodeVal.value);
+    },
+    handleCurrentChange(val) {
+      this.search.current = val
+      this.getPersonnelTraining(this.clickNodeVal.value);
+    },
+    deleteFile() {
+      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ枃浠�, 鏄惁缁х画?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        this.$axios.delete(this.$api.personnel.deleteCNASFile + "?fileName=" + this.form.systemFileName).then(res => {
+          if (res.code == 200) {
+            this.$message.success('鍒犻櫎鎴愬姛锛�')
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堝垹闄�'
+        });
+      });
+    },
+    onSuccess(response, file, fileList) {
+      if (response.code == 200) {
+        // 鍦ㄤ繚瀛樿祴鍊兼柊鏂囦欢
+        this.form.fileName = file.name
+        this.form.systemFileName = response.data
+      } else {
+        this.$message.error(response.message)
+      }
+    },
+    addTableRow(value) {
+      switch (value) {
+        // 澶囦欢纭
+        case 'sparePartsConfirmationList':
+          const obj = Object.assign({
+            name: '',
+            number: null,
+            note: ''
+          })
+          this.form.sparePartsConfirmationList.push(obj)
+          break
+        // 鏂囦欢纭List
+        case 'fileClassConfirmationList':
+          const obj1 = Object.assign({
+            expectedCopies: '',
+            actualCopies: '',
+          })
+          this.form.fileClassConfirmationList.push(obj1)
+          break
+        // 瀹夎楠屾敹璁板綍
+        case 'installationAcceptanceRecordList':
+          const obj2 = Object.assign({
+            installationProject: '',
+            installationSituation: '',
+            installationCompleted: ''
+          })
+          this.form.installationAcceptanceRecordList.push(obj2)
+          break
+        // 楠屾敹鏍告煡璁板綍
+        case 'acceptanceCheckRecordList':
+          const obj3 = Object.assign({
+            instrumentModule: '',
+            verificationParameter: '',
+            acceptableLimit: '',
+            verificationResult: '',
+            verificationConclusion: ''
+          })
+          this.form.acceptanceCheckRecordList.push(obj3)
+        default:
+          break
+      }
+    },
+    deleteRow(index, row, type) {
+      switch (type) {
+        // 澶囦欢纭
+        case 'sparePartsConfirmationList':
+          if (row.sparePartsId) {
+            this.$axios.delete(this.$api.deviceCheck.deleteIncidentReportAll + '?sparePartsId=' + row.sparePartsId).then(res => { });
+          }
+          this.form.sparePartsConfirmationList.splice(index, 1)
+          this.$message.success('鍒犻櫎鎴愬姛锛�')
+          break
+        // 鏂囦欢纭List
+        case 'fileClassConfirmationList':
+          if (row.fileId) {
+            this.$axios.delete(this.$api.deviceCheck.deleteIncidentReportAll + '?fileId=' + row.fileId).then(res => { });
+          }
+          this.form.fileClassConfirmationList.splice(index, 1)
+          this.$message.success('鍒犻櫎鎴愬姛锛�')
+          break
+        // 瀹夎楠屾敹璁板綍
+        case 'installationAcceptanceRecordList':
+          if (row.installId) {
+            this.$axios.delete(this.$api.deviceCheck.deleteIncidentReportAll + '?installId=' + row.installId).then(res => { });
+          }
+          this.form.installationAcceptanceRecordList.splice(index, 1)
+          this.$message.success('鍒犻櫎鎴愬姛锛�')
+          break
+        // 楠屾敹鏍告煡璁板綍
+        case 'acceptanceCheckRecordList':
+          if (row.acceptanceCheckId) {
+            this.$axios.delete(this.$api.deviceCheck.deleteIncidentReportAll + '?acceptanceCheckId=' + row.acceptanceCheckId).then(res => { });
+          }
+          this.form.acceptanceCheckRecordList.splice(index, 1)
+          this.$message.success('鍒犻櫎鎴愬姛锛�')
+        default:
+          break
+      }
+    },
+    choiceStep(index) {
+      this.currentStepClick = index
+    },
+    openRecordAcceptance() {
+      // 鑾峰彇璁惧鍩虹淇℃伅
+      this.$axios.get(this.$api.deviceScope.selectDeviceByCode + '?id=' + this.clickNodeVal.value).then(res => {
+        this.form.deviceName = res.data.deviceName
+        this.form.manufacturer = res.data.manufacturer
+        this.form.specificationModel = res.data.specificationModel
+        this.form.managementNumber = res.data.managementNumber
+        this.$nextTick(() => {
+          this.$refs['form'].clearValidate()
+        })
+      });
+      // 鑾峰彇璐熻矗浜轰俊鎭�
+      this.getUserList()
+    },
+    //鎻愪氦琛ㄥ崟
+    async submitForm(saveState) {
+      this.$refs.form.validate((valid) => {
+        if (valid === true || saveState !== '1submit') {
+          // 缁欏綋鍓嶇幆鑺傝缃垱寤轰汉涓庢椂闂�
+          let user = JSON.parse(localStorage.getItem('user'))
+          const dateTime = dateFormat(new Date())
+          // 鑾峰彇褰撳墠鐜妭鎿嶄綔浜轰笌鏃ユ湡
+          switch (this.currentStep) {
+            case 0:
+              this.form.submitOperatingPersonnel = user.name
+              this.form.submitDate = dateTime
+              break
+            case 1:
+              this.form.unpackingOperatingPersonnel = user.name
+              this.form.unpackingDate = dateTime
+              break
+            case 2:
+              this.form.installOperatingPersonnel = user.name
+              this.form.installDate = dateTime
+              break
+            case 3:
+              this.form.installationAcceptanceOperatingPersonnel = user.name
+              this.form.installationAcceptanceDate = dateTime
+              break
+            case 4:
+              this.form.acceptanceCheckOperatingPersonnel = user.name
+              this.form.acceptanceCheckDate = dateTime
+              break
+            case 5:
+              this.form.acceptanceAuditOperatingPersonnel = user.name
+              this.form.acceptanceAuditDate = dateTime
+              break
+            default:
+              break
+          }
+          // 鑾峰彇褰撳墠鐜妭璐熻矗浜�
+          switch (saveState === '3reject' ? this.currentStep - 1 : this.currentStep) {
+            case 0:
+              this.form.currentResponsible = this.form.submitNextPesponsible
+              break
+            case 1:
+              this.form.currentResponsible = this.form.unpackingNextPesponsible
+              break
+            case 2:
+              this.form.currentResponsible = this.form.installNextPesponsible
+              break
+            case 3:
+              this.form.currentResponsible = this.form.installationAcceptanceNextPesponsible
+              break
+            case 4:
+              this.form.currentResponsible = this.form.acceptanceCheckNextPesponsible
+              break
+            default:
+              break
+          }
+          let currentStepAction;
+          // 璁剧疆璇ユ搷浣滃垽鏂槸鍚︿负鎻愪氦锛屼繚瀛橈紝椹冲洖锛岄�氳繃
+          switch (saveState) {
+            // 鎻愪氦锛岄�氳繃
+            case '1submit':
+              currentStepAction = this.currentStep + 1
+              break
+            // 淇濆瓨
+            case '2save':
+              currentStepAction = this.currentStep
+              break
+            // 椹冲洖
+            case '3reject':
+              currentStepAction = this.currentStep - 1
+              break
+            default:
+              break
+          }
+          // 鑾峰彇褰撳墠鐘舵��
+          this.form.currentState = currentStepAction === 6 ? '鍏抽棴' : this.steps[currentStepAction]
+          this.form.deviceId = this.clickNodeVal.value
+          this.$axios.post(this.$api.deviceCheck.saveIncidentReportData, this.form, {
+            headers: {
+              'Content-Type': 'application/json'
+            }
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message.success('鎻愪氦鎴愬姛')
+              this.getDeviceAList(this.clickNodeVal.value);
+              this.dialogVisible = false
+            }
+          })
+        } else {
+          let step = this.steps[this.currentStep]
+          this.$message.warning(step + '  娴佺▼涓湁蹇呭~椤规湭濉紒');
+        }
+      });
+    },
+    // 鑾峰彇璐熻矗浜轰俊鎭帴鍙�
+    getUserList() {
+      this.$axios.get(this.$api.deviceScope.selectUserList).then(res => {
+        if (res.code == 200) {
+          this.responsibleOptions = res.data
+        }
+      })
+    },
+    resetSearch() {
+      this.search = {
+        size: 20,
+          current: 1,
+          total: 0,
+          processNumber: '',
+      }
+      this.getDeviceAList(this.clickNodeVal.value);
+    },
+    // 鑾峰彇璁惧浜嬫晠淇℃伅(鏍规嵁浠巚uex涓幏鍙栧埌鐨勮澶囧悕绉癷d杩涜鏁版嵁鏌ヨ)
+    getDeviceAList(deviceId) {
+      this.$axios.get(this.$api.deviceCheck.incidentReportPage + "?deviceId=" + deviceId + "&size=" + this.search.size + "&current=" + this.search.current + "&processNumber=" + this.search.processNumber).then(res => {
+        if (res.code == 200) {
+          this.tableDataAlist = res.data.records
+          this.search.total = res.data.total
+        }
+      })
+    },
+    //table 浜嬩欢澶勭悊寮�濮嬪
+    handleAttachmentClick(row) {
+      // 妯℃嫙涓嬭浇闄勪欢
+      const imageUrl = this.javaApi+'/img/'+row.systemFileName; // 鍥剧墖 URL
+      // downloadImage(imageUrl);
+      file.downloadIamge(imageUrl,row.fileName)
+    },
+    handleViewClick(row) {
+      this.$axios.get(this.$api.deviceCheck.getShowIncidentReport + "?id=" + row.id).then(res => {
+        this.form = { ...res.data }
+        // 濡傛灉绱㈠紩涓�6琛ㄧず鍏ㄩ儴閫氳繃
+        this.currentStep = this.steps.indexOf(this.form.currentState) === -1 ? 6 : this.steps.indexOf(this.form.currentState)
+        this.currentStepClick = this.currentStep === 6 ? 0 : this.currentStep
+        this.$nextTick(() => {
+          this.$refs['form'].clearValidate()
+        })
+      })
+      this.dialogVisible = true
+    },
+    // 瀵煎嚭
+    handleDownOne(row) {
+      this.outLoading = true
+      this.$axios.get(this.$api.deviceCheck.acceptanceCertificateExport + '?deviceId=' + row.deviceId + '&processNumber=' + row.processNumber, {
+        responseType: "blob"
+      }).then(res => {
+        this.outLoading = false
+        this.$message.success('瀵煎嚭鎴愬姛')
+        const blob = new Blob([res], { type: 'application/octet-stream' });
+        const url = URL.createObjectURL(blob);
+        const link = document.createElement('a');
+        link.href = url;
+        link.download = '璁惧楠屾敹.doc';
+        link.click();
+      })
+    },
+    // 鍒犻櫎
+    handleDeleteClick(row) {
+      this.$confirm('姝ゆ搷浣滃皢鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        this.$axios.delete(this.$api.deviceCheck.deleteIncidentReport + '?id=' + row.id).then(res => {
+          if (res.code == 200) {
+            this.$message.success('鍒犻櫎鎴愬姛')
+            this.getDeviceAList(this.clickNodeVal.value);
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堝垹闄�'
+        });
+      });
+
+    },
+    //瀵煎嚭
+    handleDown() {
+      this.outLoading = true
+      this.$axios.get(this.$api.deviceCheck.incidentReportExport + '?deviceId=' + this.clickNodeVal.value, {
+        responseType: "blob"
+      }).then(res => {
+        this.outLoading = false
+        this.$message.success('瀵煎嚭鎴愬姛')
+        const blob = new Blob([res], { type: 'application/octet-stream' });
+        const url = URL.createObjectURL(blob);
+        const link = document.createElement('a');
+        link.href = url;
+        link.download = '璁惧楠屾敹.xlsx';
+        link.click();
+      })
+    },
+  },
+  watch: {
+    // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊
+    clickNodeVal(newVal) {
+      if (newVal.value) {
+        this.getDeviceAList(newVal.value);
+      }
+    },
+    dialogVisible(newVal) {
+      if (!newVal) {
+        this.form = {
+          sparePartsConfirmationList: [], // 澶囦欢纭List
+          fileClassConfirmationList: [], // 鏂囦欢纭List
+          installationAcceptanceRecordList: [], // 瀹夎楠屾敹璁板綍
+          acceptanceCheckRecordList: [], // 楠屾敹鏍告煡璁板綍
+          fileName: '', // 鏂囦欢鍚嶇О
+          systemFileName: '', // 绯荤粺鏂囦欢鍚嶇О
+        }
+        this.currentStep = 0 // 姝ラ鏉℃樉绀虹鍑犳
+        this.currentStepClick = 0 // 鐐瑰嚮姝ラ鏉″彉鍖�
+        this.$refs['form'].clearValidate()
+      }
+    }
   }
+}
+function downloadImage(url) {
+  const link = document.createElement('a');
+  link.href = url;
+  link.download = 'attachment.jpg'; // 鏂囦欢鍚�
+  document.body.appendChild(link);
+  link.click();
+  document.body.removeChild(link);
 }
 </script>
 
 <style scoped>
-.tables{
-  width: calc(100vw - 390px);
-  height: calc(100vh - 230px);
+>>>.el-radio {
+  color: #606266;
+  font-weight: 500;
+  cursor: pointer;
+  margin-right: 0px;
+  width: 10em;
 }
+
+.tables {
+  width: 100%;
+  height: calc(100vh - 17em);
+}
+
 .search {
   background-color: #fff;
   height: 40px;
   display: flex;
   align-items: center;
-  position: relative;
+  justify-content: space-between;
 }
 
 .search_thing {
@@ -151,18 +904,28 @@
 }
 
 .search_label {
-  width: 70px;
   font-size: 14px;
-  text-align: right;
+  width: 110px;
 }
 
 .search_input {
   width: calc(100% - 120px);
 }
-.btns{
-  position: absolute;
-  right: 40px;
-  top: 50%;
-  transform: translate(0,-50%);
+
+.search_thing {
+  display: flex;
+  margin: 10px 0;
+}
+
+.line {
+  width: 20px;
+  height: 1px;
+  background-color: #ccc;
+  display: inline-block;
+  margin-right: 10px;
+}
+
+.form .search_label {
+  width: 120px;
 }
 </style>

--
Gitblit v1.9.3