centaline-data-driven 1.1.7 → 1.1.8

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.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -1,6 +1,6 @@
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/agenttrans/transactionList/getLayoutOfSearch'" :searchDataApi="'/api/agenttrans/transactionList/getTableList'" :apiParam="para"></ct-searchlist>
4
4
  <!--<ct-searchlist :searchConditionApi="'/api/invoice-info/search-condition'" :searchDataApi="'/api/invoice-info/list'" :apiParam="para"></ct-searchlist>-->
5
5
  <ct-dialog-list></ct-dialog-list>
6
6
  </div>
@@ -12,7 +12,7 @@
12
12
  name: 'App',
13
13
  data() {
14
14
  return {
15
- para: { agentId: "1424932685198864386", estateId: "L201402181627000007233", estateName: "271医院宿舍区", pageOnly: "true", pageTitle: "销控房源列表" }
15
+ para: { invoiceId: "81" }
16
16
  }
17
17
  },
18
18
  mounted() {
@@ -419,7 +419,7 @@ html {
419
419
  background-color: #ee5d56;
420
420
  border-color: #ee5d56;
421
421
  }
422
- .el-button--primary:hover {
422
+ .el-button--primary:hover ,.el-button--warning:hover{
423
423
  background: #f1706b;
424
424
  border-color: #f1706b;
425
425
  color: #FFF;
@@ -650,7 +650,7 @@ html {
650
650
  }
651
651
  .el-col .ct-tableToolbar{
652
652
  background-color: #fff;
653
- }
653
+ }
654
654
 
655
655
  .el-button--primary.is-disabled, .el-button--primary.is-disabled:active, .el-button--primary.is-disabled:focus, .el-button--primary.is-disabled:hover {
656
656
  color: #FFF;
@@ -660,4 +660,4 @@ html {
660
660
 
661
661
  .ct-dialog_app {
662
662
  position: relative
663
- }
663
+ }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="st-serach-screen">
3
3
  <div v-bind="model.attrs" style="width:100%" v-if="!isLoading">
4
- <div class="ct-ptb5">
4
+ <div class="ct-ptb5" v-if="showScreen">
5
5
  <template v-for="(col, index) in model.screen" v-if="col.show !== false">
6
6
  <br v-if="col.is === 'ct-linefeed'" />
7
7
  <component v-else class="list-field" v-bind="col.listBind" :is="col.is" :vmodel="col" :api="model.optionApi" @click="clickHandler(col)"></component>
@@ -54,8 +54,9 @@
54
54
  return {
55
55
  isLoading: true,
56
56
  screenRow: [],
57
- highScreenRow:[],
58
- highScreen:false
57
+ highScreenRow: [],
58
+ highScreen: false,
59
+ showScreen: true
59
60
  }
60
61
  },
61
62
  mounted() {
@@ -89,7 +90,7 @@
89
90
  default:
90
91
  break;
91
92
  }
92
-
93
+
93
94
  },
94
95
  loadScreen() {
95
96
  var self = this;
@@ -122,6 +123,20 @@
122
123
  v.parent = parent;
123
124
  }
124
125
  });
126
+ },
127
+ //无任何筛选条件时,不显示该div
128
+ setScreenShow() {
129
+ let showField = this.model.screen.find((v) => {
130
+ return v.show !== false;
131
+ });
132
+ if (!showField) {
133
+ showField = this.model.btnScreen.find((v) => {
134
+ return v.show !== false;
135
+ });
136
+ if (!showField) {
137
+ this.showScreen = false;
138
+ }
139
+ }
125
140
  },
126
141
  load(data) {
127
142
  var self = this;
@@ -129,6 +144,7 @@
129
144
  self.model.$vue = self;
130
145
  self.loadScreen();
131
146
  self.loadHighScreen();
147
+ self.setScreenShow();
132
148
  self.isLoading = false;
133
149
  self.$emit('loaded', self.model.defaultSearch);
134
150
  }
@@ -20,12 +20,14 @@
20
20
  :class="['ct-table',model.attrs.size?'ct-table-'+model.attrs.size:'']">
21
21
  <!--表头-->
22
22
  <thead ref="tableHead">
23
- <tr class="ct-tr" ref="headTr">
24
- <th v-if="model.isMulti" ref="headLeftThs" class="ct-td left-fixation-th" :style="{'min-width':'20px', 'left':'0px'}">
23
+ <tr class="ct-tr" ref="headTr" v-for="(columns,columnsIndex) in model.columnsArr">
24
+ <th v-if="model.isMulti && columnsIndex === 0" ref="headLeftThs" class="ct-td left-fixation-th" :style="{'min-width':'20px', 'left':'0px'}">
25
25
  <input type="checkbox" @click="selectAll($event)" />
