centaline-data-driven 1.3.86 → 1.3.88

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.86",
3
+ "version": "1.3.88",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -5,4 +5,7 @@
5
5
  .ccai.button-absolute{
6
6
  bottom: 26px;
7
7
  width: calc(100% - 47px);
8
+ }
9
+ .ccai.ct-tags .ct-tags-mini{
10
+ font-size: 12px !important;
8
11
  }
@@ -728,7 +728,7 @@
728
728
  return;
729
729
  }
730
730
  if(router.id.indexOf('_')===0){
731
- // flagSearchlist=true;
731
+ flagSearchlist=true;
732
732
  }
733
733
 
734
734
  submitData = router.getActionPara(submitData).para;
@@ -747,6 +747,7 @@
747
747
  height: (router.dialogHeight || 500) + 'px',
748
748
  documentHeight:self.documentHeight,
749
749
  documentWidth:self.documentWidth,
750
+ flagPopupSearchlist:flagSearchlist,
750
751
  },
751
752
  on: {
752
753
  submit(option) {
@@ -13,10 +13,10 @@
13
13
  @showTitle="showTitleScreenHandler"></ct-searchscreen>
14
14
 
15
15
  <ct-searchtable ref="table" :api="searchDataApi" :searchStatsApi="searchStatsApi" :from="from" :isIframe="isIframe" :documentHeight="documentHeight"
16
- @loaded="tableLoaded" :documentWidth="documentWidth"
16
+ @loaded="tableLoaded" :documentWidth="documentWidth" :flagPopupSearchlist="flagPopupSearchlist"
17
17
  @toolbarClick="toolbarClickHandler" @refreshParent="refreshParentHandler" :key="reloadKeyTable" @searchComplate="searchComplate"
18
18
  @rowClickHandle="rowClickHandle" @scrollHandle="scrollHandle" @refreshRowHandle="refreshRowHandle" @doClosePopoverHandle="doClosePopoverHandle"
19
- @showTitle="showTitleHandler"></ct-searchtable>
19
+ @showTitle="showTitleHandler" @popupClickHandler="popupClickHandler"></ct-searchtable>
20
20
  </div>
21
21
  <div ref="sidebar" v-if="flagSideBar && flagSideBarOfData"
22
22
  :style="{'height': pageHeight? pageHeight:'100%','width':sideBarWidth+'px',right:sideBarRight+'px'}"
@@ -71,6 +71,10 @@
71
71
  String,
72
72
  default: 'auto',
73
73
  },
74
+ flagPopupSearchlist:{
75
+ Boolean,
76
+ default:false,
77
+ },
74
78
  },
75
79
  created() {
76
80
  this.model = this.vmodel;
@@ -307,6 +311,10 @@
307
311
  doClosePopoverHandle(){
308
312
  this.$refs.screen.$refs.doClosePopover.click();
309
313
  },
314
+ popupClickHandler(tempListData){
315
+ this.$emit('submit', tempListData);
316
+ this.$common.closeDialog(this);
317
+ },
310
318
  },
311
319
  beforeDestroy() {
312
320
  async function destroyDeep(vnode) {
@@ -151,7 +151,10 @@
151
151
  </div>
152
152
 
153
153
  <ct-tabletip ref="listFooter" class="ct-search-table-list-footer" :tip="model.listFooter" v-if="!isLoading && !isLayout && model"></ct-tabletip>
154
- <ct-tabletip ref="footer" class="ct-search-table-footer" :tip="model.footer" v-if="!isLoading && !isLayout && model"></ct-tabletip>
154
+ <ct-tabletip ref="footer" class="ct-search-table-footer" :tip="model.footer" v-if="!isLoading && !isLayout && model"></ct-tabletip>
155
+ <div ref="popupButton" v-if="flagPopupSearchlist" style="margin-top: 10px;width: 100%;display: inline-block;height: 30px;margin-bottom: 10px;">
156
+ <el-button size="mini" @click="popupClickHandler()" class="max-search-btn" style="float:right;" type="primary">确认</el-button>
157
+ </div>
155
158
  <div v-if="isLoading && searchLoading" v-loading="isLoading" style="top: 30px"></div>
156
159
  </div>
157
160
  </template>
@@ -194,6 +197,10 @@
194
197
  String,
195
198
  default: 'auto',
196
199
  },
200
+ flagPopupSearchlist:{
201
+ Boolean,
202
+ default:false,
203
+ },
197
204
  },
198
205
  computed: {},
