npmapps 1.0.25 → 1.0.26

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 (212) hide show
  1. package/app/.codegraph/daemon.pid +6 -0
  2. package/app/.eslintrc.js +19 -0
  3. package/app/README.md +24 -0
  4. package/app/babel.config.js +5 -0
  5. package/app/devtool-windows-amd64.zip +0 -0
  6. package/app/docs/superpowers/plans/2026-05-29-quill-editor.md +836 -0
  7. package/app/docs/superpowers/specs/2026-05-29-quill-editor-design.md +210 -0
  8. package/app/docs/superpowers/specs/2026-06-06-lazy-cascader-design.md +400 -0
  9. package/app/jsconfig.json +19 -0
  10. package/app/package-lock.json +21347 -0
  11. package/app/package.json +63 -0
  12. package/app/postcss.config.js +10 -0
  13. package/app/public/favicon.ico +0 -0
  14. package/app/public/index.html +17 -0
  15. package/app/public//344/270/200/351/224/256/351/273/221/346/232/227.html +136 -0
  16. package/app/src/App.vue +110 -0
  17. package/app/src/assets/bpmn-camunda.jpg +0 -0
  18. package/app/src/assets/css/diagram.less +17 -0
  19. package/app/src/assets/icon/Icon.less +31 -0
  20. package/app/src/assets/icon/font/app-codes.css +26 -0
  21. package/app/src/assets/icon/font/app.eot +0 -0
  22. package/app/src/assets/icon/font/app.svg +60 -0
  23. package/app/src/assets/icon/font/app.ttf +0 -0
  24. package/app/src/assets/icon/font/app.woff +0 -0
  25. package/app/src/assets/icon/font/app.woff2 +0 -0
  26. package/app/src/assets/icon/font/config.json +248 -0
  27. package/app/src/assets/icon/font/source/raw/align-bottom-tool.svg +30 -0
  28. package/app/src/assets/icon/font/source/raw/align-horizontal-center-tool.svg +85 -0
  29. package/app/src/assets/icon/font/source/raw/align-left-tool.svg +84 -0
  30. package/app/src/assets/icon/font/source/raw/align-right-tool.svg +80 -0
  31. package/app/src/assets/icon/font/source/raw/align-top-tool.svg +84 -0
  32. package/app/src/assets/icon/font/source/raw/align-vertical-center-tool.svg +89 -0
  33. package/app/src/assets/icon/font/source/raw/distribute-horizontally-tool.svg +95 -0
  34. package/app/src/assets/icon/font/source/raw/distribute-vertically-tool.svg +99 -0
  35. package/app/src/assets/icon/font/source/raw/set-color-tool.svg +111 -0
  36. package/app/src/assets/icon/font/source/symbols/align-bottom-tool.svg +30 -0
  37. package/app/src/assets/icon/font/source/symbols/align-horizontal-center-tool.svg +30 -0
  38. package/app/src/assets/icon/font/source/symbols/align-left-tool.svg +30 -0
  39. package/app/src/assets/icon/font/source/symbols/align-right-tool.svg +30 -0
  40. package/app/src/assets/icon/font/source/symbols/align-top-tool.svg +30 -0
  41. package/app/src/assets/icon/font/source/symbols/align-vertical-center-tool.svg +30 -0
  42. package/app/src/assets/icon/font/source/symbols/distribute-horizontally-tool.svg +30 -0
  43. package/app/src/assets/icon/font/source/symbols/distribute-vertically-tool.svg +30 -0
  44. package/app/src/assets/icon/font/source/symbols/set-color-tool.svg +63 -0
  45. package/app/src/assets/logo.png +0 -0
  46. package/app/src/components/EllTable/README.md +70 -0
  47. package/app/src/components/EllTable/article.md +184 -0
  48. package/app/src/components/EllTable/index.js +213 -0
  49. package/app/src/components/FormulaEditor/FunctionSelector.vue +123 -0
  50. package/app/src/components/FormulaEditor/OperatorSelector.vue +184 -0
  51. package/app/src/components/FormulaEditor/ParameterSelector.vue +123 -0
  52. package/app/src/components/FormulaEditor/api.js +69 -0
  53. package/app/src/components/FormulaEditor/index.vue +435 -0
  54. package/app/src/components/HelloWorld.vue +58 -0
  55. package/app/src/components/PageHeader/index.vue +158 -0
  56. package/app/src/components/Splitter/README.md +144 -0
  57. package/app/src/components/Splitter/example.vue +88 -0
  58. package/app/src/components/Splitter/index.vue +203 -0
  59. package/app/src/components/diagram/ToolBar.vue +357 -0
  60. package/app/src/components/diagram/customTranslate/customTranslate.js +12 -0
  61. package/app/src/components/diagram/customTranslate/translationsGerman.js +241 -0
  62. package/app/src/components/diagram/index.vue +261 -0
  63. package/app/src/components/diagram/xmlData.js +29 -0
  64. package/app/src/directives/filldown.js +155 -0
  65. package/app/src/directives/filldownTable.js +291 -0
  66. package/app/src/main.js +40 -0
  67. package/app/src/router/index.js +63 -0
  68. package/app/src/store/index.js +23 -0
  69. package/app/src/utils/winBox.js +23 -0
  70. package/app/src/views/Extend/A.vue +12 -0
  71. package/app/src/views/Extend/B.vue +10 -0
  72. package/app/src/views/Extend/MagicalComponentsForELFormItem.vue +87 -0
  73. package/app/src/views/Extend/index.vue +59 -0
  74. package/app/src/views/Extend/tableMouseHorizontalWheel.vue +193 -0
  75. package/app/src/views/Home.vue +37 -0
  76. package/app/src/views/RouterJump.vue +155 -0
  77. package/app/src/views/css.vue +57 -0
  78. package/app/src/views/cssComponents/EllipsisText.vue +83 -0
  79. package/app/src/views/cssComponents/HoverCard.vue +79 -0
  80. package/app/src/views/cssComponents/TableHover.vue +140 -0
  81. package/app/src/views/cssComponents/inputSlo.vue +52 -0
  82. package/app/src/views/cssComponents/tableFixed.vue +158 -0
  83. package/app/src/views/echarts/echart-dome.vue +82 -0
  84. package/app/src/views/echarts/index.vue +118 -0
  85. package/app/src/views/echarts/pei3d.vue +667 -0
  86. package/app/src/views/element/bpmn/index.vue +18 -0
  87. package/app/src/views/element/components/attendanceCycle/index.vue +131 -0
  88. package/app/src/views/element/components/attendanceGroup/index.vue +147 -0
  89. package/app/src/views/element/components/attendancePersonnel/index.vue +158 -0
  90. package/app/src/views/element/components/companyCalendar/index.vue +147 -0
  91. package/app/src/views/element/components/shift/index.vue +147 -0
  92. package/app/src/views/element/components/shiftRotationSystem/index.vue +147 -0
  93. package/app/src/views/element/elTableJsx/columnManagement.vue +340 -0
  94. package/app/src/views/element/elTableJsx/dialogInput.vue +71 -0
  95. package/app/src/views/element/elTableJsx/elTableJsx.vue +1826 -0
  96. package/app/src/views/element/elTableJsx/formTable.vue +598 -0
  97. package/app/src/views/element/elTableJsx/index.vue +29 -0
  98. package/app/src/views/element/elTableJsx/simpleTable.vue +192 -0
  99. package/app/src/views/element/elTableJsx.zip +0 -0
  100. package/app/src/views/element/index.vue +44 -0
  101. package/app/src/views/element/lazyCascader/LazyCascader.vue +302 -0
  102. package/app/src/views/element/lazyCascader/data.js +205 -0
  103. package/app/src/views/element/lazyCascader/index.vue +315 -0
  104. package/app/src/views/element/quillEditor/README.md +163 -0
  105. package/app/src/views/element/quillEditor/example.vue +314 -0
  106. package/app/src/views/element/quillEditor/index.vue +409 -0
  107. package/app/src/views/element/quillEditor/toolbar.js +122 -0
  108. package/app/vue.config.js +15 -0
  109. package/package.json +1 -1
  110. package/app/wujie-vue3-child/.claude/settings.local.json +0 -8
  111. package/app/wujie-vue3-child/.vscode/extensions.json +0 -3
  112. package/app/wujie-vue3-child/PROJECT_MEMORY.md +0 -427
  113. package/app/wujie-vue3-child/README.md +0 -5
  114. package/app/wujie-vue3-child/index.html +0 -13
  115. package/app/wujie-vue3-child/package-lock.json +0 -5744
  116. package/app/wujie-vue3-child/package.json +0 -28
  117. package/app/wujie-vue3-child/public/vite.svg +0 -1
  118. package/app/wujie-vue3-child/src/App.vue +0 -130
  119. package/app/wujie-vue3-child/src/assets/vue.svg +0 -1
  120. package/app/wujie-vue3-child/src/components/HelloWorld.vue +0 -43
  121. package/app/wujie-vue3-child/src/components/SmartAnchorTabs/index.jsx +0 -224
  122. package/app/wujie-vue3-child/src/components/SmartAnchorTabs/style.css +0 -154
  123. package/app/wujie-vue3-child/src/components/tags-view.vue +0 -193
  124. package/app/wujie-vue3-child/src/components/tags-view1.vue +0 -131
  125. package/app/wujie-vue3-child/src/directives/aiLoading.js +0 -182
  126. package/app/wujie-vue3-child/src/hooks/useClickOutside.js +0 -11
  127. package/app/wujie-vue3-child/src/hooks/useTableDragSort.js +0 -28
  128. package/app/wujie-vue3-child/src/main.js +0 -18
  129. package/app/wujie-vue3-child/src/router/index.js +0 -104
  130. package/app/wujie-vue3-child/src/store/tagsViewStroe.js +0 -34
  131. package/app/wujie-vue3-child/src/style.css +0 -171
  132. package/app/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.jsx +0 -108
  133. package/app/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.module.scss +0 -97
  134. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/README.md +0 -836
  135. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/REFLEX_EXAMPLES.md +0 -728
  136. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.jsx +0 -687
  137. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.module.scss +0 -560
  138. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.jsx +0 -570
  139. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.module.scss +0 -330
  140. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.jsx +0 -378
  141. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.module.scss +0 -228
  142. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.jsx +0 -399
  143. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.module.scss +0 -252
  144. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.jsx +0 -585
  145. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.module.scss +0 -331
  146. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.jsx +0 -392
  147. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.module.scss +0 -39
  148. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/README.md +0 -248
  149. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/SelectorTrigger.jsx +0 -194
  150. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/index.jsx +0 -1459
  151. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/mockData.js +0 -301
  152. package/app/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.jsx +0 -182
  153. package/app/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.module.scss +0 -28
  154. package/app/wujie-vue3-child/src/views/aiCoach/index.jsx +0 -375
  155. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.jsx +0 -121
  156. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.module.scss +0 -76
  157. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/DonutChart/index.jsx +0 -104
  158. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.jsx +0 -75
  159. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.module.scss +0 -12
  160. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.jsx +0 -62
  161. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.module.scss +0 -43
  162. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.jsx +0 -29
  163. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.module.scss +0 -5
  164. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.jsx +0 -58
  165. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.module.scss +0 -85
  166. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.jsx +0 -92
  167. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.module.scss +0 -56
  168. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.jsx +0 -40
  169. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.module.scss +0 -53
  170. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsDonut.jsx +0 -106
  171. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsRankBar.jsx +0 -132
  172. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.jsx +0 -176
  173. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.module.scss +0 -96
  174. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.jsx +0 -162
  175. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.module.scss +0 -16
  176. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.jsx +0 -29
  177. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.module.scss +0 -25
  178. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.jsx +0 -106
  179. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.module.scss +0 -164
  180. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.jsx +0 -182
  181. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.module.scss +0 -203
  182. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.jsx +0 -145
  183. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.module.scss +0 -126
  184. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.jsx +0 -67
  185. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.module.scss +0 -105
  186. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.jsx +0 -81
  187. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.module.scss +0 -47
  188. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.jsx +0 -64
  189. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.module.scss +0 -85
  190. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.jsx +0 -39
  191. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.module.scss +0 -44
  192. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.jsx +0 -83
  193. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.module.scss +0 -101
  194. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/index.jsx +0 -50
  195. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/index.module.scss +0 -25
  196. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/index.jsx +0 -196
  197. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/index.module.scss +0 -41
  198. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.jsx +0 -183
  199. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.module.scss +0 -115
  200. package/app/wujie-vue3-child/src/views/child-to-parent.vue +0 -117
  201. package/app/wujie-vue3-child/src/views/home.vue +0 -53
  202. package/app/wujie-vue3-child/src/views/jsx/btnSelect/btnSelect.vue +0 -169
  203. package/app/wujie-vue3-child/src/views/jsx/btnSelect/index.vue +0 -69
  204. package/app/wujie-vue3-child/src/views/jsx/com.vue +0 -44
  205. package/app/wujie-vue3-child/src/views/jsx/dialog.jsx +0 -66
  206. package/app/wujie-vue3-child/src/views/jsx/index.vue +0 -72
  207. package/app/wujie-vue3-child/src/views/jsx/props.vue +0 -33
  208. package/app/wujie-vue3-child/src/views/parent-to-child.vue +0 -225
  209. package/app/wujie-vue3-child/src/views/phone-code.vue +0 -318
  210. package/app/wujie-vue3-child/src/views/router-jump.vue +0 -123
  211. package/app/wujie-vue3-child/src/views/test.vue +0 -192
  212. package/app/wujie-vue3-child/vite.config.js +0 -15
