@agile-team/wl-skills-kit 2.9.3 → 2.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/bin/wl-skills.js +1 -1
- package/files/.github/copilot-instructions.md +9 -14
- package/files/.github/guides/architecture.md +1 -1
- package/files/.github/guides/usage.md +1 -1
- package/files/.github/skills/_best-practices.md +2 -2
- package/files/.github/skills/core/convention-audit/SKILL.md +9 -7
- package/files/.github/skills/core/page-codegen/SKILL.md +1 -0
- package/files/.github/skills/core/page-codegen/USAGE.md +1 -1
- package/files/.github/skills/core/prototype-scan/SKILL.md +3 -3
- package/files/.github/standards/14-layout-containers.md +159 -159
- package/files/demo/sale/demo/add-demo/index.scss +207 -207
- package/files/demo/sale/demo/add-demo/index.vue +171 -171
- package/files/demo/sale/demo/metallurgical-spec/index.scss +264 -264
- package/files/demo/sale/demo/metallurgical-spec/index.vue +313 -313
- package/files/src/components/global/C_Splitter/index.vue +149 -149
- package/files/src/components/local/c_formSections/README.md +496 -496
- package/package.json +2 -2
|
@@ -1,313 +1,313 @@
|
|
|
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
|
-
<jh-drag-row :topHeight="320">
|
|
155
|
-
<template #top>
|
|
156
|
-
<div class="main-table-section">
|
|
157
|
-
<BaseTable
|
|
158
|
-
:key="updateKey"
|
|
159
|
-
:data="tableData"
|
|
160
|
-
:columns="tableColumnsConfig"
|
|
161
|
-
:loading="loading"
|
|
162
|
-
height="300px"
|
|
163
|
-
@selection-change="handleSelectionChange"
|
|
164
|
-
@row-click="handleRowClick"
|
|
165
|
-
/>
|
|
166
|
-
</div>
|
|
167
|
-
</template>
|
|
168
|
-
<template #bottom>
|
|
169
|
-
<div>
|
|
170
|
-
<div class="experiment-section">
|
|
171
|
-
<div class="experiment-header">
|
|
172
|
-
<div class="experiment-title">
|
|
173
|
-
<el-icon class="title-arrow"><ArrowDown /></el-icon>
|
|
174
|
-
<span class="title-text">实验项目信息</span>
|
|
175
|
-
</div>
|
|
176
|
-
</div>
|
|
177
|
-
|
|
178
|
-
<BaseTable
|
|
179
|
-
:key="updateKey"
|
|
180
|
-
:data="experimentData"
|
|
181
|
-
:columns="experimentColumnsConfig"
|
|
182
|
-
:loading="loading"
|
|
183
|
-
height="250px"
|
|
184
|
-
:max-height="250"
|
|
185
|
-
style="overflow-y: auto"
|
|
186
|
-
/>
|
|
187
|
-
|
|
188
|
-
<div class="pagination-wrapper">
|
|
189
|
-
<jh-pagination
|
|
190
|
-
:current-page="experimentPagination.pageNum"
|
|
191
|
-
:page-size="experimentPagination.pageSize"
|
|
192
|
-
:total="experimentPagination.total"
|
|
193
|
-
@current-change="handleExperimentPageChange"
|
|
194
|
-
@size-change="handleExperimentSizeChange"
|
|
195
|
-
/>
|
|
196
|
-
</div>
|
|
197
|
-
</div>
|
|
198
|
-
</div>
|
|
199
|
-
</template>
|
|
200
|
-
</jh-drag-row>
|
|
201
|
-
</div>
|
|
202
|
-
</div>
|
|
203
|
-
</div>
|
|
204
|
-
</div>
|
|
205
|
-
</template>
|
|
206
|
-
</jh-drag-col>
|
|
207
|
-
</div>
|
|
208
|
-
</div>
|
|
209
|
-
|
|
210
|
-
<!-- 主表格编辑弹窗 -->
|
|
211
|
-
<c_formModal
|
|
212
|
-
ref="mainModalRef"
|
|
213
|
-
:form-items="mainModalConfig.formItems"
|
|
214
|
-
:api="mainModalConfig.api"
|
|
215
|
-
:width="mainModalConfig.width"
|
|
216
|
-
:columns="mainModalConfig.columns"
|
|
217
|
-
:label-width="mainModalConfig.labelWidth"
|
|
218
|
-
:title-prefix="mainModalConfig.titlePrefix"
|
|
219
|
-
@ok="handleMainModalOk"
|
|
220
|
-
/>
|
|
221
|
-
</template>
|
|
222
|
-
|
|
223
|
-
<script setup lang="ts">
|
|
224
|
-
import { onMounted, onUnmounted, watch, nextTick } from "vue";
|
|
225
|
-
import { ArrowDown, ArrowLeft } from "@element-plus/icons-vue";
|
|
226
|
-
import c_formModal from "@/components/local/c_formModal/index.vue";
|
|
227
|
-
// jh-drag-row 是 @jhlc/jh-ui 全局注册组件,无需 import
|
|
228
|
-
import {
|
|
229
|
-
// 状态
|
|
230
|
-
activeTab,
|
|
231
|
-
treeActiveTab,
|
|
232
|
-
detailActiveTab,
|
|
233
|
-
loading,
|
|
234
|
-
listLoading,
|
|
235
|
-
treeData,
|
|
236
|
-
tableData,
|
|
237
|
-
listTableData,
|
|
238
|
-
experimentData,
|
|
239
|
-
updateKey,
|
|
240
|
-
currentSelectedRow,
|
|
241
|
-
isTreeNodeSelected,
|
|
242
|
-
unifiedQueryForm,
|
|
243
|
-
detailQueryForm,
|
|
244
|
-
pagination,
|
|
245
|
-
listPagination,
|
|
246
|
-
experimentPagination,
|
|
247
|
-
// 配置
|
|
248
|
-
mainTabsConfig,
|
|
249
|
-
treeTabsConfig,
|
|
250
|
-
detailTabsConfig,
|
|
251
|
-
treeProps,
|
|
252
|
-
listQueryItemsConfig,
|
|
253
|
-
detailQueryItemsConfig,
|
|
254
|
-
tableColumnsConfig,
|
|
255
|
-
listTableColumnsConfig,
|
|
256
|
-
experimentColumnsConfig,
|
|
257
|
-
toolbarItems,
|
|
258
|
-
detailToolbarItems,
|
|
259
|
-
// 方法
|
|
260
|
-
handleNodeClick,
|
|
261
|
-
handleUnifiedQuerySearch,
|
|
262
|
-
handleUnifiedQueryReset,
|
|
263
|
-
handleListPageChange,
|
|
264
|
-
handleListSizeChange,
|
|
265
|
-
handleDetailQuerySearch,
|
|
266
|
-
handleDetailQueryReset,
|
|
267
|
-
handlePageChange,
|
|
268
|
-
handleSizeChange,
|
|
269
|
-
handleSelectionChange,
|
|
270
|
-
handleRowClick,
|
|
271
|
-
handleExperimentPageChange,
|
|
272
|
-
handleExperimentSizeChange,
|
|
273
|
-
handleTreeTabChange,
|
|
274
|
-
// 主表格编辑弹窗相关
|
|
275
|
-
mainModalConfig,
|
|
276
|
-
handleMainModalOk,
|
|
277
|
-
initData,
|
|
278
|
-
loadListData,
|
|
279
|
-
loadExperimentData,
|
|
280
|
-
cleanup
|
|
281
|
-
} from "./data";
|
|
282
|
-
|
|
283
|
-
// 弹窗引用
|
|
284
|
-
const mainModalRef = ref<InstanceType<typeof c_formModal>>();
|
|
285
|
-
|
|
286
|
-
// 生命周期
|
|
287
|
-
onMounted(() => {
|
|
288
|
-
activeTab.value === "list" ? loadListData() : initData();
|
|
289
|
-
// 延迟设置弹窗引用,确保组件已完全挂载
|
|
290
|
-
nextTick(() => {
|
|
291
|
-
if (typeof window !== "undefined" && mainModalRef.value) {
|
|
292
|
-
(window as any).mainModalRef = mainModalRef.value;
|
|
293
|
-
}
|
|
294
|
-
});
|
|
295
|
-
});
|
|
296
|
-
|
|
297
|
-
onUnmounted(cleanup);
|
|
298
|
-
|
|
299
|
-
// 标签切换监听
|
|
300
|
-
watch(activeTab, (newTab) => {
|
|
301
|
-
newTab === "detail" ? initData() : loadListData();
|
|
302
|
-
});
|
|
303
|
-
|
|
304
|
-
watch(detailActiveTab, (newTab) => {
|
|
305
|
-
if (newTab === "detail" && currentSelectedRow.value) {
|
|
306
|
-
loadExperimentData(currentSelectedRow.value);
|
|
307
|
-
}
|
|
308
|
-
});
|
|
309
|
-
</script>
|
|
310
|
-
|
|
311
|
-
<style scoped lang="scss">
|
|
312
|
-
@import "./index.scss";
|
|
313
|
-
</style>
|
|
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
|
+
<jh-drag-row :topHeight="320">
|
|
155
|
+
<template #top>
|
|
156
|
+
<div class="main-table-section">
|
|
157
|
+
<BaseTable
|
|
158
|
+
:key="updateKey"
|
|
159
|
+
:data="tableData"
|
|
160
|
+
:columns="tableColumnsConfig"
|
|
161
|
+
:loading="loading"
|
|
162
|
+
height="300px"
|
|
163
|
+
@selection-change="handleSelectionChange"
|
|
164
|
+
@row-click="handleRowClick"
|
|
165
|
+
/>
|
|
166
|
+
</div>
|
|
167
|
+
</template>
|
|
168
|
+
<template #bottom>
|
|
169
|
+
<div>
|
|
170
|
+
<div class="experiment-section">
|
|
171
|
+
<div class="experiment-header">
|
|
172
|
+
<div class="experiment-title">
|
|
173
|
+
<el-icon class="title-arrow"><ArrowDown /></el-icon>
|
|
174
|
+
<span class="title-text">实验项目信息</span>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
<BaseTable
|
|
179
|
+
:key="updateKey"
|
|
180
|
+
:data="experimentData"
|
|
181
|
+
:columns="experimentColumnsConfig"
|
|
182
|
+
:loading="loading"
|
|
183
|
+
height="250px"
|
|
184
|
+
:max-height="250"
|
|
185
|
+
style="overflow-y: auto"
|
|
186
|
+
/>
|
|
187
|
+
|
|
188
|
+
<div class="pagination-wrapper">
|
|
189
|
+
<jh-pagination
|
|
190
|
+
:current-page="experimentPagination.pageNum"
|
|
191
|
+
:page-size="experimentPagination.pageSize"
|
|
192
|
+
:total="experimentPagination.total"
|
|
193
|
+
@current-change="handleExperimentPageChange"
|
|
194
|
+
@size-change="handleExperimentSizeChange"
|
|
195
|
+
/>
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
</template>
|
|
200
|
+
</jh-drag-row>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
</template>
|
|
206
|
+
</jh-drag-col>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
<!-- 主表格编辑弹窗 -->
|
|
211
|
+
<c_formModal
|
|
212
|
+
ref="mainModalRef"
|
|
213
|
+
:form-items="mainModalConfig.formItems"
|
|
214
|
+
:api="mainModalConfig.api"
|
|
215
|
+
:width="mainModalConfig.width"
|
|
216
|
+
:columns="mainModalConfig.columns"
|
|
217
|
+
:label-width="mainModalConfig.labelWidth"
|
|
218
|
+
:title-prefix="mainModalConfig.titlePrefix"
|
|
219
|
+
@ok="handleMainModalOk"
|
|
220
|
+
/>
|
|
221
|
+
</template>
|
|
222
|
+
|
|
223
|
+
<script setup lang="ts">
|
|
224
|
+
import { onMounted, onUnmounted, watch, nextTick } from "vue";
|
|
225
|
+
import { ArrowDown, ArrowLeft } from "@element-plus/icons-vue";
|
|
226
|
+
import c_formModal from "@/components/local/c_formModal/index.vue";
|
|
227
|
+
// jh-drag-row 是 @jhlc/jh-ui 全局注册组件,无需 import
|
|
228
|
+
import {
|
|
229
|
+
// 状态
|
|
230
|
+
activeTab,
|
|
231
|
+
treeActiveTab,
|
|
232
|
+
detailActiveTab,
|
|
233
|
+
loading,
|
|
234
|
+
listLoading,
|
|
235
|
+
treeData,
|
|
236
|
+
tableData,
|
|
237
|
+
listTableData,
|
|
238
|
+
experimentData,
|
|
239
|
+
updateKey,
|
|
240
|
+
currentSelectedRow,
|
|
241
|
+
isTreeNodeSelected,
|
|
242
|
+
unifiedQueryForm,
|
|
243
|
+
detailQueryForm,
|
|
244
|
+
pagination,
|
|
245
|
+
listPagination,
|
|
246
|
+
experimentPagination,
|
|
247
|
+
// 配置
|
|
248
|
+
mainTabsConfig,
|
|
249
|
+
treeTabsConfig,
|
|
250
|
+
detailTabsConfig,
|
|
251
|
+
treeProps,
|
|
252
|
+
listQueryItemsConfig,
|
|
253
|
+
detailQueryItemsConfig,
|
|
254
|
+
tableColumnsConfig,
|
|
255
|
+
listTableColumnsConfig,
|
|
256
|
+
experimentColumnsConfig,
|
|
257
|
+
toolbarItems,
|
|
258
|
+
detailToolbarItems,
|
|
259
|
+
// 方法
|
|
260
|
+
handleNodeClick,
|
|
261
|
+
handleUnifiedQuerySearch,
|
|
262
|
+
handleUnifiedQueryReset,
|
|
263
|
+
handleListPageChange,
|
|
264
|
+
handleListSizeChange,
|
|
265
|
+
handleDetailQuerySearch,
|
|
266
|
+
handleDetailQueryReset,
|
|
267
|
+
handlePageChange,
|
|
268
|
+
handleSizeChange,
|
|
269
|
+
handleSelectionChange,
|
|
270
|
+
handleRowClick,
|
|
271
|
+
handleExperimentPageChange,
|
|
272
|
+
handleExperimentSizeChange,
|
|
273
|
+
handleTreeTabChange,
|
|
274
|
+
// 主表格编辑弹窗相关
|
|
275
|
+
mainModalConfig,
|
|
276
|
+
handleMainModalOk,
|
|
277
|
+
initData,
|
|
278
|
+
loadListData,
|
|
279
|
+
loadExperimentData,
|
|
280
|
+
cleanup
|
|
281
|
+
} from "./data";
|
|
282
|
+
|
|
283
|
+
// 弹窗引用
|
|
284
|
+
const mainModalRef = ref<InstanceType<typeof c_formModal>>();
|
|
285
|
+
|
|
286
|
+
// 生命周期
|
|
287
|
+
onMounted(() => {
|
|
288
|
+
activeTab.value === "list" ? loadListData() : initData();
|
|
289
|
+
// 延迟设置弹窗引用,确保组件已完全挂载
|
|
290
|
+
nextTick(() => {
|
|
291
|
+
if (typeof window !== "undefined" && mainModalRef.value) {
|
|
292
|
+
(window as any).mainModalRef = mainModalRef.value;
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
onUnmounted(cleanup);
|
|
298
|
+
|
|
299
|
+
// 标签切换监听
|
|
300
|
+
watch(activeTab, (newTab) => {
|
|
301
|
+
newTab === "detail" ? initData() : loadListData();
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
watch(detailActiveTab, (newTab) => {
|
|
305
|
+
if (newTab === "detail" && currentSelectedRow.value) {
|
|
306
|
+
loadExperimentData(currentSelectedRow.value);
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
</script>
|
|
310
|
+
|
|
311
|
+
<style scoped lang="scss">
|
|
312
|
+
@import "./index.scss";
|
|
313
|
+
</style>
|