Commit 51fbe51a authored by wanli's avatar wanli

update

parent 19e3c344
......@@ -125,11 +125,10 @@ export function addDevice(params) {
});
}
export function deleteDevice(params) {
export function deleteDevice(id) {
return request({
url: "/api/v1/evm_store/device/delete",
method: "post",
data: params,
url: `/api/v1/evm_store/device/delete/${id}`,
method: "post"
});
}
......@@ -141,9 +140,9 @@ export function getDeviceList(params) {
});
}
export function updateDevice(params) {
export function updateDevice(id, params) {
return request({
url: "/api/v1/evm_store/device/update",
url: `/api/v1/evm_store/device/update/${id}`,
method: "post",
data: params,
});
......
......@@ -118,6 +118,7 @@ export default {
this.post.name = row.name
this.post.imei = row.imei
this.post.desc = row.desc
this.currentValue = row
this.dialogTitle = "编辑"
this.dialogVisible = true
},
......@@ -148,7 +149,7 @@ export default {
}).catch(err => {
this.$message.error(err.message)
})
else if (this.dialogTitle === '编辑') updateDevice(this.currentValue.id, compareObjectDiff(this.post, this.currentValue)).then(res => {
else if (this.dialogTitle === '编辑') updateDevice(this.currentValue.uuid, compareObjectDiff(this.post, this.currentValue)).then(res => {
console.log(res)
// this.$set(this.list, this.currentIndex, Object.assign(this.currentValue, tmp))
this.$message({ type: 'success', message: '更新成功' })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment