vue2-client 1.15.41 → 1.15.43
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/.history/public/his/editor/editor_20250606134713.html +51 -0
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527173925.vue +509 -0
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174316.vue +524 -0
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174419.vue +524 -0
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174422.vue +524 -0
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172825.vue +207 -0
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172945.vue +211 -0
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172949.vue +212 -0
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611173010.vue +212 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250508134122.vue +1320 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171604.vue +1332 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171613.vue +1331 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171703.vue +1331 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171720.vue +1331 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527174327.vue +1339 -0
- package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612092804.vue +731 -0
- package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612112546.vue +748 -0
- package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612113808.vue +748 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115237.vue +1071 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115346.vue +1078 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115350.vue +1077 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115415.vue +1077 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115429.vue +1077 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611091619.vue +442 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092547.vue +442 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092552.vue +442 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092744.vue +475 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092955.vue +475 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092957.vue +475 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095652.vue +477 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095701.vue +477 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095704.vue +477 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100005.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100011.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100014.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100833.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100853.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100940.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101011.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101013.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101014.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101159.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101238.vue +474 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101240.vue +474 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101242.vue +474 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101404.vue +472 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101410.vue +472 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101459.vue +472 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101500.vue +472 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101502.vue +472 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101504.vue +472 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101610.vue +501 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101700.vue +501 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101702.vue +501 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101741.vue +504 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101749.vue +504 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101759.vue +504 -0
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611091349.vue +131 -0
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105854.vue +160 -0
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105902.vue +160 -0
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105924.vue +160 -0
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105932.vue +158 -0
- package/.history/src/base-client/components/his/XList/XList_20250609135848.vue +173 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141026.vue +222 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141035.vue +229 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141103.vue +229 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141105.vue +229 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141334.vue +241 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141404.vue +241 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141406.vue +241 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141801.vue +245 -0
- package/.history/src/base-client/components/his/XList/XList_20250609142033.vue +245 -0
- package/.history/src/base-client/components/his/XList/XList_20250609142038.vue +245 -0
- package/.history/src/base-client/components/his/XList/XList_20250609142435.vue +255 -0
- package/.history/src/base-client/components/his/XList/XList_20250609142503.vue +255 -0
- package/.history/src/base-client/components/his/XList/XList_20250609142504.vue +255 -0
- package/.history/src/base-client/components/his/XList/XList_20250609143012.vue +270 -0
- package/.history/src/base-client/components/his/XList/XList_20250609143044.vue +270 -0
- package/.history/src/base-client/components/his/XList/XList_20250609143046.vue +270 -0
- package/.history/src/base-client/components/his/XList/XList_20250609143210.vue +270 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144339.vue +294 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144410.vue +294 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144412.vue +294 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144647.vue +303 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144716.vue +303 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144729.vue +303 -0
- package/.history/src/base-client/components/his/XList/XList_20250609151232.vue +288 -0
- package/.history/src/base-client/components/his/XList/XList_20250609151247.vue +288 -0
- package/.history/src/base-client/components/his/XList/XList_20250609151252.vue +288 -0
- package/.history/src/base-client/components/his/XList/XList_20250609161220.vue +317 -0
- package/.history/src/base-client/components/his/XList/XList_20250609161258.vue +306 -0
- package/.history/src/base-client/components/his/XList/XList_20250609161319.vue +306 -0
- package/.history/src/base-client/components/his/XList/XList_20250609161320.vue +306 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250609151519.vue +222 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155514.vue +183 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155556.vue +183 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155600.vue +183 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181609.vue +206 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181629.vue +209 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613095553.vue +242 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613095610.vue +242 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613095612.vue +242 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100041.vue +251 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100047.vue +251 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100054.vue +250 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100105.vue +250 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100107.vue +250 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100114.vue +250 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613140844.vue +238 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613140910.vue +238 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613140912.vue +238 -0
- package/Users/objecrt/af-vue2-client/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +36 -0
- package/docs/Logic/345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +1 -0
- package/docs//345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +4 -2
- package/package.json +1 -1
- package/src/base-client/components/TreeList/TreeList.vue +91 -0
- package/src/base-client/components/TreeList/TreeNode.vue +81 -0
- package/src/base-client/components/common/XButtons/XButtons.vue +33 -2
- package/src/base-client/components/common/XCardSet/XTiltle.vue +191 -0
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +0 -8
- package/src/base-client/components/his/XList/XList.vue +211 -35
- package/src/base-client/components/his/XTextCard/XTextCard.vue +207 -207
- package/src/base-client/components/his/XTreeRows/TreeNode.vue +100 -100
- package/src/base-client/components/his/XTreeRows/XTreeRows.vue +197 -197
- package/src/base-client/components/his/threeTestOrders/editor.vue +111 -111
- package/src/router/async/router.map.js +1 -2
- package/src/theme/global.less +32 -24
@@ -0,0 +1,81 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="tree-node">
|
3
|
+
<div class="node-content" @click="handleClick">
|
4
|
+
<span v-if="hasChildren" class="toggle-icon">
|
5
|
+
{{ node.expanded ? '-' : '+' }}
|
6
|
+
</span>
|
7
|
+
<span class="node-title">{{ node.title }}</span>
|
8
|
+
</div>
|
9
|
+
<div v-if="hasChildren && node.expanded" class="node-children">
|
10
|
+
<tree-node
|
11
|
+
v-for="child in node.children"
|
12
|
+
:key="child.id"
|
13
|
+
:node="child"
|
14
|
+
@toggle="$emit('toggle', $event)"
|
15
|
+
:level="level + 1"/>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</template>
|
19
|
+
|
20
|
+
<script>
|
21
|
+
export default {
|
22
|
+
name: 'TreeNode',
|
23
|
+
props: {
|
24
|
+
node: {
|
25
|
+
type: Object,
|
26
|
+
required: true
|
27
|
+
},
|
28
|
+
level: {
|
29
|
+
type: Number,
|
30
|
+
default: 0
|
31
|
+
}
|
32
|
+
},
|
33
|
+
computed: {
|
34
|
+
hasChildren() {
|
35
|
+
return this.node.children && this.node.children.length > 0
|
36
|
+
}
|
37
|
+
},
|
38
|
+
methods: {
|
39
|
+
handleClick() {
|
40
|
+
if (this.hasChildren) {
|
41
|
+
this.$emit('toggle', this.node)
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
</script>
|
47
|
+
|
48
|
+
<style scoped>
|
49
|
+
.tree-node {
|
50
|
+
margin: 2px 0;
|
51
|
+
}
|
52
|
+
|
53
|
+
.node-content {
|
54
|
+
display: flex;
|
55
|
+
align-items: center;
|
56
|
+
padding: 4px 0;
|
57
|
+
user-select: none;
|
58
|
+
}
|
59
|
+
|
60
|
+
.toggle-icon {
|
61
|
+
width: 16px;
|
62
|
+
text-align: center;
|
63
|
+
font-size: 14px;
|
64
|
+
color: #666;
|
65
|
+
margin-right: 4px;
|
66
|
+
cursor: pointer;
|
67
|
+
}
|
68
|
+
|
69
|
+
.node-title {
|
70
|
+
flex: 1;
|
71
|
+
cursor: default;
|
72
|
+
}
|
73
|
+
|
74
|
+
.node-content:hover {
|
75
|
+
background-color: #f5f5f5;
|
76
|
+
}
|
77
|
+
|
78
|
+
.node-children {
|
79
|
+
padding-left: 20px;
|
80
|
+
}
|
81
|
+
</style>
|
@@ -19,22 +19,44 @@
|
|
19
19
|
</template>
|
20
20
|
|
21
21
|
<script>
|
22
|
+
import { getConfigByName } from '@vue2-client/services/api/common'
|
23
|
+
|
22
24
|
export default {
|
23
25
|
name: 'XButtons',
|
24
26
|
components: {},
|
25
|
-
props: {
|
27
|
+
props: {
|
28
|
+
// 查询参数名
|
29
|
+
queryParamsName: {
|
30
|
+
type: String,
|
31
|
+
default: null
|
32
|
+
},
|
33
|
+
// 服务名
|
34
|
+
serviceName: {
|
35
|
+
type: String,
|
36
|
+
default: 'af-system'
|
37
|
+
}
|
38
|
+
},
|
26
39
|
data () {
|
27
40
|
return {
|
28
41
|
// 组件加载状态
|
29
42
|
loading: false,
|
30
43
|
// 配置内容
|
31
|
-
renderConfig: undefined
|
44
|
+
renderConfig: undefined,
|
32
45
|
}
|
33
46
|
},
|
34
47
|
methods: {
|
35
48
|
/**
|
36
49
|
* 初始化按钮组参数
|
37
50
|
*/
|
51
|
+
initData (parameter) {
|
52
|
+
// 按钮组需要主动调用初始化方法
|
53
|
+
getConfigByName(parameter, this.serviceName, (res) => {
|
54
|
+
this.init({
|
55
|
+
...res,
|
56
|
+
serviceName: this.serviceName,
|
57
|
+
})
|
58
|
+
}, this.env === 'dev')
|
59
|
+
},
|
38
60
|
init (params) {
|
39
61
|
const {
|
40
62
|
// 配置内容
|
@@ -61,6 +83,15 @@ export default {
|
|
61
83
|
callback()
|
62
84
|
}, 200)
|
63
85
|
}
|
86
|
+
},
|
87
|
+
watch: {
|
88
|
+
queryParamsName: {
|
89
|
+
immediate: true,
|
90
|
+
handler (newVal) {
|
91
|
+
this.initData(newVal)
|
92
|
+
},
|
93
|
+
deep: true
|
94
|
+
}
|
64
95
|
}
|
65
96
|
}
|
66
97
|
</script>
|
@@ -0,0 +1,191 @@
|
|
1
|
+
<template>
|
2
|
+
<a-row
|
3
|
+
class="title_box"
|
4
|
+
:style="{backgroundColor: requiredParameters.backgroundColor,height:requiredParameters.height}"
|
5
|
+
type="flex"
|
6
|
+
v-model="requiredParameters">
|
7
|
+
<a-col class="title_col_left" :flex="3">
|
8
|
+
<div class="title_img_box">
|
9
|
+
<img src="../img/header10086.png" class="title_img" alt="">
|
10
|
+
</div>
|
11
|
+
<div class="title_name">{{ requiredParameters.title }}</div>
|
12
|
+
</a-col>
|
13
|
+
<a-col class="title_col_right" id="titleSelect" :flex="3" style="padding-right: 3%" v-model="dateData">
|
14
|
+
<div class="title_date_box">
|
15
|
+
<div class="title_data">{{ dateData.date }}</div>
|
16
|
+
<div class="title_week">{{ dateData.dayOfWeek }}</div>
|
17
|
+
</div>
|
18
|
+
<div class="title_time">{{ dateData.time }}</div>
|
19
|
+
<div style="font-size: x-large;margin-left: 1%">|</div>
|
20
|
+
<div class="title_refresh" @click="refreshTitle"><a-icon type="undo" style="font-size: x-large;"/></div>
|
21
|
+
<div class="title_refresh_box">
|
22
|
+
<div class="title_refresh_time">{{ dateData.refreshTime }}</div>
|
23
|
+
<div class="latest_update_time">最新更新时间</div>
|
24
|
+
</div>
|
25
|
+
</a-col>
|
26
|
+
</a-row>
|
27
|
+
</template>
|
28
|
+
|
29
|
+
<script>
|
30
|
+
|
31
|
+
export default {
|
32
|
+
name: 'TitleComponent',
|
33
|
+
components: {},
|
34
|
+
data () {
|
35
|
+
return {
|
36
|
+
dateData: {
|
37
|
+
date: '',
|
38
|
+
dayOfWeek: '',
|
39
|
+
time: '',
|
40
|
+
refreshTime: ''
|
41
|
+
},
|
42
|
+
timer: null
|
43
|
+
}
|
44
|
+
},
|
45
|
+
props: {
|
46
|
+
requiredParameters: {
|
47
|
+
type: Object,
|
48
|
+
default: () => ({
|
49
|
+
title: '',
|
50
|
+
backgroundColor: '',
|
51
|
+
height: ''
|
52
|
+
}),
|
53
|
+
}
|
54
|
+
},
|
55
|
+
created () {
|
56
|
+
this.updateDateData()
|
57
|
+
this.startTimer()
|
58
|
+
},
|
59
|
+
beforeDestroy () {
|
60
|
+
this.stopTimer()
|
61
|
+
},
|
62
|
+
methods: {
|
63
|
+
// 刷新页面
|
64
|
+
refreshTitle () {
|
65
|
+
this.$forceUpdate()
|
66
|
+
const now = new Date()
|
67
|
+
this.dateData.refreshTime = now.toLocaleTimeString()
|
68
|
+
this.$emit('refreshTitle')
|
69
|
+
},
|
70
|
+
updateDateData () {
|
71
|
+
const now = new Date()
|
72
|
+
const options = { weekday: 'long' }
|
73
|
+
this.dateData.date = this.formatDate(now)
|
74
|
+
this.dateData.time = this.formatTime(now)
|
75
|
+
this.dateData.dayOfWeek = now.toLocaleDateString(undefined, options)
|
76
|
+
this.dateData.refreshTime = now.toLocaleTimeString()
|
77
|
+
},
|
78
|
+
formatDate (date) {
|
79
|
+
const month = date.getMonth() + 1
|
80
|
+
const day = date.getDate()
|
81
|
+
return `${month}月${day}日`
|
82
|
+
},
|
83
|
+
formatTime (date) {
|
84
|
+
const hours = String(date.getHours()).padStart(2, '0')
|
85
|
+
const minutes = String(date.getMinutes()).padStart(2, '0')
|
86
|
+
return `${hours}:${minutes}`
|
87
|
+
},
|
88
|
+
startTimer () {
|
89
|
+
this.timer = setInterval(() => {
|
90
|
+
const now = new Date()
|
91
|
+
this.dateData.time = this.formatTime(now)
|
92
|
+
}, 10000) // 每秒更新一次
|
93
|
+
},
|
94
|
+
stopTimer () {
|
95
|
+
if (this.timer) {
|
96
|
+
clearInterval(this.timer)
|
97
|
+
this.timer = null
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
}
|
102
|
+
</script>
|
103
|
+
|
104
|
+
<style scoped>
|
105
|
+
.title_box {
|
106
|
+
width: 100%;
|
107
|
+
min-height:42px;
|
108
|
+
}
|
109
|
+
.title_col_left {
|
110
|
+
height: 100%;
|
111
|
+
color: white;
|
112
|
+
display: flex;
|
113
|
+
align-content: center;
|
114
|
+
align-items: center;
|
115
|
+
}
|
116
|
+
.title_col_right {
|
117
|
+
height: 100%;
|
118
|
+
color: white;
|
119
|
+
display: flex;
|
120
|
+
align-content: center;
|
121
|
+
align-items: center;
|
122
|
+
justify-content: flex-end;
|
123
|
+
}
|
124
|
+
.title_img_box {
|
125
|
+
height: 80%;
|
126
|
+
width: auto;
|
127
|
+
margin-left: 1%;
|
128
|
+
border-radius: 50%;
|
129
|
+
background-color: #35baf6;
|
130
|
+
}
|
131
|
+
.title_img{
|
132
|
+
width: 100%;
|
133
|
+
height: 100%;
|
134
|
+
}
|
135
|
+
.title_name {
|
136
|
+
font-size: medium !important;
|
137
|
+
font-weight: bold;
|
138
|
+
margin-left: 1%;
|
139
|
+
}
|
140
|
+
.title_date_box{
|
141
|
+
width: 20%;
|
142
|
+
height: 100%;
|
143
|
+
display: flex;
|
144
|
+
flex-direction: column;
|
145
|
+
justify-content: center;
|
146
|
+
}
|
147
|
+
.title_data{
|
148
|
+
display: flex;
|
149
|
+
justify-content: center;
|
150
|
+
align-items: center;
|
151
|
+
font-size: smaller;
|
152
|
+
}
|
153
|
+
.title_week{
|
154
|
+
display: flex;
|
155
|
+
justify-content: center;
|
156
|
+
align-items: center;
|
157
|
+
font-size: smaller;
|
158
|
+
}
|
159
|
+
.title_time{
|
160
|
+
font-size: x-large;
|
161
|
+
}
|
162
|
+
.title_refresh{
|
163
|
+
margin-left: 1%;
|
164
|
+
height: 100%;
|
165
|
+
align-content: center;
|
166
|
+
align-items: center;
|
167
|
+
cursor: pointer;
|
168
|
+
display: flex;
|
169
|
+
width: 7%;
|
170
|
+
justify-content: center;
|
171
|
+
min-width: 31px;
|
172
|
+
}
|
173
|
+
.title_refresh:hover{
|
174
|
+
background-color: rgb(31, 138, 137);
|
175
|
+
}
|
176
|
+
.title_refresh:active{
|
177
|
+
background-color: rgb(26, 129, 128);
|
178
|
+
}
|
179
|
+
.title_refresh_box{
|
180
|
+
margin-right: 1%;
|
181
|
+
}
|
182
|
+
.latest_update_time{
|
183
|
+
font-size: x-small;
|
184
|
+
}
|
185
|
+
.title_refresh_time{
|
186
|
+
display: flex;
|
187
|
+
font-size: x-small;
|
188
|
+
align-content: center;
|
189
|
+
justify-content: center;
|
190
|
+
}
|
191
|
+
</style>
|
@@ -311,14 +311,6 @@ export default {
|
|
311
311
|
showLeftTab: true,
|
312
312
|
})
|
313
313
|
}, this.env === 'dev')
|
314
|
-
} else if (cell.slotType === 'x-buttons') {
|
315
|
-
// 按钮组需要主动调用初始化方法
|
316
|
-
getConfigByName(cell.slotConfig, cell.serviceName, (res) => {
|
317
|
-
this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0].init({
|
318
|
-
...res,
|
319
|
-
serviceName: cell.serviceName,
|
320
|
-
})
|
321
|
-
}, this.env === 'dev')
|
322
314
|
} else if (cell.slotType === 'x-label-select') {
|
323
315
|
// 按钮组需要主动调用初始化方法
|
324
316
|
getConfigByName(cell.slotConfig, cell.serviceName, (res) => {
|
@@ -1,20 +1,74 @@
|
|
1
1
|
<template>
|
2
|
-
|
2
|
+
<!-- 列表卡片模式 listMode: card -->
|
3
|
+
<div v-if="true"
|
4
|
+
class="demo-infinite-container"
|
5
|
+
ref="listRef">
|
6
|
+
<a-list :grid="{ gutter: 16, xs: 1, sm: 2, md: 2, lg: 3, xl: 3, xxl: 4 }"
|
7
|
+
:data-source="localData">
|
8
|
+
<a-list-item slot="renderItem" slot-scope="item, index">
|
9
|
+
<div style="background-color: #E5E9F0; height: 297px; width: auto; border-radius: 6px;">
|
10
|
+
<a-row class="card-row">
|
11
|
+
<a-col class="id-a-col" :span="4" v-for="(detail,idx) in item" :key="idx" v-if="detail.label == label">
|
12
|
+
{{detail.value}}<span style="font-size: 16px;font-weight: 400 !important;">床</span>
|
13
|
+
</a-col>
|
14
|
+
<a-col :span="20" class="id-a-col-2">
|
15
|
+
<template v-for="(detail,idx) in item">
|
16
|
+
<span class="describe-list-a-col" :class="{name: detail.bold}" :key="idx" v-if="detail.type == 'title'">{{detail.value}}</span>
|
17
|
+
<span :key="idx" class="component-a-col" v-else-if="detail.type == 'component' && detail.label != label">
|
18
|
+
{{`${detail.label}:`}}
|
19
|
+
<component
|
20
|
+
:is="detail.slotType"
|
21
|
+
:key="idx"
|
22
|
+
:ref="`dynamicComponent_${ idx.slotType || idx}_${idx}`"
|
23
|
+
:serviceName="serviceName"
|
24
|
+
v-on="forwardAllEvents"
|
25
|
+
:queryParamsName="detail.value"
|
26
|
+
:countVisible="false"
|
27
|
+
/>
|
28
|
+
</span>
|
29
|
+
<span :key="idx" class="component-a-col" v-else-if="detail.type == 'date'">
|
30
|
+
{{`${detail.label}:`}}
|
31
|
+
<a-date-picker @change="onChange" />
|
32
|
+
</span>
|
33
|
+
<span class="describe-list-a-col" :class="{name: detail.bold}" :key="idx" v-else-if="detail.label != label">{{`${detail.label}:${detail.value}`}}</span>
|
34
|
+
</template>
|
35
|
+
<a-button v-for="(btn, i) in buttonNames"
|
36
|
+
:key="i"
|
37
|
+
icon="search"
|
38
|
+
v-if="1"
|
39
|
+
class="button-a-col"
|
40
|
+
@click.stop="click(item, index)">
|
41
|
+
{{btn}}
|
42
|
+
</a-button>
|
43
|
+
</a-col>
|
44
|
+
</a-row>
|
45
|
+
</div>
|
46
|
+
</a-list-item>
|
47
|
+
<div v-if="loading" class="demo-loading-container">
|
48
|
+
<a-spin />
|
49
|
+
</div>
|
50
|
+
<div v-if="allLoaded">
|
51
|
+
<div class="demo-infinite-list-bottom">
|
52
|
+
已经显示全部数据
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
</a-list>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<!-- 默认标签模式 -->
|
59
|
+
<div class="list-wrapper" v-else>
|
3
60
|
<a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
|
4
|
-
<a-list-item
|
5
|
-
slot="renderItem"
|
61
|
+
<a-list-item slot="renderItem"
|
6
62
|
slot-scope="item, index"
|
7
63
|
class="list-item"
|
8
64
|
@click="handleClick(index)"
|
9
65
|
@mouseenter="enableHoverOptions && handleMouseEnter(index)"
|
10
66
|
@mouseleave="handleMouseLeave"
|
11
|
-
:class="{ 'hover-active': enableHoverOptions && hoveredIndex === index }"
|
12
|
-
|
13
|
-
<i
|
14
|
-
v-if="icon"
|
67
|
+
:class="{ 'hover-active': enableHoverOptions && hoveredIndex === index }">
|
68
|
+
<i v-if="icon"
|
15
69
|
class="icon-menu"
|
16
|
-
:style="getIconStyle(item)"
|
17
|
-
|
70
|
+
:style="getIconStyle(item)">
|
71
|
+
</i>
|
18
72
|
<span
|
19
73
|
class="item-text">
|
20
74
|
{{ item.number }} {{ item.name }}
|
@@ -26,26 +80,21 @@
|
|
26
80
|
:key="idx"
|
27
81
|
type="link"
|
28
82
|
:class="['confirm-btn', buttonMode ? 'hover-btn' : '']"
|
29
|
-
@click.stop="click(index, idx)"
|
30
|
-
>
|
83
|
+
@click.stop="click(index, idx)">
|
31
84
|
<span :class="{ 'hover-active': enableHoverOptions && hoveredIndex === index }">{{ name }}</span>
|
32
85
|
</a-button>
|
33
86
|
</div>
|
34
87
|
|
35
88
|
<!-- 悬浮选项框 -->
|
36
|
-
<div
|
37
|
-
v-show="enableHoverOptions && hoveredIndex === index"
|
89
|
+
<div v-show="enableHoverOptions && hoveredIndex === index"
|
38
90
|
class="hover-options"
|
39
91
|
@mouseenter="handleOptionsEnter"
|
40
|
-
@mouseleave="handleOptionsLeave"
|
41
|
-
>
|
92
|
+
@mouseleave="handleOptionsLeave">
|
42
93
|
<div class="hover-options-content">
|
43
|
-
<div
|
44
|
-
v-for="(item, idx) in select_options"
|
94
|
+
<div v-for="(item, idx) in select_options"
|
45
95
|
:key="idx"
|
46
96
|
class="option-item"
|
47
|
-
@click="handleOptionClick(index, item)"
|
48
|
-
>
|
97
|
+
@click="handleOptionClick(index, item)">
|
49
98
|
{{ item }}
|
50
99
|
</div>
|
51
100
|
</div>
|
@@ -58,9 +107,21 @@
|
|
58
107
|
<script>
|
59
108
|
|
60
109
|
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
110
|
+
import Upload from '@/base-client/components/common/Upload'
|
61
111
|
|
62
112
|
export default {
|
63
113
|
name: 'XList',
|
114
|
+
components: {
|
115
|
+
Upload,
|
116
|
+
XReport: () => import('@vue2-client/base-client/components/common/XReport/XReport.vue'),
|
117
|
+
XButtons: () => import('@vue2-client/base-client/components/common/XButtons/XButtons.vue'),
|
118
|
+
XInput: () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
|
119
|
+
XRadio: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
|
120
|
+
XTimeSelect: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelect.vue'),
|
121
|
+
XCheckbox: () => import('@vue2-client/base-client/components/his/XCheckbox/XCheckbox.vue'),
|
122
|
+
XTitle: () => import('@vue2-client/base-client/components/his/XTitle/XTitle.vue'),
|
123
|
+
XSelect: () => import('@vue2-client/base-client/components/his/XSelect/XSelect.vue')
|
124
|
+
},
|
64
125
|
props: {
|
65
126
|
queryParamsName: {
|
66
127
|
type: Object,
|
@@ -73,43 +134,108 @@ export default {
|
|
73
134
|
enableHoverOptions: {
|
74
135
|
type: Boolean,
|
75
136
|
default: true
|
137
|
+
},
|
138
|
+
serviceName: {
|
139
|
+
type: String,
|
140
|
+
default: 'af-his'
|
76
141
|
}
|
77
142
|
},
|
78
143
|
inject: ['getComponentByName'],
|
79
144
|
data () {
|
80
145
|
return {
|
81
|
-
data: [],
|
146
|
+
data: [], // 数据源
|
147
|
+
localData: [], // 本地数据源
|
148
|
+
loading: false, // 加载中
|
149
|
+
busy: false, // 繁忙状态
|
82
150
|
button: false,
|
83
151
|
icon: false,
|
84
152
|
buttonNames: [],
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
153
|
+
listMode: undefined, // 列表模式
|
154
|
+
buttonMode: true,
|
155
|
+
hoveredIndex: -1, // 当前悬浮的索引
|
156
|
+
isOptionsHovered: false, // 悬浮选项框是否悬浮
|
157
|
+
hoverTimer: null, // 悬浮选项框定时器
|
158
|
+
leaveTimer: null, // 离开选项框定时器
|
159
|
+
select_options: [], // 悬浮选项框
|
160
|
+
logicName: '',
|
161
|
+
nowPage: 0, // 当前页
|
162
|
+
pageSize: 14,
|
163
|
+
allLoaded: false,
|
164
|
+
label: 'id'
|
91
165
|
}
|
92
166
|
},
|
93
167
|
created () {
|
94
168
|
this.getData(this.queryParamsName, this.fixedQueryForm)
|
95
169
|
},
|
170
|
+
mounted () {
|
171
|
+
// 卡片模式绑定滚动事件
|
172
|
+
this.$refs.listRef.addEventListener('scroll', this.handleInfiniteOnLoad)
|
173
|
+
},
|
174
|
+
computed: {
|
175
|
+
forwardAllEvents () {
|
176
|
+
return {
|
177
|
+
// 监听所有事件并转发给父组件
|
178
|
+
'*': (eventName, ...payload) => {
|
179
|
+
this.$emit(eventName, ...payload)
|
180
|
+
}
|
181
|
+
}
|
182
|
+
}
|
183
|
+
},
|
96
184
|
methods: {
|
185
|
+
onChange (date, dateString) {
|
186
|
+
this.$emit('dateChange', date, dateString)
|
187
|
+
},
|
188
|
+
handleInfiniteOnLoad (event) {
|
189
|
+
const container = event.target // 获取列表容器元素
|
190
|
+
const scrollTop = container.scrollTop // 获取滚动条的当前位置
|
191
|
+
const scrollHeight = container.scrollHeight // 获取列表容器的总高度
|
192
|
+
const clientHeight = container.clientHeight // 获取列表容器的可见高度
|
193
|
+
const bottomOffset = 20
|
194
|
+
// 判断是否滚动到底部
|
195
|
+
if (scrollTop + clientHeight >= scrollHeight - bottomOffset) {
|
196
|
+
if (this.busy || this.allLoaded) return // 防止重复加载
|
197
|
+
this.busy = true
|
198
|
+
this.loading = true
|
199
|
+
try {
|
200
|
+
this.nowPage = this.nowPage + this.pageSize
|
201
|
+
this.fixedQueryForm.condition = `Limit ${this.nowPage}, ${this.pageSize}`
|
202
|
+
runLogic(this.logicName, this.fixedQueryForm, 'af-his').then(async (res) => {
|
203
|
+
this.localData = [...this.localData, ...res]
|
204
|
+
// 如果返回的数据长度小于每页的记录数,则认为已经加载完所有数据
|
205
|
+
if (res.length < this.pageSize) {
|
206
|
+
this.allLoaded = true
|
207
|
+
}
|
208
|
+
})
|
209
|
+
} catch (e) {
|
210
|
+
this.$message.error(e.message)
|
211
|
+
} finally {
|
212
|
+
this.loading = false
|
213
|
+
this.busy = false
|
214
|
+
}
|
215
|
+
}
|
216
|
+
},
|
97
217
|
async getData (config, param) {
|
98
218
|
const that = this
|
99
|
-
getConfigByName(config, 'af-his', res => {
|
100
|
-
that.
|
101
|
-
that.
|
102
|
-
that.
|
103
|
-
that.
|
104
|
-
|
219
|
+
getConfigByName(config, 'af-his', async (res) => {
|
220
|
+
that.listMode = await res.listMode == 'card'
|
221
|
+
that.logicName = await res.data
|
222
|
+
that.button = await res.button // 按钮
|
223
|
+
that.icon = await res.icon // 图标
|
224
|
+
that.label = await res.label // 标签
|
225
|
+
that.buttonNames = await res.buttonNames || []// 按钮文本
|
226
|
+
that.buttonMode = await res.buttonMode || false// 按钮模式
|
227
|
+
this.enableHoverOptions = await res.enableHoverOptions || false// 悬浮选项框
|
105
228
|
if (this.enableHoverOptions) {
|
106
|
-
this.select_options = res.select_options
|
229
|
+
this.select_options = await res.select_options
|
107
230
|
}
|
108
|
-
|
109
|
-
|
231
|
+
if (that.listMode) { param.condition = `Limit ${that.nowPage}, ${that.pageSize}` }
|
232
|
+
runLogic(res.data, param, 'af-his').then(result => {
|
233
|
+
that.data = result
|
234
|
+
if (that.nowPage == 0) { this.localData = result }
|
110
235
|
})
|
111
236
|
})
|
112
237
|
},
|
238
|
+
// 点击列表项
|
113
239
|
handleClick (index) {
|
114
240
|
this.$emit('listClick', this.data[index])
|
115
241
|
},
|
@@ -129,11 +255,13 @@ export default {
|
|
129
255
|
this.data = res.data
|
130
256
|
})
|
131
257
|
},
|
258
|
+
// 鼠标进入列表项
|
132
259
|
handleMouseEnter (index) {
|
133
260
|
this.clearAllTimers()
|
134
261
|
this.hoveredIndex = index
|
135
262
|
this.isOptionsHovered = true
|
136
263
|
},
|
264
|
+
// 鼠标离开列表项
|
137
265
|
handleMouseLeave () {
|
138
266
|
this.clearAllTimers()
|
139
267
|
this.leaveTimer = setTimeout(() => {
|
@@ -141,10 +269,12 @@ export default {
|
|
141
269
|
this.hoveredIndex = -1
|
142
270
|
}, 100)
|
143
271
|
},
|
272
|
+
// 鼠标进入悬浮选项框
|
144
273
|
handleOptionsEnter () {
|
145
274
|
this.clearAllTimers()
|
146
275
|
this.isOptionsHovered = true
|
147
276
|
},
|
277
|
+
// 鼠标离开悬浮选项框
|
148
278
|
handleOptionsLeave () {
|
149
279
|
this.clearAllTimers()
|
150
280
|
this.leaveTimer = setTimeout(() => {
|
@@ -152,6 +282,7 @@ export default {
|
|
152
282
|
this.hoveredIndex = -1
|
153
283
|
}, 100)
|
154
284
|
},
|
285
|
+
// 清除所有定时器
|
155
286
|
clearAllTimers () {
|
156
287
|
if (this.hoverTimer) {
|
157
288
|
clearTimeout(this.hoverTimer)
|
@@ -162,6 +293,7 @@ export default {
|
|
162
293
|
this.leaveTimer = null
|
163
294
|
}
|
164
295
|
},
|
296
|
+
// 选项框点击
|
165
297
|
handleOptionClick (index, action) {
|
166
298
|
this.$emit('optionClick', { data: this.data[index], action })
|
167
299
|
}
|
@@ -303,4 +435,48 @@ export default {
|
|
303
435
|
.option-item:active {
|
304
436
|
background-color: #e6f7ff;
|
305
437
|
}
|
438
|
+
|
439
|
+
.demo-loading-container {
|
440
|
+
position: absolute;
|
441
|
+
bottom: 40px;
|
442
|
+
width: 100%;
|
443
|
+
text-align: center;
|
444
|
+
}
|
445
|
+
|
446
|
+
.demo-infinite-container{
|
447
|
+
overflow-x: hidden;
|
448
|
+
overflow-y: auto;
|
449
|
+
height: 80vh;
|
450
|
+
}
|
451
|
+
.card-row{
|
452
|
+
height: 100%;
|
453
|
+
width: 100%;
|
454
|
+
border-radius: 6px;
|
455
|
+
padding: 6px;
|
456
|
+
}
|
457
|
+
.id-a-col{
|
458
|
+
font-size: 22px;
|
459
|
+
font-weight: 700;
|
460
|
+
display: flex;
|
461
|
+
justify-content: space-evenly;
|
462
|
+
align-items: center;
|
463
|
+
}
|
464
|
+
.id-a-col-2{}
|
465
|
+
.describe-list-a-col{
|
466
|
+
display: block;
|
467
|
+
font-size: 16px;
|
468
|
+
}
|
469
|
+
.name{
|
470
|
+
font-size: 18px;
|
471
|
+
font-weight: 700;
|
472
|
+
}
|
473
|
+
.component-a-col{
|
474
|
+
display: flex;
|
475
|
+
align-items: center;
|
476
|
+
}
|
477
|
+
.button-a-col{
|
478
|
+
position: absolute;
|
479
|
+
top: 245px;
|
480
|
+
left: 225px;
|
481
|
+
}
|
306
482
|
</style>
|