Browse Source

修改卡清单字段 配置生产环境域名和生产环境域名

wxy 3 months ago
parent
commit
94434cb8b4

+ 0 - 1
.env.dev

@@ -1 +0,0 @@
-VITE_PRO_PATH=""

+ 2 - 0
src/App.vue

@@ -37,6 +37,8 @@ onMounted(async () => {
   if (getLoadingNode) {
     body.removeChild(getLoadingNode)
   }
+
+  console.log(import.meta.env.VITE_API_URL);
 })
 </script>
 

+ 1 - 1
src/api/path/lotCard.api.js

@@ -57,7 +57,7 @@ export function getDataPlanList(params) {
 
 // CDR详单查询
 export function getDataCDR(params) {
-    return service.post("/admin/sim/newSimCDR", params);
+    return service.post("/admin/sim/simCDR", params);
 }
 
 

+ 0 - 1
src/i18n/zh/lotCard.js

@@ -152,7 +152,6 @@ export default {
      Usedflow:'已使用流量',
      TrafficUsedToday:'今日使用流量',
      PackageValidity:'套餐有效期(天数)',
-     ExpirationDate:'过期日期',
      OrderNumber:'订单号',
      PurchasePackage:'购买套餐',
      OrderType:'订单类型',

+ 2 - 2
src/views/flowPool/customerFlowPool/index.vue

@@ -72,8 +72,8 @@ const intData = async () => {
     dataSource.value = (data.records || []).map((item, index) => {
         const trafficPoolStatus = trafficList.value.find(val => val.value == item.status)?.label
         const sourceName = sourceList.value.find(val => val.value == item.source)?.label
-        const Activated = 0 + '/' + item.iccids?.length
-        const HaveBeenUsed = 0 + '/' + item.size + item.sizeType
+        const Activated = item.cardAct + '/' + item.iccids?.length
+        const HaveBeenUsed =  item.size + item.sizeType
         return {
             ...item,
             sourceName,// 运营商名称

+ 1 - 1
src/views/flowPool/index.vue

@@ -120,7 +120,7 @@ const intData = async (item) => {
   const { data } = await lotCatdList(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 Activated = item.cardAct + '/' + item.iccids?.length
     const HaveBeenUsed = item.size + item.sizeType
     return {
       ...item,

+ 1 - 1
src/views/flowPool/rearFlowPool/index.vue

@@ -111,7 +111,7 @@ const intData = async (item) => {
     const sourceName = sourceList.value.find(
       (val) => val.value == item.source
     )?.label;
-    const Activated = 0 + "/" + item.iccids?.length;
+    const Activated = item.cardAct + "/" + item.iccids?.length;
     const HaveBeenUsed = item.size + item.sizeType;
     return {
       ...item,

+ 3 - 3
src/views/lotCard/cardList/config.js

@@ -203,7 +203,7 @@ export const SearchForm = [
 export const columnsCard = [
   {
     title: window.$t('lotCard.PackageName'),
-    dataIndex: 'productName',
+    dataIndex: 'tariffName',
     align: 'center', ellipsis: true
   }, {
     title: window.$t('lotCard.PackageStatus'),
@@ -212,7 +212,7 @@ export const columnsCard = [
   },
   {
     title: window.$t('lotCard.validity') + (window.$t('lotCard.month')),
-    dataIndex: 'validMonth',
+    dataIndex: 'validDays',
     align: 'center', ellipsis: true
   },
   {
@@ -241,7 +241,7 @@ export const columnsCard = [
     align: 'center', ellipsis: true
   },
   {
-    title: window.$t('lotCard.ExpirationDate'),
+    title: window.$t('lotCard.DueDate'),
     dataIndex: 'expiryTime',
     align: 'center', ellipsis: true
   },

+ 15 - 11
src/views/lotCard/cardList/trafficUseDialog.vue

@@ -152,14 +152,14 @@
   </a-modal>
 </template>
 <script setup>
-import { onMounted, ref ,h} from "vue";
-import { getDataCDR, PauseSIMService, RecoverSIMService, OperationRecord } from '@/api/path/lotCard.api'
+import { onMounted, ref, h } from "vue";
+import { getDataCDR, PauseSIMService, RecoverSIMService, OperationRecord, OffSIMCard } from '@/api/path/lotCard.api'
 import { Getdictionary } from '@/mixins/index'
-import { Message ,Modal} from '@arco-design/web-vue'
+import { Message, Modal } from '@arco-design/web-vue'
 // 图表插件
 import * as echarts from "echarts";
 import { useI18n } from 'vue-i18n'
-import {columnsCard,columnsTopup,columnsAmount,columnsOperation} from './config'
+import { columnsCard, columnsTopup, columnsAmount, columnsOperation } from './config'
 const { t } = useI18n();
 const props = defineProps({});
 
@@ -213,13 +213,14 @@ const open = (data) => {
   dataPackage.value = data.dataPackage[0]
   // 卡套餐信息
   dataCard.value = (data.dataPackage || []).map(val => {
-    const status = val.status == 1 ? t('lotCard.Activated') : (val.status == 2 ? t('lotCard.Off') :
-      val.status == 3 ? t('lotCard.expired') : t('lotCard.NotInUse'))
     const tatal = val.dataTotal == -1 ? t('lotCard.UnlimitedFlow') : val.dataTotal
     return {
       ...val,
-      status: status,
-      dataTotal: tatal
+      dataTotal: tatal,
+      tariffName: data.tariffName,
+      dataUsage: val.dataUsage + '/MB',
+      dataTotal: val.dataTotal + '/MB',
+      dataToday: val.dataToday + '/MB',
     }
   })
   optionsRecordSetting()
@@ -297,9 +298,12 @@ const SIMCardService = async (index) => {
   } else {
     Modal.info({
       title: '关闭卡',
-      cancelText:'关闭',
-      content: ()=>{
-        return h('div',{style:'color:red;text-align: center;font-size:18px'},'当前操作不可逆,请确定是否关闭当前卡!!')
+      cancelText: '关闭',
+      content: () => {
+        return h('div', { style: 'color:red;text-align: center;font-size:18px' }, '当前操作不可逆,请确定是否关闭当前卡!!')
+      },
+      onOk: async () => {
+        // let res = await OffSIMCard()
       }
     });
   }

+ 60 - 56
vite.config.js

@@ -1,73 +1,77 @@
-import { defineConfig } from "vite";
+import { defineConfig ,loadEnv} 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",
+export default defineConfig(({command, mode})=>{
+    const config = loadEnv(mode,'./')
+    return {
+        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";',
                 },
-                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]",
+        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: import.meta.env.VITE_API_URL,
-                // target: "http://sim.ainets.net",
-                changeOrigin: true,
-                ws: true,
-                secure: true,
+        server: {
+            port: 8088,
+            host: "0.0.0.0",
+            open: true,
+            cors: true,
+            hmr: true,
+            proxy: {
+                "/api": {
+                    // target: "http://sim.nanodreamtech.com",
+                    target: config.VITE_API_URL,
+                    // target: "http://sim.ainets.net",
+                    changeOrigin: true,
+                    ws: true,
+                    secure: true,
+                },
             },
         },
-    },
+    }
 });