centaline-data-driven 1.3.11 → 1.3.12

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.11",
3
+ "version": "1.3.12",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -4,15 +4,15 @@
4
4
 
5
5
  <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'" :searchDataApi="'/PropertyRETList/getListOfSearchModel'" :searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"></ct-searchlist> -->
6
6
 
7
- <ct-searchlist :searchConditionApi="'/ProfileWorklistList/getLayoutOfSearch'"
7
+ <!-- <ct-searchlist :searchConditionApi="'/ProfileWorklistList/getLayoutOfSearch'"
8
8
  :searchCategoryApi="'/ProfileWorklistList/getLayoutOfSearchCategory'"
9
- :searchDataApi="'/ProfileWorklistList/getListOfSearchModel'" :apiParam="para"></ct-searchlist>
9
+ :searchDataApi="'/ProfileWorklistList/getListOfSearchModel'" :apiParam="para"></ct-searchlist> -->
10
10
 
11
- <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
11
+ <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
12
12
  :searchDataApi="'/PropertyRETList/getListOfSearchModel'"
13
13
  :searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"
14
14
  :searchStatsApi="'/exampleList/getListStats'"
15
- ></ct-searchlist> -->
15
+ ></ct-searchlist>
16
16
 
17
17
  <ct-dialog-list></ct-dialog-list>
18
18
  </div>
@@ -248,7 +248,6 @@
248
248
  .max.el-button.el-button--mini{
249
249
  height: 26px;
250
250
  }
251
- .ct-text .showLabel label{
252
- display: inline-block;
251
+ .ct-text .showLabel label{
253
252
  line-height: 27px!important;
254
253
  }
@@ -591,7 +591,12 @@
591
591
  if (f.model && typeof f.validExcute !== 'undefined') {
592
592
  if (!f.validExcute()) {
593
593
  if(i===0 && f.model.label){
594
- self.$message.error('【'+f.model.label+'】不能为空!');
594
+ if(f.model.is=="ct-file"){
595
+ self.$message.error(f.validMessage);
596
+ }
597
+ else{
598
+ self.$message.error('【'+f.model.label+'】不能为空!');
599
+ }
595
600
  }
596
601
  i++;
597
602
 
@@ -1272,7 +1272,7 @@
1272
1272
  border-bottom: 1px solid #ebeef5;
1273
1273
  width: 100%;
1274
1274
  outline: 0;
1275
- border-top: 1px solid #fff;
1275
+ border-top: 1px solid #ebeef5;
1276
1276
  }
1277
1277
 
1278
1278
  .ct-searchtable .ct-table {
@@ -1282,7 +1282,7 @@
1282
1282
 
1283
1283
  .ct-searchtable .ct-table th {
1284
1284
  background-color: #f4f7fa !important;
1285
- border-top: 1px solid #ebeef5;
1285
+
1286
1286
  }
1287
1287
 
1288
1288
  .ct-searchtable .ct-tr > .ct-td {
@@ -1,284 +1,354 @@
1
1
  <template>
2
2
  <div class="ct-table-Statistics" ref="tableStatistics">
3
-
4
3
  <!--计算占用宽度-->
5
- <div style="position:relative" v-if="FlagStatistics">
6
- <div style="position:absolute;left:-10000px" class="tab-list">
7
- <label v-for="(item, index) in data" class="btnTab" :ref="'StatisticsItem'+index">
8
- {{item.controlLabel}}
4
+ <div style="position: relative" v-if="FlagStatistics">
5
+ <div style="position: absolute; left: -10000px" class="tab-list">
6
+ <label
7
+ v-for="(item, index) in data"
8
+ class="btnTab"
9
+ :ref="'StatisticsItem' + index"
10
+ >
11
+ {{ item.controlLabel }}
9
12
  </label>
10
13
  </div>
11
14
  </div>
12
15
  <!--展示-->
13
16
  <div v-if="FlagStatistics" class="tab-list">
14
- <template v-if="showData.length===1">
15
- <div v-for="(item, index) in showData[0]" @click="handleClick($event,item)">
17
+ <template v-if="showData.length === 1">
18
+ <div
19
+ v-for="(item, index) in showData[0]"
20
+ @click="handleClick($event, item)"
21
+ >
16
22
  <ul class="btnTab">
17
- <li :class="[selectStats==item.code1+'*'+item.controlLabel?'activecolor':'']">{{item.controlLabel}}</li>
23
+ <li
24
+ :class="[
25
+ selectStats == item.code1 + '*' + item.controlLabel
26
+ ? 'activecolor'
27
+ : '',
28
+ ]"
29
+ >
30
+ {{ item.controlLabel }}
31
+ </li>
18
32
  <li class="tdcenter">
19
- <span :class="[selectStats==item.code1+'*'+item.controlLabel?'active':'']"></span>
33
+ <span
34
+ :class="[
35
+ selectStats == item.code1 + '*' + item.controlLabel
36
+ ? 'active'
37
+ : '',
38
+ ]"
39
+ ></span>
20
40
  </li>
21
41
  </ul>
22
42
  </div>
23
43
  </template>
24
- <template v-else-if="showData.length>1">
25
- <div v-for="(item, index) in showData[0]" @click="handleClick($event,item)">
44
+ <template v-else-if="showData.length > 1">
45
+ <div
46
+ v-for="(item, index) in showData[0]"
47
+ @click="handleClick($event, item)"
48
+ >
26
49
  <ul class="btnTab">
27
- <li :class="[selectStats==item.code1+'*'+item.controlLabel?'activecolor':'']">{{item.controlLabel}}</li>
50
+ <li
51
+ :class="[
52
+ selectStats == item.code1 + '*' + item.controlLabel
53
+ ? 'activecolor'
54
+ : '',
55
+ ]"
56
+ >
57
+ {{ item.controlLabel }}
58
+ </li>
28
59
  <li class="tdcenter">
29
- <span :class="[selectStats==item.code1+'*'+item.controlLabel?'active':'']"></span>
60
+ <span
61
+ :class="[
62
+ selectStats == item.code1 + '*' + item.controlLabel
63
+ ? 'active'
64
+ : '',
65
+ ]"
66
+ ></span>
30
67
  </li>
