centaline-data-driven 1.1.52 → 1.1.53

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.52",
3
+ "version": "1.1.53",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/src/Edit.vue CHANGED
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <div id="app">
3
- <!-- <formListTable></formListTable> -->
4
- <el-button @click="copyField">test</el-button>
3
+ <formListTable></formListTable>
5
4
  </div>
6
5
 
7
6
  </template>
@@ -22,40 +21,7 @@
22
21
  TestEdit() {
23
22
  this.$api.post('http://10.88.22.52:2828//api/values/edit', { content: this.template }, (data) => {
24
23
  });
25
- },
26
- copyField()
27
- {
28
- debugger;
29
- var self = this;
30
- var dialogOption = {
31
- title: "复制控件",
32
- content: [
33
- {
34
- component: "ct-form",
35
- attrs: {
36
- showTitle: false,
37
- api: "/forminfo/readTargetDetail",
38
- apiParam: {
39
- formId: "1ae27876-a938-4ea5-aeab-fb2a7b067a2f",
40
- actionType: 3,
41
- },
42
- width: "1300px",
43
- height: "650px",
44
- },
45
- on: {
46
- submit(ev) {
47
- self.$common.closeDialog(dialogOption.dialog);
48
- },
49
- closeDialog() {
50
-
51
- },
52
- },
53
- },
54
- ],
55
- };
56
- self.$common.openDialog(dialogOption);
57
-
58
- },
24
+ }
59
25
  },
