|
@@ -23,55 +23,51 @@
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-form>
|
|
</a-form>
|
|
</div> -->
|
|
</div> -->
|
|
- <div class="audit-btn">
|
|
|
|
|
|
+ <!-- <div class="audit-btn">
|
|
<a-button @click="showNewDataPackageForm" type="text">
|
|
<a-button @click="showNewDataPackageForm" type="text">
|
|
<template #icon>
|
|
<template #icon>
|
|
<icon-plus-circle/>
|
|
<icon-plus-circle/>
|
|
</template>
|
|
</template>
|
|
- <template #default>{{ $t('form.Add') }}</template>
|
|
|
|
- </a-button>
|
|
|
|
- </div>
|
|
|
|
|
|
+<template #default>{{ $t('form.Add') }}</template>
|
|
|
|
+</a-button>
|
|
|
|
+</div> -->
|
|
|
|
|
|
<a-table :data="dataSource" :columns="columns" :pagination="pagination" :scroll="{ x: 'auto' }"
|
|
<a-table :data="dataSource" :columns="columns" :pagination="pagination" :scroll="{ x: 'auto' }"
|
|
- @page-change="evChangePage">
|
|
|
|
|
|
+ @page-change="evChangePage">
|
|
<template #id="{ record }">
|
|
<template #id="{ record }">
|
|
- <a-button type="text" size="small" @click="handleEdit(record)">{{ $t('global.common.edit') }}</a-button>
|
|
|
|
- <a-button type="text" size="small" @click="handleDelete(record)">{{ $t('global.common.delete') }}</a-button>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ <!-- <a-button type="text" size="small" @click="handleEdit(record)">{{ $t('global.common.edit') }}</a-button>
|
|
|
|
+ <a-button type="text" size="small" @click="handleDelete(record)">{{ $t('global.common.delete') }}</a-button> -->
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
</a-table>
|
|
</a-table>
|
|
|
|
|
|
|
|
|
|
- <new-data-package-form v-model:visible="newDataPackageFormVisible" :editMode="editMode" :editData="editData"
|
|
|
|
- @submit="handleNewDataPackageSubmit"/>
|
|
|
|
|
|
+ <!-- <new-data-package-form v-model:visible="newDataPackageFormVisible" :editMode="editMode" :editData="editData"
|
|
|
|
+ @submit="handleNewDataPackageSubmit"/> -->
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import {onMounted, ref, getCurrentInstance} from "vue";
|
|
|
|
-import {useRoute} from "vue-router";
|
|
|
|
-import {columns} from "./config";
|
|
|
|
-import {Message, Notification} from '@arco-design/web-vue'
|
|
|
|
-import {getDataPlanList} from "@/api/path/lotCard.api"
|
|
|
|
|
|
+import { onMounted, ref, getCurrentInstance } from "vue";
|
|
|
|
+import { useRoute } from "vue-router";
|
|
|
|
+import { columns } from "./config";
|
|
|
|
+import { Message, Notification } from '@arco-design/web-vue'
|
|
|
|
+import { getDataPlanList } from "@/api/path/lotCard.api"
|
|
import NewDataPackageForm from './NewDataPackageForm.vue';
|
|
import NewDataPackageForm from './NewDataPackageForm.vue';
|
|
-import {useI18n} from 'vue-i18n';
|
|
|
|
-import {enum_dict} from "@/hooks/enum";
|
|
|
|
-import {Getdictionary} from '@/mixins/index.js'
|
|
|
|
-
|
|
|
|
|
|
+import { useI18n } from 'vue-i18n';
|
|
|
|
+import { enum_dict } from "@/hooks/enum";
|
|
|
|
+import { Getdictionary } from '@/mixins/index.js'
|
|
|
|
|
|
-const {t} = useI18n();
|
|
|
|
-const {proxy} = getCurrentInstance()
|
|
|
|
-const formRef = ref()
|
|
|
|
|
|
+const { t } = useI18n();
|
|
|
|
+const { proxy } = getCurrentInstance()
|
|
|
|
+// const formRef = ref()
|
|
const searchForm = ref({
|
|
const searchForm = ref({
|
|
"status": "",
|
|
"status": "",
|
|
"periodType": "",
|
|
"periodType": "",
|
|
});
|
|
});
|
|
|
|
|
|
-const sourceList = ref([]);
|
|
|
|
-const statusList = ref([]);
|
|
|
|
-const typeList = ref([]);
|
|
|
|
|
|
+// const sourceList = ref([]);
|
|
|
|
+// const statusList = ref([]);
|
|
|
|
+// const typeList = ref([]);
|
|
const dataSource = ref([]);
|
|
const dataSource = ref([]);
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
const pagination = ref({
|
|
const pagination = ref({
|
|
@@ -80,54 +76,21 @@ const pagination = ref({
|
|
current: 1,
|
|
current: 1,
|
|
})
|
|
})
|
|
|
|
|
|
-// 运营商
|
|
|
|
-const operatorTypeOptions = [
|
|
|
|
- {value: '1', label: t('dataPackage.operatorTypes.chinamobile')},
|
|
|
|
- {value: '2', label: t('dataPackage.operatorTypes.chinaunicom')},
|
|
|
|
- {value: '3', label: t('dataPackage.operatorTypes.chinatelecom')},
|
|
|
|
- {value: '4', label: t('dataPackage.operatorTypes.international')},
|
|
|
|
- {value: '5', label: t('dataPackage.operatorTypes.foreign_local')},
|
|
|
|
-];
|
|
|
|
-
|
|
|
|
-
|
|
|
|
const intData = async () => {
|
|
const intData = async () => {
|
|
const param = {
|
|
const param = {
|
|
current: pagination.value.current,
|
|
current: pagination.value.current,
|
|
size: pagination.value.pageSize,
|
|
size: pagination.value.pageSize,
|
|
...searchForm.value,
|
|
...searchForm.value,
|
|
}
|
|
}
|
|
- const {data} = await getDataPlanList(param)
|
|
|
|
- const one = await Getdictionary('flowPeriod')
|
|
|
|
- const two = await Getdictionary('cycleType')
|
|
|
|
- const tree = await Getdictionary('activateMethod')
|
|
|
|
|
|
+ const { data } = await getDataPlanList(param)
|
|
|
|
+ const soureName = await Getdictionary('supplierSource')
|
|
dataSource.value = (data?.records || []).map((item, index) => {
|
|
dataSource.value = (data?.records || []).map((item, index) => {
|
|
-
|
|
|
|
- const periodName = (one.filter((dicVal) => dicVal.typeKey == 'flowPeriod') || []).find(val => val.value == item.period)?.label
|
|
|
|
- const periodTypeName = (two.filter((dicVal) => dicVal.typeKey == 'cycleType') || []).find(val => val.value == item.period_type)?.label
|
|
|
|
- const activationModeName = (tree.filter((dicVal) => dicVal.typeKey == 'activateMethod') || []).find(val => val.value == item.activation_mode)?.label
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- const sourceName = sourceList.value.find(val => val.value == item.source)?.label
|
|
|
|
- const typePackage = typeList.value.find(val => val.value == item.type)?.label
|
|
|
|
- const statusPackage = statusList.value.find(val => val.value == item.status)?.label
|
|
|
|
|
|
+ const soure = soureName.find(val => val.value == item.source)?.label
|
|
|
|
+ const total = item.dataTotal == -1 ? '无限流量' : item.dataTotal + "MB"
|
|
return {
|
|
return {
|
|
...item,
|
|
...item,
|
|
- packageCode: "NR0" + (index + 1),
|
|
|
|
- packageName: '监控1G月租',
|
|
|
|
- providerName: '泰国AIS',
|
|
|
|
- packageType: '定向',
|
|
|
|
- billingType: '流量',
|
|
|
|
- billingPeriod: '按月',
|
|
|
|
- packageSize: '1',
|
|
|
|
- packageUnit: 'G',
|
|
|
|
- standardPrice: '150',
|
|
|
|
- typePackage,
|
|
|
|
- sourceName,
|
|
|
|
- statusPackage,
|
|
|
|
- periodName,
|
|
|
|
- activationModeName,
|
|
|
|
- periodTypeName
|
|
|
|
-
|
|
|
|
|
|
+ total: total,
|
|
|
|
+ source: soure
|
|
}
|
|
}
|
|
})
|
|
})
|
|
pagination.value.total = data.total
|
|
pagination.value.total = data.total
|
|
@@ -139,64 +102,62 @@ const evChangePage = (page) => {
|
|
intData()
|
|
intData()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// const resetSearch = () => {
|
|
|
|
+// proxy.$refs.formRef.resetFields()
|
|
|
|
+// intData()
|
|
|
|
+// }
|
|
|
|
|
|
-const resetSearch = () => {
|
|
|
|
- proxy.$refs.formRef.resetFields()
|
|
|
|
- intData()
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-const handleSearch = () => {
|
|
|
|
- intData()
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
|
|
+// const handleSearch = () => {
|
|
|
|
+// intData()
|
|
|
|
+// }
|
|
|
|
|
|
-// 弹窗-----------------------------------------------------
|
|
|
|
-// const showModel = ref(false)
|
|
|
|
-// const handleModal = () => {
|
|
|
|
-// showModel.value = true
|
|
|
|
|
|
+// // 弹窗-----------------------------------------------------
|
|
|
|
+// // const showModel = ref(false)
|
|
|
|
+// // const handleModal = () => {
|
|
|
|
+// // showModel.value = true
|
|
|
|
+// // }
|
|
|
|
+// const newDataPackageFormVisible = ref(false);
|
|
|
|
+// const editMode = ref(false);
|
|
|
|
+// const editData = ref(null);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+// const showNewDataPackageForm = () => {
|
|
|
|
+// editMode.value = false;
|
|
|
|
+// editData.value = null;
|
|
|
|
+// newDataPackageFormVisible.value = true;
|
|
|
|
+// };
|
|
|
|
+// const handleEdit = (record) => {
|
|
|
|
+// editMode.value = true;
|
|
|
|
+// record.packageSize = Number(record.packageSize)
|
|
|
|
+// record.standardPrice = Number(record.standardPrice)
|
|
|
|
+// editData.value = {...record};
|
|
|
|
+// newDataPackageFormVisible.value = true;
|
|
|
|
+// };
|
|
|
|
+// const handleDelete = (record) => {
|
|
|
|
+// // Implement delete logic
|
|
|
|
+// Message.success(t('dataPackage.packageDeleted', {name: record.packageName}));
|
|
|
|
+// };
|
|
|
|
+
|
|
|
|
+// const handleNewDataPackageSubmit = (formData) => {
|
|
|
|
+// if (editMode.value) {
|
|
|
|
+// // Implement update logic
|
|
|
|
+// Message.success(t('dataPackage.packageUpdated', {name: formData.packageName}));
|
|
|
|
+// } else {
|
|
|
|
+// // Implement add logic
|
|
|
|
+// Message.success(t('dataPackage.packageAdded', {name: formData.packageName}));
|
|
|
|
+// }
|
|
|
|
+// newDataPackageFormVisible.value = false;
|
|
|
|
+// };
|
|
|
|
+// // -----------------------------------------------------
|
|
|
|
+// // 获取字典
|
|
|
|
+// const handleDictValue = async () => {
|
|
|
|
+// sourceList.value = await Getdictionary('source')
|
|
|
|
+// statusList.value = await Getdictionary('trafficPacketStatus')
|
|
|
|
+// typeList.value = await Getdictionary('trafficUsageType')
|
|
// }
|
|
// }
|
|
-const newDataPackageFormVisible = ref(false);
|
|
|
|
-const editMode = ref(false);
|
|
|
|
-const editData = ref(null);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-const showNewDataPackageForm = () => {
|
|
|
|
- editMode.value = false;
|
|
|
|
- editData.value = null;
|
|
|
|
- newDataPackageFormVisible.value = true;
|
|
|
|
-};
|
|
|
|
-const handleEdit = (record) => {
|
|
|
|
- editMode.value = true;
|
|
|
|
- record.packageSize = Number(record.packageSize)
|
|
|
|
- record.standardPrice = Number(record.standardPrice)
|
|
|
|
- editData.value = {...record};
|
|
|
|
- newDataPackageFormVisible.value = true;
|
|
|
|
-};
|
|
|
|
-const handleDelete = (record) => {
|
|
|
|
- // Implement delete logic
|
|
|
|
- Message.success(t('dataPackage.packageDeleted', {name: record.packageName}));
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
-const handleNewDataPackageSubmit = (formData) => {
|
|
|
|
- if (editMode.value) {
|
|
|
|
- // Implement update logic
|
|
|
|
- Message.success(t('dataPackage.packageUpdated', {name: formData.packageName}));
|
|
|
|
- } else {
|
|
|
|
- // Implement add logic
|
|
|
|
- Message.success(t('dataPackage.packageAdded', {name: formData.packageName}));
|
|
|
|
- }
|
|
|
|
- newDataPackageFormVisible.value = false;
|
|
|
|
-};
|
|
|
|
-// -----------------------------------------------------
|
|
|
|
-// 获取字典
|
|
|
|
-const handleDictValue = async () => {
|
|
|
|
- sourceList.value = await Getdictionary('source')
|
|
|
|
- statusList.value = await Getdictionary('trafficPacketStatus')
|
|
|
|
- typeList.value = await Getdictionary('trafficUsageType')
|
|
|
|
-}
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
- handleDictValue()
|
|
|
|
|
|
+ // handleDictValue()
|
|
intData()
|
|
intData()
|
|
})
|
|
})
|
|
</script>
|
|
</script>
|