|
@@ -32,7 +32,6 @@
|
|
|
</div>
|
|
|
<!-- 添加/编辑 设备-->
|
|
|
<el-scrollbar style="height:400px;">
|
|
|
-
|
|
|
<el-dialog
|
|
|
:title="deviceMsg"
|
|
|
:visible.sync="dialogVisible"
|
|
@@ -40,11 +39,11 @@
|
|
|
>
|
|
|
<template slot="title">
|
|
|
<div class="alertTitle">
|
|
|
- <span>添加设备</span>
|
|
|
+ <span>{{deviceMsg}}</span>
|
|
|
<el-button type="text"><span class="el-icon-question"></span>维护帮助</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template v-if="status == '添加'">
|
|
|
+ <template v-if="deviceMsg == '添加设备'">
|
|
|
<template v-if="next">
|
|
|
<div class="align" style="height: 400px">
|
|
|
<span class="text ">设备类别</span>
|
|
@@ -62,9 +61,7 @@
|
|
|
</span>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <div>
|
|
|
- <dataForm :deviceHeaders="deviceHeaders" ref="dataForm"/>
|
|
|
- </div>
|
|
|
+ <dataForm :deviceHeaders="deviceHeaders" ref="dataForm" :currRowContent="currRowContent"/>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="handleDataForm">确 定</el-button>
|
|
|
<el-button @click="handlePosition">维护位置</el-button>
|
|
@@ -80,7 +77,7 @@
|
|
|
</span>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <dataForm :deviceHeaders="deviceHeaders" ref="dataForm" :currRowContent="currRowContent"/>
|
|
|
+ <dataForm :deviceHeaders="deviceHeaders" ref="dataForm" :currRowContent="currRowContent"/>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="handleDataForm">确 定</el-button>
|
|
|
<el-button @click="handlePosition">维护位置</el-button>
|
|
@@ -155,7 +152,7 @@ export default class extends Vue {
|
|
|
// 下一步
|
|
|
next = true
|
|
|
// 弹窗 title
|
|
|
- deviceMsg = '添加设备'
|
|
|
+ deviceMsg = ''
|
|
|
// 默认当前阶段
|
|
|
currentHeader = ''
|
|
|
// 主体数据
|
|
@@ -164,8 +161,7 @@ export default class extends Vue {
|
|
|
deviceHeaders = {}
|
|
|
// 当前行数据
|
|
|
currRowContent = {}
|
|
|
- // 弹窗显示
|
|
|
- status = '添加'
|
|
|
+
|
|
|
// 维护位置开关
|
|
|
maintain = ''
|
|
|
// 传到维护位置的设备信息
|
|
@@ -380,7 +376,7 @@ export default class extends Vue {
|
|
|
|
|
|
// 添加设备
|
|
|
addDevice() {
|
|
|
- this.status = '添加'
|
|
|
+ this.deviceMsg = '添加设备'
|
|
|
this.dialogVisible = true
|
|
|
this.currRowContent = {}
|
|
|
}
|
|
@@ -388,6 +384,7 @@ export default class extends Vue {
|
|
|
|
|
|
// 维护位置
|
|
|
handlePosition() {
|
|
|
+ this.currentRow = this.$refs.dataForm.form
|
|
|
this.$refs.dataForm.submitForm(this.handlePositionSave)
|
|
|
}
|
|
|
|
|
@@ -415,7 +412,7 @@ export default class extends Vue {
|
|
|
|
|
|
// 编辑当前行
|
|
|
handleCurrentEdit(val: object) {
|
|
|
- this.status = '编辑'
|
|
|
+ this.deviceMsg = '编辑设备'
|
|
|
this.currRowContent = val
|
|
|
this.handleNext()
|
|
|
this.dialogVisible = true
|
|
@@ -500,6 +497,8 @@ export default class extends Vue {
|
|
|
// 返回
|
|
|
goBack() {
|
|
|
this.displayLocation = false
|
|
|
+ this.currRowContent = this.currentRow
|
|
|
+ console.log(this.currentRow, this.currRowContent)
|
|
|
}
|
|
|
|
|
|
@Watch("deviceType", { immediate: true, deep: true })
|