From 9c3e54696736962464909dca3f450bf4c0e87a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E8=B4=A4=E9=87=91?= <1960116313@qq.com> Date: Mon, 18 Jul 2022 09:22:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=96=B0=E5=A2=9E=E6=B5=81=E9=87=8F?= =?UTF-8?q?=E5=8E=86=E5=8F=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/communication/outbound.js | 14 +- src/api/informationmanage/carduse.js | 13 ++ .../communicationmanage/outbound/outbound.vue | 94 +++++++- src/views/informationmanage/carduse/index.vue | 213 ++++++++++++++++++ 4 files changed, 331 insertions(+), 3 deletions(-) create mode 100644 src/api/informationmanage/carduse.js create mode 100644 src/views/informationmanage/carduse/index.vue diff --git a/src/api/communication/outbound.js b/src/api/communication/outbound.js index 733e9d4..4c1f26e 100644 --- a/src/api/communication/outbound.js +++ b/src/api/communication/outbound.js @@ -74,7 +74,7 @@ export const syncRealNameStatus = (id) => { return request({ url: '/api/iot-sim/sim/syncRealNameStatus', method: 'get', - params:{ + params: { id } }) @@ -85,7 +85,17 @@ export const updateSimStatus = (row) => { return request({ url: '/api/iot-sim/sim/updateSimStatus', method: 'post', - params:{ + params: { + ...row + } + }) +} +//设置阈值 +export const updateThreshold = (row) => { + return request({ + url: '/api/iot-sim/sim/updateThreshold', + method: 'post', + params: { ...row } }) diff --git a/src/api/informationmanage/carduse.js b/src/api/informationmanage/carduse.js new file mode 100644 index 0000000..208e58f --- /dev/null +++ b/src/api/informationmanage/carduse.js @@ -0,0 +1,13 @@ +import request from '@/router/axios'; +//列表 +export const getList = (current, size, params) => { + return request({ + url: '/api/iot-sim/flowhis/page', + method: 'get', + params: { + ...params, + current, + size, + } + }) +} diff --git a/src/views/communicationmanage/outbound/outbound.vue b/src/views/communicationmanage/outbound/outbound.vue index 1c31ac1..daa2cd9 100644 --- a/src/views/communicationmanage/outbound/outbound.vue +++ b/src/views/communicationmanage/outbound/outbound.vue @@ -93,6 +93,13 @@ + + + {{ + scope.row.offNetThreshold == null ? "设置阈值" : "修改阈值" + }} + + @@ -173,6 +180,39 @@ > + + + + + + + + + 保存 + 取消 + + @@ -188,6 +228,7 @@ import { exporttype, syncRealNameStatus, updateSimStatus, + updateThreshold, } from "@/api/communication/outbound"; import { syncUsage } from "@/api/informationmanage/sim.js"; import { mapGetters } from "vuex"; @@ -229,7 +270,18 @@ export default { selectionList: [], tenantlist: [], //租户下拉 userlist: [], //用户下拉 - + // 阈值 + offShow: false, + offTitle: "", + ruleForm: { + offNetThreshold: "", + }, + offId: "", + netRules: { + offNetThreshold: [ + { required: true, message: "请输入阈值", trigger: "blur" }, + ], + }, //导出 distribution: { tenantId: "", //租户id @@ -518,6 +570,8 @@ export default { labelWidth: 130, searchLabelWidth: 124, search: false, + addDisplay: false, + editDisplay: false, width: 120, rules: [ { @@ -921,6 +975,44 @@ export default { } }); }, + //设置 修改阈值 弹窗 + handleNetThreshold(row) { + this.offShow = true; + this.offId = row.id; + if (row.offNetThreshold == null) { + this.offTitle = "设置阈值"; + } else { + this.offTitle = "修改阈值"; + this.ruleForm.offNetThreshold = row.offNetThreshold; + } + }, + //保存 阈值 + submitOff() { + this.$refs.ruleForm.validate((valid) => { + if (valid) { + updateThreshold({ + id: this.offId, + offNetThreshold: this.ruleForm.offNetThreshold, + }).then((res) => { + if (res.data.code == 200) { + this.$message.success("保存成功!"); + this.offShow = false; + this.$refs.ruleForm.resetFields(); + this.onLoad(this.page); + } else { + this.$message.success("保存失败!"); + this.offShow = false; + this.$refs.ruleForm.resetFields(); + } + }); + } + }); + }, + //取消阈值 + handleOffClose() { + this.offShow = false; + this.$refs.ruleForm.resetFields(); + }, onLoad(page, params = {}) { this.loading = true; getList( diff --git a/src/views/informationmanage/carduse/index.vue b/src/views/informationmanage/carduse/index.vue new file mode 100644 index 0000000..de9e6cc --- /dev/null +++ b/src/views/informationmanage/carduse/index.vue @@ -0,0 +1,213 @@ + + + + + + + + + +