centaline-data-driven 1.5.23 → 1.5.25

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.
Files changed (30) hide show
  1. package/package.json +1 -1
  2. package/release-log.md +38 -0
  3. package/src/SearchList.vue +9 -4
  4. package/src/centaline/css/ccai.css +9 -4
  5. package/src/centaline/css/common.css +4 -0
  6. package/src/centaline/dynamicBtn/src/dynamicBtn.vue +4 -1
  7. package/src/centaline/dynamicContact/src/dynamicContact.vue +1 -1
  8. package/src/centaline/dynamicDetail/src/dynamicContactList.vue +1 -1
  9. package/src/centaline/dynamicDetail/src/dynamicDetail.vue +3 -3
  10. package/src/centaline/dynamicDetail/src/dynamicEstateBuildingDetail.vue +1 -1
  11. package/src/centaline/dynamicDetail/src/dynamicEstateSimpleDetail.vue +1 -1
  12. package/src/centaline/dynamicDetail/src/dynamicPropertyDetailOFI.vue +1 -1
  13. package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +1 -1
  14. package/src/centaline/dynamicDetail/src/dynamicPropertySimpleDetailRET.vue +1 -1
  15. package/src/centaline/dynamicForm/src/dynamicForm.vue +28 -13
  16. package/src/centaline/dynamicSearchList/src/dynamicSearchList.vue +3 -2
  17. package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +47 -11
  18. package/src/centaline/dynamicSearchList/src/dynamicTableStats.vue +47 -14
  19. package/src/centaline/dynamicSearchListTab/src/dynamicSearchListOne.vue +3 -2
  20. package/src/centaline/dynamicTimeSelect/src/dynamicTimeSelect.vue +20 -9
  21. package/src/centaline/dynamicTree/src/dynamicSearchTree.vue +2 -2
  22. package/src/centaline/loader/src/ctl/Form.js +28 -26
  23. package/src/centaline/loader/src/ctl/Mo.js +2 -2
  24. package/src/centaline/loader/src/ctl/Router.js +25 -0
  25. package/src/centaline/loader/src/ctl/SearchTable.js +7 -1
  26. package/src/centaline/loader/src/ctl/TimeSelect.js +19 -4
  27. package/src/centaline/loader/src/ctl/lib/Enum.js +6 -1
  28. package/src/main.js +2 -2
  29. package/wwwroot/static/centaline/centaline-data-driven.js +2 -2
  30. package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div class="field-top">
3
- <div style="width:100%" v-if="model !== null" class="ct-Dtd" :class="[model.attrs.size?'ct-Dtd-'+model.attrs.size:'']">
3
+ <div style="width:100%;display: flex;" v-if="model !== null" class="ct-Dtd" :class="[model.attrs.size?'ct-Dtd-'+model.attrs.size:'']" >
4
4
  <div :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'']" style="flex:1">
5
- <div v-if="model.showLabel && model.label" class="el-input-group__prepend">
5
+ <div v-if="model.showLabel && model.label" class="el-input-group__prepend" :class="[model.labelClass]">
6
6
  {{model.label}}
7
7
  </div>
8
8
  <div class="ct-datepicker" style="width:100%" v-if="model !== null&&model.valueFormat=='HH:mm'" :class="[model.showLabel?'showLabel':'']">
@@ -10,11 +10,11 @@
10
10
  v-bind="model.attrs"
11
11
  @change="changeModel($event)"
12
12
  @clear="changeModel($event)"
13
- :placeholder="model.placeholder"
13
+ :placeholder="model.attrs.placeholder1"
14
14
  :disabled="model.lock"
15
15
  :picker-options="{
16
16
  start: model.min,
17
- step: model.step,
17
+ step: model.step,
18
18
  end: model.max
19
19
  }">
20
20
  </el-time-select>
@@ -23,7 +23,7 @@
23
23
  v-bind="model.attrs"
24
24
  @change="changeModel($event)"
25
25
  @clear="changeModel($event)"
26
- :placeholder="model.placeholder1"
26
+ :placeholder="model.attrs.placeholder2"
27
27
  :disabled="model.lock"
