vue2-client 1.18.68 → 1.19.0
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/CHANGELOG.md +3 -0
- package/package.json +1 -1
- package/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm.vue +1 -15
- package/src/base-client/components/common/XBadge/XBadge.vue +0 -8
- package/src/base-client/components/common/XForm/XFormItem.vue +0 -30
- package/src/base-client/components/his/HChart/demo.vue +88 -88
- package/src/base-client/components/his/HChart/index.md +798 -798
- package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +251 -187
- package/src/base-client/components/his/XIcon/XIcon.vue +73 -73
- package/src/base-client/components/his/XIcon/index.js +3 -3
- package/src/base-client/components/his/XIcon/index.md +177 -177
- package/src/base-client/plugins/AppData.js +99 -84
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +1 -1
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandleReso.vue +1 -1
- package/src/assets/img/paymentMethod/icon1.png +0 -0
- package/src/assets/img/paymentMethod/icon2.png +0 -0
- package/src/assets/img/paymentMethod/icon3.png +0 -0
- package/src/assets/img/paymentMethod/icon4.png +0 -0
- package/src/assets/img/paymentMethod/icon5.png +0 -0
- package/src/assets/img/paymentMethod/icon6.png +0 -0
- package/src/base-client/components/common/XReport/XReportHospitalizationDemo.vue +0 -45
- package/src-base-client/components/his/XCharge/README.md +0 -0
- package/src-base-client/components/his/XCharge/XCharge.vue +0 -0
|
@@ -1,131 +1,146 @@
|
|
|
1
|
-
import { manageApi
|
|
1
|
+
import { manageApi } from '@vue2-client/services/api'
|
|
2
2
|
import { handleTree } from '@vue2-client/utils/util'
|
|
3
3
|
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
4
4
|
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
5
5
|
|
|
6
|
+
// 字典缓存
|
|
7
|
+
const dictCache = new Map()
|
|
8
|
+
|
|
6
9
|
const GetAppDataService = {
|
|
7
10
|
install (Vue) {
|
|
8
|
-
// 给vue增添对话框显示方法
|
|
9
11
|
Vue.$appdata = Vue.prototype.$appdata = GetAppDataService
|
|
10
12
|
},
|
|
13
|
+
|
|
11
14
|
async load () {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (!item.status) {
|
|
21
|
-
status = 'none'
|
|
22
|
-
} else {
|
|
23
|
-
status = item.status
|
|
24
|
-
}
|
|
25
|
-
badgeItemArray[key][item.value] = {
|
|
26
|
-
status: status,
|
|
27
|
-
text: item.text
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
// 追加参数
|
|
32
|
-
localStorage.setItem(process.env.VUE_APP_DICTIONARY_KEY, JSON.stringify(params))
|
|
33
|
-
localStorage.setItem(process.env.VUE_APP_BADGE_KEY, JSON.stringify(badgeItemArray))
|
|
34
|
-
})
|
|
15
|
+
localStorage.setItem(
|
|
16
|
+
process.env.VUE_APP_DICTIONARY_KEY,
|
|
17
|
+
JSON.stringify({})
|
|
18
|
+
)
|
|
19
|
+
localStorage.setItem(
|
|
20
|
+
process.env.VUE_APP_BADGE_KEY,
|
|
21
|
+
JSON.stringify({})
|
|
22
|
+
)
|
|
35
23
|
},
|
|
24
|
+
|
|
36
25
|
// 返回树形省市区
|
|
37
26
|
async getDivisionsOhChinaForTree () {
|
|
38
|
-
// 获取省市区数据
|
|
39
27
|
return new Promise((resolve, reject) => {
|
|
40
28
|
try {
|
|
41
|
-
indexedDB.getByWeb(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
indexedDB.getByWeb(
|
|
30
|
+
'divisionsOhChina',
|
|
31
|
+
manageApi.getDivisionsOhChina,
|
|
32
|
+
{},
|
|
33
|
+
res => resolve(res),
|
|
34
|
+
processRes => handleTree(processRes, 'code', 'parentcode')
|
|
35
|
+
)
|
|
46
36
|
} catch (e) {
|
|
47
37
|
reject(e)
|
|
48
38
|
}
|
|
49
39
|
})
|
|
50
40
|
},
|
|
51
|
-
//
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const object = JSON.parse(str)
|
|
55
|
-
return object[key]
|
|
56
|
-
},
|
|
57
|
-
async getDictValue (dictKey, value, func, isDev = false, serviceName = process.env.VUE_APP_SYSTEM_NAME) {
|
|
58
|
-
const processResult = (result) => {
|
|
59
|
-
if (!result.value) {
|
|
60
|
-
return {
|
|
61
|
-
status: 'none',
|
|
62
|
-
text: value
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
const item = result.value.find(item => item.value == value)
|
|
66
|
-
if (item) {
|
|
67
|
-
return {
|
|
68
|
-
status: item.status || 'none',
|
|
69
|
-
text: item.label
|
|
70
|
-
}
|
|
71
|
-
}
|
|
41
|
+
// 用于徽标解析字典值
|
|
42
|
+
parseDictValue (dictList, value) {
|
|
43
|
+
if (!Array.isArray(dictList)) {
|
|
72
44
|
return {
|
|
73
45
|
status: 'none',
|
|
74
46
|
text: value
|
|
75
47
|
}
|
|
76
48
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
49
|
+
|
|
50
|
+
const item = dictList.find(i => i.value == value)
|
|
51
|
+
if (item) {
|
|
52
|
+
return {
|
|
53
|
+
status: item.status || 'none',
|
|
54
|
+
text: item.label
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
status: 'none',
|
|
60
|
+
text: value
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
// 获取徽标字典值
|
|
65
|
+
async getDictValue (
|
|
66
|
+
dictKey,
|
|
67
|
+
value,
|
|
68
|
+
callback,
|
|
69
|
+
isDev = false,
|
|
70
|
+
serviceName = process.env.VUE_APP_SYSTEM_NAME
|
|
71
|
+
) {
|
|
72
|
+
const dictList = await this.getDictByKeyAsync(
|
|
73
|
+
dictKey,
|
|
74
|
+
serviceName,
|
|
75
|
+
isDev
|
|
76
|
+
)
|
|
77
|
+
const result = this.parseDictValue(dictList, value)
|
|
78
|
+
|
|
79
|
+
if (typeof callback === 'function') {
|
|
80
|
+
callback(result)
|
|
81
81
|
} else {
|
|
82
|
-
|
|
83
|
-
getConfigByName(dictKey, serviceName, resolve, isDev)
|
|
84
|
-
})
|
|
85
|
-
return processResult(result)
|
|
82
|
+
return result
|
|
86
83
|
}
|
|
87
84
|
},
|
|
85
|
+
|
|
88
86
|
// 获取琉璃字典(Callback 版本)
|
|
89
|
-
getDictByKey(dictKey, serviceName, callback, isDev) {
|
|
90
|
-
this.getDictByKeyAsync(dictKey, serviceName, isDev)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
})
|
|
87
|
+
getDictByKey (dictKey, serviceName, callback, isDev) {
|
|
88
|
+
this.getDictByKeyAsync(dictKey, serviceName, isDev)
|
|
89
|
+
.then(res => {
|
|
90
|
+
if (typeof callback === 'function') {
|
|
91
|
+
callback(res)
|
|
92
|
+
}
|
|
93
|
+
})
|
|
97
94
|
},
|
|
98
95
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
96
|
+
// 获取琉璃字典(Promise 版本,核心实现)
|
|
97
|
+
async getDictByKeyAsync (
|
|
98
|
+
dictKey,
|
|
99
|
+
serviceName = process.env.VUE_APP_SYSTEM_NAME,
|
|
100
|
+
isDev = false
|
|
101
|
+
) {
|
|
102
|
+
const cacheKey = `${serviceName}:${dictKey}`
|
|
103
|
+
|
|
104
|
+
if (dictCache.has(cacheKey)) {
|
|
105
|
+
return dictCache.get(cacheKey)
|
|
109
106
|
}
|
|
110
|
-
|
|
107
|
+
|
|
108
|
+
const dictList = await new Promise(resolve => {
|
|
109
|
+
getConfigByName(
|
|
110
|
+
dictKey,
|
|
111
|
+
serviceName,
|
|
112
|
+
res => resolve(res?.value || []),
|
|
113
|
+
isDev
|
|
114
|
+
)
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
dictCache.set(cacheKey, dictList)
|
|
118
|
+
return dictList
|
|
111
119
|
},
|
|
120
|
+
|
|
112
121
|
getParams () {
|
|
113
122
|
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|
|
114
|
-
return JSON.parse(str)
|
|
123
|
+
return str ? JSON.parse(str) : {}
|
|
115
124
|
},
|
|
125
|
+
|
|
116
126
|
getSingleValues () {
|
|
117
127
|
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
118
|
-
return JSON.parse(str)
|
|
128
|
+
return str ? JSON.parse(str) : {}
|
|
119
129
|
},
|
|
130
|
+
|
|
120
131
|
getWebConfigByKey (key) {
|
|
121
132
|
const str = localStorage.getItem(process.env.VUE_APP_WEB_CONFIG_KEY)
|
|
133
|
+
if (!str) return undefined
|
|
122
134
|
const object = JSON.parse(str)
|
|
123
|
-
return object[key]
|
|
135
|
+
return object?.[key]
|
|
124
136
|
},
|
|
137
|
+
|
|
125
138
|
getStylesByKey (key) {
|
|
126
139
|
const str = localStorage.getItem(process.env.VUE_APP_WEB_STYLES_KEY)
|
|
140
|
+
if (!str) return undefined
|
|
127
141
|
const object = JSON.parse(str)
|
|
128
|
-
return object[key]
|
|
129
|
-
}
|
|
142
|
+
return object?.[key]
|
|
143
|
+
}
|
|
130
144
|
}
|
|
145
|
+
|
|
131
146
|
export default GetAppDataService
|
|
@@ -1125,7 +1125,7 @@ export default {
|
|
|
1125
1125
|
if (stepDefine.formType === 'select') {
|
|
1126
1126
|
let dictList
|
|
1127
1127
|
if (stepDefine.selectType === 'key') {
|
|
1128
|
-
dictList =
|
|
1128
|
+
dictList = []
|
|
1129
1129
|
} else if (stepDefine.selectType === 'config') {
|
|
1130
1130
|
const configName = stepDefine.selectKey.substring(7)
|
|
1131
1131
|
dictList = await this.$appdata.getDictByKeyAsync(configName)
|
|
@@ -787,7 +787,7 @@ export default {
|
|
|
787
787
|
if (stepDefine.formType === 'select') {
|
|
788
788
|
let dictList
|
|
789
789
|
if (stepDefine.selectType === 'key') {
|
|
790
|
-
dictList =
|
|
790
|
+
dictList = []
|
|
791
791
|
} else if (stepDefine.selectType === 'config') {
|
|
792
792
|
const configName = stepDefine.selectKey.substring(7)
|
|
793
793
|
dictList = await this.$appdata.getDictByKeyAsync(configName)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="xreport-hosp-demo">
|
|
3
|
-
<a-space style="margin-bottom: 12px;">
|
|
4
|
-
<a-button type="primary" @click="doInit">手动初始化</a-button>
|
|
5
|
-
</a-space>
|
|
6
|
-
<XReport
|
|
7
|
-
ref="reportRef"
|
|
8
|
-
:edit-mode="true"
|
|
9
|
-
:show-save-button="true"
|
|
10
|
-
:show-img-in-cell="false"
|
|
11
|
-
:use-oss-for-img="false"
|
|
12
|
-
server-name="af-his"
|
|
13
|
-
@updateImg="onUpdateImg"/>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script setup>
|
|
18
|
-
import { ref } from 'vue'
|
|
19
|
-
import XReport from '@vue2-client/base-client/components/common/XReport'
|
|
20
|
-
|
|
21
|
-
const reportRef = ref(null)
|
|
22
|
-
|
|
23
|
-
const payload = {
|
|
24
|
-
arr: [
|
|
25
|
-
{ BQ: '病房区', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 },
|
|
26
|
-
{ BQ: '感染科', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 },
|
|
27
|
-
{ BQ: '骨科病区', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 },
|
|
28
|
-
{ BQ: '呼吸科病区', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 },
|
|
29
|
-
{ BQ: '急症科病区', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 },
|
|
30
|
-
{ BQ: '内科二病区', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 }
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const doInit = async () => {
|
|
35
|
-
if (!reportRef.value || !reportRef.value.init) return
|
|
36
|
-
await reportRef.value.init({
|
|
37
|
-
configName: 'hospitalizationStatsReport',
|
|
38
|
-
configData: payload
|
|
39
|
-
})
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const onUpdateImg = data => {
|
|
43
|
-
console.warn('updateImg:', data)
|
|
44
|
-
}
|
|
45
|
-
</script>
|
|
File without changes
|
|
File without changes
|