26
26
  </th>
27
- <th :ref="column.fixed?(column.fixed==='left'?'headLeftThs':'headRightThs'):'headThs'" v-for="(column,colIndex) in model.columns"
28
- v-if="column.show" class="ct-td ct-searchtable-th"
27
+ <th :ref="column.fixed?(column.fixed==='left'?'headLeftThs':'headRightThs'):'headThs'" v-for="(column,colIndex) in columns"
28
+ v-if="column.show" class="ct-td ct-searchtable-th"
29
+ :rowspan="column.rowspan"
30
+ :colspan="column.colspan"
29
31
  :class="[colHasWidth[colIndex],column.sortAction,
30
32
  colIndex === leftShadow?'shadowLeft':null,
31
33
  colIndex === rightShadow?'shadowRight':null,
@@ -54,7 +56,7 @@
54
56
  <tr v-if="model.listData.length === 0" class="ct-tr" style="visibility: hidden;">
55
57
  <td v-if="model.isMulti">
56
58
  </td>
57
- <td v-for="(column,colIndex) in model.columns" class="ct-td" v-if="column.show">
59
+ <td v-for="(column,colIndex) in model.dataFieldcolumns" class="ct-td" v-if="column.show">
58
60
  <div :style="{'width': column.width + 'px'}">
59
61
  </div>
60
62
  </td>
@@ -70,7 +72,7 @@
70
72
  <input v-if="!model.rightMulti || row[model.rightMulti] == 1" type="checkbox" v-model="row.$select" />
71
73
  </td>
72
74
  <td :ref="column.fixed?(column.fixed==='left'?'headLeftTds':'headRightTds'):null"
73
- v-for="(column,colIndex) in model.columns"
75
+ v-for="(column,colIndex) in model.dataFieldcolumns"
74
76
  v-if="tdShow(column, row)"
75
77
  :rowspan="tdRowspan(column, row)"
76
78
  class="ct-td"
@@ -273,7 +275,7 @@
273
275
 
274
276
  //col.width = (self.currentTh.oldWidth + (ev1.x - self.currentTh.oldX));
275
277
  self.$set(col, "width", (self.currentTh.oldWidth + (ev1.x - self.currentTh.oldX)));
