cnhis-design-vue 2.1.34 → 2.1.35
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 +28 -9
- 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 +86 -86
- package/es/big-table/style.css +1 -1
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +22 -22
- 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 +545 -2355
- 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 +1117 -2909
- 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 +75 -75
- package/es/multi-chat-client/index.js +69 -69
- 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 +22 -22
- 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 +2 -2
- package/es/shortcut-setter/index.js +10 -10
- 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 +84 -73
- 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 +911 -2767
- package/lib/cui.umd.js +911 -2767
- package/lib/cui.umd.min.js +29 -29
- package/package.json +2 -1
- package/packages/big-table/src/components/AutoLayoutButton.vue +3 -3
- package/packages/fabric-chart/src/FabricChart.vue +0 -17
- package/packages/fabric-chart/src/FabricGrid.vue +3 -10
- package/packages/fabric-chart/src/components/TimeScaleValue.vue +10 -8
- package/packages/fabric-chart/src/const/defaultVaule.js +59 -59
- package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +2 -22
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +41 -34
- package/packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue +5 -6
- package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +21 -16
- package/packages/fabric-chart/src/mixins/draw.js +2 -1
- package/packages/fabric-chart/src/mixins/fabricCommon.js +14 -4
- package/packages/scale-view/scaleView.vue +2010 -2010
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +9 -0
- package/packages/fabric-chart/src/fabric-chart2/FabricBottom.vue +0 -108
- package/packages/fabric-chart/src/fabric-chart2/FabricCanvas.vue +0 -181
- package/packages/fabric-chart/src/fabric-chart2/FabricCenter.vue +0 -612
- package/packages/fabric-chart/src/fabric-chart2/FabricLeft.vue +0 -104
- package/packages/fabric-chart/src/fabric-chart2/FabricRight.vue +0 -112
- package/packages/fabric-chart/src/fabric-chart2/FabricTop.vue +0 -172
|
@@ -134,6 +134,9 @@
|
|
|
134
134
|
</a-button>
|
|
135
135
|
</a-input-search>
|
|
136
136
|
</li>
|
|
137
|
+
<a-button v-if="showRelatedSetting" type="primary" style="margin-right: 8px; margin-bottom: 8px" @click="relatedSetting" >
|
|
138
|
+
<a-icon type="setting" />
|
|
139
|
+
</a-button>
|
|
137
140
|
<template v-if="rowTileBtnListTree && rowTileBtnListTree.length === 1">
|
|
138
141
|
<a-button type="primary" style="margin-right: 8px; margin-bottom: 8px" @click="handleAddType(rowTileBtnListTree[0])">
|
|
139
142
|
{{ rowTileBtnListTree[0].alias || rowTileBtnListTree[0].name }}
|
|
@@ -786,6 +789,9 @@ export default create({
|
|
|
786
789
|
},
|
|
787
790
|
showBaseTabs() {
|
|
788
791
|
return this.conditionType === 'keyword' && this.tabConditionList?.length && !this.visibleInlineOperateBtn && !this.isRowEditing;
|
|
792
|
+
},
|
|
793
|
+
showRelatedSetting() {
|
|
794
|
+
return !!this.relatedBaseInfo?.showSetting;
|
|
789
795
|
}
|
|
790
796
|
},
|
|
791
797
|
data() {
|
|
@@ -1642,6 +1648,9 @@ export default create({
|
|
|
1642
1648
|
console.log(error);
|
|
1643
1649
|
}
|
|
1644
1650
|
},
|
|
1651
|
+
relatedSetting() {
|
|
1652
|
+
this.$emit('relatedSetting')
|
|
1653
|
+
},
|
|
1645
1654
|
handleAddType(btn) {
|
|
1646
1655
|
const btnObj = utils.getRowOperatorIdSetting({}, btn);
|
|
1647
1656
|
let setData = JSON.parse(btnObj.setting);
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import fabricCommon from '../mixins/fabricCommon';
|
|
3
|
-
import draw from '../mixins/draw';
|
|
4
|
-
import defaultVaule from '../const/defaultVaule';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
name: 'fabric-bottom2',
|
|
8
|
-
mixins: [fabricCommon, draw],
|
|
9
|
-
props: {
|
|
10
|
-
templateData: {
|
|
11
|
-
type: Object,
|
|
12
|
-
required: true
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
data() {
|
|
16
|
-
return {};
|
|
17
|
-
},
|
|
18
|
-
mounted() {
|
|
19
|
-
this.$nextTick(() => {
|
|
20
|
-
this.init();
|
|
21
|
-
});
|
|
22
|
-
},
|
|
23
|
-
computed: {
|
|
24
|
-
girdLineStyle() {
|
|
25
|
-
return Object.assign({}, defaultVaule.borderStyle, this.templateData.borderStyle || {});
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
methods: {
|
|
29
|
-
init() {
|
|
30
|
-
this.drawBottom(this.templateData.bottom || null);
|
|
31
|
-
this.canvas.renderAll();
|
|
32
|
-
},
|
|
33
|
-
drawBottom(bottom) {
|
|
34
|
-
const { xScaleList, xScaleCell, originX, endX, endY, xCellWidth, canvasHeight } = this.propItems;
|
|
35
|
-
if (!bottom) {
|
|
36
|
-
this.canvas.add(new this.fabric.Line([0, canvasHeight - 1, endX, canvasHeight - 1], defaultVaule.borderStyle));
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
const height = canvasHeight - endY;
|
|
40
|
-
const list = [];
|
|
41
|
-
let flag = true; // 定义呼吸数值显示为靠上还是靠下
|
|
42
|
-
// 数据列表
|
|
43
|
-
xScaleList.forEach((item, index) => {
|
|
44
|
-
const left = originX + index * xCellWidth;
|
|
45
|
-
let text = '';
|
|
46
|
-
bottom.list.forEach((v, i) => {
|
|
47
|
-
const time = new Date(v.time).getTime();
|
|
48
|
-
if (time >= item && time < item + xScaleCell) text = v.value;
|
|
49
|
-
});
|
|
50
|
-
const style = flag
|
|
51
|
-
? {
|
|
52
|
-
top: -(height / 2 - 10)
|
|
53
|
-
}
|
|
54
|
-
: {
|
|
55
|
-
top: height / 2 - 10
|
|
56
|
-
};
|
|
57
|
-
if (text) flag = !flag;
|
|
58
|
-
const group = this.drawTextGroup(
|
|
59
|
-
{
|
|
60
|
-
width: xCellWidth,
|
|
61
|
-
height,
|
|
62
|
-
...defaultVaule.rectStyle
|
|
63
|
-
},
|
|
64
|
-
Object.assign(
|
|
65
|
-
{},
|
|
66
|
-
{
|
|
67
|
-
text: String(text),
|
|
68
|
-
...defaultVaule.textStyle,
|
|
69
|
-
...top.textGroupStyle
|
|
70
|
-
},
|
|
71
|
-
text ? style : {}
|
|
72
|
-
),
|
|
73
|
-
{
|
|
74
|
-
left,
|
|
75
|
-
top: endY
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
list.push(group);
|
|
79
|
-
});
|
|
80
|
-
// 底部外框和标题名称
|
|
81
|
-
const titleGroup = this.drawTextGroup(
|
|
82
|
-
{
|
|
83
|
-
width: endX,
|
|
84
|
-
height: height - 1,
|
|
85
|
-
...defaultVaule.rectStyle
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
text: String(bottom.name + bottom.unit),
|
|
89
|
-
...defaultVaule.textStyle,
|
|
90
|
-
...top.textGroupStyle,
|
|
91
|
-
left: -((endX - originX) / 2)
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
left: 0,
|
|
95
|
-
top: endY
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
list.push(titleGroup);
|
|
99
|
-
const group = list.length > 0 ? new this.fabric.Group([...list], { ...defaultVaule.style }) : null;
|
|
100
|
-
group && group.sendToBack(); // 向下跳底层
|
|
101
|
-
group && this.canvas.add(group);
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
render(h) {
|
|
105
|
-
return this.$slots.default ? h('div', this.$slots.default) : undefined;
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
</script>
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<canvas :id="id"></canvas>
|
|
4
|
-
<slot></slot>
|
|
5
|
-
</div>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script>
|
|
9
|
-
import { fabric } from 'fabric';
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
name: 'FabricCanvas2',
|
|
13
|
-
props: {
|
|
14
|
-
id: {
|
|
15
|
-
type: String,
|
|
16
|
-
required: true
|
|
17
|
-
},
|
|
18
|
-
templateData: {
|
|
19
|
-
type: Object,
|
|
20
|
-
required: true
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
data() {
|
|
24
|
-
return {
|
|
25
|
-
canvas: null,
|
|
26
|
-
type: 'canvas',
|
|
27
|
-
canvasAttr: {
|
|
28
|
-
selectable: false,
|
|
29
|
-
evented: false,
|
|
30
|
-
selection: false,
|
|
31
|
-
containerClass: 'c-fabric-canvas-container',
|
|
32
|
-
fireRightClick: true
|
|
33
|
-
},
|
|
34
|
-
fabric: fabric
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
|
-
provide() {
|
|
38
|
-
return {
|
|
39
|
-
$canvas: () => this.canvas,
|
|
40
|
-
$group: () => null,
|
|
41
|
-
$fabric: () => fabric,
|
|
42
|
-
$propItems: () => {
|
|
43
|
-
return {
|
|
44
|
-
type: this.templateData.type,
|
|
45
|
-
endX: this.endX,
|
|
46
|
-
endY: this.endY,
|
|
47
|
-
originX: this.originX,
|
|
48
|
-
originY: this.originY,
|
|
49
|
-
gridYNumber: this.gridYNumber,
|
|
50
|
-
gridXNumber: this.gridXNumber,
|
|
51
|
-
canvasWidth: this.canvasWidth,
|
|
52
|
-
canvasHeight: this.canvasHeight,
|
|
53
|
-
xCellWidth: this.xCellWidth,
|
|
54
|
-
yCellHeight: this.yCellHeight,
|
|
55
|
-
table: { ...this.templateData.table },
|
|
56
|
-
xScaleList: this.xScaleList,
|
|
57
|
-
xScaleCell: this.xScaleCell,
|
|
58
|
-
breatheYCell: this.breatheYCell,
|
|
59
|
-
pulseYCell: this.pulseYCell,
|
|
60
|
-
centigradeYCell: this.centigradeYCell,
|
|
61
|
-
eventStyle: this.eventStyle
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
},
|
|
66
|
-
computed: {
|
|
67
|
-
canvasWidth() {
|
|
68
|
-
// 画布宽度
|
|
69
|
-
return this.templateData.canvasWidth;
|
|
70
|
-
},
|
|
71
|
-
canvasHeight() {
|
|
72
|
-
// 画布高度
|
|
73
|
-
return this.templateData.canvasHeight;
|
|
74
|
-
},
|
|
75
|
-
gridXNumber() {
|
|
76
|
-
// 网格水平方向总数 如果设置了默认值就直接取用
|
|
77
|
-
return this.templateData.table.mainXCell * this.templateData.table.subXCell;
|
|
78
|
-
},
|
|
79
|
-
gridYNumber() {
|
|
80
|
-
// 网格垂直方向总数
|
|
81
|
-
return this.templateData.table.mainYCell * this.templateData.table.subYCell;
|
|
82
|
-
},
|
|
83
|
-
originX() {
|
|
84
|
-
const originX = this.templateData.top.titleWidth;
|
|
85
|
-
const residue = (this.endX - originX) % this.gridXNumber;
|
|
86
|
-
return originX + residue;
|
|
87
|
-
},
|
|
88
|
-
originY() {
|
|
89
|
-
// 顶部列表高度 网格不需要的高度放到顶部始终存在的时间那一行,因为底部不一定存在列表
|
|
90
|
-
const { top } = this.templateData;
|
|
91
|
-
const dateHeight = top.date?.height || 0;
|
|
92
|
-
const dayHeight = top.dayHeight || 0;
|
|
93
|
-
const xScaleHeight = top.xScalevalue.height || 15;
|
|
94
|
-
const topHeight = dateHeight + dayHeight + xScaleHeight;
|
|
95
|
-
const residue = (this.endY - topHeight) % this.gridYNumber;
|
|
96
|
-
return topHeight + residue;
|
|
97
|
-
},
|
|
98
|
-
endX() {
|
|
99
|
-
// 网格区域水平方向最大坐标值, 也是整个画布右侧列表坐标起始值,网格右下角x轴坐标值
|
|
100
|
-
if (!this.templateData.right) return this.templateData.canvasWidth;
|
|
101
|
-
const endWidth = this.templateData.right.width || 50;
|
|
102
|
-
return this.templateData.canvasWidth - endWidth;
|
|
103
|
-
},
|
|
104
|
-
endY() {
|
|
105
|
-
// 画布高度 - 底部列表高度 ,网格右下角y轴坐标值
|
|
106
|
-
if (!this.templateData.bottom) return this.templateData.canvasHeight;
|
|
107
|
-
const endHeight = this.templateData.bottom.height || 30;
|
|
108
|
-
return this.canvasHeight - endHeight;
|
|
109
|
-
},
|
|
110
|
-
xCellWidth() {
|
|
111
|
-
// 水平方向网格宽度
|
|
112
|
-
return (this.endX - this.originX) / this.gridXNumber;
|
|
113
|
-
},
|
|
114
|
-
yCellHeight() {
|
|
115
|
-
// 垂直方向网格宽度
|
|
116
|
-
return (this.endY - this.originY) / this.gridYNumber;
|
|
117
|
-
},
|
|
118
|
-
// 转换为时间戳的x轴刻度list
|
|
119
|
-
xScaleList() {
|
|
120
|
-
const dateList = this.templateData.top.date.list;
|
|
121
|
-
const dayList = this.templateData.top.xScalevalue.list;
|
|
122
|
-
const timeList = dateList.map(item => {
|
|
123
|
-
return dayList.map(v => {
|
|
124
|
-
return new Date(`${item} ${v}:00`).getTime();
|
|
125
|
-
})
|
|
126
|
-
})
|
|
127
|
-
return timeList.flat();
|
|
128
|
-
},
|
|
129
|
-
// x轴每格的时间,比如4小时,不能刻度list长度值除以总格子数计算,因为有可能刻度比较短,不能满足所有的格子
|
|
130
|
-
xScaleCell() {
|
|
131
|
-
return this.xScaleList[1] - this.xScaleList[0]; // 返回时间戳
|
|
132
|
-
},
|
|
133
|
-
// y轴每一次的呼吸的高度值
|
|
134
|
-
breatheYCell() {
|
|
135
|
-
const leftYScalevalue = this.templateData.left.leftYScalevalue;
|
|
136
|
-
const list = leftYScalevalue.find(v => v.type === 'breathe').list;
|
|
137
|
-
return list ? this.yCellHeight / ((parseInt(list[1]) - parseInt(list[0])) / this.templateData.left.spaceGridNumber) : 0;
|
|
138
|
-
},
|
|
139
|
-
// y轴每mmHg的脉搏/心率的高度值
|
|
140
|
-
pulseYCell() {
|
|
141
|
-
const leftYScalevalue = this.templateData.left.leftYScalevalue;
|
|
142
|
-
const list = leftYScalevalue.find(v => v.type === 'pulse').list;
|
|
143
|
-
return this.yCellHeight / ((parseInt(list[1]) - parseInt(list[0])) / this.templateData.left.spaceGridNumber);
|
|
144
|
-
},
|
|
145
|
-
// y轴每摄氏度的高度值
|
|
146
|
-
centigradeYCell() {
|
|
147
|
-
const { leftYScalevalue, spaceGridNumber } = this.templateData.left;
|
|
148
|
-
const list = leftYScalevalue.find(v => v.type === 'centigrade').list;
|
|
149
|
-
return this.yCellHeight / ((parseInt(list[1]) - parseInt(list[0])) / spaceGridNumber);
|
|
150
|
-
},
|
|
151
|
-
eventStyle() {
|
|
152
|
-
return this.templateData.table?.eventStyle || { selectable: true, evented: true };
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
mounted() {
|
|
156
|
-
this.init();
|
|
157
|
-
},
|
|
158
|
-
methods: {
|
|
159
|
-
init() {
|
|
160
|
-
this.canvas = new this.fabric.Canvas('c-fabric-canvas', {
|
|
161
|
-
width: this.templateData.canvasWidth,
|
|
162
|
-
height: this.templateData.canvasHeight,
|
|
163
|
-
// margin: [this.templateData.margin.top, this.templateData.margin.right, this.templateData.margin.bottom, this.templateData.margin.left],
|
|
164
|
-
...this.canvasAttr
|
|
165
|
-
});
|
|
166
|
-
},
|
|
167
|
-
toDataURL(option) {
|
|
168
|
-
return this.canvas.toDataURL(option);
|
|
169
|
-
},
|
|
170
|
-
renderCanvas() {
|
|
171
|
-
this.canvas.clear();
|
|
172
|
-
// this.canvas.renderCanvas();
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
beforeDestroy() {
|
|
176
|
-
this.canvas.dispose();
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
</script>
|
|
180
|
-
|
|
181
|
-
<style></style>
|