vue2-client 1.16.37 → 1.16.39
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/package.json +112 -112
- 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/HIS/HButtons/HButtons.vue +364 -366
- package/src/base-client/components/common/HIS/HForm/HForm.vue +1 -1
- package/src/base-client/components/common/HIS/HFormGroup/HFormGroup.vue +120 -120
- package/src/base-client/components/common/HIS/HFormGroup/index.js +3 -3
- package/src/base-client/components/common/HIS/demo.vue +61 -61
- package/src/base-client/components/common/XReport/XReport.vue +18 -9
- package/src/base-client/components/common/XReport/XReportHospitalizationDemo.vue +45 -0
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +824 -824
- package/src/base-client/components/common/XTable/XTable.vue +4 -0
- package/src/base-client/components/his/XCharge/testConfig.js +149 -0
- package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +61 -19
- package/src/base-client/components/his/XHisEditor/XHisEditor.vue +705 -705
- package/src/base-client/components/his/XList/XList.vue +117 -5
- package/src/base-client/components/his/threeTestOrders/editor.vue +113 -113
- package/src/pages/userInfoDetailManage/ExceptionRecordQuery/index.vue +45 -45
- package/src/router/async/router.map.js +132 -129
- package/src/services/api/common.js +1 -0
@@ -51,7 +51,7 @@ defineExpose({
|
|
51
51
|
v-bind="$attrs"
|
52
52
|
v-on="$listeners"
|
53
53
|
>
|
54
|
-
<template v-for="(_, name) in $slots"
|
54
|
+
<template v-for="(_, name) in $slots" #[name]="slotData">
|
55
55
|
<slot :name="name" v-bind="slotData" />
|
56
56
|
</template>
|
57
57
|
</x-add-native-form>
|
@@ -1,120 +1,120 @@
|
|
1
|
-
<script setup lang="ts">
|
2
|
-
import XFormGroup from '@vue2-client/base-client/components/common/XFormGroup/XFormGroup.vue'
|
3
|
-
import { ref, onMounted, getCurrentInstance, watch } from 'vue'
|
4
|
-
import { getConfigByNameAsync } from '@vue2-client/services/api/common'
|
5
|
-
|
6
|
-
// 与 HTab 保持一致的样式开关
|
7
|
-
defineProps({
|
8
|
-
hasTopMargin: { type: Boolean, default: true },
|
9
|
-
// 隐藏左侧索引栏(样式控制)
|
10
|
-
leftHide: { type: Boolean, default: false }
|
11
|
-
})
|
12
|
-
|
13
|
-
// 内部 XFormGroup 实例引用
|
14
|
-
const xFormGroupRef = ref()
|
15
|
-
|
16
|
-
// 暴露方法:对齐 XFormGroup 的外部可用方法
|
17
|
-
defineExpose({
|
18
|
-
getXFormGroupInstance: () => xFormGroupRef.value,
|
19
|
-
init: (params) => xFormGroupRef.value && xFormGroupRef.value.init && xFormGroupRef.value.init(params),
|
20
|
-
asyncSubmit: () => xFormGroupRef.value && xFormGroupRef.value.asyncSubmit && xFormGroupRef.value.asyncSubmit(),
|
21
|
-
getNativeFormRef: (group) => xFormGroupRef.value && xFormGroupRef.value.getNativeFormRef && xFormGroupRef.value.getNativeFormRef(group),
|
22
|
-
getNativeForm: (group) => xFormGroupRef.value && xFormGroupRef.value.getNativeForm && xFormGroupRef.value.getNativeForm(group)
|
23
|
-
})
|
24
|
-
|
25
|
-
// 自动初始化:当外部传入 queryParamsName 时,自动加载配置并调用 XFormGroup.init
|
26
|
-
const vm = getCurrentInstance()
|
27
|
-
const autoInit = async () => {
|
28
|
-
try {
|
29
|
-
const a = vm?.proxy?.$attrs || {}
|
30
|
-
const queryParamsName = a.queryParamsName
|
31
|
-
if (!queryParamsName) return
|
32
|
-
const serviceName = a.serviceName || process.env.VUE_APP_SYSTEM_NAME
|
33
|
-
const env = a.env || 'prod'
|
34
|
-
const showLeftTab = a.showLeftTab || false
|
35
|
-
const businessType = a.businessType || '新增'
|
36
|
-
const modifyModelData = a.modifyModelData || {}
|
37
|
-
|
38
|
-
const isDev = env === 'dev'
|
39
|
-
const res = await getConfigByNameAsync(queryParamsName, serviceName, isDev)
|
40
|
-
|
41
|
-
const payload = {
|
42
|
-
...res,
|
43
|
-
serviceName,
|
44
|
-
env,
|
45
|
-
showLeftTab,
|
46
|
-
businessType,
|
47
|
-
modifyModelData
|
48
|
-
}
|
49
|
-
if (xFormGroupRef.value && typeof xFormGroupRef.value.init === 'function') {
|
50
|
-
xFormGroupRef.value.init(payload)
|
51
|
-
} else {
|
52
|
-
// do nothing
|
53
|
-
}
|
54
|
-
} catch (e) {
|
55
|
-
// swallow
|
56
|
-
}
|
57
|
-
}
|
58
|
-
|
59
|
-
onMounted(() => {
|
60
|
-
autoInit()
|
61
|
-
})
|
62
|
-
|
63
|
-
// 当关键 attrs 变更时,重新初始化
|
64
|
-
watch(() => [vm?.proxy?.$attrs?.queryParamsName, vm?.proxy?.$attrs?.serviceName, vm?.proxy?.$attrs?.env], () => {
|
65
|
-
autoInit()
|
66
|
-
})
|
67
|
-
</script>
|
68
|
-
|
69
|
-
<template>
|
70
|
-
<div
|
71
|
-
class="h-form-group-wrapper"
|
72
|
-
:class="{
|
73
|
-
'h-form-group-has-top-margin': hasTopMargin,
|
74
|
-
'left-hide': leftHide
|
75
|
-
}"
|
76
|
-
>
|
77
|
-
<x-form-group
|
78
|
-
ref="xFormGroupRef"
|
79
|
-
v-bind="$attrs"
|
80
|
-
v-on="$listeners"
|
81
|
-
>
|
82
|
-
<template v-for="(_, name) in $slots" #[name]="slotData">
|
83
|
-
<slot :name="name" v-bind="slotData" />
|
84
|
-
</template>
|
85
|
-
</x-form-group>
|
86
|
-
</div>
|
87
|
-
|
88
|
-
</template>
|
89
|
-
|
90
|
-
<style scoped lang="less">
|
91
|
-
.h-form-group-wrapper {
|
92
|
-
// XFormGroup 自身容器
|
93
|
-
:deep(.XFormGroupClass) {
|
94
|
-
height: 100%;
|
95
|
-
|
96
|
-
.heigth100 { height: 100%; }
|
97
|
-
:deep(.ant-spin-container) { height: 100%; }
|
98
|
-
|
99
|
-
// 默认分组标题样式,参考 XFormGroup
|
100
|
-
.xFormGroupTitle {
|
101
|
-
font-size: 15px;
|
102
|
-
font-weight: bold;
|
103
|
-
color: @primary-color;
|
104
|
-
}
|
105
|
-
|
106
|
-
.formGroupContext {
|
107
|
-
height: 100%;
|
108
|
-
overflow-y: auto;
|
109
|
-
}
|
110
|
-
}
|
111
|
-
// 隐藏左侧(索引栏)
|
112
|
-
&.left-hide {
|
113
|
-
:deep(.ant-spin-container) {
|
114
|
-
.ant-row {
|
115
|
-
.ant-col-3 { display: none; }
|
116
|
-
}
|
117
|
-
}
|
118
|
-
}
|
119
|
-
}
|
120
|
-
</style>
|
1
|
+
<script setup lang="ts">
|
2
|
+
import XFormGroup from '@vue2-client/base-client/components/common/XFormGroup/XFormGroup.vue'
|
3
|
+
import { ref, onMounted, getCurrentInstance, watch } from 'vue'
|
4
|
+
import { getConfigByNameAsync } from '@vue2-client/services/api/common'
|
5
|
+
|
6
|
+
// 与 HTab 保持一致的样式开关
|
7
|
+
defineProps({
|
8
|
+
hasTopMargin: { type: Boolean, default: true },
|
9
|
+
// 隐藏左侧索引栏(样式控制)
|
10
|
+
leftHide: { type: Boolean, default: false }
|
11
|
+
})
|
12
|
+
|
13
|
+
// 内部 XFormGroup 实例引用
|
14
|
+
const xFormGroupRef = ref()
|
15
|
+
|
16
|
+
// 暴露方法:对齐 XFormGroup 的外部可用方法
|
17
|
+
defineExpose({
|
18
|
+
getXFormGroupInstance: () => xFormGroupRef.value,
|
19
|
+
init: (params) => xFormGroupRef.value && xFormGroupRef.value.init && xFormGroupRef.value.init(params),
|
20
|
+
asyncSubmit: () => xFormGroupRef.value && xFormGroupRef.value.asyncSubmit && xFormGroupRef.value.asyncSubmit(),
|
21
|
+
getNativeFormRef: (group) => xFormGroupRef.value && xFormGroupRef.value.getNativeFormRef && xFormGroupRef.value.getNativeFormRef(group),
|
22
|
+
getNativeForm: (group) => xFormGroupRef.value && xFormGroupRef.value.getNativeForm && xFormGroupRef.value.getNativeForm(group)
|
23
|
+
})
|
24
|
+
|
25
|
+
// 自动初始化:当外部传入 queryParamsName 时,自动加载配置并调用 XFormGroup.init
|
26
|
+
const vm = getCurrentInstance()
|
27
|
+
const autoInit = async () => {
|
28
|
+
try {
|
29
|
+
const a = vm?.proxy?.$attrs || {}
|
30
|
+
const queryParamsName = a.queryParamsName
|
31
|
+
if (!queryParamsName) return
|
32
|
+
const serviceName = a.serviceName || process.env.VUE_APP_SYSTEM_NAME
|
33
|
+
const env = a.env || 'prod'
|
34
|
+
const showLeftTab = a.showLeftTab || false
|
35
|
+
const businessType = a.businessType || '新增'
|
36
|
+
const modifyModelData = a.modifyModelData || {}
|
37
|
+
|
38
|
+
const isDev = env === 'dev'
|
39
|
+
const res = await getConfigByNameAsync(queryParamsName, serviceName, isDev)
|
40
|
+
|
41
|
+
const payload = {
|
42
|
+
...res,
|
43
|
+
serviceName,
|
44
|
+
env,
|
45
|
+
showLeftTab,
|
46
|
+
businessType,
|
47
|
+
modifyModelData
|
48
|
+
}
|
49
|
+
if (xFormGroupRef.value && typeof xFormGroupRef.value.init === 'function') {
|
50
|
+
xFormGroupRef.value.init(payload)
|
51
|
+
} else {
|
52
|
+
// do nothing
|
53
|
+
}
|
54
|
+
} catch (e) {
|
55
|
+
// swallow
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
onMounted(() => {
|
60
|
+
autoInit()
|
61
|
+
})
|
62
|
+
|
63
|
+
// 当关键 attrs 变更时,重新初始化
|
64
|
+
watch(() => [vm?.proxy?.$attrs?.queryParamsName, vm?.proxy?.$attrs?.serviceName, vm?.proxy?.$attrs?.env], () => {
|
65
|
+
autoInit()
|
66
|
+
})
|
67
|
+
</script>
|
68
|
+
|
69
|
+
<template>
|
70
|
+
<div
|
71
|
+
class="h-form-group-wrapper"
|
72
|
+
:class="{
|
73
|
+
'h-form-group-has-top-margin': hasTopMargin,
|
74
|
+
'left-hide': leftHide
|
75
|
+
}"
|
76
|
+
>
|
77
|
+
<x-form-group
|
78
|
+
ref="xFormGroupRef"
|
79
|
+
v-bind="$attrs"
|
80
|
+
v-on="$listeners"
|
81
|
+
>
|
82
|
+
<template v-for="(_, name) in $slots" #[name]="slotData">
|
83
|
+
<slot :name="name" v-bind="slotData" />
|
84
|
+
</template>
|
85
|
+
</x-form-group>
|
86
|
+
</div>
|
87
|
+
|
88
|
+
</template>
|
89
|
+
|
90
|
+
<style scoped lang="less">
|
91
|
+
.h-form-group-wrapper {
|
92
|
+
// XFormGroup 自身容器
|
93
|
+
:deep(.XFormGroupClass) {
|
94
|
+
height: 100%;
|
95
|
+
|
96
|
+
.heigth100 { height: 100%; }
|
97
|
+
:deep(.ant-spin-container) { height: 100%; }
|
98
|
+
|
99
|
+
// 默认分组标题样式,参考 XFormGroup
|
100
|
+
.xFormGroupTitle {
|
101
|
+
font-size: 15px;
|
102
|
+
font-weight: bold;
|
103
|
+
color: @primary-color;
|
104
|
+
}
|
105
|
+
|
106
|
+
.formGroupContext {
|
107
|
+
height: 100%;
|
108
|
+
overflow-y: auto;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
// 隐藏左侧(索引栏)
|
112
|
+
&.left-hide {
|
113
|
+
:deep(.ant-spin-container) {
|
114
|
+
.ant-row {
|
115
|
+
.ant-col-3 { display: none; }
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
120
|
+
</style>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import HFormGroup from './HFormGroup.vue'
|
2
|
-
|
3
|
-
export default HFormGroup
|
1
|
+
import HFormGroup from './HFormGroup.vue'
|
2
|
+
|
3
|
+
export default HFormGroup
|
@@ -1,61 +1,61 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="h-tab-demo">
|
3
|
-
<!-- <!– XTab –>-->
|
4
|
-
<!-- <a-card title="XTab">-->
|
5
|
-
<!-- <h-tab-->
|
6
|
-
<!-- configName="openPrescriptionTab"-->
|
7
|
-
<!-- serverName="af-his"-->
|
8
|
-
<!-- />-->
|
9
|
-
<!-- </a-card>-->
|
10
|
-
|
11
|
-
<!-- HFormTable -->
|
12
|
-
<a-card title="HFormTable" style="margin-top: 20px;">
|
13
|
-
<h-form-table
|
14
|
-
queryParamsName="outpatientAdviceAllCRUD"
|
15
|
-
serviceName="af-his"
|
16
|
-
/>
|
17
|
-
</a-card>
|
18
|
-
|
19
|
-
<!-- HForm -->
|
20
|
-
<a-card title="HAddNativeForm" style="margin-top: 20px;">
|
21
|
-
<h-add-native-form
|
22
|
-
queryParamsName="TCMAdviceFormConfig"
|
23
|
-
serviceName="af-his"
|
24
|
-
/>
|
25
|
-
</a-card>
|
26
|
-
<!-- <a-card title="HFormGroup" style="margin-top: 20px;">-->
|
27
|
-
<!-- <h-form-group-->
|
28
|
-
<!-- queryParamsName="surgeryApplicationFormGroup"-->
|
29
|
-
<!-- serviceName="af-his"-->
|
30
|
-
<!-- :left-hide="true"-->
|
31
|
-
<!-- />-->
|
32
|
-
<!-- </a-card>-->
|
33
|
-
<!-- <!– HButtons –>-->
|
34
|
-
<!-- <a-card title="HButtons" style="margin-top: 20px;">-->
|
35
|
-
<!-- <h-buttons-->
|
36
|
-
<!-- queryParamsName="outpatientAdviceGroup"-->
|
37
|
-
<!-- serviceName="af-his"-->
|
38
|
-
<!-- />-->
|
39
|
-
<!-- </a-card>-->
|
40
|
-
</div>
|
41
|
-
</template>
|
42
|
-
|
43
|
-
<script setup>
|
44
|
-
// import HTab from './HTab/HTab.vue'
|
45
|
-
import HFormTable from './HFormTable/HFormTable.vue'
|
46
|
-
// import HButtons from './HButtons/HButtons.vue'
|
47
|
-
import HAddNativeForm from '@vue2-client/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm.vue'
|
48
|
-
// import HFormGroup from './HFormGroup/HFormGroup.vue'
|
49
|
-
</script>
|
50
|
-
|
51
|
-
<style scoped lang="less">
|
52
|
-
.h-tab-demo {
|
53
|
-
padding: 20px;
|
54
|
-
|
55
|
-
h4 {
|
56
|
-
color: #333;
|
57
|
-
margin-bottom: 10px;
|
58
|
-
font-size: 14px;
|
59
|
-
}
|
60
|
-
}
|
61
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div class="h-tab-demo">
|
3
|
+
<!-- <!– XTab –>-->
|
4
|
+
<!-- <a-card title="XTab">-->
|
5
|
+
<!-- <h-tab-->
|
6
|
+
<!-- configName="openPrescriptionTab"-->
|
7
|
+
<!-- serverName="af-his"-->
|
8
|
+
<!-- />-->
|
9
|
+
<!-- </a-card>-->
|
10
|
+
|
11
|
+
<!-- HFormTable -->
|
12
|
+
<a-card title="HFormTable" style="margin-top: 20px;">
|
13
|
+
<h-form-table
|
14
|
+
queryParamsName="outpatientAdviceAllCRUD"
|
15
|
+
serviceName="af-his"
|
16
|
+
/>
|
17
|
+
</a-card>
|
18
|
+
|
19
|
+
<!-- HForm -->
|
20
|
+
<a-card title="HAddNativeForm" style="margin-top: 20px;">
|
21
|
+
<h-add-native-form
|
22
|
+
queryParamsName="TCMAdviceFormConfig"
|
23
|
+
serviceName="af-his"
|
24
|
+
/>
|
25
|
+
</a-card>
|
26
|
+
<!-- <a-card title="HFormGroup" style="margin-top: 20px;">-->
|
27
|
+
<!-- <h-form-group-->
|
28
|
+
<!-- queryParamsName="surgeryApplicationFormGroup"-->
|
29
|
+
<!-- serviceName="af-his"-->
|
30
|
+
<!-- :left-hide="true"-->
|
31
|
+
<!-- />-->
|
32
|
+
<!-- </a-card>-->
|
33
|
+
<!-- <!– HButtons –>-->
|
34
|
+
<!-- <a-card title="HButtons" style="margin-top: 20px;">-->
|
35
|
+
<!-- <h-buttons-->
|
36
|
+
<!-- queryParamsName="outpatientAdviceGroup"-->
|
37
|
+
<!-- serviceName="af-his"-->
|
38
|
+
<!-- />-->
|
39
|
+
<!-- </a-card>-->
|
40
|
+
</div>
|
41
|
+
</template>
|
42
|
+
|
43
|
+
<script setup>
|
44
|
+
// import HTab from './HTab/HTab.vue'
|
45
|
+
import HFormTable from './HFormTable/HFormTable.vue'
|
46
|
+
// import HButtons from './HButtons/HButtons.vue'
|
47
|
+
import HAddNativeForm from '@vue2-client/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm.vue'
|
48
|
+
// import HFormGroup from './HFormGroup/HFormGroup.vue'
|
49
|
+
</script>
|
50
|
+
|
51
|
+
<style scoped lang="less">
|
52
|
+
.h-tab-demo {
|
53
|
+
padding: 20px;
|
54
|
+
|
55
|
+
h4 {
|
56
|
+
color: #333;
|
57
|
+
margin-bottom: 10px;
|
58
|
+
font-size: 14px;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
</style>
|
@@ -328,8 +328,11 @@ export default {
|
|
328
328
|
value = config.data[cell.dataIndex]
|
329
329
|
}
|
330
330
|
|
331
|
-
//
|
332
|
-
|
331
|
+
// 检查值是否为空(允许 0 和 false)
|
332
|
+
const isEmptyString = typeof value === 'string' && value.trim() === ''
|
333
|
+
const isEmptyArray = Array.isArray(value) && value.length === 0
|
334
|
+
const isNullish = value === null || value === undefined
|
335
|
+
if (isNullish || isEmptyString || isEmptyArray) {
|
333
336
|
const message = cell.requiredMessage || this.getDefaultRequiredMessage(cell.type)
|
334
337
|
errors.push({
|
335
338
|
dataIndex: cell.dataIndex,
|
@@ -819,12 +822,18 @@ export default {
|
|
819
822
|
this.getConfigAndJoin(this.config, lock)
|
820
823
|
|
821
824
|
// 用定时器循环查看锁状态
|
825
|
+
// 先清理可能存在的旧轮询,避免重复打印与重复初始化
|
826
|
+
if (this.timer) {
|
827
|
+
clearInterval(this.timer)
|
828
|
+
this.timer = undefined
|
829
|
+
}
|
822
830
|
this.timer = setInterval(() => {
|
823
831
|
if (!lock.status) {
|
824
832
|
clearInterval(this.timer)
|
833
|
+
this.timer = undefined
|
825
834
|
console.log('拼接完成', this.config)
|
826
835
|
// 将初始化好的配置拷贝一份留存
|
827
|
-
this.originalConfig =
|
836
|
+
this.originalConfig = JSON.parse(JSON.stringify(this.config))
|
828
837
|
if (!this.dontFormat) {
|
829
838
|
// 扫描配置文件中有没有rowSpan,进行格式化调整
|
830
839
|
this.formatConfigRow(this.config)
|
@@ -864,8 +873,8 @@ export default {
|
|
864
873
|
if (this.configData === undefined) {
|
865
874
|
console.error('未找到数据!')
|
866
875
|
} else {
|
867
|
-
this.originalConfig =
|
868
|
-
this.originalConfig.data = Object.assign(this.originalConfig.data, JSON.parse(JSON.stringify(this.configData)))
|
876
|
+
this.originalConfig = JSON.parse(JSON.stringify(this.config))
|
877
|
+
this.originalConfig.data = Object.assign({}, this.originalConfig.data, JSON.parse(JSON.stringify(this.configData)))
|
869
878
|
this.type = 'display'
|
870
879
|
// this.onlyDisplay = true
|
871
880
|
this.showSkeleton = false
|
@@ -879,12 +888,12 @@ export default {
|
|
879
888
|
this.config = res
|
880
889
|
if (this.config.designMode === 'json') {
|
881
890
|
if (this.configData !== undefined) {
|
882
|
-
this.config.data = Object.assign({}, this.config.data, this.configData)
|
891
|
+
this.config.data = Object.assign({}, this.config.data, JSON.parse(JSON.stringify(this.configData)))
|
883
892
|
}
|
884
893
|
this.jsonConfigInit()
|
885
894
|
} else {
|
886
895
|
if (this.configData !== undefined) {
|
887
|
-
this.config.data = Object.assign(this.config.data, this.configData)
|
896
|
+
this.config.data = Object.assign({}, this.config.data, JSON.parse(JSON.stringify(this.configData)))
|
888
897
|
}
|
889
898
|
if (this.config.data.images === undefined) {
|
890
899
|
this.config.data.images = {}
|
@@ -917,14 +926,14 @@ export default {
|
|
917
926
|
if (this.localConfig.designMode === 'json') {
|
918
927
|
this.config = this.localConfig
|
919
928
|
if (this.configData !== undefined) {
|
920
|
-
this.config.data = Object.assign(this.config.data, this.configData)
|
929
|
+
this.config.data = Object.assign({}, this.config.data, JSON.parse(JSON.stringify(this.configData)))
|
921
930
|
}
|
922
931
|
this.jsonConfigInit()
|
923
932
|
} else {
|
924
933
|
// 如果配置是普通渲染器
|
925
934
|
this.config = this.localConfig
|
926
935
|
if (this.configData !== undefined) {
|
927
|
-
this.config.data = Object.assign(this.config.data, this.configData)
|
936
|
+
this.config.data = Object.assign({}, this.config.data, JSON.parse(JSON.stringify(this.configData)))
|
928
937
|
}
|
929
938
|
if (this.config.data.images === undefined) {
|
930
939
|
this.config.data.images = {}
|
@@ -0,0 +1,45 @@
|
|
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>
|