w-web-api 1.0.9 → 1.0.12

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.
@@ -6,10 +6,14 @@
6
6
 
7
7
  <div style="display:flex; height:100%;" v-if="hasApis">
8
8
 
9
- <div style="min-width:400px; height:100%; _font-size:10pt; color:#444; background:#fff; overflow-y:auto;">
9
+ <div
10
+ style="min-width:400px; height:100%; color:#444; background:#fff;"
11
+ v-domresize
12
+ @domresize="resizeTree"
13
+ >
10
14
 
11
15
  <WTree
12
- :viewHeightMax="null"
16
+ :viewHeightMax="heightTree"
13
17
  :data="apisTree"
14
18
  :iconHeight="lineHeightTree"
15
19
  :defItemHeight="lineHeightTree"
@@ -41,7 +45,7 @@
41
45
  </div>
42
46
 
43
47
  <div>
44
- {{$s.gv(getItemByKey(props.data.text),'name')}}
48
+ {{$ui.gv(getItemByKey(props.data.text),'name')}}
45
49
  </div>
46
50
 
47
51
  </div>
@@ -67,7 +71,7 @@
67
71
  </div>
68
72
 
69
73
  <div style="font-size:0.8rem;">
70
- {{$s.gv(apiSelect,'url')}}
74
+ {{$ui.gv(apiSelect,'url')}}
71
75
  </div>
72
76
 
73
77
  </div>
@@ -77,11 +81,11 @@
77
81
  <div style="padding:10px;">
78
82
 
79
83
  <div style="color:#485ed5;">
80
- {{$s.gv(apiSelect,'name')}}
84
+ {{$ui.gv(apiSelect,'name')}}
81
85
  </div>
82
86
 
83
87
  <div class="bk-title" style="">
84
- {{$s.gv(apiSelect,'description')}}
88
+ {{$ui.gv(apiSelect,'description')}}
85
89
  </div>
86
90
 
87
91
  </div>
@@ -91,11 +95,11 @@
91
95
  <div class="bk" style="">
92
96
 
93
97
  <div class="bk-title" style="">
94
- {{kpTexts.tokens}}
98
+ {{$t('tokens')}}
95
99
  </div>
96
100
 
97
101
  <div class="bk-item" style="">
98
- {{$s.gv(apiSelect,'tokens')}}
102
+ {{$ui.gv(apiSelect,'tokens')}}
99
103
  </div>
100
104
 
101
105
  </div>
@@ -103,11 +107,11 @@
103
107
  <div class="bk" style="">
104
108
 
105
109
  <div class="bk-title" style="">
106
- {{kpTexts.version}}
110
+ {{$t('version')}}
107
111
  </div>
108
112
 
109
113
  <div class="bk-item" style="">
110
- {{$s.gv(apiSelect,'version')}}
114
+ {{$ui.gv(apiSelect,'version')}}
111
115
  </div>
112
116
 
113
117
  </div>
@@ -115,11 +119,11 @@
115
119
  <div class="bk" style="">
116
120
 
117
121
  <div class="bk-title" style="">
118
- {{kpTexts.levels}}
122
+ {{$t('levels')}}
119
123
  </div>
120
124
 
121
125
  <div class="bk-item" style="">
122
- {{$s.gv(apiSelect,'')}}
126
+ {{$ui.gv(apiSelect,'')}}
123
127
  </div>
124
128
 
125
129
  </div>
@@ -127,11 +131,11 @@
127
131
  <div class="bk" style="">
128
132
 
129
133
  <div class="bk-title" style="">
130
- {{kpTexts.keywords}}
134
+ {{$t('keywords')}}
131
135
  </div>
132
136
 
133
137
  <div class="bk-item" style="">
134
- {{$s.gv(apiSelect,'')}}
138
+ {{$ui.gv(apiSelect,'')}}
135
139
  </div>
136
140
 
137
141
  </div>
@@ -139,11 +143,11 @@
139
143
  <div class="bk" style="">
140
144
 
141
145
  <div class="bk-title" style="">
