npmapps 1.0.24 → 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 (210) 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/tags-view.vue +0 -193
  122. package/app/wujie-vue3-child/src/components/tags-view1.vue +0 -131
  123. package/app/wujie-vue3-child/src/directives/aiLoading.js +0 -182
  124. package/app/wujie-vue3-child/src/hooks/useClickOutside.js +0 -11
  125. package/app/wujie-vue3-child/src/hooks/useTableDragSort.js +0 -28
  126. package/app/wujie-vue3-child/src/main.js +0 -18
  127. package/app/wujie-vue3-child/src/router/index.js +0 -104
  128. package/app/wujie-vue3-child/src/store/tagsViewStroe.js +0 -34
  129. package/app/wujie-vue3-child/src/style.css +0 -171
  130. package/app/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.jsx +0 -108
  131. package/app/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.module.scss +0 -97
  132. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/README.md +0 -836
  133. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/REFLEX_EXAMPLES.md +0 -728
  134. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.jsx +0 -687
  135. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.module.scss +0 -560
  136. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.jsx +0 -570
  137. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.module.scss +0 -330
  138. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.jsx +0 -378
  139. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.module.scss +0 -228
  140. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.jsx +0 -399
  141. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.module.scss +0 -252
  142. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.jsx +0 -585
  143. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.module.scss +0 -331
  144. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.jsx +0 -392
  145. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.module.scss +0 -39
  146. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/README.md +0 -248
  147. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/SelectorTrigger.jsx +0 -194
  148. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/index.jsx +0 -1459
  149. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/mockData.js +0 -301
  150. package/app/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.jsx +0 -182
  151. package/app/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.module.scss +0 -28
  152. package/app/wujie-vue3-child/src/views/aiCoach/index.jsx +0 -293
  153. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.jsx +0 -121
  154. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.module.scss +0 -76
  155. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/DonutChart/index.jsx +0 -104
  156. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.jsx +0 -75
  157. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.module.scss +0 -12
  158. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.jsx +0 -62
  159. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.module.scss +0 -43
  160. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.jsx +0 -29
  161. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.module.scss +0 -5
  162. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.jsx +0 -58
  163. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.module.scss +0 -85
  164. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.jsx +0 -92
  165. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.module.scss +0 -56
  166. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.jsx +0 -40
  167. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.module.scss +0 -53
  168. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsDonut.jsx +0 -106
  169. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsRankBar.jsx +0 -132
  170. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.jsx +0 -176
  171. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.module.scss +0 -96
  172. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.jsx +0 -162
  173. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.module.scss +0 -16
  174. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.jsx +0 -29
  175. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.module.scss +0 -25
  176. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.jsx +0 -106
  177. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.module.scss +0 -164
  178. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.jsx +0 -182
  179. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.module.scss +0 -203
  180. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.jsx +0 -145
  181. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.module.scss +0 -126
  182. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.jsx +0 -67
  183. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.module.scss +0 -105
  184. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.jsx +0 -81
  185. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.module.scss +0 -47
  186. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.jsx +0 -64
  187. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.module.scss +0 -85
  188. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.jsx +0 -39
  189. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.module.scss +0 -44
  190. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.jsx +0 -83
  191. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.module.scss +0 -101
  192. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/index.jsx +0 -50
  193. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/index.module.scss +0 -25
  194. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/index.jsx +0 -196
  195. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/index.module.scss +0 -41
  196. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.jsx +0 -183
  197. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.module.scss +0 -115
  198. package/app/wujie-vue3-child/src/views/child-to-parent.vue +0 -117
  199. package/app/wujie-vue3-child/src/views/home.vue +0 -53
  200. package/app/wujie-vue3-child/src/views/jsx/btnSelect/btnSelect.vue +0 -169
  201. package/app/wujie-vue3-child/src/views/jsx/btnSelect/index.vue +0 -69
  202. package/app/wujie-vue3-child/src/views/jsx/com.vue +0 -44
  203. package/app/wujie-vue3-child/src/views/jsx/dialog.jsx +0 -66
  204. package/app/wujie-vue3-child/src/views/jsx/index.vue +0 -72
  205. package/app/wujie-vue3-child/src/views/jsx/props.vue +0 -33
  206. package/app/wujie-vue3-child/src/views/parent-to-child.vue +0 -225
  207. package/app/wujie-vue3-child/src/views/phone-code.vue +0 -318
  208. package/app/wujie-vue3-child/src/views/router-jump.vue +0 -123
  209. package/app/wujie-vue3-child/src/views/test.vue +0 -192
  210. package/app/wujie-vue3-child/vite.config.js +0 -15
@@ -1,293 +0,0 @@
1
- import { defineComponent, ref } from 'vue'
2
- import DialogueSegment from './dialogueSegment/index.jsx'
3
- import PracticeStatus from './practiceStatus/index.jsx'
4
- import ReportDetail from './reportDetail/index.jsx'
5
- import DepartmentPersonnel from './departmentPersonnel/index.jsx'
6
- import { aiLoading } from '../../directives/aiLoading'
7
-
8
- export default defineComponent({
9
- // 智能教练
10
- name: 'AiCoach',
11
-
12
- setup() {
13
- const activeTab = ref('dialogue-segment')
14
- const aiLoadingTab = ref('directive-usage')
15
-
16
- // v-aiLoading 指令演示用状态:
17
- // simpleLoading:基础布尔用法 v-aiLoading="loading"
18
- // advancedLoading:对象用法 v-aiLoading="{ loading, text, class }"
19
- const simpleLoading = ref(false)
20
- const advancedLoading = ref(false)
21
-
22
- const toggleSimpleLoading = () => {
23
- simpleLoading.value = !simpleLoading.value
24
- }
25
-
26
- const toggleAdvancedLoading = () => {
27
- advancedLoading.value = !advancedLoading.value
28
- }
29
-
30
- const functionDemoTargetRef = ref(null)
31
- const functionDemoLoading = ref(false)
32
- let functionDemoStop = null
33
-
34
- const triggerFunctionDemo = () => {
35
- if (functionDemoLoading.value) {
36
- if (functionDemoStop) {
37
- functionDemoStop()
38
- }
39
- functionDemoLoading.value = false
40
- functionDemoStop = null
41
- return
42
- }
43
- if (!functionDemoTargetRef.value) return
44
- functionDemoLoading.value = true
45
- const { stop } = aiLoading(functionDemoTargetRef, {
46
- text: 'AI生成中...',
47
- loaderType: 'ring',
48
- gradient: true,
49
- borderColor: '#409eff'
50
- })
51
- functionDemoStop = stop
52
- setTimeout(() => {
53
- if (functionDemoStop) {
54
- functionDemoStop()
55
- functionDemoStop = null
56
- }
57
- functionDemoLoading.value = false
58
- }, 1500)
59
- }
60
-
61
- return () => {
62
- return <div style={{ padding: '30px' }}>
63
- <el-tabs v-model={activeTab.value} type="border-card">
64
- <el-tab-pane label="对话环节" name="dialogue-segment">
65
- <DialogueSegment />
66
- </el-tab-pane>
67
- <el-tab-pane label="练习情况" name="practice-status">
68
- <PracticeStatus />
69
- </el-tab-pane>
70
- <el-tab-pane label="报告详情" name="report-detail">
71
- <ReportDetail />
72
- </el-tab-pane>
73
- <el-tab-pane label="部门人员" name="department-personnel">
74
- <DepartmentPersonnel />
75
- </el-tab-pane>
76
- <el-tab-pane label="AI Loading 用例" name="ai-loading-examples">
77
- <div style={{ padding: '16px 0' }}>
78
- <el-tabs v-model={aiLoadingTab.value} type="card">
79
- <el-tab-pane label="指令用法" name="directive-usage">
80
- <div style={{ display: 'flex', gap: '24px' }}>
81
- <div style={{ flex: 1 }}>
82
- <h3 style={{ margin: 0, marginBottom: '8px' }}>基础用法:v-aiLoading="loading"</h3>
83
- <p style={{ margin: 0, marginBottom: '12px', color: '#666', fontSize: '13px' }}>
84
- 通过布尔变量控制是否显示 AI Loading 遮罩。
85
- </p>
86
- <el-button type="primary" onClick={toggleSimpleLoading}>
87
- {simpleLoading.value ? '结束加载' : '开始加载'}
88
- </el-button>
89
- <div
90
- v-ai-loading={simpleLoading.value}
91
- style={{
92
- marginTop: '16px',
93
- padding: '16px',
94
- border: '1px solid #ebeef5',
95
- borderRadius: '4px',
96
- minHeight: '80px'
97
- }}
98
- >
99
- 当 loading 为 true 时,这个区域上会显示 AI Loading 遮罩。
100
- </div>
101
- <pre
102
- style={{
103
- marginTop: '16px',
104
- fontSize: '12px',
105
- background: '#f9fafb',
106
- padding: '12px',
107
- borderRadius: '4px',
108
- whiteSpace: 'pre-wrap'
109
- }}
110
- >
111
- {`<div v-aiLoading="loading">
112
- 内容区域
113
- </div>`}
114
- </pre>
115
- </div>
116
- <div style={{ flex: 1 }}>
117
- <h3 style={{ margin: 0, marginBottom: '8px' }}>高级用法:对象参数</h3>
118
- <p style={{ margin: 0, marginBottom: '12px', color: '#666', fontSize: '13px' }}>
119
- 通过对象同时配置 loading、提示文案 text、loader 样式、边框颜色和渐变背景。
120
- </p>
121
- <el-button type="primary" onClick={toggleAdvancedLoading}>
122
- {advancedLoading.value ? '结束加载' : '开始加载'}
123
- </el-button>
124
- <div
125
- class={['ai-loading-demo-card', advancedLoading.value ? 'ai-loading-demo-card--active' : '']}
126
- v-ai-loading={{
127
- loading: advancedLoading.value,
128
- text: 'AI智能生成中...',
129
- loaderType: 'ring',
130
- gradient: true,
131
- borderColor: '#ff7e67'
132
- }}
133
- style={{
134
- marginTop: '16px',
135
- padding: '16px',
136
- border: '1px solid #ebeef5',
137
- borderRadius: '4px',
138
- minHeight: '80px'
139
- }}
140
- >
141
- 使用对象形式,可以自定义文案、圆环边框颜色和淡色渐变背景。
142
- </div>
143
- <pre
144
- style={{
145
- marginTop: '16px',
146
- fontSize: '12px',
147
- background: '#f9fafb',
148
- padding: '12px',
149
- borderRadius: '4px',
150
- whiteSpace: 'pre-wrap'
151
- }}
152
- >
153
- {`<!-- 条形 loading + 默认渐变背景 -->
154
- <div v-aiLoading="{ loading }"></div>
155
-
156
- <!-- 圆环 loading,带有有色边框并旋转 -->
157
- <div
158
- v-aiLoading="{ loading: loading, loaderType: 'ring', borderColor: '#ff7e67' }"
159
- ></div>
160
-
161
- <!-- 圆环 loading + 自定义文案 + 动态渐变背景 -->
162
- <div
163
- v-aiLoading="{
164
- loading: loading,
165
- text: 'AI智能生成中...',
166
- loaderType: 'ring',
167
- gradient: true,
168
- borderColor: '#ff7e67'
169
- }"
170
- ></div>`}
171
- </pre>
172
- </div>
173
- </div>
174
- </el-tab-pane>
175
- <el-tab-pane label="函数式用法" name="function-usage">
176
- <div style={{ display: 'flex', gap: '24px' }}>
177
- <div style={{ flex: 1 }}>
178
- <h3 style={{ margin: 0, marginBottom: '8px' }}>基础函数式调用</h3>
179
- <p style={{ margin: 0, marginBottom: '12px', color: '#666', fontSize: '13px' }}>
180
- 通过 aiLoading(target, options) 手动控制某个区域的 AI Loading 开启和关闭。
181
- </p>
182
- <el-button type="primary" onClick={triggerFunctionDemo}>
183
- {functionDemoLoading.value ? '结束加载' : '开始加载'}
184
- </el-button>
185
- <div
186
- ref={functionDemoTargetRef}
187
- style={{
188
- marginTop: '16px',
189
- padding: '16px',
190
- border: '1px dashed #dcdfe6',
191
- borderRadius: '4px',
192
- minHeight: '80px'
193
- }}
194
- >
195
- 这是函数式调用示例绑定的区域。
196
- </div>
197
- </div>
198
- <div style={{ flex: 1 }}>
199
- <h3 style={{ margin: 0, marginBottom: '8px' }}>函数式用法示例代码</h3>
200
- <pre
201
- style={{
202
- marginTop: '16px',
203
- fontSize: '12px',
204
- background: '#f9fafb',
205
- padding: '12px',
206
- borderRadius: '4px',
207
- whiteSpace: 'pre-wrap'
208
- }}
209
- >
210
- {`import { ref } from 'vue'
211
- import { aiLoading } from '@/directives/aiLoading'
212
-
213
- const targetRef = ref(null)
214
- let stopLoading = null
215
-
216
- const start = () => {
217
- if (stopLoading) {
218
- stopLoading()
219
- stopLoading = null
220
- return
221
- }
222
- const { stop } = aiLoading(targetRef, {
223
- text: 'AI生成中...',
224
- loaderType: 'ring',
225
- gradient: true,
226
- borderColor: '#409eff'
227
- })
228
- stopLoading = stop
229
- }`}</pre>
230
- </div>
231
- </div>
232
- </el-tab-pane>
233
- <el-tab-pane label="全局配置" name="global-config">
234
- <div style={{ display: 'flex', gap: '24px' }}>
235
- <div style={{ flex: 1 }}>
236
- <h3 style={{ margin: 0, marginBottom: '8px' }}>入口注册</h3>
237
- <p style={{ margin: 0, marginBottom: '12px', color: '#666', fontSize: '13px' }}>
238
- 在 main.js 中全局注册 v-aiLoading 指令和样式文件后,即可在任意页面使用。
239
- </p>
240
- <pre
241
- style={{
242
- marginTop: '16px',
243
- fontSize: '12px',
244
- background: '#f9fafb',
245
- padding: '12px',
246
- borderRadius: '4px',
247
- whiteSpace: 'pre-wrap'
248
- }}
249
- >
250
- {`import { createApp } from 'vue'
251
- import App from './App.vue'
252
- import './style.css'
253
- import { aiLoadingDirective } from './directives/aiLoading'
254
-
255
- const app = createApp(App)
256
-
257
- app.directive('aiLoading', aiLoadingDirective)
258
-
259
- app.mount('#app')`}</pre>
260
- </div>
261
- <div style={{ flex: 1 }}>
262
- <h3 style={{ margin: 0, marginBottom: '8px' }}>可配置选项总览</h3>
263
- <pre
264
- style={{
265
- marginTop: '16px',
266
- fontSize: '12px',
267
- background: '#f9fafb',
268
- padding: '12px',
269
- borderRadius: '4px',
270
- whiteSpace: 'pre-wrap'
271
- }}
272
- >
273
- {`// 指令和函数式 options 一致:
274
- // {
275
- // loading: boolean, // 指令必填,函数式内部自动填 true/false
276
- // text?: string, // 提示文案,默认 'AI生成中'
277
- // loaderType?: 'bars' | 'ring', // 条形 / 圆环
278
- // gradient?: boolean | string, // true: 默认渐变; false: 纯白;
279
- // // string: 自定义渐变背景
280
- // borderColor?: string, // 圆环边框颜色
281
- // class?: string // 自定义遮罩 class
282
- // }`}</pre>
283
- </div>
284
- </div>
285
- </el-tab-pane>
286
- </el-tabs>
287
- </div>
288
- </el-tab-pane>
289
- </el-tabs>
290
- </div>
291
- }
292
- },
293
- })
@@ -1,121 +0,0 @@
1
- import { defineComponent, ref } from 'vue'
2
- import styles from './index.module.scss'
3
- import DonutChart from '../DonutChart'
4
- import RankBarChart from '../RankBarChart'
5
- import EchartsDonut from '../echarts/EchartsDonut.jsx'
6
- import EchartsRankBar from '../echarts/EchartsRankBar.jsx'
7
-
8
- /**
9
- * 练习情况统计(3个面板)
10
- * - 左:进度统计(环形图 + 图例)
11
- * - 中:学员练习时长排名(条形排行)
12
- * - 右:学员最高一次均分排名(条形排行)
13
- */
14
- export default defineComponent({
15
- name: 'PracticeStatusChartsPanel',
16
- props: {
17
- useEcharts: {
18
- type: Boolean,
19
- default: false,
20
- },
21
- progress: {
22
- type: Array,
23
- default: () => [],
24
- },
25
- durationRank: {
26
- type: Array,
27
- default: () => [],
28
- },
29
- scoreRank: {
30
- type: Array,
31
- default: () => [],
32
- },
33
- },
34
- setup(props) {
35
- const hiddenLegend = ref([]) // 存储被隐藏的图例名称
36
-
37
- const toggleLegend = (name) => {
38
- if (!props.useEcharts) return // 只有 Echarts 模式下支持
39
- if (hiddenLegend.value.includes(name)) {
40
- hiddenLegend.value = hiddenLegend.value.filter((n) => n !== name)
41
- } else {
42
- hiddenLegend.value.push(name)
43
- }
44
- }
45
-
46
- return () => (
47
- <div>
48
- <div class={styles.grid3}>
49
- <div class={styles.panel}>
50
- <div class={styles.panelHeader}>
51
- <div class={styles.panelTitle}>进度统计</div>
52
- <div class={styles.legend}>
53
- {props.progress.map((it, idx) => {
54
- const isHidden = hiddenLegend.value.includes(it.name)
55
- return (
56
- <span
57
- class={[styles.legendItem, isHidden && props.useEcharts ? styles.legendHidden : '']}
58
- key={`${it.name}-${idx}`}
59
- onClick={() => toggleLegend(it.name)}
60
- style={{ cursor: props.useEcharts ? 'pointer' : 'default', opacity: isHidden && props.useEcharts ? 0.5 : 1 }}
61
- >
62
- <i class={styles.dot} style={{ background: it.color }} />
63
- <span>{it.name}</span>
64
- </span>
65
- )
66
- })}
67
- </div>
68
- </div>
69
- <div class={styles.pieWrap}>
70
- {props.useEcharts ? (
71
- <EchartsDonut series={props.progress} height={200} hiddenLegend={hiddenLegend.value} />
72
- ) : (
73
- <DonutChart series={props.progress} />
74
- )}
75
- </div>
76
- </div>
77
-
78
- <div class={styles.panel}>
79
- <div class={styles.panelHeader}>
80
- <div class={styles.panelTitle}>学员练习时长排名</div>
81
- </div>
82
- {props.useEcharts ? (
83
- <EchartsRankBar
84
- data={props.durationRank}
85
- valueFormatter={(v) => `${v.toFixed(1)}`}
86
- height={300}
87
- />
88
- ) : (
89
- <RankBarChart
90
- data={props.durationRank}
91
- valueFormatter={(v) => `${v.toFixed(1)}`}
92
- height={300}
93
- />
94
- )}
95
- </div>
96
-
97
- <div class={styles.panel}>
98
- <div class={styles.panelHeader}>
99
- <div class={styles.panelTitle}>学员最高一次均分排名</div>
100
- </div>
101
- {props.useEcharts ? (
102
- <EchartsRankBar
103
- data={props.scoreRank}
104
- valueFormatter={(v) => `${v}`}
105
- height={300}
106
- max={100}
107
- />
108
- ) : (
109
- <RankBarChart
110
- data={props.scoreRank}
111
- valueFormatter={(v) => `${v}`}
112
- height={300}
113
- />
114
- )}
115
- </div>
116
- </div>
117
- </div>
118
- )
119
- },
120
- })
121
-
@@ -1,76 +0,0 @@
1
- .grid3 {
2
- display: grid;
3
- grid-template-columns: 1.2fr 1fr 1fr;
4
- gap: 10px;
5
- }
6
-
7
- .chartCard {
8
- background: #fff;
9
- border-radius: 8px;
10
- padding: 16px;
11
- border: 1px solid #ebeef5;
12
- }
13
-
14
- /* Alias for component usage */
15
- .panel {
16
- composes: chartCard;
17
- }
18
-
19
- .chartHeader {
20
- display: flex;
21
- justify-content: space-between;
22
- align-items: center;
23
- margin-bottom: 12px;
24
- }
25
-
26
- /* Alias for component usage */
27
- .panelHeader {
28
- composes: chartHeader;
29
- }
30
-
31
- .chartTitle {
32
- font-size: 14px;
33
- font-weight: 600;
34
- color: #303133;
35
- }
36
-
37
- /* Alias for component usage */
38
- .panelTitle {
39
- composes: chartTitle;
40
- }
41
-
42
- .chartLegend {
43
- display: flex;
44
- gap: 16px;
45
- }
46
-
47
- /* Alias for component usage */
48
- .legend {
49
- composes: chartLegend;
50
- }
51
-
52
- .legendItem {
53
- display: flex;
54
- align-items: center;
55
- font-size: 12px;
56
- color: #606266;
57
- cursor: pointer;
58
- transition: opacity 0.3s;
59
- }
60
-
61
- .legendHidden {
62
- opacity: 0.5;
63
- }
64
-
65
- .dot {
66
- width: 8px;
67
- height: 8px;
68
- border-radius: 50%;
69
- margin-right: 6px;
70
- }
71
-
72
- .pieWrap {
73
- display: flex;
74
- justify-content: center;
75
- align-items: center;
76
- }
@@ -1,104 +0,0 @@
1
- import { defineComponent, computed } from 'vue'
2
-
3
- /**
4
- * 轻量环形图(不依赖图表库)
5
- * - 使用 SVG stroke-dasharray 实现
6
- * - 适合做“进度统计”等概览图
7
- */
8
- export default defineComponent({
9
- name: 'PracticeStatusDonutChart',
10
- props: {
11
- series: {
12
- type: Array,
13
- default: () => [],
14
- },
15
- size: {
16
- type: Number,
17
- default: 170,
18
- },
19
- thickness: {
20
- type: Number,
21
- default: 18,
22
- },
23
- },
24
- setup(props) {
25
- const normalized = computed(() => {
26
- const safe = (props.series || []).map((s) => ({
27
- name: s?.name ?? '',
28
- value: Number(s?.value ?? 0),
29
- color: s?.color ?? '#ff7a00',
30
- }))
31
- const total = safe.reduce((sum, cur) => sum + (Number.isFinite(cur.value) ? cur.value : 0), 0)
32
- if (total <= 0) {
33
- return {
34
- total: 0,
35
- list: safe.map((s) => ({ ...s, percent: 0 })),
36
- }
37
- }
38
- return {
39
- total,
40
- list: safe.map((s) => ({ ...s, percent: s.value / total })),
41
- }
42
- })
43
-
44
- const geometry = computed(() => {
45
- const size = props.size
46
- const thickness = props.thickness
47
- const r = (size - thickness) / 2
48
- const c = 2 * Math.PI * r
49
- return { size, thickness, r, c }
50
- })
51
-
52
- const segments = computed(() => {
53
- const { c } = geometry.value
54
- let offset = 0
55
- const list = normalized.value.list.map((s) => {
56
- const len = c * s.percent
57
- const seg = {
58
- ...s,
59
- len,
60
- offset,
61
- dasharray: `${len} ${Math.max(0, c - len)}`,
62
- dashoffset: -offset,
63
- }
64
- offset += len
65
- return seg
66
- })
67
- return list
68
- })
69
-
70
- return () => {
71
- const { size, thickness, r } = geometry.value
72
- const cx = size / 2
73
- const cy = size / 2
74
- return (
75
- <svg width={size} height={size} viewBox={`0 0 ${size} ${size}`}>
76
- <circle
77
- cx={cx}
78
- cy={cy}
79
- r={r}
80
- fill="none"
81
- stroke="#f2f6fc"
82
- stroke-width={thickness}
83
- />
84
- {segments.value.map((s, idx) => (
85
- <circle
86
- key={`${s.name}-${idx}`}
87
- cx={cx}
88
- cy={cy}
89
- r={r}
90
- fill="none"
91
- stroke={s.color}
92
- stroke-width={thickness}
93
- stroke-linecap="round"
94
- stroke-dasharray={s.dasharray}
95
- stroke-dashoffset={s.dashoffset}
96
- transform={`rotate(-90 ${cx} ${cy})`}
97
- />
98
- ))}
99
- </svg>
100
- )
101
- }
102
- },
103
- })
104
-
@@ -1,75 +0,0 @@
1
- import { defineComponent, ref, computed } from 'vue'
2
- import styles from './index.module.scss'
3
-
4
- /**
5
- * 明细数据表格
6
- * - 组件化目的:后续切换接口数据时,只替换 props.data
7
- * - 目前仅实现展示与分页(模拟分页)
8
- */
9
- export default defineComponent({
10
- name: 'PracticeStatusPracticeTable',
11
- props: {
12
- data: {
13
- type: Array,
14
- default: () => [],
15
- },
16
- pageSize: {
17
- type: Number,
18
- default: 10,
19
- },
20
- },
21
- setup(props) {
22
- const currentPage = ref(1)
23
-
24
- const total = computed(() => props.data.length)
25
- const pageCount = computed(() => Math.max(1, Math.ceil(total.value / props.pageSize)))
26
-
27
- const pageData = computed(() => {
28
- const start = (currentPage.value - 1) * props.pageSize
29
- return props.data.slice(start, start + props.pageSize)
30
- })
31
-
32
- const handlePageChange = (p) => {
33
- currentPage.value = p
34
- }
35
-
36
- return () => (
37
- <div class={styles.tableWrap}>
38
- <el-table data={pageData.value} stripe style={{ width: '100%' }}>
39
- <el-table-column type="selection" width="44" />
40
- <el-table-column prop="jobNo" label="工号" width="90" />
41
- <el-table-column prop="name" label="姓名" width="80" />
42
- <el-table-column prop="planName" label="计划名称" />
43
- <el-table-column prop="scriptName" label="脚本名称" />
44
- <el-table-column prop="startTime" label="开始时间" width="120" />
45
- <el-table-column prop="endTime" label="结束时间" width="120" />
46
- <el-table-column prop="status" label="完成状态" width="90" />
47
- <el-table-column prop="score" label="得分" width="70" />
48
- <el-table-column prop="passStatus" label="通过状态" width="90" />
49
- <el-table-column prop="progress" label="练习进度" width="90" />
50
- <el-table-column label="操作" width="110">
51
- {{
52
- default: (scope) => (
53
- <el-button link size="small" type="primary" onClick={() => console.log('查看练习记录', scope.row)}>
54
- 查看练习记录
55
- </el-button>
56
- ),
57
- }}
58
- </el-table-column>
59
- </el-table>
60
-
61
- <div class={styles.paginationRow}>
62
- <el-pagination
63
- background
64
- currentPage={currentPage.value}
65
- pageSize={props.pageSize}
66
- total={total.value}
67
- layout="total, prev, pager, next"
68
- onCurrentChange={handlePageChange}
69
- />
70
- </div>
71
- </div>
72
- )
73
- },
74
- })
75
-
@@ -1,12 +0,0 @@
1
- .tableWrap {
2
- background: #fff;
3
- border-radius: 8px;
4
- padding: 12px;
5
- border: 1px solid #ebeef5;
6
- }
7
-
8
- .paginationRow {
9
- display: flex;
10
- justify-content: flex-end;
11
- margin-top: 12px;
12
- }