vue2-client 1.22.3 → 1.22.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/.env.his +19 -19
- package/.idea/.name +1 -0
- package/.idea/MarsCodeWorkspaceAppSettings.xml +8 -0
- package/.idea/deployment.xml +14 -0
- package/.idea/gradle.xml +7 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/libraries/contour_plot.xml +9 -0
- package/.idea/material_theme_project_new.xml +18 -0
- package/.idea/misc.xml +87 -5
- package/package.json +1 -1
- package/src/base-client/components/common/HIS/HForm/HForm.vue +1186 -1186
- package/src/base-client/components/common/XMarkdownViewer/demo.vue +102 -102
- package/src/base-client/components/his/HAi/HAi.vue +1177 -1177
- package/src/base-client/components/his/XTransfer/index.md +327 -327
- package/src/base-client/plugins/GetLoginInfoService.js +4 -4
- package/src/utils/login.js +11 -11
- package/.history/.eslintrc_20260521171150.js +0 -74
- package/.history/.eslintrc_20260521171213.js +0 -74
- package/.history/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm_20260601154443.vue +0 -726
- package/.history/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm_20260601154700.vue +0 -478
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260512175435.vue +0 -706
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260512175450.vue +0 -694
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260611152602.vue +0 -755
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260513145941.vue +0 -524
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260513153133.vue +0 -731
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260513160316.vue +0 -525
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260601144150.vue +0 -1046
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260310142713.vue +0 -512
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260310145118.vue +0 -511
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260311094834.vue +0 -696
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260320143028.vue +0 -693
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260409101450.vue +0 -677
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260508164645.vue +0 -758
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260508164714.vue +0 -693
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260508171651.vue +0 -716
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260509133717.vue +0 -695
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260509171115.vue +0 -664
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513140637.vue +0 -1455
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513140935.vue +0 -1441
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513150818.vue +0 -1441
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513153119.vue +0 -1442
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513153126.vue +0 -1486
- package/.history/src/base-client/components/common/XForm/XFormItem_20260513140854.vue +0 -1607
- package/.history/src/base-client/components/common/XMarkdownViewer/XMarkdownViewer_20260519140403.vue +0 -643
- package/.history/src/base-client/components/common/XMarkdownViewer/XMarkdownViewer_20260519140829.vue +0 -628
- package/.history/src/base-client/components/common/XMarkdownViewer/demo_20260519142824.vue +0 -104
- package/.history/src/base-client/components/common/XMarkdownViewer/demo_20260519143155.vue +0 -102
- package/.history/src/base-client/components/common/XReportGrid/XReport_20260309171231.vue +0 -1241
- package/.history/src/base-client/components/common/XReportGrid/XReport_20260309171441.vue +0 -1223
- package/.history/src/base-client/components/his/HAi/HAi_20260612174826.vue +0 -472
- package/.history/src/base-client/components/his/HAi/HAi_20260612175839.vue +0 -538
- package/.history/src/base-client/components/his/HAi/HAi_20260615103331.vue +0 -650
- package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260424134504.vue +0 -1469
- package/.history/src/base-client/components/his/XSidebar/XSidebar_20260610171133.vue +0 -788
- package/.history/src/base-client/components/his/XSidebar/XSidebar_20260610171151.vue +0 -780
- package/.history/src/base-client/components/his/XTransfer/XTransfer_20260511170841.vue +0 -585
- package/.history/src/base-client/components/his/XTransfer/XTransfer_20260511171138.vue +0 -787
- package/.history/src/base-client/components/his/XTransfer/XTransfer_20260512141830.vue +0 -739
- package/.history/src/components/STable/index_20260409155138.js +0 -806
- package/.history/src/components/STable/index_20260409155218.js +0 -814
- package/.history/src/expression/core/Expression_20260305164427.js +0 -1371
- package/.history/src/expression/core/Expression_20260305170258.js +0 -1358
- package/.history/src/expression/core/Program_20260305111830.js +0 -944
- package/.history/src/expression/core/Program_20260305112041.js +0 -931
- package/.history/src/logic/LogicRunner_20260304154306.js +0 -170
- package/.history/src/logic/LogicRunner_20260304155553.js +0 -112
- package/.history/src/logic/LogicRunner_20260305105834.js +0 -112
- package/.history/src/logic/LogicRunner_20260305112718.js +0 -129
- package/.history/src/logic/LogicRunner_20260305182436.js +0 -133
- package/.history/src/logic/LogicRunner_20260306151301.js +0 -213
- package/.history/src/logic/LogicRunner_20260306152419.js +0 -213
- package/.history/src/logic/plugins/common/DateTools_20260305154159.js +0 -61
- package/.history/src/logic/plugins/common/DateTools_20260305154217.js +0 -44
- package/.history/src/logic/plugins/common/DateTools_20260305161014.js +0 -44
- package/.history/src/logic/plugins/common/HttpTools_20260305164352.js +0 -80
- package/.history/src/logic/plugins/common/HttpTools_20260305170258.js +0 -75
- package/.history/src/logic/plugins/common/HttpTools_20260305171634.js +0 -75
- package/.history/src/logic/plugins/common/HttpTools_20260306152419.js +0 -72
- package/.history/src/services/api/restTools_20260427142149.js +0 -245
- package/.history/src/services/api/restTools_20260427142853.js +0 -230
- package/.history/src/services/api/restTools_20260519135558.js +0 -230
- package/.history/src/services/api/restTools_20260519140825.js +0 -230
- package/.history/src/services/api/restTools_20260519151223.js +0 -230
- package/.history/src/utils/indexedDB_20260306150918.js +0 -593
- package/.history/src/utils/indexedDB_20260306151301.js +0 -586
- package/.idea/codeStyles/Project.xml +0 -62
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/preview-input-box.html +0 -180
|
@@ -1,585 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { ref, watch, onMounted } from 'vue'
|
|
3
|
-
import { runLogic, getConfigByName } from '@vue2-client/services/api/common'
|
|
4
|
-
|
|
5
|
-
const props = defineProps({
|
|
6
|
-
queryParamsName: { type: String, default: '' },
|
|
7
|
-
configName: { type: String, default: '' },
|
|
8
|
-
serverName: { type: String, default: 'af-his' },
|
|
9
|
-
logicName: { type: String, default: '' },
|
|
10
|
-
parameter: { type: Object, default: () => ({}) },
|
|
11
|
-
rowKey: { type: String, default: 'id' },
|
|
12
|
-
displayKey: { type: String, default: 'itemName' },
|
|
13
|
-
descriptionKey: { type: String, default: 'itemCode' },
|
|
14
|
-
groupKey: { type: String, default: 'category' },
|
|
15
|
-
groupLabelKey: { type: String, default: 'categoryName' },
|
|
16
|
-
groupCountKey: { type: String, default: 'itemCount' },
|
|
17
|
-
groupItemsKey: { type: String, default: 'items' },
|
|
18
|
-
leftTitle: { type: String, default: '' },
|
|
19
|
-
rightTitle: { type: String, default: '' },
|
|
20
|
-
allText: { type: String, default: 'All' },
|
|
21
|
-
leftWidth: { type: String, default: '324px' },
|
|
22
|
-
rightWidth: { type: String, default: '324px' },
|
|
23
|
-
height: { type: String, default: '143px' },
|
|
24
|
-
initialValue: { type: Array, default: () => [] },
|
|
25
|
-
disabled: { type: Boolean, default: false },
|
|
26
|
-
data: { type: Array, default: null },
|
|
27
|
-
config: { type: Object, default: null },
|
|
28
|
-
env: { type: String, default: 'prod' }
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
const emit = defineEmits(['update:value', 'change', 'loaded'])
|
|
32
|
-
|
|
33
|
-
const loading = ref(false)
|
|
34
|
-
const localValue = ref([])
|
|
35
|
-
const localDataSource = ref([])
|
|
36
|
-
const localGroupDataSource = ref([])
|
|
37
|
-
|
|
38
|
-
const isDev = () => props.env !== 'prod'
|
|
39
|
-
|
|
40
|
-
const totalCount = ref(0)
|
|
41
|
-
|
|
42
|
-
watch(() => props.value, (newVal) => {
|
|
43
|
-
if (newVal !== undefined && JSON.stringify(newVal) !== JSON.stringify(localValue.value)) {
|
|
44
|
-
localValue.value = [...newVal]
|
|
45
|
-
}
|
|
46
|
-
}, { immediate: true })
|
|
47
|
-
|
|
48
|
-
watch(localValue, (newVal) => {
|
|
49
|
-
emit('update:value', newVal)
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
const loadData = async () => {
|
|
53
|
-
loading.value = true
|
|
54
|
-
try {
|
|
55
|
-
let data = []
|
|
56
|
-
|
|
57
|
-
if (props.data && Array.isArray(props.data)) {
|
|
58
|
-
data = props.data
|
|
59
|
-
} else if (props.logicName) {
|
|
60
|
-
data = await loadByLogic()
|
|
61
|
-
} else if (props.queryParamsName || props.configName) {
|
|
62
|
-
await loadByConfig()
|
|
63
|
-
return
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
parseData(data)
|
|
67
|
-
if (props.initialValue.length > 0) {
|
|
68
|
-
localValue.value = [...props.initialValue]
|
|
69
|
-
}
|
|
70
|
-
totalCount.value = localDataSource.value.length
|
|
71
|
-
emit('loaded', {
|
|
72
|
-
dataSource: localDataSource.value,
|
|
73
|
-
groupDataSource: localGroupDataSource.value
|
|
74
|
-
})
|
|
75
|
-
} catch (e) {
|
|
76
|
-
console.error('[XTransfer] Load error:', e)
|
|
77
|
-
} finally {
|
|
78
|
-
loading.value = false
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const loadByConfig = () => {
|
|
83
|
-
return new Promise((resolve) => {
|
|
84
|
-
const configName = props.queryParamsName || props.configName
|
|
85
|
-
getConfigByName(configName, props.serverName, async (config) => {
|
|
86
|
-
if (!config) {
|
|
87
|
-
loading.value = false
|
|
88
|
-
resolve()
|
|
89
|
-
return
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (config.logicName) {
|
|
93
|
-
const data = await loadByLogicWithConfig(config)
|
|
94
|
-
parseData(data)
|
|
95
|
-
if (props.initialValue.length > 0) {
|
|
96
|
-
localValue.value = [...props.initialValue]
|
|
97
|
-
}
|
|
98
|
-
totalCount.value = localDataSource.value.length
|
|
99
|
-
emit('loaded', {
|
|
100
|
-
dataSource: localDataSource.value,
|
|
101
|
-
groupDataSource: localGroupDataSource.value
|
|
102
|
-
})
|
|
103
|
-
} else if (config.data && Array.isArray(config.data)) {
|
|
104
|
-
parseData(config.data)
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
loading.value = false
|
|
108
|
-
resolve()
|
|
109
|
-
}, isDev())
|
|
110
|
-
})
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const loadByLogicWithConfig = async (config) => {
|
|
114
|
-
const logic = config.logicName || props.logicName
|
|
115
|
-
const params = config.parameter || props.parameter
|
|
116
|
-
const server = config.serverName || props.serverName
|
|
117
|
-
|
|
118
|
-
try {
|
|
119
|
-
const res = await runLogic(logic, params, server, isDev())
|
|
120
|
-
if (res) {
|
|
121
|
-
return Array.isArray(res) ? res : (res.data || res.result || [])
|
|
122
|
-
}
|
|
123
|
-
} catch (e) {
|
|
124
|
-
console.error('[XTransfer] logic error:', e)
|
|
125
|
-
}
|
|
126
|
-
return []
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
const loadByLogic = async () => {
|
|
130
|
-
try {
|
|
131
|
-
const res = await runLogic(props.logicName, props.parameter, props.serverName, isDev())
|
|
132
|
-
if (res) {
|
|
133
|
-
return Array.isArray(res) ? res : (res.data || res.result || [])
|
|
134
|
-
}
|
|
135
|
-
} catch (e) {
|
|
136
|
-
console.error('[XTransfer] logic error:', e)
|
|
137
|
-
}
|
|
138
|
-
return []
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const parseData = (data) => {
|
|
142
|
-
if (!data || !Array.isArray(data)) {
|
|
143
|
-
localDataSource.value = []
|
|
144
|
-
localGroupDataSource.value = []
|
|
145
|
-
return
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
const firstItem = data[0]
|
|
149
|
-
const hasGroup = firstItem && (firstItem[props.groupKey] || firstItem[props.groupLabelKey])
|
|
150
|
-
|
|
151
|
-
if (hasGroup) {
|
|
152
|
-
localGroupDataSource.value = data.map(group => ({
|
|
153
|
-
key: group[props.rowKey] || group.key,
|
|
154
|
-
label: group[props.groupLabelKey] || group.label || '未命名',
|
|
155
|
-
count: group[props.groupCountKey] || (group[props.groupItemsKey]?.length || 0),
|
|
156
|
-
items: transformItems(group[props.groupItemsKey] || group.items || []),
|
|
157
|
-
_rawData: group
|
|
158
|
-
}))
|
|
159
|
-
|
|
160
|
-
localDataSource.value = []
|
|
161
|
-
data.forEach(group => {
|
|
162
|
-
const items = group[props.groupItemsKey] || group.items || []
|
|
163
|
-
localDataSource.value.push(...transformItems(items))
|
|
164
|
-
})
|
|
165
|
-
} else {
|
|
166
|
-
localDataSource.value = transformItems(data)
|
|
167
|
-
localGroupDataSource.value = []
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
const transformItems = (items) => {
|
|
172
|
-
if (!items || !Array.isArray(items)) return []
|
|
173
|
-
|
|
174
|
-
return items.map((item, index) => ({
|
|
175
|
-
key: String(getNestedValue(item, props.rowKey) || item.key || `item-${index}`),
|
|
176
|
-
title: String(getNestedValue(item, props.displayKey) || item.title || `选项${index + 1}`),
|
|
177
|
-
description: props.descriptionKey ? String(getNestedValue(item, props.descriptionKey) || '') : '',
|
|
178
|
-
disabled: item.disabled === true,
|
|
179
|
-
_rawData: item
|
|
180
|
-
}))
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
const getNestedValue = (obj, path) => {
|
|
184
|
-
if (!path || !obj) return null
|
|
185
|
-
return path.split('.').reduce((acc, part) => {
|
|
186
|
-
if (acc === null || acc === undefined) return null
|
|
187
|
-
return acc[part]
|
|
188
|
-
}, obj)
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
const addItem = (key) => {
|
|
192
|
-
if (props.disabled) return
|
|
193
|
-
if (!localValue.value.includes(key)) {
|
|
194
|
-
localValue.value = [...localValue.value, key]
|
|
195
|
-
emitChange()
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
const removeItem = (key) => {
|
|
200
|
-
if (props.disabled) return
|
|
201
|
-
localValue.value = localValue.value.filter(k => k !== key)
|
|
202
|
-
emitChange()
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
const selectAll = () => {
|
|
206
|
-
if (props.disabled) return
|
|
207
|
-
const allKeys = localDataSource.value.map(item => item.key)
|
|
208
|
-
localValue.value = [...allKeys]
|
|
209
|
-
emitChange()
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
const clearAll = () => {
|
|
213
|
-
if (props.disabled) return
|
|
214
|
-
localValue.value = []
|
|
215
|
-
emitChange()
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
const emitChange = () => {
|
|
219
|
-
emit('change', {
|
|
220
|
-
value: localValue.value,
|
|
221
|
-
data: getSelectedData()
|
|
222
|
-
})
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
const getSelectedData = () => {
|
|
226
|
-
return localValue.value.map(key => {
|
|
227
|
-
const item = localDataSource.value.find(d => d.key === key)
|
|
228
|
-
return item?._rawData
|
|
229
|
-
}).filter(Boolean)
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
const getItemTitle = (key) => {
|
|
233
|
-
const item = localDataSource.value.find(d => d.key === key)
|
|
234
|
-
return item?.title || key
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
const getItemDesc = (key) => {
|
|
238
|
-
const item = localDataSource.value.find(d => d.key === key)
|
|
239
|
-
return item?.description || ''
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
defineExpose({
|
|
243
|
-
loadData,
|
|
244
|
-
getSelectedData,
|
|
245
|
-
getSelectedKeys: () => [...localValue.value],
|
|
246
|
-
clear: clearAll,
|
|
247
|
-
setValue: (keys) => { localValue.value = keys }
|
|
248
|
-
})
|
|
249
|
-
|
|
250
|
-
onMounted(() => {
|
|
251
|
-
loadData()
|
|
252
|
-
})
|
|
253
|
-
|
|
254
|
-
watch(() => [props.queryParamsName, props.logicName, props.config, props.data], () => {
|
|
255
|
-
loadData()
|
|
256
|
-
}, { deep: true })
|
|
257
|
-
</script>
|
|
258
|
-
|
|
259
|
-
<template>
|
|
260
|
-
<div class="x-transfer-component">
|
|
261
|
-
<a-spin :spinning="loading">
|
|
262
|
-
<div class="x-transfer-container">
|
|
263
|
-
<div class="transfer-panel" :style="{ width: leftWidth }">
|
|
264
|
-
<div class="panel-header">
|
|
265
|
-
<span v-if="leftTitle" class="panel-title">{{ leftTitle }}</span>
|
|
266
|
-
</div>
|
|
267
|
-
<div class="panel-body" :style="{ maxHeight: height }">
|
|
268
|
-
<template v-if="localGroupDataSource.length > 0">
|
|
269
|
-
<div
|
|
270
|
-
v-for="group in localGroupDataSource"
|
|
271
|
-
:key="group.key"
|
|
272
|
-
class="group-section"
|
|
273
|
-
>
|
|
274
|
-
<div class="group-label-row">
|
|
275
|
-
<span class="group-label">{{ group.label }}</span>
|
|
276
|
-
<span class="group-count" v-if="group.count > 0">{{ group.count }}</span>
|
|
277
|
-
</div>
|
|
278
|
-
<div class="group-items">
|
|
279
|
-
<div
|
|
280
|
-
v-for="item in group.items"
|
|
281
|
-
:key="item.key"
|
|
282
|
-
class="item-row"
|
|
283
|
-
:class="{ selected: localValue.includes(item.key) }"
|
|
284
|
-
:title="item.title"
|
|
285
|
-
@dblclick="addItem(item.key)"
|
|
286
|
-
>
|
|
287
|
-
<span class="item-title">{{ item.title }}</span>
|
|
288
|
-
<span v-if="item.description" class="item-desc">{{ item.description }}</span>
|
|
289
|
-
<span class="item-arrow"></span>
|
|
290
|
-
</div>
|
|
291
|
-
</div>
|
|
292
|
-
</div>
|
|
293
|
-
</template>
|
|
294
|
-
<template v-else>
|
|
295
|
-
<div
|
|
296
|
-
v-for="item in localDataSource"
|
|
297
|
-
:key="item.key"
|
|
298
|
-
class="item-row"
|
|
299
|
-
:class="{ selected: localValue.includes(item.key) }"
|
|
300
|
-
:title="item.title"
|
|
301
|
-
@dblclick="addItem(item.key)"
|
|
302
|
-
>
|
|
303
|
-
<span class="item-title">{{ item.title }}</span>
|
|
304
|
-
<span v-if="item.description" class="item-desc">{{ item.description }}</span>
|
|
305
|
-
<span class="item-arrow"></span>
|
|
306
|
-
</div>
|
|
307
|
-
</template>
|
|
308
|
-
<a-empty v-if="localDataSource.length === 0 && !loading" />
|
|
309
|
-
</div>
|
|
310
|
-
</div>
|
|
311
|
-
|
|
312
|
-
<div class="transfer-actions">
|
|
313
|
-
<div class="transfer-action-right">
|
|
314
|
-
<div class="action-row">
|
|
315
|
-
<span class="action-text">{{ allText }}</span>
|
|
316
|
-
<span
|
|
317
|
-
class="action-arrow"
|
|
318
|
-
:class="{ disabled: disabled || totalCount === 0 }"
|
|
319
|
-
@click="selectAll"
|
|
320
|
-
>
|
|
321
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
322
|
-
<path d="M9 18l6-6-6-6"/>
|
|
323
|
-
</svg>
|
|
324
|
-
</span>
|
|
325
|
-
</div>
|
|
326
|
-
</div>
|
|
327
|
-
<div class="transfer-action-left">
|
|
328
|
-
<div class="action-row">
|
|
329
|
-
<span class="action-text">{{ allText }}</span>
|
|
330
|
-
<span
|
|
331
|
-
class="action-arrow left"
|
|
332
|
-
:class="{ disabled: disabled || localValue.length === 0 }"
|
|
333
|
-
@click="clearAll"
|
|
334
|
-
>
|
|
335
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
336
|
-
<path d="M15 18l-6-6 6-6"/>
|
|
337
|
-
</svg>
|
|
338
|
-
</span>
|
|
339
|
-
</div>
|
|
340
|
-
</div>
|
|
341
|
-
</div>
|
|
342
|
-
|
|
343
|
-
<div class="transfer-panel" :style="{ width: rightWidth }">
|
|
344
|
-
<div class="panel-header">
|
|
345
|
-
<span v-if="rightTitle" class="panel-title">{{ rightTitle }}</span>
|
|
346
|
-
<span class="panel-count selected" v-if="localValue.length > 0">{{ localValue.length }}</span>
|
|
347
|
-
</div>
|
|
348
|
-
<div class="panel-body" :style="{ maxHeight: height }">
|
|
349
|
-
<div
|
|
350
|
-
v-for="key in localValue"
|
|
351
|
-
:key="key"
|
|
352
|
-
class="item-row selected-item"
|
|
353
|
-
:title="getItemTitle(key)"
|
|
354
|
-
@dblclick="removeItem(key)"
|
|
355
|
-
>
|
|
356
|
-
<span class="item-arrow left-arrow"></span>
|
|
357
|
-
<span class="item-title">{{ getItemTitle(key) }}</span>
|
|
358
|
-
<span v-if="getItemDesc(key)" class="item-desc">{{ getItemDesc(key) }}</span>
|
|
359
|
-
</div>
|
|
360
|
-
<a-empty v-if="localValue.length === 0" />
|
|
361
|
-
</div>
|
|
362
|
-
</div>
|
|
363
|
-
</div>
|
|
364
|
-
</a-spin>
|
|
365
|
-
</div>
|
|
366
|
-
</template>
|
|
367
|
-
|
|
368
|
-
<style scoped>
|
|
369
|
-
.x-transfer-component {
|
|
370
|
-
width: 100%;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
.x-transfer-container {
|
|
374
|
-
display: flex;
|
|
375
|
-
flex-direction: row;
|
|
376
|
-
gap: 12px;
|
|
377
|
-
align-items: flex-start;
|
|
378
|
-
width: 100%;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.transfer-panel {
|
|
382
|
-
width: 324px;
|
|
383
|
-
height: 143px;
|
|
384
|
-
border-radius: 6px;
|
|
385
|
-
opacity: 1;
|
|
386
|
-
box-sizing: border-box;
|
|
387
|
-
border: 1px solid #E5E9F0;
|
|
388
|
-
background: #fff;
|
|
389
|
-
flex: 0 0 auto;
|
|
390
|
-
display: flex;
|
|
391
|
-
flex-direction: column;
|
|
392
|
-
overflow: hidden;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.panel-header {
|
|
396
|
-
padding: 0 12px;
|
|
397
|
-
background: #fafafa;
|
|
398
|
-
border-bottom: 1px solid #E5E9F0;
|
|
399
|
-
display: flex;
|
|
400
|
-
align-items: center;
|
|
401
|
-
gap: 8px;
|
|
402
|
-
height: 37px;
|
|
403
|
-
box-sizing: border-box;
|
|
404
|
-
flex-shrink: 0;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
.panel-title {
|
|
408
|
-
font-size: 14px;
|
|
409
|
-
color: #313131;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
.panel-count {
|
|
413
|
-
font-size: 12px;
|
|
414
|
-
color: #313131;
|
|
415
|
-
background: #f0f0f0;
|
|
416
|
-
padding: 0 8px;
|
|
417
|
-
border-radius: 10px;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
.panel-count.selected {
|
|
421
|
-
background: #1890ff;
|
|
422
|
-
color: #fff;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
.panel-body {
|
|
426
|
-
padding: 0;
|
|
427
|
-
overflow-y: auto;
|
|
428
|
-
flex: 1;
|
|
429
|
-
min-height: 0;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
.item-row {
|
|
433
|
-
padding: 0 12px;
|
|
434
|
-
border-bottom: 1px solid #E5E9F0;
|
|
435
|
-
cursor: pointer;
|
|
436
|
-
display: flex;
|
|
437
|
-
align-items: center;
|
|
438
|
-
transition: background-color 0.15s;
|
|
439
|
-
user-select: none;
|
|
440
|
-
height: 37px;
|
|
441
|
-
box-sizing: border-box;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
.item-row:last-child {
|
|
445
|
-
border-bottom: none;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
.item-row:hover {
|
|
449
|
-
background: #f5f5f5;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
.item-row.selected {
|
|
453
|
-
background: #e6f7ff;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
.item-row.selected:hover {
|
|
457
|
-
background: #bae7ff;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
.item-title {
|
|
461
|
-
font-size: 14px;
|
|
462
|
-
color: #313131;
|
|
463
|
-
flex-shrink: 0;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
.item-desc {
|
|
467
|
-
font-size: 12px;
|
|
468
|
-
color: #94979E;
|
|
469
|
-
margin-left: 8px;
|
|
470
|
-
flex: 1;
|
|
471
|
-
overflow: hidden;
|
|
472
|
-
text-overflow: ellipsis;
|
|
473
|
-
white-space: nowrap;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
.item-arrow {
|
|
477
|
-
width: 6px;
|
|
478
|
-
height: 10px;
|
|
479
|
-
background: #94979E;
|
|
480
|
-
flex-shrink: 0;
|
|
481
|
-
margin-left: auto;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
.item-arrow.left-arrow {
|
|
485
|
-
transform: rotate(180deg);
|
|
486
|
-
margin-left: 0;
|
|
487
|
-
margin-right: auto;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
.selected-item {
|
|
491
|
-
background: #fff;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
.selected-item:hover {
|
|
495
|
-
background: #f5f5f5;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
.transfer-actions {
|
|
499
|
-
display: flex;
|
|
500
|
-
flex-direction: column;
|
|
501
|
-
gap: 8px;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
.transfer-action-right,
|
|
505
|
-
.transfer-action-left {
|
|
506
|
-
width: 68px;
|
|
507
|
-
height: 70px;
|
|
508
|
-
border: 1px solid #E5E9F0;
|
|
509
|
-
border-radius: 6px;
|
|
510
|
-
background: #FFFFFF;
|
|
511
|
-
box-sizing: border-box;
|
|
512
|
-
display: flex;
|
|
513
|
-
flex-direction: column;
|
|
514
|
-
align-items: center;
|
|
515
|
-
justify-content: center;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
.action-row {
|
|
519
|
-
display: flex;
|
|
520
|
-
align-items: center;
|
|
521
|
-
justify-content: center;
|
|
522
|
-
gap: 6px;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
.action-text {
|
|
526
|
-
font-size: 14px;
|
|
527
|
-
color: #313131;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
.action-arrow {
|
|
531
|
-
width: 10px;
|
|
532
|
-
height: 12px;
|
|
533
|
-
color: #94979E;
|
|
534
|
-
flex-shrink: 0;
|
|
535
|
-
cursor: pointer;
|
|
536
|
-
transition: opacity 0.2s;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
.action-arrow.left {
|
|
540
|
-
transform: rotate(180deg);
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
.action-arrow:hover {
|
|
544
|
-
opacity: 0.7;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
.action-arrow.disabled {
|
|
548
|
-
opacity: 0.3;
|
|
549
|
-
cursor: not-allowed;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
.group-section {
|
|
553
|
-
margin-bottom: 12px;
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
.group-section:last-child {
|
|
557
|
-
margin-bottom: 0;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
.group-label-row {
|
|
561
|
-
display: flex;
|
|
562
|
-
align-items: center;
|
|
563
|
-
gap: 6px;
|
|
564
|
-
padding: 0 12px;
|
|
565
|
-
height: 37px;
|
|
566
|
-
box-sizing: border-box;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
.group-label {
|
|
570
|
-
font-size: 14px;
|
|
571
|
-
color: #313131;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
.group-count {
|
|
575
|
-
font-size: 12px;
|
|
576
|
-
color: #94979E;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
.group-items {
|
|
580
|
-
border: 1px solid #E5E9F0;
|
|
581
|
-
border-radius: 6px;
|
|
582
|
-
overflow: hidden;
|
|
583
|
-
margin: 0 12px 12px 12px;
|
|
584
|
-
}
|
|
585
|
-
</style>
|