|
|
@@ -8,11 +8,13 @@
|
|
8
|
8
|
</el-form-item>
|
|
9
|
9
|
<el-form-item label="使用状态" prop="usageStatus">
|
|
10
|
10
|
<el-select v-model="queryParams.usageStatus" placeholder="请选择使用状态" clearable style="width: 200px">
|
|
11
|
|
- <el-option v-for="dict in equipment_usage_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
11
|
+ <el-option v-for="dict in equipment_usage_status" :key="dict.value" :label="dict.label"
|
|
|
12
|
+ :value="dict.value" />
|
|
12
|
13
|
</el-select>
|
|
13
|
14
|
</el-form-item>
|
|
14
|
15
|
<el-form-item label="最近定/自检日期" prop="inspectionSelfCheckDate">
|
|
15
|
|
- <el-date-picker v-model="queryParams.inspectionSelfCheckDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择日期" style="width: 200px" />
|
|
|
16
|
+ <el-date-picker v-model="queryParams.inspectionSelfCheckDate" type="date" value-format="YYYY-MM-DD"
|
|
|
17
|
+ placeholder="请选择日期" style="width: 200px" />
|
|
16
|
18
|
</el-form-item>
|
|
17
|
19
|
<el-form-item label="检查成员" prop="inspectionTeamUserName">
|
|
18
|
20
|
<el-input v-model="queryParams.inspectionTeamUserName" placeholder="请输入检查成员" clearable style="width: 200px" />
|
|
|
@@ -26,14 +28,19 @@
|
|
26
|
28
|
|
|
27
|
29
|
<!-- 操作按钮 -->
|
|
28
|
30
|
<div class="operation-container">
|
|
29
|
|
- <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['equipment:ledger:add']">新增</el-button>
|
|
30
|
|
- <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleBatchDelete" v-hasPermi="['equipment:ledger:delete']">删除</el-button>
|
|
31
|
|
- <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['equipment:ledger:export']">导出</el-button>
|
|
32
|
|
- <el-button type="info" plain icon="Upload" @click="handleImport" v-hasPermi="['equipment:ledger:import']">导入</el-button>
|
|
|
31
|
+ <el-button type="primary" plain icon="Plus" @click="handleAdd"
|
|
|
32
|
+ v-hasPermi="['equipment:ledger:add']">新增</el-button>
|
|
|
33
|
+ <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleBatchDelete"
|
|
|
34
|
+ v-hasPermi="['equipment:ledger:delete']">删除</el-button>
|
|
|
35
|
+ <el-button type="warning" plain icon="Download" @click="handleExport"
|
|
|
36
|
+ v-hasPermi="['equipment:ledger:export']">导出</el-button>
|
|
|
37
|
+ <el-button type="info" plain icon="Upload" @click="handleImport"
|
|
|
38
|
+ v-hasPermi="['equipment:ledger:import']">导入</el-button>
|
|
33
|
39
|
</div>
|
|
34
|
40
|
|
|
35
|
41
|
<!-- 数据表格 -->
|
|
36
|
|
- <el-table v-loading="loading" :data="tableData" border @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
|
|
|
42
|
+ <el-table v-loading="loading" :data="tableData" border @selection-change="handleSelectionChange"
|
|
|
43
|
+ :row-class-name="tableRowClassName">
|
|
37
|
44
|
<el-table-column type="selection" width="55" align="center" />
|
|
38
|
45
|
<el-table-column label="序号" prop="rowIndex" width="70" align="center">
|
|
39
|
46
|
<template #default="scope">
|
|
|
@@ -46,17 +53,25 @@
|
|
46
|
53
|
</template>
|
|
47
|
54
|
</el-table-column>
|
|
48
|
55
|
<el-table-column label="设备名称" prop="equipmentName" align="center" min-width="150" show-overflow-tooltip />
|
|
49
|
|
- <el-table-column label="设备序列号" prop="equipmentSerialNumber" align="center" min-width="150" show-overflow-tooltip />
|
|
50
|
|
- <el-table-column label="安装位置" prop="installationLocation" align="center" min-width="150" show-overflow-tooltip />
|
|
|
56
|
+ <el-table-column label="设备序列号" prop="equipmentSerialNumber" align="center" min-width="150"
|
|
|
57
|
+ show-overflow-tooltip />
|
|
|
58
|
+ <el-table-column label="安装位置" prop="installationLocation" align="center" min-width="180" show-overflow-tooltip>
|
|
|
59
|
+ <template #default="scope">
|
|
|
60
|
+ {{ formatInstallationLocation(scope.row.installationLocation) }}
|
|
|
61
|
+ </template>
|
|
|
62
|
+ </el-table-column>
|
|
51
|
63
|
<el-table-column label="使用状态" prop="usageStatus" align="center" min-width="100">
|
|
52
|
64
|
<template #default="scope">
|
|
53
|
65
|
<dict-tag :options="equipment_usage_status" :value="scope.row.usageStatus" />
|
|
54
|
|
-
|
|
|
66
|
+
|
|
55
|
67
|
</template>
|
|
56
|
68
|
</el-table-column>
|
|
57
|
|
- <el-table-column label="定/自检小组组长" prop="inspectionTeamLeaderName" align="center" min-width="120" show-overflow-tooltip />
|
|
58
|
|
- <el-table-column label="定/自检小组组员1" prop="inspectionTeamMember1Name" align="center" min-width="120" show-overflow-tooltip />
|
|
59
|
|
- <el-table-column label="定/自检小组组员2" prop="inspectionTeamMember2Name" align="center" min-width="120" show-overflow-tooltip />
|
|
|
69
|
+ <el-table-column label="定/自检小组组长" prop="inspectionTeamLeaderName" align="center" min-width="120"
|
|
|
70
|
+ show-overflow-tooltip />
|
|
|
71
|
+ <el-table-column label="定/自检小组组员1" prop="inspectionTeamMember1Name" align="center" min-width="120"
|
|
|
72
|
+ show-overflow-tooltip />
|
|
|
73
|
+ <el-table-column label="定/自检小组组员2" prop="inspectionTeamMember2Name" align="center" min-width="120"
|
|
|
74
|
+ show-overflow-tooltip />
|
|
60
|
75
|
<el-table-column label="最近定检/自检日期" prop="inspectionSelfCheckDate" align="center" min-width="120" />
|
|
61
|
76
|
<el-table-column label="操作" align="center" width="220" fixed="right">
|
|
62
|
77
|
<template #default="scope">
|
|
|
@@ -68,7 +83,8 @@
|
|
68
|
83
|
</el-table>
|
|
69
|
84
|
|
|
70
|
85
|
<!-- 分页 -->
|
|
71
|
|
- <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
86
|
+ <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
|
|
87
|
+ v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
72
|
88
|
|
|
73
|
89
|
<!-- 编辑/详情弹窗 -->
|
|
74
|
90
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="1000px" :close-on-click-modal="false">
|
|
|
@@ -111,69 +127,82 @@
|
|
111
|
127
|
</el-col>
|
|
112
|
128
|
<el-col :span="12">
|
|
113
|
129
|
<el-form-item label="出厂日期" prop="manufacturingDate">
|
|
114
|
|
- <el-date-picker v-model="form.manufacturingDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择出厂日期" :disabled="formDisabled" />
|
|
|
130
|
+ <el-date-picker v-model="form.manufacturingDate" type="date" value-format="YYYY-MM-DD"
|
|
|
131
|
+ placeholder="请选择出厂日期" :disabled="formDisabled" />
|
|
115
|
132
|
</el-form-item>
|
|
116
|
133
|
</el-col>
|
|
117
|
134
|
<el-col :span="12">
|
|
118
|
135
|
<el-form-item label="验收日期" prop="acceptanceDate">
|
|
119
|
|
- <el-date-picker v-model="form.acceptanceDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择验收日期" :disabled="formDisabled" />
|
|
|
136
|
+ <el-date-picker v-model="form.acceptanceDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择验收日期"
|
|
|
137
|
+ :disabled="formDisabled" />
|
|
120
|
138
|
</el-form-item>
|
|
121
|
139
|
</el-col>
|
|
122
|
140
|
<el-col :span="12">
|
|
123
|
141
|
<el-form-item label="启用日期" prop="commissioningDate">
|
|
124
|
|
- <el-date-picker v-model="form.commissioningDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择启用日期" :disabled="formDisabled" />
|
|
|
142
|
+ <el-date-picker v-model="form.commissioningDate" type="date" value-format="YYYY-MM-DD"
|
|
|
143
|
+ placeholder="请选择启用日期" :disabled="formDisabled" />
|
|
125
|
144
|
</el-form-item>
|
|
126
|
145
|
</el-col>
|
|
127
|
146
|
<el-col :span="12">
|
|
128
|
147
|
<el-form-item label="使用状态" prop="usageStatus">
|
|
129
|
148
|
<el-select v-model="form.usageStatus" placeholder="请选择使用状态" :disabled="formDisabled">
|
|
130
|
|
- <el-option v-for="dict in equipment_usage_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
149
|
+ <el-option v-for="dict in equipment_usage_status" :key="dict.value" :label="dict.label"
|
|
|
150
|
+ :value="dict.value" />
|
|
131
|
151
|
</el-select>
|
|
132
|
152
|
</el-form-item>
|
|
133
|
153
|
</el-col>
|
|
134
|
154
|
<el-col :span="12">
|
|
135
|
155
|
<el-form-item label="报废日期" prop="scrappingDate">
|
|
136
|
|
- <el-date-picker v-model="form.scrappingDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择报废日期" :disabled="formDisabled" />
|
|
|
156
|
+ <el-date-picker v-model="form.scrappingDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择报废日期"
|
|
|
157
|
+ :disabled="formDisabled" />
|
|
137
|
158
|
</el-form-item>
|
|
138
|
159
|
</el-col>
|
|
139
|
160
|
<el-col :span="12">
|
|
140
|
161
|
<el-form-item label="安装位置" prop="installationLocation">
|
|
141
|
|
- <el-input v-model="form.installationLocation" placeholder="请输入安装位置" :disabled="formDisabled" />
|
|
|
162
|
+ <TreePositionSelect v-model="form.installationLocation" :disabled="formDisabled" width="100%"
|
|
|
163
|
+ placeholder="请选择安装位置" />
|
|
142
|
164
|
</el-form-item>
|
|
143
|
165
|
</el-col>
|
|
144
|
166
|
<el-col :span="12">
|
|
145
|
167
|
<el-form-item label="定/自检日期" prop="inspectionSelfCheckDate">
|
|
146
|
|
- <el-date-picker v-model="form.inspectionSelfCheckDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择定/自检日期" :disabled="formDisabled" @change="calculateDueDate" />
|
|
|
168
|
+ <el-date-picker v-model="form.inspectionSelfCheckDate" type="date" value-format="YYYY-MM-DD"
|
|
|
169
|
+ placeholder="请选择定/自检日期" :disabled="formDisabled" @change="calculateDueDate" />
|
|
147
|
170
|
</el-form-item>
|
|
148
|
171
|
</el-col>
|
|
149
|
172
|
<el-col :span="12">
|
|
150
|
173
|
<el-form-item label="定/自检周期" prop="inspectionSelfCheckCycle">
|
|
151
|
|
- <el-input-number v-model="form.inspectionSelfCheckCycle" placeholder="请输入定/自检周期" :min="0" :precision="0" :disabled="formDisabled" @change="calculateDueDate" /> 月
|
|
|
174
|
+ <el-input-number v-model="form.inspectionSelfCheckCycle" placeholder="请输入定/自检周期" :min="0" :precision="0"
|
|
|
175
|
+ :disabled="formDisabled" @change="calculateDueDate" /> 月
|
|
152
|
176
|
</el-form-item>
|
|
153
|
177
|
</el-col>
|
|
154
|
178
|
<el-col :span="12">
|
|
155
|
179
|
<el-form-item label="最近定/自检到期日期" prop="nextInspectionDueDate">
|
|
156
|
|
- <el-date-picker v-model="form.nextInspectionDueDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择最近定/自检到期日期" :disabled="formDisabled" />
|
|
|
180
|
+ <el-date-picker v-model="form.nextInspectionDueDate" type="date" value-format="YYYY-MM-DD"
|
|
|
181
|
+ placeholder="请选择最近定/自检到期日期" :disabled="formDisabled" />
|
|
157
|
182
|
</el-form-item>
|
|
158
|
183
|
</el-col>
|
|
159
|
184
|
<el-col :span="12">
|
|
160
|
185
|
<el-form-item label="定/自检小组组长" prop="inspectionTeamLeaderId">
|
|
161
|
|
- <UserSelect v-model="form.inspectionTeamLeaderId" :disabled="formDisabled" width="100%" placeholder="请选择组长" />
|
|
|
186
|
+ <UserSelect v-model="form.inspectionTeamLeaderId" :disabled="formDisabled" width="100%"
|
|
|
187
|
+ placeholder="请选择组长" />
|
|
162
|
188
|
</el-form-item>
|
|
163
|
189
|
</el-col>
|
|
164
|
190
|
<el-col :span="12">
|
|
165
|
191
|
<el-form-item label="定/自检小组组员1" prop="inspectionTeamMember1Id">
|
|
166
|
|
- <UserSelect v-model="form.inspectionTeamMember1Id" :disabled="formDisabled" width="100%" placeholder="请选择组员1" />
|
|
|
192
|
+ <UserSelect v-model="form.inspectionTeamMember1Id" :disabled="formDisabled" width="100%"
|
|
|
193
|
+ placeholder="请选择组员1" />
|
|
167
|
194
|
</el-form-item>
|
|
168
|
195
|
</el-col>
|
|
169
|
196
|
<el-col :span="12">
|
|
170
|
197
|
<el-form-item label="定/自检小组组员2" prop="inspectionTeamMember2Id">
|
|
171
|
|
- <UserSelect v-model="form.inspectionTeamMember2Id" :disabled="formDisabled" width="100%" placeholder="请选择组员2" />
|
|
|
198
|
+ <UserSelect v-model="form.inspectionTeamMember2Id" :disabled="formDisabled" width="100%"
|
|
|
199
|
+ placeholder="请选择组员2" />
|
|
172
|
200
|
</el-form-item>
|
|
173
|
201
|
</el-col>
|
|
174
|
202
|
<el-col :span="24">
|
|
175
|
203
|
<el-form-item label="首次验收情况" prop="initialAcceptanceStatus">
|
|
176
|
|
- <el-input v-model="form.initialAcceptanceStatus" type="textarea" :rows="3" placeholder="请输入首次验收情况" :disabled="formDisabled" />
|
|
|
204
|
+ <el-input v-model="form.initialAcceptanceStatus" type="textarea" :rows="3" placeholder="请输入首次验收情况"
|
|
|
205
|
+ :disabled="formDisabled" />
|
|
177
|
206
|
</el-form-item>
|
|
178
|
207
|
</el-col>
|
|
179
|
208
|
<el-col :span="24">
|
|
|
@@ -189,12 +218,15 @@
|
|
189
|
218
|
<el-table :data="form.equipmentInspectionRecordList" border style="margin-top: 10px">
|
|
190
|
219
|
<el-table-column label="定检日期" prop="inspectionDate">
|
|
191
|
220
|
<template #default="scope">
|
|
192
|
|
- <el-date-picker v-model="scope.row.inspectionDate" type="date" value-format="YYYY-MM-DD" placeholder="选择日期" :disabled="formDisabled" @change="handleInspectionDateChange(scope.row, scope.$index)" />
|
|
|
221
|
+ <el-date-picker v-model="scope.row.inspectionDate" type="date" value-format="YYYY-MM-DD"
|
|
|
222
|
+ placeholder="选择日期" :disabled="formDisabled"
|
|
|
223
|
+ @change="handleInspectionDateChange(scope.row, scope.$index)" />
|
|
193
|
224
|
</template>
|
|
194
|
225
|
</el-table-column>
|
|
195
|
226
|
<el-table-column label="定检小组" prop="inspectionTeamName">
|
|
196
|
227
|
<template #default="scope">
|
|
197
|
|
- <UserSelect v-model="scope.row.inspectionTeamIds" :multiple="true" :disabled="formDisabled" width="100%" placeholder="请选择" />
|
|
|
228
|
+ <UserSelect v-model="scope.row.inspectionTeamIds" :multiple="true" :disabled="formDisabled" width="100%"
|
|
|
229
|
+ placeholder="请选择" />
|
|
198
|
230
|
</template>
|
|
199
|
231
|
</el-table-column>
|
|
200
|
232
|
<el-table-column label="定检结论" prop="inspectionResult">
|
|
|
@@ -205,13 +237,15 @@
|
|
205
|
237
|
<el-table-column label="定检性质" prop="inspectionNature">
|
|
206
|
238
|
<template #default="scope">
|
|
207
|
239
|
<el-select v-model="scope.row.inspectionNature" placeholder="请选择" :disabled="formDisabled">
|
|
208
|
|
- <el-option v-for="dict in equipment_inspection_nature" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
240
|
+ <el-option v-for="dict in equipment_inspection_nature" :key="dict.value" :label="dict.label"
|
|
|
241
|
+ :value="dict.value" />
|
|
209
|
242
|
</el-select>
|
|
210
|
243
|
</template>
|
|
211
|
244
|
</el-table-column>
|
|
212
|
245
|
<el-table-column label="操作" width="80" v-if="!formDisabled">
|
|
213
|
246
|
<template #default="scope">
|
|
214
|
|
- <el-button type="danger" link icon="Delete" @click="removeCheckRecord(scope.$index)" v-hasPermi="['equipment:ledger:delete']">删除</el-button>
|
|
|
247
|
+ <el-button type="danger" link icon="Delete" @click="removeCheckRecord(scope.$index)"
|
|
|
248
|
+ v-hasPermi="['equipment:ledger:delete']">删除</el-button>
|
|
215
|
249
|
</template>
|
|
216
|
250
|
</el-table-column>
|
|
217
|
251
|
</el-table>
|
|
|
@@ -225,13 +259,18 @@
|
|
225
|
259
|
|
|
226
|
260
|
<!-- 导入对话框 -->
|
|
227
|
261
|
<el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
|
|
228
|
|
- <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
|
229
|
|
- <el-icon class="el-icon--upload"><UploadFilled /></el-icon>
|
|
|
262
|
+ <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
|
|
|
263
|
+ :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
|
|
|
264
|
+ :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
|
|
265
|
+ <el-icon class="el-icon--upload">
|
|
|
266
|
+ <UploadFilled />
|
|
|
267
|
+ </el-icon>
|
|
230
|
268
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
231
|
269
|
<template #tip>
|
|
232
|
270
|
<div class="el-upload__tip text-center">
|
|
233
|
271
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
|
234
|
|
- <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">下载模板</el-link>
|
|
|
272
|
+ <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
|
|
|
273
|
+ @click="importTemplate">下载模板</el-link>
|
|
235
|
274
|
</div>
|
|
236
|
275
|
</template>
|
|
237
|
276
|
</el-upload>
|
|
|
@@ -248,9 +287,10 @@
|
|
248
|
287
|
<script setup>
|
|
249
|
288
|
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
|
250
|
289
|
import { ElMessage } from 'element-plus'
|
|
251
|
|
-import { UploadFilled } from '@element-plus/icons-vue'
|
|
|
290
|
+import { Delete, UploadFilled } from '@element-plus/icons-vue'
|
|
252
|
291
|
import ImageUpload from '@/components/ImageUpload/index.vue'
|
|
253
|
292
|
import UserSelect from '@/components/UserSelect/index.vue'
|
|
|
293
|
+import TreePositionSelect from '@/components/TreePositionSelect/index.vue'
|
|
254
|
294
|
import { listEquipLedger, getEquipLedger, addEquipLedger, updateEquipLedger, delEquipLedger, exportEquipLedger } from '@/api/equipManage/equipLedger'
|
|
255
|
295
|
import { getUser } from '@/api/system/user'
|
|
256
|
296
|
import { getToken } from '@/utils/auth'
|
|
|
@@ -294,7 +334,7 @@ const form = reactive({
|
|
294
|
334
|
commissioningDate: '',
|
|
295
|
335
|
usageStatus: '',
|
|
296
|
336
|
scrappingDate: '',
|
|
297
|
|
- installationLocation: '',
|
|
|
337
|
+ installationLocation: null,
|
|
298
|
338
|
inspectionSelfCheckDate: '',
|
|
299
|
339
|
inspectionSelfCheckCycle: 0,
|
|
300
|
340
|
nextInspectionDueDate: '',
|
|
|
@@ -376,6 +416,14 @@ function handleEdit(row) {
|
|
376
|
416
|
if (!form.equipmentInspectionRecordList || !Array.isArray(form.equipmentInspectionRecordList)) {
|
|
377
|
417
|
form.equipmentInspectionRecordList = []
|
|
378
|
418
|
}
|
|
|
419
|
+ form.installationLocation = {
|
|
|
420
|
+ terminlCode: response.data.terminlCode,
|
|
|
421
|
+ regionalCode: response.data.regionalCode,
|
|
|
422
|
+ channelCode: response.data.channelCode
|
|
|
423
|
+ }
|
|
|
424
|
+ form.inspectionTeamLeaderId = form.inspectionTeamLeaderId || ''
|
|
|
425
|
+ form.inspectionTeamMember1Id = form.inspectionTeamMember1Id || ''
|
|
|
426
|
+ form.inspectionTeamMember2Id = form.inspectionTeamMember2Id || ''
|
|
379
|
427
|
formDisabled.value = false
|
|
380
|
428
|
dialog.title = '编辑设备'
|
|
381
|
429
|
dialog.visible = true
|
|
|
@@ -396,6 +444,14 @@ function handleDetail(row) {
|
|
396
|
444
|
if (!form.equipmentInspectionRecordList || !Array.isArray(form.equipmentInspectionRecordList)) {
|
|
397
|
445
|
form.equipmentInspectionRecordList = []
|
|
398
|
446
|
}
|
|
|
447
|
+ form.installationLocation = {
|
|
|
448
|
+ terminlCode: response.data.terminlCode,
|
|
|
449
|
+ regionalCode: response.data.regionalCode,
|
|
|
450
|
+ channelCode: response.data.channelCode
|
|
|
451
|
+ }
|
|
|
452
|
+ form.inspectionTeamLeaderId = form.inspectionTeamLeaderId || ''
|
|
|
453
|
+ form.inspectionTeamMember1Id = form.inspectionTeamMember1Id || ''
|
|
|
454
|
+ form.inspectionTeamMember2Id = form.inspectionTeamMember2Id || ''
|
|
399
|
455
|
formDisabled.value = true
|
|
400
|
456
|
dialog.title = '设备详情'
|
|
401
|
457
|
dialog.visible = true
|
|
|
@@ -411,6 +467,14 @@ function handleDelete(row) {
|
|
411
|
467
|
}).catch(() => { })
|
|
412
|
468
|
}
|
|
413
|
469
|
|
|
|
470
|
+function formatInstallationLocation(location) {
|
|
|
471
|
+ if (!location) return ''
|
|
|
472
|
+ if (typeof location === 'object') {
|
|
|
473
|
+ return `${location.terminlName || ''}/${location.regionalName || ''}/${location.channelName || ''}`
|
|
|
474
|
+ }
|
|
|
475
|
+ return location
|
|
|
476
|
+}
|
|
|
477
|
+
|
|
414
|
478
|
function handleBatchDelete() {
|
|
415
|
479
|
proxy.$modal.confirm('是否确认删除选中的设备?').then(function () {
|
|
416
|
480
|
return delEquipLedger(selectedIds.value.join(','))
|
|
|
@@ -459,9 +523,9 @@ function resetForm() {
|
|
459
|
523
|
manufacturingDate: '',
|
|
460
|
524
|
acceptanceDate: '',
|
|
461
|
525
|
commissioningDate: '',
|
|
462
|
|
- usageStatus: '1',
|
|
|
526
|
+ usageStatus: '',
|
|
463
|
527
|
scrappingDate: '',
|
|
464
|
|
- installationLocation: '',
|
|
|
528
|
+ installationLocation: null,
|
|
465
|
529
|
inspectionSelfCheckDate: '',
|
|
466
|
530
|
inspectionSelfCheckCycle: 0,
|
|
467
|
531
|
nextInspectionDueDate: '',
|
|
|
@@ -477,9 +541,9 @@ function resetForm() {
|
|
477
|
541
|
async function submitForm() {
|
|
478
|
542
|
formRef.value?.validate(async valid => {
|
|
479
|
543
|
if (valid) {
|
|
480
|
|
- const submitData = { ...form }
|
|
|
544
|
+ const submitData = { ...form, ...form.installationLocation }
|
|
481
|
545
|
submitData.baseAttachmentList = baseAttachmentListInternal.value
|
|
482
|
|
-
|
|
|
546
|
+
|
|
483
|
547
|
try {
|
|
484
|
548
|
if (submitData.inspectionTeamLeaderId) {
|
|
485
|
549
|
const leaderRes = await getUser(submitData.inspectionTeamLeaderId)
|
|
|
@@ -496,6 +560,7 @@ async function submitForm() {
|
|
496
|
560
|
} catch (error) {
|
|
497
|
561
|
console.error('获取用户信息失败:', error)
|
|
498
|
562
|
}
|
|
|
563
|
+ delete submitData.installationLocation
|
|
499
|
564
|
|
|
500
|
565
|
if (submitData.id != null) {
|
|
501
|
566
|
updateEquipLedger(submitData).then(response => {
|
|
|
@@ -542,7 +607,7 @@ function handleInspectionDateChange(row, index) {
|
|
542
|
607
|
if (row.inspectionDate) {
|
|
543
|
608
|
const recordDate = new Date(row.inspectionDate)
|
|
544
|
609
|
const checkDate = form.inspectionSelfCheckDate ? new Date(form.inspectionSelfCheckDate) : null
|
|
545
|
|
-
|
|
|
610
|
+
|
|
546
|
611
|
if (!checkDate || recordDate > checkDate) {
|
|
547
|
612
|
form.inspectionSelfCheckDate = row.inspectionDate
|
|
548
|
613
|
calculateDueDate()
|
|
|
@@ -587,8 +652,7 @@ onMounted(() => {
|
|
587
|
652
|
padding: 20px;
|
|
588
|
653
|
}
|
|
589
|
654
|
|
|
590
|
|
-.filter-container {
|
|
591
|
|
-}
|
|
|
655
|
+.filter-container {}
|
|
592
|
656
|
|
|
593
|
657
|
.operation-container {
|
|
594
|
658
|
margin-bottom: 15px;
|