centaline-data-driven 1.3.27 → 1.3.28

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.27",
3
+ "version": "1.3.28",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/src/Form.vue CHANGED
@@ -2,7 +2,7 @@
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="'/salemanage/adjust/point/readDetail'" :apiParam="apiParam"></ct-form>
5
+ <ct-form :api="'/api/finance/account-flow/task'" :apiParam="apiParam"></ct-form>
6
6
  <!--<ct-form :api="'api/Form/formdata'"></ct-form>-->
7
7
  <ct-dialog-list></ct-dialog-list>
8
8
  </div>
@@ -14,7 +14,11 @@
14
14
  data() {
15
15
  return {
16
16
  apiParam:{
17
- adjustID:"220704140952A0156309F316436CAEBA",actionType:3
17
+ actionType: 1,
18
+ businessId: "1547837545432465409",
19
+ pageOnly: true,
20
+ pageStyle: 2,
21
+ stepId: "1547838255872065538"
18
22
  }
19
23
  }
20
24
  },
@@ -1,4 +1,7 @@
1
1
  .ccai.ct-Sw .ct-radios {
2
2
  padding-top: 0px;
3
3
  padding-bottom: 0;
4
- }
4
+ }
5
+ .ccai.button-absolute{
6
+ bottom: 26px;
7
+ }
@@ -2,9 +2,10 @@
2
2
  <!--使用draggable组件-->
3
3
  <div class="dragCol" ref="dragCol">
4
4
  <div class="dragItem dragHeader" ref="dragHeader">
5
- <el-checkbox id="dragAll" v-model="checkAll" @change="handleAllChecked" class="checkbox-common">{{
6
- this.vmodel.label
7
- }}
5
+ <el-checkbox id="dragAll" v-model="checkAll" :indeterminate="isIndeterminate" @change="handleAllChecked"
6
+ class="checkbox-common">{{
7
+ this.vmodel.label
8
+ }}
8
9
  </el-checkbox>
9
10
  <span class="svgIcon">
10
11
  <!-- <svg-icon icon-class="sort" style="cursor: pointer"></svg-icon> -->
@@ -12,8 +13,9 @@
12
13
  </div>
13
14
  <!-- <div class="dragMain" style="height:dragMainHeight;"> -->
14
15
  <div class="dragMain" ref="dragMain" :style="{ height: mainHeight }">
15
- <draggable v-model="testList" :options="{ group: { name: 'itxst', pull: 'clone' }, sort: true }"
16
- animation="300" :move="onMove" dragClass="dragClass" ghostClass="ghostClass" chosenClass="chosenClass"
16
+ <draggable v-model="testList"
17
+ :options="{ group: { name: 'itxst', pull: 'clone' }, sort: true }" animation="300"
18
+ :move="onMove" dragClass="dragClass" ghostClass="ghostClass" chosenClass="chosenClass"
17
19
  @input="handleListChange($event)">
18
20
  <transition-group>
19
21
  <div class="dragItem canDragon" v-for="(item, index) in testList" :key="index" ref="dragItem">
@@ -51,7 +53,8 @@ export default {
51
53
  checkAll: true,
52
54
  //定义要被拖拽对象的数组
53
55
  testList: [],
54
- mainHeight: 500
56
+ mainHeight: 500,
57
+ isIndeterminate: true
55
58
  };
56
59
  },
57
60
  watch: {
@@ -65,8 +68,14 @@ export default {
65
68
  }
66
69
  if (i === this.testList.length) {
67
70
  this.checkAll = true;
71
+ this.isIndeterminate = false
68
72
  } else {
69
73
  this.checkAll = false;
74
+ if (i > 0 && i < this.testList.length) {
75
+ this.isIndeterminate = true
76
+ } else {
77
+ this.isIndeterminate = false
78
+ }
70
79
  }
71
80
  });
72
81
  },
