cnhis-design-vue 0.2.35-beta → 0.2.39-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.2.35-beta",
3
+ "version": "0.2.39-beta",
4
4
  "description": "基于 Ant Desgin Vue 的UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -480,7 +480,9 @@ export default {
480
480
  handleSubmitParams(batchFormData) {
481
481
  let arr = [];
482
482
  for (let key in batchFormData) {
483
- let matchItem = this.oldtableData.find(v => v[this.primaryKey] === key);
483
+ // v[this.primaryKey] 可能为数字
484
+ // key 为字符串 用全等匹配不到 改为 ==
485
+ let matchItem = this.oldtableData.find(v => v[this.primaryKey] == key);
484
486
  let obj = batchFormData[key];
485
487
  if (matchItem) {
486
488
  obj = Object.assign({}, obj, {
@@ -130,7 +130,8 @@ export default {
130
130
  param = this.getMsgFieldValue(key, item, isTip);
131
131
  }
132
132
  if (value.mapping) {
133
- param = this.getMappingHTML(value.mapping[param]);
133
+ // param = this.getMappingHTML(value.mapping[param]);
134
+ param = this.getMappingHTML(value.mapping.find( v => v.value == param) || {});
134
135
  }
135
136
  return param || '';
136
137
  });
@@ -376,7 +376,8 @@ export default create({
376
376
  showAdd: false,
377
377
  itemList: [],
378
378
  typeId: item.typeId,
379
- typeName: item.typeName
379
+ typeName: item.typeName,
380
+ allowCreateByPersonal: item.allowCreateByPersonal
380
381
  },choiceTypes[item.typeName] || {}));
381
382
  });
382
383
  return;
@@ -389,7 +390,8 @@ export default create({
389
390
  showAdd: false,
390
391
  itemList: false,
391
392
  typeId: '',
392
- typeName: key
393
+ typeName: key,
394
+ allowCreateByPersonal: choiceTypes[key]?.allowCreateByPersonal
393
395
  },{...(choiceTypes[key] || {})}));
394
396
  } else {
395
397
  // 非空,不允许
@@ -435,6 +435,11 @@ import create from '@/core/create';
435
435
  export default create({
436
436
  name: 'Classification',
437
437
  mixins: [filterApiFn],
438
+ provide() {
439
+ return {
440
+ root_isShowResetButton: this.isShowResetButton
441
+ };
442
+ },
438
443
  components: {
439
444
  // Search,
440
445
  [Icon.name]: Icon,
@@ -487,6 +492,7 @@ export default create({
487
492
  countCondition: { type: Number }, // 是否统计筛选分类,1统计筛选分类,0反之
488
493
  countTabCondition: { type: Number }, // 筛选页签是否进行数量统计,1统计筛选页签,0反之
489
494
  keyword: { type: String },
495
+ isShowResetButton: { type: Boolean, default: true }, // 是否显示 恢复默认设置 按钮
490
496
  fieldKeys: {
491
497
  type: Array,
492
498
  default: () => []
@@ -25,7 +25,7 @@
25
25
  </div>
26
26
  </slot>
27
27
  <template #footer v-if="type == 'search'">
28
- <a-popconfirm class="btn-reset" title="确认要恢复系统默认设置吗?" ok-text="确认" cancel-text="取消" @confirm="popconfirm">
28
+ <a-popconfirm v-if="isShowResetButton" class="btn-reset" title="确认要恢复系统默认设置吗?" ok-text="确认" cancel-text="取消" @confirm="popconfirm">
29
29
  <a-button>恢复默认设置</a-button>
30
30
  </a-popconfirm>
31
31
 
@@ -144,6 +144,7 @@ import draggable from 'vuedraggable';
144
144
  import svgIcon from '@/component/svg/index.vue';
145
145
  export default {
146
146
  mixins: [filterApiFn],
147
+ inject: { isShowResetButton: { from: 'root_isShowResetButton' } },
147
148
  props: {
148
149
  visibleIn: Boolean,
149
150
  loading: Boolean,
@@ -206,7 +206,7 @@
206
206
  'font-family': item.PASSWORDTYPE ? 'text-security-disc' : 'inherit'
207
207
  }"
208
208
  v-model="item.EQ"
209
- :placeholder="item.isPreciseSearch ? '' : getI18nText('1.9.6', '区间搜素用~分割')"
209
+ :placeholder="item.isPreciseSearch || item.fieldType == 'JSONB' ? '' : getI18nText('1.9.6', '区间搜素用~分割')"
210
210
  allowClear
211
211
  >
212
212
  <template slot="suffix" v-if="item.comAttr == 'PASSWORD'">
@@ -515,7 +515,7 @@
515
515
  class="EQ-input"
516
516
  style="width: 200px"
517
517
  v-model="item.EQ"
518
- :placeholder="item.isPreciseSearch ? '' : getI18nText('1.9.6', '区间搜素用~分割')"
518
+ :placeholder="item.isPreciseSearch || item.fieldType == 'JSONB' ? '' : getI18nText('1.9.6', '区间搜素用~分割')"
519
519
  allowClear
520
520
  >
521
521
  </a-input>