centaline-data-driven 1.4.34 → 1.4.36

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.36",
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 {
@@ -104,6 +104,9 @@
104
104
  else if (v.show !== false && v.type === 'btn' && v.id === 'btnFilter') {
105
105
  this.filterBtnName = v.label;
106
106
  }
107
+ if(v.type !== 'btn'){
108
+ v.action='search';
109
+ }
107
110
  });
108
111
 
109
112
  },
@@ -2,16 +2,18 @@
2
2
  <div style="padding:0 8px 0 10px">
3
3
  <div v-if="model !== null">
4
4
  <el-table ref="multipleTable" :data="tableData"
5
- highlight-current-row tooltip-effect="dark" size="mini" style="width: 100%;" fit :row-class-name="tableRowClassName"
5
+ highlight-current-row tooltip-effect="dark" size="mini" style="width: 100%;" fit :row-class-name="tableRowClassName"
6
6
  :height="elTableHeight" v-loading="loading"
7
7
  @selection-change="handleSelectionChange"
8
- @current-change="handleCurrentChange">
8
+ @current-change="handleCurrentChange"
9
+ @cell-click="handleCellClick">
9
10
  <el-table-column type="selection" width="55" v-if="!singleSelectio"></el-table-column>
10
11
  <el-table-column v-for="(col, index) in model.columns" v-if="col.show" :key="index"
11
12
  :prop="col.id" :label="col.name" :min-width="col.width">
12
13
  </el-table-column>
13
14
  </el-table>
14
15
  <div style="margin-top: 20px;width: 100%;display: inline-block;height: 30px;margin-bottom: 10px;">
16
+ <span class="ct-table-tip-mini" v-if="!loading && model" v-html="model.footer"></span> <span class="ct-table-tip-mini" v-if="!loading && model" style="color:red;">已勾选 {{selectCount}} 条</span>
15
17
  <el-input v-if="jumpBtnName" size="mini" v-model="jumpStr" placeholder="定位" style="width:150px"></el-input>
16
18
  <el-button v-if="jumpBtnName" size="mini" @click="jumpClickHandler()">{{jumpBtnName}}</el-button>
17
19
  <el-button v-if="filterBtnName" size="mini" @click="filterClickHandler()" style="margin-left: 0px;">{{filterBtnName}}</el-button>
@@ -48,7 +50,8 @@
48
50
  loading: true,
49
51
  jumpStr: '',
50
52
  isBusy:false,
51
- elTableHeight:0,
53
+ elTableHeight: 0,
54
+ selectCount:0
52
55
  }
53
56
  },
54
57
  methods: {
@@ -62,7 +65,6 @@
62
65
  var selectWrap = this.$refs.multipleTable.bodyWrapper;
63
66
  selectWrap.addEventListener('scroll', this.scrollHandle);
64
67
  });
65
-
66
68
  //通知父组件加载完成
67
69
  this.$emit('loaded');
68
70
  },
@@ -101,11 +103,15 @@
101
103
  //当多选项发生变化时会触发该事件
102
104
  handleSelectionChange(val) {
103
105
  this.multipleSelection = val;
106
+ this.selectCount = this.$refs.multipleTable.selection.length;
104
107
  },
105
108
  //当单选项发生变化时会触发该事件
106
109
  handleCurrentChange(val) {
107
110
  this.currentRow = val;
108
111
  },
112
+ handleCellClick(row) {
113
+ this.model.selectIndex = row.tableIndex;
114
+ },
109
115
  filterClickHandler() {
110
116
  this.tableData = this.multipleSelection;
111
117
 
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"}',