congmao-cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/bin/index.js +20 -0
- package/package.json +42 -0
- package/src/commands/create.js +171 -0
- package/src/commands/mcp.js +157 -0
- package/src/mcp/CURSOR_SETUP.md +259 -0
- package/src/mcp/README.md +134 -0
- package/src/mcp/USAGE_EXAMPLES.md +181 -0
- package/src/mcp/get-cursor-config.js +58 -0
- package/src/mcp/package.json +23 -0
- package/src/mcp/pnpm-lock.yaml +2441 -0
- package/src/mcp/src/handlers.js +211 -0
- package/src/mcp/src/http-server.js +332 -0
- package/src/mcp/src/index.js +195 -0
- package/src/mcp/src/schemas.js +54 -0
- package/src/mcp/test-create-project.js +49 -0
- package/src/mcp/test-mcp.js +89 -0
- package/src/mcp/test-show-tree.js +66 -0
- package/src/template/Uni-app/README.md +19 -0
- package/src/template/Uni-app/babel.config.js +81 -0
- package/src/template/Uni-app/package.json +107 -0
- package/src/template/Uni-app/postcss.config.js +27 -0
- package/src/template/Uni-app/public/index.html +25 -0
- package/src/template/Uni-app/shims-uni.d.ts +11 -0
- package/src/template/Uni-app/shims-vue.d.ts +4 -0
- package/src/template/Uni-app/src/App.vue +17 -0
- package/src/template/Uni-app/src/main.js +12 -0
- package/src/template/Uni-app/src/manifest.json +75 -0
- package/src/template/Uni-app/src/pages/index/index.vue +49 -0
- package/src/template/Uni-app/src/pages.json +16 -0
- package/src/template/Uni-app/src/static/logo.png +0 -0
- package/src/template/Uni-app/src/uni.promisify.adaptor.js +13 -0
- package/src/template/Uni-app/src/uni.scss +76 -0
- package/src/template/Uni-app/yarn.lock +11466 -0
- package/src/template/Vue2/.editorconfig +14 -0
- package/src/template/Vue2/.env +2 -0
- package/src/template/Vue2/.env.development +2 -0
- package/src/template/Vue2/.env.site +2 -0
- package/src/template/Vue2/.prettierrc.js +39 -0
- package/src/template/Vue2/.stylelintignore +8 -0
- package/src/template/Vue2/README-zh_CN.md +115 -0
- package/src/template/Vue2/commitlint.config.js +1 -0
- package/src/template/Vue2/docs/docs-starter.png +0 -0
- package/src/template/Vue2/docs/docs-startup.png +0 -0
- package/src/template/Vue2/docs/docs-structure.png +0 -0
- package/src/template/Vue2/globals.d.ts +13 -0
- package/src/template/Vue2/index.html +27 -0
- package/src/template/Vue2/jsx.d.ts +13 -0
- package/src/template/Vue2/mock/index.ts +147 -0
- package/src/template/Vue2/package.json +91 -0
- package/src/template/Vue2/package.json.ejs +91 -0
- package/src/template/Vue2/public/favicon.ico +0 -0
- package/src/template/Vue2/shims-vue.d.ts +5 -0
- package/src/template/Vue2/src/App.vue +19 -0
- package/src/template/Vue2/src/assets/assets-login-bg-black.png +0 -0
- package/src/template/Vue2/src/assets/assets-login-bg-white.png +0 -0
- package/src/template/Vue2/src/assets/assets-logo-full.svg +39 -0
- package/src/template/Vue2/src/assets/assets-product-1.svg +5 -0
- package/src/template/Vue2/src/assets/assets-product-2.svg +5 -0
- package/src/template/Vue2/src/assets/assets-product-3.svg +5 -0
- package/src/template/Vue2/src/assets/assets-product-4.svg +5 -0
- package/src/template/Vue2/src/assets/assets-result-403.svg +32 -0
- package/src/template/Vue2/src/assets/assets-result-404.svg +36 -0
- package/src/template/Vue2/src/assets/assets-result-500.svg +32 -0
- package/src/template/Vue2/src/assets/assets-result-ie.svg +33 -0
- package/src/template/Vue2/src/assets/assets-result-maintenance.svg +49 -0
- package/src/template/Vue2/src/assets/assets-result-wifi.svg +23 -0
- package/src/template/Vue2/src/assets/assets-setting-auto.svg +13 -0
- package/src/template/Vue2/src/assets/assets-setting-dark.svg +5 -0
- package/src/template/Vue2/src/assets/assets-setting-light.svg +13 -0
- package/src/template/Vue2/src/assets/assets-t-logo.svg +41 -0
- package/src/template/Vue2/src/assets/assets-tencent-logo.png +0 -0
- package/src/template/Vue2/src/components/color/index.vue +35 -0
- package/src/template/Vue2/src/components/product-card/index.vue +121 -0
- package/src/template/Vue2/src/components/result/index.vue +118 -0
- package/src/template/Vue2/src/components/thumbnail/index.vue +49 -0
- package/src/template/Vue2/src/components/trend/index.vue +105 -0
- package/src/template/Vue2/src/config/color.ts +30 -0
- package/src/template/Vue2/src/config/global.ts +2 -0
- package/src/template/Vue2/src/config/host.ts +26 -0
- package/src/template/Vue2/src/config/style.ts +14 -0
- package/src/template/Vue2/src/constants/index.ts +46 -0
- package/src/template/Vue2/src/interface.ts +39 -0
- package/src/template/Vue2/src/layouts/blank.vue +12 -0
- package/src/template/Vue2/src/layouts/components/Breadcrumb.vue +39 -0
- package/src/template/Vue2/src/layouts/components/Content.vue +43 -0
- package/src/template/Vue2/src/layouts/components/Footer.vue +27 -0
- package/src/template/Vue2/src/layouts/components/Header.vue +321 -0
- package/src/template/Vue2/src/layouts/components/LayoutContent.vue +168 -0
- package/src/template/Vue2/src/layouts/components/LayoutHeader.vue +52 -0
- package/src/template/Vue2/src/layouts/components/LayoutSidebar.vue +51 -0
- package/src/template/Vue2/src/layouts/components/MenuContent.vue +108 -0
- package/src/template/Vue2/src/layouts/components/Notice.vue +221 -0
- package/src/template/Vue2/src/layouts/components/Search.vue +134 -0
- package/src/template/Vue2/src/layouts/components/SideNav.vue +150 -0
- package/src/template/Vue2/src/layouts/index.vue +100 -0
- package/src/template/Vue2/src/layouts/setting.vue +404 -0
- package/src/template/Vue2/src/main.js +9 -0
- package/src/template/Vue2/src/main.jsx +51 -0
- package/src/template/Vue2/src/pages/dashboard/base/components/MiddleChart.vue +158 -0
- package/src/template/Vue2/src/pages/dashboard/base/components/OutputOverview.vue +189 -0
- package/src/template/Vue2/src/pages/dashboard/base/components/RankList.vue +111 -0
- package/src/template/Vue2/src/pages/dashboard/base/components/TopPanel.vue +246 -0
- package/src/template/Vue2/src/pages/dashboard/base/index.ts +702 -0
- package/src/template/Vue2/src/pages/dashboard/base/index.vue +44 -0
- package/src/template/Vue2/src/pages/dashboard/detail/index.ts +267 -0
- package/src/template/Vue2/src/pages/dashboard/detail/index.vue +242 -0
- package/src/template/Vue2/src/pages/detail/advanced/components/Product.vue +167 -0
- package/src/template/Vue2/src/pages/detail/advanced/index.less +74 -0
- package/src/template/Vue2/src/pages/detail/advanced/index.vue +219 -0
- package/src/template/Vue2/src/pages/detail/base/index.less +105 -0
- package/src/template/Vue2/src/pages/detail/base/index.vue +46 -0
- package/src/template/Vue2/src/pages/detail/deploy/index.ts +204 -0
- package/src/template/Vue2/src/pages/detail/deploy/index.vue +224 -0
- package/src/template/Vue2/src/pages/detail/secondary/index.less +71 -0
- package/src/template/Vue2/src/pages/detail/secondary/index.vue +131 -0
- package/src/template/Vue2/src/pages/form/base/index.less +57 -0
- package/src/template/Vue2/src/pages/form/base/index.vue +254 -0
- package/src/template/Vue2/src/pages/form/step/index.less +37 -0
- package/src/template/Vue2/src/pages/form/step/index.vue +259 -0
- package/src/template/Vue2/src/pages/frame/doc/index.vue +86 -0
- package/src/template/Vue2/src/pages/frame/tdesign/index.vue +86 -0
- package/src/template/Vue2/src/pages/list/base/index.vue +267 -0
- package/src/template/Vue2/src/pages/list/card/index.vue +221 -0
- package/src/template/Vue2/src/pages/list/components/CommonTable.vue +313 -0
- package/src/template/Vue2/src/pages/list/filter/index.vue +15 -0
- package/src/template/Vue2/src/pages/list/tree/index.vue +174 -0
- package/src/template/Vue2/src/pages/login/components/components-header.vue +74 -0
- package/src/template/Vue2/src/pages/login/components/components-login.vue +154 -0
- package/src/template/Vue2/src/pages/login/components/components-register.vue +144 -0
- package/src/template/Vue2/src/pages/login/index.less +202 -0
- package/src/template/Vue2/src/pages/login/index.vue +53 -0
- package/src/template/Vue2/src/pages/nest-menu/Index.vue +10 -0
- package/src/template/Vue2/src/pages/result/403/index.vue +14 -0
- package/src/template/Vue2/src/pages/result/404/index.vue +14 -0
- package/src/template/Vue2/src/pages/result/500/index.vue +14 -0
- package/src/template/Vue2/src/pages/result/browser-incompatible/index.vue +77 -0
- package/src/template/Vue2/src/pages/result/fail/index.vue +57 -0
- package/src/template/Vue2/src/pages/result/maintenance/index.vue +14 -0
- package/src/template/Vue2/src/pages/result/network-error/index.vue +24 -0
- package/src/template/Vue2/src/pages/result/success/index.vue +59 -0
- package/src/template/Vue2/src/pages/user/index.less +148 -0
- package/src/template/Vue2/src/pages/user/index.ts +157 -0
- package/src/template/Vue2/src/pages/user/index.vue +204 -0
- package/src/template/Vue2/src/permission.js +56 -0
- package/src/template/Vue2/src/router/index.js +43 -0
- package/src/template/Vue2/src/router/modules/base.ts +29 -0
- package/src/template/Vue2/src/router/modules/components.ts +175 -0
- package/src/template/Vue2/src/router/modules/others.ts +55 -0
- package/src/template/Vue2/src/service/service-advance.ts +233 -0
- package/src/template/Vue2/src/service/service-base.ts +205 -0
- package/src/template/Vue2/src/service/service-detail-base.ts +84 -0
- package/src/template/Vue2/src/service/service-detail-deploy.ts +234 -0
- package/src/template/Vue2/src/service/service-detail.ts +57 -0
- package/src/template/Vue2/src/service/service-user.ts +64 -0
- package/src/template/Vue2/src/store/index.ts +22 -0
- package/src/template/Vue2/src/store/modules/notification.ts +90 -0
- package/src/template/Vue2/src/store/modules/permission.ts +66 -0
- package/src/template/Vue2/src/store/modules/setting.ts +122 -0
- package/src/template/Vue2/src/store/modules/tab-router.ts +83 -0
- package/src/template/Vue2/src/store/modules/user.ts +98 -0
- package/src/template/Vue2/src/style/font-family.less +6 -0
- package/src/template/Vue2/src/style/index.less +5 -0
- package/src/template/Vue2/src/style/layout.less +201 -0
- package/src/template/Vue2/src/style/reset.less +78 -0
- package/src/template/Vue2/src/style/variables.less +27 -0
- package/src/template/Vue2/src/utils/charts.ts +38 -0
- package/src/template/Vue2/src/utils/color.ts +118 -0
- package/src/template/Vue2/src/utils/date.ts +12 -0
- package/src/template/Vue2/src/utils/request.ts +60 -0
- package/src/template/Vue2/stylelint.config.js +5 -0
- package/src/template/Vue2/tsconfig.json +26 -0
- package/src/template/Vue2/vite.config.js +58 -0
- package/src/template/Vue3/package.json.ejs +8 -0
- package/src/template/Vue3/pages.json +10 -0
- package/src/template/Vue3/src/main.js +7 -0
- package/src/utils/copy.js +17 -0
- package/src/utils/eslint.js +205 -0
- package/src/utils/logo.js +18 -0
- package/src/utils/render.js +20 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="result-container">
|
|
3
|
+
<div class="result-bg-img">
|
|
4
|
+
<component :is="dynamicComponent"></component>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="result-title">{{ title }}</div>
|
|
7
|
+
<div class="result-tip">{{ tip }}</div>
|
|
8
|
+
<slot />
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import Vue from 'vue';
|
|
13
|
+
|
|
14
|
+
import Result403Icon from '@/assets/assets-result-403.svg';
|
|
15
|
+
import Result404Icon from '@/assets/assets-result-404.svg';
|
|
16
|
+
import Result500Icon from '@/assets/assets-result-500.svg';
|
|
17
|
+
import ResultIeIcon from '@/assets/assets-result-ie.svg';
|
|
18
|
+
import ResultWifiIcon from '@/assets/assets-result-wifi.svg';
|
|
19
|
+
import ResultMaintenanceIcon from '@/assets/assets-result-maintenance.svg';
|
|
20
|
+
|
|
21
|
+
export default Vue.extend({
|
|
22
|
+
name: 'Result',
|
|
23
|
+
props: {
|
|
24
|
+
bgUrl: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: '',
|
|
27
|
+
},
|
|
28
|
+
title: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: '',
|
|
31
|
+
},
|
|
32
|
+
tip: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: '',
|
|
35
|
+
},
|
|
36
|
+
type: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: '',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
computed: {
|
|
42
|
+
dynamicComponent() {
|
|
43
|
+
switch (this.type) {
|
|
44
|
+
case '403':
|
|
45
|
+
return Result403Icon;
|
|
46
|
+
case '404':
|
|
47
|
+
return Result404Icon;
|
|
48
|
+
case '500':
|
|
49
|
+
return Result500Icon;
|
|
50
|
+
case 'ie':
|
|
51
|
+
return ResultIeIcon;
|
|
52
|
+
case 'wifi':
|
|
53
|
+
return ResultWifiIcon;
|
|
54
|
+
case 'maintenance':
|
|
55
|
+
return ResultMaintenanceIcon;
|
|
56
|
+
default:
|
|
57
|
+
return Result403Icon;
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
</script>
|
|
63
|
+
<style lang="less" scoped>
|
|
64
|
+
@import '@/style/variables';
|
|
65
|
+
|
|
66
|
+
.result {
|
|
67
|
+
&-link {
|
|
68
|
+
color: var(--td-brand-color);
|
|
69
|
+
text-decoration: none;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
|
|
72
|
+
&:hover {
|
|
73
|
+
color: var(--td-brand-color);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:active {
|
|
77
|
+
color: var(--td-brand-color);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&--active {
|
|
81
|
+
color: var(--td-brand-color);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:focus {
|
|
85
|
+
text-decoration: none;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&-container {
|
|
90
|
+
min-height: 400px;
|
|
91
|
+
height: 75vh;
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
padding: 24px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&-bg-img {
|
|
100
|
+
width: 200px;
|
|
101
|
+
color: var(--td-brand-color);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&-title {
|
|
105
|
+
color: var(--td-text-color-primary);
|
|
106
|
+
font: var(--td-font-title-large);
|
|
107
|
+
font-weight: 500;
|
|
108
|
+
font-style: normal;
|
|
109
|
+
margin-top: 8px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&-tip {
|
|
113
|
+
margin: 8px 0 32px;
|
|
114
|
+
font: var(--td-font-body-medium);
|
|
115
|
+
color: var(--td-text-color-secondary);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
</style>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<img :class="className" :src="url" />
|
|
3
|
+
</template>
|
|
4
|
+
<script lang="ts">
|
|
5
|
+
import Vue from 'vue';
|
|
6
|
+
|
|
7
|
+
export default Vue.extend({
|
|
8
|
+
name: 'thumbnail',
|
|
9
|
+
props: {
|
|
10
|
+
url: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: '',
|
|
13
|
+
},
|
|
14
|
+
type: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: 'layout',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
computed: {
|
|
20
|
+
className() {
|
|
21
|
+
return [
|
|
22
|
+
'thumbnail-container',
|
|
23
|
+
{
|
|
24
|
+
'thumbnail-circle': this.type === 'circle',
|
|
25
|
+
'thumbnail-layout': this.type === 'layout',
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
</script>
|
|
32
|
+
<style lang="less" scoped>
|
|
33
|
+
@import url('@/style/index.less');
|
|
34
|
+
|
|
35
|
+
.thumbnail {
|
|
36
|
+
&-container {
|
|
37
|
+
display: inline-block;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&-circle {
|
|
41
|
+
border-radius: var(--td-radius-circle);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&-layout {
|
|
45
|
+
width: 88px;
|
|
46
|
+
height: 48px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span :class="containerCls">
|
|
3
|
+
<span :class="iconCls">
|
|
4
|
+
<svg
|
|
5
|
+
v-if="type === 'down'"
|
|
6
|
+
width="16"
|
|
7
|
+
height="16"
|
|
8
|
+
viewBox="0 0 16 16"
|
|
9
|
+
fill="none"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
>
|
|
12
|
+
<path d="M11.5 8L8 11.5L4.5 8" stroke="currentColor" stroke-width="1.5" />
|
|
13
|
+
<path d="M8 11L8 4" stroke="currentColor" stroke-width="1.5" />
|
|
14
|
+
</svg>
|
|
15
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" v-else>
|
|
16
|
+
<path d="M4.5 8L8 4.5L11.5 8" stroke="currentColor" stroke-width="1.5" />
|
|
17
|
+
<path d="M8 5V12" stroke="currentColor" stroke-width="1.5" />
|
|
18
|
+
</svg>
|
|
19
|
+
</span>
|
|
20
|
+
<span>{{ describe }}</span>
|
|
21
|
+
</span>
|
|
22
|
+
</template>
|
|
23
|
+
<script>
|
|
24
|
+
import Vue from 'vue';
|
|
25
|
+
|
|
26
|
+
export default Vue.extend({
|
|
27
|
+
name: 'Trend',
|
|
28
|
+
|
|
29
|
+
props: {
|
|
30
|
+
type: String,
|
|
31
|
+
describe: [String, Number],
|
|
32
|
+
isReverseColor: Boolean,
|
|
33
|
+
},
|
|
34
|
+
computed: {
|
|
35
|
+
containerCls() {
|
|
36
|
+
return [
|
|
37
|
+
'trend-container',
|
|
38
|
+
{
|
|
39
|
+
'trend-container__reverse': this.isReverseColor,
|
|
40
|
+
'trend-container__up': !this.isReverseColor && this.type === 'up',
|
|
41
|
+
'trend-container__down': !this.isReverseColor && this.type === 'down',
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
},
|
|
45
|
+
iconCls() {
|
|
46
|
+
return ['trend-icon-container'];
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<style lang="less" scoped>
|
|
53
|
+
@import '@/style/variables.less';
|
|
54
|
+
|
|
55
|
+
.trend {
|
|
56
|
+
|
|
57
|
+
&-container {
|
|
58
|
+
|
|
59
|
+
&__up {
|
|
60
|
+
color: var(--td-error-color);
|
|
61
|
+
display: inline-flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
|
|
65
|
+
.trend-icon-container {
|
|
66
|
+
background: var(--td-error-color-2);
|
|
67
|
+
margin-right: 8px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&__down {
|
|
72
|
+
color: var(--td-success-color);
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
|
|
77
|
+
.trend-icon-container {
|
|
78
|
+
background: var(--td-success-color-2);
|
|
79
|
+
margin-right: 8px;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&__reverse {
|
|
84
|
+
color: #ffffff;
|
|
85
|
+
display: inline-flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
|
|
89
|
+
.trend-icon-container {
|
|
90
|
+
background: var(--td-brand-color-5);
|
|
91
|
+
margin-right: 8px;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.trend-icon-container {
|
|
96
|
+
border-radius: 50%;
|
|
97
|
+
display: inline-flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
width: 16px;
|
|
101
|
+
height: 16px;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type TColorToken = Record<string, string>;
|
|
2
|
+
export type TColorSeries = Record<string, TColorToken>;
|
|
3
|
+
|
|
4
|
+
// TODO: 中性色暂时固定 待tvision-color生成带色彩倾向的中性色
|
|
5
|
+
export const LIGHT_CHART_COLORS = {
|
|
6
|
+
textColor: 'rgba(0, 0, 0, 0.9)',
|
|
7
|
+
placeholderColor: 'rgba(0, 0, 0, 0.35)',
|
|
8
|
+
borderColor: '#dcdcdc',
|
|
9
|
+
containerColor: '#fff',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const DARK_CHART_COLORS = {
|
|
13
|
+
textColor: 'rgba(255, 255, 255, 0.9)',
|
|
14
|
+
placeholderColor: 'rgba(255, 255, 255, 0.35)',
|
|
15
|
+
borderColor: '#5e5e5e',
|
|
16
|
+
containerColor: '#242424',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type TChartColor = typeof LIGHT_CHART_COLORS;
|
|
20
|
+
|
|
21
|
+
export const DEFAULT_COLOR_OPTIONS = [
|
|
22
|
+
'#0052D9',
|
|
23
|
+
'#0594FA',
|
|
24
|
+
'#00A870',
|
|
25
|
+
'#EBB105',
|
|
26
|
+
'#ED7B2F',
|
|
27
|
+
'#E34D59',
|
|
28
|
+
'#ED49B4',
|
|
29
|
+
'#834EC2',
|
|
30
|
+
];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
development: {
|
|
3
|
+
// 开发环境接口请求
|
|
4
|
+
API: '',
|
|
5
|
+
// 开发环境 cdn 路径
|
|
6
|
+
CDN: '',
|
|
7
|
+
},
|
|
8
|
+
test: {
|
|
9
|
+
// 测试环境接口地址
|
|
10
|
+
API: 'https://service-exndqyuk-1257786608.gz.apigw.tencentcs.com',
|
|
11
|
+
// 测试环境 cdn 路径
|
|
12
|
+
CDN: '',
|
|
13
|
+
},
|
|
14
|
+
release: {
|
|
15
|
+
// 正式环境接口地址
|
|
16
|
+
API: 'https://service-bv448zsw-1257786608.gz.apigw.tencentcs.com',
|
|
17
|
+
// 正式环境 cdn 路径
|
|
18
|
+
CDN: '',
|
|
19
|
+
},
|
|
20
|
+
site: {
|
|
21
|
+
// 正式环境接口地址
|
|
22
|
+
API: 'https://service-bv448zsw-1257786608.gz.apigw.tencentcs.com',
|
|
23
|
+
// 正式环境 cdn 路径
|
|
24
|
+
CDN: '',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
showFooter: true,
|
|
3
|
+
isSidebarCompact: false,
|
|
4
|
+
showBreadcrumb: false,
|
|
5
|
+
mode: 'light',
|
|
6
|
+
layout: 'side',
|
|
7
|
+
splitMenu: false,
|
|
8
|
+
isFooterAside: false,
|
|
9
|
+
isSidebarFixed: true,
|
|
10
|
+
isHeaderFixed: true,
|
|
11
|
+
isUseTabsRouter: false,
|
|
12
|
+
showHeader: true,
|
|
13
|
+
brandTheme: '#0052D9',
|
|
14
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
interface IOption {
|
|
2
|
+
value: number | string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
// 合同状态枚举
|
|
6
|
+
export const CONTRACT_STATUS = {
|
|
7
|
+
FAIL: 0,
|
|
8
|
+
AUDIT_PENDING: 1,
|
|
9
|
+
EXEC_PENDING: 2,
|
|
10
|
+
EXECUTING: 3,
|
|
11
|
+
FINISH: 4,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const CONTRACT_STATUS_OPTIONS: Array<IOption> = [
|
|
15
|
+
{ value: CONTRACT_STATUS.FAIL, label: '审核失败' },
|
|
16
|
+
{ value: CONTRACT_STATUS.AUDIT_PENDING, label: '待审核' },
|
|
17
|
+
{ value: CONTRACT_STATUS.EXEC_PENDING, label: '待履行' },
|
|
18
|
+
{ value: CONTRACT_STATUS.EXECUTING, label: '审核成功' },
|
|
19
|
+
{ value: CONTRACT_STATUS.FINISH, label: '已完成' },
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
// 合同类型枚举
|
|
23
|
+
export const CONTRACT_TYPES = {
|
|
24
|
+
MAIN: 0,
|
|
25
|
+
SUB: 1,
|
|
26
|
+
SUPPLEMENT: 2,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const CONTRACT_TYPE_OPTIONS: Array<IOption> = [
|
|
30
|
+
{ value: CONTRACT_TYPES.MAIN, label: '主合同' },
|
|
31
|
+
{ value: CONTRACT_TYPES.SUB, label: '子合同' },
|
|
32
|
+
{ value: CONTRACT_TYPES.SUPPLEMENT, label: '补充合同' },
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
// 合同收付类型枚举
|
|
36
|
+
export const CONTRACT_PAYMENT_TYPES = {
|
|
37
|
+
PAYMENT: 0,
|
|
38
|
+
RECIPT: 1,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// 通知的优先级对应的TAG类型
|
|
42
|
+
export const NOTIFICATION_TYPES = {
|
|
43
|
+
low: 'primary',
|
|
44
|
+
middle: 'warning',
|
|
45
|
+
high: 'danger',
|
|
46
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import STYLE_CONFIG from '@/config/style';
|
|
2
|
+
|
|
3
|
+
export interface ResDataType {
|
|
4
|
+
code: number;
|
|
5
|
+
data: any;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface MenuRoute {
|
|
9
|
+
path: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
icon?:
|
|
12
|
+
| string
|
|
13
|
+
| {
|
|
14
|
+
render: () => void;
|
|
15
|
+
};
|
|
16
|
+
redirect?: string;
|
|
17
|
+
children: MenuRoute[];
|
|
18
|
+
meta: any;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type ModeType = 'dark' | 'light';
|
|
22
|
+
|
|
23
|
+
export type SettingType = typeof STYLE_CONFIG;
|
|
24
|
+
|
|
25
|
+
export type ClassName = { [className: string]: any } | ClassName[] | string;
|
|
26
|
+
|
|
27
|
+
export type CommonObjType = {
|
|
28
|
+
[key: string]: string | number;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export interface NotificationItem {
|
|
32
|
+
id: string;
|
|
33
|
+
content: string;
|
|
34
|
+
type: string;
|
|
35
|
+
status: boolean;
|
|
36
|
+
collected: boolean;
|
|
37
|
+
date: string;
|
|
38
|
+
quality: 'high' | 'low' | 'middle';
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<t-breadcrumb :max-item-width="'150'" class="tdesign-breadcrumb">
|
|
3
|
+
<t-breadcrumbItem v-for="item in crumbs" :key="item.to" :to="item.to">
|
|
4
|
+
{{ item.title }}
|
|
5
|
+
</t-breadcrumbItem>
|
|
6
|
+
</t-breadcrumb>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script lang="ts">
|
|
10
|
+
import Vue from 'vue';
|
|
11
|
+
|
|
12
|
+
export default Vue.extend({
|
|
13
|
+
name: 'TdesignStarterBreadcrumb',
|
|
14
|
+
props: {
|
|
15
|
+
isVisible: Boolean,
|
|
16
|
+
},
|
|
17
|
+
computed: {
|
|
18
|
+
crumbs() {
|
|
19
|
+
const pathArray = this.$route.path.split('/');
|
|
20
|
+
pathArray.shift();
|
|
21
|
+
|
|
22
|
+
const breadcrumbs = pathArray.reduce((breadcrumbArray, path, idx) => {
|
|
23
|
+
breadcrumbArray.push({
|
|
24
|
+
path,
|
|
25
|
+
to: breadcrumbArray[idx - 1] ? `/${breadcrumbArray[idx - 1].path}/${path}` : `/${path}`,
|
|
26
|
+
title: this.$route.matched[idx].meta.title || path,
|
|
27
|
+
});
|
|
28
|
+
return breadcrumbArray;
|
|
29
|
+
}, []);
|
|
30
|
+
return breadcrumbs;
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
</script>
|
|
35
|
+
<style scoped>
|
|
36
|
+
.tdesign-breadcrumb {
|
|
37
|
+
margin-bottom: 8px;
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<transition name="fade" mode="out-in">
|
|
3
|
+
<keep-alive :include="this.aliveViews">
|
|
4
|
+
<router-view v-if="!this.isRefreshing" />
|
|
5
|
+
</keep-alive>
|
|
6
|
+
</transition>
|
|
7
|
+
</template>
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { mapGetters } from 'vuex';
|
|
10
|
+
import isBoolean from 'lodash/isBoolean';
|
|
11
|
+
import isUndefined from 'lodash/isUndefined';
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
computed: {
|
|
15
|
+
...mapGetters({
|
|
16
|
+
tabRouterList: 'tabRouter/tabRouterList',
|
|
17
|
+
isRefreshing: 'tabRouter/isRefreshing',
|
|
18
|
+
isUseTabsRouter: 'setting/isUseTabsRouter',
|
|
19
|
+
}),
|
|
20
|
+
aliveViews() {
|
|
21
|
+
return this.tabRouterList
|
|
22
|
+
.filter((route) => {
|
|
23
|
+
const keepAliveConfig = route.meta?.keepAlive;
|
|
24
|
+
const isRouteKeepAlive = isUndefined(keepAliveConfig) || (isBoolean(keepAliveConfig) && keepAliveConfig); // 默认开启keepalive
|
|
25
|
+
return route.isAlive && isRouteKeepAlive;
|
|
26
|
+
})
|
|
27
|
+
.map((route) => route.name);
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
</script>
|
|
32
|
+
<style lang="less" scoped>
|
|
33
|
+
@import '@/style/variables';
|
|
34
|
+
|
|
35
|
+
.fade-leave-active,
|
|
36
|
+
.fade-enter-active {
|
|
37
|
+
transition: opacity @anim-duration-slow @anim-time-fn-easing;
|
|
38
|
+
}
|
|
39
|
+
.fade-enter,
|
|
40
|
+
.fade-leave-to {
|
|
41
|
+
opacity: 0;
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="prefix + '-footer'">Copyright © 2021-{{ new Date().getFullYear() }} Tencent. All Rights Reserved</div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import { prefix } from '@/config/global';
|
|
7
|
+
import Vue from 'vue';
|
|
8
|
+
|
|
9
|
+
export default Vue.extend({
|
|
10
|
+
name: `${prefix}-footer`,
|
|
11
|
+
data() {
|
|
12
|
+
return {
|
|
13
|
+
prefix,
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<style lang="less" scoped>
|
|
20
|
+
@import '@/style/variables';
|
|
21
|
+
|
|
22
|
+
.@{starter-prefix}-footer {
|
|
23
|
+
color: var(--td-text-color-placeholder);
|
|
24
|
+
line-height: 20px;
|
|
25
|
+
text-align: center;
|
|
26
|
+
}
|
|
27
|
+
</style>
|