eoss-ui 0.5.35 → 0.5.38

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/lib/table-form.js CHANGED
@@ -3524,8 +3524,8 @@ module.exports = require("json-bigint");
3524
3524
  // ESM COMPAT FLAG
3525
3525
  __webpack_require__.r(__webpack_exports__);
3526
3526
 
3527
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/table.vue?vue&type=template&id=b5a1829e&
3528
- var tablevue_type_template_id_b5a1829e_render = function () {
3527
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/table.vue?vue&type=template&id=0cd27751&
3528
+ var tablevue_type_template_id_0cd27751_render = function () {
3529
3529
  var _vm = this
3530
3530
  var _h = _vm.$createElement
3531
3531
  var _c = _vm._self._c || _h
@@ -3693,7 +3693,8 @@ var tablevue_type_template_id_b5a1829e_render = function () {
3693
3693
  class: {
3694
3694
  "es-align-middle": item.labelRow,
3695
3695
  "is-required":
3696
- _vm.required &&
3696
+ item.rules &&
3697
+ item.rules.required &&
3697
3698
  !_vm.hideRequiredAsterisk,
3698
3699
  "required-after": _vm.after,
3699
3700
  },
@@ -6180,10 +6181,10 @@ var tablevue_type_template_id_b5a1829e_render = function () {
6180
6181
  )
6181
6182
  }
6182
6183
  var staticRenderFns = []
6183
- tablevue_type_template_id_b5a1829e_render._withStripped = true
6184
+ tablevue_type_template_id_0cd27751_render._withStripped = true
6184
6185
 
6185
6186
 
6186
- // CONCATENATED MODULE: ./packages/form/src/table.vue?vue&type=template&id=b5a1829e&
6187
+ // CONCATENATED MODULE: ./packages/form/src/table.vue?vue&type=template&id=0cd27751&
6187
6188
 
6188
6189
  // EXTERNAL MODULE: ./src/utils/rules.js
6189
6190
  var rules = __webpack_require__(13);
@@ -7254,6 +7255,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
7254
7255
  //
7255
7256
  //
7256
7257
  //
7258
+ //
7257
7259
 
7258
7260
 
7259
7261
 
@@ -7573,7 +7575,7 @@ var componentNormalizer = __webpack_require__(3);
7573
7575
 
7574
7576
  var component = Object(componentNormalizer["a" /* default */])(
7575
7577
  src_tablevue_type_script_lang_js_,
7576
- tablevue_type_template_id_b5a1829e_render,
7578
+ tablevue_type_template_id_0cd27751_render,
7577
7579
  staticRenderFns,
7578
7580
  false,
7579
7581
  null,
package/lib/tree-group.js CHANGED
@@ -3499,7 +3499,7 @@ module.exports = require("json-bigint");
3499
3499
  // ESM COMPAT FLAG
3500
3500
  __webpack_require__.r(__webpack_exports__);
3501
3501
 
3502
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree-group/src/main.vue?vue&type=template&id=6b5d4d48&
3502
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree-group/src/main.vue?vue&type=template&id=eb2ece46&
3503
3503
  var render = function () {
3504
3504
  var _vm = this
3505
3505
  var _h = _vm.$createElement
@@ -3833,7 +3833,7 @@ var staticRenderFns = []
3833
3833
  render._withStripped = true
3834
3834
 
3835
3835
 
3836
- // CONCATENATED MODULE: ./packages/tree-group/src/main.vue?vue&type=template&id=6b5d4d48&
3836
+ // CONCATENATED MODULE: ./packages/tree-group/src/main.vue?vue&type=template&id=eb2ece46&
3837
3837
 
3838
3838
  // EXTERNAL MODULE: ./src/utils/util.js
3839
3839
  var util = __webpack_require__(0);
@@ -4074,25 +4074,28 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
4074
4074
  return this.name ? this.name : util["a" /* default */].uuid(16);
4075
4075
  },
4076
4076
  method: function method() {
4077
+ var src = this.src;
4077
4078
  this.refresh = false;
4078
- if (src.indexOf('//:') === 0) {
4079
- return 'wujie';
4080
- } else if (src.indexOf('dhtml') > -1 || src.indexOf('html') > -1 && src.indexOf('html#') === -1) {
4081
- return 'iframe';
4082
- } else {
4083
- var routes = this.$router.options.routes;
4084
- if (routes) {
4085
- var path = this.hasRouter(routes, src);
4086
- if (path) {
4087
- this.refresh = true;
4088
- var index = decodeURI(src).indexOf('?');
4089
- path = path + (index > -1 ? src.slice(index) : '');
4090
- this.$router.push(path);
4091
- return 'router';
4079
+ if (src) {
4080
+ if (src.indexOf('//:') === 0) {
4081
+ return 'wujie';
4082
+ } else if (src.indexOf('dhtml') > -1 || src.indexOf('html') > -1 && src.indexOf('html#') === -1) {
4083
+ return 'iframe';
4084
+ } else {
4085
+ var routes = this.$router.options.routes;
4086
+ if (routes) {
4087
+ var path = this.hasRouter(routes, src);
4088
+ if (path) {
4089
+ this.refresh = true;
4090
+ var index = decodeURI(src).indexOf('?');
4091
+ path = path + (index > -1 ? src.slice(index) : '');
4092
+ this.$router.push(path);
4093
+ return 'router';
4094
+ }
4092
4095
  }
4096
+ this.refresh = true;
4097
+ return 'wujie';
4093
4098
  }
4094
- this.refresh = true;
4095
- return 'wujie';
4096
4099
  }
4097
4100
  },
4098
4101
  param: function param() {
@@ -4184,7 +4187,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
4184
4187
  if (this.syncKeys === false) {
4185
4188
  return null;
4186
4189
  }
4187
- if (this.enterprise || this.tabs && this.tabs.length && this.tabs[Number(this.active)].enterprise) {
4190
+ if (this.enterprise && JSON.stringify(this.enterprise) != '{}' || this.tabs && this.tabs.length && this.tabs[Number(this.active)].enterprise) {
4188
4191
  if (this.checkeds) {
4189
4192
  if (Array.isArray(this.checkeds)) {
4190
4193
  var creditCodes = [];
@@ -4206,6 +4209,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
4206
4209
  return null;
4207
4210
  } else {
4208
4211
  if (this.checkeds) {
4212
+ debugger;
4209
4213
  var params = {};
4210
4214
  if (Array.isArray(this.checkeds)) {
4211
4215
  if (this.syncKeys && util["a" /* default */].isObject(this.syncKeys)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.5.35",
3
+ "version": "0.5.38",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -442,7 +442,7 @@
442
442
  >
443
443
  <el-button
444
444
  v-show="isSubmitButtonShowAgreeAndDisagree != 1"
445
- v-for="item of hideBtn? btnList.slice(0,1) : btnList"
445
+ v-for="item of hideBtn ? btnList.slice(0, 1) : btnList"
446
446
  :key="item.name"
447
447
  :type="item.type"
448
448
  :style="btnStyle"
@@ -457,17 +457,17 @@
457
457
  (!isFlow && (rejectObj.fun || pointsReadingObj.fun || moreList))
458
458
  "
459
459
  placement="top"
460
- :class="{'em-flow-more-btn':!hideBtn}"
460
+ :class="{ 'em-flow-more-btn': !hideBtn }"
461
461
  trigger="click"
462
462
  >
463
463
  <div v-if="!isFlow && !hideBtn" class="es-footer-btn">
464
464
  <el-button
465
465
  v-if="rejectObj.fun"
466
466
  @click="rejectBtn"
467
- style="margin-right:10px"
467
+ style="margin-right: 10px"
468
468
  type="danger"
469
469
  >
470
- {{ rejectObj.value }}
470
+ {{ rejectObj.value }}
471
471
  </el-button>
472
472
  <el-button
473
473
  v-if="pointsReadingObj.fun"
@@ -484,7 +484,11 @@
484
484
  {{ item.value }}
485
485
  </el-button>
486
486
  </div>
487
- <el-button-group slot="reference" style="margin: 0px 10px" v-if="hideBtn">
487
+ <el-button-group
488
+ slot="reference"
489
+ style="margin: 0px 10px"
490
+ v-if="hideBtn"
491
+ >
488
492
  <el-button
489
493
  v-show="isSubmitButtonShowAgreeAndDisagree != 1"
490
494
  v-for="item of btnList.slice(1)"
@@ -500,7 +504,7 @@
500
504
  <el-dropdown
501
505
  v-if="
502
506
  !isFlow &&
503
- (rejectObj.fun || pointsReadingObj.fun || moreList.length > 0)
507
+ (rejectObj.fun || pointsReadingObj.fun || moreList.length > 0)
504
508
  "
505
509
  trigger="click"
506
510
  placement="top"
@@ -1199,7 +1203,10 @@ export default {
1199
1203
  util
1200
1204
  .ajax({
1201
1205
  url: findCodeValues,
1202
- params: { ccCode: 'notification_type',userId:util.getStorage('userId') }
1206
+ params: {
1207
+ ccCode: 'notification_type',
1208
+ userId: util.getStorage('userId')
1209
+ }
1203
1210
  })
1204
1211
  .then((res) => {
1205
1212
  const { status, data } = res;
@@ -1305,10 +1312,21 @@ export default {
1305
1312
  **/
1306
1313
  rejectBtn() {
1307
1314
  if (this.value === '') this.value = this.nodeDefaultRejectOpinion;
1308
- if (!this.value) {
1309
- return this.$message.warning('请填写意见');
1315
+ if (this.beforeSubmit != undefined) {
1316
+ this.beforeSubmit()
1317
+ .then((next) => {
1318
+ if (!this.value) {
1319
+ return this.$message.warning('请填写意见');
1320
+ }
1321
+ this.showReject = true;
1322
+ })
1323
+ .catch((e) => {});
1324
+ } else {
1325
+ if (!this.value) {
1326
+ return this.$message.warning('请填写意见');
1327
+ }
1328
+ this.showReject = true;
1310
1329
  }
1311
- this.showReject = true;
1312
1330
  },
1313
1331
  /**
1314
1332
  * taskReadBtn
@@ -1318,9 +1336,19 @@ export default {
1318
1336
  **/
1319
1337
  taskReadBtn() {
1320
1338
  // return this.$message.warning('暂未开放!敬请期待');
1321
- if (this.value === '') this.value = this.nodeDefaultRejectOpinion;
1322
- this.taskReadType = 'create';
1323
- this.showTaskRead = true;
1339
+ if (this.beforeSubmit != undefined) {
1340
+ this.beforeSubmit()
1341
+ .then((next) => {
1342
+ if (this.value === '') this.value = this.nodeDefaultRejectOpinion;
1343
+ this.taskReadType = 'create';
1344
+ this.showTaskRead = true;
1345
+ })
1346
+ .catch((e) => {});
1347
+ } else {
1348
+ if (this.value === '') this.value = this.nodeDefaultRejectOpinion;
1349
+ this.taskReadType = 'create';
1350
+ this.showTaskRead = true;
1351
+ }
1324
1352
  },
1325
1353
  /**
1326
1354
  * getFind
@@ -1353,6 +1381,17 @@ export default {
1353
1381
  * @date 2022年5月25日
1354
1382
  **/
1355
1383
  endFlows(res) {
1384
+ if (this.beforeSubmit != undefined) {
1385
+ this.beforeSubmit()
1386
+ .then((next) => {
1387
+ this.saveEndFlows(res);
1388
+ })
1389
+ .catch((e) => {});
1390
+ } else {
1391
+ this.saveEndFlows(res);
1392
+ }
1393
+ },
1394
+ saveEndFlows(res) {
1356
1395
  this.$confirm('确认' + res.value + '?')
1357
1396
  .then(() => {
1358
1397
  let params = {
@@ -1485,6 +1524,18 @@ export default {
1485
1524
  * @date 2022年9月29日
1486
1525
  **/
1487
1526
  toTakeAdvice(res) {
1527
+ if (this.beforeSubmit != undefined) {
1528
+ this.beforeSubmit()
1529
+ .then((next) => {
1530
+ this.saveToTakeAdvice(res);
1531
+ })
1532
+ .catch((e) => {});
1533
+ } else {
1534
+ this.saveToTakeAdvice(res);
1535
+ }
1536
+ // return this.$message.warning('暂未开放!敬请期待');
1537
+ },
1538
+ saveToTakeAdvice(res) {
1488
1539
  let params = {
1489
1540
  url: isCanStartSubFlow,
1490
1541
  data: {
@@ -1512,7 +1563,6 @@ export default {
1512
1563
  this.$message.error(err.message);
1513
1564
  }
1514
1565
  });
1515
- // return this.$message.warning('暂未开放!敬请期待');
1516
1566
  },
1517
1567
  /**
1518
1568
  * toStartDraf
@@ -1521,7 +1571,15 @@ export default {
1521
1571
  * @date 2022年9月29日
1522
1572
  **/
1523
1573
  toStartDraf(res) {
1524
- this.showTaskUnionExamine = true;
1574
+ if (this.beforeSubmit != undefined) {
1575
+ this.beforeSubmit()
1576
+ .then((next) => {
1577
+ this.showTaskUnionExamine = true;
1578
+ })
1579
+ .catch((e) => {});
1580
+ } else {
1581
+ this.showTaskUnionExamine = true;
1582
+ }
1525
1583
  },
1526
1584
  /**
1527
1585
  * toSendMsg
@@ -1530,7 +1588,15 @@ export default {
1530
1588
  * @date 2022年9月29日
1531
1589
  **/
1532
1590
  toSendMsg(res) {
1533
- this.showSendMsg = true;
1591
+ if (this.beforeSubmit != undefined) {
1592
+ this.beforeSubmit()
1593
+ .then((next) => {
1594
+ this.showSendMsg = true;
1595
+ })
1596
+ .catch((e) => {});
1597
+ } else {
1598
+ this.showSendMsg = true;
1599
+ }
1534
1600
  },
1535
1601
  /**
1536
1602
  * toTaskReadAndEnd
@@ -1539,9 +1605,19 @@ export default {
1539
1605
  * @date 2022年9月29日
1540
1606
  **/
1541
1607
  toTaskReadAndEnd(res) {
1542
- if (this.value === '') this.value = this.nodeDefaultRejectOpinion;
1543
- this.taskReadType = 'taskReadAndEnd';
1544
- this.showTaskRead = true;
1608
+ if (this.beforeSubmit != undefined) {
1609
+ this.beforeSubmit()
1610
+ .then((next) => {
1611
+ if (this.value === '') this.value = this.nodeDefaultRejectOpinion;
1612
+ this.taskReadType = 'taskReadAndEnd';
1613
+ this.showTaskRead = true;
1614
+ })
1615
+ .catch((e) => {});
1616
+ } else {
1617
+ if (this.value === '') this.value = this.nodeDefaultRejectOpinion;
1618
+ this.taskReadType = 'taskReadAndEnd';
1619
+ this.showTaskRead = true;
1620
+ }
1545
1621
  },
1546
1622
  /**
1547
1623
  * rejectAndEnd
@@ -1550,6 +1626,17 @@ export default {
1550
1626
  * @date 2022年9月29日
1551
1627
  **/
1552
1628
  rejectAndEnd(res) {
1629
+ if (this.beforeSubmit != undefined) {
1630
+ this.beforeSubmit()
1631
+ .then((next) => {
1632
+ this.saveRejectAndEnd(res);
1633
+ })
1634
+ .catch((e) => {});
1635
+ } else {
1636
+ this.saveRejectAndEnd(res);
1637
+ }
1638
+ },
1639
+ saveRejectAndEnd(res) {
1553
1640
  this.$confirm('确认' + res.value + '?')
1554
1641
  .then(() => {
1555
1642
  if (this.isOpinionRequired == 1 && (this.value == '' || !this.value))
@@ -1588,7 +1675,6 @@ export default {
1588
1675
  .catch(() => {
1589
1676
  // on cancel
1590
1677
  });
1591
- // return this.$message.warning('暂未开放!敬请期待');
1592
1678
  },
1593
1679
  /**
1594
1680
  * toTransfer
@@ -1597,9 +1683,17 @@ export default {
1597
1683
  * @date 2022年9月29日
1598
1684
  **/
1599
1685
  toTransfer(res) {
1600
- this.taskReadType = 'transfer';
1601
- this.showTaskRead = true;
1602
- // return this.$message.warning('暂未开放!敬请期待');
1686
+ if (this.beforeSubmit != undefined) {
1687
+ this.beforeSubmit()
1688
+ .then((next) => {
1689
+ this.taskReadType = 'transfer';
1690
+ this.showTaskRead = true;
1691
+ })
1692
+ .catch((e) => {});
1693
+ } else {
1694
+ this.taskReadType = 'transfer';
1695
+ this.showTaskRead = true;
1696
+ }
1603
1697
  },
1604
1698
  /**
1605
1699
  * getNodeInfo
@@ -482,7 +482,10 @@ export default {
482
482
  util
483
483
  .ajax({
484
484
  url: findCodeValues,
485
- params: { ccCode: 'notification_type',userId:util.getStorage('userId') }
485
+ params: {
486
+ ccCode: 'notification_type',
487
+ userId: util.getStorage('userId')
488
+ }
486
489
  })
487
490
  .then((res) => {
488
491
  const { status, data } = res;
@@ -520,6 +523,9 @@ export default {
520
523
  },
521
524
  // 提交表单
522
525
  subProcess(formName) {
526
+ this.saveProcess(formName);
527
+ },
528
+ saveProcess(formName) {
523
529
  this.$refs[formName].validate((valid) => {
524
530
  if (valid) {
525
531
  const {
@@ -148,7 +148,10 @@ export default {
148
148
  },
149
149
  // 提交表单
150
150
  subProcess(formName) {
151
- this.$refs[formName].validate(valid => {
151
+ this.saveProcess(formName);
152
+ },
153
+ saveProcess(formName){
154
+ this.$refs[formName].validate(valid => {
152
155
  if (valid) {
153
156
  if (!this.option && this.isOpinionRequired === 1) {
154
157
  this.$message.warning('请选择输入审批意见');
@@ -99,7 +99,8 @@
99
99
  class="es-table-form-label"
100
100
  :class="{
101
101
  'es-align-middle': item.labelRow,
102
- 'is-required': required && !hideRequiredAsterisk,
102
+ 'is-required':
103
+ item.rules && item.rules.required && !hideRequiredAsterisk,
103
104
  'required-after': after
104
105
  }"
105
106
  :key="'label' + index"
@@ -231,28 +231,31 @@ export default {
231
231
  return this.name ? this.name : util.uuid(16);
232
232
  },
233
233
  method() {
234
+ let src = this.src;
234
235
  this.refresh = false;
235
- if (src.indexOf('//:') === 0) {
236
- return 'wujie';
237
- } else if (
238
- src.indexOf('dhtml') > -1 ||
239
- (src.indexOf('html') > -1 && src.indexOf('html#') === -1)
240
- ) {
241
- return 'iframe';
242
- } else {
243
- const routes = this.$router.options.routes;
244
- if (routes) {
245
- let path = this.hasRouter(routes, src);
246
- if (path) {
247
- this.refresh = true;
248
- let index = decodeURI(src).indexOf('?');
249
- path = path + (index > -1 ? src.slice(index) : '');
250
- this.$router.push(path);
251
- return 'router';
236
+ if (src) {
237
+ if (src.indexOf('//:') === 0) {
238
+ return 'wujie';
239
+ } else if (
240
+ src.indexOf('dhtml') > -1 ||
241
+ (src.indexOf('html') > -1 && src.indexOf('html#') === -1)
242
+ ) {
243
+ return 'iframe';
244
+ } else {
245
+ const routes = this.$router.options.routes;
246
+ if (routes) {
247
+ let path = this.hasRouter(routes, src);
248
+ if (path) {
249
+ this.refresh = true;
250
+ let index = decodeURI(src).indexOf('?');
251
+ path = path + (index > -1 ? src.slice(index) : '');
252
+ this.$router.push(path);
253
+ return 'router';
254
+ }
252
255
  }
256
+ this.refresh = true;
257
+ return 'wujie';
253
258
  }
254
- this.refresh = true;
255
- return 'wujie';
256
259
  }
257
260
  },
258
261
  param() {
@@ -309,7 +312,6 @@ export default {
309
312
  if (oldVal && val && val.url !== oldVal.url) {
310
313
  this.count++;
311
314
  }
312
-
313
315
  },
314
316
  deep: true,
315
317
  immediate: true
@@ -354,7 +356,7 @@ export default {
354
356
  return null;
355
357
  }
356
358
  if (
357
- this.enterprise ||
359
+ (this.enterprise && JSON.stringify(this.enterprise) != '{}') ||
358
360
  (this.tabs &&
359
361
  this.tabs.length &&
360
362
  this.tabs[Number(this.active)].enterprise)
@@ -380,6 +382,7 @@ export default {
380
382
  return null;
381
383
  } else {
382
384
  if (this.checkeds) {
385
+ debugger;
383
386
  let params = {};
384
387
  if (Array.isArray(this.checkeds)) {
385
388
  if (this.syncKeys && util.isObject(this.syncKeys)) {
package/src/index.js CHANGED
@@ -117,7 +117,7 @@ if (typeof window !== 'undefined' && window.Vue) {
117
117
  }
118
118
 
119
119
  export default {
120
- version: '0.5.35',
120
+ version: '0.5.38',
121
121
  install,
122
122
  Button,
123
123
  ButtonGroup,