142
- {{kpTexts.state}}
146
+ {{$t('state')}}
143
147
  </div>
144
148
 
145
149
  <div class="bk-item" style="">
146
- {{$s.gv(apiSelect,'')}}
150
+ {{$ui.gv(apiSelect,'')}}
147
151
  </div>
148
152
 
149
153
  </div>
@@ -151,11 +155,11 @@
151
155
  <div class="bk" style="">
152
156
 
153
157
  <div class="bk-title" style="">
154
- {{kpTexts.timeCreate}}
158
+ {{$t('timeCreate')}}
155
159
  </div>
156
160
 
157
161
  <div class="bk-item" style="">
158
- {{getDay($s.gv(apiSelect,'timeCreate'))}}
162
+ {{$ui.gv(apiSelect,'timeCreate',getDay)}}
159
163
  </div>
160
164
 
161
165
  </div>
@@ -163,11 +167,11 @@
163
167
  <div class="bk" style="">
164
168
 
165
169
  <div class="bk-title" style="">
166
- {{kpTexts.timeUpdate}}
170
+ {{$t('timeUpdate')}}
167
171
  </div>
168
172
 
169
173
  <div class="bk-item" style="">
170
- {{getDay($s.gv(apiSelect,'timeUpdate'))}}
174
+ {{$ui.gv(apiSelect,'timeUpdate',getDay)}}
171
175
  </div>
172
176
 
173
177
  </div>
@@ -175,11 +179,11 @@
175
179
  <div class="bk" style="">
176
180
 
177
181
  <div class="bk-title" style="">
178
- {{kpTexts.creator}}
182
+ {{$t('creator')}}
179
183
  </div>
180
184
 
181
185
  <div class="bk-item" style="">
182
- {{$s.gv(apiSelect,'creator')}}
186
+ {{$ui.gv(apiSelect,'creator')}}
183
187
  </div>
184
188
 
185
189
  </div>
@@ -187,11 +191,11 @@
187
191
  <div class="bk" style="">
188
192
 
189
193
  <div class="bk-title" style="">
190
- {{kpTexts.dataSource}}
194
+ {{$t('dataSource')}}
191
195
  </div>
192
196
 
193
197
  <div class="bk-item" style="">
194
- {{$s.gv(apiSelect,'dataSource')}}
198
+ {{$ui.gv(apiSelect,'dataSource')}}
195
199
  </div>
196
200
 
197
201
  </div>
@@ -199,11 +203,11 @@
199
203
  <div class="bk" style="">
200
204
 
201
205
  <div class="bk-title" style="">
202
- {{kpTexts.isActive}}
206
+ {{$t('isActive')}}
203
207
  </div>
204
208
 
205
209
  <div class="bk-item" style="">
206
- {{$s.gv(apiSelect,'isActive')}}
210
+ {{$ui.gv(apiSelect,'isActive')}}
207
211
  </div>
208
212
 
209
213
  </div>
@@ -213,12 +217,12 @@
213
217
  <div style="padding:10px;">
214
218
 
215
219
  <div class="bk-title" style="">
216
- {{kpTexts.mdInputParams}}
220
+ {{$t('mdInputParams')}}
217
221
  </div>
218
222
 
219
223
  <div class="bk-item" style="padding:10px;">
220
224
  <MdPanel
221
- :md="$s.gv(apiSelect,'mdInputParams')"
225
+ :md="$ui.gv(apiSelect,'mdInputParams')"
222
226
  ></MdPanel>
223
227
  </div>
224
228
 
@@ -227,11 +231,11 @@
227
231
  <div style="padding:10px;">
228
232
 
229
233
  <div class="bk-title" style="">
230
- {{kpTexts.inputExample}}
234
+ {{$t('inputExample')}}
231
235
  </div>
232
236
 
233
237
  <div class="bk-item" style="padding:10px;">
234
- {{$s.gv(apiSelect,'inputExample')}}
238
+ {{$ui.gv(apiSelect,'inputExample')}}
235
239
  </div>
236
240
 
