瀏覽代碼

合并分支Merge branch 'dev'

wxy 3 月之前
父節點
當前提交
6cf3496dad

+ 3 - 1
.gitignore

@@ -22,4 +22,6 @@ dist-ssr
 *.njsproj
 *.sln
 *.sw?
-yarn.lock
+*.vite.config.js
+yarn.lock
+vite.config.js

File diff suppressed because it is too large
+ 388 - 388
public/cdn/es-module-shims.wasm.js


+ 5 - 0
src/api/path/flowPool.api.js

@@ -43,3 +43,8 @@ export  function  createWarning(data){
 export  function  updateWarning(data){
     return service.post('/admin/alert/warningUpdate',data)
 }
+
+// 流量池操作记录
+export function updateFlowPoolData(data){
+    return service.post('/admin/platform/trafficPoolListRecord',data)
+}

+ 16 - 6
src/assets/images/error-image.png


+ 34 - 67
src/components/Layout/components/layout/menu.vue

@@ -1,15 +1,15 @@
 <template>
   <a-row class="grid-demo">
-    <a-col :span="12" style="height: 100vh;background-color: #232324;">
+    <a-col :span="menuSecondData && menuSecondData && menuSecondData.length !== 0 ? 12 : 24"
+      style="height: 100vh;background-color: #232324;">
       <div class="logo-layout" v-if="LayoutStore.setting.SidebarLogo">
         <div class="logo">
           <img src="@/assets/images/logo.png" />
         </div>
         <h3>Easy life</h3>
       </div>
-      <a-menu v-model:selectedKeys="menuTabSate" theme="dark" mode="inline" @mouseleave="evMouseleaveMenu">
-        <a-menu-item v-for="routeItem in routesData" :key="routeItem.name"
-          @mouseenter="evMenuGetFn(routeItem, 'mouseenter')" @click="changeRoutesItems(routeItem)">
+      <a-menu v-model:selectedKeys="menuTabSate" theme="dark" mode="inline">
+        <a-menu-item v-for="routeItem in routesData" :key="routeItem.name" @click="changeRoutesItems(routeItem)">
           <template #icon>
             <svg-icon :icon="routeItem.meta.icon"></svg-icon>
           </template>
@@ -17,15 +17,14 @@
         </a-menu-item>
       </a-menu>
     </a-col>
-    <a-col :span="12">
+    <a-col :span="12" v-if="menuSecondData && menuSecondData && menuSecondData.length !== 0">
       <a-menu :selectedKeys="routeItemSelectedKeys" id="layout-sider" theme="light" mode="vertical" :collapsed="false"
         :auto-open="true" style="height: 100vh;color: #fff;">
-        <template v-for="routeItem in menuSecondData?.children || []">
+        <template v-for="routeItem in menuSecondData">
           <a-menu-item v-if="!routeItem.children || routeItem.children.length === 0" :key="routeItem.name?.toString()"
             @click="evGoPage(routeItem)">
-            <span class="menu-level-font">{{ routeItem.meta.title }}</span>
+            <span class="menu-level-font">{{ routeItem.meta?.title }}</span>
           </a-menu-item>
-
           <template v-else-if="routeItem.children && routeItem.children.length > 0">
             <sub-menu :key="routeItem.name" :menu-info="routeItem" @go="evGoPage" />
           </template>
@@ -38,7 +37,6 @@
 import { ref, computed, h, reactive, onMounted, watch, nextTick } from "vue";
 import { useRoute, useRouter } from "vue-router";
 import { useSystemStore } from "@/store/modules/systemStore";
-import LayoutHeader from "@/components/Layout/components/layoutHeader/index.vue";
 import subMenu from "@/components/Layout/components/subMenu/index.vue";
 import { RouterTagData } from '@/store/modules/routerTag.js'
 import { layoutSetting } from '@/store/modules/layoutSetting'
@@ -51,41 +49,16 @@ const systemStore = useSystemStore();
 const route = useRoute();
 const router = useRouter();
 
-const menuSecondLongShow = ref(systemStore.menuSecondLongShow);
 // 主菜单
 const routesData = router.options.routes[0]?.children || [];
 
-const menuTabSate = ref([systemStore.getMenuTabSate || routesData[0].name]);
+const menuTabSate = ref([routerTagData.getDefault]);
 //子菜单
-const menuSecondData = ref(systemStore.getRouteItem);
+const menuSecondData = ref([]);
 // 选中的状态路由列表
-const menuSecondSelectedStatusData = ref(systemStore.getRouteItem);
+
 const routeItemSelectedKeys = ref();
 
-const evMenuSecondLongShow = () => {
-  systemStore.setStateValue({
-    key: "menuSecondLongShow",
-    value: menuSecondLongShow.value ? 1 : 0,
-    localStorage: true,
-  });
-};
-const evMouseleaveMenu = (e) => {
-  if (
-    e.relatedTarget?.offsetParent?.id &&
-    e.relatedTarget?.offsetParent?.id == "layout-sider"
-  )
-    return;
-  menuSecondData.value = menuSecondSelectedStatusData.value;
-};
-// 子菜单
-const evMouseLeavesSubMenu = () => {
-  menuSecondData.value = menuSecondSelectedStatusData.value;
-};
-// 鼠标滑动上去更新菜单栏 目前先屏蔽
-const evMenuGetFn = (routeItem, type) => {
-  // menuSecondData.value = routeItem;
-  // console.log(routeItem);
-};
 
 // 查找最下级
 const findPath = (data) => {
@@ -98,6 +71,13 @@ const findPath = (data) => {
 
 // 主路由 状态
 const changeRoutesItems = (e) => {
+  // 储存当前路由
+  systemStore.setStateValue({
+    key: "routeItem",
+    value: JSON.stringify(e),
+    localStorage: true,
+  });
+  menuSecondData.value = e.children
   const item = findPath(e);
   evGoPage(item);
 };
@@ -107,54 +87,41 @@ const evGoPage = async (routeItem) => {
   await router.push({
     name: routeItem.name,
   });
-
   if (LayoutStore.setting.HeadNavigationBar) {
     routerTagData.tagsPushData(routeItem)
     routerTagData.getDefault(routeItem.name)
   }
-  menuTabSate.value = [route.matched[1].name];
   systemStore.setStateValue({
     key: "menuTabSate",
     value: routeItem.name || "",
     localStorage: true,
   });
-
-  menuSecondSelectedStatusData.value = routesData.find(
-    (item) => item.name == menuTabSate.value
-  );
-  menuSecondData.value = menuSecondSelectedStatusData.value;
-  systemStore.setStateValue({
-    key: "routeItem",
-    value: JSON.stringify(menuSecondData.value),
-    localStorage: true,
-  });
 };
 
 watch(
   route,
   (val) => {
-    if (val.name) {
-      routeItemSelectedKeys.value = [val.name];
-    }
+    routesData.forEach(res => {
+      if (res.children && res.children.length > 0) {
+        res.children.forEach(item => {
+          if (item.name == val.name) {
+            menuTabSate.value = [res.name]
+            routeItemSelectedKeys.value = [item.name]
+            menuSecondData.value = res.children
+          }
+        })
+      } else {
+        if (res.name == val.name) {
+          menuTabSate.value = [res.name]
+          menuSecondData.value = []
+        }
+      }
+    })
   },
   { immediate: true }
 );
 
-watch(() => routerTagData.getMenuTabSate, val => {
-  routesData.forEach(res => {
-    if (res.children && res.children.length > 0) {
-      res.children.forEach(item => {
-        if (item.name == val) {
-          menuTabSate.value = [res.name]
-          routeItemSelectedKeys.value = [item.name]
-          const items = findPath(res);
-          evGoPage(items);
-        }
-      })
-    }
-  })
-  console.log(val);
-}, { immediate: true })
+
 </script>
 <style scoped lang="less">
 .grid-demo {

+ 41 - 22
src/components/Layout/components/layoutHeader/index.vue

@@ -2,7 +2,7 @@
   <div class="header">
     <div class="layout_header">
       <!-- 面包屑 -->
-      <div class="flex_item_bread" >
+      <div class="flex_item_bread">
         <a-breadcrumb v-if="LayoutStore.setting.crumbs">
           <a-breadcrumb-item v-for="(item, index) in itemBreabucm" :key="index">{{ item }}</a-breadcrumb-item>
         </a-breadcrumb>
@@ -60,6 +60,7 @@ import { updateRouteByMenu } from "@/router/router.update.js"
 import Setting from '../setting/index.vue'
 import Tags from '../layoutTags/index.vue'
 import { layoutSetting } from '@/store/modules/layoutSetting'
+import { RouterTagData } from '@/store/modules/routerTag.js'
 const LayoutStore = layoutSetting()
 const router = useRouter()
 const route = useRoute()
@@ -71,7 +72,7 @@ const userInfor = ref(null)
 const SettingVisible = ref(false)
 const routesData = router.options.routes[0]?.children || [];
 const itemBreabucm = ref([])
-
+const routerTagData = RouterTagData()
 const toggleTheme = (e) => {
   designStore.changeTheme(e)
 }
@@ -95,34 +96,52 @@ const evHandleLogout = () => {
 
 // 获取当前路由菜单
 const AcquireRouterItem = (item) => {
-    itemBreabucm.value = [];
-    function recursiveFindRoute(routes, parentTitles = []) {
-        for (const route of routes) {
-            const currentTitles = [...parentTitles];
-            currentTitles.push(route.meta.title);
-            if (route.path === item) {
-                return currentTitles;
-            }
-            if (route.children && route.children.length > 0) {
-                const result = recursiveFindRoute(route.children, currentTitles);
-                if (result.length > 0) {
-                    return result;
-                }
-            }
+  itemBreabucm.value = [];
+  function recursiveFindRoute(routes, parentTitles = []) {
+    for (const route of routes) {
+      const currentTitles = [...parentTitles];
+      currentTitles.push(route.meta.title);
+      if (route.path === item) {
+        return currentTitles;
+      }
+      if (route.children && route.children.length > 0) {
+        const result = recursiveFindRoute(route.children, currentTitles);
+        if (result.length > 0) {
+          return result;
         }
-        return [];
+      }
     }
+    return [];
+  }
 
-    const result = recursiveFindRoute(routesData);
-    if (result.length > 0) {
-        itemBreabucm.value = result;
-    }
+  const result = recursiveFindRoute(routesData);
+  if (result.length > 0) {
+    itemBreabucm.value = result;
+  }
 };
 
 watch(route, val => {
-    AcquireRouterItem(val.path)
+  AcquireRouterItem(val.path)
 }, { immediate: true })
 
+watch(() => LayoutStore.setting.HeadNavigationBar, val => {
+  if (val && routerTagData.tagData.length == 0) {
+    routesData.forEach(res => {
+      if (res.name == route.name) {
+        routerTagData.tagData.push(res)
+      } else {
+        if (res.children && res.children.length !== 0) {
+          res.children.forEach(child => {
+            if (child.name == route.name) {
+              routerTagData.tagData.push(child)
+            }
+          })
+        }
+      }
+    })
+  }
+}, { immediate:true })
+
 onMounted(() => {
   userInfor.value = JSON.parse(localStorage.getItem('user_login_information'))
 })

+ 6 - 15
src/components/Layout/components/layoutTags/index.vue

@@ -50,7 +50,7 @@ const route = useRoute()
 // 标签页仓库
 const routerTagData = RouterTagData()
 
-const tags = ref([])
+const tags = ref(localStorage.getItem('RouterTagData'))
 const activeKey = ref()
 
 watch(
@@ -59,14 +59,14 @@ watch(
         // 更新 tags
         tags.value = val;
     },
-    { deep: true }
+    { immediate: true, deep: true }
 );
 
 watch(
-    () => routerTagData.getMenuTabSate,
+    () => route,
     (val) => {
-        activeKey.value = val
-    }, { immediate: true })
+        activeKey.value = val.name
+    }, { immediate: true, deep: true })
 
 
 
@@ -89,12 +89,7 @@ const handelItemSetting = (val) => {
             })
             break;
         case 2:
-            routerTagData.tagData = []
-            localStorage.removeItem('RouterTagData')
-            routerTagData.getDefault('home')
-            router.push({
-                path: '/'
-            })
+            routerTagData.tagData = routerTagData.tagData.filter(res => res.name == route.name)
             break;
     }
 }
@@ -106,10 +101,6 @@ const handelDelete = (item) => {
     })
 }
 
