|
@@ -1,156 +1,158 @@
|
|
|
<template>
|
|
|
- <a-modal width="70%" :visible="visible" :title="'卡详情' + Card_info.iccid" :hide-cancel='true'
|
|
|
- :ok-text="$t('lotCard.close')" @ok="handleSubmit" @cancel="handleCancel" draggable>
|
|
|
- <!-- 卡片信息 -->
|
|
|
- <a-row class="grid-demo" :gutter="24">
|
|
|
+ <a-modal width="70%" :visible="visible" :title="'卡详情' + Card_info.iccid" :hide-cancel='true'
|
|
|
+ :ok-text="$t('lotCard.close')" @ok="handleSubmit" @cancel="handleCancel" draggable>
|
|
|
+ <!-- 卡片信息 -->
|
|
|
+ <a-row class="grid-demo" :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form :model="Card_info" auto-label-width label-align="left" class="toal_Form">
|
|
|
+ <a-row :gutter="10">
|
|
|
<a-col :span="12">
|
|
|
- <a-form :model="Card_info" auto-label-width label-align="left" class="toal_Form">
|
|
|
- <a-row :gutter="10">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="ICCID">
|
|
|
- {{ Card_info.iccid }}
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
+ <a-form-item label="ICCID">
|
|
|
+ {{ Card_info.iccid }}
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="IMSI">
|
|
|
- {{ Card_info.account }}
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="IMSI">
|
|
|
- {{ Card_info.currentImsi }}
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="SIM货币余额">
|
|
|
- {{ Card_info.moneyBalances }}
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="激活日期">
|
|
|
- {{ Card_info.activeTime }}
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="到期日期">
|
|
|
- {{ Card_info.closeTime }}
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="有效期">
|
|
|
- {{ Card_info.validMonth }}月
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="供应商">
|
|
|
- {{ Card_info.currentImsiProvider }}
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
- <p>当前套餐信息</p>
|
|
|
- <a-form :model="dataPackage" auto-label-width label-align="left">
|
|
|
- <a-row :gutter="10" wrap>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="套餐名称">
|
|
|
- {{ dataPackage?.productName }}
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="套餐状态">
|
|
|
- {{ dataPackage?.status == 1 ? '已激活' : (dataPackage?.status == 2 ? '关闭' :
|
|
|
- dataPackage?.status == 3 ? '已过期' : '未使用') }}
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="有效期">
|
|
|
- {{ dataPackage?.validMonth }}月
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="是否赠送套餐">
|
|
|
- {{ dataPackage?.present == 0 ? '否' : '是' }}
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="套餐激活日期">
|
|
|
- {{ dataPackage?.activeTime }}
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="套餐过期日期">
|
|
|
- {{ dataPackage?.expiryTime }}
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <div class="line"></div>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="套餐可用流量">
|
|
|
- {{ dataPackage?.dataTotal == -1 ? '无限流量' : dataPackage?.dataTotal }}MB
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="套餐已使用流量">
|
|
|
- {{ dataPackage?.dataUsage }}MB
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="套餐今日使用流量">
|
|
|
- {{ dataPackage?.dataToday }}MB
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="套餐有效天数">
|
|
|
- {{ dataPackage?.validDays }}
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="IMSI">
|
|
|
+ {{ Card_info.account }}
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="IMSI">
|
|
|
+ {{ Card_info.currentImsi }}
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="SIM货币余额">
|
|
|
+ {{ Card_info.moneyBalances }}
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="激活日期">
|
|
|
+ {{ Card_info.activeTime }}
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="到期日期">
|
|
|
+ {{ Card_info.closeTime }}
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="有效期">
|
|
|
+ {{ Card_info.validMonth }}月
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="供应商">
|
|
|
+ {{ Card_info.currentImsiProvider }}
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ <p>当前套餐信息</p>
|
|
|
+ <a-form :model="dataPackage" auto-label-width label-align="left">
|
|
|
+ <a-row :gutter="10" wrap>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="套餐名称">
|
|
|
+ {{ dataPackage?.productName }}
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="套餐状态">
|
|
|
+ {{
|
|
|
+ dataPackage?.status == 1 ? '已激活' : (dataPackage?.status == 2 ? '关闭' :
|
|
|
+ dataPackage?.status == 3 ? '已过期' : '未使用')
|
|
|
+ }}
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="有效期">
|
|
|
+ {{ dataPackage?.validMonth }}月
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="是否赠送套餐">
|
|
|
+ {{ dataPackage?.present == 0 ? '否' : '是' }}
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="套餐激活日期">
|
|
|
+ {{ dataPackage?.activeTime }}
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="套餐过期日期">
|
|
|
+ {{ dataPackage?.expiryTime }}
|
|
|
+ </a-form-item>
|
|
|
</a-col>
|
|
|
+ <div class="line"></div>
|
|
|
<a-col :span="12">
|
|
|
- <a-tabs>
|
|
|
- <a-tab-pane key="1" title="月用量">
|
|
|
- <div class="chart" style="width:100%" id="chartContainer" />
|
|
|
- </a-tab-pane>
|
|
|
- <a-tab-pane key="2" title="卡套餐信息">
|
|
|
- <a-table :columns="columnsCard" :data="dataCard" :scroll="{ x: 'auto' }" :pagination="false" />
|
|
|
- </a-tab-pane>
|
|
|
- <a-tab-pane key="3" title="预警信息">
|
|
|
- Content of Tab Panel 3
|
|
|
- </a-tab-pane>
|
|
|
- <a-tab-pane key="4" title="充值记录">
|
|
|
- <a-table :columns="columnsTopup" :data="dataTopup" />
|
|
|
- </a-tab-pane>
|
|
|
- <a-tab-pane key="5" title="使用量">
|
|
|
- <a-table :columns="columnsAmount" :data="dataAmount" :scroll="{ x: 'auto' }"
|
|
|
- :pagination="false" />
|
|
|
- </a-tab-pane>
|
|
|
- <a-tab-pane key="6" title="操作记录">
|
|
|
- Content of Tab Panel 3
|
|
|
- </a-tab-pane>
|
|
|
- </a-tabs>
|
|
|
+ <a-form-item label="套餐可用流量">
|
|
|
+ {{ dataPackage?.dataTotal == -1 ? '无限流量' : dataPackage?.dataTotal }}MB
|
|
|
+ </a-form-item>
|
|
|
</a-col>
|
|
|
- </a-row>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="套餐已使用流量">
|
|
|
+ {{ dataPackage?.dataUsage }}MB
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="套餐今日使用流量">
|
|
|
+ {{ dataPackage?.dataToday }}MB
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="套餐有效天数">
|
|
|
+ {{ dataPackage?.validDays }}
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-tabs>
|
|
|
+ <a-tab-pane key="1" title="月用量">
|
|
|
+ <div class="chart" style="width:100%" id="chartContainer"/>
|
|
|
+ </a-tab-pane>
|
|
|
+ <a-tab-pane key="2" title="卡套餐信息">
|
|
|
+ <a-table :columns="columnsCard" :data="dataCard" :scroll="{ x: 'auto' }" :pagination="false"/>
|
|
|
+ </a-tab-pane>
|
|
|
+ <a-tab-pane key="3" title="预警信息">
|
|
|
+ Content of Tab Panel 3
|
|
|
+ </a-tab-pane>
|
|
|
+ <a-tab-pane key="4" title="充值记录">
|
|
|
+ <a-table :columns="columnsTopup" :data="dataTopup" :scroll="{ x: 'auto' }"/>
|
|
|
+ </a-tab-pane>
|
|
|
+ <a-tab-pane key="5" title="使用量">
|
|
|
+ <a-table :columns="columnsAmount" :data="dataAmount" :scroll="{ x: 'auto' }"
|
|
|
+ :pagination="false"/>
|
|
|
+ </a-tab-pane>
|
|
|
+ <a-tab-pane key="6" title="操作记录">
|
|
|
+ Content of Tab Panel 3
|
|
|
+ </a-tab-pane>
|
|
|
+ </a-tabs>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
|
|
|
- <template #footer>
|
|
|
- <div class="footer_button">
|
|
|
- <!-- <a-button type="primary" status="warning">同步卡信息 V</a-button> -->
|
|
|
- <a-button type="primary" status="warning" @click="SIMCardService(0)">暂停SIM卡服务</a-button>
|
|
|
- <a-button type="primary" status="warning" @click="SIMCardService(1)">恢复SIM卡服务</a-button>
|
|
|
- <a-button type="primary" status="warning">关闭SIM卡</a-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </a-modal>
|
|
|
+ <template #footer>
|
|
|
+ <div class="footer_button">
|
|
|
+ <!-- <a-button type="primary" status="warning">同步卡信息 V</a-button> -->
|
|
|
+ <a-button type="primary" status="warning" @click="SIMCardService(0)">暂停SIM卡服务</a-button>
|
|
|
+ <a-button type="primary" status="warning" @click="SIMCardService(1)">恢复SIM卡服务</a-button>
|
|
|
+ <a-button type="primary" status="warning">关闭SIM卡</a-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </a-modal>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
-import { onMounted, ref } from "vue";
|
|
|
-import { getDataCDR, PauseSIMService, RecoverSIMService, OffSIMCard } from '@/api/path/lotCard.api'
|
|
|
-import { Getdictionary } from '@/mixins/index'
|
|
|
-import { Message } from '@arco-design/web-vue'
|
|
|
+import {onMounted, ref} from "vue";
|
|
|
+import {getDataCDR, PauseSIMService, RecoverSIMService, OffSIMCard} from '@/api/path/lotCard.api'
|
|
|
+import {Getdictionary} from '@/mixins/index'
|
|
|
+import {Message} from '@arco-design/web-vue'
|
|
|
// 图表插件
|
|
|
import * as echarts from "echarts";
|
|
|
-const props = defineProps({
|
|
|
-});
|
|
|
+
|
|
|
+const props = defineProps({});
|
|
|
|
|
|
const emit = defineEmits(['submit']);
|
|
|
const visible = ref(false)
|
|
@@ -160,247 +162,255 @@ const dataSource = ref([]);
|
|
|
|
|
|
// 图表插件
|
|
|
const option = ref({
|
|
|
- xAxis: {
|
|
|
- type: 'category',
|
|
|
- data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- type: 'value'
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- data: [120, 200, 150, 80, 70, 110, 130],
|
|
|
- type: 'bar',
|
|
|
- }
|
|
|
- ],
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'value'
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ data: [120, 200, 150, 80, 70, 110, 130],
|
|
|
+ type: 'bar',
|
|
|
+ }
|
|
|
+ ],
|
|
|
})
|
|
|
|
|
|
// 卡套餐信息
|
|
|
const columnsCard = [
|
|
|
- {
|
|
|
- title: '套餐名称',
|
|
|
- dataIndex: 'productName',
|
|
|
- align: 'center', ellipsis: true
|
|
|
- }, {
|
|
|
- title: '套餐状态',
|
|
|
- dataIndex: 'status',
|
|
|
- align: 'center', ellipsis: true
|
|
|
- },
|
|
|
- {
|
|
|
- title: '有效期(月)',
|
|
|
- dataIndex: 'validMonth',
|
|
|
- align: 'center', ellipsis: true
|
|
|
- },
|
|
|
- {
|
|
|
- title: '可用流量',
|
|
|
- dataIndex: 'dataTotal',
|
|
|
- align: 'center', ellipsis: true
|
|
|
- },
|
|
|
- {
|
|
|
- title: '已使用流量',
|
|
|
- dataIndex: 'dataUsage',
|
|
|
- align: 'center', ellipsis: true
|
|
|
- },
|
|
|
- {
|
|
|
- title: '今日使用流量',
|
|
|
- dataIndex: 'dataToday',
|
|
|
- align: 'center', ellipsis: true
|
|
|
- },
|
|
|
- {
|
|
|
- title: '套餐有效期(天数)',
|
|
|
- dataIndex: 'validDays',
|
|
|
- align: 'center', ellipsis: true
|
|
|
- },
|
|
|
- {
|
|
|
- title: '激活日期',
|
|
|
- dataIndex: 'activeTime',
|
|
|
- align: 'center', ellipsis: true
|
|
|
- },
|
|
|
- {
|
|
|
- title: '过期日期',
|
|
|
- dataIndex: 'expiryTime',
|
|
|
- align: 'center', ellipsis: true
|
|
|
- },
|
|
|
+ {
|
|
|
+ title: '套餐名称',
|
|
|
+ dataIndex: 'productName',
|
|
|
+ align: 'center', ellipsis: true
|
|
|
+ }, {
|
|
|
+ title: '套餐状态',
|
|
|
+ dataIndex: 'status',
|
|
|
+ align: 'center', ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '有效期(月)',
|
|
|
+ dataIndex: 'validMonth',
|
|
|
+ align: 'center', ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '可用流量',
|
|
|
+ dataIndex: 'dataTotal',
|
|
|
+ align: 'center', ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '已使用流量',
|
|
|
+ dataIndex: 'dataUsage',
|
|
|
+ align: 'center', ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '今日使用流量',
|
|
|
+ dataIndex: 'dataToday',
|
|
|
+ align: 'center', ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '套餐有效期(天数)',
|
|
|
+ dataIndex: 'validDays',
|
|
|
+ align: 'center', ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '激活日期',
|
|
|
+ dataIndex: 'activeTime',
|
|
|
+ align: 'center', ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '过期日期',
|
|
|
+ dataIndex: 'expiryTime',
|
|
|
+ align: 'center', ellipsis: true
|
|
|
+ },
|
|
|
]
|
|
|
const dataCard = ref([])
|
|
|
|
|
|
// 充值信息
|
|
|
const columnsTopup = [
|
|
|
- {
|
|
|
- title: '订单号',
|
|
|
- dataIndex: 'productName',
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'ICCID',
|
|
|
- dataIndex: 'productName',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '购买套餐',
|
|
|
- dataIndex: 'productName',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '订单类型',
|
|
|
- dataIndex: 'productName',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '套餐价格',
|
|
|
- dataIndex: 'productName',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '运营商',
|
|
|
- dataIndex: 'productName',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '支付状态',
|
|
|
- dataIndex: 'productName',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '下单日期',
|
|
|
- dataIndex: 'productName',
|
|
|
- },
|
|
|
+ {
|
|
|
+ title: '订单号',
|
|
|
+ dataIndex: 'productName',
|
|
|
+ ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'ICCID',
|
|
|
+ dataIndex: 'productName',
|
|
|
+ ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '购买套餐',
|
|
|
+ dataIndex: 'productName',
|
|
|
+ ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '订单类型',
|
|
|
+ dataIndex: 'productName',
|
|
|
+ ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '套餐价格',
|
|
|
+ dataIndex: 'productName',
|
|
|
+ ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '运营商',
|
|
|
+ dataIndex: 'productName',
|
|
|
+ ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '支付状态',
|
|
|
+ dataIndex: 'productName',
|
|
|
+ ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '下单日期',
|
|
|
+ dataIndex: 'productName',
|
|
|
+ ellipsis: true
|
|
|
+ },
|
|
|
]
|
|
|
const dataTopup = ref([])
|
|
|
// 使用量
|
|
|
const columnsAmount = [
|
|
|
- {
|
|
|
- title: '编号',
|
|
|
- dataIndex: 'productId',
|
|
|
- align: 'center', ellipsis: true
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'IMIS',
|
|
|
- dataIndex: 'imsi',
|
|
|
- align: 'center', ellipsis: true
|
|
|
- },
|
|
|
+ {
|
|
|
+ title: '编号',
|
|
|
+ dataIndex: 'productId',
|
|
|
+ align: 'center', ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'IMIS',
|
|
|
+ dataIndex: 'imsi',
|
|
|
+ align: 'center', ellipsis: true
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- title: 'SIM账户(卡号)',
|
|
|
- dataIndex: 'account',
|
|
|
- align: 'center', ellipsis: true
|
|
|
- },
|
|
|
- {
|
|
|
- title: '流量(MB)',
|
|
|
- dataIndex: 'usage',
|
|
|
- align: 'center', ellipsis: true
|
|
|
- },
|
|
|
- {
|
|
|
- title: '流量产生国家货地区编号',
|
|
|
- dataIndex: 'countryNo',
|
|
|
- align: 'center', ellipsis: true
|
|
|
- },
|
|
|
- {
|
|
|
- title: '详单日期',
|
|
|
- dataIndex: 'date',
|
|
|
- align: 'center', ellipsis: true
|
|
|
- },
|
|
|
+ {
|
|
|
+ title: 'SIM账户(卡号)',
|
|
|
+ dataIndex: 'account',
|
|
|
+ align: 'center', ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '流量(MB)',
|
|
|
+ dataIndex: 'usage',
|
|
|
+ align: 'center', ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '流量产生国家货地区编号',
|
|
|
+ dataIndex: 'countryNo',
|
|
|
+ align: 'center', ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '详单日期',
|
|
|
+ dataIndex: 'date',
|
|
|
+ align: 'center', ellipsis: true
|
|
|
+ },
|
|
|
]
|
|
|
const dataAmount = ref([])
|
|
|
const open = (data) => {
|
|
|
- if (!data) {
|
|
|
- return
|
|
|
+ if (!data) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ dataSource.value = []
|
|
|
+ Card_info.value = data
|
|
|
+ dataPackage.value = data.dataPackage[0]
|
|
|
+ // 卡套餐信息
|
|
|
+ dataCard.value = (data.dataPackage || []).map(val => {
|
|
|
+ const status = val.status == 1 ? '已激活' : (val.status == 2 ? '关闭' :
|
|
|
+ val.status == 3 ? '已过期' : '未使用')
|
|
|
+ const tatal = val.dataTotal == -1 ? '无限流量' : val.dataTotal
|
|
|
+ return {
|
|
|
+ ...val,
|
|
|
+ status: status,
|
|
|
+ dataTotal: tatal
|
|
|
}
|
|
|
- dataSource.value = []
|
|
|
- Card_info.value = data
|
|
|
- dataPackage.value = data.dataPackage[0]
|
|
|
- // 卡套餐信息
|
|
|
- dataCard.value = (data.dataPackage || []).map(val => {
|
|
|
- const status = val.status == 1 ? '已激活' : (val.status == 2 ? '关闭' :
|
|
|
- val.status == 3 ? '已过期' : '未使用')
|
|
|
- const tatal = val.dataTotal == -1 ? '无限流量' : val.dataTotal
|
|
|
- return {
|
|
|
- ...val,
|
|
|
- status: status,
|
|
|
- dataTotal: tatal
|
|
|
- }
|
|
|
- })
|
|
|
- intData()
|
|
|
- visible.value = true
|
|
|
+ })
|
|
|
+ intData()
|
|
|
+ visible.value = true
|
|
|
}
|
|
|
|
|
|
// 使用量
|
|
|
const intData = async () => {
|
|
|
- // 获取今天的日期
|
|
|
- const today = new Date();
|
|
|
- const toDay = today.toISOString().split('T')[0];
|
|
|
+ // 获取今天的日期
|
|
|
+ const today = new Date();
|
|
|
+ const toDay = today.toISOString().split('T')[0];
|
|
|
|
|
|
- // 获取三个月前的日期
|
|
|
- const pastDate = new Date(today);
|
|
|
- pastDate.setMonth(today.getMonth() - 3); // 减去三个月
|
|
|
- const formattedDate = pastDate.toISOString().split('T')[0];
|
|
|
+ // 获取三个月前的日期
|
|
|
+ const pastDate = new Date(today);
|
|
|
+ pastDate.setMonth(today.getMonth() - 3); // 减去三个月
|
|
|
+ const formattedDate = pastDate.toISOString().split('T')[0];
|
|
|
|
|
|
- // 获取 CDR 数据
|
|
|
- let res = await getDataCDR({
|
|
|
- iccid: Card_info.value.iccid,
|
|
|
- source: Card_info.value.source,
|
|
|
- startDate: formattedDate,
|
|
|
- endDate: toDay
|
|
|
- });
|
|
|
+ // 获取 CDR 数据
|
|
|
+ let res = await getDataCDR({
|
|
|
+ iccid: Card_info.value.iccid,
|
|
|
+ source: Card_info.value.source,
|
|
|
+ startDate: formattedDate,
|
|
|
+ endDate: toDay
|
|
|
+ });
|
|
|
|
|
|
- dataAmount.value = res.data
|
|
|
+ dataAmount.value = res.data
|
|
|
|
|
|
|
|
|
- // 定义季度时间段
|
|
|
- const time = ['1-3', '4-6', '7-9', '9-12'];
|
|
|
+ // 定义季度时间段
|
|
|
+ const time = ['1-3', '4-6', '7-9', '9-12'];
|
|
|
|
|
|
- // 获取当前年份
|
|
|
- const year = today.getFullYear();
|
|
|
- for (let val of time) {
|
|
|
- // 拆分每个时间段,获取开始月和结束月
|
|
|
- const [startMonth, endMonth] = val.split('-');
|
|
|
- const startDate = `${year}-${startMonth}-01`; // 格式化开始日期
|
|
|
- const endDate = `${year}-${endMonth}-01`; // 格式化结束日期
|
|
|
+ // 获取当前年份
|
|
|
+ const year = today.getFullYear();
|
|
|
+ for (let val of time) {
|
|
|
+ // 拆分每个时间段,获取开始月和结束月
|
|
|
+ const [startMonth, endMonth] = val.split('-');
|
|
|
+ const startDate = `${year}-${startMonth}-01`; // 格式化开始日期
|
|
|
+ const endDate = `${year}-${endMonth}-01`; // 格式化结束日期
|
|
|
|
|
|
- // 获取每个时间段的数据
|
|
|
- let res = await getDataCDR({
|
|
|
- iccid: Card_info.value.iccid,
|
|
|
- source: Card_info.value.source,
|
|
|
- startDate: startDate,
|
|
|
- endDate: endDate
|
|
|
- });
|
|
|
+ // 获取每个时间段的数据
|
|
|
+ let res = await getDataCDR({
|
|
|
+ iccid: Card_info.value.iccid,
|
|
|
+ source: Card_info.value.source,
|
|
|
+ startDate: startDate,
|
|
|
+ endDate: endDate
|
|
|
+ });
|
|
|
|
|
|
- // 将当前时间段的数据中的 'usage' 字段合并到 series[0].data 数组中
|
|
|
- const usageData = (res.data || [])
|
|
|
- .filter(val => val.usage !== undefined)
|
|
|
- .map(val => val.usage);
|
|
|
- option.value.series[0].data.push(...usageData);
|
|
|
- initChart()
|
|
|
- }
|
|
|
+ // 将当前时间段的数据中的 'usage' 字段合并到 series[0].data 数组中
|
|
|
+ const usageData = (res.data || [])
|
|
|
+ .filter(val => val.usage !== undefined)
|
|
|
+ .map(val => val.usage);
|
|
|
+ option.value.series[0].data.push(...usageData);
|
|
|
+ initChart()
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// SIM卡操作
|
|
|
const SIMCardService = async (index) => {
|
|
|
- const Inform = {
|
|
|
- iccid: Card_info.value.iccid, source: Card_info.value.source
|
|
|
- }
|
|
|
- // 暂停SIM卡
|
|
|
- let res = index == 0 ? await PauseSIMService(Inform) : (index == 1 ? await RecoverSIMService(Inform) : '')
|
|
|
- if (res.code === 200) {
|
|
|
- Message.success({
|
|
|
- content: res.message,
|
|
|
- duration: 2000,
|
|
|
- })
|
|
|
- handleSubmit()
|
|
|
- }
|
|
|
+ const Inform = {
|
|
|
+ iccid: Card_info.value.iccid, source: Card_info.value.source
|
|
|
+ }
|
|
|
+ // 暂停SIM卡
|
|
|
+ let res = index == 0 ? await PauseSIMService(Inform) : (index == 1 ? await RecoverSIMService(Inform) : '')
|
|
|
+ if (res.code === 200) {
|
|
|
+ Message.success({
|
|
|
+ content: res.message,
|
|
|
+ duration: 2000,
|
|
|
+ })
|
|
|
+ handleSubmit()
|
|
|
+ }
|
|
|
}
|
|
|
const handleSubmit = () => {
|
|
|
- emit('submit', true);
|
|
|
- visible.value = false
|
|
|
+ emit('submit', true);
|
|
|
+ visible.value = false
|
|
|
};
|
|
|
|
|
|
const handleCancel = () => {
|
|
|
- visible.value = false
|
|
|
+ visible.value = false
|
|
|
};
|
|
|
|
|
|
// 图表
|
|
|
const initChart = () => {
|
|
|
- const dom = echarts.init(document.getElementById("chartContainer"));
|
|
|
- dom.setOption(option.value);
|
|
|
- window.addEventListener("resize",()=>{
|
|
|
- dom.resize();
|
|
|
- })
|
|
|
+ const dom = echarts.init(document.getElementById("chartContainer"));
|
|
|
+ dom.setOption(option.value);
|
|
|
+ window.addEventListener("resize", () => {
|
|
|
+ dom.resize();
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
-defineExpose({ open })
|
|
|
+defineExpose({open})
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
@@ -409,32 +419,32 @@ onMounted(() => {
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
.toal_Form {
|
|
|
- padding-bottom: 10px;
|
|
|
- border-bottom: 1px solid #ccc;
|
|
|
+ padding-bottom: 10px;
|
|
|
+ border-bottom: 1px solid #ccc;
|
|
|
}
|
|
|
|
|
|
p {
|
|
|
- font-size: 20px;
|
|
|
- color: black;
|
|
|
+ font-size: 20px;
|
|
|
+ color: black;
|
|
|
}
|
|
|
|
|
|
.line {
|
|
|
- margin: 15px 0;
|
|
|
- border-bottom: 1px solid #ccc;
|
|
|
- width: 100%;
|
|
|
+ margin: 15px 0;
|
|
|
+ border-bottom: 1px solid #ccc;
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
|
|
|
.footer_button {
|
|
|
- display: flex;
|
|
|
- justify-content: start;
|
|
|
+ display: flex;
|
|
|
+ justify-content: start;
|
|
|
|
|
|
- button {
|
|
|
- margin-right: 15px;
|
|
|
- }
|
|
|
+ button {
|
|
|
+ margin-right: 15px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.chart {
|
|
|
- height: 310px;
|
|
|
- width: 100%;
|
|
|
+ height: 310px;
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
</style>
|