From e10cfb4fae63266a26336729cf55604b0553dd80 Mon Sep 17 00:00:00 2001 From: nieli <329261568@qq.com> Date: Tue, 17 Jan 2023 11:41:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=A1=B9=E7=9B=AE=E7=94=B5=E4=BB=B7?= =?UTF-8?q?=E5=90=88=E5=90=8C=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- src/api/iot/contract.js | 58 +++++++++- src/views/iot/project/index.vue | 4 +- .../iot/project/profileV2/EObjectInfo.vue | 104 +++++++++++++++++- .../iot/project/profileV2/EPrice/index.vue | 26 ++--- 5 files changed, 172 insertions(+), 24 deletions(-) diff --git a/.env.development b/.env.development index c4ab480f..0a0d95d3 100644 --- a/.env.development +++ b/.env.development @@ -14,11 +14,11 @@ port= 9988 // 陈志荣 本地 //target = http://192.168.18.140:8899 // 黄明 本地 -// target = http://192.168.18.134:8899 + target = http://192.168.18.134:8899 //target = http://192.168.18.139:8899 // target = http://192.168.18.136:8899 // 测试端 - target = http://192.168.10.241:32024 +// target = http://192.168.10.241:32024 // 开发端 // target = http://192.168.10.241:30646 diff --git a/src/api/iot/contract.js b/src/api/iot/contract.js index 8a684473..6a8ddd99 100644 --- a/src/api/iot/contract.js +++ b/src/api/iot/contract.js @@ -20,7 +20,7 @@ export function getContract(contractId) { // 新增电价合同 export function addContract(data) { return request({ - url: '/iot/contract/addContract', + url: '/iot/contract', method: 'post', data: data }) @@ -51,3 +51,59 @@ export function exportContract(query) { params: query }) } + + +////////////////////// + + +// 查询电价合同列表 +export function listUserContract(query) { + return request({ + url: '/iot/userContract/list', + method: 'get', + params: query + }) +} + +// 查询电价合同详细 +export function getUserContract(contractId) { + return request({ + url: '/iot/userContract/' + contractId, + method: 'get' + }) +} + +// 新增电价合同 +export function addUserContract(data) { + return request({ + url: '/iot/userContract', + method: 'post', + data: data + }) +} + +// 修改电价合同 +export function updateUserContract(data) { + return request({ + url: '/iot/userContract', + method: 'put', + data: data + }) +} + +// 删除电价合同 +export function delUserContract(contractId) { + return request({ + url: '/iot/userContract/' + contractId, + method: 'delete' + }) +} + +// 导出电价合同 +export function exportUserContract(query) { + return request({ + url: '/iot/userContract/export', + method: 'get', + params: query + }) +} diff --git a/src/views/iot/project/index.vue b/src/views/iot/project/index.vue index 7b25e496..a9bd1841 100644 --- a/src/views/iot/project/index.vue +++ b/src/views/iot/project/index.vue @@ -201,7 +201,7 @@ - + diff --git a/src/views/iot/project/profileV2/EObjectInfo.vue b/src/views/iot/project/profileV2/EObjectInfo.vue index 2ca2aa50..be06ee83 100644 --- a/src/views/iot/project/profileV2/EObjectInfo.vue +++ b/src/views/iot/project/profileV2/EObjectInfo.vue @@ -90,6 +90,93 @@ +
+
+
+ 电价合同 + {{ contrctInfo.contractName }} +
+
+
+ +
+
+
+
合同ID
+
+ {{ contrctInfo.contractId }} + 复制 +
+
+
+
合同类型
+
+ {{ contrctInfo.contractTypeName }} +
+
+
+
合同状态
+
+ {{ + contrctInfo.status === "0" ? "启用" : "禁用" + }} +
+
+
+ +
+
+
合同规则
+
+
+
{{ item.ruleName }}
+
+ 时间: +
+ {{ item.minTime }} + ~ + {{ item.maxTime }} +
+
+
+
+ 最小值: + {{ item.minVal }} +
+
+ 最大值: + {{ item.maxVal }} +
+
+
+ 单价: + {{ item.unitPrice }} +
+
+
+
+
+
+