-onMounted(() => {
-    const tagList = localStorage.getItem('RouterTagData') || []
-    routerTagData.tagsPushFilter(tagList)
-});
 </script>
 <style lang="less" scoped>
 .flex-left-tag {

+ 105 - 42
src/components/Layout/components/subMenu/index.vue

@@ -1,27 +1,34 @@
 <template>
-    <div ref="search">
+    <div class="search">
         <!-- 动态渲染表单项 -->
-        <a-form :model="formState" layout="inline">
-            <a-form-item v-for="(item, index) in SearchForm" :key="index" :label="item.label" :field="item.field">
-                <component :is="'a-' + item.type" v-model="formState[item.field].value" :placeholder="item.placeholder"
-                    allow-clear :style="{ width: item.width ? item.width + 'px' : '' }">
-                    <template v-if="item.type == 'select'">
-                        <a-option v-for="option in item.options" :key="option.value" :value="option.value">
-                            {{ option.label }}
-                        </a-option>
-                    </template>
-                </component>
-            </a-form-item>
-            <a-form-item>
-                <a-button type="primary" @click="handleQuery">查询</a-button>
-                <a-button @click="handleReset" style="margin-left: 10px;">重置</a-button>
-            </a-form-item>
-        </a-form>
+        <div class="Form">
+            <a-form :model="formState" layout="inline">
+                <a-form-item v-for="(item, index) in showIcon ? data : InitialData" :key="index" :label="item.label"
+                    :field="item.field" :wrapper-col-style="{ marginBottom: '20px' }">
+                    <component :is="'a-' + item.type" v-model="formState[item.field]" item.Custom
+                        :placeholder="item.type == 'input' ? '请输入' : '请选择' + item.label" allow-clear
+                        :style="{ width: item.width ? item.width + 'px' : '' }">
+                        <template v-if="item.type == 'select'">
+                            <a-option v-for="option in item.options" :key="option.value" :value="option.value">
+                                {{ option.label }}
+                            </a-option>
+                        </template>
+                    </component>
+                </a-form-item>
+                <a-form-item>
+                    <a-button type="primary" @click="handleQuery">查询</a-button>
+                    <a-button @click="handleReset" style="margin-left: 10px;">重置</a-button>
+                    <div v-if="show" @click="showIcon = !showIcon" class="icon">
+                        {{ showIcon ? '折叠' : '展开' }} <icon-down :rotate="showIcon ? 180 : 0" />
+                    </div>
+                </a-form-item>
+            </a-form>
+        </div>
     </div>
 </template>
 
 <script setup>
-import { ref, defineProps, toRefs, onMounted, watch, watchEffect } from 'vue';
+import { ref, defineProps, toRefs, watch, defineEmits } from 'vue';
 import { Getdictionary } from "@/mixins/index.js";
 
 // 接收 props
@@ -33,24 +40,21 @@ const props = defineProps({
                 type: 'input',
                 label: '字典名称',
                 field: 'source',
-                placeholder: '请输入字典名称',
-                value: '', // 双向绑定的值
+                value: '',
             },
             {
                 type: 'input',
                 label: '资费ID',
                 field: 'trafficId',
-                placeholder: '请输入资费ID',
-                value: '', // 双向绑定的值
+                value: '',
             },
             {
                 type: 'select',
                 label: '卡类型',
                 field: 'simType',
-                placeholder: '选择卡类型',
-                options: [], // 默认空,后面会通过字典加载
-                dict:'CardType',
-                value: '', // 双向绑定的值
+                options: [],
+                dict: 'CardType',
+                value: '',
                 width: '200'
             },
         ],
@@ -59,40 +63,99 @@ const props = defineProps({
 
 const { SearchForm } = toRefs(props);
 
+// 用于存储原始SearchForm数据的副本
+const originalSearchForm = ref([]);
+// 分割完成的数据
+const InitialData = ref([]);
+const show = ref(false);
+const showIcon = ref(false);
 const formState = ref({});
+const data = ref([]);
+
+const emit = defineEmits(['query']);
+
+// 在组件创建时,拷贝原始SearchForm数据
+watch(() => props.SearchForm, () => {
+    originalSearchForm.value = JSON.parse(JSON.stringify(props.SearchForm));
+}, { immediate: true });
+
 SearchForm.value.forEach(item => {
-    formState.value[item.field] = {
-        value: item.value, 
-    };
+    formState.value[item.field] = item.value;
 });
 
 // 字典加载
-const loadedDicts = ref({}); 
+const loadedDicts = ref({});
 const loadDictOptions = async (index, dict) => {
     if (loadedDicts.value[dict]) {
         SearchForm.value[index].options = loadedDicts.value[dict];
         return;
     }
     const dictionary = await Getdictionary(dict);
-    loadedDicts.value[dict] = dictionary || []; 
-    SearchForm.value[index].options = loadedDicts.value[dict]; 
+    loadedDicts.value[dict] = dictionary || [];
+    SearchForm.value[index].options = loadedDicts.value[dict];
+    originalSearchForm.value[index].options = loadedDicts.value[dict];
 };
 
 watch(
-  () => SearchForm.value, 
-  async () => {
-    for (let index = 0; index < SearchForm.value.length; index++) {
-        const item = SearchForm.value[index];
-        if (item.dict && !loadedDicts.value[item.dict]) {
-            await loadDictOptions(index, item.dict); 
+    () => SearchForm.value,
+    async () => {
+        for (let index = 0; index < SearchForm.value.length; index++) {
+            const item = SearchForm.value[index];
+            if (item.dict && !loadedDicts.value[item.dict]) {
+                await loadDictOptions(index, item.dict);
+            }
         }
-    }
-}, { immediate: true });
+        // 如果当前长度超过5条就需要折叠展开
+        if (SearchForm.value.length >6) {
+            show.value = true;
+        }
+        // 初始化切割数组,使用原始SearchForm数据的副本进行操作
+        InitialData.value = originalSearchForm.value.splice(0, 6);
+        data.value = [...InitialData.value, ...originalSearchForm.value];
+    },
+    { immediate: true }
+);
 
 // 查询操作
 const handleQuery = () => {
-    // 将表单数据通过事件传递给父组件
     emit('query', formState.value);
 };
 
-</script>
+const handleReset = () => {
+    const newFormState = {};
+    SearchForm.value.forEach(item => {
+        if (typeof item.value === 'string') {
+            newFormState[item.field] = '';
+        } else if (Array.isArray(item.value)) {
+            newFormState[item.field] = [];
+        } else if (typeof item.value === 'object') {
+            newFormState[item.field] = {};
+        }
+    });
+    formState.value = newFormState;
+    emit('reset', formState.value);
+};
+
+
+</script>
+
+<style lang="less" scoped>
+.search {
+    display: flex;
+    justify-content: space-between;
+}
+
+.Form {
+    width: 95%;
+}
+
+.icon {
+    display: flex;
+    // align-items: center;
+    color: #3491fa;
+    font-size: 15px;
+    cursor: pointer;
+    font-weight: 600;
+    margin-left: 15px;
+}
+</style>

+ 1 - 0
src/components/Svg-icon/SvgIcon.vue

@@ -37,6 +37,7 @@ export const layoutSetting = defineStore({
     // 头部导航栏
     handelHeadNavigationBar(e){
         this.setting.HeadNavigationBar = e;
+        localStorage.removeItem('RouterTagData')
     },
     // 切换布局样式
     handelLayoutStyle(e){

+ 149 - 19
src/views/OperationRecord/FlowpoolRecord/index.vue

@@ -1,39 +1,169 @@
+<!-- 流量池 -->
 <template>
-  <div>
-    <div class="Search">
-      <Search></Search>
+  <div class="container">
+    <!-- 搜索条件区 -->
+    <div class="search-section">
+      <Search :SearchForm="SearchFormList" @query="intData" @reset="reset"></Search>
     </div>
 
-    <div class="table">
-      <a-table :columns="columnsFlow" :data="data" :pagination="pageData" @page-change="evChangePage" />
+    <div class="audit-btn">
+      <a-button @click="dictShowModel(1, null)" type="text" v-if="role == 1">
+        <template #icon>
+          <icon-plus-circle />
+        </template>
+        <template #default>
+          {{ $t('form.Add') }}
+        </template>
+      </a-button>
     </div>
+
+    <a-table row-key="id" :data="dataSource" :columns="columnsFlow" :pagination="pagination" :scroll="{ x: 'auto' }"
+      @page-change="evChangePage">
+
+      <template #status="{ record }">
+        <a-tag :color="record.status == 1 ? '#00b42a' : '#f53f3f'">{{ trafficList.find(val => val.value ==
+          record.status)?.label }}</a-tag>
+      </template>
+
+    </a-table>
+
+
   </div>
 </template>
 
 <script setup>
-import { ref, onMounted, toRefs } from 'vue';
+import { onMounted, ref, toRefs } from "vue";
+import { columnsFlow ,SearchFormList} from "../config";
+import {
+  updateFlowPoolData,
+} from "@/api/path/flowPool.api"
+import { useSystemStore } from "@/store/modules/systemStore"
+import { Getdictionary } from '@/mixins/index.js'
 import Search from '@/components/Search/index.vue'
-import {columnsFlow} from '../config'
-
+const systemStore = useSystemStore()
 const state = ref({
-  pageData: {
-    total: 10,
-    size: 10,
+  role: systemStore.getRole,
+  searchForm: {},
+  pagination: {
+    total: 0,
+    pageSize: 10,
     current: 1,
   },
-  data: []
+  sourceList: [],
+  trafficList: [],
+  dataSource: [],
 })
+const {
+  role,
+  searchForm,
+  pagination,
+  sourceList,
+  trafficList,
+  dataSource,
+} = toRefs(state.value)
+
+const intData = async (item) => {
+  if (item) {
+    searchForm.value = item
+  }
+  const param = {
+    current: pagination.value.current,
+    size: pagination.value.pageSize,
+    ...searchForm.value,
+  }
+  const { data } = await updateFlowPoolData(param)
+  dataSource.value = (data.records || []).map((item, index) => {
+    const sourceName = sourceList.value.find(val => val.value == item.source)?.label
+    const Activated = 0 + '/' + item.iccids?.length
+    const HaveBeenUsed = 0 + '/' + item.size + item.sizeType
+    item.children = item.children?.map(res => {
+      return {
+        ...res,
+        sourceName,// 运营商名称
+        Activated: Activated,
+        HaveBeenUsed: HaveBeenUsed,
+        trafficPoolType:res.trafficPoolType==1?'前流量池':'后流量池',
+        simTariffName:item.simTariffName,
+        size:res.size+'/'+res.sizeType
+      }
+    })
+    return {
+      ...item,
+      sourceName,// 运营商名称
+      Activated: Activated,
+      trafficPoolType:item.trafficPoolType==1?'前流量池':'后流量池',
+      HaveBeenUsed: HaveBeenUsed,
+      size:item.size+'/'+item.sizeType
+    }
+  })
 
-const { pageData, data } = toRefs(state.value)
+  pagination.value.total = data.total
+}
 
-// 分页
 const evChangePage = (page) => {
-  pageData.value.current = page
+  pagination.value.current = page
+  intData()
+}
+const reset = (item) => {
+  searchForm.value = item
+  pagination.value.current = 1
+  intData()
+}
+
+const handleDictValue = async () => {
+  sourceList.value = await Getdictionary('source')
+  trafficList.value = await Getdictionary('trafficPacketStatus')
 }
+
+onMounted(async () => {
+  await handleDictValue()
+  await intData()
+})
+
 </script>
-<style scoped>
-.Search,
-.table {
+
+<style scoped lang="less">
+.m-r-10 {
+  margin-right: 10px;
+}
+
+.search-section {
   margin-top: 20px;
+  margin-bottom: 20px;
+}
+
+.container {
+  .head-title {
+    display: flex;
+    justify-content: space-between;
+  }
+
+  .form-row {
+    display: flex;
+
+    .form-row-col {
+      width: 25%;
+      display: flex;
+      align-items: center;
+
+      .form-row-label {
+        width: 120px;
+        text-align: right;
+      }
+    }
+  }
+}
+
+silent-expire-alarm {
+  padding: 20px !important;
+  // background: #fcf;
+}
+
+.search-section {
+  margin-bottom: 20px;
+}
+
+.audit-btn {
+  margin-bottom: 10px;
 }
-</style>
+</style>

+ 28 - 47
src/views/OperationRecord/TariffRecord/index.vue

@@ -3,49 +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 class="a-link" href="javascript:;" style="margin-right: 1rem" @click="dictShowModel(2, record)"
-          v-if="role.getRole == 1">{{
-            $t('form.alter')
-          }}</a>
-        <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="meal(record)">{{
-          $t('tariffManagement.SetMeal') }}</a>
-        <a-popconfirm :content="$t('form.Delete')" :ok-text="$t('form.Confirm')" :cancel-text="$t('form.Cancel')"
-          @ok="handleDel(record.id)">
-          <a class="a-link" href="javascript:;" style="margin-right: 1rem" v-if="role.getRole == 1">{{
-            $t('form.Delete')
-          }}</a>
-        </a-popconfirm>
-      </template> -->
+      <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: {
@@ -53,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 = {
@@ -91,12 +61,28 @@ const intData = async (item) => {
     const bagSize = item.pricing + '/' + item.mrcAmount + '/' + item.networkAccessFee
     const billingMethodName = methodList.value.find(val => val.value == item.billingMethod)?.label
     let pricingName;
-
     if (item.billingMethod == 1) {
       pricingName = item.trafficBillingAmount + pricingCurrty
     } 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,
@@ -106,14 +92,14 @@ const intData = async (item) => {
       status: "正常",
       bagSize,
       billingMethodName,
-      Number: index + 1
+      Number: index + 1,
     }
   })
   pagination.value.total = data.total
 }
 
-const reset = (item)=>{
-  searchForm.value = item 
+const reset = (item) => {
+  searchForm.value = item
   pagination.value.current = 1
   intData()
 }
@@ -123,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')
@@ -137,6 +117,7 @@ const handleDictValue = async () => {
   methodList.value = await Getdictionary('billingMethod')
 }
 
+
 onMounted(async () => {
   await handleDictValue()
   await intData()

+ 38 - 102
src/views/OperationRecord/config.js

@@ -102,14 +102,6 @@ export let columns = [
     width: 200,
     ellipsis: true,
   },
-  // {
-  //   title: window.$t("global.common.operations"),
-  //   dataIndex: "id",
-  //   slotName: "id",
-  //   align: "center",
-  //   width: 180,
-  //   fixed: "right",
-  // },
 ];
 // 资费套餐
 export const planColumns = [
@@ -189,116 +181,60 @@ export const trafficSearchFrom = [
   },
 ];
 
-// 客户搜索字段
-export const UserSearchForm = [
+
+
+// 流量池
+export const columnsFlow = [
+  { title: window.$t('flowPool.poolNumber'), dataIndex: 'id', align: 'center', ellipsis:true,width: 50 },
+  { title: '池类型', dataIndex: 'trafficPoolType', align: 'center', ellipsis:true,width: 50 },
+  { title: window.$t('flowPool.label'), dataIndex: 'label', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
+  { title: window.$t('flowPool.trafficPoolStatus'), slotName: 'status', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
+  { title: window.$t('flowPool.source'), dataIndex: 'sourceName', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
+  { title: window.$t('flowPool.tariffName'), dataIndex: 'simTariffName', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
+  { title:'池大小', dataIndex: 'size', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
+  { title: window.$t('flowPool.ActivatedName'),dataIndex:'Activated', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
+  { title: window.$t('flowPool.HaveBeenUsedName'), dataIndex: 'HaveBeenUsed', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
+  { title: window.$t('flowPool.updated_at'), dataIndex: 'updatedAt', align: 'center', width: 200,tooltip:true,ellipsis:true },
+]
+
+
+export const SearchFormList = [
   {
     type: "input",
-    label: "客户名称",
-    field: "name",
+    label: "流量池名称",
+    field: "label",
     value: "", // 双向绑定的值
   },
   {
-    type: "input",
-    label: "客户账号",
-    field: "username",
+    type: "select",
+    label: "流量池状态",
+    field: "status",
+    options: [], // 默认空,后面会通过字典加载
+    dict: "trafficPacketStatus",
     value: "", // 双向绑定的值
+    width: "200",
   },
   {
     type: "select",
-    label: "客户状态",
-    field: "state",
+    label: "运营商名称",
+    field: "source",
     options: [], // 默认空,后面会通过字典加载
-    dict: "userType",
+    dict: "source",
     value: "", // 双向绑定的值
     width: "200",
   },
   {
-    type: "range-picker",
-    label: "创建时间",
-    field: "createdAt",
-    value: [], // 双向绑定的值
-    width: "300",
-    Custom: 'mode="month"', // 自定义值
-  },
-];
-
-export const UserColumns = [
-  {
-    title: window.$t("customer.id"),
-    dataIndex: "id",
-    align: "center",
-    ellipsis: true,
-  },
-  {
-    title: window.$t("customer.customerName"),
-    dataIndex: "name",
-    align: "center",
-    ellipsis: true,
-  },
-  {
-    title: window.$t("customer.userAdmin"),
-    dataIndex: "username",
-    align: "center",
-  },
-  {
-    title: window.$t("customer.customerStatus"),
-    slotName: "state",
-    align: "center",
-    ellipsis: true,
-  },
-  { title: "app_key  ", dataIndex: "appKey", align: "center", ellipsis: true },
-  {
-    title: "app_secret",
-    dataIndex: "appSecret",
-    align: "center",
-    ellipsis: true,
-  },
-  {
-    title: window.$t("customer.startTime"),
-    dataIndex: "createdAt",
-    align: "center",
-    ellipsis: true,
-  },
-  {
-    title: window.$t("customer.updateTime"),
-    dataIndex: "updatedAt",
-    align: "center",
-    ellipsis: true,
+    type: "input",
+    label: "资费名称",
+    field: "tariffName",
+    value: "", // 双向绑定的值
   },
   {
-    title: window.$t("global.common.operations"),
-    slotName: "operation",
-    align: "center",
-    ellipsis: true,
+    type: "range-picker",
+    label: "更新日期",
+    field: "updatedAt",
+    value: "", // 双向绑定的值
+    width: "240",
   },
 ];
 
-
-// 流量池
-export const columnsFlow = [
-  { title: window.$t('flowPool.poolNumber'), dataIndex: 'id', align: 'center', ellipsis:true,width: 50 },
-  { title: window.$t('flowPool.label'), dataIndex: 'label', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
-  // { title: window.$t('flowPool.userId'), dataIndex: 'user_id', align: 'center', width: 200 },
-  // { title: window.$t('flowPool.trafficPoolType'), dataIndex: 'trafficPoolType', align: 'center', width: 200 },
-  { title: window.$t('flowPool.trafficPoolStatus'), slotName: 'status', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
-  // { title: window.$t('flowPool.cardFlow'), dataIndex: 'cardFlow', align: 'center', width: 200 },
-  // { title: window.$t('flowPool.UsedMonth'), dataIndex: 'UsedMonth', align: 'center', width: 200 },
-  // { title: window.$t('flowPool.surplusFlow'), dataIndex: 'surplusFlow', align: 'center', width: 200 },
-  // { title: window.$t('flowPool.exceededFlow'), dataIndex: 'exceededFlow', align: 'center', width: 200 },
-  { title: window.$t('flowPool.source'), dataIndex: 'sourceName', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
-  { title: window.$t('flowPool.tariffName'), dataIndex: 'simTariffName', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
-  { title: window.$t('flowPool.ActivatedName'),dataIndex:'Activated', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
-  { title: window.$t('flowPool.HaveBeenUsedName'), dataIndex: 'HaveBeenUsed', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
-  // { title: window.$t('flowPool.cardRariffName'), dataIndex: 'cardRariffName', align: 'center', width: 200 },
-  // { title: window.$t('flowPool.cardNum'), dataIndex: 'cardNum', align: 'center', width: 200 },
-  // { title: window.$t('flowPool.totalFlow'), dataIndex: 'totalFlow', align: 'center', width: 200 },
-  { title: window.$t('flowPool.updated_at'), dataIndex: 'updatedAt', align: 'center', width: 200,tooltip:true,ellipsis:true },
-  {
-      title: window.$t('global.common.operations'),
-      slotName: 'id',
-      align: 'center',
-      width: 250,
-      fixed: "right",
-  }
-]
-

+ 7 - 36
src/views/exception/errors.vue

@@ -143,54 +143,25 @@ const handleDictValue = async () => {
   typeList.value = await Getdictionary('trafficPoolType')
 }
 
-
-// const selectChange = (val) => {
-//   updateCardList({ id: val }).then(res => {
-//     if (res.code === 200) {
-//       formState.value.iccids = []
-//       card.value = res.data
-//     }
-//   })
-// }
-
-watch(() => record.value, val => {
-  const datas = JSON.parse(JSON.stringify(val))
+const recordVal = (item) => {
+  const datas = JSON.parse(JSON.stringify(item))
   if (props.typeCurrent == 2) {
     formState.value = datas
-    // formState.value.iccids = []
-    // updateCardList({ id: val.simTariffId }).then(res => {
-    //   if (res.code === 200) {
-    //     val.iccids.forEach(res => {
-    //       formState.value.iccids.push(res.iccid)
-    //     })
-    //     card.value = res.data
-    //   }
-    // })
   }
-}, { deep: true })
+}
 
 watch(() => modelValue.value, val => {
   if (val) {
     handleDictValue()
     handleTariff()
+    recordVal(record.value)
   }
 })
 
-
-// const changeAll = (e)=>{
-//   SelectAll.value = e
-//   if (e) {
-//     formState.value.iccids = card.value.map(res => res.iccid)
-//   } else {
-//     formState.value.iccids = []
-//   }
-// }
-
-
 </script>
 
 <template>
-  <a-modal :render-to-body="false"
+  <a-modal :render-to-body="false" unmount-on-close
     :title="typeCurrent == 1 ? $t('form.Add') : typeCurrent == 2 ? $t('form.Edit') : $t('flowPool.Detail')"
     v-model:visible="modelValue" @cancel="resetForm" centered :maskClosable="false" :footer="null" width="55%">
     <a-tabs v-model:active-key="activeKey">
@@ -236,8 +207,8 @@ watch(() => modelValue.value, val => {
                   <a-checkbox v-model="SelectAll" @change="changeAll">全选</a-checkbox>
                 </div>
               </template>
-            </a-select>
-          </a-form-item> -->
+</a-select>
+</a-form-item> -->
           <a-form-item :label="$t('flowPool.expireTime')" field="expireTime">
             <a-date-picker v-model="formState.expireTime" show-time :time-picker-props="{ defaultValue: '09:09:06' }"
               format="YYYY-MM-DD HH:mm:ss" />

+ 192 - 25
src/views/flowPool/config.js

@@ -1,26 +1,193 @@
 export const columns = [
-    { title: window.$t('flowPool.poolNumber'), dataIndex: 'id', align: 'center', ellipsis:true,width: 50 },
-    { title: window.$t('flowPool.label'), dataIndex: 'label', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
-    // { title: window.$t('flowPool.userId'), dataIndex: 'user_id', align: 'center', width: 200 },
-    // { title: window.$t('flowPool.trafficPoolType'), dataIndex: 'trafficPoolType', align: 'center', width: 200 },
-    { title: window.$t('flowPool.trafficPoolStatus'), slotName: 'status', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
-    // { title: window.$t('flowPool.cardFlow'), dataIndex: 'cardFlow', align: 'center', width: 200 },
-    // { title: window.$t('flowPool.UsedMonth'), dataIndex: 'UsedMonth', align: 'center', width: 200 },
-    // { title: window.$t('flowPool.surplusFlow'), dataIndex: 'surplusFlow', align: 'center', width: 200 },
-    // { title: window.$t('flowPool.exceededFlow'), dataIndex: 'exceededFlow', align: 'center', width: 200 },
-    { title: window.$t('flowPool.source'), dataIndex: 'sourceName', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
-    { title: window.$t('flowPool.tariffName'), dataIndex: 'simTariffName', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
-    { title: window.$t('flowPool.ActivatedName'),dataIndex:'Activated', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
-    { title: window.$t('flowPool.HaveBeenUsedName'), dataIndex: 'HaveBeenUsed', align: 'center', width: 200 ,tooltip:true,ellipsis:true},
-    // { title: window.$t('flowPool.cardRariffName'), dataIndex: 'cardRariffName', align: 'center', width: 200 },
-    // { title: window.$t('flowPool.cardNum'), dataIndex: 'cardNum', align: 'center', width: 200 },
-    // { title: window.$t('flowPool.totalFlow'), dataIndex: 'totalFlow', align: 'center', width: 200 },
-    { title: window.$t('flowPool.updated_at'), dataIndex: 'updatedAt', align: 'center', width: 200,tooltip:true,ellipsis:true },
-    {
-        title: window.$t('global.common.operations'),
-        slotName: 'id',
-        align: 'center',
-        width: 250,
-        fixed: "right",
-    }
-]
+  {
+    title: window.$t("flowPool.poolNumber"),
+    dataIndex: "id",
+    align: "center",
+    ellipsis: true,
+    width: 50,
+  },
+  {
+    title: window.$t("flowPool.label"),
+    dataIndex: "label",
+    align: "center",
+    width: 200,
+    tooltip: true,
+    ellipsis: true,
+  },
+  {
+    title: window.$t("flowPool.trafficPoolStatus"),
+    slotName: "status",
+    align: "center",
+    width: 200,
+    tooltip: true,
+    ellipsis: true,
+  },
+  {
+    title: window.$t("flowPool.source"),
+    dataIndex: "sourceName",
+    align: "center",
+    width: 200,
+    tooltip: true,
+    ellipsis: true,
+  },
+  {
+    title: window.$t("flowPool.tariffName"),
+    dataIndex: "simTariffName",
+    align: "center",
+    width: 200,
+    tooltip: true,
+    ellipsis: true,
+  },
+  {
+    title: window.$t("flowPool.ActivatedName"),
+    dataIndex: "Activated",
+    align: "center",
+    width: 200,
+    tooltip: true,
+    ellipsis: true,
+  },
+  {
+    title: window.$t("flowPool.HaveBeenUsedName"),
+    dataIndex: "HaveBeenUsed",
+    align: "center",
+    width: 200,
+    tooltip: true,
+    ellipsis: true,
+  },
+  {
+    title: window.$t("flowPool.updated_at"),
+    dataIndex: "updatedAt",
+    align: "center",
+    width: 200,
+    tooltip: true,
+    ellipsis: true,
+  },
+  {
+    title: window.$t("global.common.operations"),
+    slotName: "id",
+    align: "center",
+    width: 250,
+    fixed: "right",
+  },
+];
+
+export const columnsAfter = [
+  {
+    title: window.$t("flowPool.poolNumber"),
+    dataIndex: "id",
+    align: "center",
+    ellipsis: true,
+    width: 50,
+  },
+  {
+    title: window.$t("flowPool.label"),
+    dataIndex: "label",
+    align: "center",
+    width: 200,
+    tooltip: true,
+    ellipsis: true,
+  },
+  {
+    title: window.$t("flowPool.trafficPoolStatus"),
+    slotName: "status",
+    align: "center",
+    width: 200,
+    tooltip: true,
+    ellipsis: true,
+  },
+  {
+    title: window.$t("flowPool.source"),
+    dataIndex: "sourceName",
+    align: "center",
+    width: 200,
+    tooltip: true,
+    ellipsis: true,
+  },
+  {
+    title: window.$t("flowPool.tariffName"),
+    dataIndex: "simTariffName",
+    align: "center",
+    width: 200,
+    tooltip: true,
+    ellipsis: true,
+  },
+  {
+    title: "池大小",
+    dataIndex: "size",
+    align: "center",
+    width: 200,
+    tooltip: true,
+    ellipsis: true,
+  },
+  {
+    title: window.$t("flowPool.ActivatedName"),
+    dataIndex: "Activated",
+    align: "center",
+    width: 200,
+    tooltip: true,
+    ellipsis: true,
+  },
+  {
+    title: window.$t("flowPool.HaveBeenUsedName"),
+    dataIndex: "HaveBeenUsed",
+    align: "center",
+    width: 200,
+    tooltip: true,
+    ellipsis: true,
+  },
+  {
+    title: window.$t("flowPool.updated_at"),
+    dataIndex: "updatedAt",
+    align: "center",
+    width: 200,
+    tooltip: true,
+    ellipsis: true,
+  },
+  {
+    title: window.$t("global.common.operations"),
+    slotName: "id",
+    align: "center",
+    width: 250,
+    fixed: "right",
+  },
+];
+
+export const SearchFormList = [
+  {
+    type: "input",
+    label: "流量池名称",
+    field: "label",
+    value: "", // 双向绑定的值
+  },
+  {
+    type: "select",
+    label: "流量池状态",
+    field: "status",
+    options: [], // 默认空,后面会通过字典加载
+    dict: "trafficPacketStatus",
+    value: "", // 双向绑定的值
+    width: "200",
+  },
+  {
+    type: "select",
+    label: "运营商名称",
+    field: "source",
+    options: [], // 默认空,后面会通过字典加载
+    dict: "source",
+    value: "", // 双向绑定的值
+    width: "200",
+  },
+  {
+    type: "input",
+    label: "资费名称",
+    field: "tariffName",
+    value: "", // 双向绑定的值
+  },
+  {
+    type: "range-picker",
+    label: "更新日期",
+    field: "updatedAt",
+    value: "", // 双向绑定的值
+    width: "240",
+  },
+];

+ 13 - 35
src/views/flowPool/index.vue

@@ -3,30 +3,7 @@
   <div class="container">
     <!-- 搜索条件区 -->
     <div class="search-section">
-      <a-form :model="searchForm" layout="inline">
-        <a-form-item field="label" :label="$t('flowPool.label')">
-          <a-input v-model="searchForm.label" :placeholder="$t('lotCard.please') + $t('flowPool.label')" allow-clear />
-        </a-form-item>
-        <a-form-item field="label" :label="$t('flowPool.status')">
-          <a-select v-model="value" :style="{ width: '240px' }" :placeholder="$t('flowPool.flowPoolStatus')">
-            <a-option v-for="item of trafficList" :value="item.id" :label="item.label" />
-          </a-select>
-        </a-form-item>
-        <a-form-item field="label" :label="$t('flowPool.operator')">
-          <a-select v-model="value" :style="{ width: '240px' }" :placeholder="$t('flowPool.operatorName')">
-            <a-option v-for="item of sourceList" :value="item.id" :label="item.label" />
-          </a-select>
-        </a-form-item>
-        <a-form-item field="label" :label="$t('flowPool.start_time')">
-          <a-date-picker style="width: 200px;" :placeholder="$t('flowPool.start_timeName')" />
-        </a-form-item>
-        <a-form-item>
-          <a-space>
-            <a-button type="primary" @click="handleSearch">{{ $t('form.Search') }}</a-button>
-            <a-button @click="resetSearch">{{ $t('form.Reset') }}</a-button>
-          </a-space>
-        </a-form-item>
-      </a-form>
+      <Search :SearchForm="SearchFormList" @query="intData" @reset="reset"></Search>
     </div>
 
     <div class="audit-btn">
@@ -76,7 +53,7 @@
 
 <script setup>
 import { onMounted, ref, getCurrentInstance, toRefs } from "vue";
-import { columns } from "./config";
+import { columns ,SearchFormList} from "./config";
 import { Message } from '@arco-design/web-vue'
 import {
   deleteTrafficPool,
@@ -90,13 +67,11 @@ import openExport from "./components/openExport.vue"
 import { useI18n } from 'vue-i18n'
 const { t } = useI18n();
 const systemStore = useSystemStore()
+import Search from '@/components/Search/index.vue'
 const state = ref({
   role: systemStore.getRole,
   formRef: null,
-  searchForm: {
-    "label": "",
-    "trafficPoolType": "1"
-  },
+  searchForm: {},
   pagination: {
     total: 0,
     pageSize: 10,
@@ -130,7 +105,10 @@ const {
 } = toRefs(state.value)
 const { proxy } = getCurrentInstance()
 
-const intData = async () => {
+const intData = async (item) => {
+  if(item){
+    searchForm.value = item
+  }
   const param = {
     current: pagination.value.current,
     size: pagination.value.pageSize,
@@ -168,11 +146,10 @@ const evChangePage = (page) => {
   pagination.value.current = page
   intData()
 }
-const handleSearch = () => {
-  intData()
-}
-const resetSearch = () => {
-  searchForm.value.label = ''
+
+const reset = (item) => {
+  searchForm.value = item
+  pagination.value.current = 1
   intData()
 }
 
@@ -181,6 +158,7 @@ const dictShowModel = (type, data) => {
   typeCurrent.value = type
   record.value = data
   showAdd.value = true
+  console.log(record.value);
 }
 
 const handelForewring = (item) => {

+ 15 - 62
src/views/flowPool/rearFlowPool/index.vue

@@ -3,55 +3,7 @@
   <div class="container">
     <!-- 搜索条件区 -->
     <div class="search-section">
-      <a-form :model="searchForm" layout="inline">
-        <a-form-item field="label" :label="$t('flowPool.label')">
-          <a-input
-            v-model="searchForm.label"
-            :placeholder="$t('lotCard.please') + $t('flowPool.label')"
-            allow-clear
-          />
-        </a-form-item>
-        <a-form-item field="label" :label="$t('flowPool.status')">
-          <a-select
-            v-model="value"
-            :style="{ width: '240px' }"
-            :placeholder="$t('flowPool.flowPoolStatus')"
-          >
-            <a-option
-              v-for="item of trafficList"
-              :value="item.id"
-              :label="item.label"
-            />
-          </a-select>
-        </a-form-item>
-        <a-form-item field="label" :label="$t('flowPool.operator')">
-          <a-select
-            v-model="value"
-            :style="{ width: '240px' }"
-            :placeholder="$t('flowPool.operatorName')"
-          >
-            <a-option
-              v-for="item of sourceList"
-              :value="item.id"
-              :label="item.label"
-            />
-          </a-select>
-        </a-form-item>
-        <a-form-item field="label" :label="$t('flowPool.start_time')">
-          <a-date-picker
-            style="width: 200px"
-            :placeholder="$t('flowPool.start_timeName')"
-          />
-        </a-form-item>
-        <a-form-item>
-          <a-space>
-            <a-button type="primary" @click="handleSearch">{{
-              $t("form.Search")
-            }}</a-button>
-            <a-button @click="resetSearch">{{ $t("form.Reset") }}</a-button>
-          </a-space>
-        </a-form-item>
-      </a-form>
+      <Search :SearchForm="SearchFormList" @query="intData" @reset="reset"></Search>
     </div>
 
     <div class="audit-btn">
@@ -68,7 +20,7 @@
     <a-table
       row-key="id"
       :data="dataSource"
-      :columns="columns"
+      :columns="columnsAfter"
       :pagination="pagination"
       :scroll="{ x: 'auto' }"
       @page-change="evChangePage"
@@ -125,7 +77,7 @@
 
 <script setup>
 import { onMounted, reactive, toRefs } from "vue";
-import { columns } from "../config";
+import { columnsAfter,SearchFormList } from "../config";
 import { Message } from "@arco-design/web-vue";
 import { deleteTrafficPool, lotCatdList } from "@/api/path/flowPool.api";
 import { useSystemStore } from "@/store/modules/systemStore";
@@ -133,6 +85,7 @@ import add from "../components/add.vue";
 import Forewarning from "../components/forewarning.vue";
 import { Getdictionary } from "@/mixins/index.js";
 import {useI18n} from 'vue-i18n'
+import Search from '@/components/Search/index.vue'
 const {t} = useI18n();
 const systemStore = useSystemStore();
 const state = reactive({
@@ -142,9 +95,7 @@ const state = reactive({
     pageSize: 10,
     current: 1,
   },
-  searchForm: {
-    label: "",
-  },
+  searchForm: {},
   role: systemStore.getRole,
   typeCurrent: 1,
   visibleForewarning: false,
@@ -169,7 +120,10 @@ const {
   showAdd,
 } = toRefs(state);
 
-const intData = async () => {
+const intData = async (item) => {
+  if(item){
+    searchForm.value = item
+  }
   const param = {
     current: pagination.value.current,
     size: pagination.value.pageSize,
@@ -195,6 +149,7 @@ const intData = async () => {
       Activated: Activated,
       HaveBeenUsed: HaveBeenUsed,
       trafficPoolStatus,
+      size:item.size+'/'+item.sizeType
     };
   });
   pagination.value.total = data.total;
@@ -217,13 +172,11 @@ const evChangePage = (page) => {
   intData();
 };
 
-const handleSearch = () => {
-  intData();
-};
-const resetSearch = () => {
-  searchForm.value.label = "";
-  intData();
-};
+const reset = (item) => {
+  searchForm.value = item
+  pagination.value.current = 1
+  intData()
+}
 
 // 弹框
 const dictShowModel = (type, data) => {

+ 5 - 2
src/views/login/login-form.vue

@@ -147,7 +147,8 @@ const state = ref({
     id: '',
     endDate: ''
   },
-  SearchForm:{}
+  SearchForm:{},
+  orderTypeStatus:[]
 });
 
 const {
@@ -167,7 +168,8 @@ const {
   formPreing,
   showEndDate,
   formEndDate,
-  SearchForm
+  SearchForm,
+  orderTypeStatus
 } = toRefs(state.value);
 
 const columns = [
@@ -200,6 +202,7 @@ const intData = async (item) => {
   }
   const simTypeList = await Getdictionary('cardType')
   let sourceList = await Getdictionary('source')
+  orderTypeStatus.value = await Getdictionary('orderType')
   purchaseOrderList(param).then(res => {
     tableData.value = (res.data.records || []).map((item, key) => {
       const sourceName = sourceList.find(val => val.value == item.source)?.label

+ 1 - 1
src/views/order/config.js

@@ -10,7 +10,7 @@ export const SearchFormBuyOrder = [
     label: "审核状态",
     field: "moderationStatus",
     options: [], // 默认空,后面会通过字典加载
-    dict: "source",
+    dict: "orderType",
     value: "", // 双向绑定的值
     width: "200",
   },

+ 0 - 73
src/views/system/user/form.vue

@@ -1,73 +0,0 @@
-import { defineConfig } from "vite";
-import vue from "@vitejs/plugin-vue";
-import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
-
-import { resolve } from "path";
-
-function pathResolve(dir) {
-    return resolve(process.cwd(), ".", dir);
-}
-
-export default defineConfig({
-    resolve: {
-        alias: [{
-            find: "@",
-            replacement: pathResolve("src"),
-        }, ],
-        dedupe: ["vue"],
-    },
-    plugins: [
-        vue(),
-        createSvgIconsPlugin({
-            // 指定需要缓存的图标文件夹
-            iconDirs: [resolve(process.cwd(), "src/assets/svg")],
-            // 指定symbolId格式
-            symbolId: "icon-[dir]-[name]",
-        }),
-    ],
-    css: {
-        // css预处理器
-        preprocessorOptions: {
-            less: {
-                charset: false, //  解决中文乱码
-                modifyVars: {
-                    "arcoblue-6": "#d1402f",
-                },
-                javascriptEnabled: true,
-                additionalData: '@import "@/assets/css/theme.less";@import "@/assets/css/global.less";',
-            },
-        },
-    },
-    build: {
-        minify: true, // 生产环境不生成sourcemap
-        target: "es2015",
-        // 警报门槛,限制大文件大小
-        chunkSizeWarningLimit: 5000,
-        rollupOptions: {
-            external: [], // 外部化处理那些你不想打包进库的依赖
-            // 静态资源分类打包
-            output: {
-                chunkFileNames: "static/js/[name]-[hash].js",
-                entryFileNames: "static/js/[name]-[hash].js",
-                assetFileNames: "static/[ext]/[name]-[hash].[ext]",
-            },
-        },
-    },
-    server: {
-        port: 8088,
-        host: "0.0.0.0",
-        open: true,
-        cors: true,
-        hmr: true,
-        proxy: {
-            "/api": {
-                // target: "http://sim.nanodreamtech.com",
-                // target: "http://127.0.0.1:3001",
-                target: "http://sim.ainets.net",
-                changeOrigin: true,
-                ws: true,
-                secure: true,
-            },
-        },
-    },
-});

Some files were not shown because too many files changed in this diff