Explorar o código

资金版本 显示当前选中的资金账号

huangbin %!s(int64=4) %!d(string=hai) anos
pai
achega
9e2de986b7
Modificáronse 1 ficheiros con 49 adicións e 37 borrados
  1. 49 37
      src/common/components/capitalInfo/index.vue

+ 49 - 37
src/common/components/capitalInfo/index.vue

@@ -1,46 +1,58 @@
 <template>
-  <div class="capital-info">
-    <!-- 资金信息 -->
-    <a-select class="capitalSelect"
-              style="width: 180px"
-              v-if="false"
-              @change="accountChange"
-              v-model:value="selectedAccountId">
-      <a-select-option v-for="item in getAllTaAccount()"
-                       :value="item.accountid"
-                       :key="item.accountid">{{item.accountid}}</a-select-option>
-    </a-select>
-    <div class="numBlocks">
-      <div class="capitalItem">
-        <div class="firstLine">
-          <div>余额</div>
-          <div>
-            <i class="iconfont icon-zhengyan"
-               @click="showAction"></i>
-          </div>
-        </div>
-        <div class="numBar">{{showValue(data.currentbalance)}}</div>
-      </div>
-      <!-- <div class="capitalItem">
+    <div class="capital-info">
+        <!-- 资金信息 -->
+        <a-select
+            class="capitalSelect"
+            style="width: 180px"
+            v-if="false"
+            @change="accountChange"
+            v-model:value="selectedAccountId"
+        >
+            <a-select-option
+                v-for="item in getAllTaAccount()"
+                :value="item.accountid"
+                :key="item.accountid"
+            >{{ item.accountid }}</a-select-option>
+        </a-select>
+        <div class="numBlocks">
+            <div class="capitalItem">
+                <div class="firstLine">
+                    <div>资金账号</div>
+                    <div>
+                        <i class="iconfont icon-zhengyan" @click="showAction"></i>
+                    </div>
+                </div>
+                <div class="numBar">{{ showValue(getSelectedAccount().accountid) }}</div>
+            </div>
+            <div class="capitalItem">
+                <div class="firstLine">
+                    <div>余额</div>
+                    <!-- <div>
+                        <i class="iconfont icon-zhengyan" @click="showAction"></i>
+                    </div>-->
+                </div>
+                <div class="numBar">{{ showValue(data.currentbalance) }}</div>
+            </div>
+            <!-- <div class="capitalItem">
         <div class="firstLine">
           <div>占用</div>
         </div>
         <div class="numBar green">128,000.00</div>
-      </div> -->
-      <div class="capitalItem">
-        <div class="firstLine">
-          <div>冻结</div>
-        </div>
-        <div class="numBar red">{{showValue(data.freeze)}}</div>
-      </div>
-      <div class="capitalItem">
-        <div class="firstLine">
-          <div>可用</div>
+            </div>-->
+            <div class="capitalItem">
+                <div class="firstLine">
+                    <div>冻结</div>
+                </div>
+                <div class="numBar red">{{ showValue(data.freeze) }}</div>
+            </div>
+            <div class="capitalItem">
+                <div class="firstLine">
+                    <div>可用</div>
+                </div>
+                <div class="numBar blue">{{ showValue(canUseMoney(getSelectedAccount())) }}</div>
+            </div>
         </div>
-        <div class="numBar blue">{{showValue(canUseMoney(getSelectedAccount()))}}</div>
-      </div>
     </div>
-  </div>
 </template>
 
 <script lang="ts">
@@ -69,7 +81,7 @@ export default defineComponent({
             return show.value ? value : '******';
         }
         const loading = ref<boolean>(false)
-        const {  canUseMoney, getHoldsList } = useHazardRates();
+        const { canUseMoney, getHoldsList } = useHazardRates();
         initData(() => {
             // 获取头寸
             getHoldsList(loading)