@@ -103,16 +112,17 @@ export default {
103
112
  let screenHeight = document.body.clientHeight;
104
113
  let dragHeaderHeight = this.$refs.dragHeader.offsetHeight;
105
114
  let dragMainHeight = this.$refs.dragMain.style.height;
106
- let num = this.testList.length
107
- let dragItemAll = 44.68 * num;
108
115
  dragMainHeight =
109
116
  screenHeight - dragHeaderHeight - 26 - 8 - 44 - 40;
117
+ this.mainHeight = dragMainHeight + "px";
118
+ let num = this.testList.length
119
+ let dragItemAll = 44.68 * num;
110
120
  if (dragMainHeight > dragItemAll) {
111
121
  this.mainHeight = dragItemAll + "px";
112
122
  this.$refs.dragMain.style.overflowY = 'hidden'
113
123
  } else {
114
124
  this.mainHeight = dragMainHeight + "px";
115
- this.$refs.dragMain.style.overflowY = 'scroll'
125
+ this.$refs.dragMain.style.overflowY = 'overlay'
116
126
  }
117
127
 
118
128
  });
@@ -221,7 +231,7 @@ export default {
221
231
  .dragHeader {}
222
232
 
223
233
  .dragMain {
224
- overflow-y: scroll;
234
+ overflow-y: overlay;
225
235
  overflow-x: hidden;
226
236
  }
227
237
 
@@ -68,7 +68,8 @@
68
68
  <component v-for="(btn, index) in model.links" :key="index" :is="btn.is" :vmodel="btn" @click="clickHandler" v-if="btn.show"></component>
69
69
  </el-col>
70
70
  </el-row>
71
- <el-row v-if="model.buttons.findIndex((v)=>{return v.show}) > -1" :class="isScroll?'button-absolute':'button-initial'">
71
+ <el-row v-if="model.buttons.findIndex((v)=>{return v.show}) > -1" :class="isScroll?'ccai button-absolute':'button-initial'"
72
+ :style="{'max-width':pageWidth?(pageWidth-20)+'px':'100%'}">
72
73
  <el-col :span="24" style="text-align:center">
73
74
  <component v-for="(btn, index) in model.buttons" :key="index" :is="btn.is" :vmodel="btn" @click="clickHandler" v-if="btn.show"></component>
74
75
  </el-col>
@@ -116,7 +117,8 @@
116
117
  this.init();
117
118
  },