199
206
  data() {
@@ -595,7 +602,8 @@
595
602
  var h5 = this.$refs.listHeader.$el.offsetHeight | 0;
596
603
  var h6 = this.$refs.listFooter.$el.offsetHeight | 0;
597
604
  var h7 = this.$refs.tableStats ? (this.$refs.tableStats.$el.offsetHeight + 7) | 0 : 0;
598
- let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - h7 - 22;
605
+ var h8 = this.$refs.popupButton?this.$refs.popupButton.offsetHeight+21 : 0;
606
+ let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - h7 -h8 - 22;
599
607
  this.model.tableHeight = tableHeight < 40 ? 350 : tableHeight;
600
608
  this.$nextTick(() => {
601
609
  self.getScrollAttr();
@@ -864,7 +872,7 @@
864
872
  self.$common.viewerfile(field, MediaAlbum, 0, 0);
865
873
  }
866
874
  }
867
- else if (field.isUrlInLayer) {//URL页面(弹层)
875
+ else if (field.isUrlInLayer) {//URL页面(弹层iframe)
868
876
  var dialogOption = {
869
877
  title: field.pageTitle,
870
878
  pane: self.$common.getParentPane(self),
@@ -1567,6 +1575,15 @@
1567
1575
  self.updateCurrentRow(field, data);
1568
1576
  }
1569
1577
  },
1578
+ popupClickHandler() {
1579
+ var tempListData = this.model.getSelectRowData({isMulti:this.model.isMulti});
1580
+ if (tempListData != null && tempListData.length>0) {
1581
+ this.$emit('popupClickHandler', tempListData);
1582
+ }
1583
+ else {
1584
+ this.$message.error("请先选择数据");
1585
+ }
1586
+ },
1570
1587
  },
1571
1588
  };
1572
1589
  </script>
@@ -113,7 +113,14 @@
113
113
  var self = this;
114
114
  self.showDrop=false;
115
115
  self.$emit('popupSearchList', false, self.model, self.model.moreActionRouter, (optionArr) => {
116
- self.selectOptionArr(optionArr);
116
+ optionArr.forEach(row => {
117
+ if(self.model.type===3){
118
+ self.model.value=self.model.value+row[self.model.optionAttrs.label];
119
+ }
120
+ else {
121
+ self.model.value=row[self.model.optionAttrs.label];
122
+ }
123
+ });
117
124
  });
118
125
  },
119
126
  },
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="field-top">
3
- <div class="ct-tags" style="width:100%;display:flex">
3
+ <div class="ccai ct-tags" style="width:100%;display:flex">
4
4
  <div style="flex:1;display:flex;margin-right: 5px;" :class="[(focus || showDrop)?'isfocus':'',model.attrs.size?'ct-tags-'+model.attrs.size:''
5
5
  ]" @mouseover="mouseOverHandle" @mouseout="mouseOutHandle">
6
6
  <div style="flex:1;position: relative;" :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'']">