276
- if (typeof self.$refs.headTr !== 'undefined') {
278
+ if (typeof self.$refs.headTr !== 'undefined' && this.$refs.headTr.length > 0) {
277
279
  self.currentTh.style.minWidth = col.width + 'px';
278
280
  self.currentTh.style.width = col.width + 'px';
279
281
  self.getScrollAttr();
@@ -361,10 +363,10 @@
361
363
  Object.freeze(this.model.listData);
362
364
  },
363
365
  setfixedSize() {
364
- if (typeof this.$refs.headTr !== 'undefined') {
366
+ if (typeof this.$refs.headTr !== 'undefined' && this.$refs.headTr.length > 0) {
365
367
  let fixedSize = 0;
366
368
  let j = 0;
367
- let fixationThArr = this.$refs.headTr.getElementsByClassName('left-fixation-th');
369
+ let fixationThArr = this.$refs.headTr[0].getElementsByClassName('left-fixation-th');
368
370
  if (fixationThArr.length > 0) {
369
371
  if (this.model.isMulti) {
370
372
  fixedSize = fixationThArr[j++].offsetWidth
@@ -377,7 +379,7 @@
377
379
  }
378
380
 
379
381
  fixedSize = 0;
380
- fixationThArr = this.$refs.headTr.getElementsByClassName('right-fixation-th');
382
+ fixationThArr = this.$refs.headTr[0].getElementsByClassName('right-fixation-th');
381
383
  j = fixationThArr.length - 1;
382
384
  for (let i = this.model.columns.length - 1; i > 0; i--) {
383
385
  if (this.model.columns[i].fixed === 'right' && this.model.columns[i].show) {
@@ -27,16 +27,10 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
27
27
  }
28
28
  else {
29
29
  var lockLeft = true;
30
-
31
- //手动添加操作列(可考虑放在后台设置)
32
- //if (rtn.rowRouter.length > 0) {
33
- // var operationColSource = {
34
- // fd: 'Operation',
35
- // dn: '操作',
36
- // fz: '1'
37
- // }
38
- // source.content.Columns.push(operationColSource);
39
- //}
30
+
31
+ self.isMergeTitle = source.content.columns.some(v => {
32
+ return v.trOrder === 2;
33
+ });
40
34
 
41
35
  source.content.columns.forEach((v) => {
42
36
  v.columnWidth = v.columnWidth ? v.columnWidth : 'auto';
@@ -45,7 +39,10 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
45
39
  //}
46
40
 
47
41
  var col = {
48
- fixedSize : 0,
42
+ fixedSize: 0,
43
+ get source() {
44
+ return v;
45
+ },
49
46
  get id() {
50
47
  return common.initialsToUpperCase(v.fieldName);
51
48
  },
@@ -70,6 +67,18 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
70
67
  get show() {
71
68
  return v.visible;
72
69
  },
70
+ get rowspan() {
71
+ return v.rowSpan || 1;
72
+ },
73
+ get colspan() {
74
+ return v.colSpan || 1;
75
+ },
76
+ get trOrder() {
77
+ return v.trOrder || 1;
78
+ },
79
+ get isDataField() {
80
+ return v.isDataField;
81
+ },
73
82
  get width() {
74
83
  return v.columnWidth ? v.columnWidth : undefined;
75
84
  },
@@ -137,8 +146,9 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
137
146
  }
138
147
  }
139
148
  };
140
- if (col.show) {
141
- if (col.lock) {
149
+ if (col.show) {
150
+ //合并表头时暂不支持固定列
151
+ if (col.lock && !self.isMergeTitle) {
142
152
  if (lockLeft) {
143
153
  col.fixed = 'left';
144
154
  }
@@ -158,6 +168,44 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
158
168
  set columns(v) {
159
169
  this._columns = [];
160
170
  source.content.columns = v;
171
+ },
172
+ //因合并表头需要
173
+ isMergeTitle: false,//是否合并标题
174
+ _columnsArr: [],
175
+ get columnsArr() {
176
+ var self = this;
177
+ if (self._columnsArr.length > 0) {
178
+ return self._columnsArr;
179
+ }
180
+ else {
181
+ let i = 1;
182
+ for (; i <= 4; i++) {
183
+ var arr = self.columns.filter(v => {
184
+ return v.trOrder === i
185
+ });
186
+ if (arr.length === 0) {
187
+ break;
188
+ }
189
+
190
+ self._columnsArr.push(arr);
191
+ }
192
+ return self._columnsArr;
193
+ }
194
+ },
195
+ _dataFieldcolumns: [],
196
+ get dataFieldcolumns() {
197
+ var self = this;
198
+ if (self._dataFieldcolumns.length > 0) {
199
+ return self._dataFieldcolumns;
200
+ }
201
+ else {
202
+ var arr = self.columns.filter(v => {
203
+ return v.isDataField === true
204
+ });
205
+
206
+ self._dataFieldcolumns = arr;
207
+ return self._dataFieldcolumns;
208
+ }
161
209
  },
162
210
  get listData() {
163
211
  if (!source.content.rows) {
@@ -168,7 +216,10 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
168
216
  set listData(v) {
169
217
  source.content.rows = v;
170
218
  },
171
- get isMulti() {//是否多选
219
+ get isMulti() {//是否多选
220
+ if (this.isMergeTitle) {
221
+ return false;//合并表头暂不支持多选
222
+ }
172
223
  return source.content.flagCheckBoxColumn === true;
173
224
  },
174
225
  get rightMulti() {//多选权限列
package/src/main.js CHANGED
@@ -12,7 +12,7 @@ Vue.use(ElementUI, { size: 'mini'});
12
12
  // 关闭生产模式下给出的提示
13
13
  Vue.config.productionTip = false;
14
14
  Vue.use(centaline, {
15
- baseUrl: 'http://10.88.22.76:8080/v1/form/router',
15
+ baseUrl: 'http://10.88.200.24:8080/v1/form/router',
16
16
  zindex: 999,
17
17
  handler: {
18
18
  // 打开tab页
@@ -26,8 +26,8 @@ Vue.use(centaline, {
26
26
  // 获取请求头
27
27
  getRequestHeaders: function () {
28
28
  return {
29
- oldToken: '72727a5d-bd85-456c-86a0-0ccce2ef513b',
30
- estateId: '20180316114528B8A4D7FF758E173A7C',
29
+ oldToken: '83cdec3e-edf2-4ea7-afc1-def491569594',
30
+ estateId: '',
31
31
  };
32
32
  },
33
33
  // 请求完成事件,可判断是否登录过期执行响应操作