vue2-client 1.12.92 → 1.12.94

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.
@@ -1,128 +1,126 @@
1
- <template>
2
- <div class="list-wrapper">
3
- <a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
4
- <a-list-item slot="renderItem" slot-scope="item, index" class="list-item" @click="handleClick(index)">
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>
15
- </a-list-item>
16
- </a-list>
17
- </div>
18
- </template>
19
-
20
- <script>
21
-
22
- import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
23
-
24
- export default {
25
- name: 'XList',
26
- props: {
27
- queryParamsName: {
28
- type: Object,
29
- default: 'outpatientWaitConfig'
30
- }
31
- },
32
- inject: ['getComponentByName'],
33
- data () {
34
- return {
35
- data: [],
36
- button: false,
37
- icon: false,
38
- buttonName: ''
39
- }
40
- },
41
- created () {
42
- this.getData(this.queryParamsName)
43
- },
44
- methods: {
45
- async getData (config) {
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
- })
53
- })
54
- },
55
- handleClick (index) {
56
- this.$emit('listClick', this.data[index])
57
- },
58
- refreshList () {
59
- this.getData(this.queryParamsName)
60
- },
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
- }
69
- }
70
- }
71
- </script>
72
-
73
- <style scoped>
74
- .list-wrapper {
75
- max-height: 240px;
76
- overflow-y: auto;
77
- padding-right: 2px;
78
- }
79
-
80
- .list-container {
81
- width: 100%;
82
- }
83
-
84
- .list-item {
85
- height: 35px;
86
- border-radius: 6px;
87
- background-color: #F4F4F4;
88
- padding: 8px 15px;
89
- font-size: 16px;
90
- display: flex;
91
- align-items: center;
92
- width: 100%;
93
- border: 1px solid #D9D9D9;
94
- box-sizing: border-box;
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;
113
- }
114
-
115
- /* 自定义滚动条样式 */
116
- .list-wrapper::-webkit-scrollbar {
117
- width: 6px;
118
- }
119
-
120
- .list-wrapper::-webkit-scrollbar-thumb {
121
- background-color: #d9d9d9;
122
- border-radius: 3px;
123
- }
124
-
125
- .list-wrapper::-webkit-scrollbar-track {
126
- background-color: #f0f0f0;
127
- }
128
- </style>
1
+ <template>
2
+ <div class="list-wrapper">
3
+ <a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
4
+ <a-list-item slot="renderItem" slot-scope="item, index" class="list-item" @click="handleClick(index)">
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>
15
+ </a-list-item>
16
+ </a-list>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+
22
+ import { runLogic } from '@vue2-client/services/api/common'
23
+
24
+ export default {
25
+ name: 'XList',
26
+ props: {
27
+ queryParamsName: {
28
+ type: Object,
29
+ default: null
30
+ }
31
+ },
32
+ inject: ['getComponentByName'],
33
+ data () {
34
+ return {
35
+ data: [],
36
+ button: false,
37
+ icon: false,
38
+ buttonName: ''
39
+ }
40
+ },
41
+ created () {
42
+ this.getData(this.queryParamsName)
43
+ },
44
+ methods: {
45
+ async getData (config) {
46
+ runLogic(config, {}, 'af-his').then(res => {
47
+ this.button = res.button
48
+ this.icon = res.icon
49
+ this.buttonName = res.buttonName
50
+ this.data = res.data
51
+ })
52
+ },
53
+ handleClick (index) {
54
+ this.$emit('listClick', this.data[index])
55
+ },
56
+ refreshList () {
57
+ this.getData(this.queryParamsName)
58
+ },
59
+ click (index) {
60
+ this.$emit('click', this.data[index + 1])
61
+ },
62
+ getIconStyle (item) {
63
+ return item.picture
64
+ ? { backgroundImage: `url(${item.picture})` }
65
+ : {}
66
+ }
67
+ }
68
+ }
69
+ </script>
70
+
71
+ <style scoped>
72
+ .list-wrapper {
73
+ max-height: 240px;
74
+ overflow-y: auto;
75
+ padding-right: 2px;
76
+ }
77
+
78
+ .list-container {
79
+ width: 100%;
80
+ }
81
+
82
+ .list-item {
83
+ height: 35px;
84
+ border-radius: 6px;
85
+ background-color: #F4F4F4;
86
+ padding: 8px 15px;
87
+ font-size: 16px;
88
+ display: flex;
89
+ align-items: center;
90
+ width: 100%;
91
+ border: 1px solid #D9D9D9;
92
+ box-sizing: border-box;
93
+ margin-bottom: 8px !important;
94
+ }
95
+
96
+ .icon-menu {
97
+ display: inline-block;
98
+ width: 20px;
99
+ height: 20px;
100
+ background-color: #ccc;
101
+ margin-right: 8px;
102
+ }
103
+
104
+ .item-text {
105
+ flex: 1;
106
+ }
107
+
108
+ .confirm-btn {
109
+ margin-left: auto;
110
+ padding: 0 8px;
111
+ }
112
+
113
+ /* 自定义滚动条样式 */
114
+ .list-wrapper::-webkit-scrollbar {
115
+ width: 6px;
116
+ }
117
+
118
+ .list-wrapper::-webkit-scrollbar-thumb {
119
+ background-color: #d9d9d9;
120
+ border-radius: 3px;
121
+ }
122
+
123
+ .list-wrapper::-webkit-scrollbar-track {
124
+ background-color: #f0f0f0;
125
+ }
126
+ </style>
@@ -59,11 +59,8 @@ export default {
59
59
  methods: {
60
60
  handleDateChange (dates, dateStrings) {
61
61
  this.dateRange = dates
62
- this.$emit('input', dates)
63
- this.$emit('change', {
64
- dates,
65
- dateStrings
66
- })
62
+ console.warn(dateStrings)
63
+ this.$emit('change', dateStrings)
67
64
  }
68
65
  }
69
66
  }