@@ -0,0 +1,667 @@
1
+ <template>
2
+ <!-- 3D饼图容器组件 -->
3
+ <div class="pei3d-page">
4
+ <PageHeader
5
+ title="3D 饼图"
6
+ description="基于 ECharts 和 echarts-gl 实现的 3D 饼图组件,支持等高/不等高切换、旋转控制"
7
+ usage="&lt;pie3d :optionData=&quot;list&quot; id=&quot;1&quot; :isShowBtn=&quot;true&quot; /&gt; optionData 传入数据数组,isShowBtn 控制是否显示旋转按钮"
8
+ />
9
+ <div class="mff-main" style="position: relative;">
10
+ <div style="display: flex;
11
+ justify-content: center;
12
+ position: absolute;
13
+ z-index: 1;
14
+ left: 50%;
15
+ transform: translateX(-50%);
16
+ " v-if="isShowBtn">
17
+ <el-button
18
+ type="text"
19
+ size="small"
20
+ @click="toggleEqualHeight">{{ isEqualHeight ? "不等高" : "等高" }}</el-button>
21
+ <el-button
22
+ type="text"
23
+ size="small"
24
+ @click="toggleRotate">{{ isRotate ? '停止旋转' : '开始旋转' }}</el-button>
25
+ </div>
26
+ <!-- echarts图表容器 -->
27
+ <div style=" height: 100%;position: relative;">
28
+ <div class="mff-charts" :id="`mff-charts-${id}`"></div>
29
+ <div class="mff-charts" :id="`mff-charts-copy-${id}`" style="position: absolute;top: 0;height: 100%; width: 100%;"></div>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ </template>
34
+ <script>
35
+ // 引入echarts核心库
36
+ import * as echarts from "echarts";
37
+ // 引入echarts-gl插件以支持3D图表
38
+ import "echarts-gl";
39
+ import _ from "lodash";
40
+ import PageHeader from "@/components/PageHeader/index.vue";
41
+ /**
42
+ * @description 3D饼图组件
43
+ * 该组件基于echarts-gl实现了一个可交互的3D饼图
44
+ * 支持鼠标悬停高亮、点击选中等交互效果
45
+ */
46
+ export default {
47
+ name: "MffCharts",
48
+ components: {
49
+ PageHeader,
50
+ },
51
+ props: {
52
+ // 饼图数据
53
+ optionData: {
54
+ type: Array,
55
+ default: () => [],
56
+ },
57
+ id: {
58
+ type: String,
59
+ default: "",
60
+ required: true,
61
+ },
62
+ isShowBtn: {
63
+ type: Boolean,
64
+ default: true,
65
+ }
66
+ },
67
+ data() {
68
+ return {
69
+ // 控制所有扇区是否等高,true表示所有扇区高度相同
70
+ isEqualHeight: false,
71
+ // 是否旋转
72
+ isRotate: false,
73
+
74
+ };
75
+ },
76
+ mounted() {
77
+ // 组件挂载后初始化3D饼图
78
+ this.init();
79
+ },
80
+ methods: {
81
+
82
+ // 切换所有扇区是否等高
83
+ toggleEqualHeight() {
84
+ this.isEqualHeight = !this.isEqualHeight;
85
+ this.init(false);
86
+ },
87
+
88
+ // 切换是否旋转
89
+ toggleRotate() {
90
+ this.isRotate =!this.isRotate;
91
+ this.init(true);
92
+ },
93
+
94
+ /**
95
+ * @description 初始化3D饼图
96
+ * 创建echarts实例,生成3D饼图配置,添加标签引导线
97
+ */
98
+ init(isInit = false) {
99
+ console.log(1111);
100
+
101
+ // 初始化echarts实例
102
+ let myChart = echarts.init(
103
+ document.getElementById(`mff-charts-${this.id}`)
104
+ );
105
+ let myChartCopy = echarts.init(
106
+ document.getElementById(`mff-charts-copy-${this.id}`)
107
+ );
108
+ // 生成3D饼图配置,0.8为内部空心比例
109
+ this.option = this.getPie3D(this.optionData, 0.8);
110
+ this.optionCopy = this.getPie3D(this.optionData, 0.8);
111
+
112
+ // myChart.setOption(this.option,isInit);
113
+ // 添加透明2D饼图用于显示标签引导线
114
+ // 通过调整起始角度和方向使引导线与3D饼图对齐
115
+ const data = this.optionData.map((item) => {
116
+ return {
117
+ value: item.value,
118
+ name: item.name,
119
+ };
120
+ });
121
+ this.option.series.push({
122
+ name: "pie2d",
123
+ type: "pie",
124
+ itemStyle: {
125
+ // opacity: 0,
126
+ color: 'rgba(0,0,0,0)',
127
+ },
128
+ labelLine: {
129
+ show: !this.isRotate,
130
+ length: 20,
131
+ length2: 10,
132
+ },
133
+ label: {
134
+ show: true,
135
+ color: "#fff",
136
+ fontSize: 12,
137
+ rich: {
138
+ name: {
139
+ fontSize: 14,
140
+ fontWeight: 'bold',
141
+ padding: [0, 0, 5, 0]
142
+ },
143
+ value: {
144
+ fontSize: 12
145
+ },
146
+ percent: {
147
+ fontSize: 12,
148
+ color: '#42f59e'
149
+ }
150
+ },
151
+ formatter: function (params) {
152
+ return [
153
+ '{name|' + params.name + '}',
154
+ '{value|' + params.value + '}',
155
+ '{percent|' + params.percent + '%}'
156
+ ].join('\n');
157
+ }
158
+ },
159
+ startAngle: -40, //起始角度,支持范围[0, 360]。
160
+ clockwise: false, //饼图的扇区是否是顺时针排布。上述这两项配置主要是为了对齐3d的样式
161
+ radius: ["20%", "70%"],
162
+ center: ["50%", "50%"],
163
+ data,
164
+
165
+
166
+ });
167
+ this.optionCopy.series.push({
168
+ name: "pie2d",
169
+ type: "pie",
170
+ itemStyle: {
171
+ opacity: 0,
172
+ // color: 'rgba(0,0,0,0)',
173
+ },
174
+ labelLine: {
175
+ show: !this.isRotate,
176
+ length: 20,
177
+ length2: 10,
178
+ },
179
+ label: {
180
+ show: true,
181
+ color: "#fff",
182
+ fontSize: 12,
183
+ rich: {
184
+ name: {
185
+ fontSize: 14,
186
+ fontWeight: 'bold',
187
+ padding: [0, 0, 5, 0]
188
+ },
189
+ value: {
190
+ fontSize: 12
191
+ },
192
+ percent: {
193
+ fontSize: 12,
194
+ color: '#42f59e'
195
+ }
196
+ },
197
+ formatter: function (params) {
198
+ return [
199
+ '{name|' + params.name + '}',
200
+ '{value|' + params.value + '}',
201
+ '{percent|' + params.percent + '%}'
202
+ ].join('\n');
203
+ }
204
+ },
205
+ startAngle: -40, //起始角度,支持范围[0, 360]。
206
+ clockwise: false, //饼图的扇区是否是顺时针排布。上述这两项配置主要是为了对齐3d的样式
207
+ radius: ["20%", "70%"],
208
+ center: ["50%", "50%"],
209
+ data,
210
+
211
+ })
212
+ myChart.setOption(this.option, isInit);
213
+ myChartCopy.setOption(this.optionCopy, isInit);
214
+ this.bindListen(myChart);
215
+ this.bindListen(myChartCopy);
216
+ },
217
+
218
+ /**
219
+ * @description 生成3D饼图的配置项
220
+ * @param {Array} pieData 饼图数据数组
221
+ * @param {number} internalDiameterRatio 内部空心占比(0-1)
222
+ * @returns {Object} echarts配置项
223
+ */
224
+ getPie3D(pieData, internalDiameterRatio) {
225
+ //internalDiameterRatio:透明的空心占比
226
+ let that = this;
227
+ let series = [];
228
+ let sumValue = 0;
229
+ let startValue = 0;
230
+ let endValue = 0;
231
+ let legendData = [];
232
+ let legendBfb = [];
233
+ let k = 1 - internalDiameterRatio;
234
+ pieData.sort((a, b) => {
235
+ return b.value - a.value;
236
+ });
237
+ // 为每一个饼图数据,生成一个 series-surface 配置
238
+ for (let i = 0; i < pieData.length; i++) {
239
+ sumValue += pieData[i].value;
240
+ let seriesItem = {
241
+ name:
242
+ typeof pieData[i].name === "undefined"
243
+ ? `series${i}`
244
+ : pieData[i].name,
245
+ type: "surface",
246
+ parametric: true,
247
+ wireframe: {
248
+ show: false,
249
+ },
250
+ pieData: pieData[i],
251
+ pieStatus: {
252
+ selected: false,
253
+ hovered: false,
254
+ k: k,
255
+ },
256
+ center: ["10%", "50%"],
257
+ };
258
+
259
+ if (typeof pieData[i].itemStyle != "undefined") {
260
+ let itemStyle = {};
261
+ typeof pieData[i].itemStyle.color != "undefined"
262
+ ? (itemStyle.color = pieData[i].itemStyle.color)
263
+ : null;
264
+ typeof pieData[i].itemStyle.opacity != "undefined"
265
+ ? (itemStyle.opacity = pieData[i].itemStyle.opacity)
266
+ : null;
267
+ seriesItem.itemStyle = itemStyle;
268
+ }
269
+ series.push(seriesItem);
270
+ }
271
+
272
+ // 使用上一次遍历时,计算出的数据和 sumValue,调用 getParametricEquation 函数,
273
+ // 向每个 series-surface 传入不同的参数方程 series-surface.parametricEquation,也就是实现每一个扇形。
274
+ legendData = [];
275
+ legendBfb = [];
276
+ for (let i = 0; i < series.length; i++) {
277
+ endValue = startValue + series[i].pieData.value;
278
+ series[i].pieData.startRatio = startValue / sumValue;
279
+ series[i].pieData.endRatio = endValue / sumValue;
280
+ series[i].parametricEquation = this.getParametricEquation(
281
+ series[i].pieData.startRatio,
282
+ series[i].pieData.endRatio,
283
+ false,
284
+ false,
285
+ k,
286
+ series[i].pieData.value
287
+ );
288
+ startValue = endValue;
289
+ let bfb = that.fomatFloat(series[i].pieData.value / sumValue, 4);
290
+ legendData.push({
291
+ name: series[i].name,
292
+ value: bfb,
293
+ });
294
+ legendBfb.push({
295
+ name: series[i].name,
296
+ value: bfb,
297
+ });
298
+ }
299
+ let boxHeight = this.getHeight3D(series, 26);
300
+ //通过传参设定3d饼/环的高度,26代表26px
301
+ // 准备待返回的配置项,把准备好的 legendData、series 传入。
302
+ let option = {
303
+ legend: {
304
+ show: false,
305
+ },
306
+ labelLine: {
307
+ show: false,
308
+ },
309
+
310
+ tooltip: {
311
+ formatter: (params) => {
312
+ if (
313
+ params.seriesName !== "mouseoutSeries" &&
314
+ params.seriesName !== "pie2d"
315
+ ) {
316
+ let bfb = (
317
+ (option.series[params.seriesIndex].pieData.endRatio -
318
+ option.series[params.seriesIndex].pieData.startRatio) *
319
+ 100
320
+ ).toFixed(2);
321
+ return (
322
+ `${params.seriesName}<br/>` +
323
+ `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${params.color};"></span>` +
324
+ this.formatNumberWithCommas(option.series[params.seriesIndex].pieData.value)
325
+ );
326
+ }
327
+ },
328
+ },
329
+ xAxis3D: {
330
+ min: -1,
331
+ max: 1,
332
+ },
333
+ yAxis3D: {
334
+ min: -1,
335
+ max: 1,
336
+ },
337
+ zAxis3D: {
338
+ min: -1,
339
+ max: 2,
340
+ },
341
+ grid3D: {
342
+ show: false,
343
+ boxHeight: boxHeight, //圆环的高度
344
+ viewControl: {
345
+ //3d效果可以放大、旋转等,请自己去查看官方配置
346
+ alpha: 44, //角度
347
+ distance: 190, //调整视角到主体的距离,类似调整zoom
348
+ rotateSensitivity: 0, //设置为0无法旋转
349
+ zoomSensitivity: 0, //设置为0无法缩放
350
+ panSensitivity: 0, //设置为0无法平移
351
+ autoRotate: this.isRotate, //自动旋转
352
+ },
353
+ },
354
+ series: series,
355
+ };
356
+ return option;
357
+ },
358
+
359
+ //获取3d丙图的最高扇区的高度
360
+ /**
361
+ * @description 计算3D饼图的高度
362
+ * @param {Array} series 系列数据
363
+ * @param {number} height 基础高度
364
+ * @returns {number} 计算后的高度
365
+ */
366
+ getHeight3D(series, height) {
367
+ // if(this.isEqualHeight) return height * 3;
368
+ series.sort((a, b) => {
369
+ return b.pieData.value - a.pieData.value;
370
+ });
371
+ return (height * 25) / series[0].pieData.value;
372
+ },
373
+
374
+ // 生成扇形的曲面参数方程,用于 series-surface.parametricEquation
375
+ /**
376
+ * @description 生成3D扇形的参数方程
377
+ * @param {number} startRatio 起始比例
378
+ * @param {number} endRatio 结束比例
379
+ * @param {boolean} isSelected 是否被选中
380
+ * @param {boolean} isHovered 是否被悬停
381
+ * @param {number} k 内外径比例
382
+ * @param {number} h 高度
383
+ * @returns {Object} 参数方程对象
384
+ */
385
+ getParametricEquation(startRatio, endRatio, isSelected, isHovered, k, h) {
386
+ if (this.isEqualHeight) {
387
+ if(this.id === "1") {
388
+ h = 20000;
389
+ }
390
+ if(this.id === "2") {
391
+ h = 1500;
392
+ }
393
+ // // 添加缩放因子,使大数值的柱子间距更合理
394
+ }
395
+ k = k * 1.3;
396
+
397
+ // 计算
398
+ let midRatio = (startRatio + endRatio) / 2;
399
+ let startRadian = startRatio * Math.PI * 2;
400
+ let endRadian = endRatio * Math.PI * 2;
401
+ let midRadian = midRatio * Math.PI * 2;
402
+ // 如果只有一个扇形,则不实现选中效果。
403
+ if (startRatio === 0 && endRatio === 1) {
404
+ isSelected = false;
405
+ }
406
+ // 通过扇形内径/外径的值,换算出辅助参数 k(默认值 1/3)
407
+ k = typeof k !== "undefined" ? k : 1 / 3;
408
+ // 计算选中效果分别在 x 轴、y 轴方向上的位移(未选中,则位移均为 0)
409
+ let offsetX = isSelected ? Math.cos(midRadian) * 0.1 : 0;
410
+ let offsetY = isSelected ? Math.sin(midRadian) * 0.1 : 0;
411
+ // 计算高亮效果的放大比例(未高亮,则比例为 1)
412
+ let hoverRate = isHovered ? 1.05 : 1;
413
+ // 返回曲面参数方程
414
+ return {
415
+ u: {
416
+ min: -Math.PI,
417
+ max: Math.PI * 3,
418
+ step: Math.PI / 32,
419
+ },
420
+ v: {
421
+ min: 0,
422
+ max: Math.PI * 2,
423
+ step: Math.PI / 20,
424
+ },
425
+ x: function (u, v) {
426
+ if (u < startRadian) {
427
+ return (
428
+ offsetX +
429
+ Math.cos(startRadian) * (1 + Math.cos(v) * k) * hoverRate
430
+ );
431
+ }
432
+ if (u > endRadian) {
433
+ return (
434
+ offsetX + Math.cos(endRadian) * (1 + Math.cos(v) * k) * hoverRate
435
+ );
436
+ }
437
+ return offsetX + Math.cos(u) * (1 + Math.cos(v) * k) * hoverRate;
438
+ },
439
+ y: function (u, v) {
440
+ if (u < startRadian) {
441
+ return (
442
+ offsetY +
443
+ Math.sin(startRadian) * (1 + Math.cos(v) * k) * hoverRate
444
+ );
445
+ }
446
+ if (u > endRadian) {
447
+ return (
448
+ offsetY + Math.sin(endRadian) * (1 + Math.cos(v) * k) * hoverRate
449
+ );
450
+ }
451
+ return offsetY + Math.sin(u) * (1 + Math.cos(v) * k) * hoverRate;
452
+ },
453
+ z: function (u, v) {
454
+ if (u < -Math.PI * 0.5) {
455
+ return Math.sin(u);
456
+ }
457
+ if (u > Math.PI * 2.5) {
458
+ return Math.sin(u) * h * 0.1;
459
+ }
460
+ return Math.sin(v) > 0 ? 1 * h * 0.1 : -1;
461
+ },
462
+ };
463
+ },
464
+
465
+ /**
466
+ * @description 格式化浮点数
467
+ * @param {number} num 需要格式化的数字
468
+ * @param {number} n 保留小数位数
469
+ * @returns {string} 格式化后的字符串
470
+ */
471
+ fomatFloat(num, n) {
472
+ var f = parseFloat(num);
473
+ if (isNaN(f)) {
474
+ return false;
475
+ }
476
+ f = Math.round(num * Math.pow(10, n)) / Math.pow(10, n); // n 幂
477
+ var s = f.toString();
478
+ var rs = s.indexOf(".");
479
+ //判定如果是整数,增加小数点再补0
480
+ if (rs < 0) {
481
+ rs = s.length;
482
+ s += ".";
483
+ }
484
+ while (s.length <= rs + n) {
485
+ s += "0";
486
+ }
487
+ return s;
488
+ },
489
+
490
+ /**
491
+ * @description 绑定图表交互事件
492
+ * @param {Object} myChart echarts实例
493
+ * 实现饼图的选中效果(单选)和高亮(放大)效果
494
+ */
495
+ bindListen(myChart) {
496
+ // // 监听鼠标事件,实现饼图选中效果(单选),近似实现高亮(放大)效果。
497
+ // let that = this;
498
+ // let selectedIndex = "";
499
+ // let hoveredIndex = "";
500
+ // 监听点击事件,实现选中效果(单选)
501
+ myChart.on("click", function (params) {
502
+ console.log('click');
503
+
504
+ return
505
+ // 从 option.series 中读取重新渲染扇形所需的参数,将是否选中取反。
506
+ let isSelected =
507
+ !that.option.series[params.seriesIndex].pieStatus.selected;
508
+ let isHovered =
509
+ that.option.series[params.seriesIndex].pieStatus.hovered;
510
+ let k = that.option.series[params.seriesIndex].pieStatus.k;
511
+ let startRatio =
512
+ that.option.series[params.seriesIndex].pieData.startRatio;
513
+ let endRatio = that.option.series[params.seriesIndex].pieData.endRatio;
514
+ // 如果之前选中过其他扇形,将其取消选中(对 option 更新)
515
+ if (selectedIndex !== "" && selectedIndex !== params.seriesIndex) {
516
+ that.option.series[selectedIndex].parametricEquation =
517
+ that.getParametricEquation(
518
+ that.option.series[selectedIndex].pieData.startRatio,
519
+ that.option.series[selectedIndex].pieData.endRatio,
520
+ false,
521
+ false,
522
+ k,
523
+ that.option.series[selectedIndex].pieData.value
524
+ );
525
+ that.option.series[selectedIndex].pieStatus.selected = false;
526
+ }
527
+ // 对当前点击的扇形,执行选中/取消选中操作(对 option 更新)
528
+ that.option.series[params.seriesIndex].parametricEquation =
529
+ that.getParametricEquation(
530
+ startRatio,
531
+ endRatio,
532
+ isSelected,
533
+ isHovered,
534
+ k,
535
+ that.option.series[params.seriesIndex].pieData.value
536
+ );
537
+ that.option.series[params.seriesIndex].pieStatus.selected = isSelected;
538
+ // 如果本次是选中操作,记录上次选中的扇形对应的系列号 seriesIndex
539
+ isSelected ? (selectedIndex = params.seriesIndex) : null;
540
+ // 使用更新后的 option,渲染图表
541
+ myChart.setOption(that.option);
542
+ });
543
+
544
+ return
545
+ // 监听 mouseover,近似实现高亮(放大)效果
546
+ myChart.on("mouseover", function (params) {
547
+ // 准备重新渲染扇形所需的参数
548
+ let isSelected;
549
+ let isHovered;
550
+ let startRatio;
551
+ let endRatio;
552
+ let k;
553
+ // 如果触发 mouseover 的扇形当前已高亮,则不做操作
554
+ if (hoveredIndex === params.seriesIndex) {
555
+ return;
556
+ // 否则进行高亮及必要的取消高亮操作
557
+ } else {
558
+ // 如果当前有高亮的扇形,取消其高亮状态(对 option 更新)
559
+ if (hoveredIndex !== "") {
560
+ // 从 option.series 中读取重新渲染扇形所需的参数,将是否高亮设置为 false。
561
+ isSelected = that.option.series[hoveredIndex].pieStatus.selected;
562
+ isHovered = false;
563
+ startRatio = that.option.series[hoveredIndex].pieData.startRatio;
564
+ endRatio = that.option.series[hoveredIndex].pieData.endRatio;
565
+ k = that.option.series[hoveredIndex].pieStatus.k;
566
+ // 对当前点击的扇形,执行取消高亮操作(对 option 更新)
567
+ that.option.series[hoveredIndex].parametricEquation =
568
+ that.getParametricEquation(
569
+ startRatio,
570
+ endRatio,
571
+ isSelected,
572
+ isHovered,
573
+ k,
574
+ that.option.series[hoveredIndex].pieData.value
575
+ );
576
+ that.option.series[hoveredIndex].pieStatus.hovered = isHovered;
577
+ // 将此前记录的上次选中的扇形对应的系列号 seriesIndex 清空
578
+ hoveredIndex = "";
579
+ }
580
+ // 如果触发 mouseover 的扇形不是透明圆环,将其高亮(对 option 更新)
581
+ if (
582
+ params.seriesName !== "mouseoutSeries" &&
583
+ params.seriesName !== "pie2d"
584
+ ) {
585
+ // 从 option.series 中读取重新渲染扇形所需的参数,将是否高亮设置为 true。
586
+ isSelected =
587
+ that.option.series[params.seriesIndex].pieStatus.selected;
588
+ isHovered = true;
589
+ startRatio =
590
+ that.option.series[params.seriesIndex].pieData.startRatio;
591
+ endRatio = that.option.series[params.seriesIndex].pieData.endRatio;
592
+ k = that.option.series[params.seriesIndex].pieStatus.k;
593
+ // 对当前点击的扇形,执行高亮操作(对 option 更新)
594
+ that.option.series[params.seriesIndex].parametricEquation =
595
+ that.getParametricEquation(
596
+ startRatio,
597
+ endRatio,
598
+ isSelected,
599
+ isHovered,
600
+ k,
601
+ that.option.series[params.seriesIndex].pieData.value + 5
602
+ );
603
+ that.option.series[params.seriesIndex].pieStatus.hovered =
604
+ isHovered;
605
+ // 记录上次高亮的扇形对应的系列号 seriesIndex
606
+ hoveredIndex = params.seriesIndex;
607
+ }
608
+ // 使用更新后的 option,渲染图表
609
+ myChart.setOption(that.option);
610
+ }
611
+ });
612
+ // 修正取消高亮失败的 bug
613
+ myChart.on("globalout", function () {
614
+ // 准备重新渲染扇形所需的参数
615
+ let isSelected;
616
+ let isHovered;
617
+ let startRatio;
618
+ let endRatio;
619
+ let k;
620
+ if (hoveredIndex !== "") {
621
+ // 从 option.series 中读取重新渲染扇形所需的参数,将是否高亮设置为 true。
622
+ isSelected = that.option.series[hoveredIndex].pieStatus.selected;
623
+ isHovered = false;
624
+ k = that.option.series[hoveredIndex].pieStatus.k;
625
+ startRatio = that.option.series[hoveredIndex].pieData.startRatio;
626
+ endRatio = that.option.series[hoveredIndex].pieData.endRatio;
627
+ // 对当前点击的扇形,执行取消高亮操作(对 option 更新)
628
+ that.option.series[hoveredIndex].parametricEquation =
629
+ that.getParametricEquation(
630
+ startRatio,
631
+ endRatio,
632
+ isSelected,
633
+ isHovered,
634
+ k,
635
+ that.option.series[hoveredIndex].pieData.value
636
+ );
637
+ that.option.series[hoveredIndex].pieStatus.hovered = isHovered;
638
+ // 将此前记录的上次选中的扇形对应的系列号 seriesIndex 清空
639
+ hoveredIndex = "";
640
+ }
641
+ // 使用更新后的 option,渲染图表
642
+ myChart.setOption(that.option);
643
+ });
644
+ },
645
+
646
+ formatNumberWithCommas(num) {
647
+ return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
648
+ }
649
+ },
650
+ };
651
+ </script>
652
+
653
+ <style scoped>
654
+ .pei3d-page {
655
+ width: 100%;
656
+ height: 100%;
657
+ }
658
+ .mff-main {
659
+ width: 100%;
660
+ height: 100%;
661
+ background-color: #000a3b;
662
+ }
663
+ .mff-charts {
664
+ width: 100%;
665
+ height: 100%;
666
+ }
667
+ </style>
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <div>
3
+ <PageHeader title="BPMN 工作流编辑器" description="基于 bpmn-js 的可视化流程设计工具,支持拖拽元素、属性编辑、XML 源码编辑,集成小地图和中文汉化界面" usage="从左侧工具栏拖拽 BPMN 元素到画布 → 点击元素在右侧编辑属性 → 底部切换 Diagram/XML 视图 → XML 视图可直接编辑源码" />
4
+ <Diagram class="home" />
5
+ </div>
6
+ </template>
7
+
8
+ <script>
9
+ import Diagram from '@/components/diagram'
10
+ import PageHeader from '@/components/PageHeader/index.vue'
11
+
12
+ export default {
13
+ components: {
14
+ Diagram,
15
+ PageHeader
16
+ }
17
+ }
18
+ </script>