Browse Source

Merge branch 'main' into alpha

pull/288/head
yedf2 4 years ago
parent
commit
42bfbcfd91
  1. 1
      dashboard/.env.development
  2. 15
      dashboard/src/api/api_dtm.ts
  3. 8
      dashboard/src/icons/svg/logo.svg
  4. 13
      dashboard/src/layout/components/header.vue
  5. 1
      dashboard/src/store/modules/layout.ts
  6. 1
      dashboard/src/type/index.d.ts
  7. 2
      dashboard/src/views/Dashboard/GlobalTransactions/AllTransactions.vue

1
dashboard/.env.development

@ -1,2 +1,3 @@
VITE_APP_API_BASE_URL="/api"
VITE_PROXY=[["/api", "http://localhost:36789"]]
VITE_DASHBOARD_VERSION="v0.0.0-dev"

15
dashboard/src/api/api_dtm.ts

@ -0,0 +1,15 @@
import { AxiosResponse } from 'axios'
import request from '/@/utils/request'
export interface IListAllTransactionsReq {
limit: number
position?: number
}
export function listAllTransactions<T>(payload:IListAllTransactionsReq):Promise<AxiosResponse<T>> {
return request({
url: '/dtmsvr/all',
method: 'get',
params: payload
})
}

8
dashboard/src/icons/svg/logo.svg

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="200px" height="200px" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>画板</title>
<g id="画板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<circle id="椭圆形" fill="#FF6400" cx="100" cy="100" r="100"></circle>
<path d="M108.718018,155.765918 C125.450635,155.765918 137.824756,148.87749 145.840381,135.100635 C151.751904,124.880713 154.707666,112.406396 154.707666,97.6776855 C154.707666,91.8663574 154.006299,85.7544434 152.603564,79.3419434 C151.20083,72.9294434 148.570703,66.9678223 144.713184,61.4570801 C139.903809,54.6437988 133.616553,49.959668 125.851416,47.4046875 C121.292529,45.9017578 115.581396,45.1001953 108.718018,45 L108.718018,45 L61,45 L61,155.765918 L108.718018,155.765918 Z M104.8104,136.528418 L83.4687988,136.528418 L83.4687988,64.2375 L104.8104,64.2375 C115.330908,64.2375 122.357104,67.2558838 125.888989,73.2926514 C129.420874,79.3294189 131.186816,87.9837891 131.186816,99.2557617 C131.186816,107.42168 130.009521,114.4604 127.654932,120.371924 C123.346533,131.14292 115.731689,136.528418 104.8104,136.528418 L104.8104,136.528418 Z" id="D" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

13
dashboard/src/layout/components/header.vue

@ -1,7 +1,10 @@
<template>
<div>
<a-layout-header class="header">
<svg-icon class="logo" style="width: 36px; height: 36px;" icon-class="svg-dtm" />
<a-layout-header class="header flex">
<div class="flex items-center logo h-16">
<svg-icon style="width: 36px; height: 36px; margin-right: 84px;" icon-class="svg-logo" />
<span class="text-gray-400 text-lg">DTM dashbaord {{ version }}</span>
</div>
<a-menu
v-model:selectedKeys="activeMenu"
theme="dark"
@ -21,8 +24,9 @@ import { useLayoutStore } from '/@/store/modules/layout'
const route = useRoute()
const router = useRouter()
const { getMenubar } = useLayoutStore()
const { getMenubar, getCurrentVersion } = useLayoutStore()
const firstRedirectPath = '/dashboard'
const version = import.meta.env.VITE_DASHBOARD_VERSION
const activeMenu = ref([route.meta.activeMenu !== firstRedirectPath ? route.meta.activeMenu : '/'])
@ -33,7 +37,6 @@ const onOpenChange = (d:any) => {
<style scoped>
.logo {
float: left;
margin: 16px 84px 16px 0;
margin-right: 20px;
}
</style>

1
dashboard/src/store/modules/layout.ts

@ -1,7 +1,6 @@
import { defineStore } from 'pinia';
import { allowRouter } from '/@/router';
import { ILayout, IMenubar, IMenubarList, IStatus } from '/@/type/store/layout';
import { findCurrentMenubar } from '/@/utils/util';
export const useLayoutStore = defineStore({
id: 'layout',

1
dashboard/src/type/index.d.ts

@ -7,6 +7,7 @@ declare global {
VITE_APP_TITLE: string
VITE_PORT: number
VITE_PROXY: string
VITE_DASHBOARD_VERSION: string
}
interface ITable<T = any> {
data: Array<T>

2
dashboard/src/views/Dashboard/GlobalTransactions/AllTransactions.vue

@ -22,7 +22,7 @@
</div>
</template>
<script setup lang="ts">
import { IListAllTransactions, listAllTransactions } from '/@/api/dtm'
import { IListAllTransactions, listAllTransactions } from '/@/api/api_dtm'
import { ref, onMounted, reactive, computed } from 'vue-demi'
import { usePagination } from 'vue-request'
import { TableProps } from 'ant-design-vue/es/vc-table/Table'

Loading…
Cancel
Save