cnhis-design-vue 0.1.83-beta → 0.1.84-beta

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": "cnhis-design-vue",
3
- "version": "0.1.83-beta",
3
+ "version": "0.1.84-beta",
4
4
  "description": "基于 Ant Desgin Vue 的UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -93,4 +93,4 @@
93
93
  "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
94
94
  }
95
95
  }
96
- }
96
+ }
@@ -1465,6 +1465,8 @@ export default create({
1465
1465
  };
1466
1466
  },
1467
1467
  setFilterStatus() {
1468
+ // 表头没有过滤字段 不需要设置
1469
+ if(!this.filterFields || !Object.keys(this.filterFields).length) return;
1468
1470
  let val = this.quickSearchConfig;
1469
1471
 
1470
1472
  if (!val || !val.length) {
@@ -1477,17 +1479,22 @@ export default create({
1477
1479
  // 修复 val长度和this.filterFields个数对不上 会少清空选中项
1478
1480
  for (let key in this.filterFields) {
1479
1481
  let item = this.filterFields[key];
1480
- this.$set(item, 'CONVERT', []);
1482
+ item && this.$set(item, 'CONVERT', []);
1481
1483
  }
1482
1484
 
1483
1485
  val.forEach(item => {
1484
- if (!this.filterFields[item.field_key]) {
1485
- this.$set(this.filterFields[item.field_key], 'CONVERT', []);
1486
- return false;
1487
- }
1486
+ let itemKey = item.field_key;
1487
+ // 参与搜索的字段必须在 filterFields中
1488
+ if (itemKey in this.filterFields) {
1488
1489
 
1489
- let value = item.value.map(item => JSON.stringify(item));
1490
- this.$set(this.filterFields[item.field_key], 'CONVERT', value);
1490
+ if (!this.filterFields[item.field_key]) {
1491
+ this.$set(this.filterFields[item.field_key], 'CONVERT', []);
1492
+ return false;
1493
+ }
1494
+
1495
+ let value = item.value.map(item => JSON.stringify(item));
1496
+ this.$set(this.filterFields[item.field_key], 'CONVERT', value);
1497
+ }
1491
1498
  });
1492
1499
  },
1493
1500
  handlerInitSearchItem(arr) {
@@ -380,7 +380,7 @@ export default {
380
380
  const dateParams = this.dateParams;
381
381
  if (dateParams?.length) {
382
382
  const fmt = 'YYYY-MM-DD';
383
- params.beginDate = dateParams[0].format(fmt) + ' 00:00:00';
383
+ params.startDate = dateParams[0].format(fmt) + ' 00:00:00';
384
384
  params.endDate = dateParams[1].format(fmt) + ' 23:59:59';
385
385
  }
386
386
  return params;
@@ -975,7 +975,7 @@ export default create({
975
975
  if (el.setting) {
976
976
  // el.seting 可能是 string / object
977
977
  el.setting = typeof el.setting == "string" ? JSON.parse(el.setting) : el.setting;
978
- if (!this.$utils.isEmpty(el.setting.wordbook)) {
978
+ if (!vexutils.isEmpty(el.setting.wordbook)) {
979
979
  this.$set(el, "con", "QUOTE");
980
980
  this.$set(el, "dataSource", []);
981
981
  this.$set(el, "QUOTE", []);
@@ -1261,12 +1261,12 @@ export default create({
1261
1261
  if (item.EVALUATEAttr) {
1262
1262
  value = item.selecteds.join("|#|");
1263
1263
  }
1264
- } else if (item.con == "QUOTE" && !this.$utils.isEmpty(item.value)) {
1264
+ } else if (item.con == "QUOTE" && !vexutils.isEmpty(item.value)) {
1265
1265
  // value = item.QUOTE.join("|#|");
1266
1266
  value = item.value.join("|#|");
1267
- } else if (!this.$utils.isEmpty(item.CONVERT)) {
1267
+ } else if (!vexutils.isEmpty(item.CONVERT)) {
1268
1268
  value = item.CONVERT.map(item => {
1269
- if (item && this.$utils.isJSON(item)) {
1269
+ if (item && vexutils.isJSON(item)) {
1270
1270
  return JSON.parse(item);
1271
1271
  }
1272
1272
  return item;
@@ -1301,7 +1301,7 @@ export default create({
1301
1301
 
1302
1302
  // 校验
1303
1303
  if (item.BIRTHDAY.start_val) {
1304
- let res = this.$utils.validateBirthday(
1304
+ let res = vexutils.validateBirthday(
1305
1305
  item.BIRTHDAY.start_val,
1306
1306
  item.title,
1307
1307
  item.BIRTHDAY.unit
@@ -1309,7 +1309,7 @@ export default create({
1309
1309
  if (!res) return;
1310
1310
  }
1311
1311
  if (item.BIRTHDAY.end_val) {
1312
- let res = this.$utils.validateBirthday(
1312
+ let res = vexutils.validateBirthday(
1313
1313
  item.BIRTHDAY.end_val,
1314
1314
  item.title,
1315
1315
  item.BIRTHDAY.unit
@@ -1349,7 +1349,7 @@ export default create({
1349
1349
  }
1350
1350
  }
1351
1351
  // 删除字符串前后空格
1352
- if (value && this.$utils.isString(value)) {
1352
+ if (value && vexutils.isString(value)) {
1353
1353
  value = value.trim();
1354
1354
  }
1355
1355
  let temp = {
@@ -1519,10 +1519,10 @@ export default create({
1519
1519
  if (item.EQ || item.CL) {
1520
1520
  item.EQ = "";
1521
1521
  item.CL = "";
1522
- } else if (item.con == "QUOTE" && !this.$utils.isEmpty(item.value)) {
1522
+ } else if (item.con == "QUOTE" && !vexutils.isEmpty(item.value)) {
1523
1523
  item.QUOTE = [];
1524
1524
  item.value = [];
1525
- } else if (!this.$utils.isEmpty(item.CONVERT)) {
1525
+ } else if (!vexutils.isEmpty(item.CONVERT)) {
1526
1526
  item.CONVERT = [];
1527
1527
  } else if (item.DATE) {
1528
1528
  item.showDate = false;