n20-common-lib 3.1.11 → 3.1.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "3.1.11",
3
+ "version": "3.1.12",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1070,3 +1070,37 @@ $--breakpoints-spec: (
1070
1070
  min-width: $--xl
1071
1071
  )
1072
1072
  );
1073
+
1074
+ // chart
1075
+ $--charts-blue: #007aff !default;
1076
+ $--charts-red: #ff3b30 !default;
1077
+ $--charts-orange: #f77234 !default;
1078
+ $--charts-warn: #ff9933 !default;
1079
+ $--charts-yellow: #f7ba1e !default;
1080
+ $--charts-bright-yellow: #fadc19 !default;
1081
+ $--charts-lime: #9fdb1d !default;
1082
+ $--charts-teal: #0fc6c2 !default;
1083
+ $--charts-green: #2db185 !default;
1084
+ $--charts-light-blue: #3491fa !default;
1085
+ $--charts-purple: #722ed1 !default;
1086
+ $--charts-magenta: #d91ad9 !default;
1087
+ $--charts-pink: #f5319d !default;
1088
+
1089
+ // echarts 不支持scss,使用css 包裹
1090
+ :root {
1091
+ --charts-blue: #{$--charts-blue};
1092
+ --charts-red: #{$--charts-red};
1093
+ --charts-orange: #{$--charts-orange};
1094
+ --charts-warn: #{$--charts-warn};
1095
+ --charts-yellow: #{$--charts-yellow};
1096
+ --charts-bright-yellow: #{$--charts-bright-yellow};
1097
+ --charts-lime: #{$--charts-lime};
1098
+ --charts-teal: #{$--charts-teal};
1099
+ --charts-green: #{$--charts-green};
1100
+ --charts-light-blue: #{$--charts-light-blue};
1101
+ --charts-purple: #{$--charts-purple};
1102
+ --charts-magenta: #{$--charts-magenta};
1103
+ --charts-pink: #{$--charts-pink};
1104
+ --color-text-regular: #{$--color-text-regular};
1105
+ --color-text-primary: #{$--color-text-primary};
1106
+ }
@@ -40,10 +40,11 @@
40
40
  display: flex;
41
41
  flex-direction: column;
42
42
  position: relative;
43
- transition: width 0.3s ease;
43
+ transition: width 0.3s ease, min-width 0.3s ease;
44
44
 
45
45
  &.collapsed {
46
- width: 8px;
46
+ width: 20px;
47
+ min-width: 20px;
47
48
 
48
49
  .sidebar-header,
49
50
  .report-list {
@@ -69,6 +70,7 @@
69
70
  font-style: normal;
70
71
  font-weight: 400;
71
72
  line-height: 22px;
73
+ white-space: nowrap;
72
74
  }
73
75
  }
74
76
 
@@ -106,6 +108,8 @@
106
108
 
