|
@@ -64,7 +64,7 @@
|
|
|
<my-cascader ref="cascader" @change="changeAddType"></my-cascader>
|
|
|
</el-row>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="addDevice">下 一 步</el-button>
|
|
|
+ <el-button type="primary" @click="toAddDevice">下 一 步</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -194,6 +194,7 @@ export default {
|
|
|
deviceType: {}, //族3位编码及名称
|
|
|
floorData: [],
|
|
|
curDevice:'',//当前点击的设备id
|
|
|
+ addData:{}, //添加设备选择的设备类型
|
|
|
};
|
|
|
},
|
|
|
created() { },
|
|
@@ -350,19 +351,26 @@ export default {
|
|
|
},
|
|
|
//添加设备
|
|
|
addDevice() {
|
|
|
+ this.myDialog.addDevice = true
|
|
|
if (this.mess.deviceId) {
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.$refs.cascader.setValue([this.mess.deviceId])
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //下一步
|
|
|
+ toAddDevice(){
|
|
|
+ if (this.addData.deviceId) {
|
|
|
this.$router.push({
|
|
|
path: "/ledger/addevice",
|
|
|
- query: this.mess
|
|
|
+ query: this.addData
|
|
|
});
|
|
|
- } else {
|
|
|
- this.myDialog.addDevice = true
|
|
|
- }
|
|
|
+ }
|
|
|
},
|
|
|
//选择设备类型-添加设备
|
|
|
changeAddType(val) {
|
|
|
- this.mess.deviceId = val.code;
|
|
|
- this.mess.name = val.facility;
|
|
|
+ this.addData.deviceId = val.code;
|
|
|
+ this.addData.name = val.facility;
|
|
|
},
|
|
|
//下载
|
|
|
download() {
|
|
@@ -583,6 +591,8 @@ export default {
|
|
|
let val = this.hot.colToProp(row.col);
|
|
|
this.row = row.row;
|
|
|
this.messKey = val;
|
|
|
+ console.log(val)
|
|
|
+ return
|
|
|
switch (val) {
|
|
|
//操作
|
|
|
case 'caozuo':
|