From bf67c4321b8ef61171870144654a68eb34245a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E8=B4=A4=E9=87=91?= <1960116313@qq.com> Date: Thu, 28 Apr 2022 10:36:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E5=BC=95=E5=85=A5=20=20=20=E8=AE=BE=E5=A4=87=E5=AF=BC=E5=85=A5?= =?UTF-8?q?(=E5=90=8E=E7=AB=AF=E5=BC=80=E5=8F=91=E4=B8=AD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/communication/basiccard.js | 11 +++ .../basiccard/basiccard.vue | 90 +++++++++++++------ .../communicationmanage/device/device.vue | 15 ---- .../targetpackagegroupmanage/index.vue | 1 - src/views/package/packagegroup/index.vue | 1 - 5 files changed, 74 insertions(+), 44 deletions(-) diff --git a/src/api/communication/basiccard.js b/src/api/communication/basiccard.js index 7f49abc..edd3dd6 100644 --- a/src/api/communication/basiccard.js +++ b/src/api/communication/basiccard.js @@ -72,6 +72,17 @@ export const simdeliver = (params) => { } }) } +//回拨操作 +export const simCallback = (params) => { + return request({ + url: '/api/iot-sim/simcard/simCallback', + method: 'post', + params: { + ...params, + } + }) +} + //通道 export const channelfillData = () => { return request({ diff --git a/src/views/communicationmanage/basiccard/basiccard.vue b/src/views/communicationmanage/basiccard/basiccard.vue index c5f9a07..c125c03 100644 --- a/src/views/communicationmanage/basiccard/basiccard.vue +++ b/src/views/communicationmanage/basiccard/basiccard.vue @@ -38,10 +38,17 @@ <el-button type="primary" size="small" - icon="el-icon-share" - @click="handleAllocate" + icon="el-icon-sort-up" + @click="handleAllocate(1)" >分拨</el-button > + <el-button + type="primary" + size="small" + icon="el-icon-sort-down" + @click="handleAllocate(2)" + >回拨</el-button + > <el-button type="danger" size="small" @@ -73,7 +80,7 @@ </el-dialog> <!-- 分拨弹窗 --> <el-dialog - title="分拨" + :title="distitle" :visible.sync="dialogVisible" append-to-body width="35%" @@ -85,7 +92,11 @@ :rules="distrules" label-width="120px" > - <el-form-item label="分拨租户" prop="tenantId"> + <el-form-item + label="分拨租户" + prop="tenantId" + v-if="distitle == '分拨'" + > <el-select v-model="distribution.tenantId" placeholder="请选择分拨租户" @@ -100,7 +111,11 @@ ></el-option> </el-select> </el-form-item> - <el-form-item label="分拨类型" prop="deliverType"> + <el-form-item + label="分拨类型" + prop="deliverType" + v-if="distitle == '分拨'" + > <el-select v-model="distribution.deliverType" placeholder="请选择分拨类型" @@ -115,7 +130,11 @@ ></el-option> </el-select> </el-form-item> - <el-form-item label="基础套餐" prop="dataPlanId"> + <el-form-item + label="基础套餐" + prop="dataPlanId" + v-if="distitle == '分拨'" + > <el-select v-model="distribution.dataPlanId" placeholder="请选择基础套餐" @@ -177,6 +196,7 @@ import { tenant, simdeliver, dataplan, + simCallback, } from "@/api/communication/basiccard"; import { mapGetters } from "vuex"; import { getToken } from "@/util/auth"; @@ -204,6 +224,7 @@ export default { }; return { form: {}, + distitle: "", //分回拨标题 excelForm: { tenantId: "", isCovered: 0, @@ -306,6 +327,10 @@ export default { numEnd: null, //结束号码 dataPlanId: "", }, //分拨 + redistribution: { + numStart: null, //开始号码 + numEnd: null, //结束号码 + }, //回拨 distributionlist: [], //分拨类型下拉 basicpackge: [], //基础套餐下拉 tenantlist: [], //租户下拉 @@ -324,6 +349,7 @@ export default { channellist: [], //通道下拉 ruleForm: {}, //导入 dialogVisible: false, //分拨弹窗布尔 + dialogVisibles: false, //分拨弹窗布尔 query: {}, selectionList: [], loading: false, @@ -824,7 +850,12 @@ export default { }); }, //分拨弹窗开启 - handleAllocate() { + handleAllocate(e) { + if (e == 1) { + this.distitle = "分拨"; + } else { + this.distitle = "回拨"; + } this.dialogVisible = true; }, //分拨弹窗关闭 @@ -836,30 +867,35 @@ export default { handleSubmit() { this.$refs.distribution.validate((valid) => { if (valid) { - simdeliver(this.distribution).then((res) => { - if (res.data.data == "") { - this.$message.success("操作成功"); - this.$refs.distribution.resetFields(); - this.dialogVisible = false; - } else { - const h = this.$createElement; - this.$notify.error({ - title: "出库失败号码", - message: h( - "i", - { style: "color: teal; word-break: break-all;" }, - res.data.data - ), - duration: 0, - }); - this.$refs.distribution.resetFields(); - this.dialogVisible = false; - } - }); + if (this.distitle == "分拨") { + simdeliver(this.distribution).then((res) => { + if (res.data.data == "") { + this.$message.success("操作成功"); + this.$refs.distribution.resetFields(); + this.dialogVisible = false; + } else { + const h = this.$createElement; + this.$notify.error({ + title: "出库失败号码", + message: h( + "i", + { style: "color: teal; word-break: break-all;" }, + res.data.data + ), + duration: 0, + }); + this.$refs.distribution.resetFields(); + this.dialogVisible = false; + } + }); + } else { + // 写回播 + } } else { } }); }, + onLoad(page, params = {}) { this.loading = true; getList( diff --git a/src/views/communicationmanage/device/device.vue b/src/views/communicationmanage/device/device.vue index 17da7cb..8a58c65 100644 --- a/src/views/communicationmanage/device/device.vue +++ b/src/views/communicationmanage/device/device.vue @@ -443,21 +443,6 @@ export default { this.refreshChange(); done(); }, - handleExport() { - this.$confirm("是否导出用户数据?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }).then(() => { - window.open( - `/api/iot-system/user/export-user?${ - this.website.tokenHeader - }=${getToken()}&account=${this.search.account}&realName=${ - this.search.realName - }` - ); - }); - }, currentChange(currentPage) { this.page.currentPage = currentPage; }, diff --git a/src/views/original/targetpackagegroupmanage/index.vue b/src/views/original/targetpackagegroupmanage/index.vue index 0a1c01b..ee15ae3 100644 --- a/src/views/original/targetpackagegroupmanage/index.vue +++ b/src/views/original/targetpackagegroupmanage/index.vue @@ -33,7 +33,6 @@ import { } from "@/api/packagemanage/packgegroup"; import { mapGetters } from "vuex"; import { getToken } from "@/util/auth"; -import { number } from "mathjs"; export default { data() { return { diff --git a/src/views/package/packagegroup/index.vue b/src/views/package/packagegroup/index.vue index 1c6145c..0e2ded8 100644 --- a/src/views/package/packagegroup/index.vue +++ b/src/views/package/packagegroup/index.vue @@ -33,7 +33,6 @@ import { } from "@/api/packagemanage/packgegroup"; import { mapGetters } from "vuex"; import { getToken } from "@/util/auth"; -import { number } from "mathjs"; export default { data() { return {