centaline-data-driven 1.2.33 → 1.2.36

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.2.33",
3
+ "version": "1.2.36",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/src/Detail.vue CHANGED
@@ -10,7 +10,7 @@
10
10
  name: 'DataDrivendetail',
11
11
  data() {
12
12
  return {
13
- apiParam: {actionType: 1,chanceID: "2"} ,
13
+ apiParam: {actionType: 1,chanceID: "1"} ,
14
14
  }
15
15
  },
16
16
  mounted() {
package/src/Form.vue CHANGED
@@ -1,10 +1,8 @@
1
1
  <template>
2
2
  <div id="app-form" class="data-driven" style="width:100%;height:100%;overflow:auto">
3
- <ct-form :api="'/api/third-dept-tran/transaction/detail'" :apiParam="apiParam"></ct-form>
4
- <!-- <ct-form :api="'/PropertyPublish/getLayoutOfNew'" :apiParam="apiParam"></ct-form> -->
3
+ <!-- <ct-form :api="'/api/third-dept-tran/profit-return/applyUI'" :apiParam="apiParam"></ct-form> -->
4
+ <ct-form :api="'/PropertyRET/getLayoutOfNewStepOne'" :apiParam="apiParam"></ct-form>
5
5
  <!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
6
- <!--:api="'FormSample/formdata'"-->
7
- <!--<ct-form :source="formdata.content"></ct-form>-->
8
6
  <!--<ct-form :api="'/api/form/formdata/contractDetail'" :apiParam="apiParam"></ct-form>-->
9
7
  <!--<ct-form :api="'api/Form/formdata'"></ct-form>-->
10
8
  <ct-dialog-list></ct-dialog-list>
@@ -16,10 +14,10 @@
16
14
  name: 'App',
17
15
  data() {
18
16
  return {
19
- // apiParam: {originalTraId: "1475658732246241281", actionType: 2, chanceID: "1"} ,
20
- apiParam: {originalTraId: "1475658732246241281", actionType: 3, pageTitle: "成交报告", pageOnly: true} ,
17
+ // apiParam: {profitReturnId: "1504359257134055426", actionType: 1, pageStyle: 2, pageTitle: "查看返利", pageOnly: true} ,
21
18
  // apiParam: {headerParam: {}, urlParam: {contractID: "06cad32e-4d0d-4b6f-bd24-16a28629a550", actionType: "0"}}
22
- // apiParam: {SN: "13557_132", UserID: "wuhan3"},
19
+ // apiParam: {originalTraId: "1475658732246241281", actionType: 2, chanceID: "1"} ,
20
+ apiParam: {actionType: "2", pageStyle: "2", pageTitle: "新增盘源", pageOnly: "true"},
23
21
  }
24
22
  },
25
23
  methods: {
@@ -308,6 +308,7 @@ html {
308
308
  }
309
309
 
310
310
  .errorMessage {
311
+ height: 26px;
311
312
  font-size: 12px;
312
313
  color: #ff5b5b !important;
313
314
  padding: 3px 5px;
@@ -71,6 +71,7 @@
71
71
  //row.flagRow && row.columnShow===column.id?'ct-td3':null,
72
72
  rowBorderLeftColumns.includes(column.id)?'ct-td4':null,
73
73
  rowBorderRightColumns.includes(column.id)?'ct-td5':null,
74
+ rowMergedTopColumns.includes(column.id)?'ct-tdTop':null,
74
75
  model.rowHiddenKeyData.indexOf(row[model.rowHiddenKey])%2?'ct-tdDouble':'ct-tdSingle',
75
76
  selectKey===row[model.rowHiddenKey]?'select':null,
76
77
  colIndex === leftShadow?'shadowLeft':null,
@@ -134,6 +135,7 @@
134
135
  rowMergedColumns:['contactNameDesc','propertyIdentityTypeID','operation'],
135
136
  rowBorderLeftColumns:['contactNameDesc','operation'],
136
137
  rowBorderRightColumns:['propertyIdentityTypeID','operation'],
138
+ rowMergedTopColumns:['contactNameDesc','propertyIdentityTypeID'],
137
139
  selectKey:'',
138
140
  }
139
141
  },
@@ -544,6 +546,9 @@
544
546
  .ct-searchtable .ct-tr > .ct-tdDouble {
545
547
  background-color: rgb(239 255 239);
546
548
  }
549
+ .ct-searchtable .ct-tr > .ct-tdTop {
550
+ vertical-align: top;
551
+ }
547
552
  .shadowLeft {
548
553
  border-right: 1px solid #e7e8eb;
549
554
  box-shadow: 2px 0 3px -1px rgba(0,0,0,0.1);
@@ -6,16 +6,18 @@
6
6
  <div slot="header" class="clearfix" v-if="typeof model.title !== 'undefined' && model.flagShowTitle">
7
7
  <span style="font-weight:bold">{{model.title}}</span>
8
8
  </div>
9
+
9
10
  <!--头部元素-->
10
11
  <el-row v-if="collapseFieldsRow.length > 0">
11
12
  <el-col v-for="(col, index) in collapseFieldsRow[0]" :key="index" v-if="col.show !== false" :span="col.colspan" style="padding:5px">
12
- <component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" v-bind="col.bindPara"
13
+ <component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" v-bind="col.bindPara" :from="'form'"
13
14
  @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)"
14
15
  @input="inputHandler(col,$event)"
15
16
  @popupSearchList="popupSearchListHandler"
16
17
  @tableButtonClick="clickHandler"></component>
17
18
  </el-col>
18
19
  </el-row>
20
+
19
21
  <!--tabs-->
20
22
  <el-tabs v-if="model.isHorizontalLayout" v-model="activeName">
21
23
  <el-tab-pane :label="item.label" :name="index.toString()"
@@ -31,6 +33,7 @@
31
33
  </el-row>
32
34
  </el-tab-pane>
33
35
  </el-tabs>
36
+
34
37
  <!--分组-->
35
38
  <el-collapse v-else v-model="collapseActiveNames" @change="collapseHandleChange">
36
39
  <el-collapse-item v-for="(item, index) in collapse" v-if="item.show !== false" :key="index" :title="item.label" :name="index" :disabled="item.lock" :class="item.lock?'ct-collapse-item-title':''">
@@ -40,7 +43,7 @@
40
43
  </template>
41
44
  <el-row>
42
45
  <el-col v-for="(col, index) in collapseFieldsRow[index + 1]" :key="index" :span="col.colspan" v-if="col.show !== false" style="padding:5px">
43
- <component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" v-bind="col.bindPara"
46
+ <component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" v-bind="col.bindPara" :from="'form'"
44
47
  @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)"
