centaline-data-driven 1.3.21 → 1.3.24

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.
@@ -12,6 +12,8 @@ const Detail = function (source, para, callBack) {
12
12
  _fields2Dic: null,//数组,方便遍历
13
13
  _actionRouterLabel: null,//标签
14
14
  _otherTradeActionRouter: null,//对应另外种交易的 router 如:本盘出售 则可能对应的出租的交易,没有则为空
15
+ _actionRoutersAll: null,//页面上的动作行为
16
+ _actionRoutersShow: null,//页面上的动作行为
15
17
  _actionRouters: null,//页面上的动作行为
16
18
  _actionRoutersMoreList: null,//页面上的更多动作行为
17
19
  _actionRoutersSimple: null,//页面上的动作行为
@@ -187,23 +189,65 @@ const Detail = function (source, para, callBack) {
187
189
  return rtn._contactApiRouter;
188
190
  }
189
191
  },
192
+ get actionRoutersAll() {
193
+ if (rtn._actionRoutersAll !== null) {
194
+ return rtn._actionRoutersAll;
195
+ }
196
+ else {
197
+ if (data.actionRouters) {
198
+ rtn._actionRoutersAll = [];
199
+ data.actionRouters.forEach((v, i) => {
200
+ var router = Router(v);
201
+ router.is = "ct-btn";
202
+ router.attrs = { size: "mini" }
203
+ rtn._actionRoutersAll.push(router);
204
+ });
205
+ }
206
+ }
207
+ return rtn._actionRoutersAll;
208
+ },
209
+ get actionRoutersShow() {
210
+ if (rtn._actionRoutersShow !== null) {
211
+ return rtn._actionRoutersShow;
212
+ }
213
+ else {
214
+ if (data.actionRouters) {
215
+ rtn._actionRoutersShow = [];
216
+ data.actionRouters.forEach((v, i) => {
217
+ var router = Router(v);
218
+ router.is = "ct-btn";
219
+ router.attrs = { size: "mini" }
220
+ if (router.show) {
221
+ rtn._actionRoutersShow.push(router);
222
+ }
223
+ });
224
+ }
225
+ }
226
+ return rtn._actionRoutersShow;
227
+ },
228
+ get actionRouterPrice() {
229
+ let routerPrice=null;
230
+ if (rtn.actionRoutersAll) {
231
+ rtn.actionRoutersAll.forEach((v, i) => {
232
+ if(v.id=='PropertyPriceLog') routerPrice=v;
233
+ });
234
+ }
235
+ return routerPrice;
236
+ },
190
237
  get actionRouters() {
191
238
  if (rtn._actionRouters !== null) {
192
239
  return rtn._actionRouters;
193
240
  }
194
241
  else {
195
- if (data.actionRouters) {
242
+ if (rtn.actionRoutersShow) {
196
243
  rtn._actionRouters = [];
197
244
  let indexMore = 1;
198
- if (data.actionRouters.length <= 3) {
245
+ if (rtn.actionRoutersShow.length <= 3) {
199
246
  indexMore = 2;
200
247
  }
201
- data.actionRouters.forEach((v, i) => {
248
+ rtn.actionRoutersShow.forEach((v, i) => {
202
249
  if (i <= indexMore) {
203
- var router = Router(v);
204
- router.is = "ct-btn";
205
- router.attrs = { size: "mini" }
206
- rtn._actionRouters.push(router);
250
+ rtn._actionRouters.push(v);
207
251
  }
208
252
  });
209
253
  }
@@ -215,14 +259,11 @@ const Detail = function (source, para, callBack) {
215
259
  return rtn._actionRoutersMoreList;
216
260
  }
217
261
  else {
218
- if (data.actionRouters && data.actionRouters.length > 3) {
262
+ if (rtn.actionRoutersShow && rtn.actionRoutersShow.length > 3) {
219
263
  rtn._actionRoutersMoreList = [];
220
- data.actionRouters.forEach((v, i) => {
264
+ rtn.actionRoutersShow.forEach((v, i) => {
221
265
  if (i >= 2) {
222
- var router = Router(v);
223
- router.is = "ct-btn";
224
- router.attrs = { size: "mini" }
225
- rtn._actionRoutersMoreList.push(router);
266
+ rtn._actionRoutersMoreList.push(v);
226
267
  }
227
268
  });
228
269
  }
@@ -0,0 +1,35 @@
1
+ import base from '../../index';
2
+ import Base from './Base';
3
+ import valid from '../../../validate/index';
4
+ const DragSort = function (source) {
5
+ var init = function (data) {
6
+ var rtn = {
7
+ get tableCol() {
8
+ let l = '';
9
+ if (source.controlLabel) {
10
+ l = source.controlLabel;
11
+ }
12
+ if (source.labelDelimiter) {
13
+ l = l + source.labelDelimiter;
14
+ }
15
+
16
+ return [{
17
+ prop: 'displayName',
18
+ label: l
19
+ }];
20
+ },
21
+ get dragList() {
22
+ return source.code1;
23
+ },
24
+ set dragList(v) {
25
+ source.code1 = v;
26
+ },
27
+ };
28
+ rtn = base.copy(Base(source), rtn);
29
+ rtn = base.copy(rtn, valid.Init(rtn));
30
+ return rtn;
31
+
32
+ };
33
+ return init(source);
34
+ }
35
+ export default DragSort;
@@ -608,6 +608,9 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
608
608
  for (var vkey in row) {
609
609
  rtn.dataDictionary[row[rtn.primaryKey]][vkey] = row[vkey];
610
610
  }
611
+ for (var vkey in rtn.dataDictionary[row[rtn.primaryKey]]) {
612
+ rtn.dataDictionary[row[rtn.primaryKey]][vkey] = row[vkey]||'';
613
+ }
611
614
  });
612
615
  if (rtn.cellLayout) {
613
616
  rtn.$vue.$set(rtn.listData, rtn.selectIndex, rtn.dataDictionary[searchValue1]);
@@ -631,7 +634,6 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
631
634
  }
632
635
  })
633
636
  .catch((error) => {
634
- console.error(error);
635
637
  if (typeof callback !== 'undefined') {
636
638
  callback();
637
639
  }
package/src/main.js CHANGED
@@ -43,8 +43,8 @@ Vue.use(centaline, {
43
43
  return {
44
44
  oldToken: 'a9e42494-1e0b-4c46-834e-eea096ba2564',
45
45
  originalRequestURL: 'http://10.88.22.67:8080',
46
- EstateInfo: '{"estateId":"201703020943128D8A8FCF463E4016D6","estateName":"%E4%B8%87%E7%A7%91%E4%BA%91%E5%9F%8E"}',
47
- Authorization:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImVjODhjOTI1LTU3OTktNDVmNy1iNDI3LWI3M2QwNGVkNWM2NSJ9.fyndFOEg4ThBHv4N2pi3pmPaWWlcD1CVPsYu0G5BKAB1hAgkL_GpOMpCZB5xdjMJLbBVomdoUjnRY7T6JSZb-g',
46
+ EstateInfo: ' {"estateId":"201703020943128D8A8FCF463E4016D6","estateName":"%E4%B8%87%E7%A7%91%E4%BA%91%E5%9F%8E"}',
47
+ Authorization:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjYzMzZiMDJiLTZjOGEtNDIzNC05MGQ5LTliYWI2MTIyNTQzNyJ9.hOxMvGLm03QMPu9C4lgRzkEHC7ECqxJ_L6mfqQRqv39xJ42I8gzSRO-E68vWp-A99ewnxnqvTZ6H_6fOQ9DljQ',
48
48
  };
49
49
  },
50
50
  // 请求完成事件,可判断是否登录过期执行响应操作