centaline-data-driven 1.5.80 → 1.5.81

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,36 +1,49 @@
1
1
  <template>
2
2
  <div>
3
- <ct-searchtreescreen ref="treescreen" :api="searchConditionApi" :screenPara="screenPara" @search="search"
4
- @clickHandler="rolRouterClickHandler"></ct-searchtreescreen>
5
- <ct-tree ref="tree" :api="searchDataApi" @loaded="loaded" :style="{height:treeHeight + 'px'}"></ct-tree>
3
+ <ct-searchtreescreen
4
+ ref="treescreen"
5
+ :api="searchConditionApi"
6
+ :screenPara="screenPara"
7
+ @search="search"
8
+ @clickHandler="rolRouterClickHandler"
9
+ ></ct-searchtreescreen>
10
+ <ct-tree
11
+ ref="tree"
12
+ :api="searchDataApi"
13
+ @loaded="loaded"
14
+ :style="{ height: treeHeight + 'px' }"
15
+ ></ct-tree>
6
16
  </div>
7
17
  </template>
8
18
 
9
19
  <script>
10
- import dynamicElement from '../../mixins/dynamicElement'
11
- import dynamicTreeScreen from '../../dynamicSearchList/src/dynamicSearchScreen.vue';
12
- import dynamicTree from './dynamicTree.vue';
20
+ import dynamicElement from "../../mixins/dynamicElement";
21
+ import dynamicTreeScreen from "../../dynamicSearchList/src/dynamicSearchScreen.vue";
22
+ import dynamicTree from "./dynamicTree.vue";
13
23
  export default {
14
- name: 'ct-searchtree',
24
+ name: "ct-searchtree",
15
25
  mixins: [dynamicElement],
16
26
  components: {
17
- 'ct-tree': dynamicTree,
18
- 'ct-searchtreescreen': dynamicTreeScreen
27
+ "ct-tree": dynamicTree,
28
+ "ct-searchtreescreen": dynamicTreeScreen,
19
29
  },
20
30
  props: {
21
31
  vmodel: Object,
22
32
  searchConditionApi: String,
23
33
  searchDataApi: String,
24
34
  flagsearch: Boolean,
25
- searchtreeHeight: Number,
35
+ searchtreeHeight: {
36
+ type: Number,
37
+ default: 800,
38
+ },
26
39
  screenPara: {
27
40
  type: Object,
28
- default: () => { }
29
- }
41
+ default: () => {},
42
+ },
30
43
  },
31
44
  data() {
32
45
  return {
33
- treeHeight: 0
46
+ treeHeight: 0,
34
47
  };
35
48
  },
36
49
  methods: {
@@ -43,16 +56,15 @@ export default {
43
56
  }
44
57
  });
45
58
  },
46
- updateCurrentRow(field, ev){},
59
+ updateCurrentRow(field, ev) {},
47
60
  search() {
48
61
  this.setTreeHeight();
49
62
  this.$refs.tree.search(this.$refs.treescreen.model);
50
63
  },
51
64
  loaded(data) {
52
65
  try {
53
- this.$emit('loaded', data);
54
- } catch (e) {
55
- }
66
+ this.$emit("loaded", data);
67
+ } catch (e) {}
56
68
  },