45
48
  @input="inputHandler(col,$event)"
46
49
  @popupSearchList="popupSearchListHandler"
@@ -49,6 +52,7 @@
49
52
  </el-row>
50
53
  </el-collapse-item>
51
54
  </el-collapse>
55
+
52
56
  <!--尾部元素-->
53
57
  <el-row v-if="independentItem.length > 0" style="margin-top: 20px;">
54
58
  <el-col v-for="(col, index) in independentItem" :key="index" v-if="col.show !== false" :span="col.colspan" style="padding:5px">
@@ -240,7 +244,7 @@
240
244
  var self = this;
241
245
  this.model.scripts.$fd = field.id;
242
246
  this.model.scripts.$result = [];
243
-
247
+
244
248
  var clickAcion = function (field) {
245
249
  //若不是客户端方法,则直接访问接口
246
250
  if (!field.isClientFuntion) {
@@ -258,6 +262,9 @@
258
262
  self.model.pageDisabled= true;
259
263
  field.doAction(self.getFormObj(), (data) => {
260
264
  if (data.rtnCode === 200) {
265
+ if(data.notification===17){
266
+ self.clickHandler(self.model.getRtnRouter(data.content),null)
267
+ }
261
268
  if (self.model.flagAlertClose) {
262
269
  self.$common.confirm('操作成功,是否关闭本页面?', '提示', {
263
270
  confirmButtonText: '确定',
@@ -294,6 +301,11 @@
294
301
  }
295
302
  }
296
303
  else {
304
+ if(field.flagAttachSearchCondition){
305
+ if (!self.validExcute()){
306
+ return;
307
+ }
308
+ }
297
309
  if (typeof field.onClick !== 'undefined') {
298
310
  verified = self.$common.excute.call(self.model.scripts, field.onClick);
299
311
  }
@@ -301,9 +313,14 @@
301
313
  if (!submitData) {
302
314
  submitData = {};
303
315
  var tempFormData = self.model.getFormObj();
304
- field.submitFormField.forEach((v) => {
305
- submitData[v] = tempFormData[v];
306
- });
316
+ if(field.flagAttachSearchCondition){
317
+ submitData.jsonData=tempFormData;
318
+ }
319
+ else{
320
+ field.submitFormField.forEach((v) => {
321
+ submitData[v] = tempFormData[v];
322
+ });
323
+ }
307
324
  }
308
325
 
309
326
  if (field.isOpenForm) {
@@ -383,7 +400,7 @@
383
400
  }
384
401
  submitData = field.getActionPara(submitData).para;
385
402
  let title=field.pageTitle==undefined ?field.label:field.pageTitle;
386
- submitData.actionType=field.actionType;
403
+ submitData.actionType=field.actionType;
387
404
  var fun =self.$common.getDataDrivenOpts().handler[field.action];
388
405
  fun(submitData,title,self.model);
389
406
  }
@@ -558,8 +575,7 @@
558
575
  return Object.assign(formData,{'pageStyle':this.$route.query.pageStyle});
559
576
  }
560
577
  return formData;
561
- },
562
-
578
+ },
563
579
  }
564
580
  }
565
581
  </script>
@@ -11,7 +11,7 @@
11
11
  :categoryLoaded="loaded.categoryLoaded" @search="search()"
12
12
  @showTitle="showTitleScreenHandler"></ct-searchscreen>
13
13
 
14
- <ct-searchtable ref="table" :api="searchDataApi" :searchStatsApi="searchStatsApi"
14
+ <ct-searchtable ref="table" :api="searchDataApi" :searchStatsApi="searchStatsApi" :from="from"
15
15
  @toolbarClick="toolbarClickHandler" @refreshParent="refreshParentHandler" :key="reloadKeyTable" @searchComplate="searchComplate()"
16
16
  @showTitle="showTitleHandler"></ct-searchtable>
17
17
  </div>
@@ -42,6 +42,10 @@
42
42
  type: Object,
43
43
  default: () => { }
44
44
  },
