From d7bbc912258b8a423e0a823f13ced75cdb33cb82 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com>
Date: Wed, 25 Sep 2024 14:56:38 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=8A=95=E8=B5=84=E4=BA=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/system/bindRecord.js | 30 +-
src/api/system/device.js | 16 +-
.../Business/Dept/DeptTreeSelect.vue | 1 -
src/views/system/bindRecord/index.vue | 402 ++++++++++++++++++
.../device/components/DeviceBindInvestor.vue | 71 ++++
.../system/device/components/bindRecord.vue | 71 ----
src/views/system/device/detail.vue | 18 +-
src/views/system/device/index.vue | 74 +++-
src/views/system/smUser/index.vue | 1 +
9 files changed, 590 insertions(+), 94 deletions(-)
create mode 100644 src/views/system/bindRecord/index.vue
create mode 100644 src/views/system/device/components/DeviceBindInvestor.vue
delete mode 100644 src/views/system/device/components/bindRecord.vue
diff --git a/src/api/system/bindRecord.js b/src/api/system/bindRecord.js
index a1e5968..d12b102 100644
--- a/src/api/system/bindRecord.js
+++ b/src/api/system/bindRecord.js
@@ -10,10 +10,36 @@ export function listBindRecord(query) {
}
// 查询设备绑定记录详细
-export function getBindRecord(bindRecordId) {
+export function getBindRecord(recordId) {
return request({
- url: '/system/bindRecord/' + bindRecordId,
+ url: '/system/bindRecord/' + recordId,
method: 'get'
})
}
+// 新增设备绑定记录
+export function addBindRecord(data) {
+ return request({
+ url: '/system/bindRecord',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改设备绑定记录
+export function updateBindRecord(data) {
+ return request({
+ url: '/system/bindRecord',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除设备绑定记录
+export function delBindRecord(recordId) {
+ return request({
+ url: '/system/bindRecord/' + recordId,
+ method: 'delete'
+ })
+}
+
diff --git a/src/api/system/device.js b/src/api/system/device.js
index 3ec8e02..00e6fe0 100644
--- a/src/api/system/device.js
+++ b/src/api/system/device.js
@@ -122,13 +122,25 @@ export function switchDevice(deviceId, open) {
}
// 强制解绑设备
-export function unbind(deviceId) {
+export function unbindInvestor(deviceId) {
return request({
- url: `/system/device/${deviceId}/unbind`,
+ url: `/system/device/${deviceId}/unbindInvestor`,
method: 'delete'
})
}
+// 投资人绑定设备
+export function bindInvestor(deviceId, userId) {
+ return request({
+ url: `/system/device/bindInvestor`,
+ method: 'put',
+ params: {
+ deviceId,
+ userId
+ }
+ })
+}
+
// 更新设备服务费
export function updateDeviceServiceRate(deviceId, serviceRate) {
return request({
diff --git a/src/components/Business/Dept/DeptTreeSelect.vue b/src/components/Business/Dept/DeptTreeSelect.vue
index 0a37a11..f1a64f3 100644
--- a/src/components/Business/Dept/DeptTreeSelect.vue
+++ b/src/components/Business/Dept/DeptTreeSelect.vue
@@ -71,7 +71,6 @@ export default {
};
},
onSelect(data) {
- console.log('data', data)
this.$emit('select', data)
}
}
diff --git a/src/views/system/bindRecord/index.vue b/src/views/system/bindRecord/index.vue
new file mode 100644
index 0000000..2c9979b
--- /dev/null
+++ b/src/views/system/bindRecord/index.vue
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+ {{d.row[column.key]}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ()
+
+
+ {{d.row[column.key]}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/device/components/DeviceBindInvestor.vue b/src/views/system/device/components/DeviceBindInvestor.vue
new file mode 100644
index 0000000..67ef505
--- /dev/null
+++ b/src/views/system/device/components/DeviceBindInvestor.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
diff --git a/src/views/system/device/components/bindRecord.vue b/src/views/system/device/components/bindRecord.vue
deleted file mode 100644
index 1d5a05e..0000000
--- a/src/views/system/device/components/bindRecord.vue
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
diff --git a/src/views/system/device/detail.vue b/src/views/system/device/detail.vue
index ac895ad..18c91c0 100644
--- a/src/views/system/device/detail.vue
+++ b/src/views/system/device/detail.vue
@@ -131,14 +131,17 @@
-
-
+
+
-
+
+
+
+
@@ -162,14 +165,13 @@