cnhis-design-vue 3.1.12-beta.6 → 3.1.13-beta.0
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/es/packages/big-table/index.d.ts +4 -1
- package/es/packages/big-table/src/BigTable.vue.d.ts +22 -3
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +88 -63
- package/es/packages/big-table/src/bigTableState.d.ts +2 -0
- package/es/packages/big-table/src/bigTableState.js +1 -1
- package/es/packages/big-table/src/hooks/useFormat.js +1 -1
- package/es/packages/big-table/src/hooks/useNestTable.js +1 -1
- package/es/packages/big-table/src/utils.d.ts +5 -1
- package/es/packages/big-table/src/utils.js +100 -78
- package/es/packages/fabric-chart/index.d.ts +195 -1
- package/es/packages/fabric-chart/src/FabricChart.vue.d.ts +196 -1
- package/es/packages/fabric-chart/src/FabricChart.vue_vue_type_script_setup_true_lang.js +269 -6
- package/es/packages/fabric-chart/src/components/PopupMenu.d.ts +46 -0
- package/es/packages/fabric-chart/src/components/PopupMenu.js +105 -0
- package/es/packages/fabric-chart/src/components/PopupTip.js +4 -0
- package/es/packages/fabric-chart/src/components/PopupTip.vue.d.ts +63 -0
- package/es/packages/fabric-chart/src/components/PopupTip.vue_vue_type_script_setup_true_lang.js +32 -0
- package/es/packages/fabric-chart/src/components/useStyle.d.ts +7 -0
- package/es/packages/fabric-chart/src/components/useStyle.js +36 -0
- package/es/packages/fabric-chart/src/hooks/constant.d.ts +14 -0
- package/es/packages/fabric-chart/src/hooks/constant.js +36 -0
- package/es/packages/fabric-chart/src/hooks/index.d.ts +9 -0
- package/es/packages/fabric-chart/src/hooks/index.js +9 -0
- package/es/packages/fabric-chart/src/hooks/useBottom.d.ts +4 -0
- package/es/packages/fabric-chart/src/hooks/useBottom.js +86 -0
- package/es/packages/fabric-chart/src/hooks/useCenter.d.ts +29 -0
- package/es/packages/fabric-chart/src/hooks/useCenter.js +469 -0
- package/es/packages/fabric-chart/src/hooks/useCumputedPoint.d.ts +7 -0
- package/es/packages/fabric-chart/src/hooks/useCumputedPoint.js +44 -0
- package/es/packages/fabric-chart/src/hooks/useDraw.d.ts +42 -0
- package/es/packages/fabric-chart/src/hooks/useDraw.js +86 -0
- package/es/packages/fabric-chart/src/hooks/useEvent.d.ts +1 -0
- package/es/packages/fabric-chart/src/hooks/useEvent.js +10 -0
- package/es/packages/fabric-chart/src/hooks/useGrid.d.ts +4 -0
- package/es/packages/fabric-chart/src/hooks/useGrid.js +44 -0
- package/es/packages/fabric-chart/src/hooks/useLeft.d.ts +4 -0
- package/es/packages/fabric-chart/src/hooks/useLeft.js +180 -0
- package/es/packages/fabric-chart/src/hooks/useOther.d.ts +4 -0
- package/es/packages/fabric-chart/src/hooks/useOther.js +34 -0
- package/es/packages/fabric-chart/src/hooks/useRight.d.ts +4 -0
- package/es/packages/fabric-chart/src/hooks/useRight.js +89 -0
- package/es/packages/fabric-chart/src/hooks/useShadow.d.ts +6 -0
- package/es/packages/fabric-chart/src/hooks/useShadow.js +127 -0
- package/es/packages/fabric-chart/src/hooks/useTop.d.ts +4 -0
- package/es/packages/fabric-chart/src/hooks/useTop.js +148 -0
- package/es/packages/fabric-chart/src/interface.d.ts +115 -0
- package/es/packages/fabric-chart/src/interface.js +3 -0
- package/es/packages/fabric-chart/src/utils/index.d.ts +2 -0
- package/es/packages/fabric-chart/src/utils/index.js +15081 -0
- package/es/packages/fabric-chart/style/index.css +43 -0
- package/es/packages/form-render/src/components/renderer/cascader.js +14 -0
- package/es/packages/form-render/src/components/renderer/checkbox.d.ts +2 -0
- package/es/packages/form-render/src/components/renderer/checkbox.js +4 -5
- package/es/packages/form-render/src/components/renderer/date.js +42 -10
- package/es/packages/form-render/src/components/renderer/select.js +11 -0
- package/es/packages/form-render/src/components/renderer/simpleComponent.js +0 -1
- package/es/packages/index.css +43 -0
- package/es/packages/scale-view/src/hooks/scaleview-computed.js +7 -12
- package/es/packages/scale-view/src/hooks/scaleview-init.js +1 -6
- package/package.json +1 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { IPropItems, ICoordinateValue } from '../interface';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
show: {
|
|
4
|
+
type: BooleanConstructor;
|
|
5
|
+
required: true;
|
|
6
|
+
default: boolean;
|
|
7
|
+
};
|
|
8
|
+
point: {
|
|
9
|
+
type: null;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
list: {
|
|
13
|
+
type: ArrayConstructor;
|
|
14
|
+
required: false;
|
|
15
|
+
default: () => never[];
|
|
16
|
+
};
|
|
17
|
+
propItems: {
|
|
18
|
+
type: null;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
}, {
|
|
22
|
+
props: {
|
|
23
|
+
show: boolean;
|
|
24
|
+
point: ICoordinateValue;
|
|
25
|
+
list: Array<string>;
|
|
26
|
+
propItems: IPropItems;
|
|
27
|
+
};
|
|
28
|
+
pointStyle: import("vue").ComputedRef<{
|
|
29
|
+
top: string;
|
|
30
|
+
bottom: string;
|
|
31
|
+
left: string;
|
|
32
|
+
right: string;
|
|
33
|
+
'transform-origin': string;
|
|
34
|
+
}>;
|
|
35
|
+
Teleport: {
|
|
36
|
+
new (): {
|
|
37
|
+
$props: import("vue").VNodeProps & import("vue").TeleportProps;
|
|
38
|
+
};
|
|
39
|
+
__isTeleport: true;
|
|
40
|
+
};
|
|
41
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
42
|
+
show: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
required: true;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
point: {
|
|
48
|
+
type: null;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
51
|
+
list: {
|
|
52
|
+
type: ArrayConstructor;
|
|
53
|
+
required: false;
|
|
54
|
+
default: () => never[];
|
|
55
|
+
};
|
|
56
|
+
propItems: {
|
|
57
|
+
type: null;
|
|
58
|
+
required: true;
|
|
59
|
+
};
|
|
60
|
+
}>>, {
|
|
61
|
+
list: unknown[];
|
|
62
|
+
}>;
|
|
63
|
+
export default _default;
|
package/es/packages/fabric-chart/src/components/PopupTip.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createBlock, Teleport, withDirectives, createElementVNode, normalizeStyle, unref, createElementBlock, Fragment, renderList, toDisplayString, vShow } from 'vue';
|
|
2
|
+
import useStyle from './useStyle.js';
|
|
3
|
+
|
|
4
|
+
var script = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "PopupTip",
|
|
6
|
+
props: {
|
|
7
|
+
show: { type: Boolean, required: true, default: false },
|
|
8
|
+
point: { type: null, required: true },
|
|
9
|
+
list: { type: Array, required: false, default: () => [] },
|
|
10
|
+
propItems: { type: null, required: true }
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const pointStyle = useStyle(props);
|
|
15
|
+
return (_ctx, _cache) => {
|
|
16
|
+
return openBlock(), createBlock(Teleport, { to: ".c-fabric-chart" }, [
|
|
17
|
+
withDirectives(createElementVNode("ul", {
|
|
18
|
+
class: "c-fabric-chart-popup-tip",
|
|
19
|
+
style: normalizeStyle(unref(pointStyle))
|
|
20
|
+
}, [
|
|
21
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.list, (item) => {
|
|
22
|
+
return openBlock(), createElementBlock("li", null, toDisplayString(item), 1);
|
|
23
|
+
}), 256))
|
|
24
|
+
], 4), [
|
|
25
|
+
[vShow, __props.show]
|
|
26
|
+
])
|
|
27
|
+
]);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export { script as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { computed } from 'vue';
|
|
2
|
+
|
|
3
|
+
function useStyle(props) {
|
|
4
|
+
const { canvasWidth, canvasHeight } = props.propItems;
|
|
5
|
+
const pointStyle = computed(() => {
|
|
6
|
+
const { x, y } = props.point;
|
|
7
|
+
const marginLeft = 15;
|
|
8
|
+
const marginTop = -15;
|
|
9
|
+
const style = {
|
|
10
|
+
top: "",
|
|
11
|
+
bottom: "",
|
|
12
|
+
left: "",
|
|
13
|
+
right: "",
|
|
14
|
+
"transform-origin": ""
|
|
15
|
+
};
|
|
16
|
+
const height = 200;
|
|
17
|
+
if (canvasWidth - (x + marginLeft) < height) {
|
|
18
|
+
style.right = canvasWidth - x + marginLeft + "px";
|
|
19
|
+
style["transform-origin"] = "right";
|
|
20
|
+
} else {
|
|
21
|
+
style.left = x + marginLeft + "px";
|
|
22
|
+
style["transform-origin"] = "left";
|
|
23
|
+
}
|
|
24
|
+
if (canvasHeight - (y + marginTop) < height) {
|
|
25
|
+
style.bottom = canvasHeight - y + marginTop + "px";
|
|
26
|
+
style["transform-origin"] += " bottom";
|
|
27
|
+
} else {
|
|
28
|
+
style.top = y + marginTop + "px";
|
|
29
|
+
style["transform-origin"] += " top";
|
|
30
|
+
}
|
|
31
|
+
return style;
|
|
32
|
+
});
|
|
33
|
+
return pointStyle;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { useStyle as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const TEMPERATURE_MENU: ({
|
|
2
|
+
label: string;
|
|
3
|
+
value: boolean;
|
|
4
|
+
type: string;
|
|
5
|
+
} | {
|
|
6
|
+
label: string;
|
|
7
|
+
value: undefined;
|
|
8
|
+
type: string;
|
|
9
|
+
})[];
|
|
10
|
+
export declare const PAIN_MENU: {
|
|
11
|
+
label: string;
|
|
12
|
+
value: undefined;
|
|
13
|
+
type: string;
|
|
14
|
+
}[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const TEMPERATURE_MENU = [
|
|
2
|
+
{
|
|
3
|
+
label: "\u5347\u6E29",
|
|
4
|
+
value: false,
|
|
5
|
+
type: "rise"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
label: "\u836F\u7269\u964D\u6E29",
|
|
9
|
+
value: void 0,
|
|
10
|
+
type: "drugCooling"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: "\u7269\u7406\u964D\u6E29",
|
|
14
|
+
value: void 0,
|
|
15
|
+
type: "physicalCooling"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: "\u4E0D\u5347",
|
|
19
|
+
value: false,
|
|
20
|
+
type: "noRise"
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
const PAIN_MENU = [
|
|
24
|
+
{
|
|
25
|
+
label: "\u836F\u7269\u964D\u75DB",
|
|
26
|
+
value: void 0,
|
|
27
|
+
type: "drugReducePain"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: "\u7269\u7406\u964D\u75DB",
|
|
31
|
+
value: void 0,
|
|
32
|
+
type: "physicalReducePain"
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
export { PAIN_MENU, TEMPERATURE_MENU };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { defaultBorderStyle } from './useDraw';
|
|
2
|
+
export * from './useCumputedPoint';
|
|
3
|
+
export * from './useTop';
|
|
4
|
+
export * from './useLeft';
|
|
5
|
+
export * from './useRight';
|
|
6
|
+
export * from './useCenter';
|
|
7
|
+
export * from './useBottom';
|
|
8
|
+
export * from './useOther';
|
|
9
|
+
export * from './useEvent';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { defaultBorderStyle } from './useDraw.js';
|
|
2
|
+
export { useCumputedPoint } from './useCumputedPoint.js';
|
|
3
|
+
export { useTop } from './useTop.js';
|
|
4
|
+
export { useLeft } from './useLeft.js';
|
|
5
|
+
export { useRight } from './useRight.js';
|
|
6
|
+
export { useCenter } from './useCenter.js';
|
|
7
|
+
export { useBottom } from './useBottom.js';
|
|
8
|
+
export { useOther } from './useOther.js';
|
|
9
|
+
export { useEvent } from './useEvent.js';
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { onMounted, nextTick } from 'vue';
|
|
2
|
+
import { fabric } from '../utils/index.js';
|
|
3
|
+
import { defaultBorderStyle, drawTextGroup, defaultTextStyle, defaultRectStyle, defaultStyle } from './useDraw.js';
|
|
4
|
+
|
|
5
|
+
function useBottom(canvas, propItems) {
|
|
6
|
+
const {
|
|
7
|
+
xScaleList,
|
|
8
|
+
xScaleCell,
|
|
9
|
+
originX,
|
|
10
|
+
endX,
|
|
11
|
+
endY,
|
|
12
|
+
xCellWidth,
|
|
13
|
+
canvasWidth,
|
|
14
|
+
canvasHeight,
|
|
15
|
+
bottom,
|
|
16
|
+
breathingHeight,
|
|
17
|
+
iconsWidth
|
|
18
|
+
} = propItems;
|
|
19
|
+
function drawBottom() {
|
|
20
|
+
var _a, _b, _c;
|
|
21
|
+
if (!breathingHeight || !bottom) {
|
|
22
|
+
const bottomBorder = new fabric.Line([iconsWidth, endY - 1, canvasWidth - 1, endY - 1], {
|
|
23
|
+
...defaultBorderStyle
|
|
24
|
+
});
|
|
25
|
+
canvas.value.add(bottomBorder);
|
|
26
|
+
bottomBorder.sendToBack();
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
const height = breathingHeight;
|
|
30
|
+
const bottomBreathingList = ((_a = bottom.breathing) == null ? void 0 : _a.list) || [];
|
|
31
|
+
const list = [];
|
|
32
|
+
let flag = true;
|
|
33
|
+
xScaleList.forEach((item, index) => {
|
|
34
|
+
const left = originX + index * xCellWidth;
|
|
35
|
+
let text = "";
|
|
36
|
+
bottomBreathingList.forEach((v, i) => {
|
|
37
|
+
const time = new Date(v.time).getTime();
|
|
38
|
+
if (time >= item && time < +item + xScaleCell)
|
|
39
|
+
text = v.value;
|
|
40
|
+
});
|
|
41
|
+
const style = flag ? {
|
|
42
|
+
top: -(height / 2 - 10)
|
|
43
|
+
} : {
|
|
44
|
+
top: height / 2 - 10
|
|
45
|
+
};
|
|
46
|
+
if (text)
|
|
47
|
+
flag = !flag;
|
|
48
|
+
const group2 = drawTextGroup({
|
|
49
|
+
width: xCellWidth,
|
|
50
|
+
height,
|
|
51
|
+
...defaultRectStyle
|
|
52
|
+
}, Object.assign({}, {
|
|
53
|
+
text: String(text),
|
|
54
|
+
...defaultTextStyle
|
|
55
|
+
}, text ? style : {}), {
|
|
56
|
+
left,
|
|
57
|
+
top: endY
|
|
58
|
+
});
|
|
59
|
+
list.push(group2);
|
|
60
|
+
});
|
|
61
|
+
const titleGroup = drawTextGroup({
|
|
62
|
+
width: endX,
|
|
63
|
+
height,
|
|
64
|
+
...defaultRectStyle
|
|
65
|
+
}, {
|
|
66
|
+
text: String(((_b = bottom.breathing) == null ? void 0 : _b.title) + ((_c = bottom.breathing) == null ? void 0 : _c.unit)),
|
|
67
|
+
...defaultTextStyle,
|
|
68
|
+
left: -((endX - originX) / 2)
|
|
69
|
+
}, {
|
|
70
|
+
left: 0,
|
|
71
|
+
top: endY
|
|
72
|
+
});
|
|
73
|
+
list.push(titleGroup);
|
|
74
|
+
const group = list.length > 0 ? new fabric.Group([...list], { ...defaultStyle }) : null;
|
|
75
|
+
group && group.sendToBack();
|
|
76
|
+
group && canvas.value.add(group);
|
|
77
|
+
}
|
|
78
|
+
onMounted(() => {
|
|
79
|
+
nextTick(() => {
|
|
80
|
+
drawBottom();
|
|
81
|
+
canvas.value.renderAll();
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { useBottom };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { fabric } from '../utils';
|
|
3
|
+
import { IPropItems } from '../interface';
|
|
4
|
+
import { IPointType } from '../interface';
|
|
5
|
+
export declare function useCenter(canvas: Ref<fabric.Canvas>, propItems: IPropItems, emits: any, cumputedX: Function, cumputedY: Function, getXValue: Function, getYValue: Function, addRenderItem: Function | undefined): {
|
|
6
|
+
pointTipProps: {
|
|
7
|
+
show: boolean;
|
|
8
|
+
point: {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
};
|
|
12
|
+
list: string[];
|
|
13
|
+
};
|
|
14
|
+
pointMenuProps: {
|
|
15
|
+
show: boolean;
|
|
16
|
+
point: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
20
|
+
list: any[];
|
|
21
|
+
target: any;
|
|
22
|
+
};
|
|
23
|
+
clickMenu: ({ item, target }: {
|
|
24
|
+
item: any;
|
|
25
|
+
target: any;
|
|
26
|
+
}) => void;
|
|
27
|
+
setPopup: (point: any) => void;
|
|
28
|
+
getEqualXTypes: (pointX: number) => IPointType[];
|
|
29
|
+
};
|