Browse Source

fix:修改登录页 修改导出配置 修改通信管理业务逻辑

confidence
杜贤金 3 years ago
parent
commit
45db9841c5
  1. BIN
      public/img/bg/bg.png
  2. 0
      public/img/bg/big.jpg
  3. BIN
      public/img/bg/logo.png
  4. BIN
      public/img/logo.png
  5. 17
      src/api/communication/basiccard.js
  6. 4
      src/config/env.js
  7. 5
      src/main.js
  8. 2
      src/page/login/index.vue
  9. 2
      src/styles/login.scss
  10. 123
      src/views/communicationmanage/basiccard/basiccard.vue
  11. 10
      src/views/communicationmanage/device/device.vue
  12. 150
      src/views/communicationmanage/outbound/outbound.vue
  13. 27
      src/views/util/test.vue
  14. 3
      vue.config.js

BIN
public/img/bg/bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

0
public/img/bg/bg.jpg → public/img/bg/big.jpg

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

BIN
public/img/bg/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 463 KiB

BIN
public/img/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

17
src/api/communication/basiccard.js

@ -58,14 +58,14 @@ export const allocate = () => {
//租户下拉
export const tenant = () => {
return request({
url:'/api/iot-system/tenant/fillData',
url: '/api/iot-system/tenant/fillData',
method: 'get',
})
}
//分拨操作
export const simdeliver = (params) => {
return request({
url:'/api/iot-sim/simcard/simdeliver',
url: '/api/iot-sim/simcard/simdeliver',
method: 'post',
params: {
...params,
@ -75,7 +75,7 @@ export const simdeliver = (params) => {
//通道
export const channelfillData = () => {
return request({
url:'/api/iot-sim/channel/fillData',
url: '/api/iot-sim/channel/fillData',
method: 'get',
})
@ -83,7 +83,16 @@ export const channelfillData = () => {
//流量池
export const flowpoolfillData = () => {
return request({
url:'/api/iot-sim/flowpool/fillData?isSource=' + 1,
url: '/api/iot-sim/flowpool/fillData?isSource=' + 1,
method: 'get',
})
}
//基础套餐
export const dataplan = () => {
return request({
url: '/api/iot-sim/dataplan/fillData?isSource=' + 2,
method: 'get',
})

4
src/config/env.js

@ -3,12 +3,15 @@ let iconfontVersion = ['567566_pwc3oottzol'];
let iconfontUrl = `//at.alicdn.com/t/font_$key.css`;
let baseUrl = '';
let apis = '';
let codeUrl = `${baseUrl}/code`
const env = process.env
if (env.NODE_ENV === 'development') {
baseUrl = ''; // 开发环境地址
apis = "api/";
} else if (env.NODE_ENV === 'production') {
baseUrl = 'http://223.99.228.240:18081'; //生产环境地址
api = "";
} else if (env.NODE_ENV === 'test') {
baseUrl = ``; //测试环境地址
}
@ -17,5 +20,6 @@ export {
iconfontUrl,
iconfontVersion,
codeUrl,
apis,
env
}

5
src/main.js

@ -22,6 +22,7 @@ import thirdRegister from './components/third-register/main';
import avueUeditor from 'avue-plugin-ueditor';
import website from '@/config/website';
import crudCommon from '@/mixins/crud';
import {baseUrl,apis} from '@/config/env';
// 注册全局crud驱动
window.$crudCommon = crudCommon;
// 加载Vue拓展
@ -47,6 +48,10 @@ Object.keys(urls).forEach(key => {
});
// 加载website
Vue.prototype.website = website;
//加载baseUrl
Vue.prototype.baseUrl = baseUrl;
//加载baseUrl
Vue.prototype.apis = apis;
// 动态加载阿里云字体库
iconfontVersion.forEach(ele => {
loadStyle(iconfontUrl.replace('$key', ele));

2
src/page/login/index.vue

@ -8,7 +8,7 @@
<div class="login-time">
{{time}}
</div>
<img class="img" src="/img/logo.png" alt="">
<img class="img" src="http://static.qnaiot.com/sim/login-mid.png" alt="">
<p class="title">{{ $t('login.info') }}</p>
</div>
<div class="login-border">

2
src/styles/login.scss

@ -5,7 +5,7 @@
width: 100%;
height: 100%;
margin: 0 auto;
background-image: url("/img/bg/bg.jpg");
background-image: url("http://static.qnaiot.com/sim/login-bg.jpg");
background-size: 100% 100%;
}

123
src/views/communicationmanage/basiccard/basiccard.vue

@ -50,7 +50,6 @@
>&nbsp库</el-button> -->
</template>
</avue-crud>
<!-- 导出 :upload-after="uploadAfter"-->
<el-dialog
title="导入"
append-to-body
@ -114,6 +113,21 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="基础套餐" prop="dataPlanId">
<el-select
v-model="distribution.dataPlanId"
placeholder="请选择基础套餐"
size="mini"
style="width: 90%"
>
<el-option
v-for="(item, index) in basicpackge"
:label="item.name"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="开始/结束号码" prop="numbers">
<el-col :span="10">
<el-form-item prop="numStart">
@ -160,7 +174,7 @@ import {
allocate,
tenant,
simdeliver,
channelfillData,
dataplan,
} from "@/api/communication/basiccard";
import { mapGetters } from "vuex";
import { getToken } from "@/util/auth";
@ -191,6 +205,7 @@ export default {
excelForm: {
tenantId: "",
isCovered: 0,
dataPlanId: "",
},
excelOption: {
submitBtn: false,
@ -200,7 +215,7 @@ export default {
label: "通道名称",
prop: "tenantId",
type: "select",
dataType: "Number",
dataType: "String",
span: 20,
dicUrl: "/api/iot-sim/channel/fillData",
props: {
@ -215,6 +230,25 @@ export default {
},
],
},
{
label: "元套餐",
prop: "dataPlanId",
type: "select",
dicUrl: "/api/iot-sim/dataplan/fillData?isSource=" + 1,
props: {
label: "name",
value: "id",
},
dataType: "String",
span: 20,
rules: [
{
required: true,
message: "请选择元套餐",
trigger: "change",
},
],
},
{
label: "模板上传",
prop: "excelFile",
@ -268,8 +302,10 @@ export default {
deliverType: null, //
numStart: null, //
numEnd: null, //
dataPlanId: "",
}, //
distributionlist: [], //
basicpackge: [], //
tenantlist: [], //
distrules: {
tenantId: [
@ -279,6 +315,9 @@ export default {
{ required: true, message: "请选择分拨类型", trigger: "change" },
],
numbers: [{ required: true, validator: starts, trigger: "blur" }],
dataPlanId: [
{ required: true, message: "请选择基础套餐", trigger: "change" },
],
},
channellist: [], //
ruleForm: {}, //
@ -303,12 +342,21 @@ export default {
addBtn: true,
viewBtn: true,
delBtn: true,
excelBtn: false, //
excelBtn: false,
columnBtn: false,
selection: false,
dialogClickModal: false,
dialogWidth: "60%",
column: [
{
label: "id",
prop: "id",
type: "input",
search: false,
addDisplay:false,
editDisplay:false,
width:170,
},
{
label: "通道名称",
prop: "channelId",
@ -316,6 +364,7 @@ export default {
dataType: "String",
span: 12,
labelWidth: 130,
width:100,
search: true,
dicUrl: "/api/iot-sim/channel/fillData",
props: {
@ -338,6 +387,7 @@ export default {
span: 12,
labelWidth: 130,
searchLabelWidth: 110,
width: 110,
search: true,
display: true,
dicUrl: "/api/iot-sim/flowpool/fillData?isSource=" + 1,
@ -360,12 +410,35 @@ export default {
},
],
},
{
label: "元套餐",
prop: "dataPlanId",
type: "select",
dicUrl: "/api/iot-sim/dataplan/fillData?isSource=" + 1,
props: {
label: "name",
value: "id",
},
dataType: "String",
span: 12,
labelWidth: 130,
searchLabelWidth: 110,
search: true,
rules: [
{
required: true,
message: "请选择元套餐",
trigger: "change",
},
],
},
{
label: "批次号",
prop: "batchNum",
span: 12,
labelWidth: 130,
search: true,
width:115,
addDisplay: false,
rules: [
{
@ -410,6 +483,7 @@ export default {
prop: "msisdn",
span: 12,
labelWidth: 130,
width:110,
search: true,
rules: [
{
@ -448,6 +522,8 @@ export default {
dataType: "number",
span: 12,
labelWidth: 130,
addDisplay:false,
editDisplay:false,
width: 70,
search: true,
rules: [
@ -513,18 +589,23 @@ export default {
created() {
this.allocatelist(); //
this.tenantlists(); //
this.basicpackges(); //
},
watch: {
"excelForm.tenantId"() {
const column = this.findObject(this.excelOption.column, "excelFile");
if (this.excelForm.tenantId != "") {
if (process.env.NODE_ENV === "production") {
if (this.excelForm.tenantId != "" && this.excelForm.dataPlanId != "") {
column.display = true;
column.action = `http://223.99.228.240:18081/iot-sim/simcard/import-simCard?channelId=${this.excelForm.tenantId}&isCovered=${this.excelForm.isCovered}`;
column.action = `${this.baseUrl}/${this.apis}iot-sim/simcard/import-simCard?channelId=${this.excelForm.tenantId}&isCovered=${this.excelForm.isCovered}&dataPlanId=${this.excelForm.dataPlanId}`;
} else {
column.display = true;
column.action = `/api/iot-sim/simcard/import-simCard?channelId=${this.excelForm.tenantId}&isCovered=${this.excelForm.isCovered}`;
column.display = false;
}
},
"excelForm.dataPlanId"() {
const column = this.findObject(this.excelOption.column, "excelFile");
if (this.excelForm.tenantId != "" && this.excelForm.dataPlanId != "") {
column.display = true;
column.action = `${this.baseUrl}/${this.apis}iot-sim/simcard/import-simCard?channelId=${this.excelForm.tenantId}&isCovered=${this.excelForm.isCovered}&dataPlanId=${this.excelForm.dataPlanId}`;
} else {
column.display = false;
}
@ -532,11 +613,7 @@ export default {
"excelForm.isCovered"() {
const column = this.findObject(this.excelOption.column, "excelFile");
if (this.excelForm.isCovered !== "") {
if (process.env.NODE_ENV === "production") {
column.action = `http://223.99.228.240:18081/iot-sim/simcard/import-simCard?channelId=${this.excelForm.tenantId}&isCovered=${this.excelForm.isCovered}`;
} else {
column.action = `/api/iot-sim/simcard/import-simCard?channelId=${this.excelForm.tenantId}&isCovered=${this.excelForm.isCovered}`;
}
column.action = `${this.baseUrl}/${this.apis}iot-sim/simcard/import-simCard?channelId=${this.excelForm.tenantId}&isCovered=${this.excelForm.isCovered}&dataPlanId=${this.excelForm.dataPlanId}`;
}
},
"form.$channelId"() {
@ -678,19 +755,11 @@ export default {
},
//
handleExport() {
if (process.env.NODE_ENV === "production") {
window.open(
`http://223.99.228.240:18081/bd-core/tenant/dailybill/export-excel?${
`${this.baseUrl}/${this.apis}iot-sim/simcard/export-simCard?${
this.website.tokenHeader
}=${getToken()}`
);
} else {
window.open(
`/api/iot-sim/simcard/export-simCard?${
this.website.tokenHeader
}=${getToken()}`
);
}
},
//
handleImport() {
@ -723,6 +792,14 @@ export default {
}
});
},
//
basicpackges() {
dataplan().then((res) => {
if (res.data.code == 200) {
this.basicpackge = res.data.data;
}
});
},
//
tenantlists() {
tenant().then((res) => {

10
src/views/communicationmanage/device/device.vue

@ -310,19 +310,11 @@ export default {
},
//
handleExport() {
if (process.env.NODE_ENV === "production") {
window.open(
`http://223.99.228.240:18081/iot-sim/device/export-device?${
`${this.baseUrl}/${this.apis}iot-sim/device/export-device?${
this.website.tokenHeader
}=${getToken()}`
);
} else {
window.open(
`/api/iot-sim/device/export-device?${
this.website.tokenHeader
}=${getToken()}`
);
}
},
onLoad(page, params = {}) {
this.loading = true;

150
src/views/communicationmanage/outbound/outbound.vue

@ -62,7 +62,7 @@ export default {
addBtn: true,
viewBtn: true,
delBtn: true,
dialogDrag:true,
dialogDrag: true,
columnBtn: false,
selection: false,
dialogClickModal: false,
@ -154,10 +154,33 @@ export default {
],
},
{
label: "卡状态",
prop: "cardStatus",
label: "基础套餐",
prop: "dataPlanId",
type: "select",
dicUrl: "/api/iot-system/dict/dictionary?code=card_status",
dicUrl: "/api/iot-sim/dataplan/fillData?isSource="+2,
props: {
label: "name",
value: "id",
},
dataType: "String",
span: 12,
labelWidth: 130,
searchLabelWidth: 110,
width:110,
search: true,
rules: [
{
required: true,
message: "请选择基础套餐",
trigger: "change",
},
],
},
{
label: "生命周期状态",
prop: "lifecycleStatus",
type: "select",
dicUrl: "/api/iot-system/dict/dictionary?code=lifecycleStatus",
props: {
label: "dictValue",
value: "dictKey",
@ -165,10 +188,15 @@ export default {
dataType: "number",
span: 12,
labelWidth: 130,
width: 70,
searchLabelWidth: 110,
width: 110,
search: true,
rules: [
{ required: true, message: "请选择卡状态", trigger: "change" },
{
required: true,
message: "请选择生命周期状态",
trigger: "change",
},
],
},
{
@ -189,6 +217,89 @@ export default {
{ required: true, message: "请选择卡类型", trigger: "change" },
],
},
{
label: "是否断网",
prop: "offNetStatus",
type: "select",
dicUrl: "/api/iot-system/dict/dictionary?code=off_netStatus",
props: {
label: "dictValue",
value: "dictKey",
},
dataType: "number",
span: 12,
labelWidth: 130,
width: 70,
search: false,
rules: [
{ required: true, message: "请选择是否断网", trigger: "change" },
],
},
{
label: "断网类型",
prop: "offNetType",
type: "select",
dicUrl: "/api/iot-system/dict/dictionary?code=off_netType",
props: {
label: "dictValue",
value: "dictKey",
},
dataType: "number",
display: true,
span: 12,
formatter: (val, value, label) => {
if (value == -1) {
return "-";
} else {
return `${label}`;
}
},
labelWidth: 130,
width: 70,
search: false,
rules: [
{ required: true, message: "请选择断网类型", trigger: "change" },
],
},
{
label: "实名状态",
prop: "realNameStats",
type: "select",
dicUrl: "/api/iot-system/dict/dictionary?code=real_nameStats",
props: {
label: "dictValue",
value: "dictKey",
},
dataType: "number",
span: 12,
labelWidth: 130,
width: 70,
search: false,
rules: [
{ required: true, message: "请选择实名状态", trigger: "change" },
],
},
{
label: "达量断网阙值(M)",
prop: "offNetThreshold",
span: 12,
labelWidth: 130,
searchLabelWidth: 124,
search: false,
width:120,
rules: [
{
required: true,
message: "请输入达量断网阙值",
trigger: "blur",
},
{
pattern: /^\d+(\.\d+)?$/,
message: "请输入正确的阙值",
trigger: "blur",
},
],
},
{
label: "批次号",
prop: "batchNum",
@ -291,7 +402,8 @@ export default {
labelWidth: 130,
type: "number",
hide: true,
rules: [{ required: true, message: "请输入总量", trigger: "blur" },
rules: [
{ required: true, message: "请输入总量", trigger: "blur" },
{
pattern: /^\d+(\.\d+)?$/,
message: "请输入正确的总量",
@ -316,6 +428,20 @@ export default {
}
}
},
"form.$offNetStatus"() {
const columns = this.findObject(this.option.column, "offNetType");
if (this.form.$offNetStatus != undefined) {
if (this.form.$offNetStatus == "未断网") {
columns.display = false;
this.form.offNetType = "";
} else {
columns.display = true;
}
}
},
},
created() {
console.log(this.baseUrl, "baseUrl");
},
computed: {
...mapGetters(["permission"]),
@ -410,19 +536,11 @@ export default {
},
//
handleExport() {
if (process.env.NODE_ENV === "production") {
window.open(
`http://223.99.228.240:18081/iot-sim/simcarddeliver/export-simCardDeliver?${
`${this.baseUrl}/${this.apis}iot-sim/simcarddeliver/export-simCardDeliver?${
this.website.tokenHeader
}=${getToken()}`
);
} else {
window.open(
`/api/iot-sim/simcarddeliver/export-simCardDeliver?${
this.website.tokenHeader
}=${getToken()}`
);
}
},
onLoad(page, params = {}) {
this.loading = true;

27
src/views/util/test.vue

@ -18,15 +18,28 @@
@refresh-change="refreshChange"
@on-load="onLoad"
>
<!-- 自定义顶部按钮 -->
<template slot-scope="scope" slot="menuLeft">
<el-button type="danger" icon="el-icon-plus" size="small" @click="next"
>下一页</el-button
>
</template>
<!-- 操作栏是否显示 -->
<template slot-scope="scope" slot="menuBtn">
<el-dropdown-item>
<span class="el-icon-edit">文字按钮</span>
</el-dropdown-item>
<el-dropdown-item>
<span class="el-icon-edit">文字按钮</span>
</el-dropdown-item>
<el-dropdown-item>
<span class="el-icon-edit">文字按钮</span>
<el-popconfirm
confirm-button-text="好的"
cancel-button-text="不用了"
icon="el-icon-info"
icon-color="red"
title="这是一段内容确定删除吗?"
placement="top-start"
>
<div slot="reference">删除</div>
</el-popconfirm>
</el-dropdown-item>
</template>
</avue-crud>
@ -40,6 +53,7 @@ import { mapGetters } from "vuex";
export default {
data() {
return {
visible: false,
form: {},
query: {},
// loading: true,
@ -234,6 +248,11 @@ export default {
// },
},
methods: {
//popper
handleSure() {
this.visible = false;
this.$message.success("确定");
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then((res) => {

3
vue.config.js

@ -25,12 +25,13 @@ module.exports = {
//开发模式反向代理配置,生产模式请使用Nginx部署并配置反向代理
devServer: {
port: 1888,
open: true,
proxy: {
'/api': {
//本地服务接口地址
// target: 'http://192.168.1.106:8081', // 民
// target: 'http://192.168.1.253:8081',//测试环境
target: 'http://192.168.1.120:9081',//吴
target: 'http://192.168.1.120:9081', //吴
// target: 'http://223.99.228.240:18081', // 生产环境
ws: true,
pathRewrite: {

Loading…
Cancel
Save