28
28
  :picker-options="{
29
29
  start: model.min,
@@ -36,21 +36,21 @@
36
36
  <div class="ct-datepicker" style="width:100%" v-else-if="model !== null" :class="[model.showLabel?'showLabel':'']">
37
37
  <el-time-picker class="ct-date-picker-editor" v-model="model.value"
38
38
  v-bind="model.attrs" value-format="HH:mm:ss"
39
- :placeholder="model.placeholder" :disabled="model.lock"
39
+ :placeholder="model.attrs.placeholder1" :disabled="model.lock"
40
40
  @change="changeModel($event)" @clear="changeModel($event)"
41
41
  >
42
42
  </el-time-picker>
43
43
  <span v-if="model.isRange" class="ct-date-picker-span">-</span>
44
44
  <el-time-picker v-if="model.isRange" class="ct-date-picker-editor" v-model="model.value1"
45
45
  v-bind="model.attrs" value-format="HH:mm:ss"
46
- :placeholder="model.placeholder1" :disabled="model.lock"
46
+ :placeholder="model.attrs.placeholder2" :disabled="model.lock"
47
47
  @change="changeModel($event)" @clear="changeModel($event)"
48
48
  >
49
49
  </el-time-picker>
50
50
  </div>
51
51
  </div>
52
52
  <transition name="el-fade-in">
53
- <span v-show="!valid" class="errorMessage">
53
+ <span v-show="!valid" class="errorMessage">
54
54
  {{validMessage}}
55
55
  </span>
56
56
  </transition>
@@ -69,7 +69,7 @@
69
69
  },
70
70
  data() {
71
71
  return {
72
-
72
+ validMessage:""
73
73
  };
74
74
  },
75
75
  mounted() {
@@ -107,6 +107,17 @@
107
107
  this.inputHandler(event);
108
108
  this.changeHandler(event);
109
109
  },
110
+ //不能共用的数据校验 单独每一个时间框的非空校验
111
+ selfValidExcute: function (eventName) {
112
+ if (eventName === "input"||eventName === "valid") {
113
+ if (this.model.value1 == "" || this.model.value== ""|| this.model.value== null || this.model.value1== null) {
114
+ this.valid = false;
115
+ this.validMessage = "必填"
116
+ return false;
117
+ }
118
+ }
119
+ return true;
120
+ },
110
121
  }
111
122
  }
112
123
  </script>
@@ -301,7 +301,7 @@ export default {
301
301
  attrs: {
302
302
  searchConditionApi: field.actionForSearchLayout,
303
303
  searchDataApi: field.actionForSearch,
304
- apiParam: submitData,
304
+ apiParam: field.getActionPara(submitData).para,
305
305
  width: field.dialogWidth + "px",
306
306
  height: field.dialogHeight + "px",
307
307
  },
@@ -330,7 +330,7 @@ export default {
330
330
  attrs: {
331
331
  searchConditionApi: field.actionForSearchLayout,
332
332
  searchDataApi: field.actionForSearch,
333
- apiParam: submitData,
333
+ apiParam: field.getActionPara(submitData).para,
334
334
  width: field.dialogWidth + "px",
335
335
  height: field.dialogHeight + "px",
336
336
  },
@@ -48,20 +48,18 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
48
48
  rtn._fieldsDic = {};
49
49
  if (rtn.fields) {
50
50
  rtn.fields.forEach((f) => {
51
- if (f.type == Enum.ControlType.Compound) {
51
+ if (f.type == Enum.ControlType.Compound || f.type == Enum.ControlType.ContainerControl) {
52
52
  if (f.fields) {
53
53
  f.fields.forEach((v) => {
54
54
  rtn._fieldsDic[v.id] = v;
55
55
  });
56
56
  }
57
57
  }
58
- // else if (f.type == Enum.ControlType.ContainerControl) {
59
- // if (f.compoundFields) {
60
- // f.compoundFields.forEach((v) => {
61
- // rtn._fieldsDic[v.id] = v;
62
- // });
63
- // }
64
- // }
58
+ rtn._fieldsDic[f.id] = f;
59
+ });
60
+ }
61
+ if(rtn.buttons){
62
+ rtn.buttons.forEach((f) => {
65
63
  rtn._fieldsDic[f.id] = f;
66
64
  });
67
65
  }
@@ -212,11 +210,14 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
212
210
  },
213
211
  //获取Field的属性attrKey的值
214
212
  getValueByFieldName(id, attrKey) {
215
- attrKey = this.common.initialsToLowerCase(attrKey);
216
- var rtn1 = this.fieldsDic[id];
217
- if (rtn1) {
218
- return rtn1.source[attrKey];
213
+ attrKey = this.common.initialsToLowerCase(attrKey);
214
+ var rtn1 = this.fieldsDic[id];
215
+ if (rtn1) {
216
+ if(rtn1.is && rtn1.is=='ct-btn'){
217
+ return rtn1[attrKey];
219
218
  }
219
+ return rtn1.source[attrKey];
220
+ }
220
221
  },
221
222
  getValueByFieldNameFromParent(id, attrKey) {
222
223
  if(this.form && this.form.self && this.form.self.$parent){
@@ -227,22 +228,22 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
227
228
  //设置Field的属性attrKey的值
228
229
  setValueByFieldName(id, attrKey, attrValue) {
229
230
  attrKey = this.common.initialsToLowerCase(attrKey);
230
- var rtn1 = this.fieldsDic[id];
231
- if (rtn1) {
232
- if(attrKey=='code1' && rtn1.source.controlType===4
233
- && attrValue!=undefined && attrValue!=null && attrValue!=''){
234
- if(rtn1.source.decimals1 != undefined && rtn1.source.decimals1 != null && rtn1.source.decimals1>-1){
235
- attrValue = Number(attrValue).toFixed(rtn1.source.decimals1)
236
- }
231
+ var rtn1 = this.fieldsDic[id];
232
+ if (rtn1) {
233
+ if(attrKey=='code1' && rtn1.source.controlType===4
234
+ && attrValue!=undefined && attrValue!=null && attrValue!=''){
235
+ if(rtn1.source.decimals1 != undefined && rtn1.source.decimals1 != null && rtn1.source.decimals1>-1){
236
+ attrValue = Number(attrValue).toFixed(rtn1.source.decimals1)
237
237
  }
238
- rtn1.source[attrKey] = attrValue;
239
- this.form.hatchHandle(id, attrKey, attrValue, rtn1);
238
+ }
239
+ rtn1.source[attrKey] = attrValue;
240
+ this.form.hatchHandle(id, attrKey, attrValue, rtn1);
240
241
 
241
- //用于处理源数据改动,强制更新视图数据 todo
242
- if (rtn1.self.$forceUpdate) {
243
- rtn1.self.$forceUpdate();
244
- }
242
+ //用于处理源数据改动,强制更新视图数据 todo
243
+ if (rtn1.self.$forceUpdate) {
244
+ rtn1.self.$forceUpdate();
245
245
  }
246
+ }
246
247
  },
247
248
  setValueByFieldNameFromParent(id, attrKey, attrValue) {
248
249
  if(this.form && this.form.self && this.form.self.$parent){
@@ -494,7 +495,8 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
494
495
  }
495
496
  );
496
497
  },
497
- //消息提示 type主题:success/warning/info/error。 duration 显示时间, 毫秒。设为 0 则不会自动关闭。 showClose 是否显示关闭按钮。
498
+ //消息提示 type主题:success/warning/info/error。 center是否居中true/flase。 duration 显示时间, 毫秒。设为 0 则不会自动关闭。
499
+ //showClose 是否显示关闭按钮。dangerouslyUseHtmlString 属性设置为 true ,message 就会被当做 HTML 片段处理。
498
500
  message(message, type, center, duration, showClose, dangerouslyUseHTMLString) {
499
501
  if (typeof center === 'undefined') {
500
502
  center = true;
@@ -126,14 +126,14 @@ const Mo = function (source, moreActionRouter) {
126
126
  },
127
127
  get defaultValue() {
128
128
  var rtnArr = [];
129
- if (this.defaultText !== '') {
129
+ if (this.defaultText) {
130
130
  [].concat(JSON.parse(this.defaultText)).forEach((v) => {
131
131
  rtnArr.push(v[this.optionAttrs.value]);
132
132
  });
133
133
  }
134
134
  return rtnArr;
135
135
  },
136
- defaultText: source.code1,
136
+ defaultText: source.defaultCode1||'',
137
137
  get clearable() {
138
138
  if (typeof source.clear === 'undefined') {
139
139
  return true;
@@ -4,6 +4,7 @@ import Enum from './lib/Enum';
4
4
  const Router = function (source) {
5
5
  var rtn = {
6
6
  disabled: source.selectedMode && source.selectedMode === Enum.ListSelectMode.Multiple ? true : false,
7
+ code1:'',
7
8
  get id() {
8
9
  return source.key;
9
10
  },
@@ -32,6 +33,7 @@ const Router = function (source) {
32
33
  get onClick() {
33
34
  return source.onChanged;
34
35
  },
36
+
35
37
  get isSubmit() {
36
38
  return source.buttonType === Enum.ButtonType.Submit;
37
39
  },
@@ -41,6 +43,10 @@ const Router = function (source) {
41
43
  get isDropdown() {
42
44
  return source.buttonType === Enum.ButtonType.Dropdown;
43
45
  },
46
+ get isCheckbox() {
47
+ return source.buttonType === Enum.ButtonType.Checkbox;
48
+ },
49
+
44
50
  get alert() {
45
51
  return source.flagAlert === true;
46
52
  },
@@ -379,10 +385,29 @@ const Router = function (source) {
379
385
  },
380
386
  get align() {
381
387
  return source.align;
388
+ },
389
+ get alignCss() {
390
+ let css='';
391
+ if(Enum.HalignType.Right == source.align){
392
+ css='right';
393
+ }
394
+ else if(Enum.HalignType.Left == source.align){
395
+ css='left';
396
+ }
397
+ else if(Enum.HalignType.Center == source.align){
398
+ css='center';
399
+ }
400
+ return css;
382
401
  },
383
402
  get isRight() {
384
403
  return Enum.HalignType.Right == source.align;
385
404
  },
405
+ get isLeft() {
406
+ return Enum.HalignType.Left == source.align;
407
+ },
408
+ get isCenter() {
409
+ return Enum.HalignType.Center == source.align;
410
+ },
386
411
  get flagAsync() {
387
412
  return source.flagAsync;
388
413
  },
@@ -608,6 +608,12 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
608
608
  return newSearchModel;
609
609
  },
610
610
  getCurrentRowApiData(callback, rtnData, router, cellindex) {
611
+ if(router.flagAddRowAfterAction){
612
+ if(!rtnData || !rtnData.responseData){
613
+ return;
614
+ }
615
+ }
616
+
611
617
  var self = this;
612
618
  var searchFields = {
613
619
  fields: []
@@ -896,7 +902,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
896
902
  break;
897
903
 
898
904
  case Enum.ActionType.Refersh: //刷新
899
- rtn.$vue.getPage(1);
905
+ rtn.$vue.getPage(1,true);
900
906
  break;
901
907
 
902
908
  case Enum.ActionType.RefreshParent: //刷新父页面
@@ -59,7 +59,7 @@ const TimeSelect = function (source, isRange, dateType) {
59
59
  var rtnFormObj = {};
60
60
  Object.defineProperty(rtnFormObj, source.fieldName1, {
61
61
  get: function () {
62
- if(source.code1){
62
+ if(source.code1 && source.format != "HH:mm" && Object.prototype.toString.call(source.code1) === "[object Date]"){
63
63
  return common.formatDate(source.code1, rtn.valueFormat);
64
64
  }
65
65
  return source.code1;
@@ -69,7 +69,7 @@ const TimeSelect = function (source, isRange, dateType) {
69
69
  });
70
70
  Object.defineProperty(rtnFormObj, source.fieldName2, {
71
71
  get: function () {
72
- if(source.code2){
72
+ if(source.code2 && source.format != "HH:mm" && Object.prototype.toString.call(source.code2) === "[object Date]"){
73
73
  return common.formatDate(source.code2, rtn.valueFormat);
74
74
  }
75
75
  return source.code2;
@@ -79,8 +79,23 @@ const TimeSelect = function (source, isRange, dateType) {
79
79
  });
80
80
  return rtnFormObj;
81
81
  },
82
- get attrs() {
83
- return {}
82
+ attrs: {
83
+ style: {
84
+ width: '100%'
85
+ },
86
+ class: 'ct-date-picker-editor',
87
+ get placeholder1() {
88
+ return source.placeholder1;
89
+ },
90
+ set placeholder1(v) {
91
+ source.placeholder1 = v;
92
+ },
93
+ get placeholder2() {
94
+ return source.placeholder2;
95
+ },
96
+ set placeholder2(v) {
97
+ source.placeholder2 = v;
98
+ }
84
99
  }
85
100
  };
86
101
  rtn = base.copy(Base(data), rtn);
@@ -524,7 +524,12 @@ const Enum = {
524
524
  /// <summary>
525
525
  /// 下拉
526
526
  /// </summary>
527
- Dropdown: 3
527
+ Dropdown: 3,
528
+
529
+ /// <summary>
530
+ /// Checkbox
531
+ /// </summary>
532
+ Checkbox: 4
528
533
  },
529
534
 
530
535
  /// <summary>
package/src/main.js CHANGED
@@ -53,9 +53,9 @@ Vue.use(centaline, {
53
53
  // 获取请求头
54
54
  getRequestHeaders: function () {
55
55
  return {
56
- oldToken: 'c4ca2b41-a50c-4727-9154-a8cf0d4e47cb',
56
+ oldToken: '11c12506-253c-4995-83fb-84cf51cb23a0',
57
57
  token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQRO_iOiv5s1570zn-NBwiIuBIoUIkkUCIuxMEdPRMMRq95s1dzOsgWmHIccikIFr0gKQsMJYCURKxKdKYlHr-BH7UNz26yCFkByg7Aiw2A-tYwLDtEubgUibRiHo9i1aRRy-dtdSIab-8gdNKvcA618uu3v5x7rRMm3YkOZAfR6BtAWp_3LQHBNI8KHbkqlHi8QQAAP__.RrBgBqaFlp478oO3g5k_EEtjPt_o8qpJBkzgSP78Wa4',
58
- authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjEOwjAQBP_iOif54vP5nC62k4ZHRLbiIlSIJBII8XdAQEfPFFtMM3tT615Up5L0muJoIA6tBUrOQj86gRBFdGidoSCT_wA_5suESN4hD9B7F4GYDAhGgUgcaUyDiSGpRtXLSXXIwoyiW2zUkre3sAb5Jfa1ng_1-o9zx215ZjOLSPYWtKMWqMwZCvsMmXUpc6W5VFT3BwAAAP__.7YpCSX-0-868bPUSiaNCErO_7JxtgS210pSEmnTyaWs"}',
58
+ authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjrEOgjAURf_lzbyE1772tWy0hcWPIBQ64GQEEo3x39Wom7tnuMNZzr3BumdoILm25thrjJ0yyEkMtr04DNG5OijRHNzgP-CP-TIQsReyHbZeIrJljY6iw8g2cp86HUOCCsrlBA1ZJ0oZ41UFy7i9BWlPL7Gv5Xwo13-cO27LM2tyzhOPBUdfBFmE0Os8YR7nmayiqc4z3B8AAAD__w.o16g-7JqWN22AE4FlElSYeKTamxgcbezCPVyH2Jhydk"}',
59
59
 
60
60
  originalRequestURL: 'http://10.88.22.67:8080',
61
61
  EstateInfo: '{"estateId":"201806071109550C867184E8BCA56EC3","estateName":"C%E5%BE%A1%E6%9E%97%E5%B1%B1%E6%99%AF%E6%A5%BC"}',