centaline-data-driven 1.3.37 → 1.3.40

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.37",
3
+ "version": "1.3.40",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/src/Form.vue CHANGED
@@ -2,8 +2,8 @@
2
2
  <div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
3
3
  <!-- <ct-form :api="'/PropertyRET/getLayoutOfNew'" :apiParam="apiParam"></ct-form> -->
4
4
  <!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
5
- <ct-form :api="'/commissionmanage/apply'" :apiParam="apiParam"></ct-form>
6
- <!--<ct-form :api="'api/Form/formdata'"></ct-form>-->
5
+ <ct-form :api="'/api/third-dept-tran/tran-comm-adjust/create'" :apiParam="apiParam" :topHeight="topHeight"></ct-form>
6
+ <!-- <ct-form :api="'/api/third-dept-tran/transaction/detail'" :apiParam="apiParam"></ct-form> -->
7
7
  <ct-dialog-list></ct-dialog-list>
8
8
  </div>
9
9
  </template>
@@ -14,8 +14,13 @@
14
14
  data() {
15
15
  return {
16
16
  apiParam:{
17
-
18
- }
17
+ actionType: 2,
18
+ commAdjustCategory: "CC01020020",
19
+ originalTraId: "1552533586416844802",
20
+ pageOnly: true,
21
+ pageStyle: 2,
22
+ },
23
+ topHeight:10,
19
24
  }
20
25
  },
21
26
  activated(){
@@ -8,8 +8,8 @@
8
8
  :searchCategoryApi="'/ProfileWorklistList/getLayoutOfSearchCategory'"
9
9
  :searchDataApi="'/ProfileWorklistList/getListOfSearchModel'" :apiParam="para"></ct-searchlist> -->
10
10
 
11
- <ct-searchlist :searchConditionApi="'/PropertyContactImportList/getLayoutOfSearch'"
12
- :searchDataApi="'/PropertyContactImportList/getListOfSearchModel'">
11
+ <ct-searchlist :searchConditionApi="'/api/third-dept-tran/tran-list/layout'"
12
+ :searchDataApi="'/api/third-dept-tran/tran-list'">
13
13
  </ct-searchlist>
14
14
 
15
15
  <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
@@ -146,13 +146,14 @@
146
146
  mySelf.close();
147
147
  }
148
148
  }
149
-
149
+ //此行代码是为了防止弹出的窗口高度 大于父级页面的高度
150
+ //暂时注释 高度由接口控制
150
151
  var ph=0;
151
152
  if(item.attrs.height){
152
153
  ph=parseInt(item.attrs.height.replace('px',''));
153
154
  }
154
155
  if(self.vmodel.pane && self.vmodel.pane.$el && self.vmodel.pane.$el.clientHeight<ph){
155
- item.attrs.height=(self.vmodel.pane.$el.clientHeight-40)+'px';
156
+ item.attrs.height=(self.vmodel.pane.$el.clientHeight-60)+'px';
156
157
  }
157
158
 
158
159
  return h('div', {
@@ -170,6 +171,8 @@
170
171
  ]);
171
172
  }
