vue2-client 1.14.76 → 1.14.78
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 +1 -2
- package/package.json +1 -1
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaire.json +3 -3
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaire.vue +21 -10
- 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/pages/addressSelect/addressDemo.vue +24 -0
- package/src/pages/addressSelect/index.vue +259 -0
- package/src/router/async/router.map.js +1 -0
- 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/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/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/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,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>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- 测试界面——测试地址选择新增组件-->
|
|
3
|
+
<div>
|
|
4
|
+
<a-button @click="open">打开选择地址弹窗</a-button>
|
|
5
|
+
<address-select :addressShow="showDialog"/>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import AddressSelect from '@/pages/addressSelect'
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
components: { AddressSelect },
|
|
14
|
+
data: () => ({
|
|
15
|
+
showDialog: false
|
|
16
|
+
}),
|
|
17
|
+
methods: {
|
|
18
|
+
open () {
|
|
19
|
+
console.log('打开选择地址弹窗')
|
|
20
|
+
this.showDialog = true
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import XFormTable from '@vue2-client/base-client/components/common/XFormTable'
|
|
3
|
+
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
|
4
|
+
import { mapState } from 'vuex'
|
|
5
|
+
export default {
|
|
6
|
+
components: {
|
|
7
|
+
XFormTable
|
|
8
|
+
},
|
|
9
|
+
props: {
|
|
10
|
+
addressShow: {
|
|
11
|
+
required: true,
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
watch: {
|
|
17
|
+
addressShow (val) {
|
|
18
|
+
this.selectAddressVisible = val
|
|
19
|
+
},
|
|
20
|
+
'form.f_address_type' (newVal, oldVal) {
|
|
21
|
+
this.onAddressTypeChange(newVal, oldVal)
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
data () {
|
|
25
|
+
return {
|
|
26
|
+
selectAddressVisible: false,
|
|
27
|
+
addAddressFlag: false,
|
|
28
|
+
form: {
|
|
29
|
+
f_address_type: '',
|
|
30
|
+
f_residential_area_id: '',
|
|
31
|
+
f_residential_area: '',
|
|
32
|
+
f_iscity: ''
|
|
33
|
+
},
|
|
34
|
+
addressModel: [
|
|
35
|
+
{
|
|
36
|
+
expression: '{f_building}楼号{f_unit}单元{f_floor}楼层{f_room}门牌号',
|
|
37
|
+
label: '城市',
|
|
38
|
+
value: '城市'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
expression: '{f_building}组{f_unit}号',
|
|
42
|
+
label: '乡镇',
|
|
43
|
+
value: '乡镇'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
expression: '{f_address}',
|
|
47
|
+
label: '自定义',
|
|
48
|
+
value: '自定义'
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
labelCol: { span: 4 },
|
|
52
|
+
wrapperCol: { span: 20 },
|
|
53
|
+
formItems: [],
|
|
54
|
+
areaList: [],
|
|
55
|
+
signContractVisible: false
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
methods: {
|
|
59
|
+
selAddress (record) {
|
|
60
|
+
// 给表单赋值
|
|
61
|
+
const form = {
|
|
62
|
+
f_address: record.tua_f_address,
|
|
63
|
+
f_address_id: record.tua_id
|
|
64
|
+
}
|
|
65
|
+
console.log('选择了地址是', form)
|
|
66
|
+
this.$emit('selAddress', form)
|
|
67
|
+
this.selectAddressVisible = false
|
|
68
|
+
},
|
|
69
|
+
addAddress () {
|
|
70
|
+
// 获取地址模式配置
|
|
71
|
+
getConfigByName('addressTypeDic', 'af-revenue', (res) => {
|
|
72
|
+
// 地址模式赋值
|
|
73
|
+
if (res.value?.length) {
|
|
74
|
+
this.addressModel = res.value
|
|
75
|
+
}
|
|
76
|
+
// 赋值默认地址模式
|
|
77
|
+
this.form = { f_address_type: this.addressModel[0].value }
|
|
78
|
+
this.addAddressFlag = true
|
|
79
|
+
this.addAddressMsg = '添加地址'
|
|
80
|
+
this.onAddressTypeChange()
|
|
81
|
+
})
|
|
82
|
+
},
|
|
83
|
+
onAddressTypeChange (newVal, oldVal) {
|
|
84
|
+
const selectedModel = this.addressModel.find(item => item.value === this.form.f_address_type)
|
|
85
|
+
Object.keys(this.form).forEach(key => {
|
|
86
|
+
if (key.endsWith('_suffix')) {
|
|
87
|
+
this.form[key] = ''
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
if (selectedModel) {
|
|
91
|
+
const matches = selectedModel.expression.match(/{(.*?)}([^{}]*)(?={|$)/g)
|
|
92
|
+
this.formItems = matches.map(item => {
|
|
93
|
+
const value = item.match(/{(.*?)}/)[1]
|
|
94
|
+
const label = item.replace(/{.*?}/, '').trim()
|
|
95
|
+
// 处理后缀
|
|
96
|
+
this.form[`${value}_suffix`] = label
|
|
97
|
+
return {
|
|
98
|
+
label: label || (value === 'f_address' ? '' : value), // 如果存在后面的文字,就使用后面的文字作为 label,否则使用原来的值
|
|
99
|
+
value: `${value}`
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
handleSearch (value) {
|
|
105
|
+
this.getAreaList(value)
|
|
106
|
+
},
|
|
107
|
+
getAreaList (value) {
|
|
108
|
+
console.log('搜索小区', this.currUser.orgid)
|
|
109
|
+
runLogic('getAreaListByName', {
|
|
110
|
+
orgId: this.currUser.orgid,
|
|
111
|
+
name: value
|
|
112
|
+
}, 'af-revenue').then(res => {
|
|
113
|
+
console.log(res)
|
|
114
|
+
this.areaList = res
|
|
115
|
+
})
|
|
116
|
+
},
|
|
117
|
+
handleChange (value) {
|
|
118
|
+
this.form.f_residential_area = this.areaList.find(item => item.value === value).label
|
|
119
|
+
console.log(this.form.f_residential_area)
|
|
120
|
+
},
|
|
121
|
+
addressSubmit () {
|
|
122
|
+
if (!this.form.f_residential_area) {
|
|
123
|
+
this.$message.warning('请选择小区')
|
|
124
|
+
return
|
|
125
|
+
}
|
|
126
|
+
this.deleteAddressData()
|
|
127
|
+
runLogic('addAddress', Object.assign({}, this.form, {
|
|
128
|
+
f_address: this.generateAddressString()
|
|
129
|
+
}, {
|
|
130
|
+
orgid: this.currUser.orgid,
|
|
131
|
+
f_orgid: this.currUser.orgid,
|
|
132
|
+
f_orgname: this.currUser.orgs,
|
|
133
|
+
f_depid: this.currUser.depids,
|
|
134
|
+
f_depname: this.currUser.deps,
|
|
135
|
+
f_operatorid: this.currUser.id,
|
|
136
|
+
f_operator: this.currUser.name,
|
|
137
|
+
f_filialeid: this.currUser.orgid
|
|
138
|
+
}), 'af-revenue').then(res => {
|
|
139
|
+
if (res) {
|
|
140
|
+
this.$message.success(`${this.addAddressMsg}成功`)
|
|
141
|
+
this.addAddressFlag = false
|
|
142
|
+
this.refresh()
|
|
143
|
+
}
|
|
144
|
+
})
|
|
145
|
+
},
|
|
146
|
+
// 删除 addressData 中存在 addressModel 不存在的字段
|
|
147
|
+
deleteAddressData () {
|
|
148
|
+
// 目前只需要检查这几个key
|
|
149
|
+
const keys = ['f_building', 'f_unit', 'f_floor', 'f_room']
|
|
150
|
+
Object.keys(this.form).forEach(key => {
|
|
151
|
+
if (keys.includes(key) && !this.formItems.some(item => item.value === key)) {
|
|
152
|
+
this.form[key] = ''
|
|
153
|
+
this.form[`${key}_suffix`] = ''
|
|
154
|
+
}
|
|
155
|
+
})
|
|
156
|
+
},
|
|
157
|
+
generateAddressString () {
|
|
158
|
+
const selectedModel = this.addressModel.find(item => item.value === this.form.f_address_type)
|
|
159
|
+
if (selectedModel) {
|
|
160
|
+
let addressString = selectedModel.expression
|
|
161
|
+
this.formItems.forEach(item => {
|
|
162
|
+
const value = this.form[item.value]
|
|
163
|
+
addressString = addressString.replace(`{${item.value}}`, value)
|
|
164
|
+
})
|
|
165
|
+
return addressString
|
|
166
|
+
}
|
|
167
|
+
return ''
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
computed: {
|
|
171
|
+
inputWidth () {
|
|
172
|
+
if (this.formItems.length === 1) {
|
|
173
|
+
return '85%'
|
|
174
|
+
}
|
|
175
|
+
return this.formItems.length ? `${65 / this.formItems.length}%` : '85%'
|
|
176
|
+
},
|
|
177
|
+
...mapState('account', { currUser: 'user' }),
|
|
178
|
+
...mapState('setting', { isMobile: 'isMobile' })
|
|
179
|
+
},
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
</script>
|
|
183
|
+
|
|
184
|
+
<template>
|
|
185
|
+
<div>
|
|
186
|
+
<!-- 地址弹出框 -->
|
|
187
|
+
<a-modal
|
|
188
|
+
v-model="selectAddressVisible"
|
|
189
|
+
:dialog-style="{ top: '30px' }"
|
|
190
|
+
:bodyStyle="{height:'70vh',overflowY:'scroll'}"
|
|
191
|
+
:destroy-on-close="true"
|
|
192
|
+
:z-index="1002"
|
|
193
|
+
title="选择地址"
|
|
194
|
+
:footer="null"
|
|
195
|
+
width="80vw">
|
|
196
|
+
<x-form-table
|
|
197
|
+
title="选择地址"
|
|
198
|
+
queryParamsName="userfiles_sel_address"
|
|
199
|
+
@action="selAddress"
|
|
200
|
+
serviceName="af-revenue"
|
|
201
|
+
:extraHeight="225"
|
|
202
|
+
ref="selAddressXFormTable">
|
|
203
|
+
<template #leftButton="{selectedRows}">
|
|
204
|
+
<a-button
|
|
205
|
+
type="primary"
|
|
206
|
+
:disabled="selectedRows?.length !== 1"
|
|
207
|
+
@click="selAddress(selectedRows[0])"> 选择地址</a-button>
|
|
208
|
+
<a-button
|
|
209
|
+
type="primary"
|
|
210
|
+
@click="addAddress"> 新建地址
|
|
211
|
+
</a-button>
|
|
212
|
+
</template>
|
|
213
|
+
</x-form-table>
|
|
214
|
+
</a-modal>
|
|
215
|
+
<!-- 添加地址 -->
|
|
216
|
+
<a-modal
|
|
217
|
+
v-model="addAddressFlag"
|
|
218
|
+
:dialog-style="{ top: '30px' }"
|
|
219
|
+
:z-index="1005"
|
|
220
|
+
@ok="addressSubmit"
|
|
221
|
+
@cancel="addAddressFlag = false"
|
|
222
|
+
title="新增地址信息"
|
|
223
|
+
:destroyOnClose="true">
|
|
224
|
+
<a-form-model :model="form" :label-col="labelCol" :wrapper-col="wrapperCol">
|
|
225
|
+
<a-form-model-item label="小区">
|
|
226
|
+
<a-select
|
|
227
|
+
show-search
|
|
228
|
+
placeholder="请选择小区"
|
|
229
|
+
option-filter-prop="children"
|
|
230
|
+
@search="handleSearch"
|
|
231
|
+
style="width: 200px"
|
|
232
|
+
@change="handleChange"
|
|
233
|
+
>
|
|
234
|
+
<a-select-option v-for="item in areaList" :value="item.value" :key="item">
|
|
235
|
+
{{ item.label }}
|
|
236
|
+
</a-select-option>
|
|
237
|
+
</a-select>
|
|
238
|
+
</a-form-model-item>
|
|
239
|
+
<a-form-model-item label="地址类型">
|
|
240
|
+
<a-radio-group v-model="form.f_address_type">
|
|
241
|
+
<a-radio :value="item.value" v-for="(item, index) in addressModel" :key="index">
|
|
242
|
+
{{ item.label }}
|
|
243
|
+
</a-radio>
|
|
244
|
+
</a-radio-group>
|
|
245
|
+
</a-form-model-item>
|
|
246
|
+
<a-form-model-item label="详细地址">
|
|
247
|
+
<div v-for="(item, index) in formItems" :key="index" style="display: inline;white-space: nowrap">
|
|
248
|
+
<a-input v-model="form[item.value]" style="display: inline;" :style="{ width: inputWidth }"/>
|
|
249
|
+
<span>{{ item.label }}</span>
|
|
250
|
+
</div>
|
|
251
|
+
</a-form-model-item>
|
|
252
|
+
</a-form-model>
|
|
253
|
+
</a-modal>
|
|
254
|
+
</div>
|
|
255
|
+
</template>
|
|
256
|
+
|
|
257
|
+
<style>
|
|
258
|
+
|
|
259
|
+
</style>
|
|
@@ -55,6 +55,7 @@ routerResource.newDynamicStatistics = () => import('@vue2-client/pages/NewDynami
|
|
|
55
55
|
routerResource.example = {
|
|
56
56
|
path: 'example',
|
|
57
57
|
name: '示例主页面',
|
|
58
|
+
// component: () => import('@vue2-client/pages/addressSelect/addressDemo.vue'),
|
|
58
59
|
// component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
|
|
59
60
|
// component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
|
|
60
61
|
// component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8"/>
|
|
5
|
-
<link rel="shortcut icon" href="./favicon.svg" type="image/svg+xml"/>
|
|
6
|
-
<link rel="stylesheet" href="./vender/jquery/zTreeStyle/zTreeStyle.css" type="text/css">
|
|
7
|
-
<script src = "./vender/jquery/jquery.js"></script>
|
|
8
|
-
<script src = "./vender/date97/WdatePicker.js"></script>
|
|
9
|
-
<script src = "./vender/jquery/jquery.ztree.core.min.js"></script>
|
|
10
|
-
<script src = "./vender/jquery/jquery.ztree.exedit.min.js"></script>
|
|
11
|
-
<script src = "./vender/jquery/jquery.ztree.exhide.min.js"></script>
|
|
12
|
-
<script src = "./vender/codemirror.js"></script>
|
|
13
|
-
<script src = "./vender/fabric.js"></script>
|
|
14
|
-
<script src="./vender/editor.js"></script>
|
|
15
|
-
<script>
|
|
16
|
-
$(function() {
|
|
17
|
-
//配置项可以不设置,会使用默认设置
|
|
18
|
-
let option = {
|
|
19
|
-
license:'QO1pepfLYwDNqGvW21ensj0psE9CxBxf5MSRD1q2sCvclYGGtk6clTZEIth12i4SvvvDC04ZNcHe3uQuNtBUFcAk7sHUwAdYvffM2aZis/jpZqrm1rDGk1NHYsheD6DroF+m3jZ5Izh/LxRjzZJfaHHejfrn5InFoSqErfPm4gY=',
|
|
20
|
-
mode:'form', //默认模式 form:表单模式,design:设计模式
|
|
21
|
-
pdfUrl:'https://www.x-emr.cn/pdf/post', //pdf生成服务
|
|
22
|
-
dictionary: [ //知识库
|
|
23
|
-
{name: '体征', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=20', itemUrl:'https://www.x-emr.cn/dictitem'},
|
|
24
|
-
{name: '症状', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=20', itemUrl:'https://www.x-emr.cn/dictitem'},
|
|
25
|
-
{name: '卫生信息数据元', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=40', itemUrl:'https://www.x-emr.cn/dictitem'},
|
|
26
|
-
{name: '电子病历数据集', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=50', itemUrl:'https://www.x-emr.cn/dictitem'},
|
|
27
|
-
{name: '国家医保标准', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=80', itemUrl:'https://www.x-emr.cn/dictitem'},
|
|
28
|
-
{name: '省数据平台标准', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=90', itemUrl:'https://www.x-emr.cn/dictitem'},
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
//从模块的Editor组件中获取mode,doc,lang属性 (该段代码可删除)
|
|
33
|
-
let mode = window.frameElement.getAttribute('mode')
|
|
34
|
-
let doc = window.frameElement.getAttribute('doc')
|
|
35
|
-
let lang = window.frameElement.getAttribute('lang')
|
|
36
|
-
mode? option.mode = mode: null
|
|
37
|
-
lang? option.lang = lang: null
|
|
38
|
-
|
|
39
|
-
//初始化编辑器(初始化代码可以放入组件的load事件中)
|
|
40
|
-
editor.init(option).then(()=>{
|
|
41
|
-
doc? editor.loadUrl(doc) : null
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
})
|
|
45
|
-
</script>
|
|
46
|
-
</head>
|
|
47
|
-
<body>
|
|
48
|
-
<!-- 默认id 为editor -->
|
|
49
|
-
<div id="editor" style="width:100%; height:100%;"></div>
|
|
50
|
-
</body>
|
|
51
|
-
</html>
|