diff --git a/package.json b/package.json index 998e7d7..8350900 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", + "moment": "^2.24.0", "normalize.css": "7.0.0", "nprogress": "0.2.0", "v-charts": "^1.19.0", diff --git a/package.json b/package.json index 998e7d7..8350900 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", + "moment": "^2.24.0", "normalize.css": "7.0.0", "nprogress": "0.2.0", "v-charts": "^1.19.0", diff --git a/src/api/device.js b/src/api/device.js index b08d4a7..6dcf2de 100644 --- a/src/api/device.js +++ b/src/api/device.js @@ -112,3 +112,15 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 绑定设备 +export function syncRecords(params) { + return request({ + url: 'records/syncRecord', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/package.json b/package.json index 998e7d7..8350900 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", + "moment": "^2.24.0", "normalize.css": "7.0.0", "nprogress": "0.2.0", "v-charts": "^1.19.0", diff --git a/src/api/device.js b/src/api/device.js index b08d4a7..6dcf2de 100644 --- a/src/api/device.js +++ b/src/api/device.js @@ -112,3 +112,15 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 绑定设备 +export function syncRecords(params) { + return request({ + url: 'records/syncRecord', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/views/deviceManage/listDevice.vue b/src/views/deviceManage/listDevice.vue index c8b610d..8a3c16b 100644 --- a/src/views/deviceManage/listDevice.vue +++ b/src/views/deviceManage/listDevice.vue @@ -5,6 +5,7 @@
设备列表
+ 同步识别记录 设备数据下发 删除 新增 @@ -42,12 +43,14 @@ + + +