45
+ from: {
46
+ String,
47
+ default:'searchlist'
48
+ },
45
49
  },
46
50
  created() {
47
51
  this.model = this.vmodel;
@@ -3,7 +3,7 @@
3
3
  <ct-tableStats ref="tableStats" class="ct-search-table-list-header"
4
4
  v-if="!isLoading&&searchStatsApi"
5
5
  :api="searchStatsApi"
6
- @searchStats="searchStats"
6
+ @searchStats="searchStats" @setTableHeight="setTableHeight"
7
7
  :searchModel="model.searchModel"></ct-tableStats>
8
8
  <ct-tabletoolbar ref="toolbar" v-if="!isLoading" :buttons="model.buttons"
9
9
  @click="toolbarClickHandler($event)"
@@ -16,7 +16,7 @@
16
16
  <div v-loading="operationLoading">
17
17
  </div>
18
18
  <div class="ct-tableParent" ref="tableParent" v-bind="model.attrs" v-if="!isLoading"
19
- :style="{'height':model.tableHeight+'px'}"
19
+ :style="{'height':from=='form'?'100%':model.tableHeight+'px'}"
20
20
  @scroll="scrollHandle($event)" :v-focus="model.flagFocus"
21
21
  @keydown.up="rowKeyDownHandle($event,0)" @keydown.down="rowKeyDownHandle($event,1)"
22
22
  tabindex="-1">
@@ -143,7 +143,11 @@
143
143
  flagFocus:{
144
144
  Boolean,
145
145
  default:true
146
- }
146
+ },
147
+ from: {
148
+ String,
149
+ default:'searchlist'
150
+ },
147
151
  },
