فهرست منبع

增加操作记录

wxy 3 ماه پیش
والد
کامیت
39288aa73f

+ 2 - 32
src/views/OperationRecord/FlowpoolRecord/index.vue

@@ -5,7 +5,7 @@
     </div>
 
     <div class="table">
-      <a-table :columns="columns" :data="data" :pagination="pageData" @page-change="evChangePage" />
+      <a-table :columns="columnsFlow" :data="data" :pagination="pageData" @page-change="evChangePage" />
     </div>
   </div>
 </template>
@@ -13,37 +13,7 @@
 <script setup>
 import { ref, onMounted, toRefs } from 'vue';
 import Search from '@/components/Search/index.vue'
-const columns = [
-  {
-    title: 'Name',
-    dataIndex: 'name',
-    ellipsis: true,
-    tooltip: true,
-    align: 'center'
-  },
-  {
-    title: 'Salary',
-    dataIndex: 'salary',
-    ellipsis: true,
-    tooltip: true,
-    align: 'center'
-  },
-  {
-    title: 'Address',
-    dataIndex: 'address',
-    ellipsis: true,
-    tooltip: true,
-    align: 'center'
-  },
-  {
-    title: 'Email',
-    dataIndex: 'email',
-    ellipsis: true,
-    tooltip: true,
-    align: 'center'
-  },
-];
-
+import {columnsFlow} from '../config'
 
 const state = ref({
   pageData: {

+ 4 - 91
src/views/OperationRecord/TariffRecord/index.vue

@@ -15,64 +15,33 @@
     </div>
     <a-table row-key="id" :data="dataSource" :columns="columns" :pagination="pagination" :scroll="{ x: 'auto' }"
       @page-change="evChangePage">
-      <template #id="{ record }">
-        <!-- 修改 -->
+      <!-- <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> -->
     </a-table>
 
 
-
-    <a-modal width="70%" :visible="planVisible" :title="$t('tariffManagement.SelectiveTrafficPacket')"
-      @ok="handleSubmitPlan" @cancel="handleCancel">
-      <!-- 搜索条件区 -->
-      <div class="search-section">
-        <a-form :model="formData" layout="inline">
-          <a-form-item field="label" :label="$t('tariffManagement.label')">
-            <a-input v-model="formData.label" :placeholder="$t('lotCard.please') + $t('tariffManagement.label')"
-              allow-clear />
-          </a-form-item>
-          <a-form-item>
-            <a-space>
-              <a-button type="primary" @click="handleSearchPlan">{{ $t('form.Search') }}</a-button>
-              <a-button @click="resetSearchPlan">{{ $t('form.Reset') }}</a-button>
-            </a-space>
-          </a-form-item>
-        </a-form>
-      </div>
-      <a-table row-key="id" :data="planList" :columns="planColumns" :scroll="{ x: 'auto' }"
-        :row-selection="rowSelectionPlan" v-model:selectedKeys="selectedKeysPlan">
-
-      </a-table>
-
-    </a-modal>
-
   </div>
 </template>
 
 <script setup>
-import { onMounted, ref, toRefs, getCurrentInstance } from "vue";
-import { useRoute } from "vue-router";
+import { onMounted, ref, toRefs } from "vue";
 import { columns, planColumns ,trafficSearchFrom} from "../config";
-import { deleteTariff, tariffList } from "@/api/path/tariffManagement.api"
+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'
-import { useI18n } from 'vue-i18n'
-import { Message } from '@arco-design/web-vue'
-const { t } = useI18n();
 const role = useSystemStore()
 const state = ref({
   searchForm: {},
@@ -84,21 +53,10 @@ const state = ref({
     pageSize: 10,
     current: 1,
   },
-  planList: [],
   visible: false,
   typeCurrent: null,
   sourceList: [],
   cycleist: [],
-  modealShow: false,
-  planVisible: false,
-  formData: {},
-  selectedKeysPlan: [],
-  rowSelectionPlan: {
-    type: 'radio',
-    showCheckedAll: true,
-    onlyCurrent: false,
-  },
-  ids: null,
   methodList: []
 })
 const {
@@ -107,16 +65,10 @@ const {
   currency,
   dataSource,
   pagination,
-  planList,
   visible,
   typeCurrent,
   sourceList,
   cycleist,
-  modealShow,
-  planVisible,
-  formData,
-  selectedKeysPlan,
-  rowSelectionPlan,
   ids,
   methodList
 } = toRefs(state.value);
@@ -138,7 +90,6 @@ const intData = async (item) => {
     const Activated = item.trafficBilling + item.trafficBillingType
     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) {
@@ -167,19 +118,6 @@ const reset = (item)=>{
   intData()
 }
 
-
-// 删除
-const handleDel = async (id) => {
-  const { code } = await deleteTariff({ id })
-  if (code == 200) {
-    Message.success({
-      content: t('setting.deleteSuccess'),
-      duration: 2000,
-    })
-    intData()
-  }
-};
-
 const evChangePage = (page) => {
   pagination.value.current = page
   intData()
@@ -192,25 +130,6 @@ const dictShowModel = (type, data) => {
   visible.value = true;
 }
 
-const resetSearchPlan = () => {
-
-}
-const handleSearchPlan = () => {
-
-}
-const handleCancel = () => {
-  planVisible.value = false
-}
-
-const handleSubmitPlan = () => {
-  if (selectedKeysPlan.value.length > 0) {
-    formState.value.simDataPlanId = String(selectedKeysPlan.value[0])
-    planVisible.value = false
-  }
-
-}
-
-
 const handleDictValue = async () => {
   sourceList.value = await Getdictionary('source')
   cycleist.value = await Getdictionary('Billingcycle')
@@ -218,12 +137,6 @@ const handleDictValue = async () => {
   methodList.value = await Getdictionary('billingMethod')
 }
 
-const meal = (data) => {
-  ids.value = data.id
-  modealShow.value = true
-}
-
-
 onMounted(async () => {
   await handleDictValue()
   await intData()

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

@@ -102,14 +102,14 @@ export let columns = [
     width: 200,
     ellipsis: true,
   },
-  {
-    title: window.$t("global.common.operations"),
-    dataIndex: "id",
-    slotName: "id",
-    align: "center",
-    width: 180,
-    fixed: "right",
-  },
+  // {
+  //   title: window.$t("global.common.operations"),
+  //   dataIndex: "id",
+  //   slotName: "id",
+  //   align: "center",
+  //   width: 180,
+  //   fixed: "right",
+  // },
 ];
 // 资费套餐
 export const planColumns = [
@@ -272,3 +272,33 @@ export const UserColumns = [
     ellipsis: true,
   },
 ];
+
+
+// 流量池
+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",
+  }
+]
+