60
26
  created() {
61
27
  //this.$api.get('http://10.88.22.52:2828//api/values/test', null, (data) => {
package/src/Form.vue CHANGED
@@ -1,24 +1,39 @@
1
1
  <template>
2
2
  <div id="app-form" class="data-driven" style="width:100%;height:100%;overflow:auto">
3
- <ct-form :api="'PropertyKey/getLayoutOfNew'" :apiParam="apiParam"></ct-form>
3
+ <!-- <ct-form :api="'/api/third-dept-tran/transaction/detail'" :apiParam="apiParam"></ct-form> -->
4
4
  <!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
5
5
  <!--:api="'FormSample/formdata'"-->
6
6
  <!--<ct-form :source="formdata.content"></ct-form>-->
7
7
  <!--<ct-form :api="'/api/form/formdata/contractDetail'" :apiParam="apiParam"></ct-form>-->
8
8
  <!--<ct-form :api="'api/Form/formdata'"></ct-form>-->
9
+ <!-- <ct-form :api="'/forminfo/readDetail'" :apiParam="apiParam"></ct-form> -->
10
+ <!-- <ct-form :api="'PropertyKey/getLayoutOfNew'" :apiParam="apiParam"></ct-form> -->
11
+ <ct-form :api="'Worklist/getLayoutOfAudit'" :apiParam="apiParam"></ct-form>
12
+ <!-- <ct-form :api="'/api/distribution/transaction/add'" :apiParam="apiParam"></ct-form> -->
9
13
  <ct-dialog-list></ct-dialog-list>
10
14
  </div>
11
15
  </template>
12
16
 
13
17
  <script>
14
18
  export default {
15
- name: 'App',
19
+ name: 'DataDrivenForm',
16
20
  data() {
17
21
  return {
18
- apiParam: {
19
- actionType: 2,
20
- propertyID: "1"
21
- } ,
22
+ // apiParam: {originalTraId: "1481454808274235394", actionType: 3, pageTitle: "成交报告", pageOnly: true} ,
23
+ // apiParam: {headerParam: {}, urlParam: {contractID: "06cad32e-4d0d-4b6f-bd24-16a28629a550", actionType: "0"}}
24
+ // apiParam: {SN: "13557_132", UserID: "wuhan3"},
25
+ // apiParam: {actionType: 3,formId: "2c12649f-09c5-4aa9-8011-b6d1c7b56a41"} ,
26
+ // apiParam: {chanceID: "1", actionType: 2} ,
27
+ apiParam: {worklistID: "1491261975253094400", actionType: 2}
28
+ // apiParam: {
29
+ // actionType: 2,
30
+ // agentId: "1450283160825425922",
31
+ // estateId: "B6E6B3D8-FDF2-4AF8-91E6-B348D637E993",
32
+ // pageOnly: true,
33
+ // pageStyle: 2,
34
+ // propertyId: "14102015-0736-9265-205A-451687BF7062",
35
+ // relProId: "1475708315466829833",
36
+ // }
22
37
  }
23
38
  },
24
39
  methods: {
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div id="app-search" style="height:100%;position: fixed;">
3
3
  <!-- <ct-searchlist :searchConditionApi="'/api/third-dept-tran/tran-list/layout'" :searchDataApi="'/api/third-dept-tran/tran-list'"></ct-searchlist> -->
4
- <ct-searchlist :searchConditionApi="'/system/menulist/getLayoutOfSearch'" :searchDataApi="'/system/menulist/getList'"></ct-searchlist>
4
+ <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'" :searchDataApi="'/PropertyRETList/getListOfSearchModel'" :searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"></ct-searchlist>
5
5
  <!--<ct-searchlist :searchConditionApi="'/api/invoice-info/search-condition'" :searchDataApi="'/api/invoice-info/list'" :searchDataStatisticsApi="'api/ContractList/GetLayoutOfStatisticsTool'" :apiParam="para"></ct-searchlist>-->
6
6
  <ct-dialog-list></ct-dialog-list>
7
7
  </div>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div id="app-Tree" style="height:100%;position: fixed;width:100%">
3
3
  <ct-treelist :flagsearch="true" :apiParam="apiParam"
4
- :searchConditionApi="'/SystemParameterCatalogList/getListOfSearchModel'"
4
+ :searchConditionApi="'/SystemParameterCatalogList/getLayoutOfSearch'"
5
5
  :searchDataApi="'/SystemParameterCatalogList/getListOfSearchModel'" @loaded="loaded"></ct-treelist>
6
6
  <ct-dialog-list></ct-dialog-list>
7
7
  </div>
@@ -14,11 +14,7 @@
14
14
  data() {
15
15
  return {
16
16
  isShowSearchlist: false,
17
- apiParam: {
18
- flagSearch: true,
19
- searchFields: {},
20
- pageAttribute: {pageIndex: 1}
21
- }
17
+ apiParam: {}
22
18
  }
23
19
  },
24
20
  methods: {
@@ -736,3 +736,8 @@ html {
736
736
  .ct-dialog_body .el-card__body{
737
737
  padding: 0px 3px 10px 10px!important;
738
738
  }
739
+ .ct-text .ct-font-size-mini span{
740
+ display: inline-block;
741
+ margin-top: 1px;
742
+ color: #388cd3;
743
+ }
@@ -144,9 +144,7 @@
144
144
  <div class="row-i"><span>装修:</span><span>豪装</span></div>
145
145
  <div class="row-i"><span>租赁期:</span><span>半年</span></div>
146
146
  <div class="row-i"><span>付款方式:</span><span>一次性全款</span></div>
147
- <div class="row-i">
148
- <span>可否注册公司:</span><span>是</span>
149
- </div>
147
+ <div class="row-i"><span>可否注册公司:</span><span>是</span></div>
150
148
  </div>
151
149
  </div>
152
150
  <div class="info-conten-b" v-show="allInfo">
@@ -217,6 +217,16 @@
217
217
  var router = this.model.buttons.find((v) => {
218
218
  return v.id === field.id;
219
219
  });
220
+ if(router==undefined){
221
+ router = this.model.links.find((v) => {
222
+ return v.id === field.id;
223
+ });
224
+ }
225
+ if(router==undefined){
226
+ router = this.model.actionRouters.find((v) => {
227
+ return v.id === field.id;
228
+ });
229
+ }
220
230
  this.clickHandler(router);
221
231
  },
222
232
  clickHandler(field, submitData) {
@@ -224,61 +234,139 @@
224
234
  this.model.scripts.$fd = field.id;
225
235
  this.model.scripts.$result = [];
226
236
 
227
- var clickAcion = function (field) {
228
- if (field.isSubmit) {
229
- let verified = true;
230
- if (self.validExcute()) {
237
+ var clickAcion = function (field) {
238
+ //若不是客户端方法,则直接访问接口
239
+ if (!field.isClientFuntion) {
240
+ if (field.isSubmit) {
241
+ let verified = true;
242
+ if (self.validExcute()) {
243
+ if (typeof field.onClick !== 'undefined') {
244
+ verified = self.$common.excute.call(self.model.scripts, field.onClick);
245
+ }
246
+
247
+ if (verified) {
248
+ //action有值,提交到后台
249
+ if (field.action) {
250
+ field.disabled = true;//提交按钮禁用
251
+ self.model.pageDisabled= true;
252
+ field.doAction(self.getFormObj(), (data) => {
253
+ if (data.rtnCode === 200) {
254
+ if (self.model.flagAlertClose) {
255
+ self.$common.confirm('操作成功,是否关闭本页面?', '提示', {
256
+ confirmButtonText: '确定',
257
+ cancelButtonText: '取消',
258
+ type: 'warning'
259
+ }).then(() => {
260
+ //如果没有弹框 则关闭tab页
261
+ if (self.$common.dialogList && self.$common.dialogList.List.length === 0) {
262
+ if (typeof self.$common.getDataDrivenOpts().handler.closeTab === 'function') {
263
+ self.$common.getDataDrivenOpts().handler.closeTab();
264
+ }
265
+ }
266
+ self.$emit('submit', { formData: self.model, responseData: data });
267
+ }).catch(() => {
268
+ self.init();
269
+ });
270
+ }
271
+ else {
272
+ self.$emit('submit', { formData: self.model, responseData: data });
273
+ }
274
+ if (self.parentModel) {
275
+ self.parentModel.$vue.closeTabThen(data);
276
+ }
277
+ }
278
+ field.disabled = false;
279
+ self.model.pageDisabled= false;
280
+ });
281
+ }
282
+ //无值,触发submit事件
283
+ else {
284
+ self.$emit('submit', { formData: self.model, responseData: {} });
285
+ }
286
+ }
287
+ }
288
+ }
289
+ else {
231
290
  if (typeof field.onClick !== 'undefined') {
232
291
  verified = self.$common.excute.call(self.model.scripts, field.onClick);
233
292
  }
234
293
 
235
- if (verified) {
236
- //action有值,提交到后台
237
- if (field.action) {
238
- field.disabled = true;//提交按钮禁用
239
- self.model.pageDisabled= true;
240
- field.doAction(self.getFormObj(), (data) => {
241
- if (data.rtnCode === 200) {
242
- if (self.model.flagAlertClose) {
243
- self.$common.confirm('操作成功,是否关闭本页面?', '提示', {
244
- confirmButtonText: '确定',
245
- cancelButtonText: '取消',
246
- type: 'warning'
247
- }).then(() => {
248
- //如果没有弹框 则关闭tab页
249
- if (self.$common.dialogList && self.$common.dialogList.List.length === 0) {
250
- if (typeof self.$common.getDataDrivenOpts().handler.closeTab === 'function') {
251
- self.$common.getDataDrivenOpts().handler.closeTab();
252
- }
253
- }
254
- self.$emit('submit', { formData: self.model, responseData: data });
255
- }).catch(() => {
256
- self.init();
294
+ if (!submitData) {
295
+ submitData = {};
296
+ var tempFormData = self.model.getFormObj();
297
+ field.submitFormField.forEach((v) => {
298
+ submitData[v] = tempFormData[v];
299
+ });
300
+ }
301
+
302
+ if (field.isOpenForm) {
303
+ var dialogOption = {
304
+ title: field.pageTitle,
305
+ pane: self.$common.getParentPane(self),
306
+ content: [{
307
+ component: 'ct-form',
308
+ attrs: {
309
+ //ssource: data.content,
310
+ api: field.action,
311
+ apiParam: field.getActionPara(submitData).para,
312
+ showTitle: false,
313
+ width: field.dialogWidth + 'px',
314
+ height: field.dialogHeight + 'px'
315
+ },
316
+ on: {
317
+ submit(ev) {
318
+ self.model.updateFields(ev, () => {
319
+ self.$refs.Fields.forEach((fd) => {
320
+ fd.$forceUpdate();
321
+ });
257
322
  });
323
+ self.$common.closeDialog(dialogOption.dialog);
258
324
  }
259
- else {
260
- self.$emit('submit', { formData: self.model, responseData: data });
261
- }
262
- if (self.parentModel) {
263
- self.parentModel.$vue.closeTabThen(data);
325
+ }
326
+ }]
327
+ };
328
+ self.$common.openDialog(dialogOption);
329
+ }
330
+ else if (field.isOpenList) {
331
+ var dialogOption = {
332
+ title: field.pageTitle,
333
+ pane: self.$common.getParentPane(self),
334
+ content: [{
335
+ component: 'ct-searchlist',
336
+ attrs: {
337
+ searchConditionApi: field.actionForSearchLayout,
338
+ searchDataApi: field.actionForSearch,
339
+ apiParam: submitData,
340
+ width: field.dialogWidth + 'px',
341
+ height: field.dialogHeight + 'px'
342
+ },
343
+ on: {
344
+ submit(ev) {
345
+ self.model.updateFields(ev, () => {
346
+ self.$refs.Fields.forEach((fd) => {
347
+ fd.$forceUpdate();
348
+ });
349
+ });
350
+ self.$common.closeDialog(dialogOption.dialog);
264
351
  }
265
352
  }
266
- field.disabled = false;
267
- self.model.pageDisabled= false;
268
- });
269
- }
270
- //无值,触发submit事件
271
- else {
272
- self.$emit('submit', { formData: self.model, responseData: {} });
273
- }
353
+ }]
354
+ };
355
+ self.$common.openDialog(dialogOption);
356
+ }
357
+ else if (field.isFormPageInTab || field.isSearchPageInTab) {// 外部框架tab页打开
358
+ submitData = field.getActionPara(submitData).para;
359
+ self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle);
360
+ }
361
+ else if (field.isBrowserNewTab) {// 浏览器打开
362
+ submitData = field.getActionPara(submitData).para;
363
+ let query = self.$common.objectToQueryStr(submitData);
364
+ window.open(field.action + query, "_blank");
274
365
  }
275
366
  }
276
367
  }
368
+ //执行客户端脚本
277
369
  else {
278
- if (typeof field.onClick !== 'undefined') {
279
- verified = self.$common.excute.call(self.model.scripts, field.onClick);
280
- }
281
-
282
370
  if (!submitData) {
283
371
  submitData = {};
284
372
  var tempFormData = self.model.getFormObj();
@@ -286,71 +374,11 @@
286
374
  submitData[v] = tempFormData[v];
287
375
  });
288
376
  }
289
-
290
- if (field.isOpenForm) {
291
- var dialogOption = {
292
- title: field.pageTitle,
293
- pane: self.$common.getParentPane(self),
294
- content: [{
295
- component: 'ct-form',
296
- attrs: {
297
- //ssource: data.content,
298
- api: field.action,
299
- apiParam: field.getActionPara(submitData).para,
300
- showTitle: false,
301
- width: field.dialogWidth + 'px',
302
- height: field.dialogHeight + 'px'
303
- },
304
- on: {
305
- submit(ev) {
306
- self.model.updateFields(ev, () => {
307
- self.$refs.Fields.forEach((fd) => {
308
- fd.$forceUpdate();
309
- });
310
- });
311
- self.$common.closeDialog(dialogOption.dialog);
312
- }
313
- }
314
- }]
315
- };
316
- self.$common.openDialog(dialogOption);
317
- }
318
- else if (field.isOpenList) {
319
- var dialogOption = {
320
- title: field.pageTitle,
321
- pane: self.$common.getParentPane(self),
322
- content: [{
323
- component: 'ct-searchlist',
324
- attrs: {
325
- searchConditionApi: field.actionForSearchLayout,
326
- searchDataApi: field.actionForSearch,
327
- apiParam: submitData,
328
- width: field.dialogWidth + 'px',
329
- height: field.dialogHeight + 'px'
330
- },
331
- on: {
332
- submit(ev) {
333
- self.model.updateFields(ev, () => {
334
- self.$refs.Fields.forEach((fd) => {
335
- fd.$forceUpdate();
336
- });
337
- });
338
- self.$common.closeDialog(dialogOption.dialog);
339
- }
340
- }
341
- }]
342
- };
343
- self.$common.openDialog(dialogOption);
344
- }
345
- else if (field.isFormPageInTab || field.isSearchPageInTab) {// 外部框架tab页打开
346
- submitData = field.getActionPara(submitData).para;
347
- self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle);
348
- }
349
- else if (field.isBrowserNewTab) {// 浏览器打开
350
- submitData = field.getActionPara(submitData).para;
351
- let query = self.$common.objectToQueryStr(submitData);
352
- window.open(field.action + query, "_blank");
353
- }
377
+ submitData = field.getActionPara(submitData).para;
378
+ let title=field.pageTitle==undefined ?field.label:field.pageTitle;
379
+ submitData.actionType=field.actionType;
380
+ var fun =self.$common.getDataDrivenOpts().handler[field.action];
381
+ fun(submitData,title,self.model);
354
382
  }
355
383
  }
356
384
 
@@ -8,4 +8,4 @@ if (typeof window !== 'undefined' && window.Vue) {
8
8
  window.Vue.use(dynamicHyperLink);
9
9
  }
10
10
 
11
- export default dynamicHyperLink
11
+ export default dynamicHyperLink
@@ -8,4 +8,4 @@ if (typeof window !== 'undefined' && window.Vue) {
8
8
  window.Vue.use(dynamicPlaceHolder);
9
9
  }
10
10
 
11
- export default dynamicPlaceHolder
11
+ export default dynamicPlaceHolder
@@ -16,17 +16,17 @@
16
16
  data() {
17
17
  return {
18
18
  activeName: '1',
19
- editableTabs: [
20
- { name: '1', title: '用户管理' },
21
- { name: '2', title: '配置管理' },
22
- { name: '3', title: '角色管理' },
23
- { name: '4', title: '定时任务补偿' },
24
- { name: '5', title: '定时任务补偿2' },
25
- { name: '6', title: '定时任务补偿3' },
26
- { name: '7', title: '定时任务补偿4' },
27
- { name: '8', title: '定时任务补偿5' },
28
- { name: '9', title: '定时任务补偿6' },
29
- { name: '10', title: '定时任务补偿7' }
19
+ editableTabs: [
20
+ { name: '1', title: '用户管理' },
21
+ { name: '2', title: '配置管理' },
22
+ { name: '3', title: '角色管理' },
23
+ { name: '4', title: '定时任务补偿' },
24
+ { name: '5', title: '定时任务补偿2' },
25
+ { name: '6', title: '定时任务补偿3' },
26
+ { name: '7', title: '定时任务补偿4' },
27
+ { name: '8', title: '定时任务补偿5' },
28
+ { name: '9', title: '定时任务补偿6' },
29
+ { name: '10', title: '定时任务补偿7' }
30
30
  ],
31
31
  }
32
32
  },
@@ -118,6 +118,23 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
118
118
  return rtn._links;
119
119
  }
120
120
  },
121
+ _actionRouters: null,
122
+ get actionRouters() {
123
+ if (rtn._actionRouters !== null) {
124
+ return rtn._actionRouters;
125
+ }
126
+ else {
127
+ rtn._actionRouters = [];
128
+ if (source.actionRouters) {
129
+ source.actionRouters.forEach((v) => {
130
+ var button = Router(v);
131
+ button.is = "ct-btn";
132
+ rtn._actionRouters.push(button);
133
+ });
134
+ }
135
+ return rtn._actionRouters;
136
+ }
137
+ },
121
138
  get optionApi() {
122
139
  return source.parameterAction;
123
140
  },
@@ -1,5 +1,5 @@
1
1
  import base from '../../index';
2
- import Base from './Base';
2
+ import Base from './Base';
3
3
 
4
4
  const PlaceHolder = function (source) {
5
5
  var rtn = {
@@ -14,4 +14,4 @@ const PlaceHolder = function (source) {
14
14
  return rtn;
15
15
  };
16
16
 
17
- export default PlaceHolder;
17
+ export default PlaceHolder;
package/src/main.js CHANGED
@@ -12,7 +12,8 @@ Vue.use(ElementUI, { size: 'mini'});
12
12
  // 关闭生产模式下给出的提示
13
13
  Vue.config.productionTip = false;
14
14
  Vue.use(centaline, {
15
- baseUrl: 'http://10.88.22.13:7070/v1/form/router',
15
+ baseUrl: "http://10.88.22.46:7070/v1/form/router",
16
+ // baseUrl: "http://tjcptest.centaline.com.cn/v1/form/router",
16
17
  zindex: 999,
17
18
  showRequestErrorMessage: true,
18
19
  handler: {
@@ -20,6 +21,12 @@ Vue.use(centaline, {
20
21
  openTab: function (action) {
21
22
  alert("打开tab页:" + action)
22
23
  },
24
+ openDetail: function (action) {
25
+ alert("打开tab页:" + action)
26
+ },
27
+ openPropertyDetailRET: function (submitData, pageTitle, parentModel) {
28
+ alert("打开tab页:" + pageTitle)
29
+ },
23
30
  // 关闭当前tab
24
31
  closeTab: function () {
25
32
  alert("关闭当前tab")
@@ -27,10 +34,10 @@ Vue.use(centaline, {
27
34
  // 获取请求头
28
35
  getRequestHeaders: function () {
29
36
  return {
30
- Authorization: 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImI4Mzg3ZjkwLTI3YWItNDA4Yy1hNjRjLTE3ODIxNDM1M2FiNyJ9.4EFMLNBVU1ZCoJ5o-CjXum7IC-Lb2ljZsi-qCNAQcfdw8NIYp7Ul93in3iZCI69sLZz2N6F7Gnxh6Hbj5JLEJg',
31
- oldToken: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjQwY2ExYmMyLWNiNzMtNDI2Mi05NmM0LThiYjg0NDBkODE3ZCJ9.AIXWKaRyCwxYiPAqGhT0A01YN7tpX_nW9oU5YDwuC3GIRSn5DQS82Kh1Q7u6eHIz1BySWc-SOEqSTB3283_Z7A',
32
- estateId: '201509230915485D942241BBA30FF49F',
33
- originalRequestURL: 'http://localhost:8080'
37
+ oldToken: '3007e478-86db-4d5a-8ce0-7253afb746b2',
38
+ estateId: '20210729104021C49F04B55C50F6AF58',
39
+ originalRequestURL: 'http://10.88.22.67:8080',
40
+ Authorization:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjE0NmU5ZjEzLTVjMmYtNGVlMy1hM2U5LWIxM2QyZThjZTBhZSJ9.Gl8K5lbG7t5DyCqouu7Ux7Oh9xuAxqdOXr4JnoHCN-YwC3b2zPO-C2sHbYJUZHYQPa7kTNRmg1xJiwugpVo5Xw',
34
41
  };
35
42
  },
36
43
  // 请求完成事件,可判断是否登录过期执行响应操作