|
@@ -82,6 +82,11 @@ export default {
|
|
|
ids: []
|
|
|
};
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ ids(val){
|
|
|
+ this.dialogForm.deviceIds = val.join(',')
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
devList().then(res => {
|
|
|
if (res.code === 0) {
|
|
@@ -135,6 +140,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
+ this.ids = []
|
|
|
this.dialogForm = {}
|
|
|
this.title = '新增'
|
|
|
}
|
|
@@ -142,8 +148,7 @@ export default {
|
|
|
|
|
|
// 创建
|
|
|
getSubmit() {
|
|
|
- this.dialogForm.deviceIds = this.ids.join(',')
|
|
|
- if (this.title = '编辑') {
|
|
|
+ if (this.title === '编辑') {
|
|
|
editPage(this.dialogForm).then(res => {
|
|
|
if (res.code === 0) {
|
|
|
this.$message.success('修改成功!')
|