|
|
@@ -34,20 +34,21 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { ref, defineAsyncComponent } from 'vue'
|
|
|
+import { ref, defineAsyncComponent,onUnmounted } from 'vue'
|
|
|
import { formatDate } from '@/filters'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { queryMineTradeOrders } from '@/services/api/transfer'
|
|
|
import { getOrderStatusName } from '@/constants/order'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { useComposeTable } from '@pc/components/base/table'
|
|
|
+import eventBus from '@/services/bus'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
|
|
|
const componentMap = new Map<string, unknown>([
|
|
|
['cancel', defineAsyncComponent(() => import('./cancel/index.vue'))], // 撤单
|
|
|
])
|
|
|
|
|
|
-const { loading, run, dataList } = useRequest(queryMineTradeOrders, {})
|
|
|
+const { loading, run, dataList } = useRequest(queryMineTradeOrders)
|
|
|
|
|
|
const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
|
|
|
run()
|
|
|
@@ -71,4 +72,11 @@ const tableColumns = ref<Model.TableColumn[]>([
|
|
|
{ field: 'ordertime', label: '委托时间' },
|
|
|
{ field: 'orderid', label: '委托单号' }
|
|
|
])
|
|
|
+
|
|
|
+// 接收委托回应通知
|
|
|
+const orderRspNotify = eventBus.$on('OrderRsp', () => run())
|
|
|
+
|
|
|
+onUnmounted(() => {
|
|
|
+ orderRspNotify.cancel()
|
|
|
+})
|
|
|
</script>
|