@abi-software/map-side-bar 2.11.2-acupoints.0 → 2.11.3

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,342 +0,0 @@
1
- <template>
2
- <div v-if="entry" class="main">
3
- <div class="header">
4
- <el-input
5
- class="search-input"
6
- placeholder="Search"
7
- v-model="searchInput"
8
- @keyup="search(searchInput)"
9
- clearable
10
- @clear="clearSearchClicked"
11
- ></el-input>
12
- <el-button
13
- v-show="false"
14
- type="primary"
15
- class="button"
16
- @click="search(searchInput)"
17
- size="large"
18
- >
19
- Search
20
- </el-button>
21
- <el-button
22
- v-show="false"
23
- type="primary"
24
- class="button"
25
- @click="save()"
26
- size="large"
27
- >
28
- Save
29
- </el-button>
30
- <el-button
31
- v-show="false"
32
- type="primary"
33
- class="button"
34
- @click="load()"
35
- size="large"
36
- >
37
- Load
38
- </el-button>
39
-
40
- </div>
41
- <div class="content scrollbar" ref="content">
42
- <div v-for="result in paginatedResults" :key="result.Acupoint" class="step-item">
43
- <AcupointsCard
44
- class="dataset-card"
45
- :entry="result"
46
- @mouseenter="hoverChanged(result)"
47
- @mouseleave="hoverChanged(undefined)"
48
- />
49
- </div>
50
- <el-pagination
51
- class="pagination"
52
- v-model:current-page="page"
53
- hide-on-single-page
54
- large
55
- layout="prev, pager, next"
56
- :page-size="numberPerPage"
57
- :total="numberOfHits"
58
- @current-change="pageChange"
59
- ></el-pagination>
60
- </div>
61
- </div>
62
- </template>
63
-
64
- <script>
65
- /* eslint-disable no-alert, no-console */
66
- import {
67
- ElButton as Button,
68
- ElCard as Card,
69
- ElDrawer as Drawer,
70
- ElIcon as Icon,
71
- ElInput as Input,
72
- ElPagination as Pagination,
73
- } from 'element-plus'
74
- import AcupointsCard from './AcupointsCard.vue'
75
-
76
- export default {
77
- components: {
78
- AcupointsCard,
79
- Button,
80
- Card,
81
- Drawer,
82
- Icon,
83
- Input,
84
- Pagination
85
- },
86
- name: 'AcupointsInfoSearch',
87
- props: {
88
- entry: {
89
- type: Object,
90
- default: () => {},
91
- },
92
- },
93
- data: function () {
94
- return {
95
- results: [],
96
- paginatedResults: [],
97
- searchInput: "",
98
- lastSearch: "",
99
- numberOfHits: 0,
100
- numberPerPage: 10,
101
- page: 1,
102
- }
103
- },
104
- watch: {
105
- entry: {
106
- handler: function () {
107
- this.search(
108
- this.searchInput,
109
- this.numberPerPage,
110
- this.page
111
- )
112
- },
113
- immediate: true,
114
- deep: true,
115
- },
116
- },
117
- methods: {
118
- hoverChanged: function (data) {
119
- this.$emit('hover-changed', data)
120
- },
121
- resetSearch: function () {
122
- this.numberOfHits = 0
123
- this.search(this.searchInput)
124
- },
125
- clearSearchClicked: function () {
126
- this.searchInput = '';
127
- this.search("");
128
- },
129
- search: function(input) {
130
- this.results = []
131
- if (input !== this.previousSearch) {
132
- if (input === "") {
133
- this.results = Object.values(this.entry)
134
- } else {
135
- const lowerCase = input.toLowerCase()
136
- for (const value of Object.values(this.entry)) {
137
- const searchFields = [
138
- value["Acupoint"],
139
- value["Synonym"],
140
- value["Chinese Name"],
141
- value["English Name"],
142
- value["Reference"],
143
- value["Indications"],
144
- value["Acupuncture Method"],
145
- value["Vasculature"],
146
- value["Innervation"],
147
- value["Note"],
148
- ];
149
- const allstrings = searchFields.join();
150
- const myJSON = allstrings.toLowerCase();
151
- if (myJSON.includes(lowerCase)) {
152
- this.results.push(value)
153
- }
154
- }
155
- }
156
- }
157
- const start = this.numberPerPage * (this.page - 1)
158
- this.paginatedResults = this.results.slice(start, start + this.numberPerPage)
159
- this.numberOfHits = this.results.length
160
- this.searchInput = input
161
- this.lastSearch = input
162
- },
163
- numberPerPageUpdate: function (val) {
164
- this.numberPerPage = val
165
- this.pageChange(1)
166
- },
167
- pageChange: function (page) {
168
- this.page = page
169
- this.search( this.searchInput)
170
- },
171
- scrollToTop: function () {
172
- if (this.$refs.content) {
173
- this.$refs.content.scroll({ top: 0, behavior: 'smooth' })
174
- }
175
- },
176
- resetPageNavigation: function () {
177
- this.page = 1
178
- },
179
- },
180
- }
181
- </script>
182
-
183
- <style lang="scss" scoped>
184
- .dataset-card {
185
- position: relative;
186
-
187
- &::before {
188
- content: "";
189
- display: block;
190
- width: calc(100% - 15px);
191
- height: 100%;
192
- position: absolute;
193
- top: 7px;
194
- left: 7px;
195
- border-style: solid;
196
- border-radius: 5px;
197
- border-color: transparent;
198
- }
199
-
200
- &:hover {
201
- &::before {
202
- border-color: var(--el-color-primary);
203
- }
204
- }
205
- }
206
-
207
- .main {
208
- font-size: 14px;
209
- text-align: left;
210
- line-height: 1.5em;
211
- font-family: Asap, sans-serif, Helvetica;
212
- font-weight: 400;
213
- /* outline: thin red solid; */
214
- overflow-y: auto;
215
- scrollbar-width: thin;
216
- min-width: 16rem;
217
- background-color: #f7faff;
218
- height: 100%;
219
- border-left: 1px solid var(--el-border-color);
220
- border-top: 1px solid var(--el-border-color);
221
- display: flex;
222
- flex-direction: column;
223
- gap: 1.75rem;
224
- padding: 1rem;
225
- }
226
-
227
- .step-item {
228
- font-size: 14px;
229
- margin-bottom: 18px;
230
- text-align: left;
231
- }
232
-
233
- .search-input {
234
- width: 298px !important;
235
- height: 40px;
236
- padding-right: 14px;
237
-
238
- :deep(.el-input__inner) {
239
- font-family: inherit;
240
- }
241
- }
242
-
243
- .header {
244
- .el-button {
245
- font-family: inherit;
246
-
247
- &:hover,
248
- &:focus {
249
- background: $app-primary-color;
250
- box-shadow: -3px 2px 4px #00000040;
251
- color: #fff;
252
- }
253
- }
254
- }
255
-
256
- .pagination {
257
- padding-bottom: 16px;
258
- background-color: white;
259
- padding-left: 95px;
260
- font-weight: bold;
261
- }
262
-
263
- .pagination :deep(button) {
264
- background-color: white !important;
265
- }
266
- .pagination :deep(li) {
267
- background-color: white !important;
268
- }
269
- .pagination :deep(li.is-active) {
270
- color: $app-primary-color;
271
- }
272
-
273
- .error-feedback {
274
- font-family: Asap;
275
- font-size: 14px;
276
- font-style: italic;
277
- padding-top: 15px;
278
- }
279
-
280
- .content-card :deep(.el-card__header) {
281
- background-color: #292b66;
282
- padding: 1rem;
283
- }
284
-
285
- .content-card :deep(.el-card__body) {
286
- background-color: #f7faff;
287
- overflow-y: hidden;
288
- padding: 1rem;
289
- }
290
-
291
- .content {
292
- // width: 515px;
293
- flex: 1 1 auto;
294
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
295
- border: solid 1px #e4e7ed;
296
- background-color: #ffffff;
297
- overflow-y: scroll;
298
- scrollbar-width: thin;
299
- border-radius: var(--el-border-radius-base);
300
- }
301
-
302
- .content :deep(.el-loading-spinner .path) {
303
- stroke: $app-primary-color;
304
- }
305
-
306
- .content :deep(.step-item:first-child .seperator-path) {
307
- display: none;
308
- }
309
-
310
- .content :deep(.step-item:not(:first-child) .seperator-path) {
311
- width: 455px;
312
- height: 0px;
313
- border: solid 1px #e4e7ed;
314
- background-color: #e4e7ed;
315
- }
316
-
317
- .scrollbar::-webkit-scrollbar-track {
318
- border-radius: 10px;
319
- background-color: #f5f5f5;
320
- }
321
-
322
- .scrollbar::-webkit-scrollbar {
323
- width: 12px;
324
- right: -12px;
325
- background-color: #f5f5f5;
326
- }
327
-
328
- .scrollbar::-webkit-scrollbar-thumb {
329
- border-radius: 4px;
330
- box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.06);
331
- background-color: #979797;
332
- }
333
-
334
- :deep(.el-input__suffix) {
335
- padding-right: 0px;
336
- }
337
-
338
- :deep(.my-drawer) {
339
- background: rgba(0, 0, 0, 0);
340
- box-shadow: none;
341
- }
342
- </style>