提交 | 用户 | 时间
|
475e40
|
1 |
<template> |
A |
2 |
<div class="app-container"> |
|
3 |
<el-card class="box-card"> |
|
4 |
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
|
5 |
<el-form-item label="检验记录编号,由各设备按自定规则生成,唯一编码" prop="recordId"> |
|
6 |
<el-input |
|
7 |
v-model="queryParams.recordId" |
|
8 |
placeholder="请输入检验记录编号,由各设备按自定规则生成,唯一编码" |
|
9 |
clearable |
|
10 |
@keyup.enter.native="handleQuery" |
|
11 |
/> |
|
12 |
</el-form-item> |
|
13 |
<el-form-item label="检测站点编号" prop="stationCode"> |
|
14 |
<el-input |
|
15 |
v-model="queryParams.stationCode" |
|
16 |
placeholder="请输入检测站点编号" |
|
17 |
clearable |
|
18 |
@keyup.enter.native="handleQuery" |
|
19 |
/> |
|
20 |
</el-form-item> |
|
21 |
<el-form-item label="产品序列号-pack码" prop="productNum"> |
|
22 |
<el-input |
|
23 |
v-model="queryParams.productNum" |
|
24 |
placeholder="请输入产品序列号-pack码" |
|
25 |
clearable |
|
26 |
@keyup.enter.native="handleQuery" |
|
27 |
/> |
|
28 |
</el-form-item> |
|
29 |
<el-form-item label="整体结果 " prop="totalResult"> |
|
30 |
<el-input |
|
31 |
v-model="queryParams.totalResult" |
|
32 |
placeholder="请输入整体结果 " |
|
33 |
clearable |
|
34 |
@keyup.enter.native="handleQuery" |
|
35 |
/> |
|
36 |
</el-form-item> |
|
37 |
<el-form-item label="工单号" prop="workOrderNo"> |
|
38 |
<el-input |
|
39 |
v-model="queryParams.workOrderNo" |
|
40 |
placeholder="请输入工单号" |
|
41 |
clearable |
|
42 |
@keyup.enter.native="handleQuery" |
|
43 |
/> |
|
44 |
</el-form-item> |
|
45 |
<el-form-item label="入参-参数列表" prop="checkList"> |
|
46 |
<el-input |
|
47 |
v-model="queryParams.checkList" |
|
48 |
placeholder="请输入入参-参数列表" |
|
49 |
clearable |
|
50 |
@keyup.enter.native="handleQuery" |
|
51 |
/> |
|
52 |
</el-form-item> |
|
53 |
<el-form-item label="状态编码" prop="resultCode"> |
|
54 |
<el-input |
|
55 |
v-model="queryParams.resultCode" |
|
56 |
placeholder="请输入状态编码" |
|
57 |
clearable |
|
58 |
@keyup.enter.native="handleQuery" |
|
59 |
/> |
|
60 |
</el-form-item> |
|
61 |
<el-form-item label="接口的返回信息,当fail时会有报错信息" prop="resultMessage"> |
|
62 |
<el-input |
|
63 |
v-model="queryParams.resultMessage" |
|
64 |
placeholder="请输入接口的返回信息,当fail时会有报错信息" |
|
65 |
clearable |
|
66 |
@keyup.enter.native="handleQuery" |
|
67 |
/> |
|
68 |
</el-form-item> |
|
69 |
<el-form-item label="出参-参数列表" prop="resultData"> |
|
70 |
<el-input |
|
71 |
v-model="queryParams.resultData" |
|
72 |
placeholder="请输入出参-参数列表" |
|
73 |
clearable |
|
74 |
@keyup.enter.native="handleQuery" |
|
75 |
/> |
|
76 |
</el-form-item> |
|
77 |
<el-form-item label="备注" prop="remarks"> |
|
78 |
<el-input |
|
79 |
v-model="queryParams.remarks" |
|
80 |
placeholder="请输入备注" |
|
81 |
clearable |
|
82 |
@keyup.enter.native="handleQuery" |
|
83 |
/> |
|
84 |
</el-form-item> |
|
85 |
<el-form-item label="创建用户" prop="createUser"> |
|
86 |
<el-input |
|
87 |
v-model="queryParams.createUser" |
|
88 |
placeholder="请输入创建用户" |
|
89 |
clearable |
|
90 |
@keyup.enter.native="handleQuery" |
|
91 |
/> |
|
92 |
</el-form-item> |
|
93 |
<el-form-item label="更改用户" prop="updateUser"> |
|
94 |
<el-input |
|
95 |
v-model="queryParams.updateUser" |
|
96 |
placeholder="请输入更改用户" |
|
97 |
clearable |
|
98 |
@keyup.enter.native="handleQuery" |
|
99 |
/> |
|
100 |
</el-form-item> |
|
101 |
<el-form-item label="预留字段1" prop="spareField1"> |
|
102 |
<el-input |
|
103 |
v-model="queryParams.spareField1" |
|
104 |
placeholder="请输入预留字段1" |
|
105 |
clearable |
|
106 |
@keyup.enter.native="handleQuery" |
|
107 |
/> |
|
108 |
</el-form-item> |
|
109 |
<el-form-item label="预留字段2" prop="spareField2"> |
|
110 |
<el-input |
|
111 |
v-model="queryParams.spareField2" |
|
112 |
placeholder="请输入预留字段2" |
|
113 |
clearable |
|
114 |
@keyup.enter.native="handleQuery" |
|
115 |
/> |
|
116 |
</el-form-item> |
|
117 |
<el-form-item label="预留字段3" prop="spareField3"> |
|
118 |
<el-input |
|
119 |
v-model="queryParams.spareField3" |
|
120 |
placeholder="请输入预留字段3" |
|
121 |
clearable |
|
122 |
@keyup.enter.native="handleQuery" |
|
123 |
/> |
|
124 |
</el-form-item> |
|
125 |
<el-form-item label="预留字段4" prop="spareField4"> |
|
126 |
<el-input |
|
127 |
v-model="queryParams.spareField4" |
|
128 |
placeholder="请输入预留字段4" |
|
129 |
clearable |
|
130 |
@keyup.enter.native="handleQuery" |
|
131 |
/> |
|
132 |
</el-form-item> |
|
133 |
<el-form-item style="float: right"> |
|
134 |
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
|
135 |
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
|
136 |
</el-form-item> |
|
137 |
</el-form> |
|
138 |
</el-card> |
|
139 |
|
|
140 |
<el-card style="margin-top: 10px" class="box-card"> |
|
141 |
<el-row :gutter="10" class="mb8"> |
|
142 |
<el-col :span="1.5"> |
|
143 |
<el-button |
|
144 |
type="primary" |
|
145 |
plain |
|
146 |
icon="el-icon-plus" |
|
147 |
size="mini" |
|
148 |
@click="handleAdd" |
|
149 |
v-hasPermi="['da:testDeviceInterfaceTemp:add']" |
|
150 |
>新增</el-button> |
|
151 |
</el-col> |
|
152 |
<el-col :span="1.5"> |
|
153 |
<el-button |
|
154 |
type="success" |
|
155 |
plain |
|
156 |
icon="el-icon-edit" |
|
157 |
size="mini" |
|
158 |
:disabled="single" |
|
159 |
@click="handleUpdate" |
|
160 |
v-hasPermi="['da:testDeviceInterfaceTemp:edit']" |
|
161 |
>修改</el-button> |
|
162 |
</el-col> |
|
163 |
<el-col :span="1.5"> |
|
164 |
<el-button |
|
165 |
type="danger" |
|
166 |
plain |
|
167 |
icon="el-icon-delete" |
|
168 |
size="mini" |
|
169 |
:disabled="multiple" |
|
170 |
@click="handleDelete" |
|
171 |
v-hasPermi="['da:testDeviceInterfaceTemp:remove']" |
|
172 |
>删除</el-button> |
|
173 |
</el-col> |
|
174 |
<el-col :span="1.5"> |
|
175 |
<el-button |
|
176 |
type="warning" |
|
177 |
plain |
|
178 |
icon="el-icon-download" |
|
179 |
size="mini" |
|
180 |
@click="handleExport" |
|
181 |
v-hasPermi="['da:testDeviceInterfaceTemp:export']" |
|
182 |
>导出</el-button> |
|
183 |
</el-col> |
|
184 |
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|
185 |
</el-row> |
|
186 |
|
|
187 |
<el-table border v-loading="loading" :data="testDeviceInterfaceTempList" @selection-change="handleSelectionChange"> |
|
188 |
<el-table-column type="selection" width="55" align="center" /> |
|
189 |
<el-table-column label="检验记录编号,由各设备按自定规则生成,唯一编码" align="center" prop="recordId"> |
|
190 |
</el-table-column> |
|
191 |
<el-table-column label="检测站点编号" align="center" prop="stationCode"> |
|
192 |
</el-table-column> |
|
193 |
<el-table-column label="产品序列号-pack码" align="center" prop="productNum"> |
|
194 |
</el-table-column> |
|
195 |
<el-table-column label="整体结果 " align="center" prop="totalResult"> |
|
196 |
</el-table-column> |
|
197 |
<el-table-column label="工单号" align="center" prop="workOrderNo"> |
|
198 |
</el-table-column> |
|
199 |
<el-table-column label="供应商类型" align="center" prop="supplierType"> |
|
200 |
</el-table-column> |
|
201 |
<el-table-column label="入参-参数列表" align="center" prop="checkList"> |
|
202 |
</el-table-column> |
|
203 |
<el-table-column label="状态编码" align="center" prop="resultCode"> |
|
204 |
</el-table-column> |
|
205 |
<el-table-column label="接口的返回信息,当fail时会有报错信息" align="center" prop="resultMessage"> |
|
206 |
</el-table-column> |
|
207 |
<el-table-column label="出参-参数列表" align="center" prop="resultData"> |
|
208 |
</el-table-column> |
|
209 |
<el-table-column label="备注" align="center" prop="remarks"> |
|
210 |
</el-table-column> |
|
211 |
<el-table-column label="创建用户" align="center" prop="createUser"> |
|
212 |
</el-table-column> |
|
213 |
<el-table-column label="更改用户" align="center" prop="updateUser"> |
|
214 |
</el-table-column> |
|
215 |
<el-table-column label="预留字段1" align="center" prop="spareField1"> |
|
216 |
</el-table-column> |
|
217 |
<el-table-column label="预留字段2" align="center" prop="spareField2"> |
|
218 |
</el-table-column> |
|
219 |
<el-table-column label="预留字段3" align="center" prop="spareField3"> |
|
220 |
</el-table-column> |
|
221 |
<el-table-column label="预留字段4" align="center" prop="spareField4"> |
|
222 |
</el-table-column> |
|
223 |
<el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width"> |
|
224 |
<template slot-scope="scope"> |
|
225 |
<el-button |
|
226 |
size="mini" |
|
227 |
type="success" |
|
228 |
plain |
|
229 |
style="width: 72px" |
|
230 |
icon="el-icon-edit" |
|
231 |
@click="handleUpdate(scope.row)" |
|
232 |
v-hasPermi="['da:testDeviceInterfaceTemp:edit']" |
|
233 |
>修改</el-button> |
|
234 |
<el-button |
|
235 |
size="mini" |
|
236 |
type="danger" |
|
237 |
plain |
|
238 |
style="width: 72px" |
|
239 |
icon="el-icon-delete" |
|
240 |
@click="handleDelete(scope.row)" |
|
241 |
v-hasPermi="['da:testDeviceInterfaceTemp:remove']" |
|
242 |
>删除</el-button> |
|
243 |
</template> |
|
244 |
</el-table-column> |
|
245 |
</el-table> |
|
246 |
</el-card> |
|
247 |
|
|
248 |
<pagination |
|
249 |
v-show="total>0" |
|
250 |
:total="total" |
|
251 |
:page.sync="queryParams.pageNum" |
|
252 |
:limit.sync="queryParams.pageSize" |
|
253 |
@pagination="getList" |
|
254 |
/> |
|
255 |
|
|
256 |
<!-- 添加或修改测试设备接口数据备份对话框 --> |
|
257 |
<el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> |
|
258 |
<span slot="title"> |
|
259 |
<i class="el-icon-s-order"></i> |
|
260 |
{{titleName}} |
|
261 |
</span> |
|
262 |
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|
263 |
<el-form-item label="id" prop="id"> |
|
264 |
<el-input v-model="form.id" placeholder="请输入id" /> |
|
265 |
</el-form-item> |
|
266 |
<el-form-item label="检验记录编号,由各设备按自定规则生成,唯一编码" prop="recordId"> |
|
267 |
<el-input v-model="form.recordId" placeholder="请输入检验记录编号,由各设备按自定规则生成,唯一编码" /> |
|
268 |
</el-form-item> |
|
269 |
<el-form-item label="检测站点编号" prop="stationCode"> |
|
270 |
<el-input v-model="form.stationCode" placeholder="请输入检测站点编号" /> |
|
271 |
</el-form-item> |
|
272 |
<el-form-item label="产品序列号-pack码" prop="productNum"> |
|
273 |
<el-input v-model="form.productNum" placeholder="请输入产品序列号-pack码" /> |
|
274 |
</el-form-item> |
|
275 |
<el-form-item label="整体结果 " prop="totalResult"> |
|
276 |
<el-input v-model="form.totalResult" placeholder="请输入整体结果 " /> |
|
277 |
</el-form-item> |
|
278 |
<el-form-item label="工单号" prop="workOrderNo"> |
|
279 |
<el-input v-model="form.workOrderNo" placeholder="请输入工单号" /> |
|
280 |
</el-form-item> |
|
281 |
<el-form-item label="入参-参数列表" prop="checkList"> |
|
282 |
<el-input v-model="form.checkList" placeholder="请输入入参-参数列表" /> |
|
283 |
</el-form-item> |
|
284 |
<el-form-item label="状态编码" prop="resultCode"> |
|
285 |
<el-input v-model="form.resultCode" placeholder="请输入状态编码" /> |
|
286 |
</el-form-item> |
|
287 |
<el-form-item label="接口的返回信息,当fail时会有报错信息" prop="resultMessage"> |
|
288 |
<el-input v-model="form.resultMessage" placeholder="请输入接口的返回信息,当fail时会有报错信息" /> |
|
289 |
</el-form-item> |
|
290 |
<el-form-item label="出参-参数列表" prop="resultData"> |
|
291 |
<el-input v-model="form.resultData" placeholder="请输入出参-参数列表" /> |
|
292 |
</el-form-item> |
|
293 |
<el-form-item label="备注" prop="remarks"> |
|
294 |
<el-input v-model="form.remarks" placeholder="请输入备注" /> |
|
295 |
</el-form-item> |
|
296 |
<el-form-item label="创建用户" prop="createUser"> |
|
297 |
<el-input v-model="form.createUser" placeholder="请输入创建用户" /> |
|
298 |
</el-form-item> |
|
299 |
<el-form-item label="更改用户" prop="updateUser"> |
|
300 |
<el-input v-model="form.updateUser" placeholder="请输入更改用户" /> |
|
301 |
</el-form-item> |
|
302 |
<el-form-item label="预留字段1" prop="spareField1"> |
|
303 |
<el-input v-model="form.spareField1" placeholder="请输入预留字段1" /> |
|
304 |
</el-form-item> |
|
305 |
<el-form-item label="预留字段2" prop="spareField2"> |
|
306 |
<el-input v-model="form.spareField2" placeholder="请输入预留字段2" /> |
|
307 |
</el-form-item> |
|
308 |
<el-form-item label="预留字段3" prop="spareField3"> |
|
309 |
<el-input v-model="form.spareField3" placeholder="请输入预留字段3" /> |
|
310 |
</el-form-item> |
|
311 |
<el-form-item label="预留字段4" prop="spareField4"> |
|
312 |
<el-input v-model="form.spareField4" placeholder="请输入预留字段4" /> |
|
313 |
</el-form-item> |
|
314 |
</el-form> |
|
315 |
<div slot="footer" class="dialog-footer"> |
|
316 |
<el-button type="primary" @click="submitForm">确 定</el-button> |
|
317 |
<el-button @click="cancel">取 消</el-button> |
|
318 |
</div> |
|
319 |
</el-dialog> |
|
320 |
</div> |
|
321 |
</template> |
|
322 |
|
|
323 |
<script> |
|
324 |
import { listTestDeviceInterfaceTemp, getTestDeviceInterfaceTemp, delTestDeviceInterfaceTemp, addTestDeviceInterfaceTemp, updateTestDeviceInterfaceTemp } from "@/api/main/da/testDeviceInterfaceTemp/testDeviceInterfaceTemp"; |
|
325 |
|
|
326 |
export default { |
|
327 |
name: "TestDeviceInterfaceTemp", |
|
328 |
data() { |
|
329 |
return { |
|
330 |
// 遮罩层 |
|
331 |
loading: true, |
|
332 |
titleName: "", |
|
333 |
// 选中数组 |
|
334 |
ids: [], |
|
335 |
// 非单个禁用 |
|
336 |
single: true, |
|
337 |
// 非多个禁用 |
|
338 |
multiple: true, |
|
339 |
// 显示搜索条件 |
|
340 |
showSearch: true, |
|
341 |
// 总条数 |
|
342 |
total: 0, |
|
343 |
// 测试设备接口数据备份表格数据 |
|
344 |
testDeviceInterfaceTempList: [], |
|
345 |
// 弹出层标题 |
|
346 |
title: "", |
|
347 |
// 是否显示弹出层 |
|
348 |
open: false, |
|
349 |
// 查询参数 |
|
350 |
queryParams: { |
|
351 |
pageNum: 1, |
|
352 |
pageSize: 10, |
|
353 |
recordId: null, |
|
354 |
stationCode: null, |
|
355 |
productNum: null, |
|
356 |
totalResult: null, |
|
357 |
workOrderNo: null, |
|
358 |
supplierType: null, |
|
359 |
checkList: null, |
|
360 |
resultCode: null, |
|
361 |
resultMessage: null, |
|
362 |
resultData: null, |
|
363 |
remarks: null, |
|
364 |
createUser: null, |
|
365 |
updateUser: null, |
|
366 |
spareField1: null, |
|
367 |
spareField2: null, |
|
368 |
spareField3: null, |
|
369 |
spareField4: null |
|
370 |
}, |
|
371 |
// 表单参数 |
|
372 |
form: {}, |
|
373 |
// 表单校验 |
|
374 |
rules: { |
|
375 |
id: [ |
|
376 |
{ required: true, message: "id不能为空", trigger: "blur" } |
|
377 |
], |
|
378 |
} |
|
379 |
}; |
|
380 |
}, |
|
381 |
created() { |
|
382 |
this.getList(); |
|
383 |
}, |
|
384 |
methods: { |
|
385 |
/** 查询测试设备接口数据备份列表 */ |
|
386 |
getList() { |
|
387 |
this.loading = true; |
|
388 |
listTestDeviceInterfaceTemp(this.queryParams).then(response => { |
|
389 |
this.testDeviceInterfaceTempList = response.rows; |
|
390 |
this.total = response.total; |
|
391 |
this.loading = false; |
|
392 |
}); |
|
393 |
}, |
|
394 |
// 取消按钮 |
|
395 |
cancel() { |
|
396 |
this.open = false; |
|
397 |
this.reset(); |
|
398 |
}, |
|
399 |
// 表单重置 |
|
400 |
reset() { |
|
401 |
this.form = { |
|
402 |
id: null, |
|
403 |
recordId: null, |
|
404 |
stationCode: null, |
|
405 |
productNum: null, |
|
406 |
totalResult: null, |
|
407 |
workOrderNo: null, |
|
408 |
supplierType: null, |
|
409 |
checkList: null, |
|
410 |
resultCode: null, |
|
411 |
resultMessage: null, |
|
412 |
resultData: null, |
|
413 |
remarks: null, |
|
414 |
createUser: null, |
|
415 |
createTime: null, |
|
416 |
updateUser: null, |
|
417 |
updateTime: null, |
|
418 |
spareField1: null, |
|
419 |
spareField2: null, |
|
420 |
spareField3: null, |
|
421 |
spareField4: null |
|
422 |
}; |
|
423 |
this.resetForm("form"); |
|
424 |
}, |
|
425 |
/** 搜索按钮操作 */ |
|
426 |
handleQuery() { |
|
427 |
this.queryParams.pageNum = 1; |
|
428 |
this.getList(); |
|
429 |
}, |
|
430 |
/** 重置按钮操作 */ |
|
431 |
resetQuery() { |
|
432 |
this.resetForm("queryForm"); |
|
433 |
this.handleQuery(); |
|
434 |
}, |
|
435 |
// 多选框选中数据 |
|
436 |
handleSelectionChange(selection) { |
|
437 |
this.ids = selection.map(item => item.id) |
|
438 |
this.single = selection.length!==1 |
|
439 |
this.multiple = !selection.length |
|
440 |
}, |
|
441 |
/** 新增按钮操作 */ |
|
442 |
handleAdd() { |
|
443 |
this.reset(); |
|
444 |
this.open = true; |
|
445 |
this.titleName = "添加测试设备接口数据备份"; |
|
446 |
}, |
|
447 |
/** 修改按钮操作 */ |
|
448 |
handleUpdate(row) { |
|
449 |
this.reset(); |
|
450 |
const id = row.id || this.ids |
|
451 |
getTestDeviceInterfaceTemp(id).then(response => { |
|
452 |
this.form = response.data; |
|
453 |
this.open = true; |
|
454 |
this.titleName = "修改测试设备接口数据备份"; |
|
455 |
}); |
|
456 |
}, |
|
457 |
/** 提交按钮 */ |
|
458 |
submitForm() { |
|
459 |
this.$refs["form"].validate(valid => { |
|
460 |
if (valid) { |
|
461 |
if (this.form.id != null) { |
|
462 |
updateTestDeviceInterfaceTemp(this.form).then(response => { |
|
463 |
this.$modal.msgSuccess("修改成功"); |
|
464 |
this.open = false; |
|
465 |
this.getList(); |
|
466 |
}); |
|
467 |
} else { |
|
468 |
addTestDeviceInterfaceTemp(this.form).then(response => { |
|
469 |
this.$modal.msgSuccess("新增成功"); |
|
470 |
this.open = false; |
|
471 |
this.getList(); |
|
472 |
}); |
|
473 |
} |
|
474 |
} |
|
475 |
}); |
|
476 |
}, |
|
477 |
/** 删除按钮操作 */ |
|
478 |
handleDelete(row) { |
|
479 |
const ids = row.id || this.ids; |
|
480 |
this.$modal.confirm('是否确认删除测试设备接口数据备份编号为"' + ids + '"的数据项?').then(function() { |
|
481 |
return delTestDeviceInterfaceTemp(ids); |
|
482 |
}).then(() => { |
|
483 |
this.getList(); |
|
484 |
this.$modal.msgSuccess("删除成功"); |
|
485 |
}).catch(() => {}); |
|
486 |
}, |
|
487 |
/** 导出按钮操作 */ |
|
488 |
handleExport() { |
|
489 |
this.download('da/testDeviceInterfaceTemp/export', { |
|
490 |
...this.queryParams |
|
491 |
}, `testDeviceInterfaceTemp_${new Date().getTime()}.xlsx`) |
|
492 |
} |
|
493 |
} |
|
494 |
}; |
|
495 |
</script> |