|
@@ -1,12 +1,25 @@
|
|
|
<template>
|
|
<template>
|
|
|
<section :class="['layout-bottom', isShowBottom ? 'layout-bottom-all' : 'layout-bottom-hidden']">
|
|
<section :class="['layout-bottom', isShowBottom ? 'layout-bottom-all' : 'layout-bottom-hidden']">
|
|
|
- <CapitalInfo class="capital-info-container"></CapitalInfo>
|
|
|
|
|
- <main>
|
|
|
|
|
|
|
+ <CapitalInfo class="capital-info-container"
|
|
|
|
|
+ v-if="isCapitalLeft"></CapitalInfo>
|
|
|
|
|
+ <main :class="[isCapitalLeft ? 'main-some' : 'main-all']">
|
|
|
<firstMenu :list="orderList"
|
|
<firstMenu :list="orderList"
|
|
|
:value="'title'"
|
|
:value="'title'"
|
|
|
@selectMenu="selectMenu">
|
|
@selectMenu="selectMenu">
|
|
|
- <div class="conditionIcon icon iconfont icon-shouqi"
|
|
|
|
|
- @click="handleShowBottom"></div>
|
|
|
|
|
|
|
+ <div class="right-menu-content">
|
|
|
|
|
+ <!-- 资金信息 -->
|
|
|
|
|
+ <a-select class="capitalSelect"
|
|
|
|
|
+ style="width: 180px"
|
|
|
|
|
+ v-if="!isCapitalLeft"
|
|
|
|
|
+ @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="conditionIcon icon iconfont icon-shouqi"
|
|
|
|
|
+ @click="handleShowBottom"></div>
|
|
|
|
|
+ </div>
|
|
|
</firstMenu>
|
|
</firstMenu>
|
|
|
<div v-show="isShowBottom">
|
|
<div v-show="isShowBottom">
|
|
|
<component :is="componentId"
|
|
<component :is="componentId"
|
|
@@ -16,7 +29,7 @@
|
|
|
</section>
|
|
</section>
|
|
|
</template>
|
|
</template>
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
-import { defineAsyncComponent, defineComponent, ref } from 'vue';
|
|
|
|
|
|
|
+import { defineAsyncComponent, defineComponent, reactive, ref } from 'vue';
|
|
|
import CapitalInfo from '@/common/components/capitalInfo/index.vue';
|
|
import CapitalInfo from '@/common/components/capitalInfo/index.vue';
|
|
|
import firstMenu from '@/common/components/firstMenu/index.vue';
|
|
import firstMenu from '@/common/components/firstMenu/index.vue';
|
|
|
import thirdMenu from '@/common/components/thirdMenu/index.vue';
|
|
import thirdMenu from '@/common/components/thirdMenu/index.vue';
|
|
@@ -25,6 +38,12 @@ import { OperationTabMenu } from '@/services/go/commonService/interface';
|
|
|
import { handleOrderData } from '@/common/setup/order/orderData';
|
|
import { handleOrderData } from '@/common/setup/order/orderData';
|
|
|
import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
|
|
import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
|
|
|
import { handleShowBottom, getShowBottomValue } from '@/common/config/constrolBottom';
|
|
import { handleShowBottom, getShowBottomValue } from '@/common/config/constrolBottom';
|
|
|
|
|
+import { getAllTaAccount, getCanUseMoney, getFreeze, getSelectedAccount, setSelectedAccount } from '@/services/bus/account';
|
|
|
|
|
+import { AccountListItem } from '@/services/dataCenter/interafce/account';
|
|
|
|
|
+import { getTaAccount } from '@/services/go/TaAccount';
|
|
|
|
|
+import Bus from '@/utils/eventBus/index';
|
|
|
|
|
+import { isOemByEnum, OemType } from '@/common/config/projectName';
|
|
|
|
|
+import { initData } from '@/common/methods';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'layout-top',
|
|
name: 'layout-top',
|
|
@@ -42,6 +61,25 @@ export default defineComponent({
|
|
|
},
|
|
},
|
|
|
setup() {
|
|
setup() {
|
|
|
const { orderList, componentId } = handleOrderData();
|
|
const { orderList, componentId } = handleOrderData();
|
|
|
|
|
+ const selectedAccount = getSelectedAccount();
|
|
|
|
|
+ const selectedAccountId = ref<number>(selectedAccount.accountid);
|
|
|
|
|
+ function accountChange(id: number) {
|
|
|
|
|
+ const item = getAllTaAccount().find((e) => e.accountid === id) as AccountListItem;
|
|
|
|
|
+ setSelectedAccount(item);
|
|
|
|
|
+ }
|
|
|
|
|
+ // 资金变化,重新加载数据
|
|
|
|
|
+ Bus.$on('moneyChangedNtf_UI', () => {
|
|
|
|
|
+ getTaAccount().then(() => {
|
|
|
|
|
+ accountChange(selectedAccountId.value);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ // 控制资金面板是否显示在左边
|
|
|
|
|
+ const isCapitalLeft = ref<boolean>(true);
|
|
|
|
|
+ initData(() => {
|
|
|
|
|
+ if (isOemByEnum(OemType.wrspot)) {
|
|
|
|
|
+ isCapitalLeft.value = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
// 切换组件
|
|
// 切换组件
|
|
|
function selectMenu(value: OperationTabMenu) {
|
|
function selectMenu(value: OperationTabMenu) {
|
|
|
componentId.value = value.code as enumOrderComponents;
|
|
componentId.value = value.code as enumOrderComponents;
|
|
@@ -53,17 +91,34 @@ export default defineComponent({
|
|
|
isShowBottom: getShowBottomValue(),
|
|
isShowBottom: getShowBottomValue(),
|
|
|
getShowBottomValue,
|
|
getShowBottomValue,
|
|
|
handleShowBottom,
|
|
handleShowBottom,
|
|
|
|
|
+ getAllTaAccount,
|
|
|
|
|
+ selectedAccountId,
|
|
|
|
|
+ accountChange,
|
|
|
|
|
+ isCapitalLeft,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
|
|
|
+.right-menu-content {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ .capitalSelect {
|
|
|
|
|
+ margin-top: 3px;
|
|
|
|
|
+ margin-right: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
.layout-bottom-all {
|
|
.layout-bottom-all {
|
|
|
height: 330px;
|
|
height: 330px;
|
|
|
}
|
|
}
|
|
|
.layout-bottom-hidden {
|
|
.layout-bottom-hidden {
|
|
|
height: 40px;
|
|
height: 40px;
|
|
|
}
|
|
}
|
|
|
|
|
+.main-all {
|
|
|
|
|
+ max-width: 100;
|
|
|
|
|
+}
|
|
|
|
|
+.main-some {
|
|
|
|
|
+ max-width: calc(100% - 180px);
|
|
|
|
|
+}
|
|
|
.layout-bottom {
|
|
.layout-bottom {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -74,7 +129,6 @@ export default defineComponent({
|
|
|
border-right: 1px solid @m-black2;
|
|
border-right: 1px solid @m-black2;
|
|
|
}
|
|
}
|
|
|
main {
|
|
main {
|
|
|
- max-width: calc(100% - 180px);
|
|
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
.flex;
|
|
.flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|