237
241
  </div>
@@ -239,12 +243,12 @@
239
243
  <div style="padding:10px;">
240
244
 
241
245
  <div class="bk-title" style="">
242
- {{kpTexts.mdOutputParams}}
246
+ {{$t('mdOutputParams')}}
243
247
  </div>
244
248
 
245
249
  <div class="bk-item" style="padding:10px;">
246
250
  <MdPanel
247
- :md="$s.gv(apiSelect,'mdOutputParams')"
251
+ :md="$ui.gv(apiSelect,'mdOutputParams')"
248
252
  ></MdPanel>
249
253
  </div>
250
254
 
@@ -253,7 +257,7 @@
253
257
  <div style="padding:10px;">
254
258
 
255
259
  <div class="bk-title" style="">
256
- {{kpTexts.outputExample}}
260
+ {{$t('outputExample')}}
257
261
  </div>
258
262
 
259
263
  <div style="padding-top:10px;">
@@ -302,7 +306,7 @@
302
306
  style="padding:20px; font-size:0.9rem;"
303
307
  v-else
304
308
  >
305
- {{kpTexts.noSelectApi}}
309
+ {{$t('noSelectApi')}}
306
310
  </div>
307
311
 
308
312
  </div>
@@ -311,7 +315,7 @@
311
315
  style="padding:20px; font-size:0.9rem;"
312
316
  v-else
313
317
  >
314
- {{kpTexts.waitingData}}
318
+ {{$t('waitingData')}}
315
319
  </div>
316
320
 
317
321
  </div>
