huangbin преди 4 години
родител
ревизия
f74f6fe92e

+ 5 - 0
public/config/readMe.txt

@@ -8,6 +8,11 @@ http://192.168.31.114:8080/cfg?key=test_114
 http://192.168.30.211:8080/cfg?key=test_211
 
 透传  "apiUrl": "http://192.168.31.175:8080/cfg?key=test_175"
+
+"apiUrl": "http://218.17.158.45:21001/cfg?key=test_175"
+
+"apiUrl": "http://192.168.30.211:8080/cfg?key=test_211"
+
 账号 110000000001
     199990000012
     199990000013

+ 87 - 75
src/common/components/thirdMenu/index.vue

@@ -1,95 +1,107 @@
 <template>
-    <div class="thirdMenu">
-        <a-tabs default-active-key="1" @change="callback">
-            <a-tab-pane key="1" tab="一口价挂牌"> </a-tab-pane>
-            <a-tab-pane key="2" tab="浮动价挂牌"> </a-tab-pane>
-        </a-tabs>
-    </div>
+  <div class="thirdMenu">
+    <a-tabs :default-active-key="current"
+            @change="menuClick">
+      <a-tab-pane :key="String(index)"
+                  v-for="(item, index) in list"
+                  :tab="item[value]"> </a-tab-pane>
+    </a-tabs>
+  </div>
 </template>
 
 <script lang="ts">
-    import { defineComponent, ref, PropType } from 'vue';
+import { defineComponent, ref, PropType, watchEffect } from 'vue';
 
-    interface Key {
-        [propName: string]: string;
-    }
+interface Key {
+    [propName: string]: string;
+}
 
