centaline-data-driven 1.2.78 → 1.2.79

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.78",
3
+ "version": "1.2.79",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/src/Form.vue CHANGED
@@ -2,7 +2,7 @@
2
2
  <div id="app-form" class="data-driven" style="width:100%;height:100%;overflow:auto">
3
3
  <!-- <ct-form :api="'/PropertyRET/getLayoutOfNew'" :apiParam="apiParam"></ct-form> -->
4
4
  <!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
5
- <ct-form :api="'/api/third-dept-tran/second-hand-transaction/add-detail'" :apiParam="apiParam"></ct-form>
5
+ <ct-form :api="'/api/third-dept-tran/transaction/detail'" :apiParam="apiParam"></ct-form>
6
6
  <!--<ct-form :api="'api/Form/formdata'"></ct-form>-->
7
7
  <ct-dialog-list></ct-dialog-list>
8
8
  </div>
@@ -17,11 +17,12 @@
17
17
  // apiParam: {headerParam: {}, urlParam: {contractID: "06cad32e-4d0d-4b6f-bd24-16a28629a550", actionType: "0"}}
18
18
  // apiParam: {originalTraId: "1475658732246241281", actionType: 2, chanceID: "1"} ,
19
19
  // apiParam: {originalTraId: "1516290587463507969", actionType: "3", pageStyle: "2", pageTitle: "成交报告",pageOnly: "true"}
20
- apiParam:{actionType: 2,
21
- externalPropertyId: "54802",
20
+ apiParam:{
21
+ actionType: 3,
22
+ originalTraId: "1526048947277938690",
22
23
  pageOnly: true,
23
24
  pageStyle: 2,
24
- propertyNo: "SHHKS000032362"
25
+ pageTitle: "成交报告"
25
26
  }
26
27
  }
27
28
  },
@@ -4,8 +4,8 @@
4
4
 
5
5
  <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'" :searchDataApi="'/PropertyRETList/getListOfSearchModel'" :searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"></ct-searchlist> -->
6
6
 
7
- <ct-searchlist :searchConditionApi="'/salemattersmanage/squareuploadlist/getLayoutOfSearch'"
8
- :searchDataApi="'/salemattersmanage/squareuploadlist/getList'"></ct-searchlist>
7
+ <ct-searchlist :searchConditionApi="'/api/distribution/agentRelationProperty/getLayoutOfSearch'"
8
+ :searchDataApi="'/api/distribution/agentRelationProperty/list'" :apiParam="para"></ct-searchlist>
9
9
 
10
10
  <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
11
11
  :searchDataApi="'/PropertyRETList/getListOfSearchModel'"
@@ -25,7 +25,13 @@
25
25
  name: 'DataDrivenSearch',
26
26
  data() {
27
27
  return {
28
- para:{},
28
+ para:{
29
+ agentId: "1491335181504401409",
30
+ delegateType: "1",
31
+ estateId: "18721",
32
+ estateName: "凯旋路1798号"
33
+
34
+ },
29
35
  // para: {searchFields: {fields: []}, pageAttribute: {pageIndex: 1}, flagSearch: true}
30
36
  // para: {publishID: "1503900718229229568"}
31
37
  // para: {paramKey: "PropertyStatusID", code: "002.001", name: "盘源状态", paramName: "盘源状态"}
@@ -245,10 +245,14 @@
245
245
  };
246
246
  self.$common.openDialog(dialogOption);
247
247
  }
248
- else if (field.isFormPageInTab || field.isSearchPageInTab) {// 外部框架tab页打开
248
+ else if (field.isFormPageInTab) {// 外部框架tab页打开
249
249
  submitData = field.getActionPara(submitData).para;
250
250
  self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle);
251
251
  }
