cnhis-design-vue 2.1.127 → 2.1.129
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/CHANGELOG.md +25 -11
- package/es/age/index.js +2 -2
- package/es/big-table/index.js +26 -26
- package/es/button/index.js +2 -2
- package/es/captcha/index.js +3 -3
- package/es/card-reader-sdk/index.js +57 -23
- package/es/checkbox/index.js +1 -1
- package/es/color-picker/index.js +1 -1
- package/es/drag-layout/index.js +3 -3
- package/es/editor/index.js +1 -1
- package/es/ellipsis/index.js +1 -1
- package/es/fabric-chart/index.js +114 -65
- package/es/form-table/index.js +20 -20
- package/es/full-calendar/index.js +4 -4
- package/es/index/index.js +422 -329
- package/es/index/style.css +1 -1
- package/es/input/index.js +1 -1
- package/es/map/index.js +1 -1
- package/es/multi-chat/index.js +25 -25
- package/es/multi-chat-client/index.js +19 -19
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +4 -4
- package/es/multi-chat-setting/index.js +20 -20
- package/es/multi-chat-sip/index.js +1 -1
- package/es/radio/index.js +1 -1
- package/es/scale-container/index.js +1 -1
- package/es/scale-view/index.js +74 -65
- package/es/scale-view/style.css +1 -1
- package/es/select/index.js +4 -4
- package/es/select-label/index.js +3 -3
- package/es/select-person/index.js +2 -2
- package/es/select-tag/index.js +4 -4
- package/es/shortcut-setter/index.js +2 -2
- package/es/slider-tree/index.js +1 -1
- package/es/table-filter/index.js +117 -82
- package/es/table-filter/style.css +1 -1
- package/es/tag/index.js +1 -1
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +492 -399
- package/lib/cui.umd.js +492 -399
- package/lib/cui.umd.min.js +16 -16
- package/package.json +2 -2
- package/packages/card-reader-sdk/src/cardReaderSDK.js +12 -0
- package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +58 -22
- package/packages/scale-view/formitem/r-choice.vue +10 -2
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +24 -4
- package/packages/table-filter/src/quick-search/QuickSearch.vue +26 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.129",
|
|
4
4
|
"description": "前端业务UI库",
|
|
5
5
|
"keyword": "cnhis-design-vue vue cnhis",
|
|
6
6
|
"homepage": "http://dv.cnhis.com/",
|
|
@@ -114,4 +114,4 @@
|
|
|
114
114
|
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
}
|
|
117
|
+
}
|
|
@@ -101,6 +101,18 @@ export default class CardReaderSDK {
|
|
|
101
101
|
return this.readHealthCardDialog.show(options);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
async getCardType() {
|
|
105
|
+
await this.checkLoading();
|
|
106
|
+
|
|
107
|
+
const requestParams = this.createParams(TRANS_CMD.CARD_TYPE_READ, {
|
|
108
|
+
transsystem: '10',
|
|
109
|
+
transtype: 'IDCARD',
|
|
110
|
+
interfaceid: '0'
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(requestParams));
|
|
114
|
+
}
|
|
115
|
+
|
|
104
116
|
async generalRequest(params = {}) {
|
|
105
117
|
await this.checkLoading();
|
|
106
118
|
const requestParams = this.createParams(TRANS_CMD.NS_GETPERSONALINFO, {}, params);
|
|
@@ -512,21 +512,33 @@ export default {
|
|
|
512
512
|
const lineHeightSeq = (obj.seqStyle?.circle?.radius || 9) * 2 + 2;
|
|
513
513
|
let prevLeft = originX;
|
|
514
514
|
let prevCondition;
|
|
515
|
+
const pointerObj = {};
|
|
515
516
|
|
|
516
|
-
const setTop = (lineHeight, i, condition) => {
|
|
517
|
+
const setTop = (item, lineHeight, i, condition) => {
|
|
518
|
+
let _lineHeight = lineHeight;
|
|
519
|
+
if (item.desc && obj.showDesc) {
|
|
520
|
+
_lineHeight = lineHeight + lineHeightText;
|
|
521
|
+
}
|
|
517
522
|
if (!~condition.limitIndex) {
|
|
518
|
-
condition.y += i === 0 ?
|
|
519
|
-
if (condition.y >= endY + markHeight -
|
|
523
|
+
condition.y += i === 0 ? _lineHeight / 2 : _lineHeight;
|
|
524
|
+
if (condition.y >= endY + markHeight - _lineHeight / 2) {
|
|
520
525
|
condition.limitIndex++;
|
|
521
526
|
if (condition.limitIndex === 0) {
|
|
522
527
|
condition.y = baseYLimit;
|
|
523
|
-
condition.y -=
|
|
528
|
+
condition.y -= _lineHeight / 2;
|
|
524
529
|
}
|
|
525
530
|
}
|
|
526
531
|
} else {
|
|
527
|
-
condition.y -=
|
|
532
|
+
condition.y -= _lineHeight;
|
|
533
|
+
}
|
|
534
|
+
const y = condition.y;
|
|
535
|
+
let y1,
|
|
536
|
+
y2 = y;
|
|
537
|
+
if (item.desc && obj.showDesc) {
|
|
538
|
+
y1 = y + _lineHeight / 2 - lineHeight - lineHeightText / 2;
|
|
539
|
+
y2 = y + _lineHeight / 2 - lineHeight / 2;
|
|
528
540
|
}
|
|
529
|
-
return
|
|
541
|
+
return { y1, y2 };
|
|
530
542
|
};
|
|
531
543
|
this.markData.forEach((item, index) => {
|
|
532
544
|
const condition = {
|
|
@@ -535,16 +547,15 @@ export default {
|
|
|
535
547
|
};
|
|
536
548
|
const x = this.computedX(item[0]);
|
|
537
549
|
// 相隔小于或等于一个小格的宽度就继承上个时间标记的高度继续计算定位,即错位显示
|
|
538
|
-
|
|
550
|
+
const prevHasBelowShow = pointerObj[`x_${prevLeft}`]?.some(o => o > endY);
|
|
551
|
+
if (x - prevLeft <= xCellWidth && prevHasBelowShow) {
|
|
539
552
|
Object.assign(condition, prevCondition);
|
|
540
553
|
}
|
|
541
554
|
if (this.isLimit(item[0])) {
|
|
542
555
|
const pointList = [];
|
|
556
|
+
pointerObj[`x_${x}`] = [];
|
|
543
557
|
item[1].forEach(async (v, i) => {
|
|
544
558
|
const common = {
|
|
545
|
-
left: x,
|
|
546
|
-
originX: 'center',
|
|
547
|
-
originY: 'center',
|
|
548
559
|
data: v.data || {},
|
|
549
560
|
other: v.other || {},
|
|
550
561
|
time: item[0],
|
|
@@ -553,23 +564,20 @@ export default {
|
|
|
553
564
|
objectCaching: false
|
|
554
565
|
};
|
|
555
566
|
|
|
567
|
+
let conditionRes;
|
|
556
568
|
if (this.isObject(v) && !v.value) {
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
...obj.iconStyle,
|
|
560
|
-
...v,
|
|
561
|
-
...common
|
|
562
|
-
};
|
|
563
|
-
pointList.push(this.drawMarkPoint(v, option, obj));
|
|
569
|
+
conditionRes = setTop(v, lineHeightImg, i, condition);
|
|
570
|
+
pointList.push(this.drawMarkPoint(v, common, obj, conditionRes, x));
|
|
564
571
|
} else if (v.value) {
|
|
565
572
|
if (v.seq) {
|
|
566
|
-
|
|
567
|
-
pointList.push(this.drawMarkPoint(v, common, obj));
|
|
573
|
+
conditionRes = setTop(v, lineHeightSeq, i, condition);
|
|
574
|
+
pointList.push(this.drawMarkPoint(v, common, obj, conditionRes, x));
|
|
568
575
|
} else {
|
|
569
|
-
|
|
570
|
-
pointList.push(this.drawMarkPoint(v, common, obj));
|
|
576
|
+
conditionRes = setTop(v, lineHeightText, i, condition);
|
|
577
|
+
pointList.push(this.drawMarkPoint(v, common, obj, conditionRes, x));
|
|
571
578
|
}
|
|
572
579
|
}
|
|
580
|
+
pointerObj[`x_${x}`].push(conditionRes.y2);
|
|
573
581
|
});
|
|
574
582
|
prevLeft = x;
|
|
575
583
|
prevCondition = condition;
|
|
@@ -580,7 +588,13 @@ export default {
|
|
|
580
588
|
}
|
|
581
589
|
});
|
|
582
590
|
},
|
|
583
|
-
async drawMarkPoint(v, option, obj) {
|
|
591
|
+
async drawMarkPoint(v, option, obj, { y1, y2 }, x) {
|
|
592
|
+
const positionObj = {
|
|
593
|
+
left: x,
|
|
594
|
+
originX: 'center',
|
|
595
|
+
originY: 'center',
|
|
596
|
+
top: y2
|
|
597
|
+
};
|
|
584
598
|
let point;
|
|
585
599
|
const eventStyle = !this.eventStyle.evented
|
|
586
600
|
? {
|
|
@@ -595,6 +609,9 @@ export default {
|
|
|
595
609
|
}
|
|
596
610
|
point = await this.createPoint(v?.url || v?.iconClassName ? 'img' : v.type, {
|
|
597
611
|
ele: ele || '',
|
|
612
|
+
...positionObj,
|
|
613
|
+
...obj.iconStyle,
|
|
614
|
+
...v,
|
|
598
615
|
...option,
|
|
599
616
|
...eventStyle
|
|
600
617
|
});
|
|
@@ -602,6 +619,7 @@ export default {
|
|
|
602
619
|
if (v.seq) {
|
|
603
620
|
// 标记增加序号
|
|
604
621
|
const circle = await this.createPoint('circle', {
|
|
622
|
+
...positionObj,
|
|
605
623
|
...option,
|
|
606
624
|
radius: 5,
|
|
607
625
|
strokeWidth: 1,
|
|
@@ -611,10 +629,12 @@ export default {
|
|
|
611
629
|
});
|
|
612
630
|
const text = new this.fabric.Text(String(v.value), {
|
|
613
631
|
...defaultVaule.textStyle,
|
|
632
|
+
...positionObj,
|
|
614
633
|
...option,
|
|
615
634
|
...(obj.seqStyle?.text || {})
|
|
616
635
|
});
|
|
617
636
|
point = await new this.fabric.Group([circle, text], {
|
|
637
|
+
...positionObj,
|
|
618
638
|
...option,
|
|
619
639
|
...eventStyle
|
|
620
640
|
});
|
|
@@ -622,11 +642,27 @@ export default {
|
|
|
622
642
|
point = await new this.fabric.Text(String(v.value), {
|
|
623
643
|
...defaultVaule.textStyle,
|
|
624
644
|
...obj.style,
|
|
645
|
+
...positionObj,
|
|
625
646
|
...option,
|
|
626
647
|
...eventStyle
|
|
627
648
|
});
|
|
628
649
|
}
|
|
629
650
|
}
|
|
651
|
+
if (y1) {
|
|
652
|
+
const descPoint = new this.fabric.Text(String(v.desc), {
|
|
653
|
+
...defaultVaule.textStyle,
|
|
654
|
+
...positionObj,
|
|
655
|
+
...option,
|
|
656
|
+
...obj.style,
|
|
657
|
+
top: y1
|
|
658
|
+
});
|
|
659
|
+
point = await new this.fabric.Group([descPoint, point], {
|
|
660
|
+
...option,
|
|
661
|
+
left: x,
|
|
662
|
+
originX: 'center',
|
|
663
|
+
...eventStyle
|
|
664
|
+
});
|
|
665
|
+
}
|
|
630
666
|
|
|
631
667
|
point.hasControls = point.hasBorders = false;
|
|
632
668
|
this.pointEvent(point);
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
show-search
|
|
132
132
|
:mode="showMulti"
|
|
133
133
|
:disabled="isLock"
|
|
134
|
-
@search="
|
|
134
|
+
@search="debounceSearch"
|
|
135
135
|
@change="handleSelectChange"
|
|
136
136
|
:getPopupContainer="getPopupContainer"
|
|
137
137
|
:filterOption="filterOption"
|
|
@@ -171,11 +171,12 @@
|
|
|
171
171
|
* getSearchOptions 关键字检索的 function
|
|
172
172
|
* getCascadeOptions 获取级联数据的 furnction
|
|
173
173
|
*/
|
|
174
|
-
import { Select, Input, Radio, Checkbox, Cascader, Icon } from 'ant-design-vue';
|
|
174
|
+
import { Select, Input, Radio, Checkbox, Cascader, Icon, Spin } from 'ant-design-vue';
|
|
175
175
|
import { judgeTypes } from '../mixin/judgeTypes';
|
|
176
176
|
// import format from "@/components/table/mixins/format";
|
|
177
177
|
// import TextOverTooltip from "./text-over-tooltip/TextOverTooltip.vue";
|
|
178
178
|
import utils from '@/utils/utils-map';
|
|
179
|
+
import vexutils from '@/utils/vexutils';
|
|
179
180
|
import axios from 'axios';
|
|
180
181
|
import 'viewerjs/dist/viewer.css';
|
|
181
182
|
import { component as Viewer } from 'v-viewer';
|
|
@@ -211,6 +212,7 @@ export default {
|
|
|
211
212
|
[Radio.name]: Radio,
|
|
212
213
|
[Radio.Group.name]: Radio.Group,
|
|
213
214
|
[Select.name]: Select,
|
|
215
|
+
[Spin.name]: Spin,
|
|
214
216
|
[Select.Option.name]: Select.Option
|
|
215
217
|
},
|
|
216
218
|
computed: {
|
|
@@ -302,6 +304,9 @@ export default {
|
|
|
302
304
|
optionsPreSuffixObj: {}
|
|
303
305
|
};
|
|
304
306
|
},
|
|
307
|
+
created(){
|
|
308
|
+
this.debounceSearch = vexutils.debounce(this.handleSearch, 100);
|
|
309
|
+
},
|
|
305
310
|
methods: {
|
|
306
311
|
init(value) {
|
|
307
312
|
let options = value.options || [];
|
|
@@ -543,6 +548,7 @@ export default {
|
|
|
543
548
|
try {
|
|
544
549
|
// 动态数据源转静态数据
|
|
545
550
|
if (this.cloneItem?.type == 'SELECT' && this.isDynamic2Static) return
|
|
551
|
+
this.fetching = true;
|
|
546
552
|
this.curOptions = await this.getSearchOptions(
|
|
547
553
|
{
|
|
548
554
|
values: this.columnKey,
|
|
@@ -551,8 +557,10 @@ export default {
|
|
|
551
557
|
},
|
|
552
558
|
this.cloneItem
|
|
553
559
|
);
|
|
560
|
+
this.fetching = false;
|
|
554
561
|
console.log(this.curOptions, 'curOptions');
|
|
555
562
|
} catch (error) {
|
|
563
|
+
this.fetching = false;
|
|
556
564
|
console.log(error);
|
|
557
565
|
}
|
|
558
566
|
},
|
|
@@ -234,8 +234,11 @@
|
|
|
234
234
|
<!-- 平铺按钮列表 -->
|
|
235
235
|
<template v-for="(item, j) in rowTileBtnList">
|
|
236
236
|
<!-- v-if="item.type == 'ADD'" -->
|
|
237
|
-
<li ref="rowTileBtnItem" class="rowTileBtn-item
|
|
238
|
-
<template v-if="item
|
|
237
|
+
<li ref="rowTileBtnItem" class="rowTileBtn-item" :key="item.sid" v-if="showLi(item)" :data-key="item.sid" data-source="rowTile">
|
|
238
|
+
<template v-if="isFrontendComponent(item) && !item.isHide">
|
|
239
|
+
<slot name="frontendComponent" v-bind="$attrs" :curBtn="item"></slot>
|
|
240
|
+
</template>
|
|
241
|
+
<template v-else-if="item.type == 'ADD' || item.type == 'BATCH'">
|
|
239
242
|
<a-button
|
|
240
243
|
v-preventReClick="preventReTime"
|
|
241
244
|
v-show="visibleBtn(item) && !item.isHide"
|
|
@@ -314,7 +317,12 @@
|
|
|
314
317
|
<a-dropdown overlayClassName="baseSearch-fold-dropdown" v-show="!isInlineOperating">
|
|
315
318
|
<a-menu slot="overlay">
|
|
316
319
|
<template v-for="(b, j) in rowFoldBtnList">
|
|
317
|
-
<
|
|
320
|
+
<template v-if="isFrontendComponent(b)">
|
|
321
|
+
<a-sub-menu v-if="visibleBtn(b)" title="读卡" :key="b.sid">
|
|
322
|
+
<slot name="frontendComponent" v-bind="$attrs" comType="submenu" :curBtn="b"></slot>
|
|
323
|
+
</a-sub-menu>
|
|
324
|
+
</template>
|
|
325
|
+
<a-menu-item v-show="visibleBtn(b)" :key="b.sid" class="dropdown-btn" v-else-if="showLiAdd(b)" @click="showDrawer(b, j)">
|
|
318
326
|
{{ b.alias || b.name }}
|
|
319
327
|
<getBtnIcon :data="b" :btnObj="btnObj" />
|
|
320
328
|
</a-menu-item>
|
|
@@ -340,7 +348,12 @@
|
|
|
340
348
|
<a-menu-item-group :key="key" v-if="showRowFoldBtnList(value.list)">
|
|
341
349
|
<template slot="title"></template>
|
|
342
350
|
<template v-for="(b, j) in value.list">
|
|
343
|
-
<
|
|
351
|
+
<template v-if="isFrontendComponent(b)">
|
|
352
|
+
<a-sub-menu v-if="visibleBtn(b)" title="读卡" :key="b.sid">
|
|
353
|
+
<slot name="frontendComponent" v-bind="$attrs" comType="submenu" :curBtn="b"></slot>
|
|
354
|
+
</a-sub-menu>
|
|
355
|
+
</template>
|
|
356
|
+
<a-menu-item v-show="visibleBtn(b)" :key="b.sid" class="dropdown-btn" v-else-if="b.type == 'ADD'" @click="showDrawer(b, j)">
|
|
344
357
|
{{ b.alias || b.name }}
|
|
345
358
|
<getBtnIcon :data="b" :btnObj="btnObj" />
|
|
346
359
|
</a-menu-item>
|
|
@@ -930,6 +943,13 @@ export default create({
|
|
|
930
943
|
this.tabIndex = index;
|
|
931
944
|
if (index !== -1) this.$emit('tabClick', this.tabConditionList[index]);
|
|
932
945
|
},
|
|
946
|
+
isFrontendComponent(item){
|
|
947
|
+
if(item.type !== 'ADD') return false;
|
|
948
|
+
if(Array.isArray(item.settingObj)) {
|
|
949
|
+
return item.settingObj[0]?.trigger_type === 'FRONTEND_COMPONENT'
|
|
950
|
+
}
|
|
951
|
+
return item.settingObj?.trigger_type === 'FRONTEND_COMPONENT'
|
|
952
|
+
},
|
|
933
953
|
pageResize(obj) {
|
|
934
954
|
if (this.resizeFlag || this.visibleInlineOperateBtn || this.isRowEditing) return;
|
|
935
955
|
let baseLeft = this.$refs['baseLeft'];
|
|
@@ -618,17 +618,20 @@
|
|
|
618
618
|
class="edit-tag"
|
|
619
619
|
v-for="(item, index) in parentNames"
|
|
620
620
|
:key="index"
|
|
621
|
-
@dblclick="e => editParentName(e, item)"
|
|
621
|
+
@dblclick="e => editParentName(e, item, index)"
|
|
622
622
|
@click="handleParentNameSelect(item, index)"
|
|
623
623
|
:class="{ 'edit-tag-select': item.selected && item.disabled }"
|
|
624
624
|
>
|
|
625
625
|
<a-input
|
|
626
|
+
:ref="`${item.value}-${index}`"
|
|
626
627
|
style="width: 100px"
|
|
627
628
|
:value="item"
|
|
628
629
|
:disabled="item.disabled"
|
|
629
630
|
@blur="() => (item.disabled = true)"
|
|
630
631
|
v-model="item.value"
|
|
632
|
+
:maxLength="10"
|
|
631
633
|
/>
|
|
634
|
+
<div v-if="item.disabled" class="disabled-mask" @click="maskClick"></div>
|
|
632
635
|
<a-icon slot="suffix" type="close" @click="handleParentNamesRemove(index, item)" />
|
|
633
636
|
</div>
|
|
634
637
|
<template v-if="!parentNamesHasAdd">
|
|
@@ -1044,7 +1047,7 @@ export default create({
|
|
|
1044
1047
|
this.$set(this.quickSearch[index], "value", i);
|
|
1045
1048
|
}
|
|
1046
1049
|
} else {
|
|
1047
|
-
|
|
1050
|
+
this.$set(this.quickSearch[index], "value", value);
|
|
1048
1051
|
}
|
|
1049
1052
|
} else {
|
|
1050
1053
|
this.clearQuickItem(item, index)
|
|
@@ -1635,10 +1638,13 @@ export default create({
|
|
|
1635
1638
|
});
|
|
1636
1639
|
this.addVal = "";
|
|
1637
1640
|
},
|
|
1638
|
-
editParentName(e, item) {
|
|
1641
|
+
editParentName(e, item, index) {
|
|
1639
1642
|
item.disabled = false;
|
|
1643
|
+
let inputRef = `${item.value}-${index}`
|
|
1644
|
+
let inputDom = this.$refs[inputRef]?.[0]
|
|
1645
|
+
if(!inputDom) return;
|
|
1640
1646
|
setTimeout(() => {
|
|
1641
|
-
|
|
1647
|
+
inputDom.focus();
|
|
1642
1648
|
}, 0);
|
|
1643
1649
|
},
|
|
1644
1650
|
handleParentNameSelect(item, index) {
|
|
@@ -1650,6 +1656,7 @@ export default create({
|
|
|
1650
1656
|
});
|
|
1651
1657
|
item.selected = !item.selected;
|
|
1652
1658
|
},
|
|
1659
|
+
maskClick() {},
|
|
1653
1660
|
handleParentNamesRemove(index, item) {
|
|
1654
1661
|
this.handleParent(index, item);
|
|
1655
1662
|
},
|
|
@@ -2214,6 +2221,21 @@ export default create({
|
|
|
2214
2221
|
display: inline-block;
|
|
2215
2222
|
margin-right: 10px;
|
|
2216
2223
|
margin-bottom: 10px;
|
|
2224
|
+
.disabled-mask {
|
|
2225
|
+
position: absolute;
|
|
2226
|
+
right: 0;
|
|
2227
|
+
left: 0;
|
|
2228
|
+
top: 0;
|
|
2229
|
+
bottom: 0;
|
|
2230
|
+
border-radius: 4px;
|
|
2231
|
+
}
|
|
2232
|
+
.anticon-close {
|
|
2233
|
+
position: absolute;
|
|
2234
|
+
right: 5px;
|
|
2235
|
+
line-height: 36px;
|
|
2236
|
+
color: #2d7aff;
|
|
2237
|
+
font-size: 12px;
|
|
2238
|
+
}
|
|
2217
2239
|
.add-parent {
|
|
2218
2240
|
border-color: #d9d9d9;
|
|
2219
2241
|
}
|