vue2-client 1.14.67 → 1.14.68
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/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/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/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 +2 -1
- 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/XUploadFilesView/index.vue +485 -485
- package/src/base-client/components/his/XList/XList.vue +155 -22
- 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/his/threeTestOrders/threeTestOrders.vue +62 -1
- package/src/pages/WorkflowDetail/WorkFlowDemo.vue +1 -1
- package/src/pages/WorkflowDetail/WorkflowPageDetail/LeaveMessage.vue +388 -388
- package/src/router/async/router.map.js +2 -2
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- 根据实际部署环境修改 editor.html 的路径 -->
|
|
3
|
-
<iframe
|
|
4
|
-
src="/his/editor/editor.html"
|
|
5
|
-
width="100%"
|
|
6
|
-
height="800"
|
|
7
|
-
frameborder="0"
|
|
8
|
-
@load="onIframeLoad"
|
|
9
|
-
ref="editorIframe">
|
|
10
|
-
</iframe>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script setup>
|
|
14
|
-
|
|
15
|
-
import { ref, onBeforeUnmount } from 'vue'
|
|
16
|
-
|
|
17
|
-
const editorIframe = ref(null)
|
|
18
|
-
const checkEditorTimer = ref(null)
|
|
19
|
-
const checkCount = ref(0)
|
|
20
|
-
const editor = ref(null)
|
|
21
|
-
const iframeWindow = ref(null)
|
|
22
|
-
// 对外暴露的获取editor方法
|
|
23
|
-
const getEditor = () => {
|
|
24
|
-
if (editor.value) {
|
|
25
|
-
return editor.value
|
|
26
|
-
}
|
|
27
|
-
if (iframeWindow.value && iframeWindow.value.editor) {
|
|
28
|
-
editor.value = iframeWindow.value.editor
|
|
29
|
-
return editor.value
|
|
30
|
-
}
|
|
31
|
-
if (editorIframe.value && editorIframe.value.contentWindow && editorIframe.value.contentWindow.editor) {
|
|
32
|
-
editor.value = editorIframe.value.contentWindow.editor
|
|
33
|
-
return editor.value
|
|
34
|
-
}
|
|
35
|
-
return null
|
|
36
|
-
}
|
|
37
|
-
// 创建体温单方法
|
|
38
|
-
const createVitalSigns = (data) => {
|
|
39
|
-
const editorObj = getEditor()
|
|
40
|
-
if (!editorObj) {
|
|
41
|
-
throw new Error('editor对象未初始化,无法创建体温单')
|
|
42
|
-
}
|
|
43
|
-
if (typeof editorObj.createVitalSigns === 'function') {
|
|
44
|
-
return editorObj.createVitalSigns(data)
|
|
45
|
-
} else {
|
|
46
|
-
throw new Error('editor对象未包含createVitalSigns方法')
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// 检查editor对象是否已初始化
|
|
51
|
-
const startEditorCheck = (frameWindow, iframe) => {
|
|
52
|
-
if (checkEditorTimer.value) {
|
|
53
|
-
clearInterval(checkEditorTimer.value)
|
|
54
|
-
}
|
|
55
|
-
checkCount.value = 0
|
|
56
|
-
checkEditorTimer.value = setInterval(() => {
|
|
57
|
-
checkCount.value++
|
|
58
|
-
try {
|
|
59
|
-
const editorObj = frameWindow.editor
|
|
60
|
-
if (editorObj && typeof editorObj.createVitalSigns === 'function') {
|
|
61
|
-
clearInterval(checkEditorTimer.value)
|
|
62
|
-
editor.value = editorObj
|
|
63
|
-
// 将editor对象暴露到全局
|
|
64
|
-
window.iframeEditor = editorObj
|
|
65
|
-
window.iframeWindow = frameWindow
|
|
66
|
-
// 触发事件
|
|
67
|
-
emit('editor-ready', editorObj)
|
|
68
|
-
emit('load', { target: iframe, editor: editorObj })
|
|
69
|
-
// 发送消息通知
|
|
70
|
-
window.parent.postMessage({ type: 'editorReady' }, '*')
|
|
71
|
-
}
|
|
72
|
-
} catch (err) {
|
|
73
|
-
console.error('检查editor对象时出错:', err)
|
|
74
|
-
}
|
|
75
|
-
if (checkCount.value >= 20) {
|
|
76
|
-
clearInterval(checkEditorTimer.value)
|
|
77
|
-
console.error('Editor 对象加载失败')
|
|
78
|
-
}
|
|
79
|
-
}, 500)
|
|
80
|
-
}
|
|
81
|
-
// iframe加载完成的处理
|
|
82
|
-
const onIframeLoad = (e) => {
|
|
83
|
-
const iframe = e.target
|
|
84
|
-
const frameWindow = iframe.contentWindow
|
|
85
|
-
iframeWindow.value = frameWindow
|
|
86
|
-
if (!frameWindow) {
|
|
87
|
-
console.error('无法访问 iframe 内容')
|
|
88
|
-
return
|
|
89
|
-
}
|
|
90
|
-
startEditorCheck(frameWindow, iframe)
|
|
91
|
-
}
|
|
92
|
-
// 组件销毁前清理
|
|
93
|
-
onBeforeUnmount(() => {
|
|
94
|
-
if (checkEditorTimer.value) {
|
|
95
|
-
clearInterval(checkEditorTimer.value)
|
|
96
|
-
}
|
|
97
|
-
})
|
|
98
|
-
// 暴露方法给父组件
|
|
99
|
-
defineExpose({ getEditor, createVitalSigns })
|
|
100
|
-
|
|
101
|
-
// 定义事件
|
|
102
|
-
const emit = defineEmits(['editor-ready', 'load'])
|
|
103
|
-
</script>
|
|
104
|
-
|
|
105
|
-
<style scoped>
|
|
106
|
-
iframe {
|
|
107
|
-
border: none;
|
|
108
|
-
width: 100%;
|
|
109
|
-
min-height: 800px;
|
|
110
|
-
}
|
|
111
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<!-- 根据实际部署环境修改 editor.html 的路径 -->
|
|
3
|
+
<iframe
|
|
4
|
+
src="/his/editor/editor.html"
|
|
5
|
+
width="100%"
|
|
6
|
+
height="800"
|
|
7
|
+
frameborder="0"
|
|
8
|
+
@load="onIframeLoad"
|
|
9
|
+
ref="editorIframe">
|
|
10
|
+
</iframe>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup>
|
|
14
|
+
|
|
15
|
+
import { ref, onBeforeUnmount } from 'vue'
|
|
16
|
+
|
|
17
|
+
const editorIframe = ref(null)
|
|
18
|
+
const checkEditorTimer = ref(null)
|
|
19
|
+
const checkCount = ref(0)
|
|
20
|
+
const editor = ref(null)
|
|
21
|
+
const iframeWindow = ref(null)
|
|
22
|
+
// 对外暴露的获取editor方法
|
|
23
|
+
const getEditor = () => {
|
|
24
|
+
if (editor.value) {
|
|
25
|
+
return editor.value
|
|
26
|
+
}
|
|
27
|
+
if (iframeWindow.value && iframeWindow.value.editor) {
|
|
28
|
+
editor.value = iframeWindow.value.editor
|
|
29
|
+
return editor.value
|
|
30
|
+
}
|
|
31
|
+
if (editorIframe.value && editorIframe.value.contentWindow && editorIframe.value.contentWindow.editor) {
|
|
32
|
+
editor.value = editorIframe.value.contentWindow.editor
|
|
33
|
+
return editor.value
|
|
34
|
+
}
|
|
35
|
+
return null
|
|
36
|
+
}
|
|
37
|
+
// 创建体温单方法
|
|
38
|
+
const createVitalSigns = (data) => {
|
|
39
|
+
const editorObj = getEditor()
|
|
40
|
+
if (!editorObj) {
|
|
41
|
+
throw new Error('editor对象未初始化,无法创建体温单')
|
|
42
|
+
}
|
|
43
|
+
if (typeof editorObj.createVitalSigns === 'function') {
|
|
44
|
+
return editorObj.createVitalSigns(data)
|
|
45
|
+
} else {
|
|
46
|
+
throw new Error('editor对象未包含createVitalSigns方法')
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// 检查editor对象是否已初始化
|
|
51
|
+
const startEditorCheck = (frameWindow, iframe) => {
|
|
52
|
+
if (checkEditorTimer.value) {
|
|
53
|
+
clearInterval(checkEditorTimer.value)
|
|
54
|
+
}
|
|
55
|
+
checkCount.value = 0
|
|
56
|
+
checkEditorTimer.value = setInterval(() => {
|
|
57
|
+
checkCount.value++
|
|
58
|
+
try {
|
|
59
|
+
const editorObj = frameWindow.editor
|
|
60
|
+
if (editorObj && typeof editorObj.createVitalSigns === 'function') {
|
|
61
|
+
clearInterval(checkEditorTimer.value)
|
|
62
|
+
editor.value = editorObj
|
|
63
|
+
// 将editor对象暴露到全局
|
|
64
|
+
window.iframeEditor = editorObj
|
|
65
|
+
window.iframeWindow = frameWindow
|
|
66
|
+
// 触发事件
|
|
67
|
+
emit('editor-ready', editorObj)
|
|
68
|
+
emit('load', { target: iframe, editor: editorObj })
|
|
69
|
+
// 发送消息通知
|
|
70
|
+
window.parent.postMessage({ type: 'editorReady' }, '*')
|
|
71
|
+
}
|
|
72
|
+
} catch (err) {
|
|
73
|
+
console.error('检查editor对象时出错:', err)
|
|
74
|
+
}
|
|
75
|
+
if (checkCount.value >= 20) {
|
|
76
|
+
clearInterval(checkEditorTimer.value)
|
|
77
|
+
console.error('Editor 对象加载失败')
|
|
78
|
+
}
|
|
79
|
+
}, 500)
|
|
80
|
+
}
|
|
81
|
+
// iframe加载完成的处理
|
|
82
|
+
const onIframeLoad = (e) => {
|
|
83
|
+
const iframe = e.target
|
|
84
|
+
const frameWindow = iframe.contentWindow
|
|
85
|
+
iframeWindow.value = frameWindow
|
|
86
|
+
if (!frameWindow) {
|
|
87
|
+
console.error('无法访问 iframe 内容')
|
|
88
|
+
return
|
|
89
|
+
}
|
|
90
|
+
startEditorCheck(frameWindow, iframe)
|
|
91
|
+
}
|
|
92
|
+
// 组件销毁前清理
|
|
93
|
+
onBeforeUnmount(() => {
|
|
94
|
+
if (checkEditorTimer.value) {
|
|
95
|
+
clearInterval(checkEditorTimer.value)
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
// 暴露方法给父组件
|
|
99
|
+
defineExpose({ getEditor, createVitalSigns })
|
|
100
|
+
|
|
101
|
+
// 定义事件
|
|
102
|
+
const emit = defineEmits(['editor-ready', 'load'])
|
|
103
|
+
</script>
|
|
104
|
+
|
|
105
|
+
<style scoped>
|
|
106
|
+
iframe {
|
|
107
|
+
border: none;
|
|
108
|
+
width: 100%;
|
|
109
|
+
min-height: 800px;
|
|
110
|
+
}
|
|
111
|
+
</style>
|
|
@@ -339,6 +339,65 @@ async function handleSubmit (formData) {
|
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
+
// 处理表单数据
|
|
343
|
+
function mergeAndTransformData (records, patientInfo, id, date, operateDate) {
|
|
344
|
+
// 提取records中的数据
|
|
345
|
+
const temperatureList = records.map(record => record.temperature).join(',')
|
|
346
|
+
const sphygmusList = records.map(record => record.sphygmus).join(',')
|
|
347
|
+
const breathList = records.map(record => record.breath).join(',')
|
|
348
|
+
const heartList = records.map(record => record.heart).join(',')
|
|
349
|
+
const notesList = records.map(record => record.notes).join(',')
|
|
350
|
+
const painList = records.map(record => record.pain).join(',')
|
|
351
|
+
const data1List = records.map(record => {
|
|
352
|
+
const [systolic, diastolic] = record.data1.split('|')
|
|
353
|
+
return `${systolic}/${diastolic}`
|
|
354
|
+
}).join(',')
|
|
355
|
+
const data2List = records.map(record => record.data2).join(',')
|
|
356
|
+
const data3List = records.map(record => record.data3).join(',')
|
|
357
|
+
const data4List = records.map(record => record.data4).join(',')
|
|
358
|
+
const data5List = records.map(record => record.data5).join(',')
|
|
359
|
+
const data6List = records.map(record => record.data6).join(',')
|
|
360
|
+
const data7List = records.map(record => record.data7).join(',')
|
|
361
|
+
const tempTypeList = records.map(record => record.temptype).join(',')
|
|
362
|
+
|
|
363
|
+
// 提取patientInfo中的数据
|
|
364
|
+
const name = patientInfo.name || ''
|
|
365
|
+
const dept = patientInfo.dept || ''
|
|
366
|
+
const bed = patientInfo.bed || ''
|
|
367
|
+
const inDate = patientInfo.indate || ''
|
|
368
|
+
const diag = patientInfo.diag || ''
|
|
369
|
+
|
|
370
|
+
// 生成合并后的对象
|
|
371
|
+
const mergedData = {
|
|
372
|
+
bed: bed.toString(),
|
|
373
|
+
sphygmus: sphygmusList,
|
|
374
|
+
notes: notesList,
|
|
375
|
+
medicalNo: id, // 示例中的固定值
|
|
376
|
+
diag: diag,
|
|
377
|
+
type: 'normal', // 示例中的固定值
|
|
378
|
+
breath: breathList,
|
|
379
|
+
temperature: temperatureList,
|
|
380
|
+
id: id, // 示例中的固定值
|
|
381
|
+
tempType: tempTypeList,
|
|
382
|
+
data7: data7List,
|
|
383
|
+
pain: painList,
|
|
384
|
+
data6: data6List,
|
|
385
|
+
data5: data5List,
|
|
386
|
+
data4: data4List,
|
|
387
|
+
data3: data3List,
|
|
388
|
+
data2: data2List,
|
|
389
|
+
inDate: inDate.split(' ')[0], // 只取日期部分
|
|
390
|
+
data1: data1List,
|
|
391
|
+
dept: dept,
|
|
392
|
+
heart: heartList,
|
|
393
|
+
labels: '血压(mmHg)|入水量(ml)|出水量(ml)|大便(次)|小便(次)|身高(cm)|体重(kg)', // 示例中的固定值
|
|
394
|
+
name: name,
|
|
395
|
+
begin: date, // 只取日期部分
|
|
396
|
+
operateDate: operateDate // 只取日期部分
|
|
397
|
+
}
|
|
398
|
+
return mergedData
|
|
399
|
+
}
|
|
400
|
+
|
|
342
401
|
// 生命周期钩子
|
|
343
402
|
onMounted(() => {
|
|
344
403
|
window.addEventListener('message', (event) => {
|
|
@@ -373,7 +432,9 @@ defineExpose({
|
|
|
373
432
|
vitalSignsId.value = id
|
|
374
433
|
},
|
|
375
434
|
// 创建体温单 参数:(Object) data
|
|
376
|
-
handleSubmit
|
|
435
|
+
handleSubmit,
|
|
436
|
+
// 获取表单数据
|
|
437
|
+
mergeAndTransformData
|
|
377
438
|
})
|
|
378
439
|
</script>
|
|
379
440
|
|