|
@@ -6,7 +6,13 @@
|
|
<Search :SearchForm="SearchForm" @query="intData" @reset="reset" />
|
|
<Search :SearchForm="SearchForm" @query="intData" @reset="reset" />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <a-table row-key="iccid" :data="dataSource" :columns="columnsData" :pagination="false" :scroll="{ x: 'auto' }">
|
|
|
|
|
|
+ <div class="SynchronousData">
|
|
|
|
+ <!-- 同步数据 -->
|
|
|
|
+ <a-button type="primary" @click="syncData">同步数据</a-button>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <a-table row-key="iccid" :data="dataSource" :columns="columnsData" :pagination="false" :scroll="{ x: 'auto' }"
|
|
|
|
+ :loading="loading">
|
|
<template #iccidStatus="{ record }">
|
|
<template #iccidStatus="{ record }">
|
|
<a-tag color="#7bc616" v-if="record.iccidStatus == '正常'">{{ record.iccidStatus }}</a-tag>
|
|
<a-tag color="#7bc616" v-if="record.iccidStatus == '正常'">{{ record.iccidStatus }}</a-tag>
|
|
<a-tag v-else>{{ record.iccidStatus }}</a-tag>
|
|
<a-tag v-else>{{ record.iccidStatus }}</a-tag>
|
|
@@ -36,12 +42,13 @@
|
|
<script setup>
|
|
<script setup>
|
|
import { onMounted, ref, getCurrentInstance, h } from "vue";
|
|
import { onMounted, ref, getCurrentInstance, h } from "vue";
|
|
import { columns, SearchForm } from "./config";
|
|
import { columns, SearchForm } from "./config";
|
|
-import { cardInfoList } from "@/api/path/lotCard.api"
|
|
|
|
|
|
+import { cardInfoList, syncFlowData } from "@/api/path/lotCard.api"
|
|
import trafficUseDialog from "./trafficUseDialog.vue";
|
|
import trafficUseDialog from "./trafficUseDialog.vue";
|
|
import { Getdictionary } from '@/mixins/index.js'
|
|
import { Getdictionary } from '@/mixins/index.js'
|
|
import { sanitizeObject } from '@/utils/utils'
|
|
import { sanitizeObject } from '@/utils/utils'
|
|
import Add from './add.vue'
|
|
import Add from './add.vue'
|
|
import Search from '@/components/Search/index.vue'
|
|
import Search from '@/components/Search/index.vue'
|
|
|
|
+import { Message } from "@arco-design/web-vue";
|
|
const { proxy } = getCurrentInstance()
|
|
const { proxy } = getCurrentInstance()
|
|
import { useI18n } from 'vue-i18n'
|
|
import { useI18n } from 'vue-i18n'
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
@@ -57,7 +64,7 @@ const pagination = ref({
|
|
const columnsData = ref([])
|
|
const columnsData = ref([])
|
|
const userType = ref(JSON.parse(localStorage.getItem('user_login_information'))?.userType)
|
|
const userType = ref(JSON.parse(localStorage.getItem('user_login_information'))?.userType)
|
|
const showAdd = ref(false)
|
|
const showAdd = ref(false)
|
|
-
|
|
|
|
|
|
+const loading = ref(false)
|
|
const trafficUseDialogRef = ref()
|
|
const trafficUseDialogRef = ref()
|
|
|
|
|
|
|
|
|
|
@@ -85,7 +92,7 @@ const intData = async (item) => {
|
|
dataUsage: item.dataPackage[0]?.dataUsage ? item.dataPackage[0]?.dataUsage + '/MB' : '0' + '/MB',
|
|
dataUsage: item.dataPackage[0]?.dataUsage ? item.dataPackage[0]?.dataUsage + '/MB' : '0' + '/MB',
|
|
dataTotal: item.dataPackage[0]?.dataTotal ? item.dataPackage[0]?.dataTotal + '/MB' : '0' + '/MB',
|
|
dataTotal: item.dataPackage[0]?.dataTotal ? item.dataPackage[0]?.dataTotal + '/MB' : '0' + '/MB',
|
|
dataUsageTotal: item.dataUsageTotal ? item.dataUsageTotal + '/MB' : '---',
|
|
dataUsageTotal: item.dataUsageTotal ? item.dataUsageTotal + '/MB' : '---',
|
|
- productName:item.dataPackage[0]?.productName
|
|
|
|
|
|
+ productName: item.dataPackage[0]?.productName
|
|
}
|
|
}
|
|
})
|
|
})
|
|
pagination.value.total = data.total
|
|
pagination.value.total = data.total
|
|
@@ -119,6 +126,21 @@ const handleDictValue = async () => {
|
|
serviceList.value = await Getdictionary('activationPackageMethod')
|
|
serviceList.value = await Getdictionary('activationPackageMethod')
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// 同步数据
|
|
|
|
+const syncData = async () => {
|
|
|
|
+ let list = []
|
|
|
|
+ dataSource.value.forEach(item => {
|
|
|
|
+ list.push(item.iccid,)
|
|
|
|
+ })
|
|
|
|
+ loading.value = true
|
|
|
|
+ let res = await syncFlowData({iccid:list})
|
|
|
|
+ if(res.code===200){
|
|
|
|
+ Message.success('同步成功')
|
|
|
|
+ loading.value = false
|
|
|
|
+ intData()
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
await handleDictValue()
|
|
await handleDictValue()
|
|
@@ -144,6 +166,12 @@ onMounted(async () => {
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+.SynchronousData{
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+}
|
|
|
|
+
|
|
.top-actions {
|
|
.top-actions {
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
}
|