@@ -3,15 +3,16 @@
<a-drawer :placement="placement"
:closable="false"
:visible="visible"
- class="tradeDialog"> <!-- 摘牌是top 挂牌是bottom 期货交易是tradeDialog -->
+ class="tradeDialog">
+ <!-- 摘牌是top 挂牌是bottom 期货交易是tradeDialog -->
<div class="collapse"
@click="cancel"></div>
<div class="collapseCont">
<!-- <div class="title">{{ title }}</div> -->
<div class="content highContent">
- <!-- <Listed></Listed> -->
- <!-- <Delisting></Delisting> -->
- <Trade></Trade>
+ <!-- <Listed></Listed> -->
+ <!-- <Delisting></Delisting> -->
+ <Trade></Trade>
</div>
</a-drawer>
@@ -49,10 +50,10 @@ export default defineComponent({
components: {
Listed,
Delisting,
- Trade
+ Trade,
},
setup(props, context) {
- const { visible, cancel, handleOk } = closeModal(props.modalName);
+ const { visible, cancel } = closeModal(props.modalName);
return {
visible,
cancel,
@@ -23,15 +23,7 @@ export function closeModal(modelName: keyof ModalName) {
visible.value = false;
show.value = false
}
- /**
- * 带有回调函数关闭弹窗
- * @param callback
- */
- function handleOk(callback: Function) {
- cancel();
- callback && callback()
- }
- return { visible, cancel, handleOk }
+ return { visible, cancel }
/**
@@ -3,4 +3,5 @@ export interface ModalName {
notice: string; // 消息
logout: string; // 退出登录
drawer: string; // 下单通用界面
+ addCustomInfo: string; // 新增客户资料
@@ -75,7 +75,10 @@ export const setServiceURL = (config: URL): void => {
serviceURL = config;
// 外网环境(175),外包同事使用
- serviceURL.goCommonSearchUrl = "http://218.17.158.45:21001/api"
- serviceURL.quoteUrl = "ws://218.17.158.45:21004"
- serviceURL.tradeUrl = "ws://218.17.158.45:21005"
+ if (process.env.NODE_ENV === 'development') {
+ serviceURL.goCommonSearchUrl = "http://218.17.158.45:21001/api"
+ serviceURL.quoteUrl = "ws://218.17.158.45:21004"
+ serviceURL.tradeUrl = "ws://218.17.158.45:21005"
+ }
+
};
@@ -1,11 +1,16 @@
<template>
<!-- 新增客户资料 -->
<a-modal class="add-custom"
+ title="新增客户资料"
v-model:visible="visible"
@cancel="cancel"
- width="890px"
- :footer="null"
- @ok="handleOk">
+ width="890px">
+ <template #footer>
+ <a-button key="submit"
+ type="primary"
+ :loading="loading"
+ @click="submit">完成</a-button>
+ </template>
新增客户资料
</a-modal>
</template>
@@ -13,23 +18,27 @@
<script lang="ts">
import { defineComponent, ref } from 'vue';
import { closeModal } from '@/setup/controlModal/index';
-import NoticeContent from './components/noticeContent.vue';
import { initData } from '@/setup/methods/index';
-import { queryNotice } from '@/goServiceAPI/commonService/index';
export default defineComponent({
name: 'add-custom',
- components: {
- NoticeContent,
- },
+ components: {},
setup() {
- const { visible, cancel, handleOk } = closeModal('notice');
-
+ const { visible, cancel } = closeModal('addCustomInfo');
+ const loading = ref<boolean>(false);
+ function submit() {
+ loading.value = true;
+ setTimeout(() => {
+ loading.value = false;
+ cancel();
+ }, 2000);
initData(() => {});
- handleOk,
+ submit,
+ loading,
});
@@ -21,11 +21,15 @@
<a-button @click="search">查询</a-button>
<a-button @click="reset">重置</a-button>
<a-button @click="add">新增</a-button>
+ <!-- 新增弹窗 -->
+ <AddCustom />
-import { defineComponent, ref, SetupContext, unref } from 'vue';
+import { defineComponent, ref, SetupContext } from 'vue';
+import AddCustom from '../addCustom/index.vue';
+import { openModal } from '@/setup/controlModal/index';
// 搜索
function handleSearch(context: SetupContext) {
@@ -60,9 +64,13 @@ function handleSearch(context: SetupContext) {
name: 'filter-custom-table',
- components: {},
+ components: {
+ AddCustom,
+ },
+ const { openAction } = openModal('addCustomInfo');
function add() {
+ openAction();
context.emit('add');
@@ -99,6 +99,8 @@ function getCustomList() {
return { customList, actionQuery, columns, filteredInfo, getColumns, search, loading };
+// 处理新增资料
console.log('add');
@@ -115,7 +117,7 @@ export default defineComponent({
getColumns();
// 加载数据在这里
- return { customList, add, columns, search, loading };
+ return { customList, columns, search, loading, add };
</script>
@@ -3,8 +3,7 @@
width="890px"
+ :footer="null">
<div>logout</div>
@@ -25,13 +24,12 @@ export default defineComponent({
name: 'logout',
- const { visible, cancel, handleOk } = closeModal('logout');
+ const { visible, cancel } = closeModal('logout');
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1">
<template #tab>
@@ -44,7 +43,7 @@ export default defineComponent({
NoticeContent,
+ const { visible, cancel } = closeModal('notice');
// 公告消息
const noticeList = ref<QueryNoticeRsp[]>([]);
@@ -57,7 +56,6 @@ export default defineComponent({
noticeList,
activeKey: ref('1'),