sale-client-xianyang 3.3.444 → 3.3.445
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -131,7 +131,21 @@ export default {
|
|
|
131
131
|
this.show_devices = !this.show_devices
|
|
132
132
|
},
|
|
133
133
|
deleteDevice (index, row) {
|
|
134
|
-
|
|
134
|
+
if (row.id) {
|
|
135
|
+
this.$showMessage('此操作无法还原,是否确定要删除此设备?', ['confirm', 'cancel']).then((res) => {
|
|
136
|
+
if (res === 'confirm') {
|
|
137
|
+
let sql = `delete from t_devices where id = ${row.id}`
|
|
138
|
+
this.$resetpost('/rs/logic/runSQL', {data: {sql: sql}}, {
|
|
139
|
+
resolveMsg: `成功删除此设备`,
|
|
140
|
+
rejectMsg: '删除设备失败'
|
|
141
|
+
}).then((res) => {
|
|
142
|
+
this.devicesinfo.splice(index, 1)
|
|
143
|
+
})
|
|
144
|
+
}
|
|
145
|
+
})
|
|
146
|
+
} else {
|
|
147
|
+
this.devicesinfo.splice(index, 1)
|
|
148
|
+
}
|
|
135
149
|
},
|
|
136
150
|
addDevice () {
|
|
137
151
|
console.log('设备信息', this.devicesinfo)
|