118
119
  updated(){
119
- if(this.$el.parentElement.scrollHeight>this.$el.parentElement.clientHeight){
120
+ if(this.$el.parentElement.scrollHeight>this.$el.parentElement.clientHeight
121
+ && !this.model.isHorizontalLayout){
120
122
  this.isScroll=true;
121
123
  }
122
124
  },
@@ -592,6 +594,7 @@
592
594
  var rtnBool = true;
593
595
  var jump = false;
594
596
  var i=0;
597
+ debugger
595
598
  self.$refs.Fields.forEach((f) => {
596
599
  if (f.model && typeof f.validExcute !== 'undefined') {
597
600
  if (!f.validExcute()) {
@@ -716,7 +719,6 @@
716
719
  background-color: #fff;
717
720
  width: 100%;
718
721
  margin: auto;
719
- max-width: 800px;
720
722
  box-shadow: 0 2px 20px 0 rgb(0 0 0 / 10%);
721
723
  margin-left: -20px;
722
724
  }
@@ -16,7 +16,7 @@
16
16
  <!--数据列-->
17
17
  <el-table-column v-for="(v,i) in model.rows[0].field" :key="i" :prop="v.id" :label="v.label" v-if="v.show !== false">
18
18
  <template slot="header" slot-scope="scope">
19
- <div :class="[{'ct-table-required':v.required&&model.rows[0].edit&& model.rows[0].delete&&!model.tableDisabled},getHeadClass(v)]">
19
+ <div :class="[{'ct-table-required':v.required&&model.rows[0].edit&& model.rows[0].delete&&!model.tableDisabled},getHeadClass(v)]">
20
20
  {{v.label}}
21
21
  </div>
22
22
  </template>
@@ -32,8 +32,8 @@
32
32
  </span>
33
33
  <!--可点击的列-->
34
34
  <span v-else-if="v.router" :class="'cell'" style="display: flex;">
35
- <ct-tablecurrency :router="v.router" :colValue="scope.row[v.id].code1" :rowData="scope.row"
36
- @click="rolRouterClickHandler">
35
+ <span>{{scope.row.isSet}}</span>
36
+ <ct-tablecurrency :router="v.router" :colValue="scope.row[v.id].code1" :rowData="scope.row" @click="rolRouterClickHandler">
37
37
  </ct-tablecurrency>
38
38
  </span>
39
39
  <ct-span v-else :vmodel="scope.row[v.id]" :rowNum="scope.row.$sourceIndex" ref="FieldsLabel"></ct-span>
@@ -191,7 +191,8 @@
191
191
  app.model.currentRow.isNew = false;
192
192
  app.model.currentRow.index = index;
193
193
  app.model.currentRow.isSet = true;
194
- row.isSet = true;
194
+ row.isSet = true;
195
+ app.itemKey = Math.random();
195
196
  }
196
197
  },
197
198
  //删除
@@ -180,13 +180,10 @@ const FormList = function (source, master) {
180
180
  for (let i = 1; i < rows.length; i++) {//遍历每一行
181
181
  if (!rows[i].deleted) {
182
182
  row = {};
183
- //row['$sourceIndex'] = i;
184
183
  Vue.set(row, '$sourceIndex', i);
185
184
  for (let j = 0; j < rows[i].field.length; j++) {//遍历每一列
186
- //row[field[j].id] = rows[i].field[j];
187
185
  Vue.set(row, field[j].id, rows[i].field[j]);
188
186
  }
189
- //row.isSet = false;
190
187
  Vue.set(row, 'isSet', false);
191
188
  Vue.set(row, 'edit', rows[i].edit);
192
189
  Vue.set(row, 'delete', rows[i].delete);
@@ -372,8 +369,6 @@ const FormList = function (source, master) {
372
369
  addSourceRow(row) {
373
370
  let sourceRow = JSON.parse(JSON.stringify(source.rows[0]));
374
371
  for (let k in sourceRow.columns) {
375
- //sourceRow.Row[k] = row.field[k].source;
376
- sourceRow.columns[k] = row[sourceRow.columns[k].fieldName1].source;
377
372
  sourceRow.columns[k] = row[sourceRow.columns[k].fieldName1].source;
378
373
  };
379
374
  source.rows.push(sourceRow);
@@ -425,9 +420,7 @@ const FormList = function (source, master) {
425
420
  source.rows.push(row);
426
421
  rtn.rows.push(rowItem);
427
422
  rtn._rows[rtn._rows.length - 1].$sourceIndex = rtn._rows.length - 1;
428
-
429
- rowData.$sourceIndex = source.rows.length - 1;
430
-
423
+ rowData.$sourceIndex = source.rows.length - 1;
431
424
  rowData.edit = rowItem.edit;
432
425
  rowData.delete = rowItem.delete;
433
426
  rowItem.isNewFlag = true;
@@ -473,13 +466,14 @@ const FormList = function (source, master) {
473
466
  insertRow(rows) {
474
467
  if(rows && rows.length>0){
475
468
  rows.forEach((r) => {
476
- source.rows.push(r);
477
- let iRow = this.initRow(r);
469
+ let iRow = rtn.initRow(r);
478
470
  iRow.isNewFlag = true;
471
+ source.rows.push(r);
479
472
  rtn._rows.push(iRow);
480
473
  Vue.set(r, 'edit', iRow.edit);
481
474
  Vue.set(r, 'delete', iRow.delete);
482
475
  rtn._rows[rtn._rows.length - 1].$sourceIndex = rtn._rows.length - 1;
476
+ r.$sourceIndex = rtn._rows.length - 1;
483
477
 
484
478
  let rowData = rtn.rowsItemToTableData(iRow)
485
479
  rowData.$sourceIndex = rtn._rows.length - 1;
@@ -492,43 +486,52 @@ const FormList = function (source, master) {
492
486
  insertOrUpdateRow(row) {
493
487
  if(row){
494
488
  if(rtn.primaryKeys && rtn.primaryKeys.length>0){
495
- let iRow = this.initRow(row);
489
+ let iRow = rtn.initRow(row);
496
490
  let flagAdd=true;
497
491
  rtn.rows.forEach((r,i) => {
498
- let countKey=0;
499
- rtn.primaryKeys.forEach((k) => {
500
- let fieldOld=r.field.find((v) => {
501
- return v.id === k;
502
- });
503
- let fieldNew=iRow.field.find((v) => {
504
- return v.id === k;
505
- });
506
- if(fieldOld.code1===fieldNew.code1){
507
- countKey++;
508
- }
509
- })
510
- if(countKey===rtn.primaryKeys.length){
511
- flagAdd=false;
512
- if(iRow.deleted){
513
- rtn.tableData.forEach((d,index) => {
514
- if(d.$sourceIndex===r.$sourceIndex){
515
- rtn.tableData.splice(index, 1);
492
+ if(i>0){
493
+ let countKey=0;
494
+ rtn.primaryKeys.forEach((k) => {
495
+ let fieldOld=r.field.find((v) => {
496
+ return v.id === k;
497
+ });
498
+ let fieldNew=iRow.field.find((v) => {
499
+ return v.id === k;
500
+ });
501
+ if(fieldOld.code1===fieldNew.code1){
502
+ countKey++;
503
+ }
504
+ })
505
+ if(countKey===rtn.primaryKeys.length){
506
+ flagAdd=false;
507
+ if(iRow.deleted){
508
+ rtn.tableData.forEach((d,index) => {
509
+ if(d.$sourceIndex===r.$sourceIndex){
510
+ rtn.tableData.splice(index, 1);
511
+ }
512
+ });
513
+ if (r.isNewFlag) {
514
+ rtn.rows.splice(i, 1);
515
+ source.rows.splice(i, 1);
516
+ }
517
+ else {
518
+ rtn.rows[i].deleted = true;
516
519
  }
517
- });
518
- if (r.isNewFlag) {
519
- rtn.rows.splice(i, 1);
520
- source.rows.splice(i, 1);
521
520
  }
522
- else {
523
- rtn.rows[i].deleted = true;
521
+ else{
522
+ let rowData = rtn.rowsItemToTableData(iRow)
523
+ iRow.$sourceIndex=r.$sourceIndex;
524
+ rowData.$sourceIndex=r.$sourceIndex;
525
+ rowData.edit = iRow.edit;
526
+ rowData.delete = iRow.delete;
527
+ source.rows.splice(i, 1,row);
528
+ rtn._rows.splice(i, 1,iRow);
529
+ rtn._tableData.splice(i-1, 1,rowData);
524
530
  }
525
531
  }
526
- else{
527
- rtn.rows.splice(i, 1,iRow);
528
- }
529
532
  }
530
533
  });
531
- if(flagAdd){
534
+ if(flagAdd){
532
535
  let rows=[];
533
536
  rows.push(row);
534
537
  rtn.insertRow(rows)
@@ -267,7 +267,8 @@ const Router = function (source) {
267
267
  }).catch((ex) => {
268
268
  callback(ex); //里面需要有data.rtnCode === 200的处理
269
269
  });
270
- } else {
270
+ }
271
+ else {
271
272
  callback({
272
273
  rtnCode: Enum.ReturnCode.Successful
273
274
  });
package/src/main.js CHANGED
@@ -14,9 +14,9 @@ Vue.config.productionTip = false;
14
14
  Vue.use(centaline, {
15
15
  baseUrl: "http://10.88.22.46:7070/v1/form/router",
16
16
  // baseUrl: "http://10.88.23.22:9999/v1/form/router",
17
- // baseUrl: "http://10.88.22.69:8080/",
17
+ baseUrl: "http://10.88.22.69:8080/",
18
18
  // baseUrl: "http://tjcptest.centaline.com.cn/",
19
- // flagRouterSelf: true,
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: 'a9e42494-1e0b-4c46-834e-eea096ba2564',
44
+ oldToken: 'e8f14c4d-5197-427e-9ef5-db1fdac7ae31',
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.eyJsb2dpbl91c2VyX2tleSI6IjYzMzZiMDJiLTZjOGEtNDIzNC05MGQ5LTliYWI2MTIyNTQzNyJ9.hOxMvGLm03QMPu9C4lgRzkEHC7ECqxJ_L6mfqQRqv39xJ42I8gzSRO-E68vWp-A99ewnxnqvTZ6H_6fOQ9DljQ',