centaline-data-driven 1.3.37 → 1.3.38

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.38",
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/transaction/detail'" :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,9 @@
14
14
  data() {
15
15
  return {
16
16
  apiParam:{
17
-
18
- }
17
+ originalTraId: "1552573734835798018", actionType: 3, pageStyle: 2, pageTitle: "成交报告", pageOnly: true
18
+ },
19
+ topHeight:10,
19
20
  }
20
21
  },
21
22
  activated(){
@@ -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',''));
@@ -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>
@@ -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}}
@@ -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;
@@ -993,13 +981,11 @@ export default {
993
981
  }
994
982
  self.$forceUpdate();
995
983
  self.$nextTick(() => {
996
- if (
997
- self.$refs.tableParent.scrollHeight <=
998
- self.$refs.tableParent.offsetHeight
999
- ) {
984
+ if ( self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
1000
985
  self.tableLoading = true;
1001
986
  self.model.nextPage(next);
1002
- } else {
987
+ }
988
+ else {
1003
989
  self.tableLoading = false;
1004
990
  self.rowColorChange();
1005
991
  self.resetScroll();
@@ -349,7 +349,7 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
349
349
  rowNum = rowNum !== null ? rowNum : data.listData.currentRowIndex;
350
350
 
351
351
  //若该行正在编辑,则取编辑状态的。
352
- if (data && data.listData && data.listData.currentRow.data && data.listData.currentRow.data[fiedlId]
352
+ if (data && data.listData && data.listData.currentRow.data && data.listData.currentRow.data[fiedlId] && rowNum>-1
353
353
  && data.listData.currentRow.data.$sourceIndex === data.listData.source.rows[rowNum].$sourceIndex && data.listData.currentRow.isSet) {
354
354
  if(fiedlId=='deleted' || fiedlId=='flagDeleted'){
355
355
  return data.listData.currentRow.data.deleted || false;
@@ -392,14 +392,15 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
392
392
  if (data) {
393
393
  if (data.field) {
394
394
  data.field.source[attrName] = value;
395
- data.listData.updateListField(data.listData.$self.$refs.FieldsLabel, rowNum, fiedlId);
395
+ data.listData.updateListField(data.listData.$self.$refs.FieldsLabel, data.listData.source.rows[rowNum].$sourceIndex, fiedlId);
396
396
  }
397
397
 
398
398
  //正在编辑的行
399
- if (data.listData.currentRow.data && data.listData.currentRow.data[fiedlId]
399
+ if (data.listData.currentRow.data && data.listData.currentRow.data[fiedlId] && rowNum>-1
400
400
  && data.listData.currentRow.data.$sourceIndex === data.listData.source.rows[rowNum].$sourceIndex) {
401
401
  let currentField = data.listData.currentRow.data[fiedlId];
402
402
  currentField.source[attrName] = value;
403
+ data.listData.currentRow.data[fiedlId].rowKey=Math.random();
403
404
  //校验自己
404
405
  if (currentField.self && currentField.self.validExcute) {
405
406
  currentField.self.validExcute();
@@ -227,6 +227,7 @@ const FormList = function (source, master) {
227
227
  let rowData = rtn.initRow(JSON.parse(JSON.stringify(sourceRow)));
228
228
  for (let j = 0; j < rowData.field.length; j++) {//遍历每一列
229
229
  row[rowData.field[j].id] = rowData.field[j];
230
+ row[rowData.field[j].id].rowKey=Math.random();
230
231
  }
231
232
  row.$sourceIndex = sourceRow.$sourceIndex+"";
232
233
  return row;
@@ -328,7 +329,7 @@ const FormList = function (source, master) {
328
329
  self.currentRowIndex=index;
329
330
  var dialogOption = {
330
331
  title: '修改',
331
- pane: common.getParentPane(self),
332
+ pane: common.getParentPane(self.$self),
332
333
  content: [{
333
334
  component: 'ct-form',
334
335
  attrs: {
@@ -336,7 +337,7 @@ const FormList = function (source, master) {
336
337
  scripts: source.scripts,
337
338
  parameterAction: self.OptApi,
338
339
  fields: JSON.parse(JSON.stringify(source.rows[index].columns)),
339
- colSpan: 1,
340
+ colSpan: rtn.pageColumns,
340
341
  buttons: [
341
342
  {
342
343
  "key": "test1",
@@ -345,8 +346,8 @@ const FormList = function (source, master) {
345
346
  }
346
347
  ]
347
348
  },
348
- width:'500px',
349
- height: '400px'
349
+ width: rtn.pageWidth+'px',
350
+ height: rtn.pageHeight+'px'
350
351
  },
351
352
  on: {
352
353
  submit: function (ev) {
@@ -618,7 +619,16 @@ const FormList = function (source, master) {
618
619
  return button;
619
620
  }
620
621
  return null;
621
- }
622
+ },
623
+ get pageWidth() {
624
+ return source.pageWidth || 500;
625
+ },
626
+ get pageHeight() {
627
+ return source.pageHeight || 400;
628
+ },
629
+ get pageColumns() {
630
+ return source.pageColumns || 1;
631
+ },
622
632
  };
623
633
  return rtn;
624
634
  };
@@ -38,6 +38,13 @@ const Tags = function (source, moreActionRouter) {
38
38
  return source.code1;
39
39
  },
40
40
  set text(v) {
41
+
42
+ //由于tags存的数据都是json对象 所以如果传进来的数据是string类型则 需要转成对象
43
+ if(typeof v=="string")
44
+ {
45
+ v=JSON.parse(v);
46
+ }
47
+
41
48
  if (source.code1 !== '') {
42
49
  var tempV1 = JSON.parse(source.code1);
43
50
  tempV1.forEach((v1) => {
@@ -68,6 +75,7 @@ const Tags = function (source, moreActionRouter) {
68
75
  return '';
69
76
  },
70
77
  get labelValue() {
78
+
71
79
  if (source.code1) {
72
80
  var rtnLabelValue = '';
73
81
  JSON.parse(source.code1).forEach((op) => {
package/src/main.js CHANGED
@@ -13,10 +13,10 @@ Vue.use(ElementUI, { size: 'mini'});
13
13
  Vue.config.productionTip = false;
14
14
  Vue.use(centaline, {
15
15
  // baseUrl: "http://10.88.22.46:7070/v1/form/router",
16
- baseUrl: "http://10.88.23.22:9999/v1/form/router",
17
- // baseUrl: "http://tjcptest.centaline.com.cn/",
18
- // baseUrl: "http://10.88.22.69:8080/",
19
- // flagRouterSelf: true,
16
+ // baseUrl: "http://10.88.23.22:9999/v1/form/router",
17
+ baseUrl: "http://tjcptest.centaline.com.cn/",
18
+ // baseUrl: "http://10.88.22.40:8080/",
19
+ flagRouterSelf: true,
20
20
  zindex: 999,
21
21
  showRequestSuccessMessage: true,
22
22
  showRequestErrorMessage: true,
@@ -41,7 +41,7 @@ Vue.use(centaline, {
41
41
  // 获取请求头
42
42
  getRequestHeaders: function () {
43
43
  return {
44
- oldToken: 'a0c6a2be-f79e-47ea-8490-212d5f4f4ff4',
44
+ oldToken: '4fb255a7-6b34-47b7-895b-bc5d40d940e5',
45
45
  originalRequestURL: 'http://10.88.22.67:8080',
46
46
  EstateInfo: '{"estateId":"201703020943128D8A8FCF463E4016D6","estateName":"%E4%B8%87%E7%A7%91%E4%BA%91%E5%9F%8E"}',
47
47
  Authorization:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjE2OGI1YThjLThiZTUtNDQyZi04NTA4LWMyODY4N2NkYmEzMSJ9.Rk26QdZSUzDVdjdRxGxDApOt5W6KYjmyjmsXpWeZb5E5NwZjpXnHYwhYkKjNxIeyg--OV2UrzFa2SxGzZ-Wneg',