vue2-client 1.22.2 → 1.22.3
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/.claude/settings.local.json +30 -30
- package/.env.his +19 -19
- package/.eslintrc.js +74 -74
- package/.history/.eslintrc_20260521171150.js +74 -0
- package/.history/.eslintrc_20260521171213.js +74 -0
- package/.history/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm_20260601154443.vue +726 -0
- package/.history/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm_20260601154700.vue +478 -0
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260512175435.vue +706 -0
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260512175450.vue +694 -0
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260611152602.vue +755 -0
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260513145941.vue +524 -0
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260513153133.vue +731 -0
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260513160316.vue +525 -0
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260601144150.vue +1046 -0
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260310142713.vue +512 -0
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260310145118.vue +511 -0
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260311094834.vue +696 -0
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260320143028.vue +693 -0
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260409101450.vue +677 -0
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260508164645.vue +758 -0
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260508164714.vue +693 -0
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260508171651.vue +716 -0
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260509133717.vue +695 -0
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260509171115.vue +664 -0
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513140637.vue +1455 -0
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513140935.vue +1441 -0
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513150818.vue +1441 -0
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513153119.vue +1442 -0
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513153126.vue +1486 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20260513140854.vue +1607 -0
- package/.history/src/base-client/components/common/XMarkdownViewer/XMarkdownViewer_20260519140403.vue +643 -0
- package/.history/src/base-client/components/common/XMarkdownViewer/XMarkdownViewer_20260519140829.vue +628 -0
- package/.history/src/base-client/components/common/XMarkdownViewer/demo_20260519142824.vue +104 -0
- package/.history/src/base-client/components/common/XMarkdownViewer/demo_20260519143155.vue +102 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20260309171231.vue +1241 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20260309171441.vue +1223 -0
- package/.history/src/base-client/components/his/HAi/HAi_20260612174826.vue +472 -0
- package/.history/src/base-client/components/his/HAi/HAi_20260612175839.vue +538 -0
- package/.history/src/base-client/components/his/HAi/HAi_20260615103331.vue +650 -0
- package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260424134504.vue +1469 -0
- package/.history/src/base-client/components/his/XSidebar/XSidebar_20260610171133.vue +788 -0
- package/.history/src/base-client/components/his/XSidebar/XSidebar_20260610171151.vue +780 -0
- package/.history/src/base-client/components/his/XTransfer/XTransfer_20260511170841.vue +585 -0
- package/.history/src/base-client/components/his/XTransfer/XTransfer_20260511171138.vue +787 -0
- package/.history/src/base-client/components/his/XTransfer/XTransfer_20260512141830.vue +739 -0
- package/.history/src/components/STable/index_20260409155138.js +806 -0
- package/.history/src/components/STable/index_20260409155218.js +814 -0
- package/.history/src/expression/core/Expression_20260305164427.js +1371 -0
- package/.history/src/expression/core/Expression_20260305170258.js +1358 -0
- package/.history/src/expression/core/Program_20260305111830.js +944 -0
- package/.history/src/expression/core/Program_20260305112041.js +931 -0
- package/.history/src/logic/LogicRunner_20260304154306.js +170 -0
- package/.history/src/logic/LogicRunner_20260304155553.js +112 -0
- package/.history/src/logic/LogicRunner_20260305105834.js +112 -0
- package/.history/src/logic/LogicRunner_20260305112718.js +129 -0
- package/.history/src/logic/LogicRunner_20260305182436.js +133 -0
- package/.history/src/logic/LogicRunner_20260306151301.js +213 -0
- package/.history/src/logic/LogicRunner_20260306152419.js +213 -0
- package/.history/src/logic/plugins/common/DateTools_20260305154159.js +61 -0
- package/.history/src/logic/plugins/common/DateTools_20260305154217.js +44 -0
- package/.history/src/logic/plugins/common/DateTools_20260305161014.js +44 -0
- package/.history/src/logic/plugins/common/HttpTools_20260305164352.js +80 -0
- package/.history/src/logic/plugins/common/HttpTools_20260305170258.js +75 -0
- package/.history/src/logic/plugins/common/HttpTools_20260305171634.js +75 -0
- package/.history/src/logic/plugins/common/HttpTools_20260306152419.js +72 -0
- package/.history/src/services/api/restTools_20260427142149.js +245 -0
- package/.history/src/services/api/restTools_20260427142853.js +230 -0
- package/.history/src/services/api/restTools_20260519135558.js +230 -0
- package/.history/src/services/api/restTools_20260519140825.js +230 -0
- package/.history/src/services/api/restTools_20260519151223.js +230 -0
- package/.history/src/utils/indexedDB_20260306150918.js +593 -0
- package/.history/src/utils/indexedDB_20260306151301.js +586 -0
- package/.idea/af-vue2-client.iml +9 -0
- package/.idea/codeStyles/Project.xml +62 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +1 -1
- package/Components.md +60 -60
- package/index.js +31 -31
- package/jest-transform-stub.js +8 -8
- package/jest.setup.js +7 -7
- package/package.json +1 -1
- package/preview-input-box.html +180 -0
- package/src/assets/img/querySlotDemo.svg +15 -15
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
- package/src/base-client/components/common/CitySelect/index.js +3 -3
- package/src/base-client/components/common/CitySelect/index.md +109 -109
- package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
- package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
- package/src/base-client/components/common/HIS/HButtons/HButtons.vue +55 -1
- package/src/base-client/components/common/HIS/HForm/HForm.vue +1186 -1186
- package/src/base-client/components/common/HIS/HTab/HTab.vue +88 -1
- package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
- package/src/base-client/components/common/PersonSetting/index.js +3 -3
- package/src/base-client/components/common/Tree/index.js +2 -2
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
- package/src/base-client/components/common/XAddReport/XAddReport.vue +16 -1
- package/src/base-client/components/common/XCard/XCard.vue +64 -64
- package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
- package/src/base-client/components/common/XDataDrawer/index.js +3 -3
- package/src/base-client/components/common/XDataDrawer/index.md +41 -41
- package/src/base-client/components/common/XDescriptions/index.js +3 -3
- package/src/base-client/components/common/XDescriptions/index.md +382 -382
- package/src/base-client/components/common/XForm/index.md +178 -178
- package/src/base-client/components/common/XInput/XInput.vue +32 -1
- package/src/base-client/components/common/XInspectionDetailDrawer/index.vue +1 -1
- package/src/base-client/components/common/XMarkdownViewer/demo.vue +102 -102
- package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
- package/src/base-client/components/common/XStepView/index.js +3 -3
- package/src/base-client/components/common/XStepView/index.md +31 -31
- package/src/base-client/components/common/XTable/index.md +255 -255
- package/src/base-client/components/his/HAi/HAi.vue +1177 -436
- package/src/base-client/components/his/XList/XList.vue +337 -58
- package/src/base-client/components/his/XSidebar/XSidebar.vue +36 -12
- package/src/base-client/components/his/XTransfer/index.md +327 -327
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
- package/src/base-client/plugins/Config.js +19 -19
- package/src/base-client/plugins/tabs-page-plugin.js +39 -39
- package/src/components/Charts/Bar.vue +62 -62
- package/src/components/Charts/ChartCard.vue +134 -134
- package/src/components/Charts/Liquid.vue +67 -67
- package/src/components/Charts/MiniArea.vue +39 -39
- package/src/components/Charts/MiniBar.vue +39 -39
- package/src/components/Charts/MiniProgress.vue +75 -75
- package/src/components/Charts/MiniSmoothArea.vue +40 -40
- package/src/components/Charts/Radar.vue +68 -68
- package/src/components/Charts/RankList.vue +77 -77
- package/src/components/Charts/TagCloud.vue +113 -113
- package/src/components/Charts/TransferBar.vue +64 -64
- package/src/components/Charts/Trend.vue +82 -82
- package/src/components/Charts/chart.less +12 -12
- package/src/components/Charts/smooth.area.less +13 -13
- package/src/components/NumberInfo/NumberInfo.vue +54 -54
- package/src/components/NumberInfo/index.js +3 -3
- package/src/components/NumberInfo/index.less +54 -54
- package/src/components/NumberInfo/index.md +43 -43
- package/src/components/STable/index.js +953 -953
- package/src/components/card/ChartCard.vue +79 -79
- package/src/components/chart/Bar.vue +60 -60
- package/src/components/chart/MiniArea.vue +67 -67
- package/src/components/chart/MiniBar.vue +59 -59
- package/src/components/chart/MiniProgress.vue +57 -57
- package/src/components/chart/Radar.vue +80 -80
- package/src/components/chart/RankingList.vue +60 -60
- package/src/components/chart/Trend.vue +79 -79
- package/src/components/chart/index.less +9 -9
- package/src/components/checkbox/ColorCheckbox.vue +157 -157
- package/src/components/input/IInput.vue +66 -66
- package/src/components/menu/SideMenu.vue +75 -75
- package/src/components/menu/menu.js +273 -273
- package/src/components/tool/AStepItem.vue +60 -60
- package/src/layouts/CommonLayout.vue +56 -56
- package/src/lib.js +1 -1
- package/src/mock/extend/index.js +84 -84
- package/src/mock/goods/index.js +108 -108
- package/src/pages/dashboard/workplace/WorkPlace.vue +141 -141
- package/src/pages/system/dictionary/index.vue +44 -44
- package/src/pages/system/monitor/loginInfor/index.vue +37 -37
- package/src/pages/system/monitor/operLog/index.vue +37 -37
- package/src/services/api/cas.js +79 -79
- package/src/store/modules/setting.js +119 -119
- package/src/utils/errorCode.js +6 -6
- package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
- package/.idea/MarsCodeWorkspaceAppSettings.xml +0 -7
- package/.idea/google-java-format.xml +0 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -24
- package/.idea/jsLinters/eslint.xml +0 -6
- package/.idea/vue2-client.iml +0 -12
- package/.vscode/settings.json +0 -28
package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260310142713.vue
ADDED
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
|
|
3
|
+
import { ref, computed, useAttrs, nextTick } from 'vue'
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
// HFormTable特有的属性
|
|
7
|
+
tableStyle: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: 'formtable-col1'
|
|
10
|
+
}
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
// 兼容多种样式配置
|
|
14
|
+
const attrs = useAttrs()
|
|
15
|
+
|
|
16
|
+
// 从attrs中获取行高度,默认37px
|
|
17
|
+
const getRowHeight = () => {
|
|
18
|
+
const val = attrs.rowHeight || attrs['row-height']
|
|
19
|
+
return val || '37px'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const wrapperClassObject = computed(() => {
|
|
23
|
+
const a = attrs
|
|
24
|
+
const classes = {}
|
|
25
|
+
|
|
26
|
+
// 通用布尔样式开关(以存在/空字符串/'true' 为真)
|
|
27
|
+
const booleanStyleKeys = [
|
|
28
|
+
'button-row-0margin',
|
|
29
|
+
'top-hidden',
|
|
30
|
+
'dialog-style',
|
|
31
|
+
'button-style',
|
|
32
|
+
'header-center',
|
|
33
|
+
'expanded-grid-white',
|
|
34
|
+
'report-mode',
|
|
35
|
+
// listView模式下隐藏“已选择”按钮
|
|
36
|
+
'listview-hide-selected',
|
|
37
|
+
'min-height-auto'
|
|
38
|
+
]
|
|
39
|
+
for (const key of booleanStyleKeys) {
|
|
40
|
+
const val = a[key]
|
|
41
|
+
const truthy = val === true || val === '' || val === 'true'
|
|
42
|
+
if (truthy) classes[`h-form-table-${key}`] = true
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// 兼容通过 attrs 透传的分页样式:将值映射为当前样式中存在的类名
|
|
46
|
+
const paginationAttr = a && a.paginationStyle
|
|
47
|
+
if (paginationAttr && ['pagination-center', 'custom-pagination'].includes(paginationAttr)) {
|
|
48
|
+
classes[`h-form-table-${paginationAttr}`] = true
|
|
49
|
+
}
|
|
50
|
+
return classes
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
// 通过暴露的实例访问 $slots,避免直接依赖 Composition API 的 useSlots
|
|
54
|
+
// 在模板中使用 `$slots` 遍历以保持与 Vue2 兼容
|
|
55
|
+
// 创建对XFormTable组件的引用
|
|
56
|
+
const xFormTableRef = ref()
|
|
57
|
+
|
|
58
|
+
// 使用 MutationObserver 监听展开行高度变化,实时同步固定列
|
|
59
|
+
let observer = null
|
|
60
|
+
const setupHeightSync = () => {
|
|
61
|
+
try {
|
|
62
|
+
const wrapper = document.querySelector('.h-form-table-wrapper')
|
|
63
|
+
if (!wrapper || observer) return
|
|
64
|
+
|
|
65
|
+
observer = new MutationObserver((mutations) => {
|
|
66
|
+
// 只在展开行相关变化时同步,避免不必要的计算
|
|
67
|
+
const hasRelevantChange = mutations.some(mutation =>
|
|
68
|
+
mutation.type === 'attributes' &&
|
|
69
|
+
(mutation.attributeName === 'style' || mutation.attributeName === 'class') ||
|
|
70
|
+
mutation.type === 'childList'
|
|
71
|
+
)
|
|
72
|
+
if (hasRelevantChange) {
|
|
73
|
+
syncFixedExpandedHeights()
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
// 监听主表展开行的属性变化
|
|
78
|
+
const mainTable = wrapper.querySelector('.ant-table-body > table > tbody')
|
|
79
|
+
if (mainTable) {
|
|
80
|
+
observer.observe(mainTable, {
|
|
81
|
+
childList: true,
|
|
82
|
+
subtree: true,
|
|
83
|
+
attributes: true,
|
|
84
|
+
attributeFilter: ['style', 'class']
|
|
85
|
+
})
|
|
86
|
+
}
|
|
87
|
+
} catch (e) {
|
|
88
|
+
console.warn('[HFormTable] setupHeightSync error:', e)
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// 同步固定列中的"展开行"高度到主表展开行高度,避免错位
|
|
93
|
+
const syncFixedExpandedHeights = () => {
|
|
94
|
+
try {
|
|
95
|
+
const wrapper = document.querySelector('.h-form-table-wrapper')
|
|
96
|
+
if (!wrapper) return
|
|
97
|
+
const mainRows = Array.from(wrapper.querySelectorAll('.ant-table-body > table > tbody > tr'))
|
|
98
|
+
const fixedRows = Array.from(wrapper.querySelectorAll('.ant-table-fixed-right .ant-table-body-inner > table > tbody > tr'))
|
|
99
|
+
const len = Math.min(mainRows.length, fixedRows.length)
|
|
100
|
+
|
|
101
|
+
for (let i = 0; i < len; i++) {
|
|
102
|
+
const m = mainRows[i]
|
|
103
|
+
const f = fixedRows[i]
|
|
104
|
+
if (!f) continue
|
|
105
|
+
|
|
106
|
+
if (m.classList.contains('ant-table-expanded-row')) {
|
|
107
|
+
const h = m.clientHeight
|
|
108
|
+
// 缓存高度,避免重复设置
|
|
109
|
+
if (f.dataset.syncedHeight === h.toString()) continue
|
|
110
|
+
f.dataset.syncedHeight = h.toString()
|
|
111
|
+
|
|
112
|
+
// 强制同步高度,使用 !important 覆盖其他样式
|
|
113
|
+
f.style.setProperty('height', h + 'px', 'important')
|
|
114
|
+
f.style.setProperty('min-height', h + 'px', 'important')
|
|
115
|
+
f.style.setProperty('max-height', h + 'px', 'important')
|
|
116
|
+
|
|
117
|
+
// 同步单元格高度,确保完全一致
|
|
118
|
+
const tds = f.querySelectorAll('td')
|
|
119
|
+
tds.forEach(td => {
|
|
120
|
+
td.style.setProperty('height', h + 'px', 'important')
|
|
121
|
+
td.style.setProperty('min-height', h + 'px', 'important')
|
|
122
|
+
td.style.setProperty('max-height', h + 'px', 'important')
|
|
123
|
+
td.style.setProperty('padding', '0', 'important')
|
|
124
|
+
td.style.setProperty('border', 'none', 'important')
|
|
125
|
+
})
|
|
126
|
+
} else {
|
|
127
|
+
// 清理非展开行的内联样式和缓存
|
|
128
|
+
if (f.dataset.syncedHeight) {
|
|
129
|
+
f.removeAttribute('data-synced-height')
|
|
130
|
+
f.style.removeProperty('height')
|
|
131
|
+
f.style.removeProperty('min-height')
|
|
132
|
+
f.style.removeProperty('max-height')
|
|
133
|
+
const tds = f.querySelectorAll('td')
|
|
134
|
+
tds.forEach(td => {
|
|
135
|
+
td.style.removeProperty('height')
|
|
136
|
+
td.style.removeProperty('min-height')
|
|
137
|
+
td.style.removeProperty('max-height')
|
|
138
|
+
td.style.removeProperty('padding')
|
|
139
|
+
td.style.removeProperty('border')
|
|
140
|
+
})
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
} catch (e) {
|
|
145
|
+
console.warn('[HFormTable] syncFixedExpandedHeights error:', e)
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const onExpandLog = (expanded, record) => {
|
|
150
|
+
// 等DOM完成再测量
|
|
151
|
+
nextTick(() => {
|
|
152
|
+
// 设置实时监听(如果还没设置)
|
|
153
|
+
if (!observer) {
|
|
154
|
+
setupHeightSync()
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// 立即同步一次(避免第一次展开时错位)
|
|
158
|
+
syncFixedExpandedHeights()
|
|
159
|
+
|
|
160
|
+
// 短延迟再同步一次(应对异步渲染)
|
|
161
|
+
setTimeout(() => {
|
|
162
|
+
syncFixedExpandedHeights()
|
|
163
|
+
}, 20)
|
|
164
|
+
})
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// 暴露方法给父组件使用
|
|
168
|
+
defineExpose({
|
|
169
|
+
// 为了兼容性,保留getXFormTableInstance方法
|
|
170
|
+
getXFormTableInstance: () => xFormTableRef.value,
|
|
171
|
+
/** 等待配置结束的异步方法,委托给内部 XFormTable */
|
|
172
|
+
waitConfigEnd: () => xFormTableRef.value?.waitConfigEnd?.() ?? Promise.resolve()
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
// 计算是否使用自定义分页(兼容 attrs 透传与 tableStyle 配置)
|
|
176
|
+
const isCustomPagination = computed(() => {
|
|
177
|
+
const a = attrs
|
|
178
|
+
const paginationAttr = (a && a.paginationStyle) || ''
|
|
179
|
+
return props.tableStyle === 'custom-pagination' || paginationAttr === 'custom-pagination'
|
|
180
|
+
})
|
|
181
|
+
// 是否隐藏顶部功能区
|
|
182
|
+
const isHiddenFunctionalArea = computed(() => {
|
|
183
|
+
return attrs.hiddenFunctionalArea === 'true' || attrs.hiddenFunctionalArea === true
|
|
184
|
+
})
|
|
185
|
+
|
|
186
|
+
// 从 attrs 中获取 pageMaxSize,如果存在则作为 defaultPageSize
|
|
187
|
+
const computedDefaultPageSize = computed(() => {
|
|
188
|
+
const pageMaxSize = attrs.pageMaxSize
|
|
189
|
+
// 将字符串转换为数字,如果无效则使用默认值
|
|
190
|
+
const numericPageSize = pageMaxSize ? Number(pageMaxSize) : null
|
|
191
|
+
const defaultSize = (numericPageSize && numericPageSize > 0) ? numericPageSize : 10
|
|
192
|
+
|
|
193
|
+
return defaultSize
|
|
194
|
+
})
|
|
195
|
+
</script>
|
|
196
|
+
|
|
197
|
+
<template>
|
|
198
|
+
<div
|
|
199
|
+
class="h-form-table-wrapper"
|
|
200
|
+
:class="[
|
|
201
|
+
`h-form-table-${tableStyle}`,
|
|
202
|
+
wrapperClassObject
|
|
203
|
+
]"
|
|
204
|
+
:style="{ '--row-height': getRowHeight() }"
|
|
205
|
+
>
|
|
206
|
+
<x-form-table
|
|
207
|
+
ref="xFormTableRef"
|
|
208
|
+
v-bind="$attrs"
|
|
209
|
+
:defaultPageSize="computedDefaultPageSize"
|
|
210
|
+
:customPagination="isCustomPagination"
|
|
211
|
+
:hiddenFunctionalArea="isHiddenFunctionalArea"
|
|
212
|
+
@expand="onExpandLog"
|
|
213
|
+
@configEnd="$emit('configEnd')"
|
|
214
|
+
v-on="$listeners"
|
|
215
|
+
>
|
|
216
|
+
<template v-for="(_, name) in $slots" #[name]="slotData">
|
|
217
|
+
<slot :name="name" v-bind="slotData" />
|
|
218
|
+
</template>
|
|
219
|
+
</x-form-table>
|
|
220
|
+
</div>
|
|
221
|
+
</template>
|
|
222
|
+
|
|
223
|
+
<style scoped lang="less">
|
|
224
|
+
// 表格行高度变量,默认37px
|
|
225
|
+
@row-height: var(--row-height, 37px);
|
|
226
|
+
|
|
227
|
+
.h-form-table-wrapper {
|
|
228
|
+
// 基础样式
|
|
229
|
+
:deep(.table-wrapper) {
|
|
230
|
+
.ant-table {
|
|
231
|
+
.ant-table-row {
|
|
232
|
+
margin: 0px;
|
|
233
|
+
height: @row-height;
|
|
234
|
+
line-height: @row-height;
|
|
235
|
+
|
|
236
|
+
> td {
|
|
237
|
+
height: @row-height;
|
|
238
|
+
line-height: @row-height;
|
|
239
|
+
padding-top: 0;
|
|
240
|
+
padding-bottom: 0;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.ant-form-item {
|
|
244
|
+
margin: 0px;
|
|
245
|
+
|
|
246
|
+
.ant-form-item-control-wrapper {
|
|
247
|
+
.ant-form-item-control {
|
|
248
|
+
line-height: 0px;
|
|
249
|
+
|
|
250
|
+
.ant-select-selection--multiple {
|
|
251
|
+
padding-bottom: 2px;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
width: 100%;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
font-size: 16px;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.ant-alert-info {
|
|
262
|
+
display: none;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
:deep(.ant-card) {
|
|
267
|
+
margin: -10px 0px 29px 0px;
|
|
268
|
+
}
|
|
269
|
+
:deep(.ant-space .ant-btn .anticon) {
|
|
270
|
+
display: none;
|
|
271
|
+
}
|
|
272
|
+
:deep(.ant-space .ant-btn) {
|
|
273
|
+
border: 0px;
|
|
274
|
+
box-shadow: none;
|
|
275
|
+
padding: 0px;
|
|
276
|
+
color: #5D5C5C;
|
|
277
|
+
font-weight: bold;
|
|
278
|
+
letter-spacing: 0em;
|
|
279
|
+
font-size: 18px;
|
|
280
|
+
line-height: normal;
|
|
281
|
+
background-color: transparent;
|
|
282
|
+
font-family: "Source Han Sans";
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
:deep(.ant-card-body) {
|
|
286
|
+
padding: 0 6px;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
:deep(.ant-table-small) {
|
|
290
|
+
border-width: 0;
|
|
291
|
+
|
|
292
|
+
.ant-table-fixed {
|
|
293
|
+
border-radius: 0;
|
|
294
|
+
border-bottom: 1px solid #f0f0f0;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// 表格高度样式
|
|
299
|
+
&.h-form-table-height {
|
|
300
|
+
:deep(.table-wrapper) {
|
|
301
|
+
.ant-select-open ~ .ant-table-content {
|
|
302
|
+
height: 500px !important;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
// 表格最小高度自动
|
|
307
|
+
&.h-form-table-min-height-auto {
|
|
308
|
+
:deep(.table-wrapper) {
|
|
309
|
+
.ant-table:not(.ant-table-empty) {
|
|
310
|
+
.ant-table-content {
|
|
311
|
+
min-height: auto !important;
|
|
312
|
+
.ant-table-body {
|
|
313
|
+
min-height: auto !important;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// 修复数据量少时下拉框被挡住的问题:为表格内容区域设置最小高度
|
|
321
|
+
// 当表格有数据时,确保表格内容区域有足够高度,避免下拉框被挡住
|
|
322
|
+
// 注意:只在表格有数据时应用,避免空表格时显示问题
|
|
323
|
+
:deep(.table-wrapper) {
|
|
324
|
+
.ant-table:not(.ant-table-empty) {
|
|
325
|
+
.ant-table-content {
|
|
326
|
+
// 设置最小高度,确保即使数据少时也有足够空间显示下拉框
|
|
327
|
+
// 这个高度应该足够显示下拉框选项(通常下拉框高度约200-300px)
|
|
328
|
+
min-height: 300px;
|
|
329
|
+
.ant-table-body {
|
|
330
|
+
// 确保表格体也有最小高度,保证滚动容器有足够空间
|
|
331
|
+
min-height: 250px;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// 表格样式
|
|
338
|
+
&.h-form-table-table {
|
|
339
|
+
:deep(.ant-table-small .ant-table-fixed-header) {
|
|
340
|
+
.ant-table-content {
|
|
341
|
+
.ant-table-content {
|
|
342
|
+
.ant-table-body {
|
|
343
|
+
border-radius: 0 0 4px 4px;
|
|
344
|
+
// 修复展开行后固定列与主体错位:保持表体滚动容器为自动滚动
|
|
345
|
+
overflow: auto !important;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
// 移除之前隐藏固定列占位行的样式,保持与主体行数一致
|
|
352
|
+
// 展开行单元格去除额外内边距,避免高度不一致
|
|
353
|
+
:deep(.ant-table-expanded-row > td) {
|
|
354
|
+
padding: 0 !important;
|
|
355
|
+
}
|
|
356
|
+
// 展开内容中的表单/控件去掉外边距,避免撑高
|
|
357
|
+
:deep(.ant-table-expanded-row .ant-form-item) {
|
|
358
|
+
margin-bottom: 0 !important;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// 移除之前的隐藏固定列样式,避免展开/合并后操作列消失
|
|
362
|
+
&.h-form-table-dialog-style {
|
|
363
|
+
/* 选择前面的兄弟元素 */
|
|
364
|
+
:global(.ant-col.ant-col-24[name="trGroup"]:has(+ .ant-card .ant-card-body .h-form-table-wrapper.h-form-table-dialog-style)) {
|
|
365
|
+
padding-top: 0px !important;
|
|
366
|
+
padding-left: 0px !important;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
:global(.ant-card-body:has(.h-form-table-wrapper.h-form-table-dialog-style)) {
|
|
370
|
+
padding-top: 0px !important;
|
|
371
|
+
padding-left: 0px !important;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
// 隐藏按钮区域
|
|
375
|
+
&.h-form-table-button-area-hide {
|
|
376
|
+
:deep(.ant-btn) {
|
|
377
|
+
display: none;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
:deep(.table-wrapper) {
|
|
381
|
+
margin-top: -39px;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// 顶部区域隐藏(与按钮隐藏一致的视觉需求)
|
|
386
|
+
&.h-form-table-top-hidden {
|
|
387
|
+
:deep(.ant-btn) {
|
|
388
|
+
display: none;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
:deep(.table-wrapper) {
|
|
392
|
+
margin-top: -39px;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
// 列样式1
|
|
397
|
+
&.h-form-table-formtable-col1 {
|
|
398
|
+
:deep(.table-wrapper) {
|
|
399
|
+
.ant-row {
|
|
400
|
+
.ant-col span {
|
|
401
|
+
border: none;
|
|
402
|
+
width: auto;
|
|
403
|
+
margin-bottom: auto;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.ant-table {
|
|
408
|
+
.ant-table-body {
|
|
409
|
+
.ant-table-fixed colgroup col:nth-child(2) {
|
|
410
|
+
width: 50px;
|
|
411
|
+
min-width: 50px;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.ant-table-header {
|
|
416
|
+
.ant-table-fixed colgroup col:nth-child(2) {
|
|
417
|
+
width: 50px;
|
|
418
|
+
min-width: 50px;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// 底部分页居中 & 自定义分页样式(共用样式)
|
|
426
|
+
&.h-form-table-bottom-center,
|
|
427
|
+
&.h-form-table-custom-pagination {
|
|
428
|
+
:deep(.table-wrapper) {
|
|
429
|
+
.ant-row-flex-start {
|
|
430
|
+
position: relative;
|
|
431
|
+
display: flex;
|
|
432
|
+
align-items: center;
|
|
433
|
+
margin-top: 12px !important;
|
|
434
|
+
height: 32px;
|
|
435
|
+
|
|
436
|
+
// 防止第一个子元素无限拉伸,影响分页居中
|
|
437
|
+
> :first-child {
|
|
438
|
+
flex: 0 0 auto;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// 将第二个子元素(分页)绝对居中
|
|
442
|
+
> :nth-child(2) {
|
|
443
|
+
position: absolute;
|
|
444
|
+
left: 50%;
|
|
445
|
+
transform: translateX(-50%);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// 按钮行0margin
|
|
452
|
+
&.h-form-table-button-row-0margin {
|
|
453
|
+
:deep(.ant-row) {
|
|
454
|
+
margin: 0px;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
// crud按钮样式
|
|
458
|
+
&.h-form-table-button-style {
|
|
459
|
+
:deep(.ant-btn){
|
|
460
|
+
border-radius: 6px;
|
|
461
|
+
background-color: #FFFFFF;
|
|
462
|
+
border: 1px solid #9499A0;
|
|
463
|
+
color: #313131;
|
|
464
|
+
font-weight: normal;
|
|
465
|
+
letter-spacing: 0em;
|
|
466
|
+
font-size: 16px;
|
|
467
|
+
font-family: "Source Han Sans";
|
|
468
|
+
line-height: normal;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
// 表格内容全部居中样式
|
|
472
|
+
&.h-form-table-header-center {
|
|
473
|
+
:deep(.ant-table-thead > tr > th),
|
|
474
|
+
:deep(.ant-table-tbody > tr > td) {
|
|
475
|
+
text-align: center !important;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
// 行展开白色背景
|
|
479
|
+
&.h-form-table-expanded-grid-white {
|
|
480
|
+
:deep(.ant-table-expanded-row){
|
|
481
|
+
background-color: white;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
// listView模式下隐藏“已选择”按钮(该按钮包含 monitor 图标)
|
|
485
|
+
&.h-form-table-listview-hide-selected {
|
|
486
|
+
:deep(.ant-badge:has(.ant-btn .anticon-monitor)) {
|
|
487
|
+
display: none !important;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
// 报表样式
|
|
491
|
+
@skip-cells: 2;
|
|
492
|
+
&.h-form-table-report-mode {
|
|
493
|
+
--skip-cells: 4;
|
|
494
|
+
:deep(.ant-table-header){
|
|
495
|
+
padding-bottom: 0px !important;
|
|
496
|
+
}
|
|
497
|
+
:deep(.ant-table-content){
|
|
498
|
+
border: 1px solid #E5E9F0;
|
|
499
|
+
}
|
|
500
|
+
:deep(.resize-table-th){
|
|
501
|
+
background-color: white !important;
|
|
502
|
+
}
|
|
503
|
+
:deep(.ant-table-row) {
|
|
504
|
+
.ant-table-row-cell-ellipsis {
|
|
505
|
+
&:nth-child(n + @{skip-cells}) {
|
|
506
|
+
color: #3362DA !important;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
</style>
|