vue2-client 1.13.13 → 1.13.15
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
CHANGED
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vue2-client",
|
|
3
|
-
"version": "1.13.
|
|
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
|
-
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
81
|
-
"compression-webpack-plugin": "^10.0.0",
|
|
82
|
-
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
83
|
-
"deepmerge": "^4.3.1",
|
|
84
|
-
"eslint": "^8.51.0",
|
|
85
|
-
"eslint-plugin-vue": "^9.17.0",
|
|
86
|
-
"fast-deep-equal": "^3.1.3",
|
|
87
|
-
"ignore-loader": "^0.1.2",
|
|
88
|
-
"jest": "^29.7.0",
|
|
89
|
-
"jest-environment-jsdom": "^29.7.0",
|
|
90
|
-
"jest-transform-stub": "^2.0.0",
|
|
91
|
-
"less-loader": "^6.2.0",
|
|
92
|
-
"script-loader": "^0.7.2",
|
|
93
|
-
"style-resources-loader": "^1.5.0",
|
|
94
|
-
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
|
95
|
-
"vue-jest": "^4.0.1",
|
|
96
|
-
"vue-template-compiler": "^2.7.14",
|
|
97
|
-
"webpack": "^5.88.2",
|
|
98
|
-
"webpack-theme-color-replacer": "^1.4.7",
|
|
99
|
-
"whatwg-fetch": "^3.6.19"
|
|
100
|
-
},
|
|
101
|
-
"browserslist": [
|
|
102
|
-
"> 1%",
|
|
103
|
-
"last 2 versions",
|
|
104
|
-
"not dead",
|
|
105
|
-
"not ie 11"
|
|
106
|
-
]
|
|
107
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "vue2-client",
|
|
3
|
+
"version": "1.13.15",
|
|
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
|
+
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
81
|
+
"compression-webpack-plugin": "^10.0.0",
|
|
82
|
+
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
83
|
+
"deepmerge": "^4.3.1",
|
|
84
|
+
"eslint": "^8.51.0",
|
|
85
|
+
"eslint-plugin-vue": "^9.17.0",
|
|
86
|
+
"fast-deep-equal": "^3.1.3",
|
|
87
|
+
"ignore-loader": "^0.1.2",
|
|
88
|
+
"jest": "^29.7.0",
|
|
89
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
90
|
+
"jest-transform-stub": "^2.0.0",
|
|
91
|
+
"less-loader": "^6.2.0",
|
|
92
|
+
"script-loader": "^0.7.2",
|
|
93
|
+
"style-resources-loader": "^1.5.0",
|
|
94
|
+
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
|
95
|
+
"vue-jest": "^4.0.1",
|
|
96
|
+
"vue-template-compiler": "^2.7.14",
|
|
97
|
+
"webpack": "^5.88.2",
|
|
98
|
+
"webpack-theme-color-replacer": "^1.4.7",
|
|
99
|
+
"whatwg-fetch": "^3.6.19"
|
|
100
|
+
},
|
|
101
|
+
"browserslist": [
|
|
102
|
+
"> 1%",
|
|
103
|
+
"last 2 versions",
|
|
104
|
+
"not dead",
|
|
105
|
+
"not ie 11"
|
|
106
|
+
]
|
|
107
|
+
}
|
|
@@ -1,101 +1,121 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="x-input-wrapper">
|
|
3
|
-
<
|
|
4
|
-
v-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
this
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="x-input-wrapper">
|
|
3
|
+
<div class="input-container">
|
|
4
|
+
<span v-if="config?.label" class="input-label">{{ config.label }}</span>
|
|
5
|
+
<div class="input-wrapper">
|
|
6
|
+
<a-input
|
|
7
|
+
v-model="innerValue"
|
|
8
|
+
v-bind="$attrs"
|
|
9
|
+
:placeholder="config?.placeholder"
|
|
10
|
+
:size="config?.size"
|
|
11
|
+
:maxLength="config?.maxLength"
|
|
12
|
+
:disabled="config?.disabled"
|
|
13
|
+
:allowClear="config?.allowClear"
|
|
14
|
+
@change="handleInput"
|
|
15
|
+
@pressEnter="handleSearch"
|
|
16
|
+
>
|
|
17
|
+
<template v-if="config?.prefix" #prefix>
|
|
18
|
+
<a-icon :type="config.prefix" @click="handleSearch" class="clickable-icon" />
|
|
19
|
+
</template>
|
|
20
|
+
<template v-if="config?.suffix" #suffix>
|
|
21
|
+
<a-icon :type="config.suffix" @click="handleSearch" class="clickable-icon" />
|
|
22
|
+
</template>
|
|
23
|
+
</a-input>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script>
|
|
30
|
+
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
name: 'XInput',
|
|
34
|
+
inheritAttrs: false,
|
|
35
|
+
props: {
|
|
36
|
+
value: {
|
|
37
|
+
type: [String, Number],
|
|
38
|
+
default: ''
|
|
39
|
+
},
|
|
40
|
+
queryParamsName: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: 'outpatientRefunds1Config'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
data () {
|
|
46
|
+
return {
|
|
47
|
+
innerValue: this.value || '',
|
|
48
|
+
config: null
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
created () {
|
|
52
|
+
this.getData(this.queryParamsName)
|
|
53
|
+
},
|
|
54
|
+
emits: ['search'],
|
|
55
|
+
methods: {
|
|
56
|
+
runLogic,
|
|
57
|
+
async getData (data) {
|
|
58
|
+
getConfigByName(data, 'af-his', res => {
|
|
59
|
+
this.config = res
|
|
60
|
+
if (res.defaultValue !== undefined) {
|
|
61
|
+
this.innerValue = res.defaultValue
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
},
|
|
65
|
+
handleInput (e) {
|
|
66
|
+
const value = e.target.value
|
|
67
|
+
this.innerValue = value
|
|
68
|
+
this.$emit('search', value)
|
|
69
|
+
},
|
|
70
|
+
handleSearch () {
|
|
71
|
+
// 统一的搜索事件:将当前输入值发送给父组件
|
|
72
|
+
this.$emit('search', this.innerValue)
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
watch: {
|
|
76
|
+
value: {
|
|
77
|
+
handler (newValue) {
|
|
78
|
+
this.innerValue = newValue
|
|
79
|
+
},
|
|
80
|
+
immediate: true
|
|
81
|
+
},
|
|
82
|
+
queryParamsName: {
|
|
83
|
+
handler (newValue) {
|
|
84
|
+
this.getData(newValue)
|
|
85
|
+
},
|
|
86
|
+
deep: true
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<style scoped>
|
|
93
|
+
.x-input-wrapper {
|
|
94
|
+
position: relative;
|
|
95
|
+
display: inline-block;
|
|
96
|
+
width: 100%;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.input-container {
|
|
100
|
+
display: flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.input-label {
|
|
105
|
+
white-space: nowrap;
|
|
106
|
+
color: rgba(0, 0, 0, 0.85);
|
|
107
|
+
padding-right: 8px; /* 标签右侧固定间距 */
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.input-wrapper {
|
|
111
|
+
flex: 1; /* 输入框占据剩余空间 */
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:deep(.clickable-icon) {
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:deep(.clickable-icon:hover) {
|
|
119
|
+
color: #1890ff;
|
|
120
|
+
}
|
|
121
|
+
</style>
|
|
@@ -1,99 +1,131 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="x-time-select">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="x-time-select">
|
|
3
|
+
<div class="time-select-container">
|
|
4
|
+
<span v-if="label" class="time-select-label">{{ label }}</span>
|
|
5
|
+
<div class="picker-wrapper">
|
|
6
|
+
<a-range-picker
|
|
7
|
+
:value="dateRange"
|
|
8
|
+
:placeholder="['开始日期', '结束日期']"
|
|
9
|
+
separator="至"
|
|
10
|
+
:disabled="disabled"
|
|
11
|
+
:allowClear="allowClear"
|
|
12
|
+
:format="format"
|
|
13
|
+
@change="handleDateChange"
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
import moment from 'moment'
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
name: 'XTimeSelect',
|
|
25
|
+
props: {
|
|
26
|
+
queryParamsName: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: null
|
|
29
|
+
},
|
|
30
|
+
value: {
|
|
31
|
+
type: Array,
|
|
32
|
+
default: () => []
|
|
33
|
+
},
|
|
34
|
+
disabled: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false
|
|
37
|
+
},
|
|
38
|
+
allowClear: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: true
|
|
41
|
+
},
|
|
42
|
+
format: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: 'YYYY/MM/DD'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
data () {
|
|
48
|
+
return {
|
|
49
|
+
dateRange: [],
|
|
50
|
+
label: ''
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
watch: {
|
|
54
|
+
value: {
|
|
55
|
+
handler (newVal) {
|
|
56
|
+
if (newVal && newVal.length === 2) {
|
|
57
|
+
this.dateRange = [
|
|
58
|
+
newVal[0] ? moment(newVal[0]) : null,
|
|
59
|
+
newVal[1] ? moment(newVal[1]) : null
|
|
60
|
+
]
|
|
61
|
+
} else {
|
|
62
|
+
this.dateRange = []
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
immediate: true,
|
|
66
|
+
deep: true
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
created () {
|
|
70
|
+
this.getData(this.queryParamsName)
|
|
71
|
+
},
|
|
72
|
+
methods: {
|
|
73
|
+
handleDateChange (dates, dateStrings) {
|
|
74
|
+
this.dateRange = dates
|
|
75
|
+
console.warn(dateStrings)
|
|
76
|
+
this.$emit('change', dateStrings)
|
|
77
|
+
},
|
|
78
|
+
getData (data) {
|
|
79
|
+
this.label = data
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</script>
|
|
84
|
+
|
|
85
|
+
<style scoped>
|
|
86
|
+
.x-time-select {
|
|
87
|
+
position: relative;
|
|
88
|
+
width: 100%;
|
|
89
|
+
box-sizing: border-box;
|
|
90
|
+
display: block;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.time-select-container {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.time-select-label {
|
|
99
|
+
white-space: nowrap;
|
|
100
|
+
color: rgba(0, 0, 0, 0.85);
|
|
101
|
+
padding-right: 8px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.picker-wrapper {
|
|
105
|
+
flex: 1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.x-time-select :deep(.ant-picker-range),
|
|
109
|
+
.x-time-select :deep(.ant-picker) {
|
|
110
|
+
width: 100%;
|
|
111
|
+
height: 30px;
|
|
112
|
+
border-radius: 7px;
|
|
113
|
+
background: #FFFFFF;
|
|
114
|
+
border: 1px solid #E5E9F0;
|
|
115
|
+
}
|
|
116
|
+
.x-time-select :deep(.ant-calendar-picker) {
|
|
117
|
+
width: 100%;
|
|
118
|
+
display: block;
|
|
119
|
+
}
|
|
120
|
+
.x-time-select :deep(.ant-calendar-picker-input) {
|
|
121
|
+
width: 100%;
|
|
122
|
+
height: 30px;
|
|
123
|
+
border-radius: 7px;
|
|
124
|
+
background: #FFFFFF;
|
|
125
|
+
border: 1px solid #E5E9F0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.x-time-select :deep(.ant-input) {
|
|
129
|
+
width: 100%;
|
|
130
|
+
}
|
|
131
|
+
</style>
|
|
@@ -53,6 +53,7 @@ routerResource.example = {
|
|
|
53
53
|
path: 'example',
|
|
54
54
|
name: '示例主页面',
|
|
55
55
|
// component: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelect.vue'),
|
|
56
|
+
component: () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
|
|
56
57
|
// component: () => import('@vue2-client/base-client/components/his/XTitle/XTitle.vue'),
|
|
57
58
|
// component: () => import('@vue2-client/base-client/components/his/XSelect/XSelect.vue'),
|
|
58
59
|
// component: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
|
|
@@ -78,7 +79,7 @@ routerResource.example = {
|
|
|
78
79
|
// component: () => import('@vue2-client/components/g2Charts/demo.vue'),
|
|
79
80
|
// component: () => import('@vue2-client/pages/LogicCallExample/index.vue'),
|
|
80
81
|
// component: () => import('@vue2-client/components/FilePreview/FilePreviewDemo.vue'),
|
|
81
|
-
|
|
82
|
+
// component: () => import('@vue2-client/pages/ReportGrid/index.vue')
|
|
82
83
|
}
|
|
83
84
|
// routerResource.example = () =>
|
|
84
85
|
// import('@vue2-client/pages/Example')
|