vue2-client 1.15.2 → 1.15.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/.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/XCardSet/XTiltle.vue +191 -0
- package/src/base-client/components/common/XFormTable/XFormTable.vue +16 -0
- package/src/base-client/components/common/XFormTable/demo.vue +2 -2
- package/src/base-client/components/common/XTable/XTable.vue +18 -2
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaireDemo.vue +3 -3
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaireItem.vue +21 -5
- package/src/base-client/components/his/XRadio/XRadio.vue +3 -1
- package/src/base-client/components/his/XTextCard/XTextCard.vue +207 -207
- package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +25 -16
- 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/pages/WorkflowDetail/WorkFlowDemo2.vue +34 -7
@@ -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>
|
@@ -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>
|
@@ -200,6 +200,22 @@ export default {
|
|
200
200
|
return { id: null, name: 'Guest' }
|
201
201
|
},
|
202
202
|
},
|
203
|
+
|
204
|
+
/**
|
205
|
+
* 祖先组件注入的自定义函数对象
|
206
|
+
* 此对象包含祖先组件通过provide/inject机制注入的各种自定义函数
|
207
|
+
* 子组件可以通过this.generalFunction来访问这些函数
|
208
|
+
* 使用示例:
|
209
|
+
* - this.generalFunction.handleCustomEvent(data)
|
210
|
+
* - this.generalFunction.submitForm(formData)
|
211
|
+
* - this.generalFunction.validateData(data)
|
212
|
+
*/
|
213
|
+
generalFunction: {
|
214
|
+
default: () => {
|
215
|
+
console.warn('generalFunction is not provided.')
|
216
|
+
return null
|
217
|
+
}
|
218
|
+
}
|
203
219
|
},
|
204
220
|
data () {
|
205
221
|
return {
|
@@ -25,7 +25,7 @@ export default {
|
|
25
25
|
data () {
|
26
26
|
return {
|
27
27
|
// 查询配置文件名
|
28
|
-
queryParamsName: '
|
28
|
+
queryParamsName: 'ChargeQueryCRUD',
|
29
29
|
// 新增表单固定值
|
30
30
|
fixedAddForm: {},
|
31
31
|
// 是否显示详情抽屉
|
@@ -33,7 +33,7 @@ export default {
|
|
33
33
|
// 当前记录
|
34
34
|
record: {},
|
35
35
|
// 选中的行keys
|
36
|
-
selectedKeys: [
|
36
|
+
selectedKeys: [],
|
37
37
|
selected: {
|
38
38
|
keys: [],
|
39
39
|
rows: []
|
@@ -461,7 +461,9 @@ export default {
|
|
461
461
|
clearSelectRowAfterQuery: false,
|
462
462
|
selectedRowModalVisible: false,
|
463
463
|
// 是否禁用右侧操作行为
|
464
|
-
disableAction: false
|
464
|
+
disableAction: false,
|
465
|
+
// 中文字段名列表
|
466
|
+
chineseQueryColumnArray: []
|
465
467
|
}
|
466
468
|
},
|
467
469
|
props: {
|
@@ -743,7 +745,8 @@ export default {
|
|
743
745
|
selectRowMode = 'default',
|
744
746
|
tableSize = 'default',
|
745
747
|
clearSelectRowAfterQuery = false,
|
746
|
-
disableAction = false
|
748
|
+
disableAction = false,
|
749
|
+
chineseQueryColumnArray = []
|
747
750
|
} = params
|
748
751
|
this.showSummary = Object.keys(tableSummaryMap).length > 0
|
749
752
|
if (this.showSummary) {
|
@@ -770,6 +773,10 @@ export default {
|
|
770
773
|
this.showCustomSummary = true
|
771
774
|
this.customSummaryArray = customTableSummaryArray
|
772
775
|
}
|
776
|
+
this.chineseQueryColumnArray = chineseQueryColumnArray
|
777
|
+
if (this.summaryData.length > 0) {
|
778
|
+
this.sortSummaryData()
|
779
|
+
}
|
773
780
|
this.queryParams = queryParams
|
774
781
|
this.tableColumns = JSON.parse(JSON.stringify(tableColumns))
|
775
782
|
if (this.tableColumns.length === 0) {
|
@@ -1386,6 +1393,15 @@ export default {
|
|
1386
1393
|
await Promise.all(promises)
|
1387
1394
|
return this.summaryData
|
1388
1395
|
},
|
1396
|
+
sortSummaryData () {
|
1397
|
+
const result = this.summaryData
|
1398
|
+
// 过滤出 result 中实际存在的 title,并按照 fieldsArray 的顺序排序
|
1399
|
+
this.summaryData = [...result].sort((a, b) => {
|
1400
|
+
const indexA = this.chineseQueryColumnArray.indexOf(a.title)
|
1401
|
+
const indexB = this.chineseQueryColumnArray.indexOf(b.title)
|
1402
|
+
return indexA - indexB
|
1403
|
+
})
|
1404
|
+
},
|
1389
1405
|
showDrawer () {
|
1390
1406
|
if (this.summaryUpdate) {
|
1391
1407
|
this.summaryData.forEach(item => {
|
@@ -14,9 +14,9 @@ export default {
|
|
14
14
|
init () {
|
15
15
|
console.log(this)
|
16
16
|
const conditionData = {
|
17
|
-
tmp_1: { tmp_id: 1 },
|
18
|
-
tmp_2: { tmp_id: 2 },
|
19
|
-
tmp_3: { tmp_id: 3 }
|
17
|
+
tmp_1: { tmp_id: 1, data_id: 17 },
|
18
|
+
tmp_2: { tmp_id: 2, data_id: 17 },
|
19
|
+
tmp_3: { tmp_id: 3, data_id: 17 }
|
20
20
|
}
|
21
21
|
this.$refs.questionnaireRef.init(conditionData)
|
22
22
|
},
|
@@ -29,13 +29,14 @@
|
|
29
29
|
<template v-else-if="column.type === 'radio'">
|
30
30
|
<x-radio
|
31
31
|
:class="['column-item']"
|
32
|
+
:value="column.value"
|
32
33
|
:key="`row-${index}-item-${idx}`"
|
33
34
|
:queryParamsName="column.configName"
|
34
35
|
@change="handleChange($event,column)">
|
35
36
|
</x-radio>
|
36
37
|
</template>
|
37
38
|
<template v-else-if="column.type === 'time'">
|
38
|
-
<x-time-select :key="`row-${index}-item-${idx}`" :class="['column-item']" @change="handleChange($event,column)" :queryParamsName="column.configName">
|
39
|
+
<x-time-select :key="`row-${index}-item-${idx}`" :value="column.value" :class="['column-item']" @change="handleChange($event,column)" :queryParamsName="column.configName">
|
39
40
|
</x-time-select>
|
40
41
|
</template>
|
41
42
|
<template v-else-if="column.type === 'text'">
|
@@ -112,9 +113,7 @@ export default {
|
|
112
113
|
async getData (config, param) {
|
113
114
|
const that = this
|
114
115
|
that.config = { ...that.config, ...config }
|
115
|
-
console.log(param)
|
116
116
|
runLogic(config.data, param, 'af-his').then(res => {
|
117
|
-
that.data = res || []
|
118
117
|
that.results = {}
|
119
118
|
// 将又返回值的数据创建到results
|
120
119
|
for (let i = 0; i < res.length; i++) {
|
@@ -130,12 +129,28 @@ export default {
|
|
130
129
|
console.error(`Config_id 冲突: ${field.config_id} 重复,同一个模板中不能有形同的配置项`)
|
131
130
|
return
|
132
131
|
}
|
133
|
-
|
134
|
-
|
132
|
+
let value_
|
133
|
+
if (field.type === 'selectionBox') {
|
134
|
+
value_ = field.value === 'true' // 将字符串转为布尔值
|
135
|
+
} else if (field.type === 'radio') {
|
136
|
+
value_ = parseInt(field.value) || 0
|
137
|
+
} else if (field.type === 'time') {
|
138
|
+
value_ = field.value ? JSON.parse(field.value) : []
|
139
|
+
} else {
|
140
|
+
value_ = field.value
|
141
|
+
}
|
142
|
+
// 将符合条件的字段存入results
|
143
|
+
if (['selectionBox', 'input', 'radio', 'time'].includes(field.type)) {
|
144
|
+
this.results[field.config_id] = {
|
145
|
+
value: value_,
|
146
|
+
data_id: field.data_id
|
147
|
+
}
|
135
148
|
}
|
149
|
+
field.value = value_
|
136
150
|
console.log(this.results)
|
137
151
|
}
|
138
152
|
}
|
153
|
+
that.data = res || []
|
139
154
|
})
|
140
155
|
},
|
141
156
|
refreshList (param) {
|
@@ -151,6 +166,7 @@ export default {
|
|
151
166
|
},
|
152
167
|
// 数据发生改变--将修改后的值填充到results
|
153
168
|
handleChange (e, column) {
|
169
|
+
console.log('数据发生改变:', e, column)
|
154
170
|
if (column.type === 'selectionBox') {
|
155
171
|
this.results[column.config_id].value = e.target.checked
|
156
172
|
} else if (column.type === 'input') {
|
@@ -68,7 +68,9 @@ export default {
|
|
68
68
|
}
|
69
69
|
}
|
70
70
|
// 3. 初始化默认值(优先级: 配置defaultValue > 第一个选项)
|
71
|
-
if (
|
71
|
+
if (this.value !== undefined && this.value !== null) {
|
72
|
+
this.innerValue = this.value // 优先使用外部传入的 value
|
73
|
+
} else if (res.defaultValue !== undefined && res.defaultValue !== null) {
|
72
74
|
// 使用配置中的defaultValue
|
73
75
|
this.innerValue = res.defaultValue
|
74
76
|
} else if (this.data.length > 0) {
|