-    export default defineComponent({
-        name: 'third-menu',
-        props: {
-            list: {
-                default: [],
-                type: Object as PropType<Key[]>,
-            },
-            value: {
-                // 需要绑定的值得 key
-                default: '',
-                type: String,
-            },
+export default defineComponent({
+    name: 'third-menu',
+    props: {
+        list: {
+            default: [],
+            type: Object as PropType<Key[]>,
         },
-        components: {},
-        setup(props, context) {
-            function callback(key: any) {
-                console.log(key);
-            }
-            return {
-                callback,
-            };
+        value: {
+            // 需要绑定的值得 key
+            default: 'lable',
+            type: String,
+        },
+        selectedKey: {
+            default: '0',
+            type: Array as PropType<string[]>,
         },
-    });
+    },
+    components: {},
+    setup(props, context) {
+        const current = ref<string[]>(['0']);
+        watchEffect(() => {
+            current.value = props.selectedKey;
+        });
+        function menuClick(value: string) {
+            context.emit('selectMenu', +value);
+        }
+        return {
+            current,
+            menuClick,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .noBorderBottom {
-        border-bottom: none;
-    }
-    .thirdMenu {
-        width: 100%;
-        height: 28px;
-        padding-bottom: 2px;
-        background-color: @m-black5;
-        z-index: 2;
-        .ant-tabs {
-            line-height: 26px;
-            .flex;
-            .ant-tabs-bar {
+.noBorderBottom {
+    border-bottom: none;
+}
+.thirdMenu {
+    width: 100%;
+    height: 28px;
+    padding-bottom: 2px;
+    background-color: @m-black5;
+    z-index: 2;
+    .ant-tabs {
+        line-height: 26px;
+        .flex;
+        .ant-tabs-bar {
+            margin-bottom: 0;
+            border-bottom: 0;
+            .ant-tabs-nav-container {
                 margin-bottom: 0;
-                border-bottom: 0;
-                .ant-tabs-nav-container {
+                line-height: 100%;
+                .ant-tabs-nav-wrap {
                     margin-bottom: 0;
-                    line-height: 100%;
-                    .ant-tabs-nav-wrap {
-                        margin-bottom: 0;
-                        .ant-tabs-nav-scroll {
-                            .ant-tabs-nav {
-                                .ant-tabs-tab {
-                                    width: 121px;
-                                    height: 26px;
-                                    line-height: 26px;
-                                    text-align: center;
-                                    color: @m-grey1;
-                                    padding: 0;
-                                    margin: 0;
-                                    background: url(../../../assets/images/tabbg.png) center center no-repeat;
-                                    background-size: cover;
-                                }
-                                .ant-tabs-tab-active.ant-tabs-tab {
-                                    color: @m-white0;
-                                    background: url(../../../assets/images/tabbgActive.png) center center no-repeat;
-                                    background-size: cover;
-                                    z-index: 2;
-                                }
-                                .ant-tabs-tab + .ant-tabs-tab {
-                                    margin-left: -14px;
-                                }
-                                .ant-tabs-ink-bar {
-                                    width: 0px !important;
-                                }
+                    .ant-tabs-nav-scroll {
+                        .ant-tabs-nav {
+                            .ant-tabs-tab {
+                                width: 121px;
+                                height: 26px;
+                                line-height: 26px;
+                                text-align: center;
+                                color: @m-grey1;
+                                padding: 0;
+                                margin: 0;
+                                background: url(../../../assets/images/tabbg.png) center center no-repeat;
+                                background-size: cover;
+                            }
+                            .ant-tabs-tab-active.ant-tabs-tab {
+                                color: @m-white0;
+                                background: url(../../../assets/images/tabbgActive.png) center center no-repeat;
+                                background-size: cover;
+                                z-index: 2;
+                            }
+                            .ant-tabs-tab + .ant-tabs-tab {
+                                margin-left: -14px;
+                            }
+                            .ant-tabs-ink-bar {
+                                width: 0px !important;
                             }
                         }
                     }
                 }
             }
         }
-    }</style
+    }
+}
+</style
 >;

+ 2 - 1
src/layout/components/main.vue

@@ -42,7 +42,8 @@ export default defineComponent({
 </script>
 
 <style lang="less">
-.sexposure {
+.exposure {
+    height: 100%;
 }
 .noBorderBottom {
     border-bottom: none;

+ 2 - 2
src/services/socket/quota/adapter/index.ts

@@ -3,7 +3,7 @@ import { getLongTypeLoginID, isLogin } from '@/services/bus/login';
 import { getToken } from '@/services/bus/token';
 import { funCode } from '@/services/funcode/index';
 import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
-import { mergeObjSameProperty } from '@/utils/objHandle';
+import { mergeObj } from '@/utils/objHandle';
 import { Package40 } from '@/utils/websocket/package';
 import Long from 'long';
 import { subscribeInfoType } from '../interface';
@@ -122,7 +122,7 @@ export function parseReceivePush(quotationData: any) {
         if (itemQuote) {
             // 注意:此处已 go 服务查询出来的盘面数据为基准,查询盘面 先修改成go 服务,第一次进入项目时候回查询一次所有盘面
             // 之前是 通过 websocket 查询的,故 可能存在字段发生变化问题,如遇到,则进行优化处理
-            mergeObjSameProperty(itemQuote, goodsQuoteTik);
+            mergeObj(itemQuote, goodsQuoteTik);
         } else {
             // 此处 待优化(存在字段变化问题)
             quoteDayInfo.push(itemQuote);

+ 1 - 1
src/utils/objHandle/index.ts

@@ -9,7 +9,7 @@ interface ObjType {
  * @param a 合并之后的对象
  * @param b 把相同的属性的value 值赋值给a对象
  */
-export function mergeObjSameProperty(a: ObjType, ...rest: ObjType[]): void {
+export function mergeObj(a: ObjType, ...rest: ObjType[]): void {
     Object.keys(a).forEach((key) => {
         rest.forEach((param) => {
             if (Reflect.has(param, key)) {

+ 81 - 6
src/views/business/exposure/list/realTime/index.vue

@@ -24,21 +24,36 @@
         </template> -->
       </a-table>
     </contextMenu>
+    <a-drawer placement="bottom"
+              :closable="false"
+              :visible="visible"
+              :get-container="false"
+              :wrap-style="{ position: 'absolute' }"
+              @close="closeDrawer">
+      <div>
+        <p>Some contents...</p>
+        <ThridMenu :list="tabList"
+                   @selectMenu="selectMenu" />
+      </div>
+    </a-drawer>
   </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, ref } from 'vue';
+import { defineComponent, Ref, ref } from 'vue';
 import { initData } from '@/common/methods';
 import filterCustomTable from '../../components/filterTable/index.vue';
 import { getBtnList } from '@/common/setup/contextMenu/index';
 import contextMenu from '@/common/components/contextMenu/index.vue';
 import { getColumsAndSearch } from '../setup';
-import { QueryActualExposure } from '@/services/go/ermcp/exposure/index';
-import { ErmcpRealExposureModel } from '@/services/go/ermcp/exposure/interface';
+import { QueryActualExposure, QueryActualExposureDetail, QueryAutualExposurePosition } from '@/services/go/ermcp/exposure/index';
+import { ErmcpRealExposureModel, Ermcp3ExposureDetail, ErmcpExposurePostion } from '@/services/go/ermcp/exposure/interface';
 import { message } from 'ant-design-vue';
 import { handleTableEvent } from '@/common/setup/event/index';
 import BtnList from '@/common/components/buttonList/index.vue';
+import ThridMenu from '@/common/components/thirdMenu/index.vue';
+import { ColumnType } from '@/common/methods/table';
+import { TableKey } from '@/common/methods/table/interface';
 
 // 获取表格数据
 function getExposure() {
@@ -61,15 +76,75 @@ function getExposure() {
 
     return { loading, tableList, queryList };
 }
+// 明细
+function handleDrawer(loading: Ref<boolean>, selectedRow: ErmcpRealExposureModel) {
+    const visible = ref<boolean>(true);
+    const tabList = [{ lable: '现货明细' }, { lable: '期货明细' }];
+    const detailTableList = ref<Ermcp3ExposureDetail[] | ErmcpExposurePostion[]>([]);
+    const detailColumns = ref<ColumnType[]>([]);
+    function closeDrawer() {
+        visible.value = false;
+    }
+    function selectMenu(index: number) {
+        let tableKey: keyof TableKey = 'table_pcweb_exposure_detail';
+        if (index) {
+            AutualExposurePosition();
+        } else {
+            ActualExposureDetail();
+            tableKey = 'table_pcweb_exposure_futures_detail';
+        }
+        const { columns, getColumns } = getColumsAndSearch(tableKey, false);
+        getColumns();
+        detailColumns.value = columns.value;
+    }
+
+    // 现货明细信息
+    function ActualExposureDetail() {
+        loading.value = true;
+        const param = { middlegoodsid: selectedRow.MiddleGoodsID };
+        QueryActualExposureDetail(param)
+            .then((res) => {
+                detailTableList.value = res.map((e, i) => {
+                    return { ...e, key: String(i) };
+                });
+                loading.value = false;
+                console.log('查询列表', detailTableList);
+            })
+            .catch((err) => {
+                message.error(err);
+                loading.value = false;
+            });
+    }
+    // 期货头寸明细
+    function AutualExposurePosition() {
+        loading.value = true;
+        const param = { middleGoodsId: selectedRow.MiddleGoodsID };
+        QueryAutualExposurePosition(param)
+            .then((res) => {
+                detailTableList.value = res.map((e, i) => {
+                    return { ...e, key: String(i) };
+                });
+                loading.value = false;
+                console.log('查询列表', detailTableList);
+            })
+            .catch((err) => {
+                message.error(err);
+                loading.value = false;
+            });
+    }
+    return { visible, closeDrawer, tabList, selectMenu };
+}
 
 export default defineComponent({
     name: 'purchase-real-time',
     components: {
         contextMenu,
         filterCustomTable,
+        ThridMenu,
     },
     setup() {
         const { columns, search, getColumns } = getColumsAndSearch('table_pcweb_exposure', true);
+        const { expandedRowKeys, selectedRow, Rowclick } = handleTableEvent<ErmcpRealExposureModel>();
         const { loading, tableList, queryList } = getExposure();
         const { commonBtn, forDataBtn } = getBtnList('exposure_realtime', false);
 
@@ -77,13 +152,13 @@ export default defineComponent({
             queryList();
             getColumns();
         });
-        return { commonBtn, forDataBtn, loading, tableList, columns, search, ...handleTableEvent() };
+        return { commonBtn, forDataBtn, loading, tableList, columns, search, expandedRowKeys, selectedRow, Rowclick, ...handleDrawer(loading, (selectedRow as unknown) as ErmcpRealExposureModel) };
     },
 });
 </script>
 
 <style lang="less">
 .purchase-real-time {
+    position: relative;
 }
-</style
->;
+</style>;

+ 15 - 2
src/views/information/custom/compoments/detail/index.vue

@@ -11,6 +11,7 @@
                 :loading="loading"
                 @click="submit">关闭</a-button>
     </template>
+    <div>{{detail.nickname}}</div>
     <a-form class="inlineForm"
             :form="form"
             @submit="handleSearch">
@@ -107,14 +108,25 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, ref } from 'vue';
+import { defineComponent, PropType, reactive, ref, watchEffect } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
+import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
+import { mergeObj } from '@/utils/objHandle';
 
 export default defineComponent({
     name: 'custom-detail',
     components: {},
-    setup() {
+    props: {
+        selectedRow: {
+            type: Object as PropType<QueryCustomInfoType>,
+            default: {},
+        },
+    },
+    setup(props) {
         const { visible, cancel } = closeModal('detail');
+        const detail = reactive({
+            nickname: props.selectedRow.nickname || '--',
+        });
         const loading = ref<boolean>(false);
         function submit() {
             loading.value = true;
@@ -128,6 +140,7 @@ export default defineComponent({
             cancel,
             submit,
             loading,
+            detail,
         };
     },
 });

+ 1 - 1
src/views/information/custom/list/normal-use/index.vue

@@ -25,7 +25,7 @@
     <!-- 新增 -->
     <AddCustom />
     <!-- 详情 -->
-    <CustomDetail />
+    <CustomDetail :selectedRow="selectedRow" />
     <!-- 修改 -->
     <ModifyCustom :selectedRow="selectedRow" />
     <!-- 停用 -->

+ 107 - 104
src/views/setting/notice/components/noticeContent.vue

@@ -1,121 +1,124 @@
 <template>
-    <div class="notice-content">
-        <aside>
-            <a-list item-layout="horizontal" :data-source="noticeList">
-                <template #renderItem="{ item }">
-                    <a-list-item @click="choose(item)">
-                        <a-list-item-meta :description="item.createtime">
-                            <template #title>
-                                <a :style="{ color: item.readed ? '#88A0AE' : '#E5E5E5' }" href="javascript:;">{{ item.title }}</a>
-                            </template>
-                            <template #avatar>
-                                <a-badge :color="item.readed ? '#88A0AE' : 'orange'" />
-                            </template>
-                        </a-list-item-meta>
-                    </a-list-item>
-                </template>
-            </a-list>
-        </aside>
-        <main>
-            <h4>{{ chooseItemNotice.title }}</h4>
-            <p>{{ chooseItemNotice.createtime }}</p>
-            <div>
-                {{ chooseItemNotice.content }}
-            </div>
-        </main>
-    </div>
+  <div class="notice-content">
+    <aside>
+      <a-list item-layout="horizontal"
+              :data-source="noticeList">
+        <template #renderItem="{ item }">
+          <a-list-item @click="choose(item)">
+            <a-list-item-meta :description="item.createtime">
+              <template #title>
+                <a :style="{ color: item.readed ? '#88A0AE' : '#E5E5E5' }"
+                   href="javascript:;">{{ item.title }}</a>
+              </template>
+              <template #avatar>
+                <a-badge :color="item.readed ? '#88A0AE' : 'orange'" />
+              </template>
+            </a-list-item-meta>
+          </a-list-item>
+        </template>
+      </a-list>
+    </aside>
+    <main>
+      <h4>{{ chooseItemNotice.title }}</h4>
+      <p>{{ chooseItemNotice.createtime }}</p>
+      <div>
+        {{ chooseItemNotice.content }}
+      </div>
+    </main>
+  </div>
 </template>
 
 <script lang="ts">
-    import { defineComponent, PropType, reactive, computed } from 'vue';
-    import { QueryNoticeRsp } from '@/services/go/commonService/interface';
-    import { mergeObjSameProperty } from '@/utils/objHandle';
+import { defineComponent, PropType, reactive, computed } from 'vue';
+import { QueryNoticeRsp } from '@/services/go/commonService/interface';
+import { mergeObj } from '@/utils/objHandle';
 
-    function chooseNotice() {
-        interface ItemNotice {
-            title: string;
-            content: string; //内容
-            createtime: string; //创建时间
-        }
-        const chooseItemNotice = reactive<ItemNotice>({
-            title: '',
-            content: '',
-            createtime: '',
-        });
-        function choose(item: QueryNoticeRsp) {
-            mergeObjSameProperty(chooseItemNotice, item);
-        }
-        return { chooseItemNotice, choose };
+function chooseNotice() {
+    interface ItemNotice {
+        title: string;
+        content: string; //内容
+        createtime: string; //创建时间
     }
+    const chooseItemNotice = reactive<ItemNotice>({
+        title: '',
+        content: '',
+        createtime: '',
+    });
+    function choose(item: QueryNoticeRsp) {
+        mergeObj(chooseItemNotice, item);
+    }
+    return { chooseItemNotice, choose };
+}
 
-    export default defineComponent({
-        name: 'notice',
-        props: {
-            noticeList: {
-                type: Object as PropType<QueryNoticeRsp[]>,
-                default: [],
-            },
-        },
-        setup(props) {
-            const { chooseItemNotice, choose } = chooseNotice();
-            computed(() => {
-                props.noticeList.length && mergeObjSameProperty(chooseItemNotice, props.noticeList[0]);
-            });
-            return {
-                choose,
-                chooseItemNotice,
-            };
+export default defineComponent({
+    name: 'notice',
+    props: {
+        noticeList: {
+            type: Object as PropType<QueryNoticeRsp[]>,
+            default: [],
         },
-    });
+    },
+    setup(props) {
+        const { chooseItemNotice, choose } = chooseNotice();
+        computed(() => {
+            props.noticeList.length && mergeObj(chooseItemNotice, props.noticeList[0]);
+        });
+        return {
+            choose,
+            chooseItemNotice,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .notice-content {
-        .flex;
-        aside {
-            cursor: pointer;
-            padding: 10px;
-            width: 202px;
-            height: 619px;
-            .ant-list-split {
-                .ant-list-item-meta-description {
-                    text-align: right;
-                    font-size: 13px;
-                    color: #3b444a;
-                }
-                .ant-list-item-meta-avatar {
-                    margin-right: 0;
-                }
-                .ant-list-item {
-                    padding: 5px 0;
-                    border-bottom: none;
-                    a {
-                        width: 160px;
-                        // color: #88A0AE;
-                        font-size: 15px;
-                        display: inline-block;
-                        .ellipse;
-                    }
-                }
-            }
-        }
-        main {
-            flex: 1;
-            background: #1d2327;
-            padding: 20px;
-            h4 {
-                font-size: 17px;
-                color: #e5e5e5;
-            }
-            p {
+.notice-content {
+    .flex;
+    aside {
+        cursor: pointer;
+        padding: 10px;
+        width: 202px;
+        height: 619px;
+        .ant-list-split {
+            .ant-list-item-meta-description {
+                text-align: right;
                 font-size: 13px;
                 color: #3b444a;
             }
-            div {
-                font-size: 15px;
-                color: #88a0ae;
-                text-indent: 2em;
+            .ant-list-item-meta-avatar {
+                margin-right: 0;
+            }
+            .ant-list-item {
+                padding: 5px 0;
+                border-bottom: none;
+                a {
+                    width: 160px;
+                    // color: #88A0AE;
+                    font-size: 15px;
+                    display: inline-block;
+                    .ellipse;
+                }
             }
         }
-    }</style
+    }
+    main {
+        flex: 1;
+        background: #1d2327;
+        padding: 20px;
+        h4 {
+            font-size: 17px;
+            color: #e5e5e5;
+        }
+        p {
+            font-size: 13px;
+            color: #3b444a;
+        }
+        div {
+            font-size: 15px;
+            color: #88a0ae;
+            text-indent: 2em;
+        }
+    }
+}
+</style
 >;