centaline-data-driven 1.4.34 → 1.4.35

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.4.34",
3
+ "version": "1.4.35",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -311,57 +311,101 @@
311
311
  if (field.action) {
312
312
  field.disabled = true;//提交按钮禁用
313
313
  self.model.pageDisabled = true;
314
- field.doAction(self.getFormObj(), (data) => {
315
- field.disabled = false;
316
- self.model.pageDisabled = false;
317
- if (data.rtnCode === 200) {
318
- if (data.notification === 17) {
319
- self.clickHandler(self.model.getRtnRouter(data.content), null)
314
+
315
+ if (field.flagAsync) {
316
+ field.doAction(self.getFormObj(), (res) => {
317
+ if (res.content && res.content.action) {
318
+ var dialogOption = {
319
+ title: field.pageTitle || field.label,
320
+ content: [{
321
+ component: 'ct-progress',
322
+ attrs: {
323
+ progressAction: res.content.action,
324
+ progressKey: res.content.key,
325
+ progressType: field.isExport ? 'export' : 'import',
326
+ width: '350px',
327
+ height: '165px'
328
+ },
329
+ on: {
330
+ finished(data) {
331
+ field.disabled = false;
332
+ self.model.pageDisabled = false;
333
+ self.$common.closeDialog(dialogOption.dialog);
334
+ if (data.rtnMsg) {
335
+ self.$message.success(data.rtnMsg);
336
+ }
337
+ if (data.notification === 17) {
338
+ self.clickHandler(self.model.getRtnRouter(data.content), null)
339
+ }
340
+ self.$emit('submit', { formData: self.model, responseData: data });
341
+ },
342
+ error(data) {
343
+ field.disabled = false;
344
+ self.model.pageDisabled = false;
345
+ self.$common.closeDialog(dialogOption.dialog);
346
+ self.$message.warning(data.rtnMsg);
347
+ }
348
+ }
349
+ }]
350
+ };
351
+ self.$common.openDialog(dialogOption);
320
352
  }
321
- if (self.model.flagAlertClose) {
322
- self.$common.confirm('操作成功,是否关闭本页面?', '提示', {
353
+ });
354
+ }
355
+ else {
356
+ field.doAction(self.getFormObj(), (data) => {
357
+ field.disabled = false;
358
+ self.model.pageDisabled = false;
359
+ if (data.rtnCode === 200) {
360
+ if (data.notification === 17) {
361
+ self.clickHandler(self.model.getRtnRouter(data.content), null)
362
+ }
363
+ if (self.model.flagAlertClose) {
364
+ self.$common.confirm('操作成功,是否关闭本页面?', '提示', {
365
+ confirmButtonText: '确定',
366
+ cancelButtonText: '取消',
367
+ type: 'warning'
368
+ }).then(() => {
369
+ //如果没有弹框 则关闭tab页
370
+ if (self.$common.dialogList && self.$common.dialogList.List.length === 0) {
371
+ if (typeof self.$common.getDataDrivenOpts().handler.closeTab === 'function') {
372
+ self.$common.getDataDrivenOpts().handler.closeTab();
373
+ }
374
+ }
375
+ self.$emit('submit', { formData: self.model, responseData: data });
376
+ }).catch(() => {
377
+ self.init();
378
+ });
379
+ }
380
+ else {
381
+ self.$emit('submit', { formData: self.model, responseData: data });
382
+ }
383
+ if (self.parentModel) {
384
+ self.parentModel.$vue.closeTabThen(data);
385
+ }
386
+ }
387
+ else if (data.rtnCode === 202) {
388
+ self.$common.confirm(data.rtnMsg, '提示', {
323
389
  confirmButtonText: '确定',
324
390
  cancelButtonText: '取消',
325
391
  type: 'warning'
326
392
  }).then(() => {
327
- //如果没有弹框 则关闭tab页
328
- if (self.$common.dialogList && self.$common.dialogList.List.length === 0) {
329
- if (typeof self.$common.getDataDrivenOpts().handler.closeTab === 'function') {
330
- self.$common.getDataDrivenOpts().handler.closeTab();
393
+ field.doAction(self.getFormObj({ flagHaveAlert: '1' }), (res) => {
394
+ if (res.rtnCode === 200) {
395
+ if (res.notification === 17) {
396
+ self.clickHandler(self.model.getRtnRouter(res.content), null)
397
+ }
398
+ else {
399
+ self.$emit('submit', { formData: self.model, responseData: res });
400
+ }
331
401
  }
332
- }
333
- self.$emit('submit', { formData: self.model, responseData: data });
402
+ });
334
403
  }).catch(() => {
335
- self.init();
336
404
  });
337
405
  }
338
- else {
339
- self.$emit('submit', { formData: self.model, responseData: data });
340
- }
341
- if (self.parentModel) {
342
- self.parentModel.$vue.closeTabThen(data);
343
- }
344
- }
345
- else if (data.rtnCode === 202) {
346
- self.$common.confirm(data.rtnMsg, '提示', {
347
- confirmButtonText: '确定',
348
- cancelButtonText: '取消',
349
- type: 'warning'
350
- }).then(() => {
351
- field.doAction(self.getFormObj({ flagHaveAlert: '1' }), (res) => {
352
- if (res.rtnCode === 200) {
353
- if (res.notification === 17) {
354
- self.clickHandler(self.model.getRtnRouter(res.content), null)
355
- }
356
- else {
357
- self.$emit('submit', { formData: self.model, responseData: res });
358
- }
359
- }
360
- });
361
- }).catch(() => {
362
- });
363
- }
364
- }, self.model.scripts);
406
+ }, self.model.scripts);
407
+ }
408
+
365
409
  }
366
410
  //无值,触发submit事件
367
411
  else {
package/src/main.js CHANGED
@@ -12,12 +12,12 @@ Vue.use(ElementUI, { size: 'mini'});
12
12
  // 关闭生产模式下给出的提示
13
13
  Vue.config.productionTip = false;
14
14
  Vue.use(centaline, {
15
- // baseUrl: "http://10.88.22.46:7070/max-uplink-api/v1/form/router",
15
+ baseUrl: "http://10.88.22.13:7070/max-uplink-api/v1/form/router",
16
16
  // baseUrl: "http://10.25.10.63:9999/v1/form/router",
17
17
  // baseUrl: "http://10.88.22.42:9999/v1/form/router",
18
18
  // baseUrl: "http://10.88.22.69:8080/api/",
19
- baseUrl: "http://tjcptest.centaline.com.cn/",
20
- flagRouterSelf: true,
19
+ // baseUrl: "http://tjcptest.centaline.com.cn/",
20
+ // flagRouterSelf: true,
21
21
  zindex: 999,
22
22
  showRequestSuccessMessage: true,
23
23
  showRequestErrorMessage: true,
@@ -43,7 +43,7 @@ Vue.use(centaline, {
43
43
  getRequestHeaders: function () {
44
44
  return {
45
45
  oldToken: '9a73e482-db16-4a24-81e7-67daef02b64d',
46
- token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjEOgkAQRe8yNZMw7mRmlk4XbDwEWdg1wcoIJBrj3dUIHb2veMVr_n_COHdQgS7ghlZav4AbWmmJ2CtJg3uvAVnYoVEwDCyBj3XjwqGGAvL9ChWJEimbKwsY4vQLpRl_wzzm2yk__nHuMg2fWeoT5bNEjJoEOfWGplpiktg7z7LrjOD1BgAA__8.GYKnl1m1p9DYoV4G8e7guCAXfIZblTzhcpUhjbliuX0',
46
+ token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjrsOgkAQRf9laiaZYWdfdLpg40eQFYcEKyOQaIz_rkbo6D3FKU5z7xPG-QQV-AXc0EobF3BDKy2zRM-uwV30CcWJwcApYBKX5FA3Ju1rKEDvV6jYeS5FxJQFDHn6BbaBvmEe9XbUxz_OXabhM2ujNeQ7RSE6o0QizJ0ocu6You-1dxZebwAAAP__.vkp7C4-AbNZcFXOUNh7GhACgGYct_lCq8lYCyLOdfSg',
47
47
 
48
48
  originalRequestURL: 'http://10.88.22.67:8080',
49
49
  EstateInfo: '{"estateId":"FAF029E8-EC28-4297-83CF-B8FFD826DB91","estateName":"AABBCC"}',