vue2-client 1.12.90 → 1.12.92
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 +109 -109
- package/src/base-client/components/common/XCalendar/XCalendar.vue +21 -3
- package/src/base-client/components/his/XList/XList.vue +52 -14
- package/src/base-client/components/his/XSidebar/XSidebar.vue +4 -4
- package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +102 -0
- package/src/router/async/router.map.js +2 -1
package/package.json
CHANGED
|
@@ -1,109 +1,109 @@
|
|
|
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
|
-
"dayjs": "^1.11.13",
|
|
38
|
-
"default-passive-events": "^2.0.0",
|
|
39
|
-
"dotenv": "^16.3.1",
|
|
40
|
-
"echarts": "^5.5.0",
|
|
41
|
-
"enquire.js": "^2.1.6",
|
|
42
|
-
"file-saver": "^2.0.5",
|
|
43
|
-
"highlight.js": "^11.7.0",
|
|
44
|
-
"html2canvas": "^1.4.1",
|
|
45
|
-
"js-base64": "^3.7.5",
|
|
46
|
-
"js-cookie": "^2.2.1",
|
|
47
|
-
"jsencrypt": "^3.3.2",
|
|
48
|
-
"jspdf": "^2.5.1",
|
|
49
|
-
"lodash.clonedeep": "^4.5.0",
|
|
50
|
-
"lodash.debounce": "^4",
|
|
51
|
-
"lodash.get": "^4.4.2",
|
|
52
|
-
"marked": "^4",
|
|
53
|
-
"mockjs": "^1.1.0",
|
|
54
|
-
"nprogress": "^0.2.0",
|
|
55
|
-
"qs": "^6.11.2",
|
|
56
|
-
"regenerator-runtime": "^0.14.0",
|
|
57
|
-
"videojs-contrib-hls": "^5.15.0",
|
|
58
|
-
"viser-vue": "^2.4.8",
|
|
59
|
-
"vue": "^2.7.14",
|
|
60
|
-
"vue-codemirror": "4.0.6",
|
|
61
|
-
"vue-draggable-resizable": "^2",
|
|
62
|
-
"vue-i18n": "^8.28.2",
|
|
63
|
-
"vue-json-viewer": "^2.2.22",
|
|
64
|
-
"vue-router": "^3.6.5",
|
|
65
|
-
"vue-video-player": "^5.0.2",
|
|
66
|
-
"vue-virtual-scroller": "^1.1.2",
|
|
67
|
-
"vuedraggable": "^2.24.3",
|
|
68
|
-
"vuex": "^3.6.2",
|
|
69
|
-
"xlsx": "0.18.5"
|
|
70
|
-
},
|
|
71
|
-
"devDependencies": {
|
|
72
|
-
"@ant-design/colors": "^7.0.0",
|
|
73
|
-
"@babel/core": "^7.22.20",
|
|
74
|
-
"@babel/eslint-parser": "^7.22.15",
|
|
75
|
-
"@babel/preset-env": "^7.22.20",
|
|
76
|
-
"@jest/globals": "^29.7.0",
|
|
77
|
-
"@vue/cli-plugin-babel": "^5.0.8",
|
|
78
|
-
"@vue/cli-plugin-eslint": "^5.0.8",
|
|
79
|
-
"@vue/cli-service": "^5.0.8",
|
|
80
|
-
"@vue/eslint-config-standard": "^8.0.1",
|
|
81
|
-
"@vue/test-utils": "^1.3.6",
|
|
82
|
-
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
83
|
-
"compression-webpack-plugin": "^10.0.0",
|
|
84
|
-
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
85
|
-
"deepmerge": "^4.3.1",
|
|
86
|
-
"eslint": "^8.51.0",
|
|
87
|
-
"eslint-plugin-vue": "^9.17.0",
|
|
88
|
-
"fast-deep-equal": "^3.1.3",
|
|
89
|
-
"ignore-loader": "^0.1.2",
|
|
90
|
-
"jest": "^29.7.0",
|
|
91
|
-
"jest-environment-jsdom": "^29.7.0",
|
|
92
|
-
"jest-transform-stub": "^2.0.0",
|
|
93
|
-
"less-loader": "^6.2.0",
|
|
94
|
-
"script-loader": "^0.7.2",
|
|
95
|
-
"style-resources-loader": "^1.5.0",
|
|
96
|
-
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
|
97
|
-
"vue-jest": "^4.0.1",
|
|
98
|
-
"vue-template-compiler": "^2.7.14",
|
|
99
|
-
"webpack": "^5.88.2",
|
|
100
|
-
"webpack-theme-color-replacer": "^1.4.7",
|
|
101
|
-
"whatwg-fetch": "^3.6.19"
|
|
102
|
-
},
|
|
103
|
-
"browserslist": [
|
|
104
|
-
"> 1%",
|
|
105
|
-
"last 2 versions",
|
|
106
|
-
"not dead",
|
|
107
|
-
"not ie 11"
|
|
108
|
-
]
|
|
109
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "vue2-client",
|
|
3
|
+
"version": "1.12.92",
|
|
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
|
+
"dayjs": "^1.11.13",
|
|
38
|
+
"default-passive-events": "^2.0.0",
|
|
39
|
+
"dotenv": "^16.3.1",
|
|
40
|
+
"echarts": "^5.5.0",
|
|
41
|
+
"enquire.js": "^2.1.6",
|
|
42
|
+
"file-saver": "^2.0.5",
|
|
43
|
+
"highlight.js": "^11.7.0",
|
|
44
|
+
"html2canvas": "^1.4.1",
|
|
45
|
+
"js-base64": "^3.7.5",
|
|
46
|
+
"js-cookie": "^2.2.1",
|
|
47
|
+
"jsencrypt": "^3.3.2",
|
|
48
|
+
"jspdf": "^2.5.1",
|
|
49
|
+
"lodash.clonedeep": "^4.5.0",
|
|
50
|
+
"lodash.debounce": "^4",
|
|
51
|
+
"lodash.get": "^4.4.2",
|
|
52
|
+
"marked": "^4",
|
|
53
|
+
"mockjs": "^1.1.0",
|
|
54
|
+
"nprogress": "^0.2.0",
|
|
55
|
+
"qs": "^6.11.2",
|
|
56
|
+
"regenerator-runtime": "^0.14.0",
|
|
57
|
+
"videojs-contrib-hls": "^5.15.0",
|
|
58
|
+
"viser-vue": "^2.4.8",
|
|
59
|
+
"vue": "^2.7.14",
|
|
60
|
+
"vue-codemirror": "4.0.6",
|
|
61
|
+
"vue-draggable-resizable": "^2",
|
|
62
|
+
"vue-i18n": "^8.28.2",
|
|
63
|
+
"vue-json-viewer": "^2.2.22",
|
|
64
|
+
"vue-router": "^3.6.5",
|
|
65
|
+
"vue-video-player": "^5.0.2",
|
|
66
|
+
"vue-virtual-scroller": "^1.1.2",
|
|
67
|
+
"vuedraggable": "^2.24.3",
|
|
68
|
+
"vuex": "^3.6.2",
|
|
69
|
+
"xlsx": "0.18.5"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"@ant-design/colors": "^7.0.0",
|
|
73
|
+
"@babel/core": "^7.22.20",
|
|
74
|
+
"@babel/eslint-parser": "^7.22.15",
|
|
75
|
+
"@babel/preset-env": "^7.22.20",
|
|
76
|
+
"@jest/globals": "^29.7.0",
|
|
77
|
+
"@vue/cli-plugin-babel": "^5.0.8",
|
|
78
|
+
"@vue/cli-plugin-eslint": "^5.0.8",
|
|
79
|
+
"@vue/cli-service": "^5.0.8",
|
|
80
|
+
"@vue/eslint-config-standard": "^8.0.1",
|
|
81
|
+
"@vue/test-utils": "^1.3.6",
|
|
82
|
+
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
83
|
+
"compression-webpack-plugin": "^10.0.0",
|
|
84
|
+
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
85
|
+
"deepmerge": "^4.3.1",
|
|
86
|
+
"eslint": "^8.51.0",
|
|
87
|
+
"eslint-plugin-vue": "^9.17.0",
|
|
88
|
+
"fast-deep-equal": "^3.1.3",
|
|
89
|
+
"ignore-loader": "^0.1.2",
|
|
90
|
+
"jest": "^29.7.0",
|
|
91
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
92
|
+
"jest-transform-stub": "^2.0.0",
|
|
93
|
+
"less-loader": "^6.2.0",
|
|
94
|
+
"script-loader": "^0.7.2",
|
|
95
|
+
"style-resources-loader": "^1.5.0",
|
|
96
|
+
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
|
97
|
+
"vue-jest": "^4.0.1",
|
|
98
|
+
"vue-template-compiler": "^2.7.14",
|
|
99
|
+
"webpack": "^5.88.2",
|
|
100
|
+
"webpack-theme-color-replacer": "^1.4.7",
|
|
101
|
+
"whatwg-fetch": "^3.6.19"
|
|
102
|
+
},
|
|
103
|
+
"browserslist": [
|
|
104
|
+
"> 1%",
|
|
105
|
+
"last 2 versions",
|
|
106
|
+
"not dead",
|
|
107
|
+
"not ie 11"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
import { Calendar, Button } from 'ant-design-vue'
|
|
63
63
|
import moment from 'moment'
|
|
64
64
|
import 'moment/locale/zh-cn'
|
|
65
|
+
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
65
66
|
|
|
66
67
|
// 设置中文
|
|
67
68
|
moment.locale('zh-cn')
|
|
@@ -114,7 +115,8 @@ const defaultConfig = {
|
|
|
114
115
|
backToToday: 'back-to-today',
|
|
115
116
|
action: 'action',
|
|
116
117
|
add: 'add',
|
|
117
|
-
monthChange: 'month-change'
|
|
118
|
+
monthChange: 'month-change',
|
|
119
|
+
init: 'init'
|
|
118
120
|
}
|
|
119
121
|
}
|
|
120
122
|
|
|
@@ -142,8 +144,7 @@ export default {
|
|
|
142
144
|
}
|
|
143
145
|
},
|
|
144
146
|
created () {
|
|
145
|
-
|
|
146
|
-
this.mergedConfig = this.mergeConfig(defaultConfig, this.config)
|
|
147
|
+
this.getData(this.config)
|
|
147
148
|
},
|
|
148
149
|
computed: {
|
|
149
150
|
// 使用计算属性访问合并后的配置
|
|
@@ -161,6 +162,14 @@ export default {
|
|
|
161
162
|
}
|
|
162
163
|
},
|
|
163
164
|
methods: {
|
|
165
|
+
// 获取配置
|
|
166
|
+
getData (config) {
|
|
167
|
+
getConfigByName(config, 'af-his', res => {
|
|
168
|
+
// 深度合并配置
|
|
169
|
+
this.mergedConfig = this.mergeConfig(defaultConfig, res)
|
|
170
|
+
this.$emit(this.mergedConfig.events.init, this.currentDate)
|
|
171
|
+
})
|
|
172
|
+
},
|
|
164
173
|
// 深度合并配置
|
|
165
174
|
mergeConfig (defaultConfig, userConfig) {
|
|
166
175
|
const result = { ...defaultConfig }
|
|
@@ -222,6 +231,15 @@ export default {
|
|
|
222
231
|
handleAdd (action) {
|
|
223
232
|
this.$emit(this.config.events.add, this.currentDate)
|
|
224
233
|
}
|
|
234
|
+
},
|
|
235
|
+
watch: {
|
|
236
|
+
// 监听配置参数名称变化
|
|
237
|
+
queryParamsName: {
|
|
238
|
+
handler (newValue) {
|
|
239
|
+
this.getData(newValue)
|
|
240
|
+
},
|
|
241
|
+
deep: true,
|
|
242
|
+
}
|
|
225
243
|
}
|
|
226
244
|
}
|
|
227
245
|
</script>
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="list-wrapper"
|
|
2
|
+
<div class="list-wrapper">
|
|
3
3
|
<a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
|
|
4
4
|
<a-list-item slot="renderItem" slot-scope="item, index" class="list-item" @click="handleClick(index)">
|
|
5
|
-
|
|
5
|
+
<i
|
|
6
|
+
v-if="icon"
|
|
7
|
+
class="icon-menu"
|
|
8
|
+
:style="getIconStyle(item)"
|
|
9
|
+
></i>
|
|
10
|
+
<span
|
|
11
|
+
class="item-text">
|
|
12
|
+
{{ item.number }} {{ item.name }}
|
|
13
|
+
</span>
|
|
14
|
+
<a-button v-if="button" type="link" class="confirm-btn" @click.stop="click(index)">{{ buttonName }}</a-button>
|
|
6
15
|
</a-list-item>
|
|
7
16
|
</a-list>
|
|
8
17
|
</div>
|
|
@@ -10,20 +19,23 @@
|
|
|
10
19
|
|
|
11
20
|
<script>
|
|
12
21
|
|
|
13
|
-
import { runLogic } from '@vue2-client/services/api/common'
|
|
22
|
+
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
|
14
23
|
|
|
15
24
|
export default {
|
|
16
25
|
name: 'XList',
|
|
17
26
|
props: {
|
|
18
27
|
queryParamsName: {
|
|
19
28
|
type: Object,
|
|
20
|
-
default: '
|
|
21
|
-
}
|
|
29
|
+
default: 'outpatientWaitConfig'
|
|
30
|
+
}
|
|
22
31
|
},
|
|
23
32
|
inject: ['getComponentByName'],
|
|
24
33
|
data () {
|
|
25
34
|
return {
|
|
26
|
-
data: []
|
|
35
|
+
data: [],
|
|
36
|
+
button: false,
|
|
37
|
+
icon: false,
|
|
38
|
+
buttonName: ''
|
|
27
39
|
}
|
|
28
40
|
},
|
|
29
41
|
created () {
|
|
@@ -31,8 +43,13 @@ export default {
|
|
|
31
43
|
},
|
|
32
44
|
methods: {
|
|
33
45
|
async getData (config) {
|
|
34
|
-
|
|
35
|
-
this.
|
|
46
|
+
getConfigByName(config, 'af-his', res => {
|
|
47
|
+
this.button = res.button
|
|
48
|
+
this.icon = res.icon
|
|
49
|
+
this.buttonName = res.buttonName
|
|
50
|
+
runLogic(res.mainSource, {}, 'af-his').then(resData => {
|
|
51
|
+
this.data = resData
|
|
52
|
+
})
|
|
36
53
|
})
|
|
37
54
|
},
|
|
38
55
|
handleClick (index) {
|
|
@@ -41,7 +58,14 @@ export default {
|
|
|
41
58
|
refreshList () {
|
|
42
59
|
this.getData(this.queryParamsName)
|
|
43
60
|
},
|
|
44
|
-
|
|
61
|
+
click (index) {
|
|
62
|
+
this.$emit('click', this.data[index + 1])
|
|
63
|
+
},
|
|
64
|
+
getIconStyle (item) {
|
|
65
|
+
return item.picture
|
|
66
|
+
? { backgroundImage: `url(${item.picture})` }
|
|
67
|
+
: {}
|
|
68
|
+
}
|
|
45
69
|
}
|
|
46
70
|
}
|
|
47
71
|
</script>
|
|
@@ -50,7 +74,6 @@ export default {
|
|
|
50
74
|
.list-wrapper {
|
|
51
75
|
max-height: 240px;
|
|
52
76
|
overflow-y: auto;
|
|
53
|
-
cursor: pointer;
|
|
54
77
|
padding-right: 2px;
|
|
55
78
|
}
|
|
56
79
|
|
|
@@ -62,16 +85,31 @@ export default {
|
|
|
62
85
|
height: 35px;
|
|
63
86
|
border-radius: 6px;
|
|
64
87
|
background-color: #F4F4F4;
|
|
65
|
-
padding: 8px 15px
|
|
88
|
+
padding: 8px 15px;
|
|
66
89
|
font-size: 16px;
|
|
67
90
|
display: flex;
|
|
68
91
|
align-items: center;
|
|
69
92
|
width: 100%;
|
|
70
93
|
border: 1px solid #D9D9D9;
|
|
71
94
|
box-sizing: border-box;
|
|
72
|
-
margin-bottom:
|
|
73
|
-
|
|
74
|
-
|
|
95
|
+
margin-bottom: 8px !important;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.icon-menu {
|
|
99
|
+
display: inline-block;
|
|
100
|
+
width: 20px;
|
|
101
|
+
height: 20px;
|
|
102
|
+
background-color: #ccc;
|
|
103
|
+
margin-right: 8px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.item-text {
|
|
107
|
+
flex: 1;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.confirm-btn {
|
|
111
|
+
margin-left: auto;
|
|
112
|
+
padding: 0 8px;
|
|
75
113
|
}
|
|
76
114
|
|
|
77
115
|
/* 自定义滚动条样式 */
|
|
@@ -50,7 +50,7 @@ export default {
|
|
|
50
50
|
return {
|
|
51
51
|
isOpen: false,
|
|
52
52
|
// 定义主内容区域的最大和最小宽度百分比
|
|
53
|
-
mainWithData: [{ max: 80, min:
|
|
53
|
+
mainWithData: [{ max: 80, min: 50 }]
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
mounted () {
|
|
@@ -82,7 +82,7 @@ export default {
|
|
|
82
82
|
return []
|
|
83
83
|
}
|
|
84
84
|
// 获取a-row中的所有a-col
|
|
85
|
-
const allCols = Array.from(row.querySelectorAll('.ant-col-
|
|
85
|
+
const allCols = Array.from(row.querySelectorAll('.ant-col-12'))
|
|
86
86
|
// 过滤掉当前a-col,返回其他所有a-col
|
|
87
87
|
return allCols.filter(col => col !== currentCol)
|
|
88
88
|
} catch (error) {
|
|
@@ -102,7 +102,7 @@ export default {
|
|
|
102
102
|
}
|
|
103
103
|
if (currentCol) {
|
|
104
104
|
// 更新当前列的宽度
|
|
105
|
-
const drawerWidth = isOpen ?
|
|
105
|
+
const drawerWidth = isOpen ? 33.3 : 2
|
|
106
106
|
// 强制更新样式
|
|
107
107
|
currentCol.style.cssText = `
|
|
108
108
|
flex: 0 0 ${drawerWidth}% !important;
|
|
@@ -190,7 +190,7 @@ export default {
|
|
|
190
190
|
.arrow {
|
|
191
191
|
font-size: 20px;
|
|
192
192
|
line-height: 1;
|
|
193
|
-
color:
|
|
193
|
+
color: #94979E;
|
|
194
194
|
}
|
|
195
195
|
.drawer-content {
|
|
196
196
|
height: 100%;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="x-time-select">
|
|
3
|
+
<a-range-picker
|
|
4
|
+
:value="dateRange"
|
|
5
|
+
:placeholder="['开始日期', '结束日期']"
|
|
6
|
+
separator="至"
|
|
7
|
+
:disabled="disabled"
|
|
8
|
+
:allowClear="allowClear"
|
|
9
|
+
:format="format"
|
|
10
|
+
@change="handleDateChange"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import dayjs from 'dayjs'
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: 'XTimeSelect',
|
|
20
|
+
props: {
|
|
21
|
+
value: {
|
|
22
|
+
type: Array,
|
|
23
|
+
default: () => []
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
allowClear: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: true
|
|
32
|
+
},
|
|
33
|
+
format: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: 'YYYY/MM/DD'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
data () {
|
|
39
|
+
return {
|
|
40
|
+
dateRange: []
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
watch: {
|
|
44
|
+
value: {
|
|
45
|
+
handler (newVal) {
|
|
46
|
+
if (newVal && newVal.length === 2) {
|
|
47
|
+
this.dateRange = [
|
|
48
|
+
newVal[0] ? dayjs(newVal[0]) : null,
|
|
49
|
+
newVal[1] ? dayjs(newVal[1]) : null
|
|
50
|
+
]
|
|
51
|
+
} else {
|
|
52
|
+
this.dateRange = []
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
immediate: true,
|
|
56
|
+
deep: true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
methods: {
|
|
60
|
+
handleDateChange (dates, dateStrings) {
|
|
61
|
+
this.dateRange = dates
|
|
62
|
+
this.$emit('input', dates)
|
|
63
|
+
this.$emit('change', {
|
|
64
|
+
dates,
|
|
65
|
+
dateStrings
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<style scoped>
|
|
73
|
+
.x-time-select {
|
|
74
|
+
position: relative;
|
|
75
|
+
width: 100%;
|
|
76
|
+
box-sizing: border-box;
|
|
77
|
+
display: block;
|
|
78
|
+
}
|
|
79
|
+
.x-time-select :deep(.ant-picker-range),
|
|
80
|
+
.x-time-select :deep(.ant-picker) {
|
|
81
|
+
width: 100%;
|
|
82
|
+
height: 30px;
|
|
83
|
+
border-radius: 7px;
|
|
84
|
+
background: #FFFFFF;
|
|
85
|
+
border: 1px solid #E5E9F0;
|
|
86
|
+
}
|
|
87
|
+
.x-time-select :deep(.ant-calendar-picker) {
|
|
88
|
+
width: 100%;
|
|
89
|
+
display: block;
|
|
90
|
+
}
|
|
91
|
+
.x-time-select :deep(.ant-calendar-picker-input) {
|
|
92
|
+
width: 100%;
|
|
93
|
+
height: 30px;
|
|
94
|
+
border-radius: 7px;
|
|
95
|
+
background: #FFFFFF;
|
|
96
|
+
border: 1px solid #E5E9F0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.x-time-select :deep(.ant-input) {
|
|
100
|
+
width: 100%;
|
|
101
|
+
}
|
|
102
|
+
</style>
|
|
@@ -52,9 +52,10 @@ routerResource.newDynamicStatistics = () => import('@vue2-client/pages/NewDynami
|
|
|
52
52
|
routerResource.example = {
|
|
53
53
|
path: 'example',
|
|
54
54
|
name: '示例主页面',
|
|
55
|
+
component: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelect.vue'),
|
|
55
56
|
// component: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
|
|
56
57
|
// component: () => import('@vue2-client/base-client/components/his/XList/XList.vue'),
|
|
57
|
-
component: () => import('@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'),
|
|
58
|
+
// component: () => import('@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'),
|
|
58
59
|
// component: () => import('@vue2-client/base-client/components/common/XDataCard/XDataCard.vue'),
|
|
59
60
|
// component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
|
|
60
61
|
// component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
|