cnhis-design-vue 2.1.145 → 2.1.147
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 +20 -0
- package/es/age/index.js +2 -2
- package/es/big-table/index.js +26 -26
- package/es/button/index.js +198 -198
- package/es/button/style.css +1 -1
- package/es/captcha/index.js +3 -3
- package/es/card-reader-sdk/index.js +1 -1
- 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 +84 -48
- package/es/form-table/index.js +20 -20
- package/es/full-calendar/index.js +4 -4
- package/es/index/index.js +453 -417
- 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 +27 -27
- 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 +226 -226
- 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 +480 -444
- package/lib/cui.umd.js +480 -444
- package/lib/cui.umd.min.js +7 -7
- package/package.json +1 -1
- package/packages/button/src/ButtonPrint/index.vue +6 -0
- package/packages/button/src/ButtonPrint/new.vue +13 -12
- package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +30 -10
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +2 -2
- package/packages/fabric-chart/src/mixins/fabricCommon.js +0 -4
- package/packages/fabric-chart/src/utils/index.js +7 -0
package/package.json
CHANGED
|
@@ -68,7 +68,8 @@
|
|
|
68
68
|
<a-button-group v-else>
|
|
69
69
|
<a-button style="display: flex;align-items: center;" :loading="this.spinning" @click.stop="printAllButtonClick">
|
|
70
70
|
<a-icon type="printer" v-if="!this.spinning"/>
|
|
71
|
-
|
|
71
|
+
<!-- 如果允许打印全部则展示打印全部,否则展示传入的动态按钮名称 -->
|
|
72
|
+
{{ isShowPrintAllBtn ? '打印全部' : btnText }}
|
|
72
73
|
</a-button>
|
|
73
74
|
<a-button
|
|
74
75
|
v-if="innerPrintItems.length == 0"
|
|
@@ -347,17 +348,17 @@ export default create({
|
|
|
347
348
|
return this.options.every(option => option.selected);
|
|
348
349
|
},
|
|
349
350
|
// 设置默认format的标题
|
|
350
|
-
defaultFormatTitle() {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
},
|
|
351
|
+
// defaultFormatTitle() {
|
|
352
|
+
// const curFormat = this.innerPrintItems.find(option => option.key == this.defaultPrintFormatId);
|
|
353
|
+
// if (curFormat) {
|
|
354
|
+
// return `打印${curFormat.label}`;
|
|
355
|
+
// }
|
|
356
|
+
// // 如果innerPrintItems长度只有一项,则默认选中它
|
|
357
|
+
// if (this.innerPrintItems.length == 1) {
|
|
358
|
+
// return `打印${this.innerPrintItems[0].label}`;
|
|
359
|
+
// }
|
|
360
|
+
// return ''
|
|
361
|
+
// },
|
|
361
362
|
},
|
|
362
363
|
data() {
|
|
363
364
|
return {
|
|
@@ -58,6 +58,14 @@ export default {
|
|
|
58
58
|
this.createLine();
|
|
59
59
|
this.eventStyle.evented && this.createEvent();
|
|
60
60
|
},
|
|
61
|
+
isTopTreeAndGridLimit(x, y) {
|
|
62
|
+
const { endX, endYTop, originYTop } = this.propItems;
|
|
63
|
+
return x >= 0 && x <= endX && y >= originYTop && y <= endYTop;
|
|
64
|
+
},
|
|
65
|
+
isGridLimit({ x, y }) {
|
|
66
|
+
const { originX, endX, endYTop, originYTop } = this.propItems;
|
|
67
|
+
return x >= originX && x <= endX && y >= originYTop && y <= endYTop;
|
|
68
|
+
},
|
|
61
69
|
createEvent() {
|
|
62
70
|
this.canvas.on('mouse:up', event => {
|
|
63
71
|
if (event.button === 3) {
|
|
@@ -104,25 +112,37 @@ export default {
|
|
|
104
112
|
this.rightClickNode = Object.freeze(rightClickNode.slice());
|
|
105
113
|
this.isRightVisible = true;
|
|
106
114
|
} else {
|
|
107
|
-
this.doContextmenuEvent(this.activeEvent.pointer);
|
|
115
|
+
this.doContextmenuEvent(id, this.activeEvent.pointer);
|
|
108
116
|
}
|
|
109
117
|
});
|
|
110
118
|
},
|
|
111
|
-
doContextmenuEvent(pointer) {
|
|
119
|
+
doContextmenuEvent(id, pointer) {
|
|
112
120
|
const { x, y } = pointer;
|
|
113
121
|
const { treeList } = this.$propItems();
|
|
114
122
|
const _treeList = vexutils.clone(treeList, true);
|
|
115
|
-
|
|
123
|
+
const param = { type: 'tree', treeData: [] };
|
|
124
|
+
const isBlankGrid = !id && this.isGridLimit(pointer);
|
|
125
|
+
if (isBlankGrid) {
|
|
126
|
+
param.type = 'grid';
|
|
127
|
+
param.time = this.getXValue(x);
|
|
128
|
+
param.lineData = [];
|
|
129
|
+
}
|
|
116
130
|
ergodicTree(_treeList);
|
|
117
|
-
|
|
118
|
-
data = null;
|
|
131
|
+
this.$emit('rightClick', param);
|
|
119
132
|
function ergodicTree(tree) {
|
|
120
133
|
for (let i = 0, len = tree.length; i < len; i++) {
|
|
121
|
-
const { left, top, width, height, children = [], origin } = tree[i];
|
|
122
|
-
if (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
134
|
+
const { left, top, width, height, children = [], origin, lineList = [] } = tree[i];
|
|
135
|
+
if (y >= top && y <= top + height) {
|
|
136
|
+
if (x >= left && x <= left + width) {
|
|
137
|
+
param.treeData = origin;
|
|
138
|
+
break;
|
|
139
|
+
} else if (children.length) {
|
|
140
|
+
ergodicTree(children);
|
|
141
|
+
} else if (isBlankGrid) {
|
|
142
|
+
param.treeData = origin;
|
|
143
|
+
param.lineData = lineList;
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
126
146
|
}
|
|
127
147
|
}
|
|
128
148
|
}
|
|
@@ -14,7 +14,7 @@ import MouseRightClick from '../components/MouseRightClick';
|
|
|
14
14
|
import DropPopup from '../components/DropPopup';
|
|
15
15
|
import defaultVaule from '../const/defaultVaule';
|
|
16
16
|
import Bus from '../utils/bus';
|
|
17
|
-
import { nearlyEqual, getUuid } from '../utils';
|
|
17
|
+
import { nearlyEqual, getUuid, toReversed } from '../utils';
|
|
18
18
|
import vexutils from '@/utils/vexutils';
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -1063,7 +1063,7 @@ export default {
|
|
|
1063
1063
|
if (isRight) {
|
|
1064
1064
|
this._concatIndex = polylineObj?.pointerList.findIndex(l => l + n > left && l > originLeft);
|
|
1065
1065
|
} else {
|
|
1066
|
-
const idx = polylineObj?.pointerList
|
|
1066
|
+
const idx = polylineObj?.pointerList?.length ? toReversed(polylineObj?.pointerList).findIndex(l => l - n < left && l < originLeft) : -1;
|
|
1067
1067
|
this._concatIndex = !~idx ? -1 : polylineObj?.pointerList.length - 1 - idx;
|
|
1068
1068
|
}
|
|
1069
1069
|
if (!~this._concatIndex) {
|
|
@@ -72,10 +72,6 @@ export default {
|
|
|
72
72
|
isGridLimit(x, y) {
|
|
73
73
|
const { originX, originY, endX, endY } = this.propItems;
|
|
74
74
|
return x >= originX && x <= endX && y >= originY && y <= endY;
|
|
75
|
-
},
|
|
76
|
-
isTopTreeAndGridLimit(x, y) {
|
|
77
|
-
const { endX, endYTop, originYTop } = this.propItems;
|
|
78
|
-
return x >= 0 && x <= endX && y >= originYTop && y <= endYTop;
|
|
79
75
|
}
|
|
80
76
|
}
|
|
81
77
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import vexutils from '@/utils/vexutils';
|
|
2
|
+
|
|
1
3
|
export const isNumber = num => {
|
|
2
4
|
return typeof num === 'number' && Number.isFinite(num);
|
|
3
5
|
};
|
|
@@ -95,3 +97,8 @@ export function getUuid() {
|
|
|
95
97
|
return v.toString(16);
|
|
96
98
|
});
|
|
97
99
|
}
|
|
100
|
+
|
|
101
|
+
export function toReversed(arr) {
|
|
102
|
+
const copyArr = vexutils.clone(arr, true);
|
|
103
|
+
return copyArr.reverse();
|
|
104
|
+
}
|