cnhis-design-vue 3.1.25-beta.7 → 3.1.26-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/README.md +123 -123
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +3 -1
- package/es/components/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/components/fabric-chart/src/FabricChart.js +2 -1
- package/es/components/fabric-chart/src/hooks/useCenter.js +175 -135
- package/es/components/fabric-chart/src/interface.d.ts +2 -0
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/form-render/src/components/renderer/searchCascade.js +18 -4
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +3 -3
- package/es/components/info-header/src/InfoHeader.js +11 -4
- package/es/components/info-header/src/InfoHeader.vue.d.ts +3 -3
- package/es/components/info-header/style/index.css +1 -1
- package/es/shared/assets/img/failure.js +1 -1
- package/es/shared/assets/img/icon-asc.js +1 -1
- package/es/shared/assets/img/icon-desc.js +1 -1
- package/es/shared/assets/img/no-permission.js +1 -1
- package/es/shared/assets/img/nodata.js +1 -1
- package/es/shared/assets/img/notfound.js +1 -1
- package/es/shared/assets/img/qr.js +1 -1
- package/es/shared/assets/img/success.js +1 -1
- package/es/shared/assets/img/video.js +1 -1
- package/es/shared/assets/img/video_default_cover.js +1 -1
- package/es/shared/assets/img/video_hover.js +1 -1
- package/es/shared/assets/img/video_play_hover.js +1 -1
- package/es/shared/assets/img/xb_big.js +1 -1
- package/es/shared/assets/img/xb_small.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,123 +1,123 @@
|
|
|
1
|
-
# 安装
|
|
2
|
-
|
|
3
|
-
```shell
|
|
4
|
-
npm i cnhis-design-vue@[版本号]
|
|
5
|
-
# or
|
|
6
|
-
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## 1.全局引入
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
// main.ts
|
|
13
|
-
import { createApp } from 'vue';
|
|
14
|
-
import App from './App.vue';
|
|
15
|
-
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
-
import cui from 'cnhis-design-vue';
|
|
17
|
-
|
|
18
|
-
const app = createApp(App);
|
|
19
|
-
app.use(cui).mount('#app');
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 2. 按需引入
|
|
23
|
-
|
|
24
|
-
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
-
|
|
26
|
-
### 2.1 样式处理方式 1(按需引入样式)
|
|
27
|
-
|
|
28
|
-
```shell
|
|
29
|
-
# 安装自动导入样式的插件
|
|
30
|
-
npm i -d vite-plugin-style-import
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
```typescript
|
|
34
|
-
// vite.config.ts
|
|
35
|
-
import { defineConfig } from 'vite';
|
|
36
|
-
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
-
|
|
38
|
-
export default defineConfig({
|
|
39
|
-
plugins: [
|
|
40
|
-
// ...otherPlugins
|
|
41
|
-
createStyleImportPlugin({
|
|
42
|
-
libs: [
|
|
43
|
-
{
|
|
44
|
-
libraryName: 'cnhis-design-vue',
|
|
45
|
-
esModule: true,
|
|
46
|
-
ensureStyleFile: true,
|
|
47
|
-
resolveStyle: name => {
|
|
48
|
-
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
});
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### 2.2 样式处理方式 2(全局引入样式)
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
// main.ts
|
|
61
|
-
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## 3. 注意
|
|
65
|
-
|
|
66
|
-
由于 vxe-table 目前的引入方式是由组件 install 触发的,所以如果需要使用 c-grid/c-big-table 组件,需要全局注册二者任意一个
|
|
67
|
-
|
|
68
|
-
```typescript
|
|
69
|
-
// main.ts
|
|
70
|
-
import { createApp } from 'vue';
|
|
71
|
-
import App from './App.vue';
|
|
72
|
-
|
|
73
|
-
import { CGrid } from 'cnhis-design-vue';
|
|
74
|
-
// 或者
|
|
75
|
-
import { CBigTable } from 'cnhis-design-vue';
|
|
76
|
-
|
|
77
|
-
const app = createApp(App);
|
|
78
|
-
app.use(CGrid);
|
|
79
|
-
// 或者
|
|
80
|
-
app.use(CBigTable);
|
|
81
|
-
app.mount('#app');
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## 4.FAQ
|
|
85
|
-
|
|
86
|
-
### 4.1 项目打包后样式丢失
|
|
87
|
-
|
|
88
|
-
> 处理方法, 将 cnhis-design-vue 从 vendor 包中移除
|
|
89
|
-
|
|
90
|
-
```typescript
|
|
91
|
-
// vite.config.ts
|
|
92
|
-
import { defineConfig } from 'vite';
|
|
93
|
-
|
|
94
|
-
export default defineConfig({
|
|
95
|
-
rollupOptions: {
|
|
96
|
-
// ..otherOptions
|
|
97
|
-
output: {
|
|
98
|
-
dir: './dist',
|
|
99
|
-
manualChunks(id: string) {
|
|
100
|
-
if (id.includes('node_modules') && !id.includes('cnhis-design-vue')) {
|
|
101
|
-
return 'vendor';
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### 4.2 找不到文件
|
|
110
|
-
|
|
111
|
-
> 由于组件库输出文件类型由 js 修改成了 mjs, 如果配置了 resolve 属性的项目, 需要将 mjs 文件类型添加至 extensions 中
|
|
112
|
-
|
|
113
|
-
```javascript
|
|
114
|
-
// vite.config.ts
|
|
115
|
-
const config = {
|
|
116
|
-
// ...otherOptions
|
|
117
|
-
resolve: {
|
|
118
|
-
// ...otherOptions
|
|
119
|
-
// 如果没有配置, 则不用考虑
|
|
120
|
-
extensions: ['.js', '.ts', '.vue', '.json', '.mjs']
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
```
|
|
1
|
+
# 安装
|
|
2
|
+
|
|
3
|
+
```shell
|
|
4
|
+
npm i cnhis-design-vue@[版本号]
|
|
5
|
+
# or
|
|
6
|
+
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 1.全局引入
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
// main.ts
|
|
13
|
+
import { createApp } from 'vue';
|
|
14
|
+
import App from './App.vue';
|
|
15
|
+
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
+
import cui from 'cnhis-design-vue';
|
|
17
|
+
|
|
18
|
+
const app = createApp(App);
|
|
19
|
+
app.use(cui).mount('#app');
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 2. 按需引入
|
|
23
|
+
|
|
24
|
+
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
+
|
|
26
|
+
### 2.1 样式处理方式 1(按需引入样式)
|
|
27
|
+
|
|
28
|
+
```shell
|
|
29
|
+
# 安装自动导入样式的插件
|
|
30
|
+
npm i -d vite-plugin-style-import
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
// vite.config.ts
|
|
35
|
+
import { defineConfig } from 'vite';
|
|
36
|
+
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
+
|
|
38
|
+
export default defineConfig({
|
|
39
|
+
plugins: [
|
|
40
|
+
// ...otherPlugins
|
|
41
|
+
createStyleImportPlugin({
|
|
42
|
+
libs: [
|
|
43
|
+
{
|
|
44
|
+
libraryName: 'cnhis-design-vue',
|
|
45
|
+
esModule: true,
|
|
46
|
+
ensureStyleFile: true,
|
|
47
|
+
resolveStyle: name => {
|
|
48
|
+
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 2.2 样式处理方式 2(全局引入样式)
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
// main.ts
|
|
61
|
+
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## 3. 注意
|
|
65
|
+
|
|
66
|
+
由于 vxe-table 目前的引入方式是由组件 install 触发的,所以如果需要使用 c-grid/c-big-table 组件,需要全局注册二者任意一个
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
// main.ts
|
|
70
|
+
import { createApp } from 'vue';
|
|
71
|
+
import App from './App.vue';
|
|
72
|
+
|
|
73
|
+
import { CGrid } from 'cnhis-design-vue';
|
|
74
|
+
// 或者
|
|
75
|
+
import { CBigTable } from 'cnhis-design-vue';
|
|
76
|
+
|
|
77
|
+
const app = createApp(App);
|
|
78
|
+
app.use(CGrid);
|
|
79
|
+
// 或者
|
|
80
|
+
app.use(CBigTable);
|
|
81
|
+
app.mount('#app');
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## 4.FAQ
|
|
85
|
+
|
|
86
|
+
### 4.1 项目打包后样式丢失
|
|
87
|
+
|
|
88
|
+
> 处理方法, 将 cnhis-design-vue 从 vendor 包中移除
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
// vite.config.ts
|
|
92
|
+
import { defineConfig } from 'vite';
|
|
93
|
+
|
|
94
|
+
export default defineConfig({
|
|
95
|
+
rollupOptions: {
|
|
96
|
+
// ..otherOptions
|
|
97
|
+
output: {
|
|
98
|
+
dir: './dist',
|
|
99
|
+
manualChunks(id: string) {
|
|
100
|
+
if (id.includes('node_modules') && !id.includes('cnhis-design-vue')) {
|
|
101
|
+
return 'vendor';
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 4.2 找不到文件
|
|
110
|
+
|
|
111
|
+
> 由于组件库输出文件类型由 js 修改成了 mjs, 如果配置了 resolve 属性的项目, 需要将 mjs 文件类型添加至 extensions 中
|
|
112
|
+
|
|
113
|
+
```javascript
|
|
114
|
+
// vite.config.ts
|
|
115
|
+
const config = {
|
|
116
|
+
// ...otherOptions
|
|
117
|
+
resolve: {
|
|
118
|
+
// ...otherOptions
|
|
119
|
+
// 如果没有配置, 则不用考虑
|
|
120
|
+
extensions: ['.js', '.ts', '.vue', '.json', '.mjs']
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
```
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/Viewer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/features/modeling';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'diagram-js/lib/navigation/movecanvas';
|
|
@@ -4,7 +4,7 @@ import { useMessage, NDropdown, NButton, NIcon } from 'naive-ui';
|
|
|
4
4
|
import { ChevronDown } from '@vicons/ionicons5';
|
|
5
5
|
import { Print } from './utils/print.js';
|
|
6
6
|
import IdentityVerification from './components/IdentityVerification.js';
|
|
7
|
-
import
|
|
7
|
+
import { format } from 'date-fns';
|
|
8
8
|
|
|
9
9
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
10
|
__name: "ButtonPrint",
|
|
@@ -327,10 +327,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
327
327
|
tVal = Number(tableVal) || 0;
|
|
328
328
|
}
|
|
329
329
|
if (i.type === "DATE") {
|
|
330
|
-
tVal = tableVal ?
|
|
330
|
+
tVal = tableVal ? format(tableVal, "YYYY-MM-DD") : "";
|
|
331
331
|
}
|
|
332
332
|
if (i.type === "DATETIME") {
|
|
333
|
-
tVal = tableVal ?
|
|
333
|
+
tVal = tableVal ? format(tableVal, "YYYY-MM-DD HH:mm:ss") : "";
|
|
334
334
|
}
|
|
335
335
|
return val ? val : tVal;
|
|
336
336
|
};
|
|
@@ -269,7 +269,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
269
269
|
painYCell: painYCell.value,
|
|
270
270
|
event: event.value,
|
|
271
271
|
itemList: itemList.value,
|
|
272
|
-
getRightInfo: getRightInfo.value
|
|
272
|
+
getRightInfo: getRightInfo.value,
|
|
273
|
+
config: props.data.config || {}
|
|
273
274
|
});
|
|
274
275
|
function computedYCell(type) {
|
|
275
276
|
const { yScaleValue } = props.data.left;
|
|
@@ -40,7 +40,8 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
40
40
|
event,
|
|
41
41
|
vitalSignsOriginY,
|
|
42
42
|
painOriginY,
|
|
43
|
-
hospitalizationDate
|
|
43
|
+
hospitalizationDate,
|
|
44
|
+
config
|
|
44
45
|
} = propItems;
|
|
45
46
|
const pointTipProps = reactive({
|
|
46
47
|
show: false,
|
|
@@ -256,100 +257,176 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
256
257
|
const lineList = [];
|
|
257
258
|
const otherList = [];
|
|
258
259
|
item.list.forEach((v, index) => {
|
|
259
|
-
var _a;
|
|
260
260
|
const _item = type !== "temperature" ? item : dataList.find((_v) => _v.key === v.key);
|
|
261
|
-
const {
|
|
262
|
-
pointAttr = {},
|
|
263
|
-
lineAttr = {},
|
|
264
|
-
type: pointType = "circle",
|
|
265
|
-
upArrowShow = false,
|
|
266
|
-
limitValueShow = false
|
|
267
|
-
} = _item;
|
|
268
261
|
const points = getPointer(v, scaleValue);
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
arrowGroup = drawArrow([points[0], points[1], top], noRiseStyle);
|
|
284
|
-
otherList.push(arrowGroup);
|
|
285
|
-
}
|
|
262
|
+
const otherObj = {};
|
|
263
|
+
otherObj.value = drawValue(points, v, _item);
|
|
264
|
+
drawOther(points, v, _item, otherObj);
|
|
265
|
+
drawPulseOther(points, v, _item, otherObj);
|
|
266
|
+
drawPointLine(points, v, index, _item, otherObj);
|
|
267
|
+
});
|
|
268
|
+
type === "pulse" && shadowPointCache.push(pointList);
|
|
269
|
+
Promise.all(pointList).then((res) => {
|
|
270
|
+
const lineListFilter = lineList.filter((v) => v);
|
|
271
|
+
let prevPoint = null;
|
|
272
|
+
res = res.filter((v) => {
|
|
273
|
+
if (v && prevPoint) {
|
|
274
|
+
prevPoint.nextPoint = v;
|
|
275
|
+
v.prevPoint = prevPoint;
|
|
286
276
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
277
|
+
prevPoint = v || prevPoint;
|
|
278
|
+
v == null ? void 0 : v.bringToFront();
|
|
279
|
+
return v;
|
|
280
|
+
});
|
|
281
|
+
Promise.all(otherList).then((r) => {
|
|
282
|
+
canvas.value.add(...lineListFilter, ...res, ...r);
|
|
283
|
+
res.forEach((v) => {
|
|
284
|
+
v == null ? void 0 : v.bringToFront();
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
});
|
|
288
|
+
function drawValue(points, v, _item) {
|
|
289
|
+
if (!(points == null ? void 0 : points.length) || !config.showValue)
|
|
290
|
+
return;
|
|
291
|
+
const { lineAttr = {} } = _item;
|
|
292
|
+
const y = points[1] <= vitalSignsOriginY.originY + yCellHeight ? points[1] + yCellHeight : points[1] - yCellHeight;
|
|
293
|
+
const value = drawText([points[0], y], {
|
|
294
|
+
value: v.value,
|
|
295
|
+
originX: "center",
|
|
296
|
+
originY: "center",
|
|
297
|
+
fill: lineAttr.stroke || "#000"
|
|
298
|
+
});
|
|
299
|
+
otherList.push(value);
|
|
300
|
+
return {
|
|
301
|
+
obj: value,
|
|
302
|
+
top: -yCellHeight
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
function drawOther(points, v, _item, otherObj) {
|
|
306
|
+
var _a;
|
|
307
|
+
if (!(points == null ? void 0 : points.length) || !["temperature", "pain"].includes(type))
|
|
308
|
+
return;
|
|
309
|
+
const { lineAttr = {} } = _item;
|
|
310
|
+
const { value } = otherObj;
|
|
311
|
+
let reduceLine, reducePoint, noRiseText, arrowGroup, riseText, verifiedText;
|
|
312
|
+
if (v.noRise && noRiseStyle.show) {
|
|
313
|
+
if (typeof v.noRise === "string") {
|
|
314
|
+
noRiseText = drawText([points[0], points[1] + 5], {
|
|
315
|
+
value: v.noRise.split("").join("\n"),
|
|
316
|
+
originY: "top",
|
|
317
|
+
...noRiseStyle
|
|
292
318
|
});
|
|
293
|
-
otherList.push(
|
|
319
|
+
otherList.push(noRiseText);
|
|
320
|
+
} else {
|
|
321
|
+
const top = points[1] + yCellHeight * 2;
|
|
322
|
+
arrowGroup = drawArrow([points[0], points[1], top], noRiseStyle);
|
|
323
|
+
otherList.push(arrowGroup);
|
|
294
324
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
325
|
+
}
|
|
326
|
+
if (v.rise && riseStyle.show) {
|
|
327
|
+
riseText = drawText([points[0], points[1] - (value ? yCellHeight : 0) - 5], {
|
|
328
|
+
value: v.rise.split("").join("\n"),
|
|
329
|
+
originY: "bottom",
|
|
330
|
+
...riseStyle
|
|
331
|
+
});
|
|
332
|
+
otherList.push(riseText);
|
|
333
|
+
}
|
|
334
|
+
if (v.verified) {
|
|
335
|
+
verifiedText = drawText([points[0], points[1] - (value ? yCellHeight : 0) - 5], {
|
|
336
|
+
value: "v",
|
|
337
|
+
originX: "center",
|
|
338
|
+
originY: "bottom",
|
|
339
|
+
...verifiedStyle
|
|
340
|
+
});
|
|
341
|
+
otherList.push(verifiedText);
|
|
342
|
+
}
|
|
343
|
+
if (v.physicsReduce || v.drugReduce) {
|
|
344
|
+
const reduceY = cumputedY(type, scaleValue.list, v.physicsReduce || v.drugReduce);
|
|
345
|
+
reduceLine = drawLine([...points, points[0], reduceY], {
|
|
346
|
+
...lineAttr,
|
|
347
|
+
...reduceStyle.line,
|
|
348
|
+
...defaultStyle
|
|
349
|
+
});
|
|
350
|
+
reducePoint = drawPoint(((_a = reduceStyle == null ? void 0 : reduceStyle.point) == null ? void 0 : _a.type) || "circle", {
|
|
351
|
+
left: points[0],
|
|
352
|
+
top: reduceY,
|
|
353
|
+
...reduceStyle.point,
|
|
354
|
+
...defaultStyle
|
|
355
|
+
});
|
|
356
|
+
reduceLine && otherList.push(reduceLine);
|
|
357
|
+
reducePoint && otherList.push(reducePoint);
|
|
358
|
+
}
|
|
359
|
+
Object.assign(otherObj, {
|
|
360
|
+
reduceLine: {
|
|
361
|
+
obj: reduceLine,
|
|
362
|
+
type: "line"
|
|
363
|
+
},
|
|
364
|
+
noRiseText: {
|
|
365
|
+
obj: noRiseText,
|
|
366
|
+
top: 5
|
|
367
|
+
},
|
|
368
|
+
arrowGroup: {
|
|
369
|
+
obj: arrowGroup,
|
|
370
|
+
top: yCellHeight * 2
|
|
371
|
+
},
|
|
372
|
+
riseText: {
|
|
373
|
+
obj: riseText,
|
|
374
|
+
top: (value ? -yCellHeight : 0) - 5
|
|
375
|
+
},
|
|
376
|
+
verifiedText: {
|
|
377
|
+
obj: verifiedText,
|
|
378
|
+
top: (value ? -yCellHeight : 0) - 5
|
|
303
379
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
reduceLine && otherList.push(reduceLine);
|
|
318
|
-
reducePoint && otherList.push(reducePoint);
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
function drawPulseOther(points, v, _item, otherObj) {
|
|
383
|
+
if (!(points == null ? void 0 : points.length) || !["pulse"].includes(type))
|
|
384
|
+
return;
|
|
385
|
+
let upArrow, limitValue;
|
|
386
|
+
const { upArrowShow = false, limitValueShow = false } = _item;
|
|
387
|
+
if (upArrowShow && v.value > 180) {
|
|
388
|
+
let top = points[1] - yCellHeight * 2.5;
|
|
389
|
+
let yArr = [points[1] - yCellHeight / 2, top];
|
|
390
|
+
if (top < vitalSignsOriginY.originY) {
|
|
391
|
+
top = points[1] + yCellHeight * 2.5;
|
|
392
|
+
yArr = [top, points[1] + yCellHeight / 2];
|
|
319
393
|
}
|
|
394
|
+
upArrow = drawArrow([points[0], yArr[0], yArr[1]], upArrowStyle, "up");
|
|
395
|
+
otherList.push(upArrow);
|
|
320
396
|
}
|
|
321
|
-
if (
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
otherList.push(
|
|
397
|
+
if (limitValueShow) {
|
|
398
|
+
const commonOptions = {
|
|
399
|
+
value: v.value,
|
|
400
|
+
originX: "center",
|
|
401
|
+
originY: "center",
|
|
402
|
+
...limitValueStyle
|
|
403
|
+
};
|
|
404
|
+
if (v.value > Math.max(...scaleValue.list)) {
|
|
405
|
+
const top = upArrow ? points[1] + yCellHeight / 2 + upArrow.height : points[1] + yCellHeight;
|
|
406
|
+
limitValue = drawText([points[0], top], commonOptions);
|
|
407
|
+
otherList.push(limitValue);
|
|
332
408
|
}
|
|
333
|
-
if (
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
originX: "center",
|
|
337
|
-
originY: "center",
|
|
338
|
-
...limitValueStyle
|
|
339
|
-
};
|
|
340
|
-
if (v.value > Math.max(...scaleValue.list)) {
|
|
341
|
-
const top = upArrow ? points[1] + yCellHeight / 2 + upArrow.height : points[1] + yCellHeight;
|
|
342
|
-
const limitValue = drawText([points[0], top], commonOptions);
|
|
343
|
-
otherList.push(limitValue);
|
|
344
|
-
}
|
|
345
|
-
if (v.value < Math.min(...scaleValue.list)) {
|
|
346
|
-
const limitValue = drawText([points[0], points[1] - yCellHeight], commonOptions);
|
|
347
|
-
otherList.push(limitValue);
|
|
348
|
-
}
|
|
409
|
+
if (v.value < Math.min(...scaleValue.list)) {
|
|
410
|
+
limitValue = drawText([points[0], points[1] - yCellHeight], commonOptions);
|
|
411
|
+
otherList.push(limitValue);
|
|
349
412
|
}
|
|
350
413
|
}
|
|
414
|
+
Object.assign(otherObj, {
|
|
415
|
+
upArrow: {
|
|
416
|
+
obj: upArrow
|
|
417
|
+
},
|
|
418
|
+
limitValue: {
|
|
419
|
+
obj: limitValue,
|
|
420
|
+
top: -yCellHeight
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
function drawPointLine(points, v, index, _item, otherObj) {
|
|
351
425
|
let point;
|
|
352
426
|
let line;
|
|
427
|
+
const { pointAttr = {}, lineAttr = {}, title = "", key, type: pointType = "circle" } = _item;
|
|
428
|
+
const nextV = item.list[index + 1];
|
|
429
|
+
const nextPoint = getPointer(nextV, scaleValue);
|
|
353
430
|
if (points && nextPoint && !v.breakpoint) {
|
|
354
431
|
line = drawLine([...points, ...nextPoint], {
|
|
355
432
|
...lineAttr
|
|
@@ -368,20 +445,16 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
368
445
|
const pointAttrNew = {
|
|
369
446
|
origin: {
|
|
370
447
|
data: v,
|
|
371
|
-
title
|
|
372
|
-
key:
|
|
448
|
+
title,
|
|
449
|
+
key: key || "",
|
|
373
450
|
unit: scaleValue.unit,
|
|
374
451
|
type,
|
|
375
452
|
dataIndex,
|
|
376
453
|
index
|
|
377
454
|
},
|
|
378
|
-
noRiseText,
|
|
379
|
-
arrowGroup,
|
|
380
|
-
verifiedText,
|
|
381
455
|
leftLine: previousLine,
|
|
382
456
|
rightLine: line,
|
|
383
|
-
|
|
384
|
-
reducePoint,
|
|
457
|
+
otherObj,
|
|
385
458
|
lockMovementX: true,
|
|
386
459
|
...v.pacemakerShow && type == "pulse" ? pacemaker.style : pointAttr,
|
|
387
460
|
...propItems.event
|
|
@@ -405,7 +478,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
405
478
|
}
|
|
406
479
|
lineList.push(line);
|
|
407
480
|
if (point) {
|
|
408
|
-
if (
|
|
481
|
+
if (title.includes("\u8109\u640F")) {
|
|
409
482
|
maiboPoints.add(point);
|
|
410
483
|
} else {
|
|
411
484
|
otherPoints.add(point);
|
|
@@ -413,27 +486,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
413
486
|
setPointEvent(point);
|
|
414
487
|
pointList.push(point);
|
|
415
488
|
}
|
|
416
|
-
}
|
|
417
|
-
type === "pulse" && shadowPointCache.push(pointList);
|
|
418
|
-
Promise.all(pointList).then((res) => {
|
|
419
|
-
const lineListFilter = lineList.filter((v) => v);
|
|
420
|
-
let prevPoint = null;
|
|
421
|
-
res = res.filter((v) => {
|
|
422
|
-
if (v && prevPoint) {
|
|
423
|
-
prevPoint.nextPoint = v;
|
|
424
|
-
v.prevPoint = prevPoint;
|
|
425
|
-
}
|
|
426
|
-
prevPoint = v || prevPoint;
|
|
427
|
-
v == null ? void 0 : v.bringToFront();
|
|
428
|
-
return v;
|
|
429
|
-
});
|
|
430
|
-
Promise.all(otherList).then((r) => {
|
|
431
|
-
canvas.value.add(...lineListFilter, ...res, ...r);
|
|
432
|
-
res.forEach((v) => {
|
|
433
|
-
v == null ? void 0 : v.bringToFront();
|
|
434
|
-
});
|
|
435
|
-
});
|
|
436
|
-
});
|
|
489
|
+
}
|
|
437
490
|
}
|
|
438
491
|
function setPointEvent(point) {
|
|
439
492
|
if (event.hovered) {
|
|
@@ -494,30 +547,17 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
494
547
|
}
|
|
495
548
|
}
|
|
496
549
|
function updateLine(point) {
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
}
|
|
509
|
-
if (point.noRiseText) {
|
|
510
|
-
point.noRiseText.setCoords();
|
|
511
|
-
point.noRiseText.set({ left: point.left, top: point.top + 5 });
|
|
512
|
-
}
|
|
513
|
-
if (point.arrowGroup) {
|
|
514
|
-
point.arrowGroup.setCoords();
|
|
515
|
-
point.arrowGroup.set({ left: point.left, top: point.top });
|
|
516
|
-
}
|
|
517
|
-
if (point.verifiedText) {
|
|
518
|
-
point.verifiedText.setCoords();
|
|
519
|
-
point.verifiedText.set({ left: point.left, top: point.top - 5 });
|
|
520
|
-
}
|
|
550
|
+
var _a, _b;
|
|
551
|
+
(_a = point.leftLine) == null ? void 0 : _a.setCoords().set({ x2: point.left, y2: point.top });
|
|
552
|
+
(_b = point.rightLine) == null ? void 0 : _b.setCoords().set({ x1: point.left, y1: point.top });
|
|
553
|
+
Object.values(point.otherObj).forEach((o) => {
|
|
554
|
+
const { obj, type = "", top = 0 } = o;
|
|
555
|
+
if (type === "line") {
|
|
556
|
+
obj == null ? void 0 : obj.setCoords().set({ x1: point.left, y1: point.top });
|
|
557
|
+
} else {
|
|
558
|
+
obj == null ? void 0 : obj.setCoords().set({ left: point.left, top: point.top + top });
|
|
559
|
+
}
|
|
560
|
+
});
|
|
521
561
|
drawShaDow(point);
|
|
522
562
|
}
|
|
523
563
|
function isLimit(time) {
|