vue2-client 1.16.41 → 1.16.44
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/base-client/components/common/HIS/HButtons/HButtons.vue +9 -4
- 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/XCollapse/XCollapse.vue +460 -356
- package/src/base-client/components/common/XDescriptions/XDescriptions.vue +174 -174
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +824 -824
- package/src/base-client/components/common/XSimpleDescriptions/XSimpleDescriptions.vue +166 -166
- package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +620 -479
- package/src/base-client/components/his/XHisEditor/XHisEditor.vue +705 -705
- package/src/base-client/components/his/XRadio/XRadio.vue +28 -3
- package/src/base-client/components/his/XSelect/XSelect.vue +21 -2
- package/src/base-client/components/his/threeTestOrders/editor.vue +113 -113
- package/src/config/CreateQueryConfig.js +325 -325
- package/src/pages/XTreeOneProExample/index.vue +67 -67
- package/src/pages/userInfoDetailManage/ExceptionRecordQuery/index.vue +45 -45
- package/src/router/async/router.map.js +129 -129
package/package.json
CHANGED
@@ -1,112 +1,112 @@
|
|
1
|
-
{
|
2
|
-
"name": "vue2-client",
|
3
|
-
"version": "1.16.
|
4
|
-
"private": false,
|
5
|
-
"scripts": {
|
6
|
-
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
|
7
|
-
"serve:gaslink": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode gaslink",
|
8
|
-
"serve:revenue": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode revenue",
|
9
|
-
"serve:liuli": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode liuli",
|
10
|
-
"serve:scada": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode scada",
|
11
|
-
"serve:iot": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode iot",
|
12
|
-
"serve:his": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode his",
|
13
|
-
"serve:runtime": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode runtime",
|
14
|
-
"serve:message": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode message",
|
15
|
-
"serve:apply": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode apply",
|
16
|
-
"mac-serve": "vue-cli-service serve --no-eslint --mode his",
|
17
|
-
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
|
18
|
-
"test:unit": "vue-cli-service test:unit",
|
19
|
-
"lint": "vue-cli-service lint",
|
20
|
-
"build:preview": "vue-cli-service build --mode preview",
|
21
|
-
"lint:nofix": "vue-cli-service lint --no-fix",
|
22
|
-
"test": "jest"
|
23
|
-
},
|
24
|
-
"dependencies": {
|
25
|
-
"@afwenming123/vue-easy-tree": "^1.0.1",
|
26
|
-
"@afwenming123/vue-plugin-hiprint": "^0.0.70",
|
27
|
-
"@amap/amap-jsapi-loader": "^1.0.1",
|
28
|
-
"@antv/data-set": "^0.11.8",
|
29
|
-
"@antv/g2plot": "^2.4.31",
|
30
|
-
"@hufe921/canvas-editor": "^0.9.49",
|
31
|
-
"@microsoft/fetch-event-source": "^2.0.1",
|
32
|
-
"@vue/babel-preset-jsx": "^1.4.0",
|
33
|
-
"animate.css": "^4.1.1",
|
34
|
-
"ant-design-vue": "^1.7.8",
|
35
|
-
"axios": "^0.27.2",
|
36
|
-
"clipboard": "^2.0.11",
|
37
|
-
"core-js": "^3.33.0",
|
38
|
-
"crypto-js": "^4.1.1",
|
39
|
-
"date-fns": "^2.29.3",
|
40
|
-
"default-passive-events": "^2.0.0",
|
41
|
-
"dotenv": "^16.3.1",
|
42
|
-
"echarts": "^5.5.0",
|
43
|
-
"enquire.js": "^2.1.6",
|
44
|
-
"file-saver": "^2.0.5",
|
45
|
-
"highlight.js": "^11.7.0",
|
46
|
-
"html2canvas": "^1.4.1",
|
47
|
-
"js-base64": "^3.7.5",
|
48
|
-
"js-cookie": "^2.2.1",
|
49
|
-
"jsencrypt": "^3.3.2",
|
50
|
-
"jspdf": "^2.5.1",
|
51
|
-
"lodash.clonedeep": "^4.5.0",
|
52
|
-
"lodash.debounce": "^4",
|
53
|
-
"lodash.get": "^4.4.2",
|
54
|
-
"marked": "^4",
|
55
|
-
"mockjs": "^1.1.0",
|
56
|
-
"nprogress": "^0.2.0",
|
57
|
-
"qs": "^6.11.2",
|
58
|
-
"regenerator-runtime": "^0.14.0",
|
59
|
-
"splitpanes": "^2.4.1",
|
60
|
-
"videojs-contrib-hls": "^5.15.0",
|
61
|
-
"viser-vue": "^2.4.8",
|
62
|
-
"vue": "^2.7.14",
|
63
|
-
"vue-codemirror": "4.0.6",
|
64
|
-
"vue-color": "2.7.0",
|
65
|
-
"vue-draggable-resizable": "^2.3.0",
|
66
|
-
"vue-i18n": "^8.28.2",
|
67
|
-
"vue-json-viewer": "^2.2.22",
|
68
|
-
"vue-router": "^3.6.5",
|
69
|
-
"vue-video-player": "^5.0.2",
|
70
|
-
"vue-virtual-scroller": "^1.1.2",
|
71
|
-
"vuedraggable": "^2.24.3",
|
72
|
-
"vuex": "^3.6.2",
|
73
|
-
"xlsx": "0.18.5"
|
74
|
-
},
|
75
|
-
"devDependencies": {
|
76
|
-
"@ant-design/colors": "^7.0.0",
|
77
|
-
"@babel/core": "^7.22.20",
|
78
|
-
"@babel/eslint-parser": "^7.22.15",
|
79
|
-
"@babel/preset-env": "^7.22.20",
|
80
|
-
"@vue/cli-plugin-babel": "^5.0.8",
|
81
|
-
"@vue/cli-plugin-eslint": "^5.0.8",
|
82
|
-
"@vue/cli-service": "^5.0.8",
|
83
|
-
"@vue/eslint-config-standard": "^8.0.1",
|
84
|
-
"@vue/test-utils": "^1.3.6",
|
85
|
-
"babel-plugin-transform-remove-console": "^6.9.4",
|
86
|
-
"compression-webpack-plugin": "^10.0.0",
|
87
|
-
"css-minimizer-webpack-plugin": "^5.0.1",
|
88
|
-
"deepmerge": "^4.3.1",
|
89
|
-
"eslint": "^8.51.0",
|
90
|
-
"eslint-plugin-vue": "^9.17.0",
|
91
|
-
"fast-deep-equal": "^3.1.3",
|
92
|
-
"ignore-loader": "^0.1.2",
|
93
|
-
"jest": "^29.7.0",
|
94
|
-
"jest-environment-jsdom": "^29.7.0",
|
95
|
-
"jest-transform-stub": "^2.0.0",
|
96
|
-
"less-loader": "^6.2.0",
|
97
|
-
"script-loader": "^0.7.2",
|
98
|
-
"style-resources-loader": "^1.5.0",
|
99
|
-
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
100
|
-
"vue-jest": "^4.0.1",
|
101
|
-
"vue-template-compiler": "^2.7.14",
|
102
|
-
"webpack": "^5.88.2",
|
103
|
-
"webpack-theme-color-replacer": "^1.4.7",
|
104
|
-
"whatwg-fetch": "^3.6.19"
|
105
|
-
},
|
106
|
-
"browserslist": [
|
107
|
-
"> 1%",
|
108
|
-
"last 2 versions",
|
109
|
-
"not dead",
|
110
|
-
"not ie 11"
|
111
|
-
]
|
112
|
-
}
|
1
|
+
{
|
2
|
+
"name": "vue2-client",
|
3
|
+
"version": "1.16.44",
|
4
|
+
"private": false,
|
5
|
+
"scripts": {
|
6
|
+
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
|
7
|
+
"serve:gaslink": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode gaslink",
|
8
|
+
"serve:revenue": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode revenue",
|
9
|
+
"serve:liuli": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode liuli",
|
10
|
+
"serve:scada": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode scada",
|
11
|
+
"serve:iot": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode iot",
|
12
|
+
"serve:his": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode his",
|
13
|
+
"serve:runtime": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode runtime",
|
14
|
+
"serve:message": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode message",
|
15
|
+
"serve:apply": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint --mode apply",
|
16
|
+
"mac-serve": "vue-cli-service serve --no-eslint --mode his",
|
17
|
+
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
|
18
|
+
"test:unit": "vue-cli-service test:unit",
|
19
|
+
"lint": "vue-cli-service lint",
|
20
|
+
"build:preview": "vue-cli-service build --mode preview",
|
21
|
+
"lint:nofix": "vue-cli-service lint --no-fix",
|
22
|
+
"test": "jest"
|
23
|
+
},
|
24
|
+
"dependencies": {
|
25
|
+
"@afwenming123/vue-easy-tree": "^1.0.1",
|
26
|
+
"@afwenming123/vue-plugin-hiprint": "^0.0.70",
|
27
|
+
"@amap/amap-jsapi-loader": "^1.0.1",
|
28
|
+
"@antv/data-set": "^0.11.8",
|
29
|
+
"@antv/g2plot": "^2.4.31",
|
30
|
+
"@hufe921/canvas-editor": "^0.9.49",
|
31
|
+
"@microsoft/fetch-event-source": "^2.0.1",
|
32
|
+
"@vue/babel-preset-jsx": "^1.4.0",
|
33
|
+
"animate.css": "^4.1.1",
|
34
|
+
"ant-design-vue": "^1.7.8",
|
35
|
+
"axios": "^0.27.2",
|
36
|
+
"clipboard": "^2.0.11",
|
37
|
+
"core-js": "^3.33.0",
|
38
|
+
"crypto-js": "^4.1.1",
|
39
|
+
"date-fns": "^2.29.3",
|
40
|
+
"default-passive-events": "^2.0.0",
|
41
|
+
"dotenv": "^16.3.1",
|
42
|
+
"echarts": "^5.5.0",
|
43
|
+
"enquire.js": "^2.1.6",
|
44
|
+
"file-saver": "^2.0.5",
|
45
|
+
"highlight.js": "^11.7.0",
|
46
|
+
"html2canvas": "^1.4.1",
|
47
|
+
"js-base64": "^3.7.5",
|
48
|
+
"js-cookie": "^2.2.1",
|
49
|
+
"jsencrypt": "^3.3.2",
|
50
|
+
"jspdf": "^2.5.1",
|
51
|
+
"lodash.clonedeep": "^4.5.0",
|
52
|
+
"lodash.debounce": "^4",
|
53
|
+
"lodash.get": "^4.4.2",
|
54
|
+
"marked": "^4",
|
55
|
+
"mockjs": "^1.1.0",
|
56
|
+
"nprogress": "^0.2.0",
|
57
|
+
"qs": "^6.11.2",
|
58
|
+
"regenerator-runtime": "^0.14.0",
|
59
|
+
"splitpanes": "^2.4.1",
|
60
|
+
"videojs-contrib-hls": "^5.15.0",
|
61
|
+
"viser-vue": "^2.4.8",
|
62
|
+
"vue": "^2.7.14",
|
63
|
+
"vue-codemirror": "4.0.6",
|
64
|
+
"vue-color": "2.7.0",
|
65
|
+
"vue-draggable-resizable": "^2.3.0",
|
66
|
+
"vue-i18n": "^8.28.2",
|
67
|
+
"vue-json-viewer": "^2.2.22",
|
68
|
+
"vue-router": "^3.6.5",
|
69
|
+
"vue-video-player": "^5.0.2",
|
70
|
+
"vue-virtual-scroller": "^1.1.2",
|
71
|
+
"vuedraggable": "^2.24.3",
|
72
|
+
"vuex": "^3.6.2",
|
73
|
+
"xlsx": "0.18.5"
|
74
|
+
},
|
75
|
+
"devDependencies": {
|
76
|
+
"@ant-design/colors": "^7.0.0",
|
77
|
+
"@babel/core": "^7.22.20",
|
78
|
+
"@babel/eslint-parser": "^7.22.15",
|
79
|
+
"@babel/preset-env": "^7.22.20",
|
80
|
+
"@vue/cli-plugin-babel": "^5.0.8",
|
81
|
+
"@vue/cli-plugin-eslint": "^5.0.8",
|
82
|
+
"@vue/cli-service": "^5.0.8",
|
83
|
+
"@vue/eslint-config-standard": "^8.0.1",
|
84
|
+
"@vue/test-utils": "^1.3.6",
|
85
|
+
"babel-plugin-transform-remove-console": "^6.9.4",
|
86
|
+
"compression-webpack-plugin": "^10.0.0",
|
87
|
+
"css-minimizer-webpack-plugin": "^5.0.1",
|
88
|
+
"deepmerge": "^4.3.1",
|
89
|
+
"eslint": "^8.51.0",
|
90
|
+
"eslint-plugin-vue": "^9.17.0",
|
91
|
+
"fast-deep-equal": "^3.1.3",
|
92
|
+
"ignore-loader": "^0.1.2",
|
93
|
+
"jest": "^29.7.0",
|
94
|
+
"jest-environment-jsdom": "^29.7.0",
|
95
|
+
"jest-transform-stub": "^2.0.0",
|
96
|
+
"less-loader": "^6.2.0",
|
97
|
+
"script-loader": "^0.7.2",
|
98
|
+
"style-resources-loader": "^1.5.0",
|
99
|
+
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
100
|
+
"vue-jest": "^4.0.1",
|
101
|
+
"vue-template-compiler": "^2.7.14",
|
102
|
+
"webpack": "^5.88.2",
|
103
|
+
"webpack-theme-color-replacer": "^1.4.7",
|
104
|
+
"whatwg-fetch": "^3.6.19"
|
105
|
+
},
|
106
|
+
"browserslist": [
|
107
|
+
"> 1%",
|
108
|
+
"last 2 versions",
|
109
|
+
"not dead",
|
110
|
+
"not ie 11"
|
111
|
+
]
|
112
|
+
}
|
@@ -85,8 +85,9 @@ defineExpose({
|
|
85
85
|
}
|
86
86
|
}
|
87
87
|
}
|
88
|
-
//
|
89
|
-
&.h-buttons-table-height-button23
|
88
|
+
// +号样式(共享基础样式)
|
89
|
+
&.h-buttons-table-height-button23,
|
90
|
+
&.h-buttons-table-height-button23-no-transform {
|
90
91
|
:deep(.ant-btn-group) {
|
91
92
|
display: inline-flex;
|
92
93
|
align-items: center;
|
@@ -104,11 +105,15 @@ defineExpose({
|
|
104
105
|
margin-left: 10px;
|
105
106
|
width: 30px;
|
106
107
|
height: 30px;
|
107
|
-
/* 自适应上移:按按钮自身高度百分比位移 */
|
108
|
-
transform: translateY(-100%);
|
109
108
|
}
|
110
109
|
}
|
111
110
|
}
|
111
|
+
// 仅在有分页的场景上移
|
112
|
+
&.h-buttons-table-height-button23 {
|
113
|
+
:deep(.ant-btn-group) {
|
114
|
+
.ant-btn { transform: translateY(-100%); }
|
115
|
+
}
|
116
|
+
}
|
112
117
|
// 居中+悬停高亮的新样式
|
113
118
|
&.h-buttons-plus-center {
|
114
119
|
:deep(.ant-btn-group) {
|
@@ -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>
|