cnhis-design-vue 2.1.16 → 2.1.17
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 +2219 -2219
- package/es/affix/index.js +8 -8
- package/es/age/index.js +10 -10
- package/es/alert/index.js +8 -8
- package/es/anchor/index.js +8 -8
- package/es/auto-complete/index.js +8 -8
- package/es/avatar/index.js +8 -8
- package/es/back-top/index.js +8 -8
- package/es/badge/index.js +8 -8
- package/es/base/index.js +8 -8
- package/es/big-table/index.js +124 -111
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +59 -53
- package/es/button/style.css +1 -1
- package/es/calendar/index.js +8 -8
- package/es/captcha/index.js +3 -3
- package/es/card/index.js +8 -8
- package/es/carousel/index.js +8 -8
- package/es/cascader/index.js +8 -8
- package/es/checkbox/index.js +9 -9
- package/es/col/index.js +8 -8
- package/es/collapse/index.js +8 -8
- package/es/color-picker/index.js +1 -1
- package/es/comment/index.js +8 -8
- package/es/config-provider/index.js +8 -8
- package/es/date-picker/index.js +8 -8
- package/es/descriptions/index.js +8 -8
- package/es/divider/index.js +8 -8
- package/es/drag-layout/index.js +3 -3
- package/es/drawer/index.js +8 -8
- package/es/dropdown/index.js +8 -8
- package/es/editor/index.js +1 -1
- package/es/empty/index.js +8 -8
- package/es/fabric-chart/index.js +95 -104
- package/es/fabric-chart/style.css +1 -1
- package/es/form/index.js +8 -8
- package/es/form-model/index.js +8 -8
- package/es/form-table/index.js +62 -62
- package/es/index/index.js +666 -656
- package/es/index/style.css +1 -1
- package/es/input/index.js +9 -9
- package/es/input-number/index.js +8 -8
- package/es/layout/index.js +8 -8
- package/es/list/index.js +8 -8
- package/es/locale-provider/index.js +8 -8
- package/es/map/index.js +9 -9
- package/es/mentions/index.js +8 -8
- package/es/menu/index.js +8 -8
- package/es/message/index.js +8 -8
- package/es/multi-chat/index.js +92 -92
- package/es/multi-chat-client/index.js +86 -86
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +14 -14
- package/es/multi-chat-setting/index.js +27 -27
- package/es/multi-chat-sip/index.js +1 -1
- package/es/notification/index.js +8 -8
- package/es/page-header/index.js +8 -8
- package/es/pagination/index.js +8 -8
- package/es/popconfirm/index.js +8 -8
- package/es/popover/index.js +8 -8
- package/es/progress/index.js +8 -8
- package/es/radio/index.js +9 -9
- package/es/rate/index.js +8 -8
- package/es/result/index.js +8 -8
- package/es/row/index.js +8 -8
- package/es/scale-view/index.js +33 -33
- package/es/select/index.js +11 -11
- package/es/select-label/index.js +11 -11
- package/es/select-person/index.js +20 -20
- package/es/skeleton/index.js +8 -8
- package/es/slider/index.js +8 -8
- package/es/space/index.js +8 -8
- package/es/spin/index.js +8 -8
- package/es/statistic/index.js +8 -8
- package/es/steps/index.js +8 -8
- package/es/switch/index.js +8 -8
- package/es/table-filter/index.js +145 -139
- package/es/table-filter/style.css +1 -1
- package/es/tabs/index.js +8 -8
- package/es/tag/index.js +9 -9
- package/es/time-picker/index.js +8 -8
- package/es/timeline/index.js +8 -8
- package/es/tooltip/index.js +8 -8
- package/es/transfer/index.js +8 -8
- package/es/tree/index.js +8 -8
- package/es/tree-select/index.js +8 -8
- package/es/upload/index.js +8 -8
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +644 -634
- package/lib/cui.umd.js +644 -634
- package/lib/cui.umd.min.js +72 -72
- package/package.json +107 -107
- package/packages/big-table/src/BigTable.vue +3038 -3038
- package/packages/big-table/src/assets/style/table-base.less +370 -370
- package/packages/big-table/src/components/AutoLayoutButton.vue +270 -270
- package/packages/big-table/src/utils/batchEditing.js +34 -27
- package/packages/big-table/src/utils/bigTableProps.js +95 -95
- package/packages/button/src/ButtonPrint/components/IdentityVerification.vue +181 -181
- package/packages/button/src/ButtonPrint/index.vue +728 -724
- package/packages/fabric-chart/src/FabricChart.vue +15 -36
- package/packages/fabric-chart/src/components/TimeScaleValue.vue +117 -117
- package/packages/fabric-chart/src/const/defaultVaule.js +59 -59
- package/packages/fabric-chart/src/fabric-chart/FabricCanvas.vue +4 -3
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +960 -960
- package/packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue +135 -133
- package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +558 -558
- package/packages/fabric-chart/src/fabric-chart2/FabricTop.vue +172 -172
- package/packages/multi-chat/chat/chatFooter.vue +1598 -1598
- package/packages/multi-chat/chat/chatMain.vue +1442 -1442
- package/packages/multi-chat/chat/quickReply.vue +439 -439
- package/packages/multi-chat/chat/scrollList.vue +1232 -1232
- package/packages/multi-chat/setting/baseInfo/index.vue +1302 -1302
- package/packages/multi-chat/store/actions.js +448 -448
- package/packages/multi-chat/store/state.js +112 -112
- package/packages/scale-view/formitem/r-choice.vue +714 -714
- package/packages/scale-view/scaleView.vue +2010 -2010
- package/packages/select-person/select-person.vue +1658 -1658
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +2462 -2462
- package/packages/table-filter/src/components/c-tree-select/tree-select.vue +336 -336
- package/packages/table-filter/src/components/multi-select/multi-select.vue +219 -219
- package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +340 -340
- package/packages/table-filter/src/const/dataOptions.js +43 -43
- package/packages/table-filter/src/mixins/mixins.js +695 -695
- package/packages/table-filter/src/quick-search/QuickSearch.vue +2083 -2083
- package/src/directive/preventReClick.js +12 -12
|
@@ -1,133 +1,135 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<TimeScaleValue v-if="templateData.top.xScalevalue.popupTop" :times="timeList" :templateData="templateData" />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
import fabricCommon from '../mixins/fabricCommon';
|
|
7
|
-
import defaultVaule from '../const/defaultVaule';
|
|
8
|
-
import TimeScaleValue from '../components/TimeScaleValue.vue';
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
name: 'fabric-scale-value',
|
|
12
|
-
mixins: [fabricCommon],
|
|
13
|
-
components: {
|
|
14
|
-
TimeScaleValue
|
|
15
|
-
},
|
|
16
|
-
props: {
|
|
17
|
-
templateData: {
|
|
18
|
-
type: Object,
|
|
19
|
-
required: true
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
data() {
|
|
23
|
-
return {
|
|
24
|
-
timeList: []
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
computed: {
|
|
28
|
-
defaultTextStyle() {
|
|
29
|
-
return {
|
|
30
|
-
...defaultVaule.textStyle,
|
|
31
|
-
centeredRotation: true,
|
|
32
|
-
originX: 'center',
|
|
33
|
-
originY: 'center'
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
mounted() {
|
|
38
|
-
this.$nextTick(() => {
|
|
39
|
-
this.topScaleValue(this.templateData.top);
|
|
40
|
-
this.rightScaleValue(this.templateData.right);
|
|
41
|
-
this.leftScaleValue(this.templateData.left);
|
|
42
|
-
this.canvas.renderAll();
|
|
43
|
-
});
|
|
44
|
-
},
|
|
45
|
-
methods: {
|
|
46
|
-
// x轴时间刻度绘制
|
|
47
|
-
topScaleValue(obj) {
|
|
48
|
-
const { originX, originY, xCellWidth, spaceHeight } = this.propItems;
|
|
49
|
-
const spaceGridNumber = obj.xScalevalue.spaceGridNumber || 3;
|
|
50
|
-
const defaultSpaceMinute = obj.xScalevalue.defaultSpaceTime || 15;
|
|
51
|
-
const defaultSpaceTime = defaultSpaceMinute * 60 * 1000;
|
|
52
|
-
const style = obj.xScalevalue.style || {};
|
|
53
|
-
const customStyle = obj.xScalevalue.customStyle || {};
|
|
54
|
-
const top = originY - Math.floor(spaceHeight / 2);
|
|
55
|
-
let textList = [];
|
|
56
|
-
const list = obj.xScalevalue.list || [];
|
|
57
|
-
list.reduce((pre, cur, i) => {
|
|
58
|
-
const newStyle = pre && new Date(cur).getTime() - new Date(pre).getTime() < defaultSpaceTime ? { ...style, ...customStyle } : style;
|
|
59
|
-
const text = this.createText(cur.slice(-5), originX + i * spaceGridNumber * xCellWidth, top, 'center', newStyle);
|
|
60
|
-
textList.push(text);
|
|
61
|
-
this.timeList.push({
|
|
62
|
-
time: cur.slice(-5),
|
|
63
|
-
left: originX + i * spaceGridNumber * xCellWidth,
|
|
64
|
-
width: text.width
|
|
65
|
-
});
|
|
66
|
-
return cur;
|
|
67
|
-
}, '');
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
this.canvas.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const spaceGridNumber = obj.rightYScalevalue.spaceGridNumber || 2;
|
|
78
|
-
const marginLeft = obj.rightYScalevalue.marginLeft || 3;
|
|
79
|
-
const originX = this.propItems.endX + marginLeft;
|
|
80
|
-
const style = obj.rightYScalevalue.style ? obj.rightYScalevalue.style : {};
|
|
81
|
-
let textList = [];
|
|
82
|
-
obj.rightYScalevalue.list.forEach((item, index) => {
|
|
83
|
-
textList.push(this.createText(item, originX, this.propItems.endY - index * this.propItems.yCellHeight * spaceGridNumber, 'left', style));
|
|
84
|
-
});
|
|
85
|
-
// 添加单位
|
|
86
|
-
if (obj.rightYScalevalue.unit) {
|
|
87
|
-
const top = this.propItems.endY - obj.rightYScalevalue.list.length * this.propItems.yCellHeight * spaceGridNumber + this.propItems.yCellHeight;
|
|
88
|
-
textList.push(this.createText(obj.rightYScalevalue.unit, originX, top, 'left', style));
|
|
89
|
-
}
|
|
90
|
-
const group = new this.fabric.Group([...textList], {
|
|
91
|
-
evented: false,
|
|
92
|
-
selectable: false
|
|
93
|
-
});
|
|
94
|
-
this.canvas.add(group);
|
|
95
|
-
this.canvas.sendBackwards(group);
|
|
96
|
-
},
|
|
97
|
-
leftScaleValue(obj) {
|
|
98
|
-
const
|
|
99
|
-
const
|
|
100
|
-
const
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<TimeScaleValue v-if="templateData.top.xScalevalue.popupTop" :times="timeList" :templateData="templateData" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import fabricCommon from '../mixins/fabricCommon';
|
|
7
|
+
import defaultVaule from '../const/defaultVaule';
|
|
8
|
+
import TimeScaleValue from '../components/TimeScaleValue.vue';
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: 'fabric-scale-value',
|
|
12
|
+
mixins: [fabricCommon],
|
|
13
|
+
components: {
|
|
14
|
+
TimeScaleValue
|
|
15
|
+
},
|
|
16
|
+
props: {
|
|
17
|
+
templateData: {
|
|
18
|
+
type: Object,
|
|
19
|
+
required: true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
data() {
|
|
23
|
+
return {
|
|
24
|
+
timeList: []
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
computed: {
|
|
28
|
+
defaultTextStyle() {
|
|
29
|
+
return {
|
|
30
|
+
...defaultVaule.textStyle,
|
|
31
|
+
centeredRotation: true,
|
|
32
|
+
originX: 'center',
|
|
33
|
+
originY: 'center'
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
mounted() {
|
|
38
|
+
this.$nextTick(() => {
|
|
39
|
+
this.topScaleValue(this.templateData.top);
|
|
40
|
+
this.rightScaleValue(this.templateData.right);
|
|
41
|
+
this.leftScaleValue(this.templateData.left);
|
|
42
|
+
this.canvas.renderAll();
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
methods: {
|
|
46
|
+
// x轴时间刻度绘制
|
|
47
|
+
topScaleValue(obj) {
|
|
48
|
+
const { originX, originY, xCellWidth, spaceHeight } = this.propItems;
|
|
49
|
+
const spaceGridNumber = obj.xScalevalue.spaceGridNumber || 3;
|
|
50
|
+
const defaultSpaceMinute = obj.xScalevalue.defaultSpaceTime || 15;
|
|
51
|
+
const defaultSpaceTime = defaultSpaceMinute * 60 * 1000;
|
|
52
|
+
const style = obj.xScalevalue.style || {};
|
|
53
|
+
const customStyle = obj.xScalevalue.customStyle || {};
|
|
54
|
+
const top = originY - Math.floor(spaceHeight / 2);
|
|
55
|
+
let textList = [];
|
|
56
|
+
const list = obj.xScalevalue.list || [];
|
|
57
|
+
list.reduce((pre, cur, i) => {
|
|
58
|
+
const newStyle = pre && new Date(cur).getTime() - new Date(pre).getTime() < defaultSpaceTime ? { ...style, ...customStyle } : style;
|
|
59
|
+
const text = this.createText(cur.slice(-5), originX + i * spaceGridNumber * xCellWidth, top, 'center', newStyle);
|
|
60
|
+
textList.push(text);
|
|
61
|
+
this.timeList.push({
|
|
62
|
+
time: cur.slice(-5),
|
|
63
|
+
left: originX + i * spaceGridNumber * xCellWidth,
|
|
64
|
+
width: text.width
|
|
65
|
+
});
|
|
66
|
+
return cur;
|
|
67
|
+
}, '');
|
|
68
|
+
const group = new this.fabric.Group([...textList], {
|
|
69
|
+
evented: false,
|
|
70
|
+
selectable: false
|
|
71
|
+
});
|
|
72
|
+
this.canvas.add(group);
|
|
73
|
+
this.canvas.sendBackwards(group);
|
|
74
|
+
},
|
|
75
|
+
rightScaleValue(obj) {
|
|
76
|
+
if (!obj) return;
|
|
77
|
+
const spaceGridNumber = obj.rightYScalevalue.spaceGridNumber || 2;
|
|
78
|
+
const marginLeft = obj.rightYScalevalue.marginLeft || 3;
|
|
79
|
+
const originX = this.propItems.endX + marginLeft;
|
|
80
|
+
const style = obj.rightYScalevalue.style ? obj.rightYScalevalue.style : {};
|
|
81
|
+
let textList = [];
|
|
82
|
+
obj.rightYScalevalue.list.forEach((item, index) => {
|
|
83
|
+
textList.push(this.createText(item, originX, this.propItems.endY - index * this.propItems.yCellHeight * spaceGridNumber, 'left', style));
|
|
84
|
+
});
|
|
85
|
+
// 添加单位
|
|
86
|
+
if (obj.rightYScalevalue.unit) {
|
|
87
|
+
const top = this.propItems.endY - obj.rightYScalevalue.list.length * this.propItems.yCellHeight * spaceGridNumber + this.propItems.yCellHeight;
|
|
88
|
+
textList.push(this.createText(obj.rightYScalevalue.unit, originX, top, 'left', style));
|
|
89
|
+
}
|
|
90
|
+
const group = new this.fabric.Group([...textList], {
|
|
91
|
+
evented: false,
|
|
92
|
+
selectable: false
|
|
93
|
+
});
|
|
94
|
+
this.canvas.add(group);
|
|
95
|
+
this.canvas.sendBackwards(group);
|
|
96
|
+
},
|
|
97
|
+
leftScaleValue(obj) {
|
|
98
|
+
const { endY, yCellHeight } = this.propItems;
|
|
99
|
+
const spaceGridNumber = obj.leftYScalevalue.spaceGridNumber || 2;
|
|
100
|
+
const [titleMarginRight, titleMarginButton] = obj.leftYScalevalue?.titleMargin || [5, 30];
|
|
101
|
+
const listMarginRight = obj.leftYScalevalue.listMarginRight || 3;
|
|
102
|
+
const style = obj.leftYScalevalue.style || {};
|
|
103
|
+
const originX = this.propItems.originX;
|
|
104
|
+
let textList = [];
|
|
105
|
+
obj.leftYScalevalue.list.forEach((item, index) => {
|
|
106
|
+
textList.push(this.createText(item, originX - listMarginRight, endY - index * yCellHeight * spaceGridNumber, 'right', style));
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// 添加标题和单位
|
|
110
|
+
let txt = '';
|
|
111
|
+
txt = obj.leftYScalevalue.name || '';
|
|
112
|
+
if (obj.leftYScalevalue.unit) txt += '\n' + obj.leftYScalevalue.unit;
|
|
113
|
+
if (txt) {
|
|
114
|
+
const top = endY - (obj.leftYScalevalue.list.length - 1) * yCellHeight * spaceGridNumber - titleMarginButton;
|
|
115
|
+
textList.push(this.createText(txt, originX - titleMarginRight, top, 'right', { ...style, textAlign: 'right', originY: 'bottom' }));
|
|
116
|
+
}
|
|
117
|
+
const group = new this.fabric.Group([...textList], {
|
|
118
|
+
evented: false,
|
|
119
|
+
selectable: false
|
|
120
|
+
});
|
|
121
|
+
this.canvas.add(group);
|
|
122
|
+
this.canvas.sendBackwards(group);
|
|
123
|
+
},
|
|
124
|
+
createText(text, left, top, originX, style) {
|
|
125
|
+
return new this.fabric.Text(String(text), {
|
|
126
|
+
...this.defaultTextStyle,
|
|
127
|
+
left,
|
|
128
|
+
top,
|
|
129
|
+
...style,
|
|
130
|
+
originX
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
</script>
|