31
68
  </ul>
32
69
  </div>
33
- <el-popover :append-to-table="option.appendId?option.appendId:''" class="Stats-popover" popper-class="el-popover1"
34
- :placement="option.placement?option.placement:'left'"
35
- :trigger="option.trigger?option.trigger:''">
36
- <div v-if="FlagStatistics" class="tab-list" style="border-bottom:none">
37
- <div class="popovertablf" v-for="(item, index) in showData[1]" @click="handleClick($event,item)">
38
- <ul class="popoverbtnTab" style="padding:0px">
39
- <li :class="[selectStats==item.code1+'*'+item.controlLabel?'activecolor':'']">{{item.controlLabel}}</li>
70
+ <el-popover
71
+ :append-to-table="option.appendId ? option.appendId : ''"
72
+ class="Stats-popover"
73
+ popper-class="el-popover1"
74
+ :placement="option.placement ? option.placement : 'left'"
75
+ :trigger="option.trigger ? option.trigger : ''"
76
+ >
77
+ <div
78
+ v-if="FlagStatistics"
79
+ class="tab-list"
80
+ style="border-bottom: none"
81
+ >
82
+ <div
83
+ class="popovertablf"
84
+ v-for="(item, index) in showData[1]"
85
+ @click="handleClick($event, item)"
86
+ >
87
+ <ul class="popoverbtnTab" style="padding: 0px">
88
+ <li
89
+ :class="[
90
+ selectStats == item.code1 + '*' + item.controlLabel
91
+ ? 'activecolor'
92
+ : '',
93
+ ]"
94
+ >
95
+ {{ item.controlLabel }}
96
+ </li>
40
97
  <li class="tdcenter">
