vue2-client 1.12.69 → 1.12.71
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 +108 -108
- package/src/base-client/components/common/XCollapse/XCollapse.vue +214 -214
- package/src/base-client/components/common/XReportGrid/XReportDesign.vue +616 -616
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +706 -706
- package/src/base-client/components/his/XList/XList.vue +90 -90
- package/src/base-client/plugins/AppData.js +126 -126
- package/src/pages/ReportGrid/index.vue +76 -76
- package/src/pages/userInfoDetailManage/UserChargeRecordQuery/index.vue +1 -0
- package/src/router/async/router.map.js +119 -122
- package/src/base-client/components/common/XCollapse/XCollapseDemo.vue +0 -15
package/package.json
CHANGED
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vue2-client",
|
|
3
|
-
"version": "1.12.
|
|
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
|
-
"mac-serve": "vue-cli-service serve --no-eslint --mode his",
|
|
14
|
-
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
|
|
15
|
-
"test:unit": "vue-cli-service test:unit",
|
|
16
|
-
"lint": "vue-cli-service lint",
|
|
17
|
-
"build:preview": "vue-cli-service build --mode preview",
|
|
18
|
-
"lint:nofix": "vue-cli-service lint --no-fix",
|
|
19
|
-
"test": "jest"
|
|
20
|
-
},
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@afwenming123/vue-easy-tree": "^1.0.1",
|
|
23
|
-
"@afwenming123/vue-plugin-hiprint": "^0.0.70",
|
|
24
|
-
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
25
|
-
"@antv/data-set": "^0.11.8",
|
|
26
|
-
"@antv/g2plot": "^2.4.31",
|
|
27
|
-
"@hufe921/canvas-editor": "^0.9.49",
|
|
28
|
-
"@microsoft/fetch-event-source": "^2.0.1",
|
|
29
|
-
"@vue/babel-preset-jsx": "^1.4.0",
|
|
30
|
-
"animate.css": "^4.1.1",
|
|
31
|
-
"ant-design-vue": "^1.7.8",
|
|
32
|
-
"axios": "^0.27.2",
|
|
33
|
-
"clipboard": "^2.0.11",
|
|
34
|
-
"core-js": "^3.33.0",
|
|
35
|
-
"crypto-js": "^4.1.1",
|
|
36
|
-
"date-fns": "^2.29.3",
|
|
37
|
-
"default-passive-events": "^2.0.0",
|
|
38
|
-
"dotenv": "^16.3.1",
|
|
39
|
-
"echarts": "^5.5.0",
|
|
40
|
-
"enquire.js": "^2.1.6",
|
|
41
|
-
"file-saver": "^2.0.5",
|
|
42
|
-
"highlight.js": "^11.7.0",
|
|
43
|
-
"html2canvas": "^1.4.1",
|
|
44
|
-
"js-base64": "^3.7.5",
|
|
45
|
-
"js-cookie": "^2.2.1",
|
|
46
|
-
"jsencrypt": "^3.3.2",
|
|
47
|
-
"jspdf": "^2.5.1",
|
|
48
|
-
"lodash.clonedeep": "^4.5.0",
|
|
49
|
-
"lodash.debounce": "^4",
|
|
50
|
-
"lodash.get": "^4.4.2",
|
|
51
|
-
"marked": "^4",
|
|
52
|
-
"mockjs": "^1.1.0",
|
|
53
|
-
"nprogress": "^0.2.0",
|
|
54
|
-
"qs": "^6.11.2",
|
|
55
|
-
"regenerator-runtime": "^0.14.0",
|
|
56
|
-
"videojs-contrib-hls": "^5.15.0",
|
|
57
|
-
"viser-vue": "^2.4.8",
|
|
58
|
-
"vue": "^2.7.14",
|
|
59
|
-
"vue-codemirror": "4.0.6",
|
|
60
|
-
"vue-draggable-resizable": "^2",
|
|
61
|
-
"vue-i18n": "^8.28.2",
|
|
62
|
-
"vue-json-viewer": "^2.2.22",
|
|
63
|
-
"vue-router": "^3.6.5",
|
|
64
|
-
"vue-video-player": "^5.0.2",
|
|
65
|
-
"vue-virtual-scroller": "^1.1.2",
|
|
66
|
-
"vuedraggable": "^2.24.3",
|
|
67
|
-
"vuex": "^3.6.2",
|
|
68
|
-
"xlsx": "0.18.5"
|
|
69
|
-
},
|
|
70
|
-
"devDependencies": {
|
|
71
|
-
"@ant-design/colors": "^7.0.0",
|
|
72
|
-
"@babel/core": "^7.22.20",
|
|
73
|
-
"@babel/eslint-parser": "^7.22.15",
|
|
74
|
-
"@babel/preset-env": "^7.22.20",
|
|
75
|
-
"@vue/cli-plugin-babel": "^5.0.8",
|
|
76
|
-
"@vue/cli-plugin-eslint": "^5.0.8",
|
|
77
|
-
"@vue/cli-service": "^5.0.8",
|
|
78
|
-
"@vue/eslint-config-standard": "^8.0.1",
|
|
79
|
-
"@vue/test-utils": "^1.3.6",
|
|
80
|
-
"@jest/globals": "^29.7.0",
|
|
81
|
-
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
82
|
-
"compression-webpack-plugin": "^10.0.0",
|
|
83
|
-
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
84
|
-
"deepmerge": "^4.3.1",
|
|
85
|
-
"eslint": "^8.51.0",
|
|
86
|
-
"eslint-plugin-vue": "^9.17.0",
|
|
87
|
-
"fast-deep-equal": "^3.1.3",
|
|
88
|
-
"ignore-loader": "^0.1.2",
|
|
89
|
-
"jest": "^29.7.0",
|
|
90
|
-
"jest-environment-jsdom": "^29.7.0",
|
|
91
|
-
"jest-transform-stub": "^2.0.0",
|
|
92
|
-
"less-loader": "^6.2.0",
|
|
93
|
-
"script-loader": "^0.7.2",
|
|
94
|
-
"style-resources-loader": "^1.5.0",
|
|
95
|
-
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
|
96
|
-
"vue-jest": "^4.0.1",
|
|
97
|
-
"vue-template-compiler": "^2.7.14",
|
|
98
|
-
"webpack": "^5.88.2",
|
|
99
|
-
"webpack-theme-color-replacer": "^1.4.7",
|
|
100
|
-
"whatwg-fetch": "^3.6.19"
|
|
101
|
-
},
|
|
102
|
-
"browserslist": [
|
|
103
|
-
"> 1%",
|
|
104
|
-
"last 2 versions",
|
|
105
|
-
"not dead",
|
|
106
|
-
"not ie 11"
|
|
107
|
-
]
|
|
108
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "vue2-client",
|
|
3
|
+
"version": "1.12.71",
|
|
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
|
+
"mac-serve": "vue-cli-service serve --no-eslint --mode his",
|
|
14
|
+
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
|
|
15
|
+
"test:unit": "vue-cli-service test:unit",
|
|
16
|
+
"lint": "vue-cli-service lint",
|
|
17
|
+
"build:preview": "vue-cli-service build --mode preview",
|
|
18
|
+
"lint:nofix": "vue-cli-service lint --no-fix",
|
|
19
|
+
"test": "jest"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@afwenming123/vue-easy-tree": "^1.0.1",
|
|
23
|
+
"@afwenming123/vue-plugin-hiprint": "^0.0.70",
|
|
24
|
+
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
25
|
+
"@antv/data-set": "^0.11.8",
|
|
26
|
+
"@antv/g2plot": "^2.4.31",
|
|
27
|
+
"@hufe921/canvas-editor": "^0.9.49",
|
|
28
|
+
"@microsoft/fetch-event-source": "^2.0.1",
|
|
29
|
+
"@vue/babel-preset-jsx": "^1.4.0",
|
|
30
|
+
"animate.css": "^4.1.1",
|
|
31
|
+
"ant-design-vue": "^1.7.8",
|
|
32
|
+
"axios": "^0.27.2",
|
|
33
|
+
"clipboard": "^2.0.11",
|
|
34
|
+
"core-js": "^3.33.0",
|
|
35
|
+
"crypto-js": "^4.1.1",
|
|
36
|
+
"date-fns": "^2.29.3",
|
|
37
|
+
"default-passive-events": "^2.0.0",
|
|
38
|
+
"dotenv": "^16.3.1",
|
|
39
|
+
"echarts": "^5.5.0",
|
|
40
|
+
"enquire.js": "^2.1.6",
|
|
41
|
+
"file-saver": "^2.0.5",
|
|
42
|
+
"highlight.js": "^11.7.0",
|
|
43
|
+
"html2canvas": "^1.4.1",
|
|
44
|
+
"js-base64": "^3.7.5",
|
|
45
|
+
"js-cookie": "^2.2.1",
|
|
46
|
+
"jsencrypt": "^3.3.2",
|
|
47
|
+
"jspdf": "^2.5.1",
|
|
48
|
+
"lodash.clonedeep": "^4.5.0",
|
|
49
|
+
"lodash.debounce": "^4",
|
|
50
|
+
"lodash.get": "^4.4.2",
|
|
51
|
+
"marked": "^4",
|
|
52
|
+
"mockjs": "^1.1.0",
|
|
53
|
+
"nprogress": "^0.2.0",
|
|
54
|
+
"qs": "^6.11.2",
|
|
55
|
+
"regenerator-runtime": "^0.14.0",
|
|
56
|
+
"videojs-contrib-hls": "^5.15.0",
|
|
57
|
+
"viser-vue": "^2.4.8",
|
|
58
|
+
"vue": "^2.7.14",
|
|
59
|
+
"vue-codemirror": "4.0.6",
|
|
60
|
+
"vue-draggable-resizable": "^2",
|
|
61
|
+
"vue-i18n": "^8.28.2",
|
|
62
|
+
"vue-json-viewer": "^2.2.22",
|
|
63
|
+
"vue-router": "^3.6.5",
|
|
64
|
+
"vue-video-player": "^5.0.2",
|
|
65
|
+
"vue-virtual-scroller": "^1.1.2",
|
|
66
|
+
"vuedraggable": "^2.24.3",
|
|
67
|
+
"vuex": "^3.6.2",
|
|
68
|
+
"xlsx": "0.18.5"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@ant-design/colors": "^7.0.0",
|
|
72
|
+
"@babel/core": "^7.22.20",
|
|
73
|
+
"@babel/eslint-parser": "^7.22.15",
|
|
74
|
+
"@babel/preset-env": "^7.22.20",
|
|
75
|
+
"@vue/cli-plugin-babel": "^5.0.8",
|
|
76
|
+
"@vue/cli-plugin-eslint": "^5.0.8",
|
|
77
|
+
"@vue/cli-service": "^5.0.8",
|
|
78
|
+
"@vue/eslint-config-standard": "^8.0.1",
|
|
79
|
+
"@vue/test-utils": "^1.3.6",
|
|
80
|
+
"@jest/globals": "^29.7.0",
|
|
81
|
+
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
82
|
+
"compression-webpack-plugin": "^10.0.0",
|
|
83
|
+
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
84
|
+
"deepmerge": "^4.3.1",
|
|
85
|
+
"eslint": "^8.51.0",
|
|
86
|
+
"eslint-plugin-vue": "^9.17.0",
|
|
87
|
+
"fast-deep-equal": "^3.1.3",
|
|
88
|
+
"ignore-loader": "^0.1.2",
|
|
89
|
+
"jest": "^29.7.0",
|
|
90
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
91
|
+
"jest-transform-stub": "^2.0.0",
|
|
92
|
+
"less-loader": "^6.2.0",
|
|
93
|
+
"script-loader": "^0.7.2",
|
|
94
|
+
"style-resources-loader": "^1.5.0",
|
|
95
|
+
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
|
96
|
+
"vue-jest": "^4.0.1",
|
|
97
|
+
"vue-template-compiler": "^2.7.14",
|
|
98
|
+
"webpack": "^5.88.2",
|
|
99
|
+
"webpack-theme-color-replacer": "^1.4.7",
|
|
100
|
+
"whatwg-fetch": "^3.6.19"
|
|
101
|
+
},
|
|
102
|
+
"browserslist": [
|
|
103
|
+
"> 1%",
|
|
104
|
+
"last 2 versions",
|
|
105
|
+
"not dead",
|
|
106
|
+
"not ie 11"
|
|
107
|
+
]
|
|
108
|
+
}
|
|
@@ -1,214 +1,214 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<a-collapse
|
|
4
|
-
:activeKey="activeKey"
|
|
5
|
-
@change="handleChange"
|
|
6
|
-
>
|
|
7
|
-
<a-collapse-panel
|
|
8
|
-
v-for="(panel, panelIndex) in config.showData"
|
|
9
|
-
:key="panelIndex.toString()"
|
|
10
|
-
:show-arrow="false"
|
|
11
|
-
>
|
|
12
|
-
<template #header>
|
|
13
|
-
<div class="header-content">
|
|
14
|
-
<span
|
|
15
|
-
class="header-text"
|
|
16
|
-
:style="config.titleStyle"
|
|
17
|
-
>
|
|
18
|
-
{{ panel.title }}
|
|
19
|
-
</span>
|
|
20
|
-
<!-- 当有 title2 数据时显示信息项 -->
|
|
21
|
-
<template v-if="panel.title2 && panel.title2.length">
|
|
22
|
-
<span
|
|
23
|
-
v-for="(item, headerIndex) in panel.title2"
|
|
24
|
-
:key="headerIndex"
|
|
25
|
-
class="info-item"
|
|
26
|
-
:style="config.title2Style"
|
|
27
|
-
>
|
|
28
|
-
<span>{{ item.key }}:</span>
|
|
29
|
-
<span>{{ item.value }}</span>
|
|
30
|
-
</span>
|
|
31
|
-
</template>
|
|
32
|
-
<!-- 当有 title3 数据时显示时间项 -->
|
|
33
|
-
<span
|
|
34
|
-
v-if="panel.title3"
|
|
35
|
-
class="time-item"
|
|
36
|
-
:style="config.title3Style"
|
|
37
|
-
>
|
|
38
|
-
{{ panel.title3 }}
|
|
39
|
-
</span>
|
|
40
|
-
<!-- 修改搜索框的显示条件 -->
|
|
41
|
-
<a-input-search
|
|
42
|
-
v-if="panel.search"
|
|
43
|
-
v-model="searchText[panelIndex]"
|
|
44
|
-
placeholder="请输入搜索内容"
|
|
45
|
-
class="search-input"
|
|
46
|
-
@search="(value) => onSearch(value, panelIndex)"
|
|
47
|
-
@click.stop
|
|
48
|
-
/>
|
|
49
|
-
</div>
|
|
50
|
-
</template>
|
|
51
|
-
<!-- 根据类型显示不同内容 -->
|
|
52
|
-
<template v-if="panel.type === 'picture'">
|
|
53
|
-
<img :src="panel.configName" alt="图片" style="width: 100%; max-width: 500px;"/>
|
|
54
|
-
</template>
|
|
55
|
-
<template v-else-if="panel.type === 'cover'">
|
|
56
|
-
<x-report
|
|
57
|
-
:use-oss-for-img="false"
|
|
58
|
-
:config-name="panel.configName"
|
|
59
|
-
server-name="af-his"
|
|
60
|
-
:show-img-in-cell="true"
|
|
61
|
-
:display-only="true"
|
|
62
|
-
:edit-mode="false"
|
|
63
|
-
:show-save-button="false"
|
|
64
|
-
:no-padding="true"
|
|
65
|
-
:dont-format="true">
|
|
66
|
-
</x-report>
|
|
67
|
-
</template>
|
|
68
|
-
</a-collapse-panel>
|
|
69
|
-
</a-collapse>
|
|
70
|
-
</div>
|
|
71
|
-
</template>
|
|
72
|
-
|
|
73
|
-
<script>
|
|
74
|
-
import XReport from '@vue2-client/base-client/components/common/XReportGrid'
|
|
75
|
-
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
|
76
|
-
|
|
77
|
-
export default {
|
|
78
|
-
name: 'XCollapse',
|
|
79
|
-
components: {
|
|
80
|
-
XReport
|
|
81
|
-
},
|
|
82
|
-
inject: ['getConfigByName', 'getComponentByName'],
|
|
83
|
-
data () {
|
|
84
|
-
return {
|
|
85
|
-
activeKey: [],
|
|
86
|
-
config: {},
|
|
87
|
-
configName: '',
|
|
88
|
-
searchText: {}
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
props: {
|
|
92
|
-
// json名
|
|
93
|
-
queryParamsName: {
|
|
94
|
-
type: Object,
|
|
95
|
-
default: 'openPrescriptionConfig'
|
|
96
|
-
},
|
|
97
|
-
parameter: {
|
|
98
|
-
type: Object,
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
created () {
|
|
102
|
-
this.searchTexts = {} // 初始化对象
|
|
103
|
-
|
|
104
|
-
this.getData(this.queryParamsName)
|
|
105
|
-
window.addEventListener('setItem', (e) => {
|
|
106
|
-
console.log('监听到sessionStorage的变化:', e)
|
|
107
|
-
if (e.key === 'klcf_id') {
|
|
108
|
-
this.newVal = sessionStorage.getItem('klcf_id')
|
|
109
|
-
// 进行业务处理
|
|
110
|
-
console.log('sessionStorage中的值发生了变化:', this.newVal)
|
|
111
|
-
}
|
|
112
|
-
})
|
|
113
|
-
},
|
|
114
|
-
beforeDestroy () {
|
|
115
|
-
window.removeEventListener('setItem', this.handleStorageChange)
|
|
116
|
-
},
|
|
117
|
-
provide () {
|
|
118
|
-
return {
|
|
119
|
-
getComponentByName: this.getComponentByName
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
methods: {
|
|
123
|
-
handleStorageChange (e) {
|
|
124
|
-
console.log('监听到sessionStorage的变化:', e)
|
|
125
|
-
if (e.key === 'klcf_id') {
|
|
126
|
-
this.newVal = sessionStorage.getItem('klcf_id')
|
|
127
|
-
// 进行业务处理
|
|
128
|
-
console.log('sessionStorage中的值发生了变化:', this.newVal)
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
async getData (config, parameter) {
|
|
132
|
-
this.configName = config
|
|
133
|
-
getConfigByName(config, 'af-his', res => {
|
|
134
|
-
this.config = res
|
|
135
|
-
console.warn(this.config)
|
|
136
|
-
runLogic(res.mainLogic, this.parameter, 'af-his').then(result => {
|
|
137
|
-
this.config.showData = result
|
|
138
|
-
this.activeKey = this.config.showData.map((_, panelIndex) => panelIndex.toString())
|
|
139
|
-
})
|
|
140
|
-
})
|
|
141
|
-
},
|
|
142
|
-
refreshXCollapse () {
|
|
143
|
-
this.getData(this.queryParamsName)
|
|
144
|
-
},
|
|
145
|
-
handleChange (keys) {
|
|
146
|
-
this.activeKey = keys
|
|
147
|
-
},
|
|
148
|
-
onSearch (value, panelIndex) {
|
|
149
|
-
console.log('搜索内容:', value, '面板索引:', panelIndex)
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
watch: {
|
|
153
|
-
queryParamsName: {
|
|
154
|
-
handler (newValue) {
|
|
155
|
-
this.getData(newValue, null)
|
|
156
|
-
},
|
|
157
|
-
deep: true
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
</script>
|
|
162
|
-
|
|
163
|
-
<style scoped>
|
|
164
|
-
.header-content {
|
|
165
|
-
display: flex;
|
|
166
|
-
align-items: center;
|
|
167
|
-
gap: 24px;
|
|
168
|
-
white-space: nowrap;
|
|
169
|
-
overflow: hidden;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.header-text {
|
|
173
|
-
margin-right: 16px;
|
|
174
|
-
font-size: 16px;
|
|
175
|
-
font-weight: 800;
|
|
176
|
-
flex-shrink: 0;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.info-item {
|
|
180
|
-
display: inline-flex;
|
|
181
|
-
align-items: center;
|
|
182
|
-
gap: 4px;
|
|
183
|
-
font-size: 12px;
|
|
184
|
-
color: #888888;
|
|
185
|
-
flex-shrink: 0;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.time-item {
|
|
189
|
-
margin-left: auto;
|
|
190
|
-
text-align: right;
|
|
191
|
-
flex-shrink: 0;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/* 覆盖 ant-design-vue 的默认样式 */
|
|
195
|
-
:deep(.ant-collapse-header) {
|
|
196
|
-
align-items: center !important;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
:deep(.ant-collapse-header-text) {
|
|
200
|
-
flex: 1;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
:deep(.ant-collapse-content > .ant-collapse-content-box) {
|
|
204
|
-
padding: 0;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
:deep(.ant-card-body) {
|
|
208
|
-
padding: 8px;
|
|
209
|
-
}
|
|
210
|
-
.search-input {
|
|
211
|
-
margin-left: auto;
|
|
212
|
-
width: 100%;
|
|
213
|
-
}
|
|
214
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<a-collapse
|
|
4
|
+
:activeKey="activeKey"
|
|
5
|
+
@change="handleChange"
|
|
6
|
+
>
|
|
7
|
+
<a-collapse-panel
|
|
8
|
+
v-for="(panel, panelIndex) in config.showData"
|
|
9
|
+
:key="panelIndex.toString()"
|
|
10
|
+
:show-arrow="false"
|
|
11
|
+
>
|
|
12
|
+
<template #header>
|
|
13
|
+
<div class="header-content">
|
|
14
|
+
<span
|
|
15
|
+
class="header-text"
|
|
16
|
+
:style="config.titleStyle"
|
|
17
|
+
>
|
|
18
|
+
{{ panel.title }}
|
|
19
|
+
</span>
|
|
20
|
+
<!-- 当有 title2 数据时显示信息项 -->
|
|
21
|
+
<template v-if="panel.title2 && panel.title2.length">
|
|
22
|
+
<span
|
|
23
|
+
v-for="(item, headerIndex) in panel.title2"
|
|
24
|
+
:key="headerIndex"
|
|
25
|
+
class="info-item"
|
|
26
|
+
:style="config.title2Style"
|
|
27
|
+
>
|
|
28
|
+
<span>{{ item.key }}:</span>
|
|
29
|
+
<span>{{ item.value }}</span>
|
|
30
|
+
</span>
|
|
31
|
+
</template>
|
|
32
|
+
<!-- 当有 title3 数据时显示时间项 -->
|
|
33
|
+
<span
|
|
34
|
+
v-if="panel.title3"
|
|
35
|
+
class="time-item"
|
|
36
|
+
:style="config.title3Style"
|
|
37
|
+
>
|
|
38
|
+
{{ panel.title3 }}
|
|
39
|
+
</span>
|
|
40
|
+
<!-- 修改搜索框的显示条件 -->
|
|
41
|
+
<a-input-search
|
|
42
|
+
v-if="panel.search"
|
|
43
|
+
v-model="searchText[panelIndex]"
|
|
44
|
+
placeholder="请输入搜索内容"
|
|
45
|
+
class="search-input"
|
|
46
|
+
@search="(value) => onSearch(value, panelIndex)"
|
|
47
|
+
@click.stop
|
|
48
|
+
/>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
<!-- 根据类型显示不同内容 -->
|
|
52
|
+
<template v-if="panel.type === 'picture'">
|
|
53
|
+
<img :src="panel.configName" alt="图片" style="width: 100%; max-width: 500px;"/>
|
|
54
|
+
</template>
|
|
55
|
+
<template v-else-if="panel.type === 'cover'">
|
|
56
|
+
<x-report
|
|
57
|
+
:use-oss-for-img="false"
|
|
58
|
+
:config-name="panel.configName"
|
|
59
|
+
server-name="af-his"
|
|
60
|
+
:show-img-in-cell="true"
|
|
61
|
+
:display-only="true"
|
|
62
|
+
:edit-mode="false"
|
|
63
|
+
:show-save-button="false"
|
|
64
|
+
:no-padding="true"
|
|
65
|
+
:dont-format="true">
|
|
66
|
+
</x-report>
|
|
67
|
+
</template>
|
|
68
|
+
</a-collapse-panel>
|
|
69
|
+
</a-collapse>
|
|
70
|
+
</div>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<script>
|
|
74
|
+
import XReport from '@vue2-client/base-client/components/common/XReportGrid'
|
|
75
|
+
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
|
76
|
+
|
|
77
|
+
export default {
|
|
78
|
+
name: 'XCollapse',
|
|
79
|
+
components: {
|
|
80
|
+
XReport
|
|
81
|
+
},
|
|
82
|
+
inject: ['getConfigByName', 'getComponentByName'],
|
|
83
|
+
data () {
|
|
84
|
+
return {
|
|
85
|
+
activeKey: [],
|
|
86
|
+
config: {},
|
|
87
|
+
configName: '',
|
|
88
|
+
searchText: {}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
props: {
|
|
92
|
+
// json名
|
|
93
|
+
queryParamsName: {
|
|
94
|
+
type: Object,
|
|
95
|
+
default: 'openPrescriptionConfig'
|
|
96
|
+
},
|
|
97
|
+
parameter: {
|
|
98
|
+
type: Object,
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
created () {
|
|
102
|
+
this.searchTexts = {} // 初始化对象
|
|
103
|
+
|
|
104
|
+
this.getData(this.queryParamsName)
|
|
105
|
+
window.addEventListener('setItem', (e) => {
|
|
106
|
+
console.log('监听到sessionStorage的变化:', e)
|
|
107
|
+
if (e.key === 'klcf_id') {
|
|
108
|
+
this.newVal = sessionStorage.getItem('klcf_id')
|
|
109
|
+
// 进行业务处理
|
|
110
|
+
console.log('sessionStorage中的值发生了变化:', this.newVal)
|
|
111
|
+
}
|
|
112
|
+
})
|
|
113
|
+
},
|
|
114
|
+
beforeDestroy () {
|
|
115
|
+
window.removeEventListener('setItem', this.handleStorageChange)
|
|
116
|
+
},
|
|
117
|
+
provide () {
|
|
118
|
+
return {
|
|
119
|
+
getComponentByName: this.getComponentByName
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
methods: {
|
|
123
|
+
handleStorageChange (e) {
|
|
124
|
+
console.log('监听到sessionStorage的变化:', e)
|
|
125
|
+
if (e.key === 'klcf_id') {
|
|
126
|
+
this.newVal = sessionStorage.getItem('klcf_id')
|
|
127
|
+
// 进行业务处理
|
|
128
|
+
console.log('sessionStorage中的值发生了变化:', this.newVal)
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
async getData (config, parameter) {
|
|
132
|
+
this.configName = config
|
|
133
|
+
getConfigByName(config, 'af-his', res => {
|
|
134
|
+
this.config = res
|
|
135
|
+
console.warn(this.config)
|
|
136
|
+
runLogic(res.mainLogic, this.parameter, 'af-his').then(result => {
|
|
137
|
+
this.config.showData = result
|
|
138
|
+
this.activeKey = this.config.showData.map((_, panelIndex) => panelIndex.toString())
|
|
139
|
+
})
|
|
140
|
+
})
|
|
141
|
+
},
|
|
142
|
+
refreshXCollapse () {
|
|
143
|
+
this.getData(this.queryParamsName)
|
|
144
|
+
},
|
|
145
|
+
handleChange (keys) {
|
|
146
|
+
this.activeKey = keys
|
|
147
|
+
},
|
|
148
|
+
onSearch (value, panelIndex) {
|
|
149
|
+
console.log('搜索内容:', value, '面板索引:', panelIndex)
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
watch: {
|
|
153
|
+
queryParamsName: {
|
|
154
|
+
handler (newValue) {
|
|
155
|
+
this.getData(newValue, null)
|
|
156
|
+
},
|
|
157
|
+
deep: true
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
</script>
|
|
162
|
+
|
|
163
|
+
<style scoped>
|
|
164
|
+
.header-content {
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
gap: 24px;
|
|
168
|
+
white-space: nowrap;
|
|
169
|
+
overflow: hidden;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.header-text {
|
|
173
|
+
margin-right: 16px;
|
|
174
|
+
font-size: 16px;
|
|
175
|
+
font-weight: 800;
|
|
176
|
+
flex-shrink: 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.info-item {
|
|
180
|
+
display: inline-flex;
|
|
181
|
+
align-items: center;
|
|
182
|
+
gap: 4px;
|
|
183
|
+
font-size: 12px;
|
|
184
|
+
color: #888888;
|
|
185
|
+
flex-shrink: 0;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.time-item {
|
|
189
|
+
margin-left: auto;
|
|
190
|
+
text-align: right;
|
|
191
|
+
flex-shrink: 0;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* 覆盖 ant-design-vue 的默认样式 */
|
|
195
|
+
:deep(.ant-collapse-header) {
|
|
196
|
+
align-items: center !important;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
:deep(.ant-collapse-header-text) {
|
|
200
|
+
flex: 1;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
:deep(.ant-collapse-content > .ant-collapse-content-box) {
|
|
204
|
+
padding: 0;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
:deep(.ant-card-body) {
|
|
208
|
+
padding: 8px;
|
|
209
|
+
}
|
|
210
|
+
.search-input {
|
|
211
|
+
margin-left: auto;
|
|
212
|
+
width: 100%;
|
|
213
|
+
}
|
|
214
|
+
</style>
|