centaline-data-driven 1.2.35 → 1.2.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.
@@ -42,6 +42,7 @@ const paths = {
42
42
  "dynamicPhotoSelect": "./src/centaline/dynamicPhotoSelect/index.js",//图片
43
43
  "dynamicPhotoSelectList": "./src/centaline/dynamicPhotoSelectList/index.js",//图片选择列表
44
44
  "dynamicViewer": "./src/centaline/dynamicViewer/index.js",//图片选择列表
45
+ "dynamicRepeat": "./src/centaline/dynamicRepeat/index.js",//重复控件
45
46
  },
46
47
  "plugs": {
47
48
  "api": "./src/centaline/api/index.js",//调用API插件
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.2.35",
3
+ "version": "1.2.38",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div id="app-search" style="height:100%;position: fixed;">
3
- <!-- <ct-searchlist :searchConditionApi="'/api/third-dept-tran/tran-list/layout'" :searchDataApi="'/api/third-dept-tran/tran-list'"></ct-searchlist> -->
3
+ <ct-searchlist :searchConditionApi="'/api/third-dept-tran/tran-list/tran-emp-achievement-layout'" :searchDataApi="'/api/third-dept-tran/tran-list/tran-emp-achievement-list'"></ct-searchlist>
4
4
 
5
5
  <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'" :searchDataApi="'/PropertyRETList/getListOfSearchModel'" :searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"></ct-searchlist> -->
6
- <ct-searchlist :searchConditionApi="'/PropertyPublishLogList/getLayoutOfSearch'" :searchDataApi="'/PropertyPublishLogList/getListOfSearchModel'"></ct-searchlist>
6
+ <!-- <ct-searchlist :searchConditionApi="'/PropertyPublishLogList/getLayoutOfSearch'" :searchDataApi="'/PropertyPublishLogList/getListOfSearchModel'"></ct-searchlist> -->
7
7
 
8
8
  <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
9
9
  :searchDataApi="'/PropertyRETList/getListOfSearchModel'"
@@ -23,8 +23,8 @@
23
23
  name: 'DataDrivenSearch',
24
24
  data() {
25
25
  return {
26
- //para: { agentId: "1424932685198864386", estateId: "L201402181627000007233", estateName: "271医院宿舍区", pageOnly: "true", pageTitle: "销控房源列表" }
27
- para: {publishID: "1503900718229229568"}
26
+ para: {searchFields: {fields: []}, pageAttribute: {pageIndex: 1}, flagSearch: true}
27
+ // para: {publishID: "1503900718229229568"}
28
28
  // para: {paramKey: "PropertyStatusID", code: "002.001", name: "盘源状态", paramName: "盘源状态"}
29
29
  }
30
30
  },
Binary file
@@ -244,7 +244,7 @@
244
244
  var self = this;
245
245
  this.model.scripts.$fd = field.id;
246
246
  this.model.scripts.$result = [];
247
-
247
+
248
248
  var clickAcion = function (field) {
249
249
  //若不是客户端方法,则直接访问接口
250
250
  if (!field.isClientFuntion) {
@@ -262,6 +262,9 @@
262
262
  self.model.pageDisabled= true;
263
263
  field.doAction(self.getFormObj(), (data) => {
264
264
  if (data.rtnCode === 200) {
265
+ if(data.notification===17){
266
+ self.clickHandler(self.model.getRtnRouter(data.content),null)
267
+ }
265
268
  if (self.model.flagAlertClose) {
266
269
  self.$common.confirm('操作成功,是否关闭本页面?', '提示', {
267
270
  confirmButtonText: '确定',
@@ -397,7 +400,7 @@
397
400
  }
398
401
  submitData = field.getActionPara(submitData).para;
399
402
  let title=field.pageTitle==undefined ?field.label:field.pageTitle;
400
- submitData.actionType=field.actionType;
403
+ submitData.actionType=field.actionType;
401
404
  var fun =self.$common.getDataDrivenOpts().handler[field.action];
402
405
  fun(submitData,title,self.model);
403
406
  }
@@ -572,8 +575,7 @@
572
575
  return Object.assign(formData,{'pageStyle':this.$route.query.pageStyle});
573
576
  }
574
577
  return formData;
575
- },
576
-
578
+ },
577
579
  }
578
580
  }
579
581
  </script>
@@ -0,0 +1,14 @@
1
+ import dynamicRepeat from './src/dynamicRepeat'
2
+ import api from '../api/index'
3
+
4
+ dynamicRepeat.install = function (Vue) {
5
+ Vue.component(dynamicRepeat.name, dynamicRepeat);
6
+
7
+ Vue.use(api);
8
+ }
9
+
10
+ if (typeof window !== 'undefined' && window.Vue) {
11
+ window.Vue.use(dynamicRepeat);
12
+ }
13
+
14
+ export default dynamicRepeat;
@@ -0,0 +1,186 @@
1
+ <template>
2
+ <div class="ct-form-list" v-focus="foucus" :class="{'tableDisabled':model.tableDisabled}">
3
+ <div class="list-button">
4
+ <el-button v-if="model.create" type="success" class=" max-btn-add" size="mini" icon="el-icon-circle-plus-outline" @click="addRow">
5
+ 新增
6
+ </el-button>
7
+ </div>
8
+
9
+ <div class="el-col el-col-24" v-for="(v, i) in model.tableData" :key="v.guid" v-if="!v.deleted">
10
+ <div class="list-title">
11
+ <h5>{{model.title}}</h5>
12
+ </div>
13
+ <el-row v-if="v.field.length > 0">
14
+ <el-col v-for="(col, index) in v.field" :key="col.guid" v-if="col.show !== false" :span="col.colspan" style="padding:5px">
15
+ <component ref="Fields" :is="col.is" :vmodel="col" :api="model.OptApi" v-bind="col.bindPara"
16
+ @click="fieldClickHandler(col,index,i)" @change="changeHandler(col,index,i)"
17
+ @input="inputHandler(col,index,i)"></component>
18
+ </el-col>
19
+ </el-row>
20
+ <div class="list-button" v-if="i>0">
21
+ <el-button v-if="v.delete" type="success" class=" max-btn-add" size="mini" icon="el-icon-circle-plus-outline" @click="deleteRow(i)">
22
+ 删除
23
+ </el-button>
24
+ </div>
25
+ </div>
26
+ </div>
27
+
28
+ </template>
29
+
30
+ <script>
31
+ //Form内表格
32
+ var ctSpan = {//临时的span组件对象,用于vue双向绑定,强制更新
33
+ props: {
34
+ vmodel: Object,
35
+ rowNum: Number,
36
+ },
37
+ data: function () {
38
+ return {
39
+
40
+ }
41
+ },
42
+ methods: {
43
+ getClass() {
44
+ if (this.vmodel.is === "ct-inputNumber") {
45
+ return 'ct-table-inputnumber';
46
+ }
47
+ }
48
+ },
49
+ template: '<div :class="getClass()">{{vmodel.labelValue}}{{vmodel.unitName}}</div>'
50
+ }
51
+
52
+ export default {
53
+ name: 'ct-repeat',
54
+ components: {
55
+ 'ct-span': ctSpan
56
+ },
57
+ props: {
58
+ vmodel: Object,
59
+ api: String
60
+ },
61
+ data() {
62
+ return {
63
+ model: null,
64
+ foucus: false,
65
+ itemKey: Math.random()
66
+ }
67
+ },
68
+ created() {
69
+ let self = this;
70
+ this.model = this.vmodel;
71
+ this.model.OptApi = this.api;
72
+
73
+ this.$nextTick(function () {
74
+ self.model.refField = this.$refs.Fields;
75
+ self.model.refFieldsLabel = this.$refs.FieldsLabel;
76
+ });
77
+ },
78
+ methods: {
79
+ //添加
80
+ addRow() {
81
+ var app = this;
82
+ if (app.fieldsValidExcute()) {
83
+ let newRow = app.model.getCloneRowData(0)
84
+ app.model.tableData.push(newRow);
85
+ app.model.addSourceRow();
86
+ }
87
+ },
88
+ //删除
89
+ deleteRow(index) {
90
+ var self = this;
91
+ this.model.deleteRow(index + 1, () => {
92
+ self.model.tableData[index].deleted = true;
93
+ self.$forceUpdate();
94
+ self.model.change = self.model.formListChange;
95
+ self.$emit('change');
96
+ });
97
+ },
98
+ fieldsValidExcute() {
99
+ var self = this;
100
+ var rtnBool = true;
101
+ debugger
102
+ if (typeof self.$refs.Fields !== 'undefined') {
103
+ self.$refs.Fields.forEach((f) => {
104
+ if (typeof f.validExcute !== 'undefined') {
105
+ if (!f.validExcute()) {
106
+ rtnBool = false;
107
+ }
108
+ }
109
+ });
110
+ }
111
+ return rtnBool;
112
+ },
113
+ validExcute() {
114
+ var self = this;
115
+ var rtnBool = true;
116
+ if (!self.fieldsValidExcute()) {
117
+ rtnBool = false;
118
+ }
119
+ if (rtnBool && self.model.required && this.model.tableData.length === 0) {
120
+ self.$message.warning(this.model.label + " 表格不能为空");
121
+ rtnBool = false;
122
+ }
123
+ return rtnBool;
124
+ },
125
+ changeHandler(field, rowindex,index) {
126
+ var self = this;
127
+ this.model.change = field.change;
128
+ self.$emit('change');
129
+ },
130
+ inputHandler(field, rowindex, index) {
131
+ var self = this;
132
+ this.model.input = field.input;//当前小组件事件作为大组件事件
133
+ self.$emit('input');
134
+
135
+ },
136
+ }
137
+ }
138
+ </script>
139
+ <style>
140
+ .el-table-add-row {
141
+ margin-top: 10px;
142
+ width: 100%;
143
+ height: 34px;
144
+ border: 1px dashed #c1c1cd;
145
+ border-radius: 3px;
146
+ cursor: pointer;
147
+ justify-content: center;
148
+ display: flex;
149
+ line-height: 34px;
150
+ }
151
+
152
+ .ct-form-list .list-title {
153
+ padding-bottom: 5px;
154
+ text-align: left;
155
+ display: inline-table;
156
+ width: 45%;
157
+ }
158
+
159
+ .ct-form-list .list-button {
160
+ padding-bottom: 5px;
161
+ text-align: right;
162
+ display: inline-table;
163
+ float: right;
164
+ }
165
+
166
+ .ct-table-inputnumber {
167
+ text-align: right;
168
+ }
169
+
170
+ .ct-form-list .el-table__footer-wrapper .el-table__footer .has-gutter div {
171
+ text-align: right;
172
+ }
173
+
174
+ .ct-form-list .el-table__footer-wrapper .el-table__footer .has-gutter tr td:first-child div {
175
+ text-align: left;
176
+ }
177
+
178
+ .ct-table-required {
179
+ color: red;
180
+ }
181
+
182
+ .tableDisabled {
183
+ pointer-events: none;
184
+ opacity: 0.4;
185
+ }
186
+ </style>
@@ -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)"
@@ -463,6 +463,7 @@
463
463
  setTrLazyLoading() {
464
464
  this.pageRowMax = this.firstRow + this.displayRowNumber;
465
465
  this.pageRowMin = this.firstRow - this.displayRowNumber;
466
+ this.pageRowMin=this.pageRowMin>0?this.pageRowMin:0;
466
467
  if (this.pageRowMin > 0 && this.model.listData[this.pageRowMin].$rowspan === 0) {
467
468
  for (let i = this.pageRowMin; i >= 0; i--) {
468
469
  if (this.model.listData[i].$rowspan > 0) {
@@ -505,7 +506,9 @@
505
506
  var h4 = this.$refs.footer.$el.offsetHeight | 0;
506
507
  var h5 = this.$refs.listHeader.$el.offsetHeight | 0;
507
508
  var h6 = this.$refs.listFooter.$el.offsetHeight | 0;
508
- let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - 22;
509
+ var h7 = this.$refs.tableStats?(this.$refs.tableStats.$el.offsetHeight+7 | 0):0;
510
+ let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - h7-22;
511
+ console.log(tableHeight+" "+h7);
509
512
  this.model.tableHeight = tableHeight < 40 ? 350 : tableHeight;
510
513
  this.$nextTick(() => {
511
514
  self.getScrollAttr();
@@ -520,12 +523,8 @@
520
523
  self.isBusy = true;
521
524
  self.tableLoading = true;
522
525
  self.model.nextPage((rtn) => {
523
- if (rtn) {
524
- self.$nextTick(() => {
525
- self.calculatingRowHeight();
526
- self.getScrollAttr();
527
-
528
- });
526
+ if (rtn) {
527
+ self.getScrollAttr();
529
528
  self.$forceUpdate();
530
529
  }
531
530
  self.isBusy = false;
@@ -831,25 +830,15 @@
831
830
  },
832
831
  calculatingRowHeight() {
833
832
  let self = this;
834
- let count = 0;
835
833
 
836
834
  //查询出所有没有设置$heigth的数据并重新设置$heigth
837
- let notHeigthData = self.model.listData.filter(item => {
838
- return item.$heigth === undefined || item.$heigth <= 0
839
- })
840
- if (notHeigthData && notHeigthData.length > 0) {
841
- notHeigthData.forEach((v, i) => {
835
+ self.model.listData.forEach((item, i) => {
836
+ if(item.$heigth === undefined || item.$heigth <= 0){
842
837
  if (self.$refs["rows." + i] && self.$refs["rows." + i].length > 0) {
843
- self.$set(v, "$heigth", self.$refs["rows." + i][0].clientHeight);
838
+ self.$set(item, "$heigth", self.$refs["rows." + i][0].clientHeight);
844
839
  }
845
- });
846
- }
847
-
848
- //for (let i = 0; i < self.model.listData.length; i++) {
849
- // if (self.$refs[]) {
850
- // }
851
- //}
852
- //self.$refs
840
+ }
841
+ });
853
842
  },
854
843
  updateCurrentRow(router,data) {
855
844
  let self = this;
@@ -4,22 +4,46 @@
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
+ {{item.controlLabel}}
9
+ </label>
8
10
  </div>
9
11
  </div>
10
12
  <!--展示-->
11
13
  <div v-if="FlagStatistics" class="tab-list">
12
14
  <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>
15
+ <div v-for="(item, index) in showData[0]" @click="handleClick($event,item)">
16
+ <ul class="btnTab">
17
+ <li :class="[selectStats==item.code1+'*'+item.controlLabel?'activecolor':'']">{{item.controlLabel}}</li>
18
+ <li class="tdcenter">
19
+ <span :class="[selectStats==item.code1+'*'+item.controlLabel?'active':'']"></span>
20
+ </li>
21
+ </ul>
22
+ </div>
14
23
  </template>
15
24
  <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>
17
- <el-popover :append-to-table="option.appendId?option.appendId:''"
25
+ <div v-for="(item, index) in showData[0]" @click="handleClick($event,item)">
26
+ <ul class="btnTab">
27
+ <li :class="[selectStats==item.code1+'*'+item.controlLabel?'activecolor':'']">{{item.controlLabel}}</li>
28
+ <li class="tdcenter">
29
+ <span :class="[selectStats==item.code1+'*'+item.controlLabel?'active':'']"></span>
30
+ </li>
31
+ </ul>
32
+ </div>
33
+ <el-popover :append-to-table="option.appendId?option.appendId:''" class="Stats-popover"
18
34
  :placement="option.placement?option.placement:'left'"
19
- :trigger="option.trigger?option.trigger:''"
20
- 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>
22
- <i slot="reference" class="icon-more"></i>
35
+ :trigger="option.trigger?option.trigger:''">
36
+ <div v-if="FlagStatistics" class="tab-list" style="border-bottom:none">
37
+ <div class="tablf" v-for="(item, index) in showData[1]" @click="handleClick($event,item)" style="text-align:left">
38
+ <ul class="btnTab">
39
+ <li :class="[selectStats==item.code1+'*'+item.controlLabel?'activecolor':'']">{{item.controlLabel}}</li>
40
+ <li class="tdcenter">
41
+ <span :class="[selectStats==item.code1+'*'+item.controlLabel?'active':'']"></span>
42
+ </li>
43
+ </ul>
44
+ </div>
45
+ </div>
46
+ <sapn slot="reference" class="icon-more">⋮</sapn>
23
47
 
24
48
  </el-popover>
25
49
  </template>
@@ -46,7 +70,7 @@
46
70
  option: {
47
71
  isHidden: true,//是否开启操作栏隐藏设置,默认开启
48
72
  showNum: 3,//如果isHidden为true时,个数大于3就会隐藏,默认是3
49
- appendId: '.s-table',//将浮动栏添加到对应id或者class节点中。或者.xxx。传空字符串是添加到body中。
73
+ appendId: '',//将浮动栏添加到对应id或者class节点中。或者.xxx。传空字符串是添加到body中。
50
74
  trigger: 'hover',//触发方式,传值可查看Popper UI组件trigger属性
51
75
  placement: 'bottom-start'//方向,传值可查看Popper UI组件placement属性
52
76
  },
@@ -67,9 +91,10 @@
67
91
  self.data = data.source.content;
68
92
  self.selectVa = "";
69
93
  if (self.data.length > 0) {
70
- if (self.selectStats == []) {
71
- debugger
72
- self.selectStats = self.data[0].code1;
94
+ let i = self.data.findIndex(v => self.selectStats === (v.code1 + "*" + v.controlLabel));
95
+
96
+ if (i == -1 || self.selectStats == []) {
97
+ self.selectStats = self.data[0].code1 + "*" + self.data[0].controlLabel;
73
98
  }
74
99
  self.FlagStatistics = true;
75
100
  self.showStats();
@@ -111,12 +136,14 @@
111
136
  }
112
137
 
113
138
  }
139
+
140
+ self.$emit('setTableHeight');
114
141
  });
115
142
  },
116
143
  handleClick(ev, obj) {
117
144
  var self = this;
118
- self.selectStats = obj.code1;
119
- var fields = self.model.searchData(obj.fieldName1, obj.code1, obj.controlType, obj.searchDataType);
145
+ self.selectStats = obj.code1 + "*" + obj.controlLabel;
146
+ var fields = self.model.searchData(obj.fieldName1, obj.code1, obj.searchOperation, obj.searchDataType);
120
147
  var model = {
121
148
  "searchData": fields
122
149
  };
@@ -148,46 +175,73 @@
148
175
  </style>
149
176
 
150
177
  <style>
151
-
152
178
  .tab-list {
179
+ position:relative;
180
+ margin-bottom: 10px;
153
181
  height: 30px;
154
- border-bottom: 1px solid #E0E0E0;
155
- margin-bottom: 10px;
156
182
  }
157
183
 
158
- .btnTab {
159
- font-size: 14px !important;
160
- font-weight: bold;
161
- padding: 5px 20px;
162
- }
163
-
164
- .btnTab:hover ,.tablf:hover{
165
- color: #ee5d56;
184
+ .tab-list .btnTab {
185
+ font-size: 14px !important;
186
+ font-weight: bold;
187
+ padding: 0px 20px 0px 20px;
188
+ cursor: pointer;
189
+ float: left;
190
+ list-style-type: none;
166
191
  }
167
- .tabl-el{
192
+
193
+ .tab-list .btnTab:hover, .tab-list .tablf:hover {
194
+ color: #ee5d56;
195
+ }
196
+
197
+ .tab-list .tabl-el {
168
198
  max-width: 150px;
169
199
  box-shadow: 0 6px 12px rgb(0 0 0 / 18%);
170
200
  }
171
- .tablf{
172
- font-size: 14px !important;
173
- font-weight: bold;
174
- text-align: center;
175
- padding: 5px 10px;
176
- display: block;
177
- }
178
- .active {
179
- color: #ee5d56 !important;
180
- border-bottom: solid 3px #ee5d56 !important;
181
- background: none;
182
- border-radius: 0 !important;
183
- }
184
201
 
185
- .icon-more {
186
- background: url(../../../assets/vertical.png)no-repeat;
187
- background-size: 80% 80%;
188
- height: 20px;
189
- width: 7px;
190
- display: inline-block;
191
- vertical-align: bottom;
202
+ .tab-list .tablf {
203
+ font-size: 14px !important;
204
+ font-weight: bold;
205
+ text-align: center;
206
+ padding: 15px 10px;
207
+ display: block;
208
+ }
209
+
210
+ .tab-list .tdcenter {
211
+ line-height: 1px;
212
+ height: 1px;
213
+ text-align: center;
214
+ }
215
+
216
+ .tab-list .active {
217
+ color: #ee5d56 !important;
218
+ /* border-bottom-right-radius: 12px !important; */
219
+ /* border-top-right-radius: 11px; */
220
+ width: 20px;
221
+ border-bottom: #ee5d56 solid 3px;
222
+ }
223
+
224
+ .tab-list .activecolor {
225
+ color: #ee5d56 !important;
226
+ }
227
+
228
+
229
+ .tab-list .btnTab span {
230
+ display: inline-block;
231
+ }
232
+
233
+ .tab-list .icon-more {
234
+ color: #ee5d56;
235
+ font-size: 20px;
236
+ font-weight: 900;
237
+ display: inline-block;
238
+ vertical-align: 0.5em;
239
+ margin-top: -3px;
240
+ cursor: pointer;
241
+ }
242
+
243
+ .Stats-popover {
244
+ position:absolute;
245
+ right:5px;
192
246
  }
193
247
  </style>
@@ -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;