|
@@ -73,7 +73,10 @@
|
73
|
73
|
</el-form-item>
|
74
|
74
|
</el-form>
|
75
|
75
|
<div class="addBtn">
|
76
|
|
- <el-button type="primary" icon="el-icon-plus" @click="addTantou"
|
|
76
|
+ <el-button
|
|
77
|
+ type="primary"
|
|
78
|
+ icon="el-icon-plus"
|
|
79
|
+ @click="addTantou()"
|
77
|
80
|
>新增激光探头</el-button
|
78
|
81
|
>
|
79
|
82
|
</div>
|
|
@@ -98,11 +101,7 @@
|
98
|
101
|
align="center"
|
99
|
102
|
>
|
100
|
103
|
</el-table-column>
|
101
|
|
- <el-table-column
|
102
|
|
- prop="port"
|
103
|
|
- label="设备编号"
|
104
|
|
- align="center"
|
105
|
|
- >
|
|
104
|
+ <el-table-column prop="Port" label="设备编号" align="center">
|
106
|
105
|
</el-table-column>
|
107
|
106
|
<el-table-column prop="ipAdress" label="设备IP" align="center">
|
108
|
107
|
</el-table-column>
|
|
@@ -133,16 +132,16 @@
|
133
|
132
|
</d2-container>
|
134
|
133
|
|
135
|
134
|
<!-- //弹框 -->
|
136
|
|
- <el-dialog title="新增探头" :visible.sync="dialogTantou" id="dialogStyle">
|
|
135
|
+ <el-dialog :title="title" :visible.sync="dialogTantou" id="dialogStyle">
|
137
|
136
|
<el-form :model="dialog">
|
138
|
137
|
<el-form-item label="设备名称:" :label-width="formLabelWidth">
|
139
|
|
- <el-input v-model="dialog.name" autocomplete="off"></el-input>
|
|
138
|
+ <el-input v-model="dialog.deviceName" autocomplete="off"></el-input>
|
140
|
139
|
</el-form-item>
|
141
|
140
|
<el-form-item label="设备IP:" :label-width="formLabelWidth">
|
142
|
|
- <el-input v-model="dialog.name" autocomplete="off"></el-input>
|
|
141
|
+ <el-input v-model="dialog.ipAdress" autocomplete="off"></el-input>
|
143
|
142
|
</el-form-item>
|
144
|
143
|
<el-form-item label="设备编码:" :label-width="formLabelWidth">
|
145
|
|
- <el-input v-model="dialog.name" autocomplete="off"></el-input>
|
|
144
|
+ <el-input v-model="dialog.Port" autocomplete="off"></el-input>
|
146
|
145
|
</el-form-item>
|
147
|
146
|
</el-form>
|
148
|
147
|
<div slot="footer" class="dialog-footer">
|
|
@@ -153,11 +152,13 @@
|
153
|
152
|
</div>
|
154
|
153
|
</template>
|
155
|
154
|
<script>
|
156
|
|
-import { list } from "@/api/paramManage/hardParam";
|
|
155
|
+import api from "@/api";
|
157
|
156
|
export default {
|
158
|
157
|
name: "hardwareParame",
|
159
|
158
|
data() {
|
160
|
159
|
return {
|
|
160
|
+ //初始化弹框标题
|
|
161
|
+ title: "",
|
161
|
162
|
//仓房id
|
162
|
163
|
houseId: "",
|
163
|
164
|
//设备名称
|
|
@@ -234,14 +235,15 @@ export default {
|
234
|
235
|
hardwareList: [
|
235
|
236
|
{
|
236
|
237
|
deviceName: "",
|
237
|
|
- port:"",
|
|
238
|
+ port: "",
|
238
|
239
|
ipAdress: "",
|
239
|
|
-
|
240
|
240
|
},
|
241
|
241
|
],
|
242
|
242
|
//弹框字段
|
243
|
243
|
dialog: {
|
244
|
|
- name: "",
|
|
244
|
+ deviceName: "",
|
|
245
|
+ port: "",
|
|
246
|
+ ipAdress: "",
|
245
|
247
|
},
|
246
|
248
|
//分页
|
247
|
249
|
|
|
@@ -264,7 +266,7 @@ export default {
|
264
|
266
|
//获取列表数据
|
265
|
267
|
getList() {
|
266
|
268
|
var condition = {
|
267
|
|
- houseId: null,
|
|
269
|
+ houseId: 1,
|
268
|
270
|
deviceName: "",
|
269
|
271
|
};
|
270
|
272
|
condition = JSON.stringify(condition);
|
|
@@ -273,18 +275,21 @@ export default {
|
273
|
275
|
pageSize: this.pagination.pageSize,
|
274
|
276
|
condition: condition,
|
275
|
277
|
};
|
276
|
|
- list(data)
|
277
|
|
- .then((res) => {
|
278
|
|
- if (res.code == 200) {
|
279
|
|
- this.hardwareList = res.data.records;
|
280
|
|
- this.pagination.pageSize = res.data.size;
|
281
|
|
- this.pagination.total = res.data.total;
|
282
|
|
- }
|
283
|
|
- })
|
284
|
|
- .catch(err=>{
|
285
|
|
- console.log(err)
|
286
|
|
- });
|
|
278
|
+ api
|
|
279
|
+ .hardParam(data)
|
|
280
|
+ .then((res) => {
|
|
281
|
+ if (res.code == 200) {
|
|
282
|
+ this.hardwareList = res.data.records;
|
|
283
|
+ this.pagination.pageSize = res.data.size;
|
|
284
|
+ this.pagination.total = res.data.total;
|
|
285
|
+ }
|
|
286
|
+ })
|
|
287
|
+ .catch((err) => {
|
|
288
|
+ console.log(err);
|
|
289
|
+ });
|
287
|
290
|
},
|
|
291
|
+ //新增
|
|
292
|
+ addList(){},
|
288
|
293
|
|
289
|
294
|
filterNode(value, data) {
|
290
|
295
|
if (!value) return true;
|
|
@@ -294,6 +299,7 @@ export default {
|
294
|
299
|
reset() {},
|
295
|
300
|
//新增
|
296
|
301
|
addTantou() {
|
|
302
|
+ this.title = "新增硬件参数";
|
297
|
303
|
this.dialogTantou = true;
|
298
|
304
|
},
|
299
|
305
|
//表格序号
|
|
@@ -304,21 +310,21 @@ export default {
|
304
|
310
|
},
|
305
|
311
|
//当前页改变时
|
306
|
312
|
handleCurrentChange(val) {
|
307
|
|
- this.pagination.curPage=val;
|
|
313
|
+ this.pagination.curPage = val;
|
308
|
314
|
this.getList();
|
309
|
315
|
},
|
310
|
316
|
//每页显示的页数改变时
|
311
|
317
|
handleSizeChange(val) {
|
312
|
|
- this.pagination.pageSize = val
|
313
|
|
- this.getList()
|
|
318
|
+ this.pagination.pageSize = val;
|
|
319
|
+ this.getList();
|
314
|
320
|
},
|
315
|
321
|
//弹框确定按钮
|
316
|
322
|
determine() {},
|
317
|
323
|
},
|
318
|
|
- mounted(){
|
319
|
|
- console.log('aaaa')
|
|
324
|
+ mounted() {
|
|
325
|
+ console.log("aaaa");
|
320
|
326
|
this.getList();
|
321
|
|
- }
|
|
327
|
+ },
|
322
|
328
|
};
|
323
|
329
|
</script>
|
324
|
330
|
<style lang="scss" scoped>
|