centaline-data-driven 1.5.26 → 1.5.27

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.5.26",
3
+ "version": "1.5.27",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/release-log.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## v1.5.27
2
+ 2023-06-27
3
+
4
+ 优化
5
+
6
+ CCES form表单中的表格数据全展示
7
+
8
+ 列表统计栏和详情页统计栏,点击更多里面的选项交换位置,体验优化
9
+
10
+ formData添加submit方法
11
+
12
+ 列表行删除完后,要关闭右侧
13
+
1
14
  ## v1.5.26
2
15
  2023-06-21
3
16
 
@@ -60,21 +60,15 @@
60
60
  :searchStatsApi="'/PropertyOFIList/getListStats'">
61
61
  </ct-searchlist> -->
62
62
 
63
- <!-- <ct-searchlist :searchConditionApi="'/EstateList/getLayoutOfSearch'"
64
- :searchDataApi="'/EstateList/getListOfSearchModel'">
65
- </ct-searchlist> -->
63
+ <!-- <ct-searchlist :searchConditionApi="'/EstateList/getLayoutOfSearch'" :searchDataApi="'/EstateList/getListOfSearchModel'"></ct-searchlist> -->
66
64
 
67
- <!-- <ct-searchlist :searchConditionApi="'/EstateBuildingList/getLayoutOfSearch'"
68
- :searchDataApi="'/EstateBuildingList/getListOfSearchModel'">
69
- </ct-searchlist> -->
65
+ <!-- <ct-searchlist :searchConditionApi="'/EstateBuildingList/getLayoutOfSearch'" :searchDataApi="'/EstateBuildingList/getListOfSearchModel'"></ct-searchlist> -->
70
66
 
71
- <!-- <ct-searchlist :searchConditionApi="'/DistrictList/getLayoutOfSearch'"
72
- :searchDataApi="'/DistrictList/getListOfSearchModel'">
73
- </ct-searchlist> -->
67
+ <!-- <ct-searchlist :searchConditionApi="'/DistrictList/getLayoutOfSearch'" :searchDataApi="'/DistrictList/getListOfSearchModel'"></ct-searchlist> -->
68
+
69
+ <!-- <ct-searchlist :searchConditionApi="'/CustomerImportList/getLayoutOfSearch'" :searchDataApi="'/CustomerImportList/getListOfSearchModel'"></ct-searchlist> -->
74
70
 
75
- <ct-searchlist :searchConditionApi="'/CustomerImportList/getLayoutOfSearch'"
76
- :searchDataApi="'/CustomerImportList/getListOfSearchModel'">
77
- </ct-searchlist>
71
+ <ct-searchlist :searchConditionApi="'/CallTaskList/getLayoutOfSearch'" :searchDataApi="'/CallTaskList/getListOfSearchModel'"></ct-searchlist>
78
72
 
79
73
  <!-- <ct-searchlist :searchConditionApi="'/RoleList/getLayoutOfSearch'" :searchStatsApi="'/RoleList/getListStats'" :searchDataApi="'/RoleList/getListOfSearchModel'"></ct-searchlist> -->
80
74
 