@@ -356,6 +360,7 @@ export default {
356
360
  data: function() {
357
361
  return {
358
362
 
363
+ heightTree: 2,
359
364
  lineHeightTree: 38,
360
365
 
361
366
  apisTree: [],
@@ -376,10 +381,6 @@ export default {
376
381
  },
377
382
  computed: {
378
383
 
379
- kpTexts: function() {
380
- return this.$ui.getKpLang()
381
- },
382
-
383
384
  apis: function() {
384
385
  return get(this, '$store.state.apis')
385
386
  },
@@ -399,12 +400,12 @@ export default {
399
400
  let ms = [
400
401
  {
401
402
  id: 'tree',
402
- text: vo.kpTexts.outputMenuTree,
403
+ text: vo.$t('outputMenuTree'),
403
404
  icon: 'mdi-vanity-light',
404
405
  },
405
406
  {
406
407
  id: 'raw',
407
- text: vo.kpTexts.outputMenuRaw,
408
+ text: vo.$t('outputMenuRaw'),
408
409
  icon: 'mdi-lan',
409
410
  },
410
411
  ]
@@ -421,6 +422,20 @@ export default {
421
422
  },
422
423
  methods: {
423
424
 
425
+ resizeTree: function(msg) {
426
+ // console.log('methods resizeTree', msg)
427
+
428
+ let vo = this
429
+
430
+ //h
431
+ let h = get(msg, 'snew.clientHeight')
432
+ // console.log(h)
433
+
434
+ //update
435
+ vo.heightTree = h
436
+
437
+ },
438
+
424
439
  genTree: function () {
425
440
  let vo = this
426
441
 
@@ -518,6 +533,7 @@ export default {
518
533
  getOutputJsonObj: function(item) {
519
534
  // let vo = this
520
535
  let j = this.getOutputJson(item)
536
+ // console.log(j)
521
537
  let o = j2o(j)
522
538
  return o
523
539
  },
package/src/main.js CHANGED
@@ -41,6 +41,7 @@ let dspt = mDataSupport(Vue.prototype)
41
41
 
42
42
  //prototype
43
43
  Vue.prototype.$ui = ui
44
+ Vue.prototype.$t = ui.getKpText
44
45
  Vue.prototype.$s = s
45
46
  Vue.prototype.$dssm = dssm
46
47
  Vue.prototype.$dspt = dspt
@@ -67,8 +68,9 @@ WServHapiClient({
67
68
  Vue.prototype.$fapi = _fapi
68
69
  _fapi.getWebInfor() //已有fapi時優先取得web資訊
69
70
  .then((wi) => {
70
- // console.log('$fapi wi', wi)
71
+ console.log('$fapi getWebInfor', wi)
71
72
  Vue.prototype.$store.commit(Vue.prototype.$store.types.UpdateWebInfor, wi)
73
+ ui.setLang() //因更新webInfor得要重刷語系才能依照語言取得顯示文字
72
74
  })
73
75
  .catch((err) => {
74
76
  console.log(err)
@@ -1,53 +1,53 @@
1
- import min from 'lodash/min'
2
- import size from 'lodash/size'
3
- import take from 'lodash/take'
4
- import isEqual from 'lodash/isEqual'
5
- import uniq from 'lodash/uniq'
6
- import set from 'lodash/set'
7
- import get from 'lodash/get'
8
- import each from 'lodash/each'
9
- import map from 'lodash/map'
10
- import filter from 'lodash/filter'
11
- import last from 'lodash/last'
12
- import split from 'lodash/split'
13
- import join from 'lodash/join'
14
- import drop from 'lodash/drop'
15
- import dropRight from 'lodash/dropRight'
16
- import groupBy from 'lodash/groupBy'
17
- import sortBy from 'lodash/sortBy'
18
- import cloneDeep from 'lodash/cloneDeep'
19
- import cint from 'wsemi/src/cint.mjs'
20
- import delay from 'wsemi/src/delay.mjs'
21
- import isarr from 'wsemi/src/isarr.mjs'
22
- import isestr from 'wsemi/src/isestr.mjs'
23
- import isfun from 'wsemi/src/isfun.mjs'
24
- import iseobj from 'wsemi/src/iseobj.mjs'
25
- import isearr from 'wsemi/src/isearr.mjs'
26
- import isEle from 'wsemi/src/isEle.mjs'
27
- import strleft from 'wsemi/src/strleft.mjs'
28
- import strdelleft from 'wsemi/src/strdelleft.mjs'
29
- import sep from 'wsemi/src/sep.mjs'
30
- import aes2str from 'wsemi/src/aes2str.mjs'
31
- import str2aes from 'wsemi/src/str2aes.mjs'
32
- import haskey from 'wsemi/src/haskey.mjs'
33
- import genPm from 'wsemi/src/genPm.mjs'
34
- import pmSeries from 'wsemi/src/pmSeries.mjs'
35
- import waitFun from 'wsemi/src/waitFun.mjs'
36
- import browserView from 'wsemi/src/browserView.mjs'
37
- import arrHas from 'wsemi/src/arrHas.mjs'
38
- import arrSort from 'wsemi/src/arrSort.mjs'
39
- import arrInsert from 'wsemi/src/arrInsert.mjs'
40
- import replace from 'wsemi/src/replace.mjs'
41
- import timemsTZ2past from 'wsemi/src/timemsTZ2past.mjs'
42
- import convertToTree from 'wsemi/src/convertToTree.mjs'
43
- import html2picDyn from 'wsemi/src/html2picDyn.mjs'
44
- import urlParse from 'wsemi/src/urlParse.mjs'
45
- import domConvertToPicDyn from 'wsemi/src/domConvertToPicDyn.mjs'
46
- import ltdtkeysheads2mat from 'wsemi/src/ltdtkeysheads2mat.mjs'
47
- import downloadFileFromB64 from 'wsemi/src/downloadFileFromB64.mjs'
48
- import downloadExcelFileFromDataDyn from 'wsemi/src/downloadExcelFileFromDataDyn.mjs'
49
- import getFileAccept from 'wsemi/src/getFileAccept.mjs'
50
- import downloadFileFromU8Arr from 'wsemi/src/downloadFileFromU8Arr.mjs'
1
+ // import min from 'lodash/min'
2
+ // import size from 'lodash/size'
3
+ // import take from 'lodash/take'
4
+ // import isEqual from 'lodash/isEqual'
5
+ // import uniq from 'lodash/uniq'
6
+ // import set from 'lodash/set'
7
+ // import get from 'lodash/get'
8
+ // import each from 'lodash/each'
9
+ // import map from 'lodash/map'
10
+ // import filter from 'lodash/filter'
11
+ // import last from 'lodash/last'
12
+ // import split from 'lodash/split'
13
+ // import join from 'lodash/join'
14
+ // import drop from 'lodash/drop'
15
+ // import dropRight from 'lodash/dropRight'
16
+ // import groupBy from 'lodash/groupBy'
17
+ // import sortBy from 'lodash/sortBy'
18
+ // import cloneDeep from 'lodash/cloneDeep'
19
+ // import cint from 'wsemi/src/cint.mjs'
20
+ // import delay from 'wsemi/src/delay.mjs'
21
+ // import isarr from 'wsemi/src/isarr.mjs'
22
+ // import isestr from 'wsemi/src/isestr.mjs'
23
+ // import isfun from 'wsemi/src/isfun.mjs'
24
+ // import iseobj from 'wsemi/src/iseobj.mjs'
25
+ // import isearr from 'wsemi/src/isearr.mjs'
26
+ // import isEle from 'wsemi/src/isEle.mjs'
27
+ // import strleft from 'wsemi/src/strleft.mjs'
28
+ // import strdelleft from 'wsemi/src/strdelleft.mjs'
29
+ // import sep from 'wsemi/src/sep.mjs'
30
+ // import aes2str from 'wsemi/src/aes2str.mjs'
31
+ // import str2aes from 'wsemi/src/str2aes.mjs'
32
+ // import haskey from 'wsemi/src/haskey.mjs'
33
+ // import genPm from 'wsemi/src/genPm.mjs'
34
+ // import pmSeries from 'wsemi/src/pmSeries.mjs'
35
+ // import waitFun from 'wsemi/src/waitFun.mjs'
36
+ // import browserView from 'wsemi/src/browserView.mjs'
37
+ // import arrHas from 'wsemi/src/arrHas.mjs'
38
+ // import arrSort from 'wsemi/src/arrSort.mjs'
39
+ // import arrInsert from 'wsemi/src/arrInsert.mjs'
40
+ // import replace from 'wsemi/src/replace.mjs'
41
+ // import timemsTZ2past from 'wsemi/src/timemsTZ2past.mjs'
42
+ // import convertToTree from 'wsemi/src/convertToTree.mjs'
43
+ // import html2picDyn from 'wsemi/src/html2picDyn.mjs'
44
+ // import urlParse from 'wsemi/src/urlParse.mjs'
45
+ // import domConvertToPicDyn from 'wsemi/src/domConvertToPicDyn.mjs'
46
+ // import ltdtkeysheads2mat from 'wsemi/src/ltdtkeysheads2mat.mjs'
47
+ // import downloadFileFromB64 from 'wsemi/src/downloadFileFromB64.mjs'
48
+ // import downloadExcelFileFromDataDyn from 'wsemi/src/downloadExcelFileFromDataDyn.mjs'
49
+ // import getFileAccept from 'wsemi/src/getFileAccept.mjs'
50
+ // import downloadFileFromU8Arr from 'wsemi/src/downloadFileFromU8Arr.mjs'
51
51
 
52
52
 
53
53
  function mDataSupport(vo, opt = {}) {
@@ -55,19 +55,7 @@ function mDataSupport(vo, opt = {}) {
55
55
 
56
56
  return {
57
57
 
58
- // getMetadataByTablenameAndId,
59
-
60
- // getProjectBasic,
61
- // getProjectsBasic,
62
-
63
- // treeMds,
64
- // treeProjectsBasicAndMds,
65
-
66
58
  // mdCheckKeyInd,
67
- // mdGetTItemsByKeyInd,
68
- // mdGetSizeByKeyInd,
69
- // mdGetTItemsLast,
70
- // mdGetTableChtByKeyInd,
71
59
  // mdGetTextByKey,
72
60
  // mdGetTextByKeyIndAndKey,
73
61