148
152
  computed: {
149
153
 
@@ -501,7 +505,9 @@
501
505
  var h4 = this.$refs.footer.$el.offsetHeight | 0;
502
506
  var h5 = this.$refs.listHeader.$el.offsetHeight | 0;
503
507
  var h6 = this.$refs.listFooter.$el.offsetHeight | 0;
504
- let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - 22;
508
+ var h7 = this.$refs.tableStats?(this.$refs.tableStats.$el.offsetHeight+7 | 0):0;
509
+ let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - h7-22;
510
+ console.log(tableHeight+" "+h7);
505
511
  this.model.tableHeight = tableHeight < 40 ? 350 : tableHeight;
506
512
  this.$nextTick(() => {
507
513
  self.getScrollAttr();
@@ -4,21 +4,25 @@
4
4
  <!--计算占用宽度-->
5
5
  <div style="position:relative" v-if="FlagStatistics">
6
6
  <div style="position:absolute;left:-10000px" class="tab-list">
7
- <label v-for="(item, index) in data" class="btnTab" :class="[selectStats==item.code1?'active':'']" :ref="'StatisticsItem'+index">{{item.controlLabel}}</label>111
7
+ <label v-for="(item, index) in data" class="btnTab" :ref="'StatisticsItem'+index">
8
+ <span :class="[selectStats==item.code1?'active':'']">{{item.controlLabel}}</span></label>111
8
9
  </div>
9
10
  </div>
10
11
  <!--展示-->
11
12
  <div v-if="FlagStatistics" class="tab-list">
12
13
  <template v-if="showData.length===1">
13
- <label class="btnTab" v-for="(item, index) in showData[0]" :class="[selectStats==item.code1?'active':'']" @click="handleClick($event,item)">{{item.controlLabel}}</label>
14
+ <label class="btnTab" v-for="(item, index) in showData[0]" @click="handleClick($event,item)">
15
+ <span :class="[selectStats==item.code1?'active':'']">{{item.controlLabel}}</span></label>
14
16
  </template>
15
17
  <template v-else-if="showData.length>1">
16
- <label class="btnTab" v-for="(item, index) in showData[0]" :class="[selectStats==item.code1?'active':'']" @click="handleClick($event,item)">{{item.controlLabel}}</label>
18
+ <label class="btnTab" v-for="(item, index) in showData[0]" @click="handleClick($event,item)">
19
+ <span :class="[selectStats==item.code1?'active':'']">{{item.controlLabel}}</span></label>
17
20
  <el-popover :append-to-table="option.appendId?option.appendId:''"
18
21
  :placement="option.placement?option.placement:'left'"
19
22
  :trigger="option.trigger?option.trigger:''"
20
23
  class="tabl-el">
21
- <label class="tablf" v-for="(item, index) in showData[1]" :class="[selectStats==item.code1?'active':'']" @click="handleClick($event,item)">{{item.controlLabel}}</label>
24
+ <label class="tablf" v-for="(item, index) in showData[1]" @click="handleClick($event,item)">
25
+ <span :class="[selectStats==item.code1?'active':'']">{{item.controlLabel}}</span></label>
22
26
  <i slot="reference" class="icon-more"></i>
23
27
 
24
28
  </el-popover>
@@ -68,7 +72,6 @@
68
72
  self.selectVa = "";
69
73
  if (self.data.length > 0) {
70
74
  if (self.selectStats == []) {
71
- debugger
72
75
  self.selectStats = self.data[0].code1;
73
76
  }
74
77
  self.FlagStatistics = true;
@@ -111,12 +114,14 @@
111
114
  }
112
115
 
113
116
  }
117
+
118
+ self.$emit('setTableHeight');
114
119
  });
115
120
  },