57
69
  rolRouterClickHandler(field) {
58
70
  this.routerClickHandler(field, {}, "");
@@ -69,52 +81,71 @@ export default {
69
81
  if (field.pageStyle) {
70
82
  submitData.pageStyle = field.pageStyle;
71
83
  }
72
- self.$emit('doClosePopoverHandle');
73
- self.$common.getDataDrivenOpts().handler.openTab(action, submitData, field.pageTitle, self.model, field.dialogWidth);
74
- }
75
- else if (field.isSearchPageInTab) {// 外部框架tab页打开
84
+ self.$emit("doClosePopoverHandle");
85
+ self.$common
86
+ .getDataDrivenOpts()
87
+ .handler.openTab(
88
+ action,
89
+ submitData,
90
+ field.pageTitle,
91
+ self.model,
92
+ field.dialogWidth
93
+ );
94
+ } else if (field.isSearchPageInTab) {
95
+ // 外部框架tab页打开
76
96
  submitData = field.getActionPara(submitData).para;
77
- self.$emit('doClosePopoverHandle');
78
- self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
79
- }
80
- else if (field.isBrowserNewTab) {// 浏览器打开
97
+ self.$emit("doClosePopoverHandle");
98
+ self.$common
99
+ .getDataDrivenOpts()
100
+ .handler.openTabSearch(field, submitData);
101
+ } else if (field.isBrowserNewTab) {
102
+ // 浏览器打开
81
103
  submitData = field.getActionPara(submitData).para;
82
104
  let query = self.$common.objectToQueryStr(submitData);
83
105
  window.open(action + query, "_blank");
84
- }
85
- else if (field.isOpenUrlInBrowse) {// 浏览器打开
106
+ } else if (field.isOpenUrlInBrowse) {
107
+ // 浏览器打开
86
108
  window.open(submitData[field.submitFormField], "_blank");
87
- }
88
- else if (field.isSeeVoice) {//看视频
109
+ } else if (field.isSeeVoice) {
110
+ //看视频
89
111
  self.$common.browseVideo(field, submitData);
90
- }
91
- else if (field.isBrowseAttachment) {//浏览附件
92
- var mediaviewpagetype=(field.isFormPageInTab||field.isSearchPageInTab)?2:0;
112
+ } else if (field.isBrowseAttachment) {
113
+ //浏览附件
114
+ var mediaviewpagetype =
115
+ field.isFormPageInTab || field.isSearchPageInTab ? 2 : 0;
93
116
  var MediaAlbum = [
94
117
  { albumName: self.model.title || "媒体", medias: [] },
95
118
  ];
96
119
  if (field.action) {
97
120
  var callback = function (data) {
98
- if(typeof data =='object'&&data.mediaAlbums)
99
- {
100
- MediaAlbum = data.mediaAlbums;
101
- }
102
- else
103
- {
121
+ if (typeof data == "object" && data.mediaAlbums) {
122
+ MediaAlbum = data.mediaAlbums;
123
+ } else {
104
124
  MediaAlbum[0].medias = data;
105
125
  }
106
- self.$common.viewerfile(field.pageTitle, MediaAlbum, 0, 0,mediaviewpagetype);
107
- }
126
+ self.$common.viewerfile(
127
+ field.pageTitle,
128
+ MediaAlbum,
129
+ 0,
130
+ 0,
131
+ mediaviewpagetype
132
+ );
133
+ };
108
134
  self.model.getAction(field.action, submitData, callback);
109
- }
110
- else {
135
+ } else {
111
136
  submitData.mediaData.forEach((v) => {
112
137
  MediaAlbum[0].medias.push(v);
113
138
  });
114
- self.$common.viewerfile(field.pageTitle, MediaAlbum, 0, 0,mediaviewpagetype);
139
+ self.$common.viewerfile(
140
+ field.pageTitle,
141
+ MediaAlbum,
142
+ 0,
143
+ 0,
144
+ mediaviewpagetype
145
+ );
115
146
  }
116
- }
117
- else if (field.isUrlInLayer) {//URL页面(弹层)
147
+ } else if (field.isUrlInLayer) {
148
+ //URL页面(弹层)
118
149
  var dialogOption = {
119
150
  title: field.pageTitle,
120
151
  pane: self.$common.getParentPane(self),
@@ -145,7 +176,10 @@ export default {
145
176
  delete() {
146
177
  var res = {};
147
178
  res.notification = 4;
148
- res.content = self.model.listData[self.model.selectIndex][self.model.primaryKey];
179
+ res.content =
180
+ self.model.listData[self.model.selectIndex][
181
+ self.model.primaryKey
182
+ ];
149
183
  self.model.doAction(res);
150
184
  self.$common.closeDialog(dialogOption.dialog);
151
185
  },
@@ -161,60 +195,63 @@ export default {
161
195
  ],
162
196
  };
163
197
  self.$common.openDialog(dialogOption);
164
- }
165
- else if (field.isExport || field.flagAsync) {
198
+ } else if (field.isExport || field.flagAsync) {
166
199
  if (field.flagAsync) {
167
200
  field.doAction(submitData, (res) => {
168
201
  if (res.content && res.content.action) {
169
202
  var dialogOption = {
170
203
  title: field.pageTitle || field.label,
171
- content: [{
172
- component: 'ct-progress',
173
- attrs: {
174
- progressAction: res.content.action,
175
- progressKey: res.content.key,
176
- progressType: field.isExport ? 'export' : 'import',
177
- width: '350px',
178
- height: '165px'
179
- },
180
- on: {
181
- finished() {
182
- self.$common.closeDialog(dialogOption.dialog);
183
- self.getPage(1);
204
+ content: [
205
+ {
206
+ component: "ct-progress",
207
+ attrs: {
208
+ progressAction: res.content.action,
209
+ progressKey: res.content.key,
210
+ progressType: field.isExport ? "export" : "import",
211
+ width: "350px",
212
+ height: "165px",
184
213
  },
185
- error(data) {
186
- self.$common.closeDialog(dialogOption.dialog);
187
- self.$message({
188
- message: data.rtnMsg,
189
- type: 'warning',
190
- showClose:true,
191
- });
192
- }
193
- }
194
- }]
214
+ on: {
215
+ finished() {
216
+ self.$common.closeDialog(dialogOption.dialog);
217
+ self.getPage(1);
218
+ },
219
+ error(data) {
220
+ self.$common.closeDialog(dialogOption.dialog);
221
+ self.$message({
222
+ message: data.rtnMsg,
223
+ type: "warning",
224
+ showClose: true,
225
+ });
226
+ },
227
+ },
228
+ },
229
+ ],
195
230
  };
196
231
  self.$common.openDialog(dialogOption);
197
232
  }
198
233
  });
199
- }
200
- else {
201
- if (field.action.indexOf("http://") === 0 || field.action.indexOf("https://") === 0) {
234
+ } else {
235
+ if (
236
+ field.action.indexOf("http://") === 0 ||
237
+ field.action.indexOf("https://") === 0
238
+ ) {
202
239
  window.open(field.action, "_blank");
203
- }
204
- else {
240
+ } else {
205
241
  field.doAction(submitData, (data) => {
206
242
  if (data.content) {
207
- if (data.content.indexOf("http://") === 0 || data.content.indexOf("https://") === 0) {
243
+ if (
244
+ data.content.indexOf("http://") === 0 ||
245
+ data.content.indexOf("https://") === 0
246
+ ) {
208
247
  window.open(data.content, "_blank");
209
- }
210
- else {
248
+ } else {
211
249
  }
212
250
  }
213
251
  });
214
252
  }
215
253
  }
216
- }
217
- else {
254
+ } else {
218
255
  //self.operationLoading = true;
219
256
 
220
257
  //Form
@@ -239,8 +276,14 @@ export default {
239
276
  //更新列
240
277
  self.model.selectIndex = 0;
241
278
  if (self.currentRow !== null) {
242
- for (var i = 0; i < self.currentRow.children.length; i++) {
243
- self.currentRow.children[i].classList.remove("select");
279
+ for (
280
+ var i = 0;
281
+ i < self.currentRow.children.length;
282
+ i++
283
+ ) {
284
+ self.currentRow.children[i].classList.remove(
285
+ "select"
286
+ );
244
287
  }
245
288
  }
246
289
  if (typeof self.$refs.tableParent !== "undefined") {
@@ -251,11 +294,13 @@ export default {
251
294
  }
252
295
  self.$forceUpdate();
253
296
  self.$nextTick(() => {
254
- if (self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
297
+ if (
298
+ self.$refs.tableParent.scrollHeight <=
299
+ self.$refs.tableParent.offsetHeight
300
+ ) {
255
301
  self.tableLoading = true;
256
302
  self.model.nextPage(next);
257
- }
258
- else {
303
+ } else {
259
304
  self.tableLoading = false;
260
305
  self.rowColorChange();
261
306
  self.resetScroll();
@@ -264,11 +309,18 @@ export default {
264
309
  }
265
310
  self.setfixedSize();
266
311
  });
267
- self.loaderObj.SearchTable(self.api, self.load, self.model.searchModel, true);
312
+ self.loaderObj.SearchTable(
313
+ self.api,
314
+ self.load,
315
+ self.model.searchModel,
316
+ true
317
+ );
268
318
  self.$common.closeDialog(dialogOption.dialog);
269
- }
270
- else {
271
- if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
319
+ } else {
320
+ if (
321
+ !field.flagFreshCurrentRow &&
322
+ !field.flagAddRowAfterAction
323
+ ) {
272
324
  self.model.doAction(ev);
273
325
  }
274
326
  self.$forceUpdate();
@@ -339,12 +391,14 @@ export default {
339
391
  ],
340
392
  };
341
393
  self.$common.openDialog(dialogOption);
342
- }
343
- else {
394
+ } else {
344
395
  self.operationLoading = true;
345
396
  field.doAction(submitData, (data) => {
346
397
  self.operationLoading = false;
347
- if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
398
+ if (
399
+ !field.flagFreshCurrentRow &&
400
+ !field.flagAddRowAfterAction
401
+ ) {
348
402
  self.model.doAction({ responseData: data });
349
403
  self.$emit("refreshRowHandle");
350
404
  }
@@ -361,7 +415,8 @@ export default {
361
415
  // self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
362
416
  // var fun = self.model.scripts.formData[action];
363
417
  // fun(submitData,field);
364
- let title = field.pageTitle == undefined ? field.label : field.pageTitle;
418
+ let title =
419
+ field.pageTitle == undefined ? field.label : field.pageTitle;
365
420
  submitData.actionType = field.actionType;
366
421
  var fun = self.$common.getDataDrivenOpts().handler[action];
367
422
  fun(submitData, title, self.$parent);
@@ -369,32 +424,36 @@ export default {
369
424
  };
370
425
 
371
426
  if (field.alert) {
372
- self.$common.confirm(field.alertMsg, field.alertCaption, {
373
- confirmButtonText: field.alertOKButtonText,
374
- cancelButtonText: field.alertCancelButtonText,
375
- //type: 'warning'
376
- center: field.alertCenter,
377
- })
427
+ self.$common
428
+ .confirm(field.alertMsg, field.alertCaption, {
429
+ confirmButtonText: field.alertOKButtonText,
430
+ cancelButtonText: field.alertCancelButtonText,
431
+ //type: 'warning'
432
+ center: field.alertCenter,
433
+ })
378
434
  .then(() => {
379
435
  clickAcion();
380
436
  })
381
- .catch(() => { });
382
- }
383
- else {
437
+ .catch(() => {});
438
+ } else {
384
439
  clickAcion();
385
440
  }
386
441
  },
387
442
  },
388
443
  mounted() {
389
444
  if (this.flagsearch) {
390
- this.$watch('$refs.treescreen.model.searchData', function (newVal, oldVal) {
391
- // 做点什么
392
- if (oldVal != undefined) {
393
- this.search();
445
+ this.$watch(
446
+ "$refs.treescreen.model.searchData",
447
+ function (newVal, oldVal) {
448
+ // 做点什么
449
+ if (oldVal != undefined) {
450
+ this.search();
451
+ }
452
+ },
453
+ {
454
+ deep: true,
394
455
  }
395
- }, {
396
- deep: true,
397
- });
456
+ );
398
457
  }
399
458
  },
400
459
  watch: {
@@ -403,10 +462,10 @@ export default {
403
462
  //}
404
463
  searchtreeHeight: function (val) {
405
464
  this.setTreeHeight();
406
- }
465
+ },
407
466
  },
408
467
  created() {
409
468
  this.model = this.vmodel;
410
- }
411
- }
469
+ },
470
+ };
412
471
  </script>
@@ -17,13 +17,9 @@
17
17
 
18
18
  <script>
19
19
  import dynamicElement from '../../mixins/dynamicElement'
20
- import dynamicTreeScreen from '../../dynamicSearchList/src/dynamicSearchScreen.vue';
21
20
  export default {
22
21
  name: 'ct-tree',
23
22
  mixins: [dynamicElement],
24
- components: {
25
- 'ct-searchtreescreen': dynamicTreeScreen
26
- },
27
23
  props: {
28
24
  vmodel: Object,
29
25
  api: String
@@ -0,0 +1,11 @@
1
+ import dynamicTreeList from './src/dynamicTreeList'
2
+
3
+ dynamicTreeList.install = function (Vue) {
4
+ Vue.component(dynamicTreeList.name, dynamicTreeList);
5
+ }
6
+
7
+ if (typeof window !== 'undefined' && window.Vue) {
8
+ window.Vue.use(dynamicSearchTree);
9
+ }
10
+
11
+ export default dynamicTreeList;
@@ -29,14 +29,11 @@
29
29
 
30
30
  <script>
31
31
  import dynamicElement from '../../mixins/dynamicElement'
32
- import dynamicSearchTree from './dynamicSearchTree.vue';
33
- import dynamicSearchList from '../../dynamicSearchList/src/dynamicSearchList.vue';
34
32
  import dynamicForm from '../../dynamicForm/src/dynamicForm';
35
33
  export default {
36
34
  name: 'ct-treelist',
37
35
  mixins: [dynamicElement],
38
36
  components: {
39
- 'ct-searchtree': dynamicSearchTree,
40
37
  'ct-form': dynamicForm,
41
38
  },
42
39
  props: {
@@ -219,7 +219,7 @@ const Base = function (source) {
219
219
  this.defaultValue.forEach((v1) => {
220
220
  this.value.push(v1);
221
221
  });
222
- this.text = rtn.defaultText === '' ? [] : JSON.parse(rtn.defaultText);
222
+ this.text = rtn.defaultText === ''|| rtn.defaultText === undefined? [] : JSON.parse(rtn.defaultText);
223
223
  }
224
224
  else if(this.type===Enum.ControlType.MultiSelectWithSearch){
225
225
  this.value.splice(0);
@@ -231,7 +231,7 @@ const Base = function (source) {
231
231
  this.defaultValue.forEach((v1) => {
232
232
  this.value.push(v1);
233
233
  });
234
- this.text = rtn.defaultText === '' ? [] : JSON.parse(rtn.defaultText);
234
+ this.text = rtn.defaultText === '' || rtn.defaultText === undefined? [] : JSON.parse(rtn.defaultText);
235
235
  }
236
236
  else{
237
237
  this.value = this.defaultValue;
@@ -81,6 +81,9 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
81
81
  get name() {
82
82
  return v.displayName;
83
83
  },
84
+ get paramName() {
85
+ return v.paramName||'';
86
+ },
84
87
  get sort() {
85
88
  return v.flagSort;
86
89
  },
@@ -986,8 +989,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
986
989
  },
987
990
  setButtonsDisabledByRowClick() {
988
991
  if(rtn.isMulti) return;
989
- if(rtn._buttons.length===0) return;
990
-
992
+ if(!rtn._buttons||rtn._buttons.length===0) return;
991
993
  var selectData = rtn.getSelectRowData({
992
994
  isMulti: 0
993
995
  });
package/src/main.js CHANGED
@@ -15,14 +15,14 @@ Vue.use(ElementUI, { size: 'mini'});
15
15
  Vue.config.productionTip = false;
16
16
  Vue.use(centaline, {
17
17
  // baseUrl: "http://10.88.22.46:17070/max-uplink-api/",
18
- // baseUrl: "http://10.88.22.13:6060/onecard-api/",
18
+ baseUrl: "http://10.88.22.46:6060/onecard-api/",
19
19
  // baseUrl: "http://10.88.22.13:17070/max-uplink-api/",
20
20
  // baseUrl: "http://10.6.1.163:9000/max-uplink-api/v1/form/router",
21
21
  // baseUrl: "http://10.25.10.63:22026/service-api/v1/form/router",
22
22
  // baseUrl: "http://10.25.10.67:8080/",
23
23
  // baseUrl: "https://ccesutest.centaline.com.cn/service-api/v1/form/router",
24
24
  // baseUrl: "http://10.88.22.69:8080/api/",
25
- baseUrl: "http://10.88.22.42:8080/",
25
+ // baseUrl: "http://10.88.22.42:8080/",
26
26
  // baseUrl: "http://10.1.245.111:38028/",
27
27
  // baseUrl: "http://tjcptest.centaline.com.cn/",
28
28
  // baseUrl: "http://tjcpuat.centaline.com.cn:9090/",
@@ -54,15 +54,15 @@ Vue.use(centaline, {
54
54
  // 获取请求头
55
55
  getRequestHeaders: function () {
56
56
  return {
57
- oldToken: '47aaa932-374c-4ce6-bb49-425193332f8e',
57
+ oldToken: '1f487e18-c090-4d24-b9a7-630de58cfccc',
58
58
  // token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQRO_iOiv5s1570zn-NBwiIuBIoUIkkUCIuxMEdPRMMRq95s1dzOsgWmHIccikIFr0gKQsMJYCURKxKdKYlHr-BH7UNz26yCFkByg7Aiw2A-tYwLDtEubgUibRiHo9i1aRRy-dtdSIab-8gdNKvcA618uu3v5x7rRMm3YkOZAfR6BtAWp_3LQHBNI8KHbkqlHi8QQAAP__.RrBgBqaFlp478oO3g5k_EEtjPt_o8qpJBkzgSP78Wa4',
59
- // authObject: '{token:"1080-1726764353270714368"}',
59
+ authObject: '{token:"1080-1729370391807397888"}',
60
60
 
61
61
  // originalRequestURL: 'http://10.88.22.67:8080',
62
62
  // EstateInfo: '{"estateId":"201806071109550C867184E8BCA56EC3","estateName":"C%E5%BE%A1%E6%9E%97%E5%B1%B1%E6%99%AF%E6%A5%BC"}',
63
63
  estateId: '',
64
64
 
65
- authObject: '{"currentEstate":{"estateId":"20210729104021C49F04B55C50F6AF58","estateName":"0%E6%B1%A4%E8%87%A3%E4%B8%80%E5%93%810%E5%A4%A9%E6%B4%A5"},"platform":1,"osVersion":"","clientVersion":"","machineCode":"a47c1cb528904d361a71a2612e9fe8f7","token":"","random":"LMOpUe","time":1700555306773,"sign":"b5fed3c92e2ad6ef33fdf4951eab2ae7"}',
65
+ // authObject: '{"currentEstate":{"estateId":"20210729104021C49F04B55C50F6AF58","estateName":"0%E6%B1%A4%E8%87%A3%E4%B8%80%E5%93%810%E5%A4%A9%E6%B4%A5"},"platform":1,"osVersion":"","clientVersion":"","machineCode":"a47c1cb528904d361a71a2612e9fe8f7","token":"","random":"LMOpUe","time":1700555306773,"sign":"b5fed3c92e2ad6ef33fdf4951eab2ae7"}',
66
66
  AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjZmOGE3YmY5LWJmNTktNDQ5Mi1iYjViLTAwYzg5NzA4YjhkMSJ9.SdsZk29roc03uNTjl8UkURX0uJHog7FH2YdX9xdecUULznkQ0NrMKkuLhTTXXA4XAp47zcmbGUPphoCcCr_AOw',
67
67
  };
68
68
  },