@@ -22,7 +22,7 @@ export default {
22
22
  searchConditionApi: String,
23
23
  searchDataApi: String,
24
24
  flagsearch: Boolean,
25
- searchtreeHeight: String,
25
+ searchtreeHeight: Number,
26
26
  screenPara: {
27
27
  type: Object,
28
28
  default: () => { }
@@ -388,6 +388,9 @@ export default {
388
388
  //filterText(val) {
389
389
  // this.$refs.trees.filter(val);
390
390
  //}
391
+ searchtreeHeight: function (val) {
392
+ this.setTreeHeight();
393
+ }
391
394
  },
392
395
  created() {
393
396
  this.model = this.vmodel;
@@ -43,7 +43,7 @@ export default {
43
43
  vmodel: Object,
44
44
  searchConditionApi: String,
45
45
  searchDataApi: String,
46
- leftWidth: Number,
46
+ leftWidth: String,
47
47
  },
48
48
  data() {
49
49
  return {
@@ -91,10 +91,16 @@ export default {
91
91
  },
92
92
  created() {
93
93
  this.model = this.vmodel;
94
- this.$nextTick(() => {
95
- this.searchtreeHeight = this.$refs.tree_left.$el.offsetHeight;
94
+ },
95
+ mounted() {
96
+ let self = this;
97
+ window.addEventListener('resize', function () {
98
+ self.$nextTick(() => {
99
+ self.searchtreeHeight = self.$refs.tree_left.$el.offsetHeight;
100
+ })
96
101
  })
97
- }
102
+ self.searchtreeHeight = self.$refs.tree_left.$el.offsetHeight;
103
+ },
98
104
  }
99
105
 
100
106
  </script>
@@ -69,7 +69,7 @@ const FormList = function (source, master) {
69
69
  },
70
70
  getFormObj() {
71
71
  let rtnFormArr = [];
72
-
72
+ debugger
73
73
  for (let i = 1; i < rtn.rows.length; i++) {
74
74
  let rtnFormObj = {};
75
75
  rtn.rows[i].field.forEach((s) => {
@@ -464,8 +464,10 @@ const FormList = function (source, master) {
464
464
  deleteAll() {
465
465
  if(rtn._rows && rtn._rows.length>1){
466
466
  let index=0;
467
+ //如果是接口返回的数据需要保留,并且标识成删除
467
468
  var newRows=[]
468
469
  rtn._rows.forEach((r) => {
470
+ //排除表头数据
469
471
  if(index>0){
470
472
  if (!r.isNewFlag) {
471
473
  r.deleted = true;
@@ -476,9 +478,15 @@ const FormList = function (source, master) {
476
478
  index++;
477
479
  }
478
480
  });
481
+ //清空列表数据需要保留表头数据
479
482
  rtn._tableData.splice(0,rtn._tableData.length);
480
- source.rows.splice(1, source.rows.length-1,newRows);
481
- rtn._rows.splice(1, rtn._rows.length-1,newRows);
483
+ source.rows.splice(1, source.rows.length-1);
484
+ rtn._rows.splice(1, rtn._rows.length-1);
485
+ if(newRows.length>0)
486
+ {
487
+ source.rows.push(newRows);
488
+ rtn._rows.push(newRows);
489
+ }
482
490
  }
483
491
  },
484
492
  insertRow(rows) {
@@ -265,10 +265,12 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
265
265
  return ro.$select === true;
266
266
  });
267
267
  return rtnData;
268
- } else {
268
+ }
269
+ else {
269
270
  return [rtn.listData[rtn.selectIndex]];
270
271
  }
271
- } else {
272
+ }
273
+ else {
272
274
  return [rtn.listData[rtn.selectIndex]];
273
275
  }
274
276
  },
@@ -3,6 +3,15 @@ import Base from './Base';
3
3
  import valid from '../../../validate/index';
4
4
  const T = function (source, inputType, readonly, isPassword,moreActionRouter) {
5
5
  var rtn = {
6
+ optionAttrs: {
7
+ rowid: 'rowID',
8
+ value: 'code',
9
+ label: 'name',
10
+ displayLabel:'displayName',
11
+ actionType: 'actionType',
12
+ flagDeleted: 'flagDeleted',
13
+ locked: 'locked'
14
+ },
6
15
  get clearable() {
7
16
  if (typeof source.clear === 'undefined'&&!readonly&&!source.locked) {
8
17
  return true;
package/src/main.js CHANGED
@@ -43,7 +43,7 @@ Vue.use(centaline, {
43
43
  getRequestHeaders: function () {
44
44
  return {
45
45
  oldToken: '42ccd644-040d-4e01-9521-1623f1884058',
46
- token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjEOwjAMRe_iuZZw7DhJN0jLwiGqBKVSmRBtJRDi7oBot-684Q1v-f8J45yhBreAG1rpwgJuaKUjkuBIW9wHF1FUGD1Fj1E0yrFpOR4aqKDcr1CTqjIFY7iCIU2_YNj4b5jHcjuVxz_OXabhM2u0BD7vGHtyFqVYxkS9wZzIphQKZZ_g9QYAAP__.NJkufTqRBO1yCwbzBg7qYMLBnQZr-gS8CQwQ_y5vf3k',
46
+ token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjrEOgkAQRP9lazZh7_b27uj0wMaPIEs8EqyMQKIx_rsYoaP3FZPMa2ZeMM4dVOBXcCc22riCO7HREnH0JA0eok_IwhYDpYCJJfGpbmw61lBAftygIhHh0lG0BQw6_YSl4L9iHvP9nJ__OHedhmWWXci9CqNxJiOrCaidWarPpFEu2pcM7w8AAAD__w.JeIxQIdxvfdXeznKFoGbBpDvbEZYK_5QcpXp3XNAG4c',
47
47
 
48
48
  originalRequestURL: 'http://10.88.22.67:8080',
49
49
  EstateInfo: '{"estateId":"FAF029E8-EC28-4297-83CF-B8FFD826DB91","estateName":"AABBCC"}',