41
- <span :class="[selectStats==item.code1+'*'+item.controlLabel?'active':'']"></span>
98
+ <span
99
+ :class="[
100
+ selectStats == item.code1 + '*' + item.controlLabel
101
+ ? 'active'
102
+ : '',
103
+ ]"
104
+ ></span>
42
105
  </li>
43
106
  </ul>
44
107
  <br />
45
108
  </div>
46
109
  </div>
47
110
  <span slot="reference" class="icon-more"></span>
48
-
49
111
  </el-popover>
50
112
  </template>
51
113
  </div>
52
114
  </div>
53
115
  </template>
54
116
  <script>
55
- import dynamicElement from '../../mixins/dynamicElement';
117
+ import dynamicElement from "../../mixins/dynamicElement";
56
118
 
57
- export default {
58
- name: 'ct-tableStatistics',
59
- mixins: [dynamicElement],
60
- props: {
61
- api: String,
62
- searchModel: Object,
63
- },
64
- data() {
65
- return {
66
- FlagStatistics: false,
67
- showWidth: 0,
68
- selectStats: [],
69
- data: [],
70
- showData: [],
71
- option: {
72
- isHidden: true,//是否开启操作栏隐藏设置,默认开启
73
- showNum: 3,//如果isHidden为true时,个数大于3就会隐藏,默认是3
74
- appendId: '',//将浮动栏添加到对应id或者class节点中。或者.xxx。传空字符串是添加到body中。
75
- trigger: 'hover',//触发方式,传值可查看Popper UI组件trigger属性
76
- placement: 'bottom-start'//方向,传值可查看Popper UI组件placement属性
77
- },
119
+ export default {
120
+ name: "ct-tableStatistics",
121
+ mixins: [dynamicElement],
122
+ props: {
123
+ api: String,
124
+ searchModel: Object,
125
+ },
126
+ data() {
127
+ return {
128
+ FlagStatistics: false,
129
+ showWidth: 0,
130
+ selectStats: [],
131
+ data: [],
132
+ showData: [],
133
+ option: {
134
+ isHidden: true, //是否开启操作栏隐藏设置,默认开启
135
+ showNum: 3, //如果isHidden为true时,个数大于3就会隐藏,默认是3
136
+ appendId: "", //将浮动栏添加到对应id或者class节点中。或者.xxx。传空字符串是添加到body中。
137
+ trigger: "hover", //触发方式,传值可查看Popper UI组件trigger属性
138
+ placement: "bottom-start", //方向,传值可查看Popper UI组件placement属性
139
+ },
140
+ };
141
+ },
142
+ mounted() {
143
+ var self = this;
144
+ self.showWidth =
145
+ self.$refs.tableStatistics.offsetWidth || document.body.clientWidth;
146
+ window.onresize = () => {
147
+ self.showWidth =
148
+ self.$refs.tableStatistics.offsetWidth || document.body.clientWidth;
149
+ };
150
+ },
151
+ methods: {
152
+ load(data) {
153
+ var self = this;
154
+ self.model = data;
155
+ self.FlagStatistics = false;
156
+ self.data = data.source.content;
157
+ self.selectVa = "";
158
+ if (self.data.length > 0) {
159
+ let i = self.data.findIndex(
160
+ (v) => self.selectStats === v.code1 + "*" + v.controlLabel
161
+ );
162
+
163
+ if (i == -1 || self.selectStats == []) {
164
+ self.selectStats =
165
+ self.data[0].code1 + "*" + self.data[0].controlLabel;
166
+ }
167
+ self.FlagStatistics = true;
168
+ self.showStats();
78
169
  }
79
170
  },
80
- mounted() {
171
+ showStats() {
81
172
  var self = this;
82
- self.showWidth = self.$refs.tableStatistics.offsetWidth || document.body.clientWidth;
83
- window.onresize = () => {
84
- self.showWidth = self.$refs.tableStatistics.offsetWidth || document.body.clientWidth;
85
- };
86
- },
87
- methods: {
88
- load(data) {
89
- var self = this;
90
- self.model = data;
91
- self.FlagStatistics = false;
92
- self.data = data.source.content;
93
- self.selectVa = "";
173
+ this.$nextTick(function () {
94
174
  if (self.data.length > 0) {
95
- let i = self.data.findIndex(v => self.selectStats === (v.code1 + "*" + v.controlLabel));
96
-
97
- if (i == -1 || self.selectStats == []) {
98
- self.selectStats = self.data[0].code1 + "*" + self.data[0].controlLabel;
99
- }
100
- self.FlagStatistics = true;
101
- self.showStats();
102
- }
103
- },
104
- showStats() {
105
- var self = this;
106
- this.$nextTick(function () {
107
- if (self.data.length > 0) {
108
- var showIndex = 0;
109
- var sumWidth = 0;
110
- for (var i = 0; i < self.data.length; i++) {
111
- var moreWidth = 20;
112
- sumWidth = sumWidth + self.$refs["StatisticsItem" + i][0].offsetWidth;
113
- var nextWidth = 0;
114
- if (i + 1 < self.data.length) {
115
- try {
116
- nextWidth = self.$refs["StatisticsItem" + (i + 1)][0].offsetWidth;
117
- } catch (e) {
118
-
119
- }
120
- }
121
- else {
122
- moreWidth = 0;
123
- }
124
- if (self.showWidth < (sumWidth + moreWidth)) {
125
- showIndex = i;
126
- break;
127
- }
128
- else if (self.showWidth < (nextWidth + moreWidth)) {
129
- showIndex = i + 1;
130
- break;
131
- }
132
- }
133
- if (showIndex > 0) {
134
- self.showData = [self.data.slice(0, showIndex), self.data.slice(showIndex)];
175
+ var showIndex = 0;
176
+ var sumWidth = 0;
177
+ for (var i = 0; i < self.data.length; i++) {
178
+ var moreWidth = 20;
179
+ sumWidth =
180
+ sumWidth + self.$refs["StatisticsItem" + i][0].offsetWidth;
181
+ var nextWidth = 0;
182
+ if (i + 1 < self.data.length) {
183
+ try {
184
+ nextWidth =
185
+ self.$refs["StatisticsItem" + (i + 1)][0].offsetWidth;
186
+ } catch (e) {}
135
187
  } else {
136
- self.showData = [self.data];
188
+ moreWidth = 0;
189
+ }
190
+ if (self.showWidth < sumWidth + moreWidth) {
191
+ showIndex = i;
192
+ break;
193
+ } else if (self.showWidth < nextWidth + moreWidth) {
194
+ showIndex = i + 1;
195
+ break;
137
196
  }
138
-
139
- }
140
-
141
- self.$emit('setTableHeight');
142
- });
143
- },
144
- handleClick(ev, obj) {
145
- var self = this;
146
- self.selectStats = obj.code1 + "*" + obj.controlLabel;
147
- var fields = self.model.searchData(obj.fieldName1, obj.code1, obj.searchOperation, obj.searchDataType);
148
- var model = {
149
- "searchData": fields
150
- };
151
- self.$emit('searchStats', model);
152
- },
153
- searchStatsComplate(selectItem) {
154
- var self = this;
155
- this.$nextTick(function () {
156
- if (typeof self.api !== 'undefined') {
157
- self.loaderObj.SearchStats(self.api, self.load, this.searchModel);
158
- }
159
- if (typeof self.source !== 'undefined') {
160
- self.load(self.loaderObj.SearchStats(self.source));
161
197
  }
162
- if (self.vmodel) {
163
- self.load(self.vmodel);
198
+ if (showIndex > 0) {
199
+ self.showData = [
200
+ self.data.slice(0, showIndex),
201
+ self.data.slice(showIndex),
202
+ ];
203
+ } else {
204
+ self.showData = [self.data];
164
205
  }
165
- });
166
- }
206
+ }
207
+
208
+ self.$emit("setTableHeight");
209
+ });
167
210
  },
168
- watch: {
169
- showWidth: function (newVal, oldVal) {
170
- this.showStats();
171
- }
172
- }
173
- }
211
+ handleClick(ev, obj) {
212
+ var self = this;
213
+ self.selectStats = obj.code1 + "*" + obj.controlLabel;
214
+ var fields = self.model.searchData(
215
+ obj.fieldName1,
216
+ obj.code1,
217
+ obj.searchOperation,
218
+ obj.searchDataType
219
+ );
220
+ var model = {
221
+ searchData: fields,
222
+ };
223
+ self.$emit("searchStats", model);
224
+ },
225
+ searchStatsComplate(selectItem) {
226
+ var self = this;
227
+ this.$nextTick(function () {
228
+ if (typeof self.api !== "undefined") {
229
+ self.loaderObj.SearchStats(self.api, self.load, this.searchModel);
230
+ }
231
+ if (typeof self.source !== "undefined") {
232
+ self.load(self.loaderObj.SearchStats(self.source));
233
+ }
234
+ if (self.vmodel) {
235
+ self.load(self.vmodel);
236
+ }
237
+ });
238
+ },
239
+ },
240
+ watch: {
241
+ showWidth: function (newVal, oldVal) {
242
+ this.showStats();
243
+ },
244
+ },
245
+ };
174
246
  </script>
175
247
  <style>
176
248
  </style>
177
249
 
178
250
  <style>
179
- .ct-table-Statistics{
251
+ .ct-table-Statistics {
180
252
  height: 20px;
181
253
  margin-bottom: 10px;
182
254
  }
183
- .tab-list {
184
- position: relative;
185
- margin-bottom: 10px;
186
- height: 30px;
187
- }
188
-
189
- .tab-list .btnTab {
190
- font-size: 14px !important;
191
- font-weight: bold;
192
- padding: 0px 20px 0px 20px;
193
- cursor: pointer;
194
- float: left;
195
- list-style-type: none;
196
- }
197
-
198
- .tab-list .btnTab:hover, .tab-list .tablf:hover {
199
- color: #ee5d56;
200
- }
201
-
202
- .tab-list .popoverbtnTab:hover, .tab-list .popovertablf:hover {
203
- color: #ee5d56;
204
- }
205
-
206
- .tab-list .tabl-el {
207
- max-width: 150px;
208
- box-shadow: 0 6px 12px rgb(0 0 0 / 18%);
209
- }
210
-
211
- .tab-list .tablf {
212
- font-size: 14px !important;
213
- font-weight: bold;
214
- text-align: center;
215
- padding: 15px 10px;
216
- display: block;
217
- }
255
+ .tab-list {
256
+ position: relative;
257
+ margin-bottom: 10px;
258
+ height: 30px;
259
+ }
218
260
 
219
- .tab-list .popovertablf {
220
- font-size: 14px !important;
221
- font-weight: bold;
222
- text-align: center;
223
- display: block;
224
- padding: 5px 8px;
225
- }
261
+ .tab-list .btnTab {
262
+ font-size: 14px !important;
263
+ font-weight: bold;
264
+ padding: 0px 20px 0px 20px;
265
+ cursor: pointer;
266
+ float: left;
267
+ list-style-type: none;
268
+ }
226
269
 
227
- .tab-list .popoverbtnTab {
228
- font-size: 14px !important;
229
- font-weight: bold;
230
- cursor: pointer;
231
- float: left;
232
- list-style-type: none;
233
- padding: 0px 20px 0px 20px;
234
- }
270
+ .tab-list .btnTab:hover,
271
+ .tab-list .tablf:hover {
272
+ color: #ee5d56;
273
+ }
235
274
 
236
- .tab-list .tdcenter {
237
- line-height: 1px;
238
- height: 1px;
239
- text-align: center;
240
- }
275
+ .tab-list .popoverbtnTab:hover,
276
+ .tab-list .popovertablf:hover {
277
+ color: #ee5d56;
278
+ }
241
279
 
242
- .tab-list .active {
243
- color: #ee5d56 !important;
244
- /* border-bottom-right-radius: 12px !important; */
245
- /* border-top-right-radius: 11px; */
246
- width: 20px;
247
- border-bottom: #ee5d56 solid 3px;
248
- }
280
+ .tab-list .tabl-el {
281
+ max-width: 150px;
282
+ box-shadow: 0 6px 12px rgb(0 0 0 / 18%);
283
+ }
249
284
 
285
+ .tab-list .tablf {
286
+ font-size: 14px !important;
287
+ font-weight: bold;
288
+ text-align: center;
289
+ padding: 15px 10px;
290
+ display: block;
291
+ }
250
292
 
293
+ .tab-list .popovertablf {
294
+ font-size: 14px !important;
295
+ font-weight: bold;
296
+ text-align: center;
297
+ display: block;
298
+ padding: 5px 8px;
299
+ }
251
300
 
252
- .tab-list .activecolor {
253
- color: #ee5d56 !important;
254
- }
301
+ .tab-list .popoverbtnTab {
302
+ font-size: 14px !important;
303
+ font-weight: bold;
304
+ cursor: pointer;
305
+ float: left;
306
+ list-style-type: none;
307
+ padding: 0px 20px 0px 20px;
308
+ }
255
309
 
256
- .tab-list .btnTab span, .tab-list .popovertablf span {
257
- display: inline-block;
258
- }
310
+ .tab-list .tdcenter {
311
+ line-height: 1px;
312
+ height: 1px;
313
+ text-align: center;
314
+ }
259
315
 
316
+ .tab-list .active {
317
+ color: #ee5d56 !important;
318
+ /* border-bottom-right-radius: 12px !important; */
319
+ /* border-top-right-radius: 11px; */
320
+ width: 20px;
321
+ border-bottom: #ee5d56 solid 3px;
322
+ }
260
323
 
324
+ .tab-list .activecolor {
325
+ color: #ee5d56 !important;
326
+ }
261
327
 
262
- .tab-list .icon-more {
263
- color: #ee5d56;
264
- font-size: 20px;
265
- font-weight: 900;
266
- display: inline-block;
267
- vertical-align: 0.5em;
268
- margin-top: -3px;
269
- cursor: pointer;
270
- }
328
+ .tab-list .btnTab span,
329
+ .tab-list .popovertablf span {
330
+ display: inline-block;
331
+ }
271
332
 
272
-  .Stats-popover {
273
- float: left;
274
- margin-top: 4px;
275
- margin-left: 4px;
276
- height: 16px;
277
- }
333
+ .tab-list .icon-more {
334
+ color: #ee5d56;
335
+ font-size: 20px;
336
+ font-weight: 900;
337
+ display: inline-block;
338
+ vertical-align: 0.5em;
339
+ margin-top: -3px;
340
+ cursor: pointer;
341
+ }
278
342
 
343
+  .Stats-popover {
344
+ /* float: left; */
345
+ /* margin-top: 4px; */
346
+ margin-left: 4px;
347
+ height: 16px;
348
+ }
279
349
  </style>
280
350
  <style>
281
- .el-popover1 {
282
- min-width: inherit !important;
283
- }
351
+ .el-popover1 {
352
+ min-width: inherit !important;
353
+ }
284
354
  </style>
@@ -571,7 +571,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
571
571
  },
572
572
  getCurrentRowApiData(callback, rtnData, router,cellindex) {
573
573
  var self = this;
574
- var searchFields = this.searchModel ? this.searchModel.searchData : { fields: [] };
574
+ var searchFields = { fields: [] };//this.searchModel ? this.searchModel.searchData : { fields: [] };
575
575
  var searchValue1 = router.flagAddRowAfterAction ? rtnData.responseData.content : rtn.listData[rtn.selectIndex][self.primaryKey];
576
576
  if (self.primaryKey) {
577
577
  searchFields.fields.push({