116
121
  handleClick(ev, obj) {
117
122
  var self = this;
118
123
  self.selectStats = obj.code1;
119
- var fields = self.model.searchData(obj.fieldName1, obj.code1, obj.controlType, obj.searchDataType);
124
+ var fields = self.model.searchData(obj.fieldName1, obj.code1, obj.searchOperation, obj.searchDataType);
120
125
  var model = {
121
126
  "searchData": fields
122
127
  };
@@ -147,42 +152,46 @@
147
152
  <style>
148
153
  </style>
149
154
 
150
- <style>
151
-
155
+ <style>
152
156
  .tab-list {
153
- height: 30px;
154
- border-bottom: 1px solid #E0E0E0;
157
+ border-bottom: 2px solid #E0E0E0;
155
158
  margin-bottom: 10px;
159
+ padding-bottom: 5px;
156
160
  }
157
161
 
158
- .btnTab {
162
+ .tab-list .btnTab {
159
163
  font-size: 14px !important;
160
164
  font-weight: bold;
161
- padding: 5px 20px;
165
+ padding: 0px 20px 0px 20px;
166
+
167
+
162
168
  }
163
169
 
164
- .btnTab:hover ,.tablf:hover{
170
+ .tab-list .btnTab:hover ,.tab-list .tablf:hover{
165
171
  color: #ee5d56;
166
172
  }
167
- .tabl-el{
173
+ .tab-list .tabl-el{
168
174
  max-width: 150px;
169
175
  box-shadow: 0 6px 12px rgb(0 0 0 / 18%);
170
176
  }
171
- .tablf{
177
+ .tab-list .tablf{
172
178
  font-size: 14px !important;
173
179
  font-weight: bold;
174
180
  text-align: center;
175
181
  padding: 5px 10px;
176
182
  display: block;
177
183
  }
178
- .active {
184
+ .tab-list .active {
179
185
  color: #ee5d56 !important;
180
186
  border-bottom: solid 3px #ee5d56 !important;
181
- background: none;
187
+ background: none;
182
188
  border-radius: 0 !important;
183
189
  }
190
+ .tab-list .btnTab span{
191
+
192
+ }
184
193
 
185
- .icon-more {
194
+ .tab-list .icon-more {
186
195
  background: url(../../../assets/vertical.png)no-repeat;
187
196
  background-size: 80% 80%;
188
197
  height: 20px;
@@ -11,9 +11,9 @@
11
11
  <div ref="cttags" class="el-select__tags" :style="{'max-width':tagsWidth + 'px'}" @click="clickHandle">
12
12
  <span>
13
13
  <span class="ct-tags-value-label">{{model.valueLabel}}</span>
14
- <span class="el-tag el-tag--info" :class="[model.attrs.size?'el-tag--'+model.attrs.size:'']" v-for="item in model.value">
14
+ <span class="el-tag el-tag--info" :class="[model.attrs.size?'el-tag--'+model.attrs.size:'']" v-for="(item, index) in model.value" :key="index">
15
15
  <span class="el-select__tags-text">{{getOptionText(item)}}</span>
16
- <i v-if="!model.lock" class="el-tag__close el-icon-close" @click="deleteOption(item,$event)"></i>
16
+ <i v-if="!model.lock && !getOptionLocked(item)" class="el-tag__close el-icon-close" @click="deleteOption(item,$event)"></i>
17
17
  </span>
18
18
  </span>
19
19
  </div>
@@ -240,6 +240,16 @@
240
240
  return "";
241
241
  }
242
242
  },
243
+ getOptionLocked: function (value) {
244
+ var self = this;
245
+ var option = this.globalOptions.find((v) => { return v[self.model.optionAttrs.value] === value });
246
+ if (option) {
247
+ return option[self.model.optionAttrs.locked];
248
+ }
249
+ else {
250
+ return "";
251
+ }
252
+ },
243
253
  deleteOption(value, event) {
244
254
  var self = this;
245
255
  this.model.value.splice(
@@ -303,7 +313,13 @@
303
313
  this.$set(this, 'showClear', false);
304
314
  },
305
315
  clearClickHandle: function (event) {
316
+ var self =this;
306
317
  this.model.value.splice(0);
318
+ if(this.model.lockedValue.length>0){
319
+ this.model.lockedValue.forEach((v) => {
320
+ self.model.value.push(v);
321
+ });
322
+ }
307
323
  this.resize();
308
324
  this.tagsChange();
309
325
  this.$emit('input', this.model.value);
@@ -348,7 +348,12 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
348
348
  rtn = true;
349
349
  }
350
350
  return rtn;
351
- }
351
+ },
352
+ getRtnRouter(v){
353
+ var button = Router(v);
354
+ button.is = "ct-btn";
355
+ return button;
356
+ },
352
357
  };
353
358
  valid.InitForm(rtn);
354
359
  return rtn;
@@ -14,8 +14,10 @@ const Tags = function (source, moreActionRouter) {
14
14
  label: 'name',
15
15
  displayLabel:'displayName',
16
16
  actionType: 'actionType',
17
- flagDeleted: 'flagDeleted'
17
+ flagDeleted: 'flagDeleted',
18
+ locked: 'locked'
18
19
  },
20
+ _lockedValue: null,
19
21
  _value: null,
20
22
  get value() {
21
23
  if (this._value !== null) {
@@ -102,6 +104,11 @@ const Tags = function (source, moreActionRouter) {
102
104
  //},
103
105
  reset() {
104
106
  this.value.splice(0);
107
+ if(this.model.lockedValue.length>0){
108
+ this.model.lockedValue.forEach((v) => {
109
+ this.model.value.push(v);
110
+ });
111
+ }
105
112
  this.defaultValue.forEach((v1) => {
106
113
  this.value.push(v1);
107
114
  });
@@ -183,6 +190,20 @@ const Tags = function (source, moreActionRouter) {
183
190
 
184
191
  return null;
185
192
  },
193
+ get lockedValue() {
194
+ if (this._lockedValue !== null) {
195
+ return this._lockedValue;
196
+ }
197
+ else {
198
+ this._lockedValue = [];
199
+ this.options.forEach((v) => {
200
+ if(v[this.optionAttrs.locked]){
201
+ this._lockedValue.push(v[this.optionAttrs.value]);
202
+ }
203
+ });
204
+ return this._lockedValue;
205
+ }
206
+ },
186
207
  };
187
208
  rtn = base.copy(Base(source), rtn);
188
209
  rtn = base.copy(rtn, valid.Init(rtn));
@@ -356,9 +356,14 @@ const Enum = {
356
356
  CloseTabThenUpdate: 16,
357
357
 
358
358
  /// <summary>
359
- /// 指示前端列表刷新当前行数据
359
+ /// 路由
360
360
  /// </summary>
361
- RefreshCurrentRow: 17,
361
+ Router: 17,
362
+
363
+ /// <summary>
364
+ /// 替换当前表单内容
365
+ /// </summary>
366
+ Replace: 18,
362
367
  },
363
368
 
364
369
  /// <summary>
package/src/main.js CHANGED
@@ -36,7 +36,7 @@ Vue.use(centaline, {
36
36
  // 获取请求头
37
37
  getRequestHeaders: function () {
38
38
  return {
39
- oldToken: 'e922a9d1-2dbe-4e39-91ca-aa77c4700aef',
39
+ oldToken: '4195d16c-9b1d-43b2-b6de-ef4a9f2b7d44',
40
40
  estateId: '20210729104021C49F04B55C50F6AF58',
41
41
  originalRequestURL: 'http://10.88.22.67:8080',
42
42
  Authorization:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjE0NmU5ZjEzLTVjMmYtNGVlMy1hM2U5LWIxM2QyZThjZTBhZSJ9.Gl8K5lbG7t5DyCqouu7Ux7Oh9xuAxqdOXr4JnoHCN-YwC3b2zPO-C2sHbYJUZHYQPa7kTNRmg1xJiwugpVo5Xw',