vue2-client 1.14.84 → 1.14.86
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/docs/Logic/345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +0 -1
- package/docs//345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +2 -4
- package/package.json +1 -1
- package/src/base-client/components/common/XFormTable/XFormTable.vue +7 -0
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaire.vue +20 -7
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaireDemo.vue +10 -1
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaireItem.vue +0 -3
- 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/base-client/components/layout/XPageView/RenderRow.vue +57 -31
- package/src/base-client/components/layout/XPageView/XErrorView.vue +14 -3
- package/src/base-client/components/layout/XPageView/XPageView.vue +138 -71
- package/src/base-client/components/layout/XPageView/index.js +1 -3
- package/src/base-client/components/layout/XPageView/index.md +65 -26
- package/src/pages/WorkflowDetail/WorkFlowDemo2.vue +90 -0
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +13 -1
- package/src/pages/XPageViewExample/index.vue +41 -8
- package/src/pages/addressSelect/addressDemo.vue +24 -24
- package/src/pages/addressSelect/index.vue +6 -12
- package/src/router/async/router.map.js +4 -2
- package/.history/public/his/editor/editor_20250606134713.html +0 -51
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527173925.vue +0 -509
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174316.vue +0 -524
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174419.vue +0 -524
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174422.vue +0 -524
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172825.vue +0 -207
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172945.vue +0 -211
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172949.vue +0 -212
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611173010.vue +0 -212
- package/.history/src/base-client/components/common/XForm/XFormItem_20250508134122.vue +0 -1320
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171604.vue +0 -1332
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171613.vue +0 -1331
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171703.vue +0 -1331
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171720.vue +0 -1331
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527174327.vue +0 -1339
- package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612092804.vue +0 -731
- package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612112546.vue +0 -748
- package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612113808.vue +0 -748
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115237.vue +0 -1071
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115346.vue +0 -1078
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115350.vue +0 -1077
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115415.vue +0 -1077
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115429.vue +0 -1077
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611091619.vue +0 -442
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092547.vue +0 -442
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092552.vue +0 -442
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092744.vue +0 -475
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092955.vue +0 -475
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092957.vue +0 -475
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095652.vue +0 -477
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095701.vue +0 -477
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095704.vue +0 -477
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100005.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100011.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100014.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100833.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100853.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100940.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101011.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101013.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101014.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101159.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101238.vue +0 -474
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101240.vue +0 -474
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101242.vue +0 -474
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101404.vue +0 -472
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101410.vue +0 -472
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101459.vue +0 -472
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101500.vue +0 -472
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101502.vue +0 -472
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101504.vue +0 -472
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101610.vue +0 -501
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101700.vue +0 -501
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101702.vue +0 -501
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101741.vue +0 -504
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101749.vue +0 -504
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101759.vue +0 -504
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611091349.vue +0 -131
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105854.vue +0 -160
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105902.vue +0 -160
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105924.vue +0 -160
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105932.vue +0 -158
- package/.history/src/base-client/components/his/XList/XList_20250609135848.vue +0 -173
- package/.history/src/base-client/components/his/XList/XList_20250609141026.vue +0 -222
- package/.history/src/base-client/components/his/XList/XList_20250609141035.vue +0 -229
- package/.history/src/base-client/components/his/XList/XList_20250609141103.vue +0 -229
- package/.history/src/base-client/components/his/XList/XList_20250609141105.vue +0 -229
- package/.history/src/base-client/components/his/XList/XList_20250609141334.vue +0 -241
- package/.history/src/base-client/components/his/XList/XList_20250609141404.vue +0 -241
- package/.history/src/base-client/components/his/XList/XList_20250609141406.vue +0 -241
- package/.history/src/base-client/components/his/XList/XList_20250609141801.vue +0 -245
- package/.history/src/base-client/components/his/XList/XList_20250609142033.vue +0 -245
- package/.history/src/base-client/components/his/XList/XList_20250609142038.vue +0 -245
- package/.history/src/base-client/components/his/XList/XList_20250609142435.vue +0 -255
- package/.history/src/base-client/components/his/XList/XList_20250609142503.vue +0 -255
- package/.history/src/base-client/components/his/XList/XList_20250609142504.vue +0 -255
- package/.history/src/base-client/components/his/XList/XList_20250609143012.vue +0 -270
- package/.history/src/base-client/components/his/XList/XList_20250609143044.vue +0 -270
- package/.history/src/base-client/components/his/XList/XList_20250609143046.vue +0 -270
- package/.history/src/base-client/components/his/XList/XList_20250609143210.vue +0 -270
- package/.history/src/base-client/components/his/XList/XList_20250609144339.vue +0 -294
- package/.history/src/base-client/components/his/XList/XList_20250609144410.vue +0 -294
- package/.history/src/base-client/components/his/XList/XList_20250609144412.vue +0 -294
- package/.history/src/base-client/components/his/XList/XList_20250609144647.vue +0 -303
- package/.history/src/base-client/components/his/XList/XList_20250609144716.vue +0 -303
- package/.history/src/base-client/components/his/XList/XList_20250609144729.vue +0 -303
- package/.history/src/base-client/components/his/XList/XList_20250609151232.vue +0 -288
- package/.history/src/base-client/components/his/XList/XList_20250609151247.vue +0 -288
- package/.history/src/base-client/components/his/XList/XList_20250609151252.vue +0 -288
- package/.history/src/base-client/components/his/XList/XList_20250609161220.vue +0 -317
- package/.history/src/base-client/components/his/XList/XList_20250609161258.vue +0 -306
- package/.history/src/base-client/components/his/XList/XList_20250609161319.vue +0 -306
- package/.history/src/base-client/components/his/XList/XList_20250609161320.vue +0 -306
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250609151519.vue +0 -222
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155514.vue +0 -183
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155556.vue +0 -183
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155600.vue +0 -183
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181609.vue +0 -206
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181629.vue +0 -209
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613095553.vue +0 -242
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613095610.vue +0 -242
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613095612.vue +0 -242
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100041.vue +0 -251
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100047.vue +0 -251
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100054.vue +0 -250
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100105.vue +0 -250
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100107.vue +0 -250
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100114.vue +0 -250
- package/Users/objecrt/af-vue2-client/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +0 -36
- package/src/base-client/components/TreeList/TreeList.vue +0 -91
- package/src/base-client/components/TreeList/TreeNode.vue +0 -81
- package/src/base-client/components/common/XCardSet/XTiltle.vue +0 -191
@@ -1,100 +1,100 @@
|
|
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 v-else class="empty-space"></span>
|
8
|
-
<span class="node-title" :title="node.title">{{ node.title }}</span>
|
9
|
-
</div>
|
10
|
-
<div v-if="hasChildren && node.expanded" class="node-children">
|
11
|
-
<tree-node
|
12
|
-
v-for="child in node.children"
|
13
|
-
:key="child.id"
|
14
|
-
:node="child"
|
15
|
-
@toggle="handleToggle"
|
16
|
-
:level="level + 1"/>
|
17
|
-
</div>
|
18
|
-
</div>
|
19
|
-
</template>
|
20
|
-
|
21
|
-
<script>
|
22
|
-
export default {
|
23
|
-
name: 'TreeNode',
|
24
|
-
props: {
|
25
|
-
node: {
|
26
|
-
type: Object,
|
27
|
-
required: true
|
28
|
-
},
|
29
|
-
level: {
|
30
|
-
type: Number,
|
31
|
-
default: 0
|
32
|
-
}
|
33
|
-
},
|
34
|
-
computed: {
|
35
|
-
hasChildren () {
|
36
|
-
return this.node.children && this.node.children.length > 0
|
37
|
-
}
|
38
|
-
},
|
39
|
-
methods: {
|
40
|
-
handleClick () {
|
41
|
-
if (this.hasChildren) {
|
42
|
-
this.$emit('toggle', this.node)
|
43
|
-
}
|
44
|
-
},
|
45
|
-
handleToggle (childNode) {
|
46
|
-
this.$emit('toggle', childNode)
|
47
|
-
}
|
48
|
-
}
|
49
|
-
}
|
50
|
-
</script>
|
51
|
-
|
52
|
-
<style scoped>
|
53
|
-
.tree-node {
|
54
|
-
margin: 1px 0;
|
55
|
-
white-space: nowrap;
|
56
|
-
}
|
57
|
-
|
58
|
-
.node-content {
|
59
|
-
display: flex;
|
60
|
-
align-items: center;
|
61
|
-
padding: 3px 2px;
|
62
|
-
user-select: none;
|
63
|
-
border-radius: 2px;
|
64
|
-
overflow: hidden;
|
65
|
-
}
|
66
|
-
|
67
|
-
.toggle-icon {
|
68
|
-
width: 12px;
|
69
|
-
text-align: center;
|
70
|
-
font-size: 14px;
|
71
|
-
color:#5D5C5C;
|
72
|
-
font-weight: 400;
|
73
|
-
margin-right: 3px;
|
74
|
-
cursor: pointer;
|
75
|
-
flex-shrink: 0;
|
76
|
-
}
|
77
|
-
|
78
|
-
.empty-space {
|
79
|
-
width: 12px;
|
80
|
-
margin-right: 3px;
|
81
|
-
flex-shrink: 0;
|
82
|
-
}
|
83
|
-
|
84
|
-
.node-title {
|
85
|
-
flex: 1;
|
86
|
-
cursor: default;
|
87
|
-
white-space: nowrap;
|
88
|
-
overflow: hidden;
|
89
|
-
text-overflow: ellipsis;
|
90
|
-
min-width: 0;
|
91
|
-
}
|
92
|
-
|
93
|
-
.node-content:hover {
|
94
|
-
background-color: #f5f5f5;
|
95
|
-
}
|
96
|
-
|
97
|
-
.node-children {
|
98
|
-
padding-left: 15px;
|
99
|
-
}
|
100
|
-
</style>
|
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 v-else class="empty-space"></span>
|
8
|
+
<span class="node-title" :title="node.title">{{ node.title }}</span>
|
9
|
+
</div>
|
10
|
+
<div v-if="hasChildren && node.expanded" class="node-children">
|
11
|
+
<tree-node
|
12
|
+
v-for="child in node.children"
|
13
|
+
:key="child.id"
|
14
|
+
:node="child"
|
15
|
+
@toggle="handleToggle"
|
16
|
+
:level="level + 1"/>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</template>
|
20
|
+
|
21
|
+
<script>
|
22
|
+
export default {
|
23
|
+
name: 'TreeNode',
|
24
|
+
props: {
|
25
|
+
node: {
|
26
|
+
type: Object,
|
27
|
+
required: true
|
28
|
+
},
|
29
|
+
level: {
|
30
|
+
type: Number,
|
31
|
+
default: 0
|
32
|
+
}
|
33
|
+
},
|
34
|
+
computed: {
|
35
|
+
hasChildren () {
|
36
|
+
return this.node.children && this.node.children.length > 0
|
37
|
+
}
|
38
|
+
},
|
39
|
+
methods: {
|
40
|
+
handleClick () {
|
41
|
+
if (this.hasChildren) {
|
42
|
+
this.$emit('toggle', this.node)
|
43
|
+
}
|
44
|
+
},
|
45
|
+
handleToggle (childNode) {
|
46
|
+
this.$emit('toggle', childNode)
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
</script>
|
51
|
+
|
52
|
+
<style scoped>
|
53
|
+
.tree-node {
|
54
|
+
margin: 1px 0;
|
55
|
+
white-space: nowrap;
|
56
|
+
}
|
57
|
+
|
58
|
+
.node-content {
|
59
|
+
display: flex;
|
60
|
+
align-items: center;
|
61
|
+
padding: 3px 2px;
|
62
|
+
user-select: none;
|
63
|
+
border-radius: 2px;
|
64
|
+
overflow: hidden;
|
65
|
+
}
|
66
|
+
|
67
|
+
.toggle-icon {
|
68
|
+
width: 12px;
|
69
|
+
text-align: center;
|
70
|
+
font-size: 14px;
|
71
|
+
color:#5D5C5C;
|
72
|
+
font-weight: 400;
|
73
|
+
margin-right: 3px;
|
74
|
+
cursor: pointer;
|
75
|
+
flex-shrink: 0;
|
76
|
+
}
|
77
|
+
|
78
|
+
.empty-space {
|
79
|
+
width: 12px;
|
80
|
+
margin-right: 3px;
|
81
|
+
flex-shrink: 0;
|
82
|
+
}
|
83
|
+
|
84
|
+
.node-title {
|
85
|
+
flex: 1;
|
86
|
+
cursor: default;
|
87
|
+
white-space: nowrap;
|
88
|
+
overflow: hidden;
|
89
|
+
text-overflow: ellipsis;
|
90
|
+
min-width: 0;
|
91
|
+
}
|
92
|
+
|
93
|
+
.node-content:hover {
|
94
|
+
background-color: #f5f5f5;
|
95
|
+
}
|
96
|
+
|
97
|
+
.node-children {
|
98
|
+
padding-left: 15px;
|
99
|
+
}
|
100
|
+
</style>
|
@@ -1,197 +1,197 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="tree-container">
|
3
|
-
<div class="tree-header">
|
4
|
-
<span class="tree-title">{{ title }}</span>
|
5
|
-
<span class="tree-expand-all" @click="isToOpenAll" v-if="isShowOpen">
|
6
|
-
{{ isExpanded ? '收起' : '全部展开' }}
|
7
|
-
</span>
|
8
|
-
</div>
|
9
|
-
<div class="tree-list">
|
10
|
-
<tree-node
|
11
|
-
v-for="node in showData"
|
12
|
-
:key="node.id"
|
13
|
-
:node="node"
|
14
|
-
@toggle="toggleNode"/>
|
15
|
-
</div>
|
16
|
-
</div>
|
17
|
-
</template>
|
18
|
-
|
19
|
-
<script>
|
20
|
-
import TreeNode from '@vue2-client/base-client/components/his/XTreeRows/TreeNode.vue'
|
21
|
-
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
22
|
-
|
23
|
-
export default {
|
24
|
-
name: 'XTreeRows',
|
25
|
-
components: {
|
26
|
-
TreeNode
|
27
|
-
},
|
28
|
-
props: {
|
29
|
-
queryParamsName: {
|
30
|
-
type: String,
|
31
|
-
default: ''
|
32
|
-
},
|
33
|
-
isOpenAll: {
|
34
|
-
type: Boolean,
|
35
|
-
default: false
|
36
|
-
},
|
37
|
-
parameter: {
|
38
|
-
type: Object,
|
39
|
-
default: () => {
|
40
|
-
return {}
|
41
|
-
}
|
42
|
-
}
|
43
|
-
},
|
44
|
-
data () {
|
45
|
-
return {
|
46
|
-
treeData: [
|
47
|
-
{
|
48
|
-
id: '1',
|
49
|
-
title: '体征',
|
50
|
-
expanded: false,
|
51
|
-
children: [
|
52
|
-
{
|
53
|
-
id: '1-1',
|
54
|
-
title: '一般情况'
|
55
|
-
},
|
56
|
-
{
|
57
|
-
id: '1-2',
|
58
|
-
title: '皮肤粘膜'
|
59
|
-
},
|
60
|
-
{
|
61
|
-
id: '1-3',
|
62
|
-
title: '头颈',
|
63
|
-
expanded: false,
|
64
|
-
children: [
|
65
|
-
{
|
66
|
-
id: '1-3-1',
|
67
|
-
title: '头部头部头部头部头部头部头部头部头部头部头部头部头部头部',
|
68
|
-
expanded: false,
|
69
|
-
children: [
|
70
|
-
{
|
71
|
-
id: '1-3-1-1',
|
72
|
-
title: '123456'
|
73
|
-
}
|
74
|
-
]
|
75
|
-
},
|
76
|
-
{
|
77
|
-
id: '1-2-2',
|
78
|
-
title: '颈部'
|
79
|
-
}
|
80
|
-
]
|
81
|
-
},
|
82
|
-
{
|
83
|
-
id: '1-4',
|
84
|
-
title: '胸部'
|
85
|
-
},
|
86
|
-
]
|
87
|
-
}
|
88
|
-
],
|
89
|
-
isExpanded: false,
|
90
|
-
showData: [],
|
91
|
-
isShowOpen: true,
|
92
|
-
title: '标题'
|
93
|
-
}
|
94
|
-
},
|
95
|
-
methods: {
|
96
|
-
toggleNode (node) {
|
97
|
-
node.expanded = !node.expanded
|
98
|
-
this.$emit('node-toggle', node)
|
99
|
-
},
|
100
|
-
isToOpenAll () {
|
101
|
-
this.isExpanded = !this.isExpanded
|
102
|
-
this.expandAllNodes(this.showData, this.isExpanded)
|
103
|
-
this.$emit('isOpenAll', this.isExpanded)
|
104
|
-
},
|
105
|
-
expandAllNodes (nodes, expand) {
|
106
|
-
nodes.forEach(node => {
|
107
|
-
if (node.children && node.children.length > 0) {
|
108
|
-
node.expanded = expand
|
109
|
-
this.expandAllNodes(node.children, expand)
|
110
|
-
}
|
111
|
-
})
|
112
|
-
},
|
113
|
-
init (config, parameterData) {
|
114
|
-
getConfigByName(config, 'af-his', res => {
|
115
|
-
this.isShowOpen = res.isShowOpen
|
116
|
-
this.title = res.title
|
117
|
-
console.log(res)
|
118
|
-
if (!res.isCheck) {
|
119
|
-
this.showData = res.showData
|
120
|
-
return
|
121
|
-
}
|
122
|
-
const parameter = { ...parameterData, ...this.parameter }
|
123
|
-
runLogic(res.logicName, parameter, 'af-his').then(result => {
|
124
|
-
this.showData = result
|
125
|
-
})
|
126
|
-
})
|
127
|
-
}
|
128
|
-
},
|
129
|
-
watch: {
|
130
|
-
queryParamsName: {
|
131
|
-
immediate: true,
|
132
|
-
handler (newValue) {
|
133
|
-
console.log(newValue)
|
134
|
-
this.init(newValue, {})
|
135
|
-
},
|
136
|
-
deep: true
|
137
|
-
}
|
138
|
-
}
|
139
|
-
}
|
140
|
-
</script>
|
141
|
-
|
142
|
-
<style scoped>
|
143
|
-
.tree-container {
|
144
|
-
width: 100%;
|
145
|
-
height: 320px;
|
146
|
-
overflow-y: auto;
|
147
|
-
overflow-x: auto;
|
148
|
-
padding: 6px;
|
149
|
-
box-sizing: border-box;
|
150
|
-
}
|
151
|
-
/* 自定义滚动条样式 */
|
152
|
-
.tree-container::-webkit-scrollbar {
|
153
|
-
width: 4px;
|
154
|
-
height: 4px;
|
155
|
-
}
|
156
|
-
.tree-container::-webkit-scrollbar-thumb {
|
157
|
-
background-color: #ccc;
|
158
|
-
border-radius: 2px;
|
159
|
-
}
|
160
|
-
.tree-container::-webkit-scrollbar-track {
|
161
|
-
background-color: #f5f5f5;
|
162
|
-
}
|
163
|
-
.tree-list {
|
164
|
-
font-size: 14px;
|
165
|
-
min-width: 100%;
|
166
|
-
}
|
167
|
-
|
168
|
-
.tree-header {
|
169
|
-
padding: 8px 4px;
|
170
|
-
border-bottom: 1px solid #e8e8e8;
|
171
|
-
margin-bottom: 8px;
|
172
|
-
position: sticky;
|
173
|
-
top: 0;
|
174
|
-
background-color: #fff;
|
175
|
-
z-index: 1;
|
176
|
-
}
|
177
|
-
|
178
|
-
.tree-title {
|
179
|
-
font-size: 16px;
|
180
|
-
font-weight: 700;
|
181
|
-
color:#5D5C5C;
|
182
|
-
}
|
183
|
-
|
184
|
-
.tree-expand-all {
|
185
|
-
float: right;
|
186
|
-
margin-right: 15px;
|
187
|
-
font-size: 14px;
|
188
|
-
font-weight: 400;
|
189
|
-
color: #5D5C5C;
|
190
|
-
cursor: pointer;
|
191
|
-
user-select: none;
|
192
|
-
}
|
193
|
-
|
194
|
-
.tree-expand-all:hover {
|
195
|
-
color: #989a9a;
|
196
|
-
}
|
197
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div class="tree-container">
|
3
|
+
<div class="tree-header">
|
4
|
+
<span class="tree-title">{{ title }}</span>
|
5
|
+
<span class="tree-expand-all" @click="isToOpenAll" v-if="isShowOpen">
|
6
|
+
{{ isExpanded ? '收起' : '全部展开' }}
|
7
|
+
</span>
|
8
|
+
</div>
|
9
|
+
<div class="tree-list">
|
10
|
+
<tree-node
|
11
|
+
v-for="node in showData"
|
12
|
+
:key="node.id"
|
13
|
+
:node="node"
|
14
|
+
@toggle="toggleNode"/>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</template>
|
18
|
+
|
19
|
+
<script>
|
20
|
+
import TreeNode from '@vue2-client/base-client/components/his/XTreeRows/TreeNode.vue'
|
21
|
+
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
22
|
+
|
23
|
+
export default {
|
24
|
+
name: 'XTreeRows',
|
25
|
+
components: {
|
26
|
+
TreeNode
|
27
|
+
},
|
28
|
+
props: {
|
29
|
+
queryParamsName: {
|
30
|
+
type: String,
|
31
|
+
default: ''
|
32
|
+
},
|
33
|
+
isOpenAll: {
|
34
|
+
type: Boolean,
|
35
|
+
default: false
|
36
|
+
},
|
37
|
+
parameter: {
|
38
|
+
type: Object,
|
39
|
+
default: () => {
|
40
|
+
return {}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
},
|
44
|
+
data () {
|
45
|
+
return {
|
46
|
+
treeData: [
|
47
|
+
{
|
48
|
+
id: '1',
|
49
|
+
title: '体征',
|
50
|
+
expanded: false,
|
51
|
+
children: [
|
52
|
+
{
|
53
|
+
id: '1-1',
|
54
|
+
title: '一般情况'
|
55
|
+
},
|
56
|
+
{
|
57
|
+
id: '1-2',
|
58
|
+
title: '皮肤粘膜'
|
59
|
+
},
|
60
|
+
{
|
61
|
+
id: '1-3',
|
62
|
+
title: '头颈',
|
63
|
+
expanded: false,
|
64
|
+
children: [
|
65
|
+
{
|
66
|
+
id: '1-3-1',
|
67
|
+
title: '头部头部头部头部头部头部头部头部头部头部头部头部头部头部',
|
68
|
+
expanded: false,
|
69
|
+
children: [
|
70
|
+
{
|
71
|
+
id: '1-3-1-1',
|
72
|
+
title: '123456'
|
73
|
+
}
|
74
|
+
]
|
75
|
+
},
|
76
|
+
{
|
77
|
+
id: '1-2-2',
|
78
|
+
title: '颈部'
|
79
|
+
}
|
80
|
+
]
|
81
|
+
},
|
82
|
+
{
|
83
|
+
id: '1-4',
|
84
|
+
title: '胸部'
|
85
|
+
},
|
86
|
+
]
|
87
|
+
}
|
88
|
+
],
|
89
|
+
isExpanded: false,
|
90
|
+
showData: [],
|
91
|
+
isShowOpen: true,
|
92
|
+
title: '标题'
|
93
|
+
}
|
94
|
+
},
|
95
|
+
methods: {
|
96
|
+
toggleNode (node) {
|
97
|
+
node.expanded = !node.expanded
|
98
|
+
this.$emit('node-toggle', node)
|
99
|
+
},
|
100
|
+
isToOpenAll () {
|
101
|
+
this.isExpanded = !this.isExpanded
|
102
|
+
this.expandAllNodes(this.showData, this.isExpanded)
|
103
|
+
this.$emit('isOpenAll', this.isExpanded)
|
104
|
+
},
|
105
|
+
expandAllNodes (nodes, expand) {
|
106
|
+
nodes.forEach(node => {
|
107
|
+
if (node.children && node.children.length > 0) {
|
108
|
+
node.expanded = expand
|
109
|
+
this.expandAllNodes(node.children, expand)
|
110
|
+
}
|
111
|
+
})
|
112
|
+
},
|
113
|
+
init (config, parameterData) {
|
114
|
+
getConfigByName(config, 'af-his', res => {
|
115
|
+
this.isShowOpen = res.isShowOpen
|
116
|
+
this.title = res.title
|
117
|
+
console.log(res)
|
118
|
+
if (!res.isCheck) {
|
119
|
+
this.showData = res.showData
|
120
|
+
return
|
121
|
+
}
|
122
|
+
const parameter = { ...parameterData, ...this.parameter }
|
123
|
+
runLogic(res.logicName, parameter, 'af-his').then(result => {
|
124
|
+
this.showData = result
|
125
|
+
})
|
126
|
+
})
|
127
|
+
}
|
128
|
+
},
|
129
|
+
watch: {
|
130
|
+
queryParamsName: {
|
131
|
+
immediate: true,
|
132
|
+
handler (newValue) {
|
133
|
+
console.log(newValue)
|
134
|
+
this.init(newValue, {})
|
135
|
+
},
|
136
|
+
deep: true
|
137
|
+
}
|
138
|
+
}
|
139
|
+
}
|
140
|
+
</script>
|
141
|
+
|
142
|
+
<style scoped>
|
143
|
+
.tree-container {
|
144
|
+
width: 100%;
|
145
|
+
height: 320px;
|
146
|
+
overflow-y: auto;
|
147
|
+
overflow-x: auto;
|
148
|
+
padding: 6px;
|
149
|
+
box-sizing: border-box;
|
150
|
+
}
|
151
|
+
/* 自定义滚动条样式 */
|
152
|
+
.tree-container::-webkit-scrollbar {
|
153
|
+
width: 4px;
|
154
|
+
height: 4px;
|
155
|
+
}
|
156
|
+
.tree-container::-webkit-scrollbar-thumb {
|
157
|
+
background-color: #ccc;
|
158
|
+
border-radius: 2px;
|
159
|
+
}
|
160
|
+
.tree-container::-webkit-scrollbar-track {
|
161
|
+
background-color: #f5f5f5;
|
162
|
+
}
|
163
|
+
.tree-list {
|
164
|
+
font-size: 14px;
|
165
|
+
min-width: 100%;
|
166
|
+
}
|
167
|
+
|
168
|
+
.tree-header {
|
169
|
+
padding: 8px 4px;
|
170
|
+
border-bottom: 1px solid #e8e8e8;
|
171
|
+
margin-bottom: 8px;
|
172
|
+
position: sticky;
|
173
|
+
top: 0;
|
174
|
+
background-color: #fff;
|
175
|
+
z-index: 1;
|
176
|
+
}
|
177
|
+
|
178
|
+
.tree-title {
|
179
|
+
font-size: 16px;
|
180
|
+
font-weight: 700;
|
181
|
+
color:#5D5C5C;
|
182
|
+
}
|
183
|
+
|
184
|
+
.tree-expand-all {
|
185
|
+
float: right;
|
186
|
+
margin-right: 15px;
|
187
|
+
font-size: 14px;
|
188
|
+
font-weight: 400;
|
189
|
+
color: #5D5C5C;
|
190
|
+
cursor: pointer;
|
191
|
+
user-select: none;
|
192
|
+
}
|
193
|
+
|
194
|
+
.tree-expand-all:hover {
|
195
|
+
color: #989a9a;
|
196
|
+
}
|
197
|
+
</style>
|