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.
Files changed (180) hide show
  1. package/README.md +2 -0
  2. package/bin/index.js +20 -0
  3. package/package.json +42 -0
  4. package/src/commands/create.js +171 -0
  5. package/src/commands/mcp.js +157 -0
  6. package/src/mcp/CURSOR_SETUP.md +259 -0
  7. package/src/mcp/README.md +134 -0
  8. package/src/mcp/USAGE_EXAMPLES.md +181 -0
  9. package/src/mcp/get-cursor-config.js +58 -0
  10. package/src/mcp/package.json +23 -0
  11. package/src/mcp/pnpm-lock.yaml +2441 -0
  12. package/src/mcp/src/handlers.js +211 -0
  13. package/src/mcp/src/http-server.js +332 -0
  14. package/src/mcp/src/index.js +195 -0
  15. package/src/mcp/src/schemas.js +54 -0
  16. package/src/mcp/test-create-project.js +49 -0
  17. package/src/mcp/test-mcp.js +89 -0
  18. package/src/mcp/test-show-tree.js +66 -0
  19. package/src/template/Uni-app/README.md +19 -0
  20. package/src/template/Uni-app/babel.config.js +81 -0
  21. package/src/template/Uni-app/package.json +107 -0
  22. package/src/template/Uni-app/postcss.config.js +27 -0
  23. package/src/template/Uni-app/public/index.html +25 -0
  24. package/src/template/Uni-app/shims-uni.d.ts +11 -0
  25. package/src/template/Uni-app/shims-vue.d.ts +4 -0
  26. package/src/template/Uni-app/src/App.vue +17 -0
  27. package/src/template/Uni-app/src/main.js +12 -0
  28. package/src/template/Uni-app/src/manifest.json +75 -0
  29. package/src/template/Uni-app/src/pages/index/index.vue +49 -0
  30. package/src/template/Uni-app/src/pages.json +16 -0
  31. package/src/template/Uni-app/src/static/logo.png +0 -0
  32. package/src/template/Uni-app/src/uni.promisify.adaptor.js +13 -0
  33. package/src/template/Uni-app/src/uni.scss +76 -0
  34. package/src/template/Uni-app/yarn.lock +11466 -0
  35. package/src/template/Vue2/.editorconfig +14 -0
  36. package/src/template/Vue2/.env +2 -0
  37. package/src/template/Vue2/.env.development +2 -0
  38. package/src/template/Vue2/.env.site +2 -0
  39. package/src/template/Vue2/.prettierrc.js +39 -0
  40. package/src/template/Vue2/.stylelintignore +8 -0
  41. package/src/template/Vue2/README-zh_CN.md +115 -0
  42. package/src/template/Vue2/commitlint.config.js +1 -0
  43. package/src/template/Vue2/docs/docs-starter.png +0 -0
  44. package/src/template/Vue2/docs/docs-startup.png +0 -0
  45. package/src/template/Vue2/docs/docs-structure.png +0 -0
  46. package/src/template/Vue2/globals.d.ts +13 -0
  47. package/src/template/Vue2/index.html +27 -0
  48. package/src/template/Vue2/jsx.d.ts +13 -0
  49. package/src/template/Vue2/mock/index.ts +147 -0
  50. package/src/template/Vue2/package.json +91 -0
  51. package/src/template/Vue2/package.json.ejs +91 -0
  52. package/src/template/Vue2/public/favicon.ico +0 -0
  53. package/src/template/Vue2/shims-vue.d.ts +5 -0
  54. package/src/template/Vue2/src/App.vue +19 -0
  55. package/src/template/Vue2/src/assets/assets-login-bg-black.png +0 -0
  56. package/src/template/Vue2/src/assets/assets-login-bg-white.png +0 -0
  57. package/src/template/Vue2/src/assets/assets-logo-full.svg +39 -0
  58. package/src/template/Vue2/src/assets/assets-product-1.svg +5 -0
  59. package/src/template/Vue2/src/assets/assets-product-2.svg +5 -0
  60. package/src/template/Vue2/src/assets/assets-product-3.svg +5 -0
  61. package/src/template/Vue2/src/assets/assets-product-4.svg +5 -0
  62. package/src/template/Vue2/src/assets/assets-result-403.svg +32 -0
  63. package/src/template/Vue2/src/assets/assets-result-404.svg +36 -0
  64. package/src/template/Vue2/src/assets/assets-result-500.svg +32 -0
  65. package/src/template/Vue2/src/assets/assets-result-ie.svg +33 -0
  66. package/src/template/Vue2/src/assets/assets-result-maintenance.svg +49 -0
  67. package/src/template/Vue2/src/assets/assets-result-wifi.svg +23 -0
  68. package/src/template/Vue2/src/assets/assets-setting-auto.svg +13 -0
  69. package/src/template/Vue2/src/assets/assets-setting-dark.svg +5 -0
  70. package/src/template/Vue2/src/assets/assets-setting-light.svg +13 -0
  71. package/src/template/Vue2/src/assets/assets-t-logo.svg +41 -0
  72. package/src/template/Vue2/src/assets/assets-tencent-logo.png +0 -0
  73. package/src/template/Vue2/src/components/color/index.vue +35 -0
  74. package/src/template/Vue2/src/components/product-card/index.vue +121 -0
  75. package/src/template/Vue2/src/components/result/index.vue +118 -0
  76. package/src/template/Vue2/src/components/thumbnail/index.vue +49 -0
  77. package/src/template/Vue2/src/components/trend/index.vue +105 -0
  78. package/src/template/Vue2/src/config/color.ts +30 -0
  79. package/src/template/Vue2/src/config/global.ts +2 -0
  80. package/src/template/Vue2/src/config/host.ts +26 -0
  81. package/src/template/Vue2/src/config/style.ts +14 -0
  82. package/src/template/Vue2/src/constants/index.ts +46 -0
  83. package/src/template/Vue2/src/interface.ts +39 -0
  84. package/src/template/Vue2/src/layouts/blank.vue +12 -0
  85. package/src/template/Vue2/src/layouts/components/Breadcrumb.vue +39 -0
  86. package/src/template/Vue2/src/layouts/components/Content.vue +43 -0
  87. package/src/template/Vue2/src/layouts/components/Footer.vue +27 -0
  88. package/src/template/Vue2/src/layouts/components/Header.vue +321 -0
  89. package/src/template/Vue2/src/layouts/components/LayoutContent.vue +168 -0
  90. package/src/template/Vue2/src/layouts/components/LayoutHeader.vue +52 -0
  91. package/src/template/Vue2/src/layouts/components/LayoutSidebar.vue +51 -0
  92. package/src/template/Vue2/src/layouts/components/MenuContent.vue +108 -0
  93. package/src/template/Vue2/src/layouts/components/Notice.vue +221 -0
  94. package/src/template/Vue2/src/layouts/components/Search.vue +134 -0
  95. package/src/template/Vue2/src/layouts/components/SideNav.vue +150 -0
  96. package/src/template/Vue2/src/layouts/index.vue +100 -0
  97. package/src/template/Vue2/src/layouts/setting.vue +404 -0
  98. package/src/template/Vue2/src/main.js +9 -0
  99. package/src/template/Vue2/src/main.jsx +51 -0
  100. package/src/template/Vue2/src/pages/dashboard/base/components/MiddleChart.vue +158 -0
  101. package/src/template/Vue2/src/pages/dashboard/base/components/OutputOverview.vue +189 -0
  102. package/src/template/Vue2/src/pages/dashboard/base/components/RankList.vue +111 -0
  103. package/src/template/Vue2/src/pages/dashboard/base/components/TopPanel.vue +246 -0
  104. package/src/template/Vue2/src/pages/dashboard/base/index.ts +702 -0
  105. package/src/template/Vue2/src/pages/dashboard/base/index.vue +44 -0
  106. package/src/template/Vue2/src/pages/dashboard/detail/index.ts +267 -0
  107. package/src/template/Vue2/src/pages/dashboard/detail/index.vue +242 -0
  108. package/src/template/Vue2/src/pages/detail/advanced/components/Product.vue +167 -0
  109. package/src/template/Vue2/src/pages/detail/advanced/index.less +74 -0
  110. package/src/template/Vue2/src/pages/detail/advanced/index.vue +219 -0
  111. package/src/template/Vue2/src/pages/detail/base/index.less +105 -0
  112. package/src/template/Vue2/src/pages/detail/base/index.vue +46 -0
  113. package/src/template/Vue2/src/pages/detail/deploy/index.ts +204 -0
  114. package/src/template/Vue2/src/pages/detail/deploy/index.vue +224 -0
  115. package/src/template/Vue2/src/pages/detail/secondary/index.less +71 -0
  116. package/src/template/Vue2/src/pages/detail/secondary/index.vue +131 -0
  117. package/src/template/Vue2/src/pages/form/base/index.less +57 -0
  118. package/src/template/Vue2/src/pages/form/base/index.vue +254 -0
  119. package/src/template/Vue2/src/pages/form/step/index.less +37 -0
  120. package/src/template/Vue2/src/pages/form/step/index.vue +259 -0
  121. package/src/template/Vue2/src/pages/frame/doc/index.vue +86 -0
  122. package/src/template/Vue2/src/pages/frame/tdesign/index.vue +86 -0
  123. package/src/template/Vue2/src/pages/list/base/index.vue +267 -0
  124. package/src/template/Vue2/src/pages/list/card/index.vue +221 -0
  125. package/src/template/Vue2/src/pages/list/components/CommonTable.vue +313 -0
  126. package/src/template/Vue2/src/pages/list/filter/index.vue +15 -0
  127. package/src/template/Vue2/src/pages/list/tree/index.vue +174 -0
  128. package/src/template/Vue2/src/pages/login/components/components-header.vue +74 -0
  129. package/src/template/Vue2/src/pages/login/components/components-login.vue +154 -0
  130. package/src/template/Vue2/src/pages/login/components/components-register.vue +144 -0
  131. package/src/template/Vue2/src/pages/login/index.less +202 -0
  132. package/src/template/Vue2/src/pages/login/index.vue +53 -0
  133. package/src/template/Vue2/src/pages/nest-menu/Index.vue +10 -0
  134. package/src/template/Vue2/src/pages/result/403/index.vue +14 -0
  135. package/src/template/Vue2/src/pages/result/404/index.vue +14 -0
  136. package/src/template/Vue2/src/pages/result/500/index.vue +14 -0
  137. package/src/template/Vue2/src/pages/result/browser-incompatible/index.vue +77 -0
  138. package/src/template/Vue2/src/pages/result/fail/index.vue +57 -0
  139. package/src/template/Vue2/src/pages/result/maintenance/index.vue +14 -0
  140. package/src/template/Vue2/src/pages/result/network-error/index.vue +24 -0
  141. package/src/template/Vue2/src/pages/result/success/index.vue +59 -0
  142. package/src/template/Vue2/src/pages/user/index.less +148 -0
  143. package/src/template/Vue2/src/pages/user/index.ts +157 -0
  144. package/src/template/Vue2/src/pages/user/index.vue +204 -0
  145. package/src/template/Vue2/src/permission.js +56 -0
  146. package/src/template/Vue2/src/router/index.js +43 -0
  147. package/src/template/Vue2/src/router/modules/base.ts +29 -0
  148. package/src/template/Vue2/src/router/modules/components.ts +175 -0
  149. package/src/template/Vue2/src/router/modules/others.ts +55 -0
  150. package/src/template/Vue2/src/service/service-advance.ts +233 -0
  151. package/src/template/Vue2/src/service/service-base.ts +205 -0
  152. package/src/template/Vue2/src/service/service-detail-base.ts +84 -0
  153. package/src/template/Vue2/src/service/service-detail-deploy.ts +234 -0
  154. package/src/template/Vue2/src/service/service-detail.ts +57 -0
  155. package/src/template/Vue2/src/service/service-user.ts +64 -0
  156. package/src/template/Vue2/src/store/index.ts +22 -0
  157. package/src/template/Vue2/src/store/modules/notification.ts +90 -0
  158. package/src/template/Vue2/src/store/modules/permission.ts +66 -0
  159. package/src/template/Vue2/src/store/modules/setting.ts +122 -0
  160. package/src/template/Vue2/src/store/modules/tab-router.ts +83 -0
  161. package/src/template/Vue2/src/store/modules/user.ts +98 -0
  162. package/src/template/Vue2/src/style/font-family.less +6 -0
  163. package/src/template/Vue2/src/style/index.less +5 -0
  164. package/src/template/Vue2/src/style/layout.less +201 -0
  165. package/src/template/Vue2/src/style/reset.less +78 -0
  166. package/src/template/Vue2/src/style/variables.less +27 -0
  167. package/src/template/Vue2/src/utils/charts.ts +38 -0
  168. package/src/template/Vue2/src/utils/color.ts +118 -0
  169. package/src/template/Vue2/src/utils/date.ts +12 -0
  170. package/src/template/Vue2/src/utils/request.ts +60 -0
  171. package/src/template/Vue2/stylelint.config.js +5 -0
  172. package/src/template/Vue2/tsconfig.json +26 -0
  173. package/src/template/Vue2/vite.config.js +58 -0
  174. package/src/template/Vue3/package.json.ejs +8 -0
  175. package/src/template/Vue3/pages.json +10 -0
  176. package/src/template/Vue3/src/main.js +7 -0
  177. package/src/utils/copy.js +17 -0
  178. package/src/utils/eslint.js +205 -0
  179. package/src/utils/logo.js +18 -0
  180. 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,2 @@
1
+ export const prefix = 'tdesign-starter';
2
+ export const TOKEN_NAME = 'tdesign-starter';
@@ -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,12 @@
1
+ <template>
2
+ <div class="tdesign-wrapper">
3
+ <router-view />
4
+ </div>
5
+ </template>
6
+ <style lang="less" scoped>
7
+ .tdesign-wrapper {
8
+ height: 100vh;
9
+ display: flex;
10
+ flex-direction: column;
11
+ }
12
+ </style>
@@ -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>