172
173
  else {
174
+ //此行代码是为了防止弹出的窗口高度 大于父级页面的高度
175
+ //暂时注释 高度由接口控制
173
176
  var ph=0;
174
177
  if(item.attrs.height){
175
178
  ph=parseInt(item.attrs.height.replace('px',''));
@@ -9,7 +9,7 @@
9
9
  <div class="contacts-tips" v-else>
10
10
  <component class="el-button el-button--primary el-button--mini max-btn-add"
11
11
  v-if="model && model.buttons!==null && model.buttons.length>0"
12
- v-for="(col, index) in model.buttons" :key="index"
12
+ v-for="(col, index) in model.buttons.filter((v, i) => {return v.show==true})" :key="col.key"
13
13
  :is="col.is" :vmodel="col"
14
14
  @click="fieldClickHandler(col,$event)"></component>
15
15
  </div>
@@ -889,8 +889,29 @@ export default {
889
889
  // if (typeof field.onClick !== 'undefined') {
890
890
  // verified = self.$common.excute.call(self.model.scripts, field.onClick);
891
891
  // }
892
-
893
- if (field.isOpenForm) {
892
+ if (field.isBrowseAttachment) {//浏览附件
893
+ var MediaAlbum = [
894
+ { albumName: self.model.title || "媒体", medias: [] },
895
+ ];
896
+ if (field.action) {
897
+ var callback = function (data) {
898
+ MediaAlbum[0].medias = data;
899
+ self.$common.viewerfile(field, MediaAlbum, 0, 0);
900
+ }
901
+ var vsubmitData = {
902
+ ...field.getActionPara(submitData).para,
903
+ ...submitData
904
+ };
905
+ self.model.getAction(field.action, vsubmitData, callback);
906
+ }
907
+ else {
908
+ submitData.mediaData.forEach((v) => {
909
+ MediaAlbum[0].medias.push(v);
910
+ });
911
+ self.$common.viewerfile(field, MediaAlbum, 0, 0);
912
+ }
913
+ }
914
+ else if (field.isOpenForm) {
894
915
  var dialogOption = {
895
916
  title: field.pageTitle,
896
917
  pane: self.$common.getParentPane(self),
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div v-loading="loading" :style="{width:pageWidth?pageWidth+'px':'100%',margin:'auto'}">
2
+ <div v-loading="loading" :style="{width:pageWidth?pageWidth+'px':'100%',margin:'auto','min-height': minHeight}">
3
3
  <div v-if="model !== null && !loading" class="ct-form" :class="{'domDisabled':model.pageDisabled}" :key="formKey">
4
4
  <!--可根据场景判断显示el-card还是el-main-->
5
5
  <component :is="model.showTitle?'el-main':'el-card'">
@@ -98,6 +98,10 @@
98
98
  apiParam: Object,
99
99
  parentModel: Object,
100
100
  pageWidth: Number,
101
+ topHeight: {
102
+ type: Number,
103
+ default: -1
104
+ },
101
105
  showTitle: {
102
106
  type: Boolean,
103
107
  default: false
@@ -112,11 +116,15 @@
112
116
  collapse: [],//分组数组
113
117
  collapseActiveNames: [],//默认展开的分组name
114
118
  collapseFieldsRow: [],//分组数组对应的行列布局
115
- independentItem: []//最后一个独立分组的行列布局
119
+ independentItem: [],//最后一个独立分组的行列布局
120
+ minHeight:'auto'
116
121
  };
117
122
  },
118
123
  mounted() {
119
124
  this.init();
125
+ if(this.topHeight>-1){
126
+ this.minHeight=(document.documentElement.clientHeight-this.topHeight-20)+'px';
127
+ }
120
128
  },
121
129
  updated(){
122
130
  if(this.$el.parentElement.scrollHeight>this.$el.parentElement.clientHeight
@@ -25,7 +25,7 @@
25
25
  <template slot-scope="scope">
26
26
  <span v-if="scope.row.isSet">
27
27
  <component ref="Fields" :is="model.currentRow.data[v.id].locked || model.currentRow.data[v.id].is!==v.is?model.currentRow.data[v.id].is:v.is"
28
- :vmodel="model.currentRow.data[v.id]" :api="model.OptApi"
28
+ :vmodel="model.currentRow.data[v.id]" :api="model.OptApi" :key="model.currentRow.data[v.id].rowKey"
29
29
  @change="changeHandler(model.currentRow.data[v.id], model.currentRow.data.$sourceIndex)"
30
30
  @input="inputHandler(model.currentRow.data[v.id], model.currentRow.data.$sourceIndex)"></component>
31
31
  </span>
@@ -38,7 +38,7 @@
38
38
  <ct-tablecurrency :router="v.router" :colValue="scope.row[v.id].code1" :rowData="scope.row" @click="rolRouterClickHandler">
39
39
  </ct-tablecurrency>
40
40
  </span>
41
- <ct-span v-else :vmodel="scope.row[v.id]" :rowNum="scope.row.$sourceIndex" ref="FieldsLabel"></ct-span>
41
+ <ct-span v-else :vmodel="scope.row[v.id]" :rowNum="scope.row.$sourceIndex" :key="scope.row[v.id].rowKey" ref="FieldsLabel"></ct-span>
42
42
  </template>
43
43
  </el-table-column>
44
44
 
@@ -103,7 +103,7 @@
103
103
  return {
104
104
  model: null,
105
105
  foucus: false,
106
- itemKey: Math.random()
106
+ itemKey: Math.random(),
107
107
  }
108
108
  },
109
109
  created() {
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div class="field-top">
3
3
  <div style="width:100%;display:flex;">
4
- <div style="flex:1;" v-if="model !== null" class="ct-inputNumber" :class="[model.attrs.size?'ct-font-size-'+model.attrs.size:'',model.lock ? 'ct-inputNumber-lock' : ''
5
- ]" @mouseover="mouseOverHandle" @mouseout="mouseOutHandle">
4
+ <div style="flex:1;" v-if="model !== null" class="ct-inputNumber" :class="[model.attrs.size?'ct-font-size-'+model.attrs.size:'',model.lock ? 'ct-inputNumber-lock' : '']"
5
+ @mouseover="mouseOverHandle" @mouseout="mouseOutHandle">
6
6
  <div class="ct-flex-div" :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'']">
7
7
  <div v-if="model.showLabel && model.label" class="el-input-group__prepend field-label-div" :class="[model.labelClass]">
8
8
  {{model.label}}
@@ -23,7 +23,9 @@
23
23
  </span>
24
24
  </span>
25
25
  <label v-else class="ct-lable" :class="{ isWidth: model.labelValue.length > 30 }">
26
+ <el-tooltip :content="model.labelValue" placement="top" effect="light">
26
27
  <span :class="{ isEllipsis: model.labelValue.length > 30 }"> {{ model.labelValue }}</span>
28
+ </el-tooltip>
27
29
  </label>
28
30
  <span slot="suffix" v-if="model.unitName" class="ct-unitnameLable">{{model.unitName}}</span>
29
31
  <span v-if="model.sufLabel" style="width:auto" class="spanMessage">{{model.sufLabel}}</span>
@@ -14,7 +14,7 @@
14
14
 
15
15
  <ct-searchtable ref="table" :api="searchDataApi" :searchStatsApi="searchStatsApi" :from="from" @loaded="tableLoaded"
16
16
  @toolbarClick="toolbarClickHandler" @refreshParent="refreshParentHandler" :key="reloadKeyTable" @searchComplate="searchComplate"
17
- @rowClickHandle="rowClickHandle" @scrollHandle="scrollHandle" @refreshRowHandle="refreshRowHandle"
17
+ @rowClickHandle="rowClickHandle" @scrollHandle="scrollHandle" @refreshRowHandle="refreshRowHandle" @doClosePopoverHandle="doClosePopoverHandle"
18
18
  @showTitle="showTitleHandler"></ct-searchtable>
19
19
  </div>
20
20
  <div ref="sidebar" v-if="flagSideBar && flagSideBarOfData"
@@ -284,6 +284,9 @@
284
284
  scrollHandle(scrollTop,scrollLeft){
285
285
  this.$emit('scrollHandle',scrollTop,scrollLeft)
286
286
  },
287
+ doClosePopoverHandle(){
288
+ this.$refs.screen.$refs.doClosePopover.click();
289
+ },
287
290
  }
288
291
  }
289
292
  </script>
@@ -21,8 +21,8 @@
21
21
  </el-popover>
22
22
  </div>
23
23
  <div v-if="isLoading" v-loading="isLoading" style="min-height:100px">
24
-
25
24
  </div>
25
+ <div ref="doClosePopover"></div>
26
26
  </div>
27
27
  </template>
28
28
  <script>
@@ -73,11 +73,10 @@
73
73
  case 'showHigh':
74
74
  this.$set(this, 'highScreen', !this.highScreen);
75
75
  //高级搜索需要切换icon样式
76
- if(model.icon==='max-open')
77
- {
76
+ if(model.icon==='max-open'){
78
77
  model.icon='max-fold'
79
- }else
80
- {
78
+ }
79
+ else{
81
80
  model.icon='max-open'
82
81
  }
83
82
  break;
@@ -294,20 +294,19 @@ export default {
294
294
  self.$forceUpdate();
295
295
  self.$nextTick(() => {
296
296
  if (!self.isLayout) {
297
- if (
298
- self.$refs.tableParent.scrollHeight <=
299
- self.$refs.tableParent.offsetHeight
300
- ) {
297
+ if ( self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
301
298
  self.tableLoading = true;
302
299
  self.model.nextPage(next);
303
- } else {
300
+ }
301
+ else {
304
302
  self.tableLoading = false;
305
303
  self.rowColorChange();
306
304
  self.calculatingRowHeight();
307
305
  }
308
306
  }
309
307
  });
310
- } else {
308
+ }
309
+ else {
311
310
  self.tableLoading = false;
312
311
  }
313
312
  };
@@ -403,13 +402,11 @@ export default {
403
402
  if (rtn) {
404
403
  self.$forceUpdate();
405
404
  self.$nextTick(() => {
406
- if (
407
- self.$refs.tableParent.scrollHeight <=
408
- self.$refs.tableParent.offsetHeight
409
- ) {
405
+ if ( self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
410
406
  self.tableLoading = true;
411
407
  self.model.nextPage(next);
412
- } else {
408
+ }
409
+ else {
413
410
  self.tableLoading = false;
414
411
  self.rowColorChange();
415
412
  self.resetScroll();
@@ -418,7 +415,8 @@ export default {
418
415
  }
419
416
  self.setfixedSize();
420
417
  });
421
- } else {
418
+ }
419
+ else {
422
420
  self.tableLoading = false;
423
421
  self.rowColorChange();
424
422
  }
@@ -584,34 +582,24 @@ export default {
584
582
  setTableHeight() {
585
583
  var self = this;
586
584
  this.$nextTick(() => {
587
- if (
588
- this.$refs.searchTable &&
589
- this.$refs.toolbar &&
590
- this.$refs.searchTable.parentElement &&
591
- !self.isLayout
592
- ) {
585
+ if ( this.$refs.searchTable && this.$refs.toolbar &&
586
+ this.$refs.searchTable.parentElement && !self.isLayout) {
593
587
  var h1 = this.$refs.searchTable.parentElement.offsetHeight | 0;
594
588
  var h2 = this.$refs.searchTable.offsetTop | 0;
595
589
  var h3 = this.$refs.toolbar.$el.offsetHeight | 0;
596
590
  var h4 = this.$refs.footer.$el.offsetHeight | 0;
597
591
  var h5 = this.$refs.listHeader.$el.offsetHeight | 0;
598
592
  var h6 = this.$refs.listFooter.$el.offsetHeight | 0;
599
- var h7 = this.$refs.tableStats
600
- ? (this.$refs.tableStats.$el.offsetHeight + 7) | 0
601
- : 0;
593
+ var h7 = this.$refs.tableStats ? (this.$refs.tableStats.$el.offsetHeight + 7) | 0 : 0;
602
594
  let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - h7 - 22;
603
595
  this.model.tableHeight = tableHeight < 40 ? 350 : tableHeight;
604
596
  this.$nextTick(() => {
605
597
  self.getScrollAttr();
606
598
  });
607
- } else {
608
- if (
609
- this.$parent.$parent.$vnode.componentOptions.tag ===
610
- "ct-PropertySimpleDetailRET"
611
- ) {
612
- var h1 =
613
- this.$parent.$parent.$parent.$parent.$refs.sidebar.offsetHeight |
614
- 0;
599
+ }
600
+ else {
601
+ if (this.$parent.$parent.$vnode.componentOptions.tag === "ct-PropertySimpleDetailRET") {
602
+ var h1 = this.$parent.$parent.$parent.$parent.$refs.sidebar.offsetHeight | 0;
615
603
  var h2 = 0;
616
604
  if (this.$parent.$parent.$refs.contact) {
617
605
  h2 = this.$parent.$parent.$refs.contact.offsetHeight | 0;
@@ -825,10 +813,12 @@ export default {
825
813
  if (field.pageStyle) {
826
814
  submitData.pageStyle = field.pageStyle;
827
815
  }
816
+ self.$emit('doClosePopoverHandle');
828
817
  self.$common.getDataDrivenOpts().handler.openTab(action,submitData,field.pageTitle,self.model,field.dialogWidth);
829
818
  }
830
819
  else if (field.isSearchPageInTab) {// 外部框架tab页打开
831
820
  submitData = field.getActionPara(submitData).para;
821
+ self.$emit('doClosePopoverHandle');
832
822
  self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
833
823
  }
834
824
  else if (field.isBrowserNewTab) {// 浏览器打开
@@ -993,13 +983,11 @@ export default {
993
983
  }
994
984
  self.$forceUpdate();
995
985
  self.$nextTick(() => {
996
- if (
997
- self.$refs.tableParent.scrollHeight <=
998
- self.$refs.tableParent.offsetHeight
999
- ) {
986
+ if ( self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
1000
987
  self.tableLoading = true;
1001
988
  self.model.nextPage(next);
1002
- } else {
989
+ }
990
+ else {
1003
991
  self.tableLoading = false;
1004
992
  self.rowColorChange();
1005
993
  self.resetScroll();
@@ -1372,10 +1360,7 @@ export default {
1372
1360
  closeCallTel(VueCom) {
1373
1361
  var self = this;
1374
1362
  if (self.model.currentCallTelrouter) {
1375
- if (
1376
- typeof VueCom.$refs[self.model.currentCallTelrouter] !== "undefined"
1377
- ) {
1378
- console.log(VueCom);
1363
+ if ( typeof VueCom.$refs[self.model.currentCallTelrouter] !== "undefined") {
1379
1364
  VueCom.closeCallTel();
1380
1365
  return true;
1381
1366
  }