|
@@ -3,33 +3,25 @@
|
|
|
<div class="container">
|
|
|
<!-- 搜索条件区 -->
|
|
|
<div class="search-section">
|
|
|
- <Search :SearchForm="trafficSearchFrom" @query="intData" @reset="reset"/>
|
|
|
- </div>
|
|
|
- <div class="audit-btn">
|
|
|
- <a-button type="text" @click="dictShowModel(1, null)" v-if="role.getRole == 1">
|
|
|
- <template #icon>
|
|
|
- <icon-plus-circle />
|
|
|
- </template>
|
|
|
- <template #default>{{ $t('form.Add') }}</template>
|
|
|
- </a-button>
|
|
|
+ <Search :SearchForm="trafficSearchFrom" @query="intData" @reset="reset" />
|
|
|
</div>
|
|
|
<a-table row-key="id" :data="dataSource" :columns="columns" :pagination="pagination" :scroll="{ x: 'auto' }"
|
|
|
@page-change="evChangePage">
|
|
|
+ <template #id="{ record }">
|
|
|
+ <a-button type="text" @click="detaile(record)">详情</a-button>
|
|
|
+ </template>
|
|
|
</a-table>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import { onMounted, ref, toRefs } from "vue";
|
|
|
-import { columns, planColumns ,trafficSearchFrom} from "../config";
|
|
|
+import { columns, planColumns, trafficSearchFrom } from "../config";
|
|
|
import { tariffList } from "@/api/path/tariffManagement.api"
|
|
|
import { Getdictionary } from '@/mixins/index.js'
|
|
|
-import { useSystemStore } from '@/store/modules/systemStore'
|
|
|
import Search from '@/components/Search/index.vue'
|
|
|
-const role = useSystemStore()
|
|
|
const state = ref({
|
|
|
searchForm: {},
|
|
|
- FormDataList: {},
|
|
|
currency: [],
|
|
|
dataSource: [],
|
|
|
pagination: {
|
|
@@ -37,28 +29,22 @@ const state = ref({
|
|
|
pageSize: 10,
|
|
|
current: 1,
|
|
|
},
|
|
|
- visible: false,
|
|
|
- typeCurrent: null,
|
|
|
sourceList: [],
|
|
|
cycleist: [],
|
|
|
- methodList: []
|
|
|
+ methodList: [],
|
|
|
})
|
|
|
const {
|
|
|
searchForm,
|
|
|
- FormDataList,
|
|
|
currency,
|
|
|
dataSource,
|
|
|
pagination,
|
|
|
- visible,
|
|
|
- typeCurrent,
|
|
|
sourceList,
|
|
|
cycleist,
|
|
|
- ids,
|
|
|
methodList
|
|
|
} = toRefs(state.value);
|
|
|
|
|
|
const intData = async (item) => {
|
|
|
- if(item){
|
|
|
+ if (item) {
|
|
|
searchForm.value = item
|
|
|
}
|
|
|
const param = {
|
|
@@ -80,6 +66,23 @@ const intData = async (item) => {
|
|
|
} else if (item.billingMethod == 2) {
|
|
|
pricingName = item.pricing + pricingCurrty
|
|
|
}
|
|
|
+
|
|
|
+ item.children = item.children?.map(res => {
|
|
|
+ return {
|
|
|
+ ...res,
|
|
|
+ userName: item.userName,
|
|
|
+ sourceName,
|
|
|
+ pricingName,
|
|
|
+ billingCycleName,
|
|
|
+ Activated: Activated,
|
|
|
+ status: "正常",
|
|
|
+ bagSize,
|
|
|
+ billingMethodName,
|
|
|
+ Number: index + 1,
|
|
|
+ metadataPackagesName:item.metadataPackagesName,
|
|
|
+ testMetadataPackagesName:item.testMetadataPackagesName,
|
|
|
+ }
|
|
|
+ })
|
|
|
return {
|
|
|
...item,
|
|
|
sourceName,
|
|
@@ -89,15 +92,14 @@ const intData = async (item) => {
|
|
|
status: "正常",
|
|
|
bagSize,
|
|
|
billingMethodName,
|
|
|
- Number: index + 1
|
|
|
+ Number: index + 1,
|
|
|
}
|
|
|
})
|
|
|
- console.log(dataSource.value);
|
|
|
pagination.value.total = data.total
|
|
|
}
|
|
|
|
|
|
-const reset = (item)=>{
|
|
|
- searchForm.value = item
|
|
|
+const reset = (item) => {
|
|
|
+ searchForm.value = item
|
|
|
pagination.value.current = 1
|
|
|
intData()
|
|
|
}
|
|
@@ -107,12 +109,6 @@ const evChangePage = (page) => {
|
|
|
intData()
|
|
|
}
|
|
|
|
|
|
-// 弹框
|
|
|
-const dictShowModel = (type, data) => {
|
|
|
- FormDataList.value = type == 1 ? {} : data
|
|
|
- typeCurrent.value = type;
|
|
|
- visible.value = true;
|
|
|
-}
|
|
|
|
|
|
const handleDictValue = async () => {
|
|
|
sourceList.value = await Getdictionary('source')
|
|
@@ -121,6 +117,7 @@ const handleDictValue = async () => {
|
|
|
methodList.value = await Getdictionary('billingMethod')
|
|
|
}
|
|
|
|
|
|
+
|
|
|
onMounted(async () => {
|
|
|
await handleDictValue()
|
|
|
await intData()
|