@agile-team/wl-skills-kit 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 (112) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +328 -0
  3. package/bin/wl-skills.js +104 -0
  4. package/files/.github/copilot-instructions.md +211 -0
  5. package/files/.github/docs/SYS_MENU_INFO.md +247 -0
  6. package/files/.github/docs/menu-sync-design.md +265 -0
  7. package/files/.github/docs/use-skill.md +379 -0
  8. package/files/.github/docs/wl-skills-kit.md +266 -0
  9. package/files/.github/skills/api-contract/SKILL.md +247 -0
  10. package/files/.github/skills/convention-extract/SKILL.md +355 -0
  11. package/files/.github/skills/menu-sync/SKILL.md +255 -0
  12. package/files/.github/skills/menu-sync/env/guide.md +73 -0
  13. package/files/.github/skills/page-codegen/SKILL.md +825 -0
  14. package/files/.github/skills/page-codegen/TPL-CHANGE-HISTORY.md +281 -0
  15. package/files/.github/skills/page-codegen/TPL-DETAIL-TABS.md +1112 -0
  16. package/files/.github/skills/page-codegen/TPL-DRIVEN.md +124 -0
  17. package/files/.github/skills/page-codegen/TPL-FORM-ROUTE.md +441 -0
  18. package/files/.github/skills/page-codegen/TPL-LIST.md +196 -0
  19. package/files/.github/skills/page-codegen/TPL-MASTER-DETAIL.md +153 -0
  20. package/files/.github/skills/page-codegen/TPL-OPERATION-STATION.md +442 -0
  21. package/files/.github/skills/page-codegen/TPL-RECORD-FORM.md +376 -0
  22. package/files/.github/skills/page-codegen/TPL-TREE-LIST.md +191 -0
  23. package/files/.github/skills/prototype-scan/SKILL.md +414 -0
  24. package/files/demo/README.md +44 -0
  25. package/files/demo/produce/aiflow/mmwr-customer-apply-add/api.md +54 -0
  26. package/files/demo/produce/aiflow/mmwr-customer-apply-add/data.ts +346 -0
  27. package/files/demo/produce/aiflow/mmwr-customer-apply-add/index.scss +1 -0
  28. package/files/demo/produce/aiflow/mmwr-customer-apply-add/index.vue +28 -0
  29. package/files/demo/produce/aiflow/mmwr-customer-apply-add-form/data.ts +115 -0
  30. package/files/demo/produce/aiflow/mmwr-customer-apply-add-form/index.scss +44 -0
  31. package/files/demo/produce/aiflow/mmwr-customer-apply-add-form/index.vue +43 -0
  32. package/files/demo/produce/aiflow/mmwr-customer-apply-change/data.ts +338 -0
  33. package/files/demo/produce/aiflow/mmwr-customer-apply-change/index.scss +1 -0
  34. package/files/demo/produce/aiflow/mmwr-customer-apply-change/index.vue +28 -0
  35. package/files/demo/produce/aiflow/mmwr-customer-apply-change-form/data.ts +115 -0
  36. package/files/demo/produce/aiflow/mmwr-customer-apply-change-form/index.scss +44 -0
  37. package/files/demo/produce/aiflow/mmwr-customer-apply-change-form/index.vue +43 -0
  38. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/data.ts +196 -0
  39. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.scss +150 -0
  40. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.vue +79 -0
  41. package/files/demo/produce/aiflow/mmwr-customer-archive/api.md +88 -0
  42. package/files/demo/produce/aiflow/mmwr-customer-archive/data.ts +601 -0
  43. package/files/demo/produce/aiflow/mmwr-customer-archive/index.scss +1 -0
  44. package/files/demo/produce/aiflow/mmwr-customer-archive/index.vue +64 -0
  45. package/files/demo/produce/aiflow/mmwr-customer-detail/api.md +67 -0
  46. package/files/demo/produce/aiflow/mmwr-customer-detail/data.ts +286 -0
  47. package/files/demo/produce/aiflow/mmwr-customer-detail/index.scss +139 -0
  48. package/files/demo/produce/aiflow/mmwr-customer-detail/index.vue +318 -0
  49. package/files/demo/produce/aiflow/mmwr-temp-customer-archive/api.md +98 -0
  50. package/files/demo/produce/aiflow/mmwr-temp-customer-archive/data.ts +543 -0
  51. package/files/demo/produce/aiflow/mmwr-temp-customer-archive/index.scss +1 -0
  52. package/files/demo/produce/aiflow/mmwr-temp-customer-archive/index.vue +52 -0
  53. package/files/demo/sale/demo/add-demo/data.ts +518 -0
  54. package/files/demo/sale/demo/add-demo/index.scss +207 -0
  55. package/files/demo/sale/demo/add-demo/index.vue +167 -0
  56. package/files/demo/sale/demo/billet-flame-cut-plan/data.ts +524 -0
  57. package/files/demo/sale/demo/billet-flame-cut-plan/index.scss +155 -0
  58. package/files/demo/sale/demo/billet-flame-cut-plan/index.vue +117 -0
  59. package/files/demo/sale/demo/domestic-trade-order/data.ts +308 -0
  60. package/files/demo/sale/demo/domestic-trade-order/index.scss +99 -0
  61. package/files/demo/sale/demo/domestic-trade-order/index.vue +77 -0
  62. package/files/demo/sale/demo/heat-batch-return/data.ts +367 -0
  63. package/files/demo/sale/demo/heat-batch-return/index.scss +100 -0
  64. package/files/demo/sale/demo/heat-batch-return/index.vue +170 -0
  65. package/files/demo/sale/demo/heat-batch-return/meltDialog.vue +320 -0
  66. package/files/demo/sale/demo/metallurgical-spec/data.ts +825 -0
  67. package/files/demo/sale/demo/metallurgical-spec/index.scss +264 -0
  68. package/files/demo/sale/demo/metallurgical-spec/index.vue +309 -0
  69. package/files/docs/jh-date-range.md +257 -0
  70. package/files/docs/jh-date.md +222 -0
  71. package/files/docs/jh-dept-picker.md +190 -0
  72. package/files/docs/jh-drag-row.md +590 -0
  73. package/files/docs/jh-file-upload.md +216 -0
  74. package/files/docs/jh-pagination.md +505 -0
  75. package/files/docs/jh-picker.md +218 -0
  76. package/files/docs/jh-select.md +148 -0
  77. package/files/docs/jh-text.md +248 -0
  78. package/files/docs/jh-user-picker.md +197 -0
  79. package/files/docs/page-query-hook-best-practices.md +362 -0
  80. package/files/docs/request.md +925 -0
  81. package/files/src/components/global/C_ParentView/index.vue +3 -0
  82. package/files/src/components/global/C_RightToolbar/index.vue +459 -0
  83. package/files/src/components/global/C_Splitter/index.vue +195 -0
  84. package/files/src/components/global/C_SvgIcon/index.vue +61 -0
  85. package/files/src/components/global/C_SvgIcon/svgicon.js +10 -0
  86. package/files/src/components/global/C_TagStatus/README.md +264 -0
  87. package/files/src/components/global/C_TagStatus/config.ts +192 -0
  88. package/files/src/components/global/C_TagStatus/index.vue +127 -0
  89. package/files/src/components/global/C_TagStatus/types.ts +64 -0
  90. package/files/src/components/global/C_Tree/README.md +153 -0
  91. package/files/src/components/global/C_Tree/index.scss +42 -0
  92. package/files/src/components/global/C_Tree/index.vue +119 -0
  93. package/files/src/components/global/C_Tree/types.ts +59 -0
  94. package/files/src/components/local/c_formModal/README.md +235 -0
  95. package/files/src/components/local/c_formModal/data.ts +95 -0
  96. package/files/src/components/local/c_formModal/index.scss +8 -0
  97. package/files/src/components/local/c_formModal/index.vue +107 -0
  98. package/files/src/components/local/c_formSections/README.md +496 -0
  99. package/files/src/components/local/c_formSections/data.ts +175 -0
  100. package/files/src/components/local/c_formSections/index.scss +280 -0
  101. package/files/src/components/local/c_formSections/index.vue +429 -0
  102. package/files/src/components/local/c_listModal/data.ts +41 -0
  103. package/files/src/components/local/c_listModal/index.vue +136 -0
  104. package/files/src/components/local/c_spliterTitle/index.scss +25 -0
  105. package/files/src/components/local/c_spliterTitle/index.vue +21 -0
  106. package/files/src/components/remote/AGGrid/README.md +530 -0
  107. package/files/src/components/remote/BaseForm/README.md +508 -0
  108. package/files/src/components/remote/BaseQuery/README.md +865 -0
  109. package/files/src/components/remote/BaseTable/README.md +941 -0
  110. package/files/src/components/remote/BaseToolbar/README.md +496 -0
  111. package/files/src/types/page.ts +24 -0
  112. package/package.json +31 -0