252
+ else if (field.isSearchPageInTab) {// 外部框架tab页打开
253
+ submitData = field.getActionPara(submitData).para;
254
+ self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
255
+ }
252
256
  else if (field.isBrowserNewTab) {// 浏览器打开
253
257
  submitData = field.getActionPara(submitData).para;
254
258
  let query = self.$common.objectToQueryStr(submitData);
@@ -359,6 +359,7 @@
359
359
  self.$common.openDialog(dialogOption);
360
360
  }
361
361
  else if (field.isOpenList) {
362
+ submitData = field.getActionPara(submitData).para;
362
363
  var dialogOption = {
363
364
  title: field.pageTitle,
364
365
  pane: self.$common.getParentPane(self),
@@ -385,10 +386,14 @@
385
386
  };
386
387
  self.$common.openDialog(dialogOption);
387
388
  }
388
- else if (field.isFormPageInTab || field.isSearchPageInTab) {// 外部框架tab页打开
389
+ else if (field.isFormPageInTab) {// 外部框架tab页打开
389
390
  submitData = field.getActionPara(submitData).para;
390
391
  self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle);
391
392
  }
393
+ else if (field.isSearchPageInTab) {// 外部框架tab页打开
394
+ submitData = field.getActionPara(submitData).para;
395
+ self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
396
+ }
392
397
  else if (field.isBrowserNewTab) {// 浏览器打开
393
398
  submitData = field.getActionPara(submitData).para;
394
399
  let query = self.$common.objectToQueryStr(submitData);
@@ -556,10 +556,14 @@
556
556
  };
557
557
  self.$common.openDialog(dialogOption);
558
558
  }
559
- else if (field.isFormPageInTab || field.isSearchPageInTab) {// 外部框架tab页打开
559
+ else if (field.isFormPageInTab) {// 外部框架tab页打开
560
560
  submitData = field.getActionPara(submitData).para;
561
561
  self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle, self.model,field.dialogWidth);
562
562
  }
563
+ else if (field.isSearchPageInTab) {// 外部框架tab页打开
564
+ submitData = field.getActionPara(submitData).para;
565
+ self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
566
+ }
563
567
  else if (field.isBrowserNewTab) {// 浏览器打开
564
568
  submitData = field.getActionPara(submitData).para;
565
569
  let query = self.$common.objectToQueryStr(submitData);
@@ -365,10 +365,14 @@
365
365
  };
366
366
  self.$common.openDialog(dialogOption);
367
367
  }
368
- else if (field.isFormPageInTab || field.isSearchPageInTab) {// 外部框架tab页打开
368
+ else if (field.isFormPageInTab) {// 外部框架tab页打开
369
369
  submitData = field.getActionPara(submitData).para;
370
370
  self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle, self.model,field.dialogWidth);
371
371
  }
372
+ else if (field.isSearchPageInTab) {// 外部框架tab页打开
373
+ submitData = field.getActionPara(submitData).para;
374
+ self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
375
+ }
372
376
  else if (field.isBrowserNewTab) {// 浏览器打开
373
377
  submitData = field.getActionPara(submitData).para;
374
378
  let query = self.$common.objectToQueryStr(submitData);
@@ -386,10 +386,14 @@
386
386
  };
387
387
  self.$common.openDialog(dialogOption);
388
388
  }
389
- else if (field.isFormPageInTab || field.isSearchPageInTab) {// 外部框架tab页打开
389
+ else if (field.isFormPageInTab) {// 外部框架tab页打开
390
390
  submitData = field.getActionPara(submitData).para;
391
391
  self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle,self.model,field.dialogWidth);
392
392
  }
393
+ else if (field.isSearchPageInTab) {// 外部框架tab页打开
394
+ submitData = field.getActionPara(submitData).para;
395
+ self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
396
+ }
393
397
  else if (field.isBrowserNewTab) {// 浏览器打开
394
398
  submitData = field.getActionPara(submitData).para;
395
399
  let query = self.$common.objectToQueryStr(submitData);
@@ -401,8 +405,13 @@
401
405
  }
