centaline-data-driven 1.3.91 → 1.3.93

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.3.91",
3
+ "version": "1.3.93",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -12,8 +12,8 @@
12
12
  </ct-searchlist> -->
13
13
 
14
14
  <!-- <ct-searchlist
15
- :searchConditionApi="'/customermanage/MyCustomerList/getLayoutOfSearch'"
16
- :searchDataApi="'/customermanage/MyCustomerList/getList'">
15
+ :searchConditionApi="'/report/monthly/region/layout'"
16
+ :searchDataApi="'/report/monthly/region/list'">
17
17
  </ct-searchlist> -->
18
18
 
19
19
  <ct-searchlist
Binary file
@@ -25,7 +25,7 @@
25
25
  </div>
26
26
  <div slot="file" slot-scope="{ file }" :title="file.fileName">
27
27
  <div class="cover-list-item">
28
- <el-image fit="fill" :src="file.url" style="width: 100px; height: 100px" :z-index="previewZIndex" @click="viewerfile(file)">
28
+ <el-image fit="fill" :src="file.fileName?file.url:require('../../../assets/blank.png')" style="width: 100px; height: 100px" :z-index="previewZIndex" @click="viewerfile(file)">
29
29
  </el-image>
30
30
  <span class="cover-list-item-span-Default" v-if="model.rightDefault&&model.rightDefault==1&&file.mediaTypeID==2">
31
31
  <i>
@@ -125,7 +125,7 @@
125
125
  </div>
126
126
  <div v-else-if="typeof column.template === 'undefined'"
127
127
  :class="column.autoRowHeight ? 'lineFeedCell' : 'cell'" :style="column.style ? column.style : ''">
128
- {{ row[column.id] }}
128
+ {{ $common.getDataOfUpperLower(row,column.id) }}
129
129
  </div>
130
130
 
131
131
  <!--模版列(启用)-->
@@ -305,7 +305,7 @@
305
305
  self.$forceUpdate();
306
306
  self.$nextTick(() => {
307
307
  if (!self.isLayout) {
308
- if (self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
308
+ if (self.$refs.tableParent && self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
309
309
  self.tableLoading = true;
310
310
  self.model.nextPage(next);
311
311
  }
@@ -413,7 +413,7 @@
413
413
  if (rtn) {
414
414
  self.$forceUpdate();
415
415
  self.$nextTick(() => {
416
- if (self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
416
+ if (self.$refs.tableParent && self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
417
417
  self.tableLoading = true;
418
418
  self.model.nextPage(next);
419
419
  }
@@ -999,35 +999,8 @@
999
999
  on: {
1000
1000
  submit(ev) {
1001
1001
  if (ev.responseData.notification == 24) {
1002
- //更新列
1003
- self.model.selectIndex = 0;
1004
- if (self.currentRow !== null) {
1005
- for (var i = 0; i < self.currentRow.children.length; i++) {
1006
- self.currentRow.children[i].classList.remove("select");
1007
- }
1008
- }
1009
- if (typeof self.$refs.tableParent !== "undefined") {
1010
- self.$refs.tableParent.scrollTop = 0;
1011
- self.$refs.tableParent.scrollLeft = 0;
1012
- self.scrollTop = 0;
1013
- self.scrollLeft = 0;
1014
- }
1015
- self.$forceUpdate();
1016
- self.$nextTick(() => {
1017
- if (self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
1018
- self.tableLoading = true;
1019
- self.model.nextPage(next);
1020
- }
1021
- else {
1022
- self.tableLoading = false;
1023
- self.rowColorChange();
1024
- self.resetScroll();
1025
- self.calculatingRowHeight();
1026
- self.getScrollAttr();
1027
- }
1028
- self.setfixedSize();
1029
- });
1030
- self.loaderObj.SearchTable(self.api, self.load, self.model.searchModel, true);
1002
+ //更新列
1003
+ self.refreshTableColumns();
1031
1004
  self.$common.closeDialog(dialogOption.dialog);
1032
1005
  }
1033
1006
  else {
@@ -1580,6 +1553,27 @@
1580
1553
  self.updateCurrentRow(field, data);
1581
1554
  }
1582
1555
  },
1556
+ refreshTableColumns(data) {
1557
+ var self=this;
1558
+ self.model.selectIndex = 0;
1559
+ if (self.currentRow !== null) {
1560
+ for (var i = 0; i < self.currentRow.children.length; i++) {
1561
+ self.currentRow.children[i].classList.remove("select");
1562
+ }
1563
+ }
1564
+ if (typeof self.$refs.tableParent !== "undefined") {
1565
+ self.$refs.tableParent.scrollTop = 0;
1566
+ self.$refs.tableParent.scrollLeft = 0;
1567
+ self.scrollTop = 0;
1568
+ self.scrollLeft = 0;
1569
+ }
1570
+ if(data){
1571
+ self.loaderObj.SearchTable(data,self.load, self.model.searchModel, true,false,null,self.api)
1572
+ }
1573
+ else{
1574
+ self.loaderObj.SearchTable(self.api, self.load, self.model.searchModel, true);
1575
+ }
1576
+ },
1583
1577
  popupClickHandler() {
1584
1578
  var tempListData = this.model.getSelectRowData({isMulti:this.model.isMulti});
1585
1579
  if (tempListData != null && tempListData.length>0) {
@@ -7,7 +7,7 @@
7
7
  <div v-if="model.showLabel && model.label" class="el-input-group__prepend field-label-div max-input-group" :class="[model.labelClass]">
8
8
  <span>{{model.label}}</span>
9
9
  </div>
10
- <el-input :title="model.lock?model.value:''" :type="model.inputType" v-model="model.value" v-bind="model.attrs" @input="inputHandler($event);isShowClear()" @change="changeHandler($event)"
10
+ <el-input ref="input" :title="model.lock?model.value:''" :type="model.inputType" v-model="model.value" v-bind="model.attrs" @input="inputHandler($event);isShowClear()" @change="changeHandler($event)"
11
11
  class="ct-flex-div-input max-input" :class="[model.showLabel?'showLabel':'',!valid?'inputError':'']" :disabled="model.lock" :rows="model.rows"
12
12
  :readonly="model.readonly" :show-password="model.isPassword" autocomplete="on" :maxlength="model.max" :show-word-limit="model.showWordLimit"
13
13
  @keyup.enter.native="search()">
@@ -19,7 +19,7 @@
19
19
  </span>
20
20
  </span>
21
21
  </el-input>
22
-
22
+ <span v-if="this.minText" :style="{left: minTextLeft+'px'}" style="color: #909399;background: #FFF;position: absolute;font-size: 12px;bottom: 5px;">{{this.minText}}</span>
23
23
  <span v-if="model.sufLabel" class="spanMessage ct-flex-div-span">{{model.sufLabel}}</span>
24
24
  <ctQuickInputSos v-if="!model.lock && model.paramName" class="ct-flex-div-span" :pn="model.paramName" :action="api" :flagNew="true" @click="quickSelect"></ctQuickInputSos>
25
25
 
@@ -54,6 +54,8 @@
54
54
  data() {
55
55
  return {
56
56
  showClear: false,
57
+ minText:'',
58
+ minTextLeft:0,
57
59
  }
58
60
  },
59
61
  created() {
@@ -65,6 +67,17 @@
65
67
  }
66
68
  this.model.self=this;
67
69
  },
70
+ mounted() {
71
+ if(this.model.inputType === 'textarea' && this.model.min && this.model.min > 0){
72
+ if(this.model.max && this.model.max>0){
73
+ this.minText='需要'+this.model.min+'-'+this.model.max+'个字';
74
+ }
75
+ else{
76
+ this.minText='至少需要'+this.model.min+'个字';
77
+ }
78
+ this.minTextLeft=this.$refs.input.$el.offsetLeft+10;
79
+ }
80
+ },
68
81
  methods: {
69
82
  mouseOverHandle: function () {
70
83
  if (this.model.value !== '' && this.model.clearable) {
@@ -4,7 +4,7 @@ import Router from './Router';
4
4
  import Vue from 'vue';
5
5
  import Enum from './lib/Enum';
6
6
  import formData from '../../../formData';
7
- const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSearchData, postThenHandler) {
7
+ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSearchData, postThenHandler,action) {
8
8
  var init = function (source) {
9
9
  var rtn = {
10
10
  $vue: null,
@@ -16,6 +16,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
16
16
  pageIndex: 1,
17
17
  selectIndex: 0,
18
18
  selectAll: 0,
19
+ searchAction:action?action:data,
19
20
  get title() {
20
21
  return source.content.title;
21
22
  },
@@ -486,7 +487,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
486
487
  var newSearchModel = this.getSearchData();
487
488
 
488
489
  Vue.prototype.$api.postHandler(common.globalUri(), {
489
- action: data,
490
+ action: self.searchAction,
490
491
  para: {
491
492
  searchFields: newSearchModel ? newSearchModel : {},
492
493
  pageAttribute: this.pageData,
@@ -520,12 +521,15 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
520
521
  if (typeof response.page.flagMoreData !== 'undefined') {
521
522
  self.flagMoreData = response.page.flagMoreData;
522
523
  }
523
- if (typeof response.content.updateTableColumns !== 'undefined' && response.content.updateTableColumns === '1') {
524
+ if (response.content.updateTableColumns) {
524
525
  self.columns = response.content.columns;
525
526
  if (self.template) {
526
527
  var tempLoader = template.loader(self.template).default;
527
528
  tempLoader.init(self);
528
529
  }
530
+ else{
531
+ self.$vue.refreshTableColumns(response);
532
+ }
529
533
  }
530
534
  if (typeof callback !== 'undefined') {
531
535
  if (response.content.rows.length > 0) {
@@ -535,7 +539,8 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
535
539
  callback(false);
536
540
  }
537
541
  }
538
- } else {
542
+ }
543
+ else {
539
544
  callback(false);
540
545
  }
541
546
 
@@ -581,7 +586,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
581
586
  });
582
587
  }
583
588
  Vue.prototype.$api.postHandler(common.globalUri(), {
584
- action: data,
589
+ action: self.searchAction,
585
590
  para: {
586
591
  searchFields: searchFields,
587
592
  pageAttribute: {
@@ -925,7 +930,10 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
925
930
  );
926
931
  }
927
932
  else {
928
- return init(data);
933
+ var rtn = init(data);
934
+ if (callBack) {
935
+ callBack(rtn);
936
+ }
929
937
  }
930
938
  }
931
939
 
@@ -59,8 +59,8 @@ export default {
59
59
  if (this.model.validating) {
60
60
  let validtemp = this.model.validating('input', self.inputOld, self.inputOld1);
61
61
  self.valid = validtemp.valid;
62
- if (!self.valid) {
63
- self.validMessage = validtemp.message;
62
+ if (!self.valid) {
63
+ self.validExcuteMessage(validtemp);
64
64
  return false;
65
65
  }
66
66
  }
@@ -93,8 +93,8 @@ export default {
93
93
  if (this.model.validating) {
94
94
  let validtemp = this.model.validating('change', self.inputOld, self.inputOld1);
95
95
  self.valid = validtemp.valid;
96
- if (!self.valid) {
97
- self.validMessage = validtemp.message;
96
+ if (!self.valid) {
97
+ self.validExcuteMessage(validtemp);
98
98
  return false;
99
99
  }
100
100
  }
@@ -131,7 +131,7 @@ export default {
131
131
  let validtemp = this.model.validating();
132
132
  self.valid = validtemp.valid;
133
133
  if (!self.valid) {
134
- self.validMessage = validtemp.message;
134
+ self.validExcuteMessage(validtemp);
135
135
  return false;
136
136
  }
137
137
  }
@@ -145,6 +145,16 @@ export default {
145
145
 
146
146
  self.valid = true;
147
147
  return true;
148
- }
148
+ },
149
+
150
+ validExcuteMessage(validtemp){
151
+ var self = this;
152
+ if(validtemp.type=='validateLenMin'){
153
+ self.validMessage= '至少需要'+this.model.min+'个字';
154
+ }
155
+ else{
156
+ self.validMessage = validtemp.message;
157
+ }
158
+ },
149
159
  }
150
160
  }
@@ -144,6 +144,14 @@ const actions = {
144
144
  return true;
145
145
  }
146
146
  },
147
+ validateLenMin(model) {
148
+ if (model.value && model.value.length<model.min) {
149
+ return false;
150
+ }
151
+ else {
152
+ return true;
153
+ }
154
+ },
147
155
  };
148
156
 
149
157
  const valid = {
@@ -210,6 +218,12 @@ const valid = {
210
218
  message: '输入文字不能超过最大长度',
211
219
  ticker: 'input'
212
220
  },
221
+ validateLenMin: {
222
+ action: actions.validateLenMin,
223
+ message: 'validateLenMin',
224
+ type: 'validateLenMin',
225
+ ticker: 'input'
226
+ },
213
227
  Init(model) {
214
228
  return {
215
229
  //废弃 todo 删除
@@ -281,6 +295,9 @@ const valid = {
281
295
  if(model.max){
282
296
  rtnValidate.push(valid.validateLen);
283
297
  }
298
+ if(model.min && model.min>0){
299
+ rtnValidate.push(valid.validateLenMin);
300
+ }
284
301
  break;
285
302
  default:
286
303
  break;
package/src/main.js CHANGED
@@ -15,7 +15,7 @@ Vue.use(centaline, {
15
15
  baseUrl: "http://10.88.22.46:7070/v1/form/router",
16
16
  // baseUrl: "http://10.25.10.67:9999/v1/form/router",
17
17
  // baseUrl: "http://10.88.22.42:9999/v1/form/router",
18
- // baseUrl: "http://10.88.22.40:8080/",
18
+ // baseUrl: "http://10.88.22.39:8080/api/",
19
19
  // baseUrl: "http://tjcptest.centaline.com.cn/",
20
20
  // flagRouterSelf: true,
21
21
  zindex: 999,
@@ -42,8 +42,8 @@ Vue.use(centaline, {
42
42
  // 获取请求头
43
43
  getRequestHeaders: function () {
44
44
  return {
45
- oldToken: '42ccd644-040d-4e01-9521-1623f1884058',
46
- token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjEOgkAQRe8yNZMws8PsLJ0u2HgIIrgkWBmBRGO8uxqho_cVr3jN_08Y5xZK8Au4oZUmLOCGVhoiCZ60xl3wEUXFoVE0jKJRDlXt4r6CDNL9CiWpqpfC5SGD4TT9ghYWvmEe0-2YHv84d5mGz6wzJm65R9flhNJxwLYXxs6YkybLz2bwegMAAP__.kXabWRcQeD3SN72lRH5vYtNPDARnnOR7ZJd9joFcSyE',
45
+ oldToken: '823894f8-bbf3-4d54-b3fb-4c697801c5c4',
46
+ token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVbKxuu1nQ6c0HCIyDi2FCqUjwRC3B0QSZeeKaaY5r0nTMsFajAruKONzq3gjjY6InaGpMWDMx5ZWKElb9GzeD41rfLHBgpI9xvUJCJW6bKsChjC_AuGrXzDMqXxnB7_OHedh89srKwKiRNGyoystUMbdMDYu6wcK8l9Ca83AAAA__8.s6pi7lVXnHN8PrRW8crQvoQxsihCtMLBQfkSAkOe7oA',
47
47
 
48
48
  originalRequestURL: 'http://10.88.22.67:8080',
49
49
  EstateInfo: '{"estateId":"FAF029E8-EC28-4297-83CF-B8FFD826DB91","estateName":"AABBCC"}',