107
109
  .report-item {
108
110
  display: flex;
111
+ height: 38px;
112
+ box-sizing: border-box;
109
113
  align-items: center;
110
114
  padding: 7px 8px;
111
115
  border-radius: 4px;
@@ -137,6 +141,28 @@
137
141
  &.editing {
138
142
  background: var(--bg-white, #fff);
139
143
  }
144
+
145
+ .report-more {
146
+ display: none;
147
+ align-items: center;
148
+ justify-content: center;
149
+ width: 24px;
150
+ height: 24px;
151
+ margin-left: 4px;
152
+ border-radius: 4px;
153
+ cursor: pointer;
154
+ color: #86909c;
155
+ position: relative;
156
+
157
+ &.visible {
158
+ display: flex;
159
+ }
160
+
161
+ &:hover {
162
+ background: rgba(0, 0, 0, 0.04);
163
+ color: #4e5969;
164
+ }
165
+ }
140
166
  }
141
167
 
142
168
  .report-name-input {
@@ -150,28 +176,6 @@
150
176
  outline: none;
151
177
  }
152
178
 
153
- .report-more {
154
- display: none;
155
- align-items: center;
156
- justify-content: center;
157
- width: 24px;
158
- height: 24px;
159
- margin-left: 4px;
160
- border-radius: 4px;
161
- cursor: pointer;
162
- color: #86909c;
163
- position: relative;
164
-
165
- &.visible {
166
- display: flex;
167
- }
168
-
169
- &:hover {
170
- background: rgba(0, 0, 0, 0.04);
171
- color: #4e5969;
172
- }
173
- }
174
-
175
179
  .report-menu {
176
180
  position: absolute;
177
181
  top: 100%;
@@ -215,6 +219,8 @@
215
219
  height: 16px;
216
220
  margin-right: 8px;
217
221
  color: #4e5969;
222
+ display: flex;
223
+ align-items: center;
218
224
  }
219
225
 
220
226
  .report-name {
@@ -266,14 +272,6 @@
266
272
  padding: 16px;
267
273
  gap: 16px;
268
274
  transition: margin-left 0.3s ease, margin-right 0.3s ease;
269
-
270
- &.left-collapsed {
271
- margin-left: 8px;
272
- }
273
-
274
- &.right-collapsed {
275
- margin-right: 8px;
276
- }
277
275
  }
278
276
 
279
277
  .main-toolbar {
@@ -495,8 +493,14 @@
495
493
  height: 100%;
496
494
  position: relative;
497
495
  display: flex;
496
+ box-sizing: border-box;
498
497
  flex-direction: column;
499
498
  padding: 16px;
499
+ background-image: radial-gradient(circle, #e5e6eb 1px, transparent 1px),
500
+ radial-gradient(circle, #e5e6eb 1px, transparent 1px);
501
+ background-size: 20px 20px;
502
+ background-position: 0 0, 10px 10px;
503
+ background-color: #ffffff;
500
504
  }
501
505
 
502
506
  .chart-header {
@@ -550,10 +554,11 @@
550
554
  border-left: 1px solid #e5e6eb;
551
555
  display: flex;
552
556
  flex-direction: column;
553
- transition: width 0.3s ease;
557
+ transition: width 0.3s ease, min-width 0.3s ease;
554
558
 
555
559
  &.collapsed {
556
- width: 8px;
560
+ width: 0px;
561
+ min-width: 0px;
557
562
 
558
563
  .sidebar-header,
559
564
  .config-form {
@@ -601,7 +606,8 @@
601
606
  .config-form {
602
607
  flex: 1;
603
608
  padding: 0 16px;
604
- overflow-y: auto;
609
+ padding-right: 10px;
610
+ overflow-y: scroll;
605
611
 
606
612
  .form-item:first-child {
607
613
  margin-top: 16px;
@@ -1,5 +1,7 @@
1
1
  /* v3 版本 TablePro 样式 - 使用独特前缀实现样式隔离 */
2
2
  .v3-table-pro-wrapper {
3
+ overflow-y: hidden;
4
+
3
5
  /* Element UI 表格基础样式 */
4
6
  .el-table--small {
5
7
  font-size: 14px;
@@ -12,9 +12,15 @@
12
12
  </template>
13
13
 
14
14
  <script>
15
- import importG from '../../utils/importGlobal.js'
15
+ import { BarChart, LineChart, PieChart } from 'echarts/charts'
16
+ import { GridComponent, GraphicComponent, LegendComponent, TooltipComponent } from 'echarts/components'
17
+ import * as echarts from 'echarts/core'
18
+ import { CanvasRenderer } from 'echarts/renderers'
19
+
16
20
  import Empty from '../Empty/index.vue'
17
21
 
22
+ echarts.use([GridComponent, GraphicComponent, TooltipComponent, LineChart, PieChart, BarChart, CanvasRenderer, LegendComponent])
23
+
18
24
  export default {
19
25
  name: 'ChartView',
20
26
  components: {
@@ -63,14 +69,18 @@ export default {
63
69
  }
64
70
  }
65
71
  },
72
+ mounted() {
73
+ this.initChart()
74
+ },
75
+ beforeDestroy() {
76
+ this.destroyChart()
77
+ },
66
78
  methods: {
67
79
  // 初始化图表
68
80
  async initChart() {
69
81
  if (!this.$refs.chartContainer) return
70
82
  if (!this.hasData) return
71
83
 
72
- const echarts = await importG('echarts', () => import(/*webpackChunkName "echarts"*/ 'echarts'))
73
-
74
84
  if (!this.chartInstance) {
75
85
  this.chartInstance = echarts.init(this.$refs.chartContainer)
76
86
  }
@@ -94,12 +104,6 @@ export default {
94
104
  this.chartInstance = null
95
105
  }
96
106
  }
97
- },
98
- mounted() {
99
- this.initChart()
100
- },
101
- beforeDestroy() {
102
- this.destroyChart()
103
107
  }
104
108
  }
105
109
  </script>
@@ -18,12 +18,7 @@
18
18
  <div class="form-item">
19
19
  <label class="form-label">统计类型</label>
20
20
  <div class="radio-group">
21
- <ViewToggle
22
- :value="statType"
23
- :itemWidth="120"
24
- :options="statTypeOptions"
25
- @change="handleStatTypeChange"
26
- />
21
+ <ViewToggle :value="statType" :item-width="120" :options="statTypeOptions" @change="handleStatTypeChange" />
27
22
  </div>
28
23
  </div>
29
24
 
@@ -392,8 +387,7 @@ export default {
392
387
  const iconMap = {
393
388
  bar: 'v3-icon-chart-histogram',
394
389
  line: 'v3-icon-chart-line',
395
- pie: 'v3-icon-chart-pie',
396
- horizontalBar: 'v3-icon-histogram'
390
+ pie: 'v3-icon-chart-pie'
397
391
  }
398
392
  return iconMap[type] || 'v3-icon-chart-histogram'
399
393
  },
@@ -515,4 +509,4 @@ export default {
515
509
  }
516
510
  }
517
511
  }
518
- </script>
512
+ </script>
@@ -30,10 +30,10 @@
30
30
  />
31
31
  <span class="toolbar-divider"></span>
32
32
  <div class="action-buttons">
33
- <div class="action-btn" @click="handleRefresh" title="刷新">
33
+ <div class="action-btn" title="刷新" @click="handleRefresh">
34
34
  <i class="n20-icon-shuaxin"></i>
35
35
  </div>
36
- <div class="action-btn more-btn" :class="{ active: showMoreMenu }" @click="toggleMoreMenu" title="更多">
36
+ <div class="action-btn more-btn" :class="{ active: showMoreMenu }" title="更多" @click="toggleMoreMenu">
37
37
  <i class="v3-icon-more"></i>
38
38
  <div v-if="showMoreMenu" class="more-dropdown-menu" @click.stop>
39
39
  <div v-if="isRightSidebarCollapsed" class="dropdown-menu-item" @click="handleConfig">
@@ -157,4 +157,4 @@ export default {
157
157
  }
158
158
  }
159
159
  }
160
- </script>
160
+ </script>
@@ -3,7 +3,7 @@
3
3
  <div class="pivot-sidebar-left" :class="{ collapsed: isCollapsed }">
4
4
  <div class="sidebar-header">
5
5
  <span class="sidebar-title">我的报表清单</span>
6
- <div class="add-report-btn" @click="handleAddReport" title="新建">
6
+ <div class="add-report-btn" title="新建" @click="handleAddReport">
7
7
  <i class="v3-icon-plus"></i>
8
8
  </div>
9
9
  </div>
@@ -54,11 +54,7 @@
54
54
  </div>
55
55
 
56
56
  <!-- 折叠/展开指示器 -->
57
- <div
58
- class="scroll-bar-indicator"
59
- :class="{ collapsed: isCollapsed }"
60
- @click="handleToggleCollapse"
61
- >
57
+ <div class="scroll-bar-indicator" :class="{ collapsed: isCollapsed }" @click="handleToggleCollapse">
62
58
  <i :class="isCollapsed ? 'v3-icon-right' : 'v3-icon-left'"></i>
63
59
  </div>
64
60
  </div>
@@ -102,8 +98,7 @@ export default {
102
98
  const iconMap = {
103
99
  bar: 'v3-icon-chart-histogram',
104
100
  line: 'v3-icon-chart-line',
105
- pie: 'v3-icon-chart-pie',
106
- horizontalBar: 'v3-icon-histogram'
101
+ pie: 'v3-icon-chart-pie'
107
102
  }
108
103
  return iconMap[type] || 'v3-icon-chart-histogram'
109
104
  },
@@ -169,4 +164,4 @@ export default {
169
164
  }
170
165
  }
171
166
  }
172
- </script>
167
+ </script>