huangbin 4 лет назад
Родитель
Сommit
4cf5fa2dfc

+ 6 - 5
src/views/information/account_info/list/account_info_trade/index.vue

@@ -35,12 +35,12 @@
             </a-col>
           </a-row>
         </template>
-        <!-- <a-row class="contRow"
+        <a-row class="contRow"
                v-for="(item, i) in traderList"
                :key="i + '11'">
-          <a-col :span="12">{{item.accountname}}-{{item.logincode}}</a-col>
-          <a-col :span="12">{{getLoginStatus(item.loginstatus)}}</a-col>
-        </a-row> -->
+          <a-col :span="12">{{item.rolename}}</a-col>
+          <a-col :span="12">{{getAccountStatus(item.accountstatus)}}</a-col>
+        </a-row>
       </a-collapse-panel>
     </a-collapse>
   </div>
@@ -50,7 +50,7 @@
 import { defineComponent, initData, getBtnList, contextMenu, BtnList } from '@/common/export/table';
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
 import { ref } from 'vue';
-import { handleAccountManager, getLoginStatus } from '../setup';
+import { handleAccountManager, getAccountStatus } from '../setup';
 
 export default defineComponent({
     name: 'account_info_trade',
@@ -78,6 +78,7 @@ export default defineComponent({
             loading,
             search,
             traderList,
+            getAccountStatus,
         };
     },
 });

+ 13 - 1
src/views/information/account_info/list/setup.ts

@@ -102,10 +102,22 @@ export function getFilterTableCB(e: Column, item: ColumnType, filtered: any) {
 /**
  *获取仓登录状态
  */
-export function getLoginStatus(type: number) {
+export function getLoginStatus(type: number): string {
     const temp = getItemEnum('loginstatus').find(e => e.enumitemname === type)
     return temp ? temp.enumdicname : '--'
 }
+
+/**
+ * 获取账户状态
+ * @param type 
+ * @returns 
+ */
+export function getAccountStatus(type: number) {
+    console.log('getItemEnum', getItemEnum('accountstatus'));
+
+    const temp = getItemEnum('accountstatus').find(e => e.enumitemname === type)
+    return temp ? temp.enumdicname : '--'
+}
 // export function getLoginStatus(type: number) {
 //     let result = '--'
 //     switch(type) {