402
406
  else {
403
407
  submitData = field.getActionPara(submitData).para;
404
- field.doAction(submitData, (data) => {
405
- self.model.doAction(data);
408
+ field.doAction(submitData, (data) => {
409
+ if(field && field.changeCallBackFunName){
410
+ self.changeCallBackHandler(field, field.changeCallBackFunName, data.content);
411
+ }
412
+ else{
413
+ self.model.doAction(data);
414
+ }
406
415
  })
407
416
  }
408
417
  }
@@ -146,13 +146,17 @@
146
146
  //若不是客户端方法,则直接访问接口
147
147
  if (!field.isClientFuntion) {
148
148
  // 外部框架tab页打开
149
- if (field.isFormPageInTab || field.isSearchPageInTab) {
149
+ if (field.isFormPageInTab) {
150
150
  submitData = field.getActionPara(submitData).para;
151
151
  if (field.pageStyle) {
152
152
  submitData.pageStyle = field.pageStyle;
153
153
  }
154
154
  self.$common.getDataDrivenOpts().handler.openTab(action, submitData, field.pageTitle, self.model, field.dialogWidth);
155
155
  }
156
+ else if (field.isSearchPageInTab) {// 外部框架tab页打开
157
+ submitData = field.getActionPara(submitData).para;
158
+ self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
159
+ }
156
160
  else if (field.isBrowserNewTab) {// 浏览器打开
157
161
  submitData = field.getActionPara(submitData).para;
158
162
  let query = self.$common.objectToQueryStr(submitData);
@@ -728,13 +728,17 @@
728
728
  //若不是客户端方法,则直接访问接口
729
729
  if (!field.isClientFuntion) {
730
730
  // 外部框架tab页打开
731
- if (field.isFormPageInTab || field.isSearchPageInTab) {
731
+ if (field.isFormPageInTab) {
732
732
  submitData = field.getActionPara(submitData).para;
733
733
  if (field.pageStyle) {
734
734
  submitData.pageStyle = field.pageStyle;
735
735
  }
736
736
  self.$common.getDataDrivenOpts().handler.openTab(action, submitData, field.pageTitle, self.model,field.dialogWidth);
737
737
  }
738
+ else if (field.isSearchPageInTab) {// 外部框架tab页打开
739
+ submitData = field.getActionPara(submitData).para;
740
+ self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
741
+ }
738
742
  else if (field.isBrowserNewTab) {// 浏览器打开
739
743
  submitData = field.getActionPara(submitData).para;
740
744
  let query = self.$common.objectToQueryStr(submitData);
@@ -392,10 +392,17 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
392
392
  },
393
393
  //新增或替换表格数据
394
394
  insertOrUpdateRow(tableId,row) {
395
- let listData = this.excuteListData.find((v) => {
396
- return v.id === tableId;
397
- });
398
- listData.insertOrUpdateRow(row);
395
+ let listData = this.excuteListData.find((v) => {
396
+ return v.id === tableId;
397
+ });
398
+ listData.insertOrUpdateRow(row);
399
+ },
400
+ //删除表格数据
401
+ deleteRow(tableId,row) {
402
+ let listData = this.excuteListData.find((v) => {
403
+ return v.id === tableId;
404
+ });
405
+ listData.delRow(row);
399
406
  },
400
407
  //清空表格数据
401
408
  clear(tableId) {
@@ -465,19 +465,29 @@ const FormList = function (source, master) {
465
465
  },
466
466
  insertOrUpdateRow(row) {
467
467
  if(row){
468
- source.rows.push(r);
469
- let iRow = this.initRow(r);
470
- iRow.isNewFlag = true;
471
- rtn._rows.push(iRow);
472
- Vue.set(r, 'edit', iRow.edit);
473
- Vue.set(r, 'delete', iRow.delete);
474
- r.$sourceIndex = rtn._rows.length - 1;
468
+ // source.rows.push(r);
469
+ // let iRow = this.initRow(r);
470
+ // iRow.isNewFlag = true;
471
+ // rtn._rows.push(iRow);
472
+ // Vue.set(r, 'edit', iRow.edit);
473
+ // Vue.set(r, 'delete', iRow.delete);
474
+ // r.$sourceIndex = rtn._rows.length - 1;
475
475
 
476
- let rowData = rtn.rowsItemToTableData(iRow)
477
- rowData.$sourceIndex = rtn._rows.length - 1;
478
- rowData.edit = iRow.edit;
479
- rowData.delete = iRow.delete;
480
- rtn._tableData.push(rowData);
476
+ // let rowData = rtn.rowsItemToTableData(iRow)
477
+ // rowData.$sourceIndex = rtn._rows.length - 1;
478
+ // rowData.edit = iRow.edit;
479
+ // rowData.delete = iRow.delete;
480
+ // rtn._tableData.push(rowData);
481
+ }
482
+ },
483
+ delRow(row) {
484
+ debugger
485
+ if(row && rtn.primaryKeys && rtn.primaryKeys.length>0){
486
+ rtn.rows.forEach((row,i) => {
487
+ debugger
488
+ console.log(row)
489
+
490
+ });
481
491
  }
482
492
  },
483
493
  };
@@ -16,6 +16,9 @@ const RichText = function (source, router) {
16
16
  get action() {
17
17
  return router &&router.action ? router.action : "";//上传完整地址
18
18
  },
19
+ set action(v) {
20
+ source.action = v;
21
+ },
19
22
  };
20
23
  rtn = base.copy(Base(source), rtn);
21
24
  rtn = base.copy(rtn, valid.Init(rtn));
@@ -204,28 +204,28 @@ const SearchScreen = function (source, callBack, screenPara) {
204
204
  }
205
205
  return result;
206
206
  },
207
- // 1 是字符串 2是数字
208
- getDataType(searchDataType)
209
- {
210
- let dataType=1;
211
- switch(searchDataType)
212
- {
213
- case 2:
214
- case 6:
215
- dataType=2;
216
- break;
217
- case 1:
218
- case 3:
219
- case 4:
220
- case 5:
221
- dataType=1;
222
- break;
223
- default:
224
- dataType=1;
225
- break;
226
- }
227
- return dataType;
228
- },
207
+ // 1 是字符串 2是数字
208
+ getDataType(searchDataType)
209
+ {
210
+ let dataType=1;
211
+ switch(searchDataType)
212
+ {
213
+ case 2:
214
+ case 6:
215
+ dataType=2;
216
+ break;
217
+ case 1:
218
+ case 3:
219
+ case 4:
220
+ case 5:
221
+ dataType=1;
222
+ break;
223
+ default:
224
+ dataType=1;
225
+ break;
226
+ }
227
+ return dataType;
228
+ },
229
229
  initScreen(screens) {
230
230
  var rtnscreens = [];
231
231
 
@@ -315,9 +315,12 @@ const LibFunction = {
315
315
  item.is = 'ct-text';
316
316
  break;
317
317
  case Enum.ControlType.RichText://富文本框
318
- var router = source.actionRouters.find((v1) => {
319
- return v1.key === field.fieldName1;
320
- });
318
+ var router ={};
319
+ if(source.actionRouters){
320
+ router = source.actionRouters.find((v1) => {
321
+ return v1.key === field.fieldName1;
322
+ });
323
+ }
321
324
  item = RichText(field, router);
322
325
  item.is = 'ct-rich-text';
323
326
  break;
package/src/main.js CHANGED
@@ -23,6 +23,9 @@ Vue.use(centaline, {
23
23
  openTab: function (action) {
24
24
  alert("打开tab页:" + action)
25
25
  },
26
+ openTabSearch: function (field, submitData) {
27
+ alert("打开tab页Search:" + field.action)
28
+ },
26
29
  openDetail: function (action) {
27
30
  alert("打开tab页:" + action)
28
31
  },