@@ -0,0 +1,264 @@
1
+ /*
2
+ * @Author: ChenYu ycyplus@gmail.com
3
+ * @Date: 2025-12-31 15:25:40
4
+ * @LastEditors: ChenYu ycyplus@gmail.com
5
+ * @LastEditTime: 2026-01-03 23:47:09
6
+ * @FilePath: \cx-ui-sale\src\views\sale\demo\metallurgical-spec\index.scss
7
+ * @Description: 冶金规范模板 - 样式表
8
+ * Copyright (c) 2025 by CHENY, All Rights Reserved 😎.
9
+ */
10
+
11
+ .metallurgical-spec-page {
12
+ // 变量定义
13
+ $spacing: 16px;
14
+ $small-spacing: 12px;
15
+ $tiny-spacing: 10px;
16
+ $border-radius: 4px;
17
+ $transition-fast: 0.2s;
18
+ $transition-normal: 0.3s;
19
+
20
+ // 性能优化
21
+ contain: layout style;
22
+ will-change: auto;
23
+ height: 100%;
24
+ display: flex;
25
+ flex-direction: column;
26
+ padding: 8px;
27
+ background: #fff;
28
+ margin: 8px;
29
+
30
+ // 顶部标签页
31
+ .main-tabs {
32
+ margin-bottom: $spacing;
33
+ background: #fff;
34
+ padding: 0 $spacing;
35
+ border-radius: $border-radius;
36
+ }
37
+
38
+ // 明细表格容器(替代Splitter)
39
+ .detail-tables-container {
40
+ flex: 1;
41
+ display: flex;
42
+ flex-direction: column;
43
+ gap: $spacing;
44
+ overflow: hidden;
45
+ contain: layout style;
46
+ transform: translateZ(0); // 强制硬件加速
47
+
48
+ // 未选择树节点时的提示
49
+ .no-tree-selection-tip {
50
+ flex: 1;
51
+ display: flex;
52
+ align-items: center;
53
+ justify-content: center;
54
+ background: #fff;
55
+ border-radius: $border-radius;
56
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
57
+
58
+ :deep(.el-empty) {
59
+ .el-empty__description {
60
+ font-size: 16px;
61
+ color: #909399;
62
+ margin-top: $spacing;
63
+ }
64
+ }
65
+ }
66
+
67
+ // 表格内容容器
68
+ .tables-content {
69
+ flex: 1;
70
+ display: flex;
71
+ flex-direction: column;
72
+ gap: $spacing;
73
+ overflow: hidden;
74
+ }
75
+ .main-table-section,
76
+ .experiment-section {
77
+ display: flex;
78
+ flex-direction: column;
79
+ overflow: hidden;
80
+ contain: layout style;
81
+ background: #fff;
82
+ border-radius: $border-radius;
83
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
84
+ }
85
+
86
+ .main-table-section {
87
+ padding: $spacing;
88
+ }
89
+
90
+ .experiment-section {
91
+ padding: $spacing;
92
+ max-height: 350px;
93
+ overflow: hidden;
94
+ display: flex;
95
+ flex-direction: column;
96
+
97
+ .experiment-header {
98
+ flex-shrink: 0;
99
+ margin-bottom: $small-spacing;
100
+ }
101
+ // 强制表格滚动
102
+ :deep(.base-table) {
103
+ overflow: auto !important;
104
+
105
+ .el-table {
106
+ .el-table__body-wrapper {
107
+ max-height: 250px !important;
108
+ overflow-y: scroll !important;
109
+ overflow-x: auto !important;
110
+ }
111
+ }
112
+
113
+ // 确保滚动条可见
114
+ .el-table__body-wrapper::-webkit-scrollbar {
115
+ width: 12px;
116
+ background: #f0f0f0;
117
+ }
118
+
119
+ .el-table__body-wrapper::-webkit-scrollbar-thumb {
120
+ background: #c0c0c0;
121
+ border-radius: 6px;
122
+
123
+ &:hover {
124
+ background: #a0a0a0;
125
+ }
126
+ }
127
+ }
128
+ }
129
+ }
130
+
131
+ // 拖动提示图标
132
+ .drag-hint-icon {
133
+ font-size: 18px;
134
+ color: #909399;
135
+ margin-right: 8px;
136
+ cursor: ns-resize;
137
+ user-select: none;
138
+ font-weight: bold;
139
+ }
140
+
141
+ // 列表页内容
142
+ .list-content {
143
+ flex: 1;
144
+ display: flex;
145
+ flex-direction: column;
146
+ background: #fff;
147
+ border-radius: $border-radius;
148
+ padding: $spacing;
149
+ overflow: hidden;
150
+ // 分页器包装器
151
+ .pagination-wrapper {
152
+ display: flex;
153
+ justify-content: flex-end;
154
+ align-items: center;
155
+ margin-top: $spacing;
156
+ padding-top: $small-spacing;
157
+ }
158
+
159
+ .list-table-container {
160
+ flex: 1;
161
+ min-height: 0;
162
+ overflow: hidden;
163
+ }
164
+ }
165
+
166
+ // 详情包装器
167
+ .detail-wrapper {
168
+ flex: 1;
169
+ display: flex;
170
+ flex-direction: column;
171
+ overflow: hidden;
172
+
173
+ // 主内容区域包装器(左右拖动布局)
174
+ .detail-content-wrapper {
175
+ flex: 1;
176
+ overflow: hidden;
177
+ }
178
+ }
179
+
180
+ // 顶部搜索区域间距
181
+ :deep(.base-query) {
182
+ margin-bottom: $spacing;
183
+ }
184
+
185
+ // 详情区域(右侧内容)
186
+ .detail-area {
187
+ height: 100%;
188
+ display: flex;
189
+ flex-direction: column;
190
+ background: #fff;
191
+ border-radius: $border-radius;
192
+ padding: $spacing;
193
+ }
194
+
195
+ // 详情标签页按钮组
196
+ .detail-tabs-buttons {
197
+ flex-shrink: 0;
198
+ margin-bottom: $spacing;
199
+ }
200
+
201
+ // 详情内容区域
202
+ .detail-content {
203
+ flex: 1;
204
+ display: flex;
205
+ flex-direction: column;
206
+ overflow: hidden;
207
+
208
+ // 工具栏下间距
209
+ .toolbar-spacing {
210
+ margin-bottom: $tiny-spacing;
211
+ flex-shrink: 0;
212
+ }
213
+
214
+ // 表格容器
215
+ .table-container {
216
+ flex: 1;
217
+ min-height: 0;
218
+ overflow: hidden;
219
+ }
220
+
221
+ // 明细信息的表格容器(固定高度,给实验表格留空间)
222
+ &[data-tab="detail"] {
223
+ // 移除 table-container 固定高度,让 C_Splitter 控制
224
+ .detail-tables-splitter {
225
+ flex: 1;
226
+ }
227
+ }
228
+
229
+ // 实验项目信息区域头部
230
+ .experiment-header {
231
+ display: flex;
232
+ justify-content: space-between;
233
+ align-items: center;
234
+ margin-bottom: $small-spacing;
235
+
236
+ .experiment-title {
237
+ display: flex;
238
+ align-items: center;
239
+ gap: 6px;
240
+
241
+ .title-arrow {
242
+ font-size: 16px;
243
+ color: #606266;
244
+ }
245
+
246
+ .title-text {
247
+ font-size: 14px;
248
+ font-weight: 600;
249
+ color: #303133;
250
+ }
251
+ }
252
+ }
253
+
254
+ // 明细信息占位
255
+ .detail-info-placeholder {
256
+ flex: 1;
257
+ display: flex;
258
+ align-items: center;
259
+ justify-content: center;
260
+ color: #909399;
261
+ font-size: 16px;
262
+ }
263
+ }
264
+ }
@@ -0,0 +1,309 @@
1
+ <!--
2
+ * @Author: ChenYu ycyplus@gmail.com
3
+ * @Date: 2025-12-31 15:10:30
4
+ * @LastEditors: ChenYu ycyplus@gmail.com
5
+ * @LastEditTime: 2026-01-03 09:15:45
6
+ * @FilePath: \cx-ui-sale\src\views\sale\demo\metallurgical-spec\index.vue
7
+ * @Description: 冶金规范模板 - 经典主明细布局(精简优化版)
8
+ * Copyright (c) 2025 by CHENY, All Rights Reserved 😎.
9
+ -->
10
+
11
+ <template>
12
+ <div class="metallurgical-spec-page">
13
+ <!-- 主标签页 -->
14
+ <el-tabs v-model="activeTab" class="main-tabs">
15
+ <el-tab-pane
16
+ v-for="tab in mainTabsConfig"
17
+ :key="tab.name"
18
+ :label="tab.label"
19
+ :name="tab.name"
20
+ />
21
+ </el-tabs>
22
+
23
+ <!-- 列表页面 -->
24
+ <div v-show="activeTab === 'list'" class="list-content">
25
+ <BaseQuery
26
+ :form="unifiedQueryForm"
27
+ :items="listQueryItemsConfig"
28
+ :columns="5"
29
+ labelWidth="120px"
30
+ @select="handleUnifiedQuerySearch"
31
+ @reset="handleUnifiedQueryReset"
32
+ />
33
+
34
+ <BaseTable
35
+ :data="listTableData"
36
+ :columns="listTableColumnsConfig"
37
+ :loading="listLoading"
38
+ height="100%"
39
+ />
40
+
41
+ <div class="pagination-wrapper">
42
+ <jh-pagination
43
+ :current-page="listPagination.pageNum"
44
+ :page-size="listPagination.pageSize"
45
+ :total="listPagination.total"
46
+ @current-change="handleListPageChange"
47
+ @size-change="handleListSizeChange"
48
+ />
49
+ </div>
50
+ </div>
51
+
52
+ <!-- 详情页面 -->
53
+ <div v-show="activeTab === 'detail'" class="detail-wrapper">
54
+ <BaseQuery
55
+ :form="unifiedQueryForm"
56
+ :items="listQueryItemsConfig"
57
+ :columns="5"
58
+ labelWidth="120px"
59
+ @select="handleUnifiedQuerySearch"
60
+ @reset="handleUnifiedQueryReset"
61
+ />
62
+
63
+ <!-- 左右布局 -->
64
+ <jh-drag-col :left-width="300" class="detail-content-wrapper">
65
+ <template #left>
66
+ <C_Tree
67
+ :tabs="treeTabsConfig"
68
+ :tree-data="treeData"
69
+ :tree-props="treeProps"
70
+ :default-active-tab="treeActiveTab"
71
+ @node-click="handleNodeClick"
72
+ @tab-change="handleTreeTabChange"
73
+ />
74
+ </template>
75
+
76
+ <template #right>
77
+ <div class="detail-area">
78
+ <!-- 详情标签页 -->
79
+ <div class="detail-tabs-buttons">
80
+ <el-button-group>
81
+ <el-button
82
+ v-for="tab in detailTabsConfig"
83
+ :key="tab.name"
84
+ :type="detailActiveTab === tab.name ? 'primary' : ''"
85
+ size="small"
86
+ @click="detailActiveTab = tab.name"
87
+ >
88
+ {{ tab.label }}
89
+ </el-button>
90
+ </el-button-group>
91
+ </div>
92
+
93
+ <!-- 基本信息 -->
94
+ <div v-if="detailActiveTab === 'basic'" class="detail-content">
95
+ <BaseQuery
96
+ :form="detailQueryForm"
97
+ :items="detailQueryItemsConfig"
98
+ :columns="5"
99
+ @select="handleDetailQuerySearch"
100
+ @reset="handleDetailQueryReset"
101
+ />
102
+
103
+ <BaseToolbar :items="toolbarItems" size="small" />
104
+
105
+ <BaseTable
106
+ :data="tableData"
107
+ :columns="tableColumnsConfig"
108
+ :loading="loading"
109
+ height="100%"
110
+ @selection-change="handleSelectionChange"
111
+ />
112
+
113
+ <div class="pagination-wrapper">
114
+ <jh-pagination
115
+ :current-page="pagination.pageNum"
116
+ :page-size="pagination.pageSize"
117
+ :total="pagination.total"
118
+ @current-change="handlePageChange"
119
+ @size-change="handleSizeChange"
120
+ />
121
+ </div>
122
+ </div>
123
+
124
+ <!-- 明细信息 -->
125
+ <div v-if="detailActiveTab === 'detail'" class="detail-content">
126
+ <BaseQuery
127
+ :form="detailQueryForm"
128
+ :items="detailQueryItemsConfig"
129
+ :columns="5"
130
+ @select="handleDetailQuerySearch"
131
+ @reset="handleDetailQueryReset"
132
+ />
133
+
134
+ <BaseToolbar :items="detailToolbarItems" size="small" />
135
+
136
+ <!-- 主明细表格区域 -->
137
+ <div class="detail-tables-container">
138
+ <!-- 未选择节点时的提示 -->
139
+ <div v-if="!isTreeNodeSelected" class="no-tree-selection-tip">
140
+ <el-empty
141
+ description="请先点击左侧树节点选择数据"
142
+ :image-size="120"
143
+ >
144
+ <template #image>
145
+ <el-icon :size="60" color="#909399">
146
+ <ArrowLeft />
147
+ </el-icon>
148
+ </template>
149
+ </el-empty>
150
+ </div>
151
+
152
+ <!-- 选择节点后显示表格数据 -->
153
+ <div v-else class="tables-content">
154
+ <C_Splitter direction="vertical">
155
+ <div class="main-table-section">
156
+ <BaseTable
157
+ :key="updateKey"
158
+ :data="tableData"
159
+ :columns="tableColumnsConfig"
160
+ :loading="loading"
161
+ height="300px"
162
+ @selection-change="handleSelectionChange"
163
+ @row-click="handleRowClick"
164
+ />
165
+ </div>
166
+ <div>
167
+ <div class="experiment-section">
168
+ <div class="experiment-header">
169
+ <div class="experiment-title">
170
+ <el-icon class="title-arrow"><ArrowDown /></el-icon>
171
+ <span class="title-text">实验项目信息</span>
172
+ </div>
173
+ </div>
174
+
175
+ <BaseTable
176
+ :key="updateKey"
177
+ :data="experimentData"
178
+ :columns="experimentColumnsConfig"
179
+ :loading="loading"
180
+ height="250px"
181
+ :max-height="250"
182
+ style="overflow-y: auto"
183
+ />
184
+
185
+ <div class="pagination-wrapper">
186
+ <jh-pagination
187
+ :current-page="experimentPagination.pageNum"
188
+ :page-size="experimentPagination.pageSize"
189
+ :total="experimentPagination.total"
190
+ @current-change="handleExperimentPageChange"
191
+ @size-change="handleExperimentSizeChange"
192
+ />
193
+ </div>
194
+ </div>
195
+ </div>
196
+ </C_Splitter>
197
+ </div>
198
+ </div>
199
+ </div>
200
+ </div>
201
+ </template>
202
+ </jh-drag-col>
203
+ </div>
204
+ </div>
205
+
206
+ <!-- 主表格编辑弹窗 -->
207
+ <c_formModal
208
+ ref="mainModalRef"
209
+ :form-items="mainModalConfig.formItems"
210
+ :api="mainModalConfig.api"
211
+ :width="mainModalConfig.width"
212
+ :columns="mainModalConfig.columns"
213
+ :label-width="mainModalConfig.labelWidth"
214
+ :title-prefix="mainModalConfig.titlePrefix"
215
+ @ok="handleMainModalOk"
216
+ />
217
+ </template>
218
+
219
+ <script setup lang="ts">
220
+ import { onMounted, onUnmounted, watch, nextTick } from "vue";
221
+ import { ArrowDown, ArrowLeft } from "@element-plus/icons-vue";
222
+ import c_formModal from "@/components/local/c_formModal/index.vue";
223
+ import C_Splitter from "@/components/global/C_Splitter/index.vue";
224
+ import {
225
+ // 状态
226
+ activeTab,
227
+ treeActiveTab,
228
+ detailActiveTab,
229
+ loading,
230
+ listLoading,
231
+ treeData,
232
+ tableData,
233
+ listTableData,
234
+ experimentData,
235
+ updateKey,
236
+ currentSelectedRow,
237
+ isTreeNodeSelected,
238
+ unifiedQueryForm,
239
+ detailQueryForm,
240
+ pagination,
241
+ listPagination,
242
+ experimentPagination,
243
+ // 配置
244
+ mainTabsConfig,
245
+ treeTabsConfig,
246
+ detailTabsConfig,
247
+ treeProps,
248
+ listQueryItemsConfig,
249
+ detailQueryItemsConfig,
250
+ tableColumnsConfig,
251
+ listTableColumnsConfig,
252
+ experimentColumnsConfig,
253
+ toolbarItems,
254
+ detailToolbarItems,
255
+ // 方法
256
+ handleNodeClick,
257
+ handleUnifiedQuerySearch,
258
+ handleUnifiedQueryReset,
259
+ handleListPageChange,
260
+ handleListSizeChange,
261
+ handleDetailQuerySearch,
262
+ handleDetailQueryReset,
263
+ handlePageChange,
264
+ handleSizeChange,
265
+ handleSelectionChange,
266
+ handleRowClick,
267
+ handleExperimentPageChange,
268
+ handleExperimentSizeChange,
269
+ handleTreeTabChange,
270
+ // 主表格编辑弹窗相关
271
+ mainModalConfig,
272
+ handleMainModalOk,
273
+ initData,
274
+ loadListData,
275
+ loadExperimentData,
276
+ cleanup
277
+ } from "./data";
278
+
279
+ // 弹窗引用
280
+ const mainModalRef = ref<InstanceType<typeof c_formModal>>();
281
+
282
+ // 生命周期
283
+ onMounted(() => {
284
+ activeTab.value === "list" ? loadListData() : initData();
285
+ // 延迟设置弹窗引用,确保组件已完全挂载
286
+ nextTick(() => {
287
+ if (typeof window !== "undefined" && mainModalRef.value) {
288
+ (window as any).mainModalRef = mainModalRef.value;
289
+ }
290
+ });
291
+ });
292
+
293
+ onUnmounted(cleanup);
294
+
295
+ // 标签切换监听
296
+ watch(activeTab, (newTab) => {
297
+ newTab === "detail" ? initData() : loadListData();
298
+ });
299
+
300
+ watch(detailActiveTab, (newTab) => {
301
+ if (newTab === "detail" && currentSelectedRow.value) {
302
+ loadExperimentData(currentSelectedRow.value);
303
+ }
304
+ });
305
+ </script>
306
+
307
+ <style scoped lang="scss">
308
+ @import "./index.scss";
309
+ </style>