@@ -237,7 +237,7 @@ export default {
237
237
  attrs: {
238
238
  searchConditionApi: field.actionForSearchLayout,
239
239
  searchDataApi: field.actionForSearch,
240
- apiParam: field.getActionPara(submitData).para,
240
+ apiParam: submitData,
241
241
  width: field.dialogWidth + 'px',
242
242
  height: field.dialogHeight + 'px'
243
243
  },
@@ -23,7 +23,7 @@
23
23
  </ct-SearchList>
24
24
 
25
25
  <div ref="detailForm" v-if="pageType=='Form'" style="overflow: auto;" :style="{height:(listHeight-5)+'px'}">
26
- <ct-form :api="api" :apiParam="apiParam" @loaded="loaded" @submit="submit" :flagScroll="'true'" :drowerClose="drowerClose">
26
+ <ct-form :api="api" :apiParam="apiParam" @loaded="loaded" @submit="submit" :flagScroll="'true'" :drowerClose="drowerClose" :openType="'detail'">
27
27
  </ct-form>
28
28
  </div>
29
29
 
@@ -196,7 +196,7 @@
196
196
  </div>
197
197
  <div v-if="showData.length > 1" style="position: relative">
198
198
  <el-tabs :value="model.activeIndex1" @tab-click="handleSelect">
199
- <el-tab-pane v-for="(col, index) in showData[0]" :key="col.appID" :index="index.toString()" :name="index.toString()">
199
+ <el-tab-pane v-for="(col, index) in showData[0]" :key="col.appID" :index="index.toString()" :name="index.toString()" :style="{'width':(index == showData[0].length-1 ? lastWidth + 'px' : '' ),}">
200
200
  <div slot="label" v-html="col.appName"></div>
201
201
  </el-tab-pane>
202
202
  </el-tabs>
@@ -280,6 +280,7 @@ export default {
280
280
  flagDisabledPrev:false,
281
281
  flagDisabledNext:false,
282
282
  showData: [],
283
+ lastWidth:0,
283
284
  FlagStatistics: false,
284
285
  dropDownSelected: false,
285
286
  iconSort: require("../../../assets/sort.png"),
@@ -351,6 +352,9 @@ export default {
351
352
  }
352
353
  }
353
354
  if (showIndex > 0) {
355
+ const ExceptShowIndexWidth = self.$refs["StatisticsItem"+(showIndex)][0].offsetLeft;
356
+ const preShowIndexWidth =self.$refs["StatisticsItem" + (showIndex-1)][0].getBoundingClientRect().width;
357
+ self.lastWidth=self.showWidth-ExceptShowIndexWidth + preShowIndexWidth -20;
354
358
  self.showData = [
355
359
  self.model.tags1.slice(0, showIndex),
356
360
  self.model.tags1.slice(showIndex),
@@ -507,7 +511,7 @@ export default {
507
511
  },
508
512
  handleDropDown(key, index) {
509
513
  let i = index;
510
- this.model.activeIndex1 = (this.showData[0].length + i).toString();
514
+ // this.model.activeIndex1 = (this.showData[0].length + i).toString();
511
515
  let dropDownData = this.showData[1];
512
516
  this.dropDownSelected = true;
513
517
  if (dropDownData && dropDownData[i]) {
@@ -515,7 +519,16 @@ export default {
515
519
  this.model.searchConditionApiTags1 = dropDownData[i].searchConditionAction || "";
516
520
  this.model.searchDataApiTags1 = dropDownData[i].searchDataAction || "";
517
521
  this.model.paramDataTags1 = dropDownData[i].paramData || "";
518
- window.localStorage.setItem("detailtagkey", dropDownData[i].appID); //存储
522
+ //交换位置
523
+ let lastItemIndex = this.showData[0].length - 1;
524
+ let lastItem = this.showData[0][lastItemIndex];
525
+ this.showData[0][lastItemIndex]=col;
526
+ this.showData[1][index]=lastItem;
527
+ this.model.activeIndex1 = lastItemIndex.toString();
528
+ this.model.tags1[lastItemIndex]=col;
529
+ this.model.tags1[lastItemIndex +1 +index]=lastItem;
530
+ //存储
531
+ window.localStorage.setItem("detailtagkey", dropDownData[i].appID);
519
532
  }
520
533
  },
521
534
  fieldClickHandler(field) {
@@ -201,7 +201,7 @@
201
201
  </div>
202
202
  <div v-if="showData.length > 1" style="position: relative">
203
203
  <el-tabs :value="model.activeIndex1" @tab-click="handleSelect">
204
- <el-tab-pane v-for="(col, index) in showData[0]" :key="col.appID" :index="index.toString()" :name="index.toString()">
204
+ <el-tab-pane v-for="(col, index) in showData[0]" :key="col.appID" :index="index.toString()" :name="index.toString()" :style="{'width':(index == showData[0].length-1 ? lastWidth + 'px' : '' ),}">
205
205
  <div slot="label" v-html="col.appName"></div>
206
206
  </el-tab-pane>
207
207
  </el-tabs>
@@ -483,6 +483,7 @@ export default {
483
483
  flagDisabledPrev:false,
484
484
  flagDisabledNext:false,
485
485
  showData: [],
486
+ lastWidth:0,
486
487
  FlagStatistics: false,
487
488
  dropDownSelected: false,
488
489
  iconSort: require("../../../assets/sort.png"),
@@ -554,6 +555,9 @@ export default {
554
555
  }
555
556
  }
556
557
  if (showIndex > 0) {
558
+ const ExceptShowIndexWidth = self.$refs["StatisticsItem"+(showIndex)][0].offsetLeft;
559
+ const preShowIndexWidth =self.$refs["StatisticsItem" + (showIndex-1)][0].getBoundingClientRect().width;
560
+ self.lastWidth=self.showWidth-ExceptShowIndexWidth + preShowIndexWidth -20;
557
561
  self.showData = [
558
562
  self.model.tags1.slice(0, showIndex),
559
563
  self.model.tags1.slice(showIndex),
@@ -708,9 +712,9 @@ export default {
708
712
  window.localStorage.setItem("detailtagkey", this.model.tags1[i].appID); //存储
709
713
  }
710
714
  },
711
- handleDropDown(key, index) {
715
+ handleDropDown(col, index) {
712
716
  let i = index;
713
- this.model.activeIndex1 = (this.showData[0].length + i).toString();
717
+ // this.model.activeIndex1 = (this.showData[0].length + i).toString();
714
718
  let dropDownData = this.showData[1];
715
719
  this.dropDownSelected = true;
716
720
  if (dropDownData && dropDownData[i]) {
@@ -718,6 +722,16 @@ export default {
718
722
  this.model.searchConditionApiTags1 = dropDownData[i].searchConditionAction || "";
719
723
  this.model.searchDataApiTags1 = dropDownData[i].searchDataAction || "";
720
724
  this.model.paramDataTags1 = dropDownData[i].paramData || "";
725
+
726
+ //交换位置
727
+ let lastItemIndex = this.showData[0].length - 1;
728
+ let lastItem = this.showData[0][lastItemIndex];
729
+ this.showData[0][lastItemIndex]=col;
730
+ this.showData[1][index]=lastItem;
731
+ this.model.activeIndex1 = lastItemIndex.toString();
732
+ this.model.tags1[lastItemIndex]=col;
733
+ this.model.tags1[lastItemIndex +1 +index]=lastItem;
734
+
721
735
  window.localStorage.setItem("detailtagkey", dropDownData[i].appID); //存储
722
736
  }
723
737
  },
@@ -204,7 +204,7 @@
204
204
  <div v-if="showData.length > 1" style="position: relative">
205
205
  <el-tabs :value="model.activeIndex1" @tab-click="handleSelect">
206
206
  <el-tab-pane v-for="(col, index) in showData[0]" :key="col.appID"
207
- :index="index.toString()" :name="index.toString()">
207
+ :index="index.toString()" :name="index.toString()" :style="{'width':(index == showData[0].length-1 ? lastWidth + 'px' : '' ),}">
208
208
  <div slot="label" v-html="col.appName"></div>
209
209
  </el-tab-pane>
210
210
  </el-tabs>
@@ -481,6 +481,7 @@ export default {
481
481
  flagDisabledPrev: false,
482
482
  flagDisabledNext: false,
483
483
  showData: [],
484
+ lastWidth:0,
484
485
  FlagStatistics: false,
485
486
  dropDownSelected: false,
486
487
  iconSort: require("../../../assets/sort.png"),
@@ -564,6 +565,9 @@ export default {
564
565
  }
565
566
  }
566
567
  if (showIndex > 0) {
568
+ const ExceptShowIndexWidth = self.$refs["StatisticsItem"+(showIndex)][0].offsetLeft;
569
+ const preShowIndexWidth =self.$refs["StatisticsItem" + (showIndex-1)][0].getBoundingClientRect().width;
570
+ self.lastWidth=self.showWidth-ExceptShowIndexWidth + preShowIndexWidth -20;
567
571
  self.showData = [
568
572
  self.model.tags1.slice(0, showIndex),
569
573
  self.model.tags1.slice(showIndex),
@@ -716,9 +720,9 @@ export default {
716
720
  window.localStorage.setItem("detailtagkey", this.model.tags1[i].appID); //存储
717
721
  }
718
722
  },
719
- handleDropDown(key, index) {
723
+ handleDropDown(col, index) {
720
724
  let i = index;
721
- this.model.activeIndex1 = (this.showData[0].length + i).toString();
725
+ // this.model.activeIndex1 = (this.showData[0].length + i).toString();
722
726
  let dropDownData = this.showData[1];
723
727
 
724
728
  this.dropDownSelected = true;
@@ -728,6 +732,15 @@ export default {
728
732
  dropDownData[i].searchConditionAction || "";
729
733
  this.model.searchDataApiTags1 = dropDownData[i].searchDataAction || "";
730
734
  this.model.paramDataTags1 = dropDownData[i].paramData || "";
735
+ //交换位置
736
+ let lastItemIndex = this.showData[0].length - 1;
737
+ let lastItem = this.showData[0][lastItemIndex];
738
+ this.showData[0][lastItemIndex]=col;
739
+ this.showData[1][index]=lastItem;
740
+ this.model.activeIndex1 = lastItemIndex.toString();
741
+ this.model.tags1[lastItemIndex]=col;
742
+ this.model.tags1[lastItemIndex +1 +index]=lastItem;
743
+
731
744
  window.localStorage.setItem("detailtagkey", dropDownData[i].appID); //存储
732
745
  }
733
746
  },
@@ -129,6 +129,10 @@
129
129
  String,
130
130
  default: 'close',
131
131
  },
132
+ openType:{
133
+ String,
134
+ default: '',
135
+ },
132
136
  },
133
137
  data() {
134
138
  return {
@@ -401,7 +405,7 @@
401
405
  });
402
406
  }
403
407
  else {
404
- if (self.$common.dialogList && self.$common.dialogList.List.length === 0
408
+ if (self.$common.dialogList && self.$common.dialogList.List.length === 0 && self.openType !=='detail'
405
409
  && field.actionType && field.actionType===2 && data.notification !== 17) {
406
410
  if (typeof self.$common.getDataDrivenOpts().handler.closeTab === 'function') {
407
411
  self.$common.getDataDrivenOpts().handler.closeTab();
@@ -14,7 +14,7 @@
14
14
 
15
15
  <ct-searchtable ref="table" :api="searchDataApi" :searchStatsApi="searchStatsApi" :from="from" :isIframe="isIframe" :documentHeight="documentHeight"
16
16
  @loaded="tableLoaded" :documentWidth="documentWidth" :flagPopupSearchlist="flagPopupSearchlist" :screenTop="screenTop" :flagAppMode="flagAppMode"
17
- @toolbarClick="toolbarClickHandler" @refreshParent="refreshParentHandler" :key="reloadKeyTable" @searchComplate="searchComplate"
17
+ @toolbarClick="toolbarClickHandler" @refreshParent="refreshParentHandler" :key="reloadKeyTable" @searchComplate="searchComplate" @closeSideBar="closeSideBar"
18
18
  @rowClickHandle="rowClickHandle" @scrollHandle="scrollHandle" @refreshRowHandle="refreshRowHandle" @doClosePopoverHandle="doClosePopoverHandle"
19
19
  @showTitle="showTitleHandler" @popupClickHandler="popupClickHandler"></ct-searchtable>
20
20
  </div>
@@ -364,6 +364,10 @@
364
364
  closeSideHandler() {
365
365
  this.$refs.sideMenu.clickHandler();
366
366
  },
367
+ closeSideBar() {
368
+ this.flagSideBarOfData=false;
369
+ this.searchWidth=0;
370
+ },
367
371
  clickNextHandler() {
368
372
  this.$refs.table.rowKeyDownHandle(null,1);
369
373
  },
@@ -388,8 +392,20 @@
388
392
  this.$emit('submit', tempListData);
389
393
  this.$common.closeDialog(this);
390
394
  },
391
- submitHandler(modelForm,responseData){
392
- this.$refs.table.updateCurrentRow({flagFreshCurrentRow:true},{responseData:responseData});
395
+ submitHandler(responseData){
396
+ if(responseData && responseData.responseData && responseData.responseData.notification===4){
397
+ this.$refs.table.model.doAction(responseData);
398
+ if(this.$refs.table.model.listData.length>0){
399
+ this.selectIndex=-1;
400
+ this.rowClickHandle();
401
+ }
402
+ else{
403
+ this.closeSideBar();
404
+ }
405
+ }
406
+ else{
407
+ this.$refs.table.updateCurrentRow({flagFreshCurrentRow:true},{responseData:responseData});
408
+ }
393
409
  },
394
410
  },
395
411
  beforeDestroy() {
@@ -74,7 +74,7 @@
74
74
  <tbody>
75
75
  <!--可视区域的行数据-->
76
76
  <tr v-for="(row, rowindex) in model.listData" :key="rowindex"
77
- v-if="pageRowMin <= rowindex && rowindex <= pageRowMax" :ref="'rows.' + rowindex"
77
+ v-if="from == 'form' || pageRowMin <= rowindex && rowindex <= pageRowMax" :ref="'rows.' + rowindex"
78
78
  @click="rowClickHandle($event, rowindex)" class="ct-tr" :style="row.$style">
79
79
  <td v-if="model.isMulti" class="ct-td tdFiexd left-fixation checkbox-td" :class="[model.tdClass,rowindex === model.selectIndex ? 'select' : null,]"
80
80
  align="center">
@@ -252,7 +252,7 @@ export default {
252
252
  screenTop: {
253
253
  Number,
254
254
  default: 0,
255
- },
255
+ },
256
256
  },
257
257
  computed: {},
258
258
  data() {
@@ -290,7 +290,6 @@ export default {
290
290
  disabledStats:false,
291
291
  searchStrat:0,
292
292
  searchEnd:0,
293
-
294
293
  visible:false,
295
294
  theadTitleShow:false,
296
295
  theadTitleTop:0,
@@ -20,9 +20,10 @@
20
20
  @click="handleClick($event, item,true)"
21
21
  >
22
22
  <ul class="btnTab">
23
+ <div :style="{'width':(item.width ? item.width + 'px' : '' )}">
23
24
  <li
24
25
  :class="[
25
- selectStats == item.fieldName1 + '*' + item.code1
26
+ selectStats ==item.fieldName1 + '*' + item.code1
26
27
  ? 'activecolor'
27
28
  : '',
28
29
  ]"
@@ -38,6 +39,7 @@
38
39
  ]"
39
40
  ></span>
40
41
  </li>
42
+ </div>
41
43
  </ul>
42
44
  </div>
43
45
  </template>
@@ -46,7 +48,8 @@
46
48
  v-for="(item, index) in showData[0]"
47
49
  @click="handleClick($event, item,true)"
48
50
  >
49
- <ul class="btnTab" :style="{'width':(index == showData[0].length-1 ? lastWidth + 'px' : '' ),'white-space':(index == showData[0].length-1 ? 'nowrap' : '' )}">
51
+ <ul class="btnTab" :style="{'width':(index == showData[0].length-1 ? lastWidth + 'px' : '' ),}">
52
+ <div :style="{'width':(item.width ? item.width + 'px' : '' ),'white-space': 'nowrap' }">
50
53
  <li
51
54
  :class="[
52
55
  selectStats ==item.fieldName1 + '*' + item.code1
@@ -65,6 +68,7 @@
65
68
  ]"
66
69
  ></span>
67
70
  </li>
71
+ </div>
68
72
  </ul>
69
73
  </div>
70
74
  <el-popover
@@ -142,6 +146,8 @@ export default {
142
146
  showData: [],
143
147
  lastWidth:0,
144
148
  sortData: null,
149
+ sliceIndex: null,
150
+ flagClick: false,
145
151
  option: {
146
152
  isHidden: true, //是否开启操作栏隐藏设置,默认开启
147
153
  showNum: 3, //如果isHidden为true时,个数大于3就会隐藏,默认是3
@@ -166,34 +172,36 @@ export default {
166
172
  var self = this;
167
173
  self.model = data;
168
174
  self.FlagStatistics = false;
169
- self.data = data.source.content;
175
+ // self.data = data.source.content;
170
176
  self.selectVa = "";
171
- if (self.data.length > 0) {
177
+ if (data.source.content.length > 0) {
172
178
  if (self.sortData == null) {
173
179
  self.sortData = {};
174
- self.data.forEach((item, index) => {
180
+ data.source.content.forEach((item, index) => {
175
181
  self.sortData[item.fieldName1 + "*" + item.code1] = index;
176
182
  item.sort = index;
177
183
  });
178
184
  }
179
185
  else {
180
- self.data.forEach((item, index) => {
186
+ data.source.content.forEach((item, index) => {
181
187
  item.sort = self.sortData[item.fieldName1 + "*" + item.code1];
182
188
  });
183
189
  }
184
- self.data.sort(function (a, b) {
190
+ data.source.content.sort(function (a, b) {
185
191
  if (a.sort > b.sort) {
186
192
  return 1; // 交换顺序
187
193
  } else {
188
194
  return -1; // 顺序不变
189
195
  }
190
196
  });
197
+ self.data = data.source.content;
191
198
  let i = self.data.findIndex(
192
199
  (v) => self.selectStats === v.fieldName1 + "*" + v.code1
193
200
  );
194
201
  if (i == -1 || self.selectStats == []) {
195
202
  self.handleClick(null, self.data[0], false);
196
203
  }
204
+
197
205
  self.FlagStatistics = true;
198
206
  self.showStats();
199
207
  }
@@ -205,11 +213,21 @@ export default {
205
213
  var showIndex = 0;
206
214
  var sumWidth = 0;
207
215
  for (var i = 0; i < self.data.length; i++) {
216
+ self.data[i].width= self.$refs["StatisticsItem" + i][0].getBoundingClientRect().width-36;
217
+ }
218
+
219
+ if(self.flagClick&&self.sliceIndex!==null)
220
+ {
221
+ showIndex= self.sliceIndex;
222
+ }
223
+ else
224
+ {
225
+ for (var i = 0; i < self.data.length; i++) {
208
226
  var moreWidth = 20;
209
227
  // sumWidth =
210
228
  // sumWidth + self.$refs["StatisticsItem" + i][0].offsetWidth;
211
229
  sumWidth += self.$refs["StatisticsItem" + i][0].getBoundingClientRect().width;
212
- sumWidth = Math.ceil(sumWidth * 100) / 100;
230
+ sumWidth = Math.ceil(sumWidth * 100) / 100 ;
213
231
  var nextWidth = 0;
214
232
  if (i + 1 < self.data.length) {
215
233
  try {
@@ -228,7 +246,9 @@ export default {
228
246
  break;
229
247
  }
230
248
  }
249
+ }
231
250
  if (showIndex > 0) {
251
+ self.sliceIndex=showIndex;
232
252
  const ExceptShowIndexWidth = self.$refs["StatisticsItem"+(showIndex)][0].offsetLeft;
233
253
  const preShowIndexWidth =self.$refs["StatisticsItem" + (showIndex-1)][0].getBoundingClientRect().width;
234
254
  self.lastWidth=self.showWidth-ExceptShowIndexWidth + preShowIndexWidth -20;
@@ -246,6 +266,7 @@ export default {
246
266
  },
247
267
  handleClick(ev, obj, flagRefreshTable,type,index) {
248
268
  var self = this;
269
+ self.flagClick=true;
249
270
  self.selectStats = obj.fieldName1 + "*" + obj.code1 ;
250
271
  var fields = self.model.searchData(
251
272
  obj.fieldName1,
@@ -283,6 +304,7 @@ export default {
283
304
  },
284
305
  watch: {
285
306
  showWidth: function (newVal, oldVal) {
307
+ this.flagClick = false;
286
308
  this.showStats();
287
309
  },
288
310
  },
@@ -309,6 +331,7 @@ export default {
309
331
  cursor: pointer;
310
332
  float: left;
311
333
  list-style-type: none;
334
+ white-space: nowrap;
312
335
  }
313
336
 
314
337
  .tab-list .btnTab:hover,
@@ -349,6 +372,7 @@ export default {
349
372
  float: left;
350
373
  list-style-type: none;
351
374
  padding: 0px 20px 0px 20px;
375
+ white-space: nowrap;
352
376
  }
353
377
 
354
378
  .tab-list .tdcenter {