cnhis-design-vue 3.1.49-beta.2 → 3.1.49-beta.4

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.
Files changed (35) hide show
  1. package/README.md +87 -87
  2. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +5 -1
  3. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  4. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.d.ts +2 -1
  5. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  6. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  7. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  8. package/es/components/form-render/src/components/renderer/inputNumber.js +1 -1
  9. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  10. package/es/components/iho-table/style/index.css +1 -1
  11. package/es/components/index.css +1 -1
  12. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  13. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  14. package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
  15. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
  16. package/es/env.d.ts +25 -25
  17. package/es/shared/assets/img/failure.png.js +1 -1
  18. package/es/shared/assets/img/no-permission.png.js +1 -1
  19. package/es/shared/assets/img/nodata.png.js +1 -1
  20. package/es/shared/assets/img/notfound.png.js +1 -1
  21. package/es/shared/assets/img/qr.png.js +1 -1
  22. package/es/shared/assets/img/success.png.js +1 -1
  23. package/es/shared/assets/img/video.png.js +1 -1
  24. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  25. package/es/shared/assets/img/xb_big.png.js +1 -1
  26. package/es/shared/assets/img/xb_small.png.js +1 -1
  27. package/es/shared/package.json.js +1 -1
  28. package/package.json +2 -2
  29. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  30. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  31. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  32. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  33. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  34. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  35. package/es/shared/utils/tapable/index.d.ts +0 -139
package/README.md CHANGED
@@ -1,87 +1,87 @@
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.FAQ
65
-
66
- ### 3.1 项目打包后样式丢失
67
-
68
- 处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
69
-
70
- ```typescript
71
- // vite.config.ts
72
- import { defineConfig } from 'vite';
73
-
74
- export default defineConfig({
75
- build: {
76
- rollupOptions: {
77
- // ..otherOptions
78
- output: {
79
- dir: './dist',
80
- manualChunks: {
81
- 'cnhis-vendor': ['cnhis-design-vue']
82
- }
83
- }
84
- }
85
- }
86
- });
87
- ```
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.FAQ
65
+
66
+ ### 3.1 项目打包后样式丢失
67
+
68
+ 处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
69
+
70
+ ```typescript
71
+ // vite.config.ts
72
+ import { defineConfig } from 'vite';
73
+
74
+ export default defineConfig({
75
+ build: {
76
+ rollupOptions: {
77
+ // ..otherOptions
78
+ output: {
79
+ dir: './dist',
80
+ manualChunks: {
81
+ 'cnhis-vendor': ['cnhis-design-vue']
82
+ }
83
+ }
84
+ }
85
+ }
86
+ });
87
+ ```
@@ -1,11 +1,15 @@
1
1
  import { type Ref } from 'vue';
2
2
  import { fabric } from '../../../../../../es/shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../../../es/shared/types';
4
- import { IPointTipProps, IPointMenuProps } from '../../../../../../es/components/fabric-chart/src/interface';
4
+ import { IObject, IPointTipProps, IPointMenuProps } from '../../../../../../es/components/fabric-chart/src/interface';
5
5
  export declare function useCenter(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
6
6
  redrawPoints: (ItemObj?: AnyObject) => void;
7
7
  clickMenu: ({ item, target }: {
8
8
  item: any;
9
9
  target: any;
10
10
  }) => void;
11
+ moveLimit: (point: IObject) => void;
12
+ setPopup: (point: any, status?: string) => void;
13
+ updateData: (params: AnyObject, mode?: string) => void;
14
+ getGridPoints: () => IObject[];
11
15
  };
@@ -1 +1 @@
1
- import{drawLine as e,drawPoint as t}from"../useDraw.js";import{useGrid as n}from"../useGrid.js";import{useBirthProcessCumputedPoint as i}from"../useCumputedPoint.js";import"../../../../../shared/utils/fabricjs/index.js";import{useCommon as o}from"../useCommon.js";import"vue";import{getPointRange as l,getIndex as r,isEffectiveNode as a,getTime as s}from"../../utils/index.js";import{cloneDeep as f}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";function u(u,p,c,d,m){const{cumputedX:v,cumputedY:g,getXValue:h,getYValue:y}=i(p),{xCellWidth:L,yCellHeight:x,originX:k,endX:b,originY:P,endY:A,event:w,scaleValues:j,xAxis:C,startTime:I,timeXCell:T,itemList:X}=p,E=new Map,M=new Set,Y=f(j);let _=[];n(u,p);const{getEqualXTypes:O,handleAddPrevent:V}=o(u,c,p);function $(){Y.forEach((e=>{e.dataList.forEach(((t,n)=>{S(t,n,e)}))})),function(){if(!w.evented)return;function e(e,t,n){Object.assign(m,{point:e,show:!0,target:t,list:n})}u.value.on("mouse:up",(t=>{if(3===t.button){const{x:n=0,y:i=0}=t.pointer||{};if(n>=k&&n<=b&&i>=P&&i<=A)if(t.target){if("main"!==t.target.__type)return;e(t.pointer,t.target,["删除节点"]);const{minLeft:n,maxLeft:i,minTop:o,maxTop:r}=l(t.target);H().forEach((e=>{"main"===e.__type&&e.left>n&&e.left<i&&e.top>o&&e.top<r&&m.list.push({renderItem:()=>e.origin.title,origin:{...e.origin},mode:"remove",pointer:t.pointer})})),1===m.list.length&&(m.show=!1,console.log("当前时间段内无可删除节点"))}else e(t.pointer,null,["新增节点"]),X.forEach((e=>{O(H(),n,"key").includes(e.key)||m.list.push({renderItem:()=>e.title,origin:{title:e.title,unit:e.unit,type:e.bigType,dataIndex:e.dataIndex,key:e.key},pointer:t.pointer})})),1===m.list.length&&(m.show=!1,V("repeat"),console.log("当前时间段内无可新增节点"))}}))}()}function S(n,i,o){var l;const{type:r,unit:a,dataList:s=[]}=o,f=[];E.set(n.key,[]),null==(l=n.list)||l.forEach(((l,s)=>{!function(n,l,s,m){var v;let g,x;const{pointAttr:j={},lineAttr:C={},title:I="",key:X,type:Y="circle"}=m,O=G(m.list[s+1],o);n&&O&&!l.breakpoint&&n[0]!==O[0]&&(x=e([...n,...O],C));const V=f[s-1],$={origin:{data:l,title:I,key:X||"",unit:a,type:r,dataIndex:i,index:s,lineAttr:C},__type:"main",leftLine:V,rightLine:x,...j,...p.event.hovered?p.event.evented?{selectable:!0}:{selectable:!0,lockMovementX:!0,lockMovementY:!0}:p.event};V?g=t(Y,{left:V.get("x2"),top:V.get("y2"),...$}):n&&($.leftLine=null,g=t(Y,{left:n[0],top:n[1],...$}));f.push(x),g&&(g.originLeft=g.left,g.originTop=g.top,function(e){w.hovered&&(e.on("mouseover",(()=>{q(e,"hover")})),e.on("mouseout",(()=>{d.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t=6e4/T,n=e.prevPoint?e.prevPoint.left+t:k,i=e.nextPoint?e.nextPoint.left-t:b;e.top<P&&e.set("top",P),e.top>A&&e.set("top",A),e.left<n&&e.set("left",n),e.left>i&&e.set("left",i)}(e),function(e){var t,n;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(n=e.rightLine)||n.setCoords().set({x1:e.left,y1:e.top})}(e),w.hovered&&q(e),function(e){const{originLeft:t,originTop:n,left:i,top:o,origin:l}=e,r=~~((i-t)/L);if(i>t+L&&!e.nextPoint){if(0===_.length){z(e,[...e.leftLine?[e.leftLine.x1,e.leftLine.y1]:[t,n],t,n]),e.leftLine&&e.leftLine.set({stroke:"transparent"})}const i=t+L*r;if(_.every((e=>e.left!==i))){const t=h(i),n=y(l.type,o);_.push({data:{time:t,value:n},left:i,top:o}),z(e,[...e.prevPointer,i,o])}_.length<r&&function(e,t){const{originLeft:n,originTop:i,origin:o}=e;let l=1;for(;l<=t;){const t=n+L*l,r=_.some((e=>Math.abs(e.left-t)<=1));if(!r){let l=0;const r=_.find(((e,n)=>(e.left>t&&(l=n),e.left>t)));if(r){const a=JSON.parse(JSON.stringify(r)),s=_[l-1]||{left:n,top:i},f=~~((r.left-(t-L))/L),u=(r.top-s.top)/f;a.top=s.top+u,a.left=t,a.data={time:h(t),value:y(o.type,a.top)},_.splice(l,0,a),z(e,[s.left,s.top,a.left,a.top])}}l++}}(e,r)}if(_.length>0&&i<_[_.length-1].left){for(const e of M)e.left>i&&(e.leftLine&&u.value.remove(e.leftLine),u.value.remove(e));if(_=_.filter((e=>e.left<=i)),0===_.length){e.leftLine&&e.leftLine.set(e.origin.lineAttr);for(const e of M)e.leftLine&&u.value.remove(e.leftLine),u.value.remove(e)}if(_.length>0){const t=_.at(-1);e.prevPointer=[t.left,t.top]}}}(e)})),e.on("mouseup",(t=>{if(d.show=!1,1===t.button){const{key:t,type:n}=e.origin,i={...e.origin,data:{...e.origin.data,time:h(e.left),value:y(n,e.top)}};if(u.value.discardActiveObject(),_.length>0){const e=_.map((e=>e.data));c("add",{...i,data:e}),D({...i,data:e})}else c("change",i),D(i,"change")}}))}(g),null==(v=E.get(X))||v.push(g))}(G(l,o),l,s,n)})),Promise.all(E.get(n.key)).then((e=>{const t=f.filter((e=>e));let n=null;e=e.map((e=>(e&&n&&(n.nextPoint=e,e.prevPoint=n),n=e||n,e))),u.value.add(...t,...e)}))}function z(t,n){const[i,o,l,r]=n;t.clone((i=>{i.set({left:l,top:r}),t.prevPointer=[l,r];const o=e(n,t.origin.lineAttr);i.leftLine=o,M.add(i),u.value.add(o,i)}))}function D(e,t="add"){const{dataIndex:n,data:i,index:o,key:l,type:a}=e,s=Y.find((e=>e.type===a)),f=s.dataList.find((e=>e.key===l));switch(t){case"remove":f.list.splice(o,1);break;case"change":f.list[o]=i;break;default:{const e=Array.isArray(i)?i[0].time:i.time,t=r(e,f.list),n=Array.isArray(i)?i:[i];f.list.splice(t,0,...n);break}}J({dataIndex:n,scaleValue:s})}function J(e){var t,n,i;if(M.size&&(null==(t=u.value)||t.remove(...N([...M]))),M.clear(),_=[],e){const{dataIndex:t,scaleValue:i}=e,o=i.dataList[t];null==(n=u.value)||n.remove(...N(E.get(o.key))),E.delete(o.key),S(o,t,i)}else E.size&&(null==(i=u.value)||i.remove(...N(H()))),E.clear(),$()}function N(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine)})),t}function q(e,t="moving"){const{title:n,type:i,data:o,unit:l}=e.origin;d.point={x:e.left,y:e.top};const r=`${"hover"===t?o.value:y(i,e.top)}`;d.list=[`${n} ${r}${l||""}`,`时间 ${h(e.left).slice(-5)}`],d.show=!0}function G(e,t){if(a(e)&&function(e){const t=Date.parse(C.list.at(-1)),n=s(e);return n>=I&&n<=t}(e.time)){const n=v(e.time),i=g(t.type,t.range,e.value);return[n,i<P?P:i>A?A:i]}}function H(){return Array.from(E.values()).flat()}return $(),{redrawPoints:J,clickMenu:function({item:e,target:t}){const n={...e.origin};"remove"===e.mode?(c("remove",n),D(n,"remove")):(Object.assign(n,{data:{time:h(e.pointer.x),value:y(e.origin.type,e.pointer.y)}}),c("add",n),D(n))}}}export{u as useCenter};
1
+ import{drawLine as e,drawPoint as t}from"../useDraw.js";import{useGrid as n}from"../useGrid.js";import{useBirthProcessCumputedPoint as i}from"../useCumputedPoint.js";import"../../../../../shared/utils/fabricjs/index.js";import{useCommon as o}from"../useCommon.js";import"vue";import{getPointRange as l,getIndex as r,isEffectiveNode as a,getTime as s}from"../../utils/index.js";import{cloneDeep as f}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";function u(u,p,c,d,m){const{cumputedX:v,cumputedY:g,getXValue:h,getYValue:y}=i(p),{xCellWidth:L,yCellHeight:x,originX:k,endX:P,originY:b,endY:A,event:w,scaleValues:j,xAxis:C,startTime:I,timeXCell:T,itemList:X}=p,E=new Map,M=new Set,Y=f(j);let _=[];n(u,p);const{getEqualXTypes:O,handleAddPrevent:V}=o(u,c,p);function $(){Y.forEach((e=>{e.dataList.forEach(((t,n)=>{S(t,n,e)}))})),function(){if(!w.evented)return;function e(e,t,n){Object.assign(m,{point:e,show:!0,target:t,list:n})}u.value.on("mouse:up",(t=>{if(3===t.button){const{x:n=0,y:i=0}=t.pointer||{};if(n>=k&&n<=P&&i>=b&&i<=A)if(t.target){if("main"!==t.target.__type)return;e(t.pointer,t.target,["删除节点"]);const{minLeft:n,maxLeft:i,minTop:o,maxTop:r}=l(t.target);W().forEach((e=>{"main"===e.__type&&e.left>n&&e.left<i&&e.top>o&&e.top<r&&m.list.push({renderItem:()=>e.origin.title,origin:{...e.origin},mode:"remove",pointer:t.pointer})})),1===m.list.length&&(m.show=!1,console.log("当前时间段内无可删除节点"))}else e(t.pointer,null,["新增节点"]),X.forEach((e=>{O(W(),n,"key",2*L).includes(e.key)||m.list.push({renderItem:()=>e.title,origin:{title:e.title,unit:e.unit,type:e.bigType,dataIndex:e.dataIndex,key:e.key},pointer:t.pointer})})),1===m.list.length&&(m.show=!1,V("repeat"),console.log("当前时间段内无可新增节点"))}}))}()}function S(n,i,o){var l;const{type:r,unit:a,dataList:s=[]}=o,f=[];E.set(n.key,[]),null==(l=n.list)||l.forEach(((l,s)=>{!function(n,l,s,m){var v;let g,x;const{pointAttr:k={},lineAttr:P={},title:b="",key:A,type:j="circle"}=m,C=H(m.list[s+1],o);n&&C&&!l.breakpoint&&n[0]!==C[0]&&(x=e([...n,...C],P));const I=f[s-1],T={origin:{data:l,title:b,key:A||"",unit:a,type:r,dataIndex:i,index:s,lineAttr:P},__type:"main",leftLine:I,rightLine:x,...k,...p.event.hovered?p.event.evented?{selectable:!0}:{selectable:!0,lockMovementX:!0,lockMovementY:!0}:p.event};I?g=t(j,{left:I.get("x2"),top:I.get("y2"),...T}):n&&(T.leftLine=null,g=t(j,{left:n[0],top:n[1],...T}));f.push(x),g&&(g.originLeft=g.left,g.originTop=g.top,function(e){w.hovered&&(e.on("mouseover",(()=>{N(e,"hover")})),e.on("mouseout",(()=>{d.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{q(e),function(e){var t,n;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(n=e.rightLine)||n.setCoords().set({x1:e.left,y1:e.top})}(e),w.hovered&&N(e),function(e){const{originLeft:t,originTop:n,left:i,top:o,origin:l}=e,r=~~((i-t)/L);if(i>t+L&&!e.nextPoint){if(0===_.length){D(e,[...e.leftLine?[e.leftLine.x1,e.leftLine.y1]:[t,n],t,n]),e.leftLine&&e.leftLine.set({stroke:"transparent"})}const i=t+L*r;if(_.every((e=>e.left!==i))){const t=h(i),n=y(l.type,o);_.push({data:{time:t,value:n},left:i,top:o}),D(e,[...e.prevPointer,i,o])}_.length<r&&function(e,t){const{originLeft:n,originTop:i,origin:o}=e;let l=1;for(;l<=t;){const t=n+L*l,r=_.some((e=>Math.abs(e.left-t)<=1));if(!r){let l=0;const r=_.find(((e,n)=>(e.left>t&&(l=n),e.left>t)));if(r){const a=JSON.parse(JSON.stringify(r)),s=_[l-1]||{left:n,top:i},f=~~((r.left-(t-L))/L),u=(r.top-s.top)/f;a.top=s.top+u,a.left=t,a.data={time:h(t),value:y(o.type,a.top)},_.splice(l,0,a),D(e,[s.left,s.top,a.left,a.top])}}l++}}(e,r)}if(_.length>0&&i<_[_.length-1].left){for(const e of M)e.left>i&&(e.leftLine&&u.value.remove(e.leftLine),u.value.remove(e));if(_=_.filter((e=>e.left<=i)),0===_.length){e.leftLine&&e.leftLine.set(e.origin.lineAttr);for(const e of M)e.leftLine&&u.value.remove(e.leftLine),u.value.remove(e)}if(_.length>0){const t=_.at(-1);e.prevPointer=[t.left,t.top]}}}(e)})),e.on("mouseup",(t=>{if(d.show=!1,1===t.button){const{key:t,type:n}=e.origin,i={...e.origin,data:{...e.origin.data,time:h(e.left),value:y(n,e.top)}};if(u.value.discardActiveObject(),_.length>0){const e=_.map((e=>e.data));c("add",{...i,data:e}),z({...i,data:e})}else c("change",i),z(i,"change")}}))}(g),null==(v=E.get(A))||v.push(g))}(H(l,o),l,s,n)})),Promise.all(E.get(n.key)).then((e=>{const t=f.filter((e=>e));let n=null;e=e.map((e=>(e&&n&&(n.nextPoint=e,e.prevPoint=n),n=e||n,e))),u.value.add(...t,...e)}))}function D(t,n){const[i,o,l,r]=n;t.clone((i=>{i.set({left:l,top:r}),t.prevPointer=[l,r];const o=e(n,t.origin.lineAttr);i.leftLine=o,M.add(i),u.value.add(o,i)}))}function z(e,t="add"){const{dataIndex:n,data:i,index:o,key:l,type:a}=e,s=Y.find((e=>e.type===a)),f=s.dataList.find((e=>e.key===l));switch(t){case"remove":f.list.splice(o,1);break;case"change":f.list[o]=i;break;default:{const e=Array.isArray(i)?i[0].time:i.time,t=r(e,f.list),n=Array.isArray(i)?i:[i];f.list.splice(t,0,...n);break}}G({dataIndex:n,scaleValue:s})}function G(e){var t,n,i;if(M.size&&(null==(t=u.value)||t.remove(...J([...M]))),M.clear(),_=[],e){const{dataIndex:t,scaleValue:i}=e,o=i.dataList[t];null==(n=u.value)||n.remove(...J(E.get(o.key))),E.delete(o.key),S(o,t,i)}else E.size&&(null==(i=u.value)||i.remove(...J(W()))),E.clear(),$()}function J(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine)})),t}function N(e,t="moving"){const{title:n,type:i,data:o,unit:l}=e.origin;d.point={x:e.left,y:e.top};const r=`${"hover"===t?o.value:y(i,e.top)}`;d.list=[`${n} ${r}${l||""}`,`时间 ${h(e.left).slice(-5)}`],d.show=!0}function q(e){e.setCoords();const t=6e4/T,n=e.prevPoint?e.prevPoint.left+t:k,i=e.nextPoint?e.nextPoint.left-t:P;e.top<b&&e.set("top",b),e.top>A&&e.set("top",A),e.left<n&&e.set("left",n),e.left>i&&e.set("left",i)}function H(e,t){if(a(e)&&function(e){const t=Date.parse(C.list.at(-1)),n=s(e);return n>=I&&n<=t}(e.time)){const n=v(e.time),i=g(t.type,t.range,e.value);return[n,i<b?b:i>A?A:i]}}function W(){return Array.from(E.values()).flat()}return $(),{redrawPoints:G,clickMenu:function({item:e,target:t}){const n={...e.origin};"remove"===e.mode?(c("remove",n),z(n,"remove")):(Object.assign(n,{data:{time:h(e.pointer.x),value:y(e.origin.type,e.pointer.y)}}),c("add",n),z(n))},moveLimit:q,setPopup:N,updateData:z,getGridPoints:W}}export{u as useCenter};
@@ -1,4 +1,5 @@
1
1
  import { type Ref } from 'vue';
2
2
  import { fabric } from '../../../../../../es/shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../../../es/shared/types';
4
- export declare function useLeft(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function): void;
4
+ import { IPointTipProps } from '../../../../../../es/components/fabric-chart/src/interface';
5
+ export declare function useLeft(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function, pointTipProps: IPointTipProps, moveLimit: Function, setPopup: Function, updateData: Function, getGridPoints: Function): void;
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawTextGroup as e,defaultRectStyle as i,drawTextAndIconGroup as o,drawText as l,defaultTextStyle as n,defaultStyle as r}from"../useDraw.js";import"date-fns";import{getScaleNumberList as a}from"../../utils/index.js";import{drawScaleNumber as s}from"../useScaleColumn.js";import"vue";import"lodash-es";import"../temperature/useShadow.js";function d(d,h,u){const{originY:c,endY:p,borderStyle:f,left:m,itemList:g,scaleValues:v,originX:w,endX:j,yCellHeight:y,markHeight:S,canvasWidth:W,canvasHeight:b}=h;!function(){if(!m)return;const{title:t,titleWidth:i,titleStyle:o}=m,l=e({width:i,height:p-c+S,...f},{value:t.split("").join("\n"),...o||{}},{left:0,top:c},!0);d.value.add(l)}(),v.forEach(((e,i)=>{var o,h;const u="left"===e.layout?w-5:j+5,{range:c,spaceValue:f,title:g,unit:v,titleStyle:S,spaceGridNumber:b=1,showNumber:x,showMaxMinNumber:N}=e,k=[],X=a(c,f),Y=X.length;X.forEach(((t,i)=>{const o=0===i?p-5:p-i*y*b;!x||(0===i||i===Y-1)&&!N||k.push(s(String(t),{...e,position:e.layout},u,o))}));const C=g&&l(["left"===e.layout?m.width/2:j+(W-j)/2,(null!=(h=null==(o=k.at(-1))?void 0:o.top)?h:330)-y],{value:`${g}${v?"\n"+v:""}`,...n,...S}),E=new t.Group([...k,...C?[C]:[]],{objectCaching:!1,...r});d.value.add(E),E.sendToBack()})),function(){const e=new t.Rect({width:w-m.titleWidth,height:p-c+S,left:m.titleWidth,top:c,...i,originX:"left",originY:"top",...f});d.value.add(e);const l=JSON.parse(JSON.stringify(g));let n=p;const r=m.titleWidth+15;l.reverse().forEach((t=>{n-=10;const e=t.title,{text:i,icon:l}=o(e,t,{text:{left:r,top:n},icon:{leftX:r,topY:n}});n-=i.height||30,d.value.add(i,l)}))}(),d.value.add(new t.Rect({left:0,top:0,width:W-f.strokeWidth,height:b-f.strokeWidth,fill:"transparent",...f}))}export{d as useLeft};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawTextGroup as e,defaultRectStyle as i,drawTextAndIconGroup as o,drawText as n,defaultTextStyle as l,defaultStyle as r}from"../useDraw.js";import{useBirthProcessCumputedPoint as s}from"../useCumputedPoint.js";import{drawScaleNumber as a}from"../useScaleColumn.js";import{useCommon as d}from"../useCommon.js";import"vue";import{getScaleNumberList as u}from"../../utils/index.js";import{cloneDeep as c}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";function h(h,f,p,m,g,v,w,y){const{getYValue:j,getXValue:x}=s(f),{getEqualXTypes:b,handleAddPrevent:W,isGridLimit:X}=d(h,p,f),{originY:C,endY:k,borderStyle:E,left:S,itemList:Y,scaleValues:L,originX:V,endX:G,yCellHeight:H,markHeight:N,canvasWidth:T,canvasHeight:M,xCellWidth:P}=f;!function(){if(!S)return;const{title:t,titleWidth:i,titleStyle:o}=S,n=e({width:i,height:k-C+N,...E},{value:t.split("").join("\n"),...o||{}},{left:0,top:C},!0);h.value.add(n)}(),L.forEach(((e,i)=>{var o,s;const d="left"===e.layout?V-5:G+5,{range:c,spaceValue:f,title:p,unit:m,titleStyle:g,spaceGridNumber:v=1,showNumber:w,showMaxMinNumber:y}=e,j=[],x=u(c,f),b=x.length;x.forEach(((t,i)=>{const o=0===i?k-5:k-i*H*v;!w||(0===i||i===b-1)&&!y||j.push(a(String(t),{...e,position:e.layout},d,o))}));const W=p&&n(["left"===e.layout?S.width/2:G+(T-G)/2,(null!=(s=null==(o=j.at(-1))?void 0:o.top)?s:330)-H],{value:`${p}${m?"\n"+m:""}`,...l,...g}),X=new t.Group([...j,...W?[W]:[]],{objectCaching:!1,...r});h.value.add(X),X.sendToBack()})),function(){const e=new t.Rect({width:V-S.titleWidth,height:k-C+N,left:S.titleWidth,top:C,...i,originX:"left",originY:"top",...E});h.value.add(e);const n=c(Y),l=c(S.externalIconList||[]).map((t=>({...t,isExternal:!0})));let r=k;const s=S.titleWidth+15;l.concat(n.reverse()).forEach((t=>{r-=10;const e=t.title,{text:i,icon:n}=o(e,t,{text:{left:s,top:r},icon:{leftX:s,topY:r,...t.isExternal?{evented:!1,selectable:!1}:{}}});var l;r-=i.height||30,(l=n).on("moving",(()=>{l.set("originX","center"),X(l)?(g(l),v(l)):m.show=!1})),l.on("mouseup:before",(t=>{if(m.show=!1,0===t.e.button&&X(l))if(b(y(),l.left,"key",2*P).includes(l.origin.key))W("repeat");else{const t={data:{time:x(l.left),value:j(l.origin.type,l.top)},...l.origin};p("add",t),w(t)}!function(t){t.setCoords().set({originX:"left",left:t.originLeft,top:t.originTop})}(l)})),h.value.add(i,n)}))}(),h.value.add(new t.Rect({left:0,top:0,width:T-E.strokeWidth,height:M-E.strokeWidth,fill:"transparent",...E}))}export{h as useLeft};
@@ -1 +1 @@
1
- import{ref as e,computed as t,reactive as a,unref as r,onMounted as i,nextTick as l}from"vue";import{defaultBorderStyle as n}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as u}from"date-fns";import{getChildrenSize as s}from"../../utils/index.js";import{cloneDeep as o,range as d}from"lodash-es";import"../temperature/useShadow.js";import{OTHER_MENU as c}from"../../constants/index.js";import{useTop as p}from"./useTop.js";import{useLeft as m}from"./useLeft.js";import{useCenter as h}from"./useCenter.js";import{useOther as v}from"./useOther.js";function f(f,g,y,x,w,b){const j=e(),Y=e(),C=e(),H=t((()=>g.data.layout||{top:"drug",center:"xAxis",bottom:"intraoperatively"})),A=t((()=>{var e;return null!=(e=g.data.left.width)?e:0})),D=t((()=>{const{grid:e}=g.data;return e.mainXCell*e.subXCell})),M=t((()=>{const{grid:e}=g.data;return e.mainYCell*e.subYCell})),T=t((()=>s(g.data.top.treeData))),X=t((()=>g.data.top.tree.cellHeight)),V=t((()=>X.value*T.value)),k=t((()=>$(U("drug")||"top"))),G=t((()=>k.value+V.value)),S=t((()=>{var e;return Date.parse((null==(e=g.data.xAxis)?void 0:e.startTime)||u(new Date,"yyyy-MM-dd HH:mm:ss"))})),N=t((()=>{const e=o(g.data.xAxis),{spaceValue:t,spaceTimeStamp:a}=e,r=d(D.value/t+1).map((r=>0===r?e.startTime:u(new Date(S.value+r*t*a),"yyyy-MM-dd HH:mm:ss")));return{...e,list:r,left:A.value}})),O=function(){const e=o(g.data.top.treeData);let t=0;const{cellWidth:a,cellHeight:r}=g.data.top.tree;return function e(i,l=0){i.forEach((i=>{var n;const u={top:t*r+k.value,left:l*a,width:a,height:r};if(t++,null==(n=i.children)?void 0:n.length){t--;const a=s(i.children);u.height=a*r,e(i.children,l+1)}else u.width=A.value-u.left;Object.assign(i,u)}))}(e),e}(),L=t((()=>$(U("xAxis")||"center"))),W=t((()=>{var e;const{width:t,right:a}=g.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),E=t((()=>$(U("intraoperatively")||"bottom"))),I=t((()=>{var e;const{show:t=!0,height:a}=(null==(e=g.data.other)?void 0:e.mark)||{};return t&&a?a:0})),P=t((()=>E.value+(g.data.height-V.value-N.value.height-I.value))),q=t((()=>(W.value-A.value)/D.value)),z=t((()=>(P.value-E.value)/M.value)),B=t((()=>N.value.spaceTimeStamp/q.value)),F=t((()=>{const{scaleValues:e}=g.data;return e.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:e.type,unit:e.unit,dataIndex:a}))))).flat()})),J=t((()=>_("pulse"))),K=t((()=>_("temperature"))),Q=t((()=>{var e;return(null==(e=g.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),R=a({canvasWidth:g.data.width,canvasHeight:g.data.height,borderStyle:{...n,...g.data.borderStyle||{}},grid:g.data.grid,top:g.data.top,left:g.data.left,other:g.data.other,topGridYNumber:r(T),topGridYCellHeight:r(X),topGridOriginY:r(k),topGridEndY:r(G),treeData:O,xAxis:r(N),originYXAxis:r(L),startTime:r(S),timeXCell:r(B),gridXNumber:r(D),gridYNumber:r(M),xCellWidth:r(q),yCellHeight:r(z),originX:r(A),endX:r(W),originY:r(E),endY:r(P),markHeight:r(I),itemList:r(F),scaleValues:g.data.scaleValues,pulseYCell:r(J),temperatureYCell:r(K),event:r(Q)});function U(e){let t="";return Object.entries(H.value).some((([a,r])=>{if(r===e)return t=a,!0})),t}function Z(e){const t=H.value[e],a=N.value.height;switch(t){case"drug":return V.value;case"xAxis":return a;default:return g.data.height-V.value-a}}function $(e){switch(e){case"top":return 0;case"center":return Z("top");default:return Z("top")+Z("center")}}function _(e){const{scaleValues:t}=g.data,a=t.find((t=>t.type===e));return z.value*(a.spaceGridNumber||1)/(a.spaceValue||1)}return i((async()=>{await l(),p(f,R,y,w),m(f,R);const{clickMenu:e}=v(f,R,y,w,b),{redrawPoints:t,clickMenu:a}=h(f,R,y,w,b);Y.value=t,C.value=t=>{const{item:r}=t;r.type&&c.map((e=>e.type)).includes(r.type)?e(t):a(t)}})),{propItems:R,redrawPoints:Y,select:j,clickMenu:C}}export{f as useSurgicalAnesthesiaChart};
1
+ import{ref as e,computed as t,reactive as a,unref as r,onMounted as i,nextTick as l}from"vue";import{defaultBorderStyle as n}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as u}from"date-fns";import{getChildrenSize as s}from"../../utils/index.js";import{cloneDeep as o,range as d}from"lodash-es";import"../temperature/useShadow.js";import{OTHER_MENU as c}from"../../constants/index.js";import{useTop as p}from"./useTop.js";import{useLeft as m}from"./useLeft.js";import{useCenter as h}from"./useCenter.js";import{useOther as v}from"./useOther.js";function f(f,g,y,x,w,b){const j=e(),Y=e(),C=e(),H=t((()=>g.data.layout||{top:"drug",center:"xAxis",bottom:"intraoperatively"})),D=t((()=>{var e;return null!=(e=g.data.left.width)?e:0})),A=t((()=>{const{grid:e}=g.data;return e.mainXCell*e.subXCell})),M=t((()=>{const{grid:e}=g.data;return e.mainYCell*e.subYCell})),T=t((()=>s(g.data.top.treeData))),X=t((()=>g.data.top.tree.cellHeight)),G=t((()=>X.value*T.value)),V=t((()=>$(U("drug")||"top"))),k=t((()=>V.value+G.value)),S=t((()=>{var e;return Date.parse((null==(e=g.data.xAxis)?void 0:e.startTime)||u(new Date,"yyyy-MM-dd HH:mm:ss"))})),L=t((()=>{const e=o(g.data.xAxis),{spaceValue:t,spaceTimeStamp:a}=e,r=d(A.value/t+1).map((r=>0===r?e.startTime:u(new Date(S.value+r*t*a),"yyyy-MM-dd HH:mm:ss")));return{...e,list:r,left:D.value}})),N=function(){const e=o(g.data.top.treeData);let t=0;const{cellWidth:a,cellHeight:r}=g.data.top.tree;return function e(i,l=0){i.forEach((i=>{var n;const u={top:t*r+V.value,left:l*a,width:a,height:r};if(t++,null==(n=i.children)?void 0:n.length){t--;const a=s(i.children);u.height=a*r,e(i.children,l+1)}else u.width=D.value-u.left;Object.assign(i,u)}))}(e),e}(),O=t((()=>$(U("xAxis")||"center"))),P=t((()=>{var e;const{width:t,right:a}=g.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),W=t((()=>$(U("intraoperatively")||"bottom"))),E=t((()=>{var e;const{show:t=!0,height:a}=(null==(e=g.data.other)?void 0:e.mark)||{};return t&&a?a:0})),I=t((()=>W.value+(g.data.height-G.value-L.value.height-E.value))),q=t((()=>(P.value-D.value)/A.value)),z=t((()=>(I.value-W.value)/M.value)),B=t((()=>L.value.spaceTimeStamp/q.value)),F=t((()=>{const{scaleValues:e}=g.data;return e.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:e.type,unit:e.unit,dataIndex:a}))))).flat()})),J=t((()=>_("pulse"))),K=t((()=>_("temperature"))),Q=t((()=>{var e;return(null==(e=g.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),R=a({canvasWidth:g.data.width,canvasHeight:g.data.height,borderStyle:{...n,...g.data.borderStyle||{}},grid:g.data.grid,top:g.data.top,left:g.data.left,other:g.data.other,topGridYNumber:r(T),topGridYCellHeight:r(X),topGridOriginY:r(V),topGridEndY:r(k),treeData:N,xAxis:r(L),originYXAxis:r(O),startTime:r(S),timeXCell:r(B),gridXNumber:r(A),gridYNumber:r(M),xCellWidth:r(q),yCellHeight:r(z),originX:r(D),endX:r(P),originY:r(W),endY:r(I),markHeight:r(E),itemList:r(F),scaleValues:g.data.scaleValues,pulseYCell:r(J),temperatureYCell:r(K),event:r(Q)});function U(e){let t="";return Object.entries(H.value).some((([a,r])=>{if(r===e)return t=a,!0})),t}function Z(e){const t=H.value[e],a=L.value.height;switch(t){case"drug":return G.value;case"xAxis":return a;default:return g.data.height-G.value-a}}function $(e){switch(e){case"top":return 0;case"center":return Z("top");default:return Z("top")+Z("center")}}function _(e){const{scaleValues:t}=g.data,a=t.find((t=>t.type===e));return z.value*(a.spaceGridNumber||1)/(a.spaceValue||1)}return i((async()=>{await l(),p(f,R,y,w);const{redrawPoints:e,clickMenu:t,moveLimit:a,setPopup:r,updateData:i,getGridPoints:n}=h(f,R,y,w,b);m(f,R,y,w,a,r,i,n);const{clickMenu:u}=v(f,R,y,w,b);Y.value=e,C.value=e=>{const{item:a}=e;a.type&&c.map((e=>e.type)).includes(a.type)?u(e):t(e)}})),{propItems:R,redrawPoints:Y,select:j,clickMenu:C}}export{f as useSurgicalAnesthesiaChart};
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as n,defaultStyle as i,drawPoint as o,drawText as l,drawArrow as r}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import"date-fns";import{isOneLine as a,getType as u,isOverlapPoint as c,isValidValue as p,setOtherType as d,isEffectiveNode as f,getTime as h,getIndex as g,deleteProperty as v}from"../../utils/index.js";import{useCommon as y}from"../useCommon.js";import"vue";import{cloneDeep as m}from"lodash-es";import{TEMPERATURE_MENU as x,PAIN_MENU as b,OVERLAP as j}from"../../constants/index.js";function L(L,k,S,Y,E,M,$,O,P,A){s(L,k);const{getEqualXTypes:C,handleAddPrevent:I}=y(L,S,k),{createShadowLines:T}=t(),{left:R,xScaleList:X,xCellWidth:F,yCellHeight:z,originX:D,endX:V,originY:_,endY:G,itemList:H,event:W,vitalSignsOriginY:q,painOriginY:B,hospitalizationDate:J,config:K,canvasHeight:N}=k,Q=new Set,U=["xinmai","mai"],Z=new Map,ee=new Set,te=new Set,ne=new Set,ie=m(R.yScaleValue);function oe(t){var o;const l=ie.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(Q.size&&L.value.remove(...Q),Q.clear(),Z.size>1)){if(t){const{type:e,key:n}=t.origin||{};if("pulse"===e){const e=Z.get(n),i=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(i,1,[t.left,t.top])}}const o=function(){const e=[],t=[],n=[];for(const e of Z)t.push(e[1]),e[0]===U[0]&&e[1].forEach((e=>{(Z.get(U[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&n.push(e[0])}));const[i,o]=t;let l=[],r=[];return n.forEach((t=>{const n=i.findIndex((e=>e[0]===t)),s=o.findIndex((e=>e[0]===t)),a=i[n],u=o[s],c=i[n-1],p=i[n+1],d=o[s-1],f=o[s+1];if(c&&d){if(c[0]!==d[0]){const e=Math.max(c[0],d[0]);l.push([c,d].find((t=>t[0]===e)))}}else c?l.push(c):d&&r.push(d);const h=Math.min(a[1],u[1]);l.push([a,u].find((e=>e[1]===h)));const g=Math.max(a[1],u[1]);r.push([a,u].find((e=>e[1]===g)));const v=()=>{const t=[...l,...r.reverse()],[n]=t,i=t.at(-1);n[0]===i[0]&&n[1]===i[1]&&t.splice(-1,1),e.push(t),l=[],r=[]};if(p&&f){if(p[0]!==f[0]){const e=Math.min(p[0],f[0]);l.push([p,f].find((t=>t[0]===e))),v()}}else p?(l.push(p),v()):f?(r.push(f),v()):v()})),e}(),{mode:r,style:s={}}=l.shadow||{};o.forEach((t=>{const o=t.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...i,...s,strokeWidth:1});if(["slash","line"].includes(r)){l.set({fill:"transparent",stroke:s.stroke||"#f00"});const e=[];if(["slash"].includes(r))e.push(...T(t,s._angle,s.space)),e.forEach((e=>{Object.assign(e,{...i,...s}),Q.add(e)}));else{const i=function(e){const t=e.reduce(((e,t)=>{const n=Math.trunc(t[0]);return e[n]=e[n]?e[n].concat(t):[t],e}),{}),n=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return n}(t);i.forEach((t=>{const i=n([...t.flat()],{...s,originX:"center"});e.push(i),Q.add(i)}))}L.value.add(...e)}Q.add(l),L.value.add(l)}))}}function le(){var e;const t=ie.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const n=Object.assign({},j,R.overlap||{}),l=[];ee.size&&[...ee].forEach((e=>{[...te].forEach((t=>{if(t.origin&&c(e,t)){const e=t.origin.key;if(e){const r={left:t.left,top:t.top,...i,hoverCursor:"default"};let s="koumai";"yemai"===e&&(s=e),"humai"===e&&(s="circle"),l.push(o(s,{...n[e]||{},...r}))}}}))})),setTimeout((()=>{L.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ne.add(e)}))}))}function re(e,t,s){var u;const{type:c,riseStyle:f={},noRiseStyle:h={},verifiedStyle:g={},reduceStyle:v={},pacemaker:y={},upArrowStyle:m={},limitValueStyle:x={},nonePainPointStyle:b={},dataList:j=[]}=s,{type:Y,textStyle:M,showConnectLine:O=!1}=b,A=[],C=[],I=[];null==(u=e.list)||u.forEach(((u,b)=>{const T=a(c)?j.find((e=>e.key===u.key)):e,R=ue(u,s),X={};X.value=function(e,t,n){if(!(null==e?void 0:e.length)||!K.showValue)return;const{lineAttr:i={}}=n,o=e[1]<=q.originY+z?e[1]+z:e[1]-z,r=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:i.stroke||"#000"});return I.push(r),{obj:r,top:-z}}(R,u,T),function(e,t,s,a,u){var d,y;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(c))return;const{lineAttr:m={}}=s,{value:x}=a;let b,j,L,k,S,Y;if(t.noRise&&h.show){const t=w(h)?E(u.type,u.list,35):e[1];if(h.text)L=l([e[0],w(h)?t:t+5],{value:h.text.split("").join("\n"),originY:"top",...h.style||{}}),I.push(L);else{const n=t+2*z;k=r([e[0],t,n],h.style||{}),I.push(k)}}t.rise&&f.show&&f.text&&(S=l([e[0],e[1]-(x?z:0)-5],{value:f.text.split("").join("\n"),originY:"bottom",...f.style||{}}),I.push(S));t.verified&&(Y=l([e[0],e[1]-(x?z:0)-5],{value:"v",originX:"center",originY:"bottom",...g}),I.push(Y));if(p(t.physicsReduce)||p(t.drugReduce)){const l=E(c,u.list,null!=(d=t.physicsReduce)?d:t.drugReduce);b=n([...e,e[0],l],{...m,...v.line,...i}),j=o((null==(y=null==v?void 0:v.point)?void 0:y.type)||"circle",{left:e[0],top:l,...v.point,...i,originY:l===N?"bottom":"center"}),b&&I.push(b),j&&I.push(j)}Object.assign(a,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:L,top:5,isFixed:w(h)},arrowGroup:{obj:k,top:2*z,isFixed:w(h)},riseText:{obj:S,top:(x?-z:0)-5},verifiedText:{obj:Y,top:(x?-z:0)-5},reducePoint:{obj:j,type:"reduce"}})}(R,u,T,X,s),function(e,t,n,i){if(!(null==e?void 0:e.length)||!["pulse"].includes(c))return;let o,a;const{upArrowShow:u=!1,limitValueShow:p=!1}=n;if(u&&+t.value>180){let t=e[1]-2.5*z,n=[e[1]-z/2,t];t<q.originY&&(t=e[1]+2.5*z,n=[t,e[1]+z/2]),o=r([e[0],n[0],n[1]],m,"up"),I.push(o)}if(p){const n={value:t.value,originX:"center",originY:"center",...x};if(+t.value>Math.max(...s.list)){const t=o?e[1]+z/2+o.height:e[1]+z;a=l([e[0],t],n),I.push(a)}+t.value<Math.min(...s.list)&&(a=l([e[0],e[1]-z],n),I.push(a))}Object.assign(i,{upArrow:{obj:o},limitValue:{obj:a,top:-z}})}(R,u,T,X),function(i,l,r,a,u){let p,f;const{pointAttr:h={},lineAttr:g={},title:v="",key:m,type:x="circle"}=a,b=e.list[r+1],j=ue(b,s),w=se(c,e.list[r].value),E=j&&se(c,b.value);i&&j&&!l.breakpoint&&(!w&&!E||O)&&i[0]!==j[0]&&(f=n([...i,...j],{...g}));const I=l.pacemakerShow&&"pulse"==c?y.value:w&&"number"===Y?0:x,T=C[r-1],R={origin:{data:l,title:v,key:m||"",unit:s.unit,type:c,_type:d(v,c),dataIndex:t,index:r},leftLine:T,rightLine:f,otherObj:u,lockMovementX:!0,...l.pacemakerShow&&"pulse"==c?y.style:h,...k.event.hovered?k.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:k.event,...w?{selectable:!1,evented:!1,..."number"===Y?M:{}}:{}};if(T){const e=T.get("y2");p=o(I,{left:T.get("x2"),top:w?e-5:e,...R})}else i&&(R.leftLine=null,p=o(I,{left:i[0],top:w?i[1]-5:i[1],...R}));C.push(f),p&&(v.includes("脉搏")?ee.add(p):te.add(p),function(e){W.hovered&&(e.on("mouseover",(()=>{ae(e,"hover")})),e.on("mouseout",(()=>{P.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?B:q;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,n;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(n=e.rightLine)||n.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:n,type:i="",top:o=0,isFixed:l}=t||{};"reduce"!==i&&("line"===i?null==n||n.setCoords().set({x1:e.left,y1:e.top}):!l&&(null==n||n.setCoords().set({left:e.left,top:e.top+o})))})),oe(e)}(e),W.hovered&&ae(e)})),e.on("mouseup",(t=>{if(P.show=!1,1===t.button){const{type:t}=e.origin,n=$(t,e.top),i={...e.origin,data:{...e.origin.data,value:n}};L.value.discardActiveObject(),S("change",i),pe(i,"change")}}))}(p),A.push(p),ne.add(p))}(R,u,b,T,X)})),"pulse"===c&&U.forEach((e=>{Z.set(e,A.filter((t=>{var n;return(null==(n=t.origin)?void 0:n.key)===e})).map((e=>[e.left,e.top])))})),Promise.all(A).then((e=>{const t=C.filter((e=>e));let n=null;e=e.map((e=>(e&&n&&(n.nextPoint=e,e.prevPoint=n),n=e||n,e))),Promise.all(I).then((n=>{L.value.add(...t,...e,...n),e.forEach((t=>{null==t||t.bringToFront(),function(e,t){if("pulse"===e.origin.type){t.filter((t=>t.left===e.left&&"pulse"===t.origin.type)).length>1&&(e.leftLine&&L.value.remove(e.leftLine),e.rightLine&&L.value.remove(e.rightLine))}}(t,e)}))}))}))}function se(e,t){return"pain"===e&&0==t}function ae(e,t="moving"){const{title:n,unit:i,type:o,data:l}=e.origin;P.point={x:e.left,y:e.top},P.list=[function(){const{drugReduce:r,physicsReduce:s}=l||{},a="hover"===t?l.value:$(o,e.top);if(p(r))return`药物降${"pain"==o?"痛":"温"} ${a}—>${r}${i||""}`;if(p(s))return`物理降${"pain"==o?"痛":"温"} ${a}—>${s}${i||""}`;return`${n} ${a}${i||""}`}(),`时间 ${((null==l?void 0:l.time)||M(e.left)).slice(-5)}`],P.show=!0}function ue(e,t){const n="pain"===t.type?B:q;if(f(e)&&function(e){const[t]=X,n=X.at(-1),i=t.start,o=n.end,l=h(e);return l>=i&&l<=o}(e.time)){const i=Y(e.time),o=E(t.type,t.list,e.value);return[i,o<n.originY?n.originY:o>n.endY?n.endY:o]}}function ce(e){const t=new Date,n=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),o=h(`${t.getFullYear()}-${n}-${i} 23:59:59`),l=h(`${M(e)}:00`);return J&&l<h(J)?(I("exceedMin"),!1):!(l>o)||(I("exceedMax"),!1)}function pe(e,t="add"){const{type:n,dataIndex:i,index:o,data:l,key:r}=e,s=ie.find((e=>e.type===n));if("add"===t){const e=a(n)?s.dataList.find((e=>e.enable)):s.dataList[i],t=g(l.time,e.list);e.list.splice(t,0,l)}else s.dataList[i].list[o]=l;de()}function de(){var e;ne.size&&(null==(e=L.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...ne]))),Z.clear(),ne.clear(),ee.clear(),te.clear(),ie.forEach((e=>{e.dataList.forEach(((t,n)=>{a(e.type)&&!t.enable||re(t,n,e)}))})),oe(),le()}return Z.clear(),ee.clear(),te.clear(),ie.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=E(e.type,e.list,e.positionLine.value),i=n([D,t,V,t],e.positionLine);L.value.add(i)}(e),e.dataList.forEach(((t,n)=>{a(e.type)&&!t.enable||re(t,n,e)}))})),oe(),le(),k.event.evented&&L.value.on("mouse:up",(e=>{var t;if(3===e.button){const{x:n=0,y:i=0}=e.pointer||{};if(n>=D&&n<=V&&i>=_&&i<=G){A.point={x:n,y:i},A.show=!0;const{type:o}=(null==(t=e.target)?void 0:t.origin)||{};if(e.target&&["temperature","pain"].includes(o))"temperature"===o&&(A.list=[...x]),"pain"===o&&(A.list=[...b]),A.target=e.target;else{A.target=null,A.list=["新增节点"],H.forEach((t=>{if(!C([...ne],n,"_type").includes(t.bigType)){const n=["pain"].includes(t.bigType)?B:q;i>=n.originY&&i<=n.endY&&A.list.push({renderItem:O?O(t):()=>t.title,origin:{title:t.title,unit:t.unit,type:u(t.bigType),dataIndex:t.dataIndex,key:t.key},pointer:e.pointer})}}));const t=ce(n);t&&1!==A.list.length||(A.show=!1,1===A.list.length&&t&&I("repeat"))}}}})),{clickMenu:function({item:e,target:t}){if(t){const{data:n,type:i,dataIndex:o,index:l}=t.origin,r=v(n,[...x,...b]);r[`${e.type}`]=e.value,a(i)&&(r.key=t.origin.key);const s={...t.origin,data:r};S("change",s),pe(s,"change")}else{const t={data:{time:M(e.pointer.x),value:$(e.origin.type,e.pointer.y),...a(e.origin.type)?{key:e.origin.key}:{}},...e.origin};S("add",t),pe(t)}},setPopup:ae,isAddPoint:ce,updateData:pe,redrawPoints:de,gridPoints:ne}}function w(e){return"fixed"===e.position}export{L as useCenter};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as n,defaultStyle as i,drawPoint as o,drawText as l,drawArrow as r}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import"date-fns";import{isOneLine as a,getType as u,isOverlapPoint as c,isValidValue as p,setOtherType as d,isEffectiveNode as f,getTime as h,getIndex as g,deleteProperty as v}from"../../utils/index.js";import{useCommon as y}from"../useCommon.js";import"vue";import{cloneDeep as m}from"lodash-es";import{TEMPERATURE_MENU as x,PAIN_MENU as b,OVERLAP as j}from"../../constants/index.js";function L(L,k,S,Y,E,M,$,O,P,A){s(L,k);const{getEqualXTypes:C,handleAddPrevent:I}=y(L,S,k),{createShadowLines:T}=t(),{left:R,xScaleList:X,xCellWidth:F,yCellHeight:z,originX:D,endX:V,originY:_,endY:G,itemList:H,event:W,vitalSignsOriginY:q,painOriginY:B,hospitalizationDate:J,config:K,canvasHeight:N}=k,Q=new Set,U=["xinmai","mai"],Z=new Map,ee=new Set,te=new Set,ne=new Set,ie=m(R.yScaleValue);function oe(t){var o;const l=ie.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(Q.size&&L.value.remove(...Q),Q.clear(),Z.size>1)){if(t){const{type:e,key:n}=t.origin||{};if("pulse"===e){const e=Z.get(n),i=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(i,1,[t.left,t.top])}}const o=function(){const e=[],t=[],n=[];for(const e of Z)t.push(e[1]),e[0]===U[0]&&e[1].forEach((e=>{(Z.get(U[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&n.push(e[0])}));const[i,o]=t;let l=[],r=[];return n.forEach((t=>{const n=i.findIndex((e=>e[0]===t)),s=o.findIndex((e=>e[0]===t)),a=i[n],u=o[s],c=i[n-1],p=i[n+1],d=o[s-1],f=o[s+1];if(c&&d){if(c[0]!==d[0]){const e=Math.max(c[0],d[0]);l.push([c,d].find((t=>t[0]===e)))}}else c?l.push(c):d&&r.push(d);const h=Math.min(a[1],u[1]);l.push([a,u].find((e=>e[1]===h)));const g=Math.max(a[1],u[1]);r.push([a,u].find((e=>e[1]===g)));const v=()=>{const t=[...l,...r.reverse()],[n]=t,i=t.at(-1);n[0]===i[0]&&n[1]===i[1]&&t.splice(-1,1),e.push(t),l=[],r=[]};if(p&&f){if(p[0]!==f[0]){const e=Math.min(p[0],f[0]);l.push([p,f].find((t=>t[0]===e))),v()}}else p?(l.push(p),v()):f?(r.push(f),v()):v()})),e}(),{mode:r,style:s={}}=l.shadow||{};o.forEach((t=>{const o=t.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...i,...s,strokeWidth:1});if(["slash","line"].includes(r)){l.set({fill:"transparent",stroke:s.stroke||"#f00"});const e=[];if(["slash"].includes(r))e.push(...T(t,s._angle,s.space)),e.forEach((e=>{Object.assign(e,{...i,...s}),Q.add(e)}));else{const i=function(e){const t=e.reduce(((e,t)=>{const n=Math.trunc(t[0]);return e[n]=e[n]?e[n].concat([t]):[t],e}),{}),n=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return n}(t);i.forEach((t=>{const i=n([...t.flat()],{...s,originX:"center"});e.push(i),Q.add(i)}))}L.value.add(...e)}Q.add(l),L.value.add(l)}))}}function le(){var e;const t=ie.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const n=Object.assign({},j,R.overlap||{}),l=[];ee.size&&[...ee].forEach((e=>{[...te].forEach((t=>{if(t.origin&&c(e,t)){const e=t.origin.key;if(e){const r={left:t.left,top:t.top,...i,hoverCursor:"default"};let s="koumai";"yemai"===e&&(s=e),"humai"===e&&(s="circle"),l.push(o(s,{...n[e]||{},...r}))}}}))})),setTimeout((()=>{L.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ne.add(e)}))}))}function re(e,t,s){var u;const{type:c,riseStyle:f={},noRiseStyle:h={},verifiedStyle:g={},reduceStyle:v={},pacemaker:y={},upArrowStyle:m={},limitValueStyle:x={},nonePainPointStyle:b={},dataList:j=[]}=s,{type:Y,textStyle:M,showConnectLine:O=!1}=b,A=[],C=[],I=[];null==(u=e.list)||u.forEach(((u,b)=>{const T=a(c)?j.find((e=>e.key===u.key)):e,R=ue(u,s),X={};X.value=function(e,t,n){if(!(null==e?void 0:e.length)||!K.showValue)return;const{lineAttr:i={}}=n,o=e[1]<=q.originY+z?e[1]+z:e[1]-z,r=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:i.stroke||"#000"});return I.push(r),{obj:r,top:-z}}(R,u,T),function(e,t,s,a,u){var d,y;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(c))return;const{lineAttr:m={}}=s,{value:x}=a;let b,j,L,k,S,Y;if(t.noRise&&h.show){const t=w(h)?E(u.type,u.list,35):e[1];if(h.text)L=l([e[0],w(h)?t:t+5],{value:h.text.split("").join("\n"),originY:"top",...h.style||{}}),I.push(L);else{const n=t+2*z;k=r([e[0],t,n],h.style||{}),I.push(k)}}t.rise&&f.show&&f.text&&(S=l([e[0],e[1]-(x?z:0)-5],{value:f.text.split("").join("\n"),originY:"bottom",...f.style||{}}),I.push(S));t.verified&&(Y=l([e[0],e[1]-(x?z:0)-5],{value:"v",originX:"center",originY:"bottom",...g}),I.push(Y));if(p(t.physicsReduce)||p(t.drugReduce)){const l=E(c,u.list,null!=(d=t.physicsReduce)?d:t.drugReduce);b=n([...e,e[0],l],{...m,...v.line,...i}),j=o((null==(y=null==v?void 0:v.point)?void 0:y.type)||"circle",{left:e[0],top:l,...v.point,...i,originY:l===N?"bottom":"center"}),b&&I.push(b),j&&I.push(j)}Object.assign(a,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:L,top:5,isFixed:w(h)},arrowGroup:{obj:k,top:2*z,isFixed:w(h)},riseText:{obj:S,top:(x?-z:0)-5},verifiedText:{obj:Y,top:(x?-z:0)-5},reducePoint:{obj:j,type:"reduce"}})}(R,u,T,X,s),function(e,t,n,i){if(!(null==e?void 0:e.length)||!["pulse"].includes(c))return;let o,a;const{upArrowShow:u=!1,limitValueShow:p=!1}=n;if(u&&+t.value>180){let t=e[1]-2.5*z,n=[e[1]-z/2,t];t<q.originY&&(t=e[1]+2.5*z,n=[t,e[1]+z/2]),o=r([e[0],n[0],n[1]],m,"up"),I.push(o)}if(p){const n={value:t.value,originX:"center",originY:"center",...x};if(+t.value>Math.max(...s.list)){const t=o?e[1]+z/2+o.height:e[1]+z;a=l([e[0],t],n),I.push(a)}+t.value<Math.min(...s.list)&&(a=l([e[0],e[1]-z],n),I.push(a))}Object.assign(i,{upArrow:{obj:o},limitValue:{obj:a,top:-z}})}(R,u,T,X),function(i,l,r,a,u){let p,f;const{pointAttr:h={},lineAttr:g={},title:v="",key:m,type:x="circle"}=a,b=e.list[r+1],j=ue(b,s),w=se(c,e.list[r].value),E=j&&se(c,b.value);i&&j&&!l.breakpoint&&(!w&&!E||O)&&i[0]!==j[0]&&(f=n([...i,...j],{...g}));const I=l.pacemakerShow&&"pulse"==c?y.value:w&&"number"===Y?0:x,T=C[r-1],R={origin:{data:l,title:v,key:m||"",unit:s.unit,type:c,_type:d(v,c),dataIndex:t,index:r},leftLine:T,rightLine:f,otherObj:u,lockMovementX:!0,...l.pacemakerShow&&"pulse"==c?y.style:h,...k.event.hovered?k.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:k.event,...w?{selectable:!1,evented:!1,..."number"===Y?M:{}}:{}};if(T){const e=T.get("y2");p=o(I,{left:T.get("x2"),top:w?e-5:e,...R})}else i&&(R.leftLine=null,p=o(I,{left:i[0],top:w?i[1]-5:i[1],...R}));C.push(f),p&&(v.includes("脉搏")?ee.add(p):te.add(p),function(e){W.hovered&&(e.on("mouseover",(()=>{ae(e,"hover")})),e.on("mouseout",(()=>{P.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?B:q;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,n;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(n=e.rightLine)||n.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:n,type:i="",top:o=0,isFixed:l}=t||{};"reduce"!==i&&("line"===i?null==n||n.setCoords().set({x1:e.left,y1:e.top}):!l&&(null==n||n.setCoords().set({left:e.left,top:e.top+o})))})),oe(e)}(e),W.hovered&&ae(e)})),e.on("mouseup",(t=>{if(P.show=!1,1===t.button){const{type:t}=e.origin,n=$(t,e.top),i={...e.origin,data:{...e.origin.data,value:n}};L.value.discardActiveObject(),S("change",i),pe(i,"change")}}))}(p),A.push(p),ne.add(p))}(R,u,b,T,X)})),"pulse"===c&&U.forEach((e=>{Z.set(e,A.filter((t=>{var n;return(null==(n=t.origin)?void 0:n.key)===e})).map((e=>[e.left,e.top])))})),Promise.all(A).then((e=>{const t=C.filter((e=>e));let n=null;e=e.map((e=>(e&&n&&(n.nextPoint=e,e.prevPoint=n),n=e||n,e))),Promise.all(I).then((n=>{L.value.add(...t,...e,...n),e.forEach((t=>{null==t||t.bringToFront(),function(e,t){if("pulse"===e.origin.type){t.filter((t=>t.left===e.left&&"pulse"===t.origin.type)).length>1&&(e.leftLine&&L.value.remove(e.leftLine),e.rightLine&&L.value.remove(e.rightLine))}}(t,e)}))}))}))}function se(e,t){return"pain"===e&&0==t}function ae(e,t="moving"){const{title:n,unit:i,type:o,data:l}=e.origin;P.point={x:e.left,y:e.top},P.list=[function(){const{drugReduce:r,physicsReduce:s}=l||{},a="hover"===t?l.value:$(o,e.top);if(p(r))return`药物降${"pain"==o?"痛":"温"} ${a}—>${r}${i||""}`;if(p(s))return`物理降${"pain"==o?"痛":"温"} ${a}—>${s}${i||""}`;return`${n} ${a}${i||""}`}(),`时间 ${((null==l?void 0:l.time)||M(e.left)).slice(-5)}`],P.show=!0}function ue(e,t){const n="pain"===t.type?B:q;if(f(e)&&function(e){const[t]=X,n=X.at(-1),i=t.start,o=n.end,l=h(e);return l>=i&&l<=o}(e.time)){const i=Y(e.time),o=E(t.type,t.list,e.value);return[i,o<n.originY?n.originY:o>n.endY?n.endY:o]}}function ce(e){const t=new Date,n=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),o=h(`${t.getFullYear()}-${n}-${i} 23:59:59`),l=h(`${M(e)}:00`);return J&&l<h(J)?(I("exceedMin"),!1):!(l>o)||(I("exceedMax"),!1)}function pe(e,t="add"){const{type:n,dataIndex:i,index:o,data:l,key:r}=e,s=ie.find((e=>e.type===n));if("add"===t){const e=a(n)?s.dataList.find((e=>e.enable)):s.dataList[i],t=g(l.time,e.list);e.list.splice(t,0,l)}else s.dataList[i].list[o]=l;de()}function de(){var e;ne.size&&(null==(e=L.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...ne]))),Z.clear(),ne.clear(),ee.clear(),te.clear(),ie.forEach((e=>{e.dataList.forEach(((t,n)=>{a(e.type)&&!t.enable||re(t,n,e)}))})),oe(),le()}return Z.clear(),ee.clear(),te.clear(),ie.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=E(e.type,e.list,e.positionLine.value),i=n([D,t,V,t],e.positionLine);L.value.add(i)}(e),e.dataList.forEach(((t,n)=>{a(e.type)&&!t.enable||re(t,n,e)}))})),oe(),le(),k.event.evented&&L.value.on("mouse:up",(e=>{var t;if(3===e.button){const{x:n=0,y:i=0}=e.pointer||{};if(n>=D&&n<=V&&i>=_&&i<=G){A.point={x:n,y:i},A.show=!0;const{type:o}=(null==(t=e.target)?void 0:t.origin)||{};if(e.target&&["temperature","pain"].includes(o))"temperature"===o&&(A.list=[...x]),"pain"===o&&(A.list=[...b]),A.target=e.target;else{A.target=null,A.list=["新增节点"],H.forEach((t=>{if(!C([...ne],n,"_type").includes(t.bigType)){const n=["pain"].includes(t.bigType)?B:q;i>=n.originY&&i<=n.endY&&A.list.push({renderItem:O?O(t):()=>t.title,origin:{title:t.title,unit:t.unit,type:u(t.bigType),dataIndex:t.dataIndex,key:t.key},pointer:e.pointer})}}));const t=ce(n);t&&1!==A.list.length||(A.show=!1,1===A.list.length&&t&&I("repeat"))}}}})),{clickMenu:function({item:e,target:t}){if(t){const{data:n,type:i,dataIndex:o,index:l}=t.origin,r=v(n,[...x,...b]);r[`${e.type}`]=e.value,a(i)&&(r.key=t.origin.key);const s={...t.origin,data:r};S("change",s),pe(s,"change")}else{const t={data:{time:M(e.pointer.x),value:$(e.origin.type,e.pointer.y),...a(e.origin.type)?{key:e.origin.key}:{}},...e.origin};S("add",t),pe(t)}},setPopup:ae,isAddPoint:ce,updateData:pe,redrawPoints:de,gridPoints:ne}}function w(e){return"fixed"===e.position}export{L as useCenter};
@@ -1 +1 @@
1
- import{defineComponent as e,watch as t,computed as u,createVNode as n,ref as l}from"vue";import{connect as i,mapProps as o}from"@formily/vue";import{isString as a,isNumber as r}from"lodash-es";import{NInputNumber as s,NInput as v}from"naive-ui";import{useCommonInjection as c}from"../../hooks/useCommonInjection.js";import{createInputSlot as p,parseNumberFromMaybeString as f}from"../../utils/index.js";import{assignUpdateValue as m,assignClearBindVisited as d}from"../../utils/schema.js";const y=i(e({props:{value:{type:[Number,String]},onChange:{type:Function,required:!0},prefix:{type:[String,Function,Object]},suffix:{type:[String,Function,Object]}},setup(e){const l=p(e);function i(t){var u;null==(u=e.onChange)||u.call(e,t)}c().injectValueValidate((()=>e.value)),t((()=>e.value),(e=>{if(null!=e)return!a(e)&&!r(e)||Number.isNaN(+e)?i(null):void i(+e)}));const o=u({get:()=>f(e.value),set:i}),v=c().injectValueBindKey(o);return()=>n(s,{key:v.value,value:o.value,"onUpdate:value":e=>o.value=e,"show-button":!1},l.value)}}),o(m,d)),g=i(e({props:{value:{type:[Number,String]},onChange:{type:Function,required:!0},prefix:{type:[String,Function,Object]},suffix:{type:[String,Function,Object]},precision:{type:Number}},setup(e){const i=l(),o=u({get:()=>i.value,set(e){if(r(e))return i.value=e+"";a(e)&&(i.value=e.endsWith("/")?"/":e)}});function s(t){e.onChange(t)}function p(e=-1){const t=r(+e)&&e>=0?+e:null;return new RegExp(`^-?(0|[1-9][0-9]*)?${0===t?"":`(\\.[0-9]${r(t)?`{0,${t}}`:"*"})?`}$`)}t((()=>e.value),(e=>o.value=e),{immediate:!0});const f=p(),m=u((()=>p(e.precision)));function d(e){return!(null!=e&&""!==e&&"/"!==e&&a(e)&&!e.endsWith("/"))||m.value.test(e)&&"-."!==e&&!e.startsWith(".")}function y(){if(a(o.value)&&"-"!==o.value)if("/"===o.value)s(o.value);else if(f.test(o.value)){const e=o.value.endsWith(".")?o.value.slice(0,-1):o.value;s(o.value=e)}else o.value=e.value;else o.value=e.value}const g=c().injectValueBindKey(o);return()=>n(v,{value:o.value,"onUpdate:value":e=>o.value=e,key:g.value,"allow-input":d,onBlur:y},null)}}),o(m,d));export{y as INPUT_NUMBER,g as INPUT_NUMBER_SLASH};
1
+ import{defineComponent as e,watch as n,computed as t,createVNode as u,ref as l}from"vue";import{connect as i,mapProps as a}from"@formily/vue";import{isString as o,isNumber as r}from"lodash-es";import{NInputNumber as s,NInput as v}from"naive-ui";import{useCommonInjection as p}from"../../hooks/useCommonInjection.js";import{createInputSlot as c,parseNumberFromMaybeString as m}from"../../utils/index.js";import{assignUpdateValue as f,assignClearBindVisited as g}from"../../utils/schema.js";const d=i(e({props:{value:{type:[Number,String]},onChange:{type:Function,required:!0},prefix:{type:[String,Function,Object]},suffix:{type:[String,Function,Object]}},setup(e){const l=c(e);p().injectValueValidate((()=>e.value)),n((()=>e.value),(n=>{if(null!=n)return!o(n)&&!r(n)||Number.isNaN(+n)?e.onChange(null):void e.onChange(+n)}));const i=t({get:()=>m(e.value),set:n=>{var t;return null==(t=e.onChange)?void 0:t.call(e,n)}}),a=p().injectValueBindKey(i);return()=>u(s,{key:a.value,value:i.value,"onUpdate:value":e=>i.value=e,"show-button":!1},l.value)}}),a(f,g)),h=i(e({props:{value:{type:[Number,String]},onChange:{type:Function,required:!0},prefix:{type:[String,Function,Object]},suffix:{type:[String,Function,Object]},precision:{type:Number}},setup(e){const i=l(),a=t({get:()=>i.value,set(e){if(r(e))return i.value=e+"";o(e)&&(i.value=e.endsWith("/")?"/":e)}});function s(e=-1){const n=r(+e)&&e>=0?+e:null;return new RegExp(`^-?(0|[1-9][0-9]*)?${0===n?"":`(\\.[0-9]${r(n)?`{0,${n}}`:"*"})?`}$`)}n((()=>e.value),(e=>a.value=e),{immediate:!0});const c=s(),m=t((()=>s(e.precision)));function f(e){return!(null!=e&&""!==e&&"/"!==e&&o(e)&&!e.endsWith("/"))||m.value.test(e)&&"-."!==e&&!e.startsWith(".")}function g(){if(o(a.value)&&"-"!==a.value)if("/"===a.value)e.onChange(a.value);else if(c.test(a.value)){const n=a.value.endsWith(".")?a.value.slice(0,-1):a.value;e.onChange(a.value=n)}else a.value=e.value;else a.value=e.value}const d=p().injectValueBindKey(a);return()=>u(v,{value:a.value,"onUpdate:value":e=>a.value=e,key:d.value,"allow-input":f,onBlur:g},null)}}),a(f,g));export{d as INPUT_NUMBER,h as INPUT_NUMBER_SLASH};
@@ -1 +1 @@
1
- import{defineComponent as e,inject as l,computed as a,ref as t,onDeactivated as u,openBlock as r,createElementBlock as o,unref as i,createBlock as n,createCommentVNode as v,createElementVNode as c,createVNode as s,isRef as d,withCtx as p,normalizeStyle as f,Fragment as m,renderList as h,toDisplayString as y,createTextVNode as _}from"vue";import{keywordMatcher as b,widthAppend as k}from"../../../../../shared/utils/index.js";import{useVirtualList as g}from"@vueuse/core";import{isNumber as L,isString as C}from"lodash-es";import{NInput as S,NCheckbox as w,NCheckboxGroup as x,NButtonGroup as D,NButton as I}from"naive-ui";const U={class:"iho-table__filterWrapper"},Y={class:"iho-table__filterCheckAllWrapper"},$={class:"iho-table__filterListItem"},W={class:"iho-table__filterListItem"},j=["title"],E={class:"iho-table__filterFooter"};var F=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const F=e,O=l("$xetable"),P=a((()=>{var e,l,a;return null!=(a=null==(l=null==(e=F.payload)?void 0:e.column)?void 0:l.filters)?a:[]})),q=a({get:()=>P.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(!F.payload)return;if(P.value.forEach((l=>{F.payload.$panel.changeOption(null,e.includes(l.value),l)})),!O)return t();const{startIndex:l,endIndex:a}=O.internalData.scrollYStore;function t(){F.payload.$panel.confirmFilter(new CustomEvent("click"))}0===l&&1===a||O.reactData.scrollYLoad?t():(O.reactData.scrollYLoad=!0,t(),O.reactData.scrollYLoad=!1)}}),z=t([...q.value]),A=t("");function H(){O&&(O.reactData.filterStore.visible=!1)}u(H);const R=a((()=>{var e,l;if(!F.payload||!F.payload.column)return 10;const{filterCapacity:a}=null!=(l=null==(e=F.payload.column.editRender)?void 0:e.props)?l:{};return L(a)&&a>0?a:10})),B=a((()=>A.value?P.value.filter((e=>!!`${e.label}`.includes(A.value)||(C(e.data)?b(A.value,e.data):void 0))):P.value)),{list:G,containerProps:J,wrapperProps:K}=g(B,{itemHeight:32,overscan:3}),M=a({get:()=>B.value.every((e=>z.value.includes(e.value))),set(e){z.value=e?[...new Set([...z.value,...B.value.map((e=>e.value))])]:z.value.filter((e=>!B.value.some((l=>l.value!==e))))}}),N=a((()=>B.value.some((e=>z.value.includes(e.value)))&&!M.value)),Q=a({get:()=>z.value.length===P.value.length&&0!==P.value.length,set:e=>{z.value=e?P.value.map((e=>e.value)):[]}}),T=a((()=>!!z.value.length&&!Q.value)),V=a((()=>({...J.style,height:k(32*R.value)})));function X(){q.value=z.value,H()}function Z(){z.value=[]}return(e,l)=>(r(),o("section",U,[i(P).length>5?(r(),n(i(S),{key:0,value:A.value,"onUpdate:value":l[0]||(l[0]=e=>A.value=e)},null,8,["value"])):v("v-if",!0),c("div",Y,[c("div",$,[s(i(w),{label:"全选当前",checked:i(M),"onUpdate:checked":l[1]||(l[1]=e=>d(M)?M.value=e:null),indeterminate:i(N)},null,8,["checked","indeterminate"])]),c("div",W,[s(i(w),{label:"全选所有",checked:i(Q),"onUpdate:checked":l[2]||(l[2]=e=>d(Q)?Q.value=e:null),indeterminate:i(T)},null,8,["checked","indeterminate"])])]),s(i(x),{value:z.value,"onUpdate:value":l[4]||(l[4]=e=>z.value=e)},{default:p((()=>[c("section",{ref:i(J).ref,style:f(i(V)),onScroll:l[3]||(l[3]=(...e)=>i(J).onScroll&&i(J).onScroll(...e)),class:"iho-table__filterListWrapper"},[c("section",{style:f(i(K).style)},[(r(!0),o(m,null,h(i(G),(e=>(r(),o("div",{class:"iho-table__filterListItem",key:e.data.value},[s(i(w),{value:e.data.value},{default:p((()=>[c("div",{style:{"white-space":"nowrap"},title:e.data.label},y(e.data.label),9,j)])),_:2},1032,["value"])])))),128))],4)],36)])),_:1},8,["value"]),c("footer",E,[c("section",null,[_(" 已选择 "),c("span",{style:f({color:"var(--c-primary-color)"})},y(z.value.length),5),_(" 项 ")]),s(i(D),{size:"small"},{default:p((()=>[s(i(I),{onClick:Z},{default:p((()=>[_("清空")])),_:1}),s(i(I),{onClick:H},{default:p((()=>[_("取消")])),_:1}),s(i(I),{type:"primary",onClick:X},{default:p((()=>[_("确定")])),_:1})])),_:1})])]))}});export{F as default};
1
+ import{defineComponent as e,inject as l,computed as a,ref as t,onDeactivated as u,openBlock as r,createElementBlock as i,unref as o,createBlock as n,createCommentVNode as v,createElementVNode as c,createVNode as s,isRef as d,withCtx as p,normalizeStyle as f,Fragment as m,renderList as h,toDisplayString as _,createTextVNode as y}from"vue";import{keywordMatcher as b,widthAppend as k}from"../../../../../shared/utils/index.js";import{useVirtualList as g}from"@vueuse/core";import{isNumber as L,isString as C}from"lodash-es";import{NInput as I,NCheckbox as S,NCheckboxGroup as x,NButtonGroup as D,NButton as U}from"naive-ui";const Y={class:"iho-table__filterWrapper"},$={class:"iho-table__filterCheckAllWrapper"},w={class:"iho-table__filterListItem"},W={class:"iho-table__filterListItem"},j=["title"],E={class:"iho-table__filterFooter"};var F=e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const F=e,O=l("$xetable"),P=a((()=>{var e,l,a;return null!=(a=null==(l=null==(e=F.payload)?void 0:e.column)?void 0:l.filters)?a:[]})),q=a({get:()=>P.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(!F.payload)return;if(P.value.forEach((l=>{F.payload.$panel.changeOption(null,e.includes(l.value),l)})),!O)return t();const{startIndex:l,endIndex:a}=O.internalData.scrollYStore;function t(){F.payload.$panel.confirmFilter(new CustomEvent("click"))}0===l&&1===a||O.reactData.scrollYLoad?t():(O.reactData.scrollYLoad=!0,t(),O.reactData.scrollYLoad=!1)}}),z=t([...q.value]),A=t("");function H(){O&&(O.reactData.filterStore.visible=!1)}u(H);const R=a((()=>{var e,l;if(!F.payload||!F.payload.column)return 10;const{filterCapacity:a}=null!=(l=null==(e=F.payload.column.editRender)?void 0:e.props)?l:{};return L(a)&&a>0?a:10})),B=a((()=>A.value?P.value.filter((e=>!!`${e.label}`.includes(A.value)||(C(e.data)?b(A.value,e.data):void 0))):P.value)),{list:G,containerProps:J,wrapperProps:K}=g(B,{itemHeight:32,overscan:3}),M=a({get:()=>B.value.every((e=>z.value.includes(e.value))),set(e){z.value=e?[...new Set([...z.value,...B.value.map((e=>e.value))])]:z.value.filter((e=>!B.value.some((l=>l.value!==e))))}}),N=a((()=>B.value.some((e=>z.value.includes(e.value)))&&!M.value)),Q=a({get:()=>z.value.length===P.value.length&&0!==P.value.length,set:e=>{z.value=e?P.value.map((e=>e.value)):[]}}),T=a((()=>!!z.value.length&&!Q.value)),V=a((()=>({...J.style,height:k(32*R.value)})));function X(){q.value=z.value,H()}function Z(){z.value=[]}return(e,l)=>(r(),i("section",Y,[o(P).length>5?(r(),n(o(I),{key:0,value:A.value,"onUpdate:value":l[0]||(l[0]=e=>A.value=e)},null,8,["value"])):v("v-if",!0),c("div",$,[c("div",w,[s(o(S),{label:"全选当前",checked:o(M),"onUpdate:checked":l[1]||(l[1]=e=>d(M)?M.value=e:null),indeterminate:o(N)},null,8,["checked","indeterminate"])]),c("div",W,[s(o(S),{label:"全选所有",checked:o(Q),"onUpdate:checked":l[2]||(l[2]=e=>d(Q)?Q.value=e:null),indeterminate:o(T)},null,8,["checked","indeterminate"])])]),s(o(x),{value:z.value,"onUpdate:value":l[4]||(l[4]=e=>z.value=e)},{default:p((()=>[c("section",{ref:o(J).ref,style:f(o(V)),onScroll:l[3]||(l[3]=(...e)=>o(J).onScroll&&o(J).onScroll(...e)),class:"iho-table__filterListWrapper"},[c("section",{style:f(o(K).style)},[(r(!0),i(m,null,h(o(G),(e=>(r(),i("div",{class:"iho-table__filterListItem",key:e.data.value},[s(o(S),{value:e.data.value},{default:p((()=>[c("div",{class:"iho-table__filterListItemContent",title:e.data.label},_(e.data.label),9,j)])),_:2},1032,["value"])])))),128))],4)],36)])),_:1},8,["value"]),c("footer",E,[c("section",null,[y(" 已选择 "),c("span",{style:f({color:"var(--c-primary-color)"})},_(z.value.length),5),y(" 项 ")]),s(o(D),{size:"small"},{default:p((()=>[s(o(U),{onClick:Z},{default:p((()=>[y("清空")])),_:1}),s(o(U),{onClick:H},{default:p((()=>[y("取消")])),_:1}),s(o(U),{type:"primary",onClick:X},{default:p((()=>[y("确定")])),_:1})])),_:1})])]))}});export{F as default};
@@ -1 +1 @@
1
- .iho-table{height:100%}.iho-table .vxe-body--column.col--drag{cursor:move}.iho-table .vxe-table.size--mini{font-size:14px}.iho-table .vxe-table.size--mini .vxe-body--column:not(.col--ellipsis),.iho-table .vxe-table.size--mini .vxe-footer--column:not(.col--ellipsis),.iho-table .vxe-table.size--mini .vxe-header--column:not(.col--ellipsis){padding:4px 0}.iho-table .vxe-table.size--mini .vxe-sort--asc-btn{top:-2px}.iho-table .vxe-table.size--mini .vxe-sort--desc-btn{bottom:0}.iho-table__headerWrapper{display:inline-flex;flex-wrap:nowrap}.iho-table__boldCell{font-weight:700}.iho-table .vxe-table .vxe-table--header-wrapper,.iho-table .vxe-table.vxe-table--render-default{color:#212121}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar{background-color:transparent;height:10px;width:10px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#b2b2b2;border:3px dashed transparent;border-radius:5px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb:hover{background:#b2b2b2}.iho-table .vxe-table--empty-content{height:100%;width:100%}.iho-table .vxe-table--empty-content>div,.iho-table .vxe-tree-cell{height:100%}.iho-table .vxe-table--header{background-color:#f2f2f2}.iho-table .vxe-table--header .checkbox-cell--disable{border:2px solid #c0c4cc;border-radius:50%;box-sizing:border-box;cursor:not-allowed;display:inline-block;height:18px;left:-2px;position:relative;top:3px;width:18px}.iho-table .vxe-table--header .checkbox-cell--disable:before{background-color:#c0c4cc;content:"";height:16px;left:50%;position:absolute;top:-2px;transform:translate(-60%) rotate(-45deg);width:2px}.iho-table .vxe-footer--row .vxe-footer--column>.vxe-cell .vxe-cell--item{height:30px;line-height:30px}.iho-table .vxe-table--render-default .vxe-body--column.col--selected{box-shadow:inset 0 0 0 2px var(--c-primary-color)}.iho-table .vxe-table--render-default .vxe-body--row.row--hover,.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--stripe{background-color:var(--c-hover-color)}.iho-table .vxe-table--render-default .vxe-body--row.row--checked,.iho-table .vxe-table--render-default .vxe-body--row.row--current,.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--checked,.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--current,.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--radio,.iho-table .vxe-table--render-default .vxe-body--row.row--radio{background-color:var(--c-primary-color-opacity2);text-shadow:0 0 1px}.iho-table .vxe-body--expanded-column,.iho-table .vxe-table--border-line{border-color:var(--c-border-color)!important}.iho-table .vxe-table--footer-wrapper{border-top-color:var(--c-border-color)!important}.iho-table .border--default .vxe-body--column,.iho-table .border--default .vxe-footer--column,.iho-table .border--default .vxe-header--column,.iho-table .border--inner .vxe-body--column,.iho-table .border--inner .vxe-footer--column,.iho-table .border--inner .vxe-header--column{background-image:linear-gradient(var(--c-border-color),var(--c-border-color))!important}.iho-table .border--full .vxe-body--column,.iho-table .border--full .vxe-footer--column,.iho-table .border--full .vxe-header--column{background-image:linear-gradient(var(--c-border-color),var(--c-border-color)),linear-gradient(var(--c-border-color),var(--c-border-color))!important}.iho-table .border--default .vxe-header--row:last-child .vxe-header--gutter,.iho-table .border--full .vxe-header--row:last-child .vxe-header--gutter,.iho-table .border--inner .vxe-header--row:last-child .vxe-header--gutter,.iho-table .border--outer .vxe-header--row:last-child .vxe-header--gutter{background-image:linear-gradient(var(--c-border-color),var(--c-border-color))!important}.iho-table .vxe-table--header-border-line{border-bottom-color:var(--c-border-color)!important}.iho-table .vxe-table--fixed-left-wrapper.scrolling--middle{box-shadow:7px 0 8px -3px rgba(0,0,0,.15)!important}.iho-table .vxe-table--fixed-right-wrapper.scrolling--middle{box-shadow:-7px 0 8px -3px rgba(0,0,0,.15)!important}.iho-table .icon-dot{background:var(--table-icon-color);box-shadow:0 2px 4px 0 var(--table-icon-shadow)}.iho-table .icon-dot,.iho-table .icon-dot-red{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-red{background:red;box-shadow:0 2px 4px 0 rgba(255,0,0,.5)}.iho-table .icon-dot-blue{background:blue;box-shadow:0 2px 4px 0 rgba(0,0,255,.5)}.iho-table .icon-dot-blue,.iho-table .icon-dot-green{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-green{background:green;box-shadow:0 2px 4px 0 rgba(0,128,0,.5)}.iho-table .icon-dot-gray{background:gray;box-shadow:0 2px 4px 0 hsla(0,0%,50%,.5)}.iho-table .icon-dot-gray,.iho-table .icon-dot-yellow{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-yellow{background:#ff0;box-shadow:0 2px 4px 0 rgba(255,255,0,.5)}.iho-table .icon-dot-resolved{background:#36be8c;box-shadow:0 2px 4px 0 rgba(54,190,140,.5)}.iho-table .icon-dot-huifu,.iho-table .icon-dot-resolved{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-huifu{background:#42d0f6;box-shadow:0 2px 4px 0 rgba(66,208,246,.5)}.iho-table .icon-dot-close{background:#718391;box-shadow:0 2px 4px 0 rgba(113,131,145,.5)}.iho-table .icon-dot-audit,.iho-table .icon-dot-close{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-audit{background:#f4ba32;box-shadow:0 2px 4px 0 rgba(244,186,50,.5)}.iho-table .icon-dot-design{background:#927ce1;box-shadow:0 2px 4px 0 rgba(146,124,225,.5)}.iho-table .icon-dot-design,.iho-table .icon-dot-develop{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-develop{background:#4eb0ef;box-shadow:0 2px 4px 0 rgba(78,176,239,.5)}.iho-table .icon-dot-develop-complete{background:#6381f9;border-radius:50%;box-shadow:0 2px 4px 0 rgba(99,129,249,.5);display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .is--filter-active .vxe-cell--filter .vxe-filter--btn{color:var(--c-primary-color)}.iho-table__filterIcon{cursor:pointer;padding:0 4px}.iho-table__filterIcon:hover{opacity:.7}.iho-table__filterIcon.is-active{color:var(--c-primary-color)}.iho-table__filterWrapper{display:flex;flex-direction:column;gap:8px;margin:8px 12px;width:240px}.iho-table__filterCheckAllWrapper{display:flex;justify-content:space-between}.iho-table__filterCheckAllWrapper>div{flex:1}.iho-table__filterButton{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:30px;padding:0 8px}.iho-table__filterButton--active{color:var(--c-primary-color)}.iho-table__filterButton:hover{background:rgba(0,0,0,.05)}.iho-table__filterListWrapper{border:1px solid rgba(0,0,0,.05)}.iho-table__filterListItem{align-items:center;border-radius:4px;display:flex;height:32px;padding:0 8px}.iho-table__filterListItem:hover{background:var(--c-primary-color-opacity2)}.iho-table__filterListItem .n-checkbox{width:100%}.iho-table__filterFooter{display:flex;justify-content:space-between}.iho-table__time-picker{position:unset}.iho-table__time-picker .n-input{display:none}.iho-table__time-picker .v-binder-follower-container{height:auto;position:unset}.iho-table__time-picker .v-binder-follower-container .v-binder-follower-content{position:unset;transform:none!important}.iho-table__time-picker .v-binder-follower-container .v-binder-follower-content .n-time-picker-panel{box-shadow:none}.iho-table__scrollbar{margin:8px 8px 8px 0;max-height:255px}.iho-table .variable-height .vxe-cell,.iho-table .variable-height .vxe-cell--tree-node,.iho-table .variable-height .vxe-tree-cell{max-height:fit-content!important;white-space:break-spaces!important}.iho-table__selectMenu .n-scrollbar-rail__scrollbar{display:none!important}.iho-table__selectMenu .n-virtual-list::-webkit-scrollbar,.iho-table__selectMenu .n-virtual-list::-webkit-scrollbar-thumb{display:unset!important;height:6px;width:6px}.iho-table__selectMenu .n-virtual-list::-webkit-scrollbar-thumb{background:#bfbfbf;border-radius:4px}.iho-table__selectMenu .v-vl-items{min-width:100%;width:max-content}.iho-table__selectOption .n-base-select-option__content{overflow:visible!important;text-overflow:unset!important;word-break:keep-all!important}.iho-table .is--checked.vxe-checkbox,.iho-table .is--checked.vxe-checkbox .vxe-checkbox--icon,.iho-table .is--checked.vxe-custom--option,.iho-table .is--checked.vxe-custom--option .vxe-checkbox--icon,.iho-table .is--checked.vxe-export--panel-column-option,.iho-table .is--checked.vxe-export--panel-column-option .vxe-checkbox--icon,.iho-table .is--checked.vxe-table--filter-option,.iho-table .is--checked.vxe-table--filter-option .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-checkbox,.iho-table .is--indeterminate.vxe-checkbox .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-custom--option,.iho-table .is--indeterminate.vxe-custom--option .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-export--panel-column-option,.iho-table .is--indeterminate.vxe-export--panel-column-option .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-table--filter-option,.iho-table .is--indeterminate.vxe-table--filter-option .vxe-checkbox--icon,.iho-table .vxe-checkbox:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-custom--option:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-export--panel-column-option:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-table .vxe-sort--asc-btn.sort--active,.iho-table .vxe-table .vxe-sort--desc-btn.sort--active,.iho-table .vxe-table--filter-option:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-table--render-default .is--checked.vxe-cell--checkbox,.iho-table .vxe-table--render-default .is--checked.vxe-cell--checkbox .vxe-checkbox--icon,.iho-table .vxe-table--render-default .is--indeterminate.vxe-cell--checkbox,.iho-table .vxe-table--render-default .is--indeterminate.vxe-cell--checkbox .vxe-checkbox--icon,.iho-table .vxe-table--render-default .vxe-cell--checkbox:not(.is--disabled):hover .vxe-checkbox--icon{color:var(--c-primary-color)}.iho-table .vxe-header--column [annotation-hover-show=true]{visibility:hidden}.iho-table .vxe-header--column:hover [annotation-hover-show=true]{visibility:visible}@font-face{font-family:iho-table-iconfont;src:url(iconfont.ttf) format("truetype")}.iho-table .iho-table--iconfont{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:iho-table-iconfont!important;font-size:15px;font-style:normal}.iho-table .iho-table-icon-filter{display:inline-block;font-size:17px;transform:translateY(-1px);vertical-align:middle}.iho-table .iho-table-icon-filter:before{content:"\c2001"}.iho-table .iho-table-icon-date-filter{display:inline-block;transform:translateY(-1px)}.iho-table .iho-table-icon-date-filter:before{content:"\c2002"}.iho-table .row--custom{background-color:var(--row-background-color)}.iho-table__htmlRender *{display:inline!important}.iho-table__ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
1
+ .iho-table{height:100%}.iho-table .vxe-body--column.col--drag{cursor:move}.iho-table .vxe-table.size--mini{font-size:14px}.iho-table .vxe-table.size--mini .vxe-body--column:not(.col--ellipsis),.iho-table .vxe-table.size--mini .vxe-footer--column:not(.col--ellipsis),.iho-table .vxe-table.size--mini .vxe-header--column:not(.col--ellipsis){padding:4px 0}.iho-table .vxe-table.size--mini .vxe-sort--asc-btn{top:-2px}.iho-table .vxe-table.size--mini .vxe-sort--desc-btn{bottom:0}.iho-table__headerWrapper{display:inline-flex;flex-wrap:nowrap}.iho-table__boldCell{font-weight:700}.iho-table .vxe-table .vxe-table--header-wrapper,.iho-table .vxe-table.vxe-table--render-default{color:#212121}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar{background-color:transparent;height:10px;width:10px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#b2b2b2;border:3px dashed transparent;border-radius:5px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb:hover{background:#b2b2b2}.iho-table .vxe-table--empty-content{height:100%;width:100%}.iho-table .vxe-table--empty-content>div,.iho-table .vxe-tree-cell{height:100%}.iho-table .vxe-table--header{background-color:#f2f2f2}.iho-table .vxe-table--header .checkbox-cell--disable{border:2px solid #c0c4cc;border-radius:50%;box-sizing:border-box;cursor:not-allowed;display:inline-block;height:18px;left:-2px;position:relative;top:3px;width:18px}.iho-table .vxe-table--header .checkbox-cell--disable:before{background-color:#c0c4cc;content:"";height:16px;left:50%;position:absolute;top:-2px;transform:translate(-60%) rotate(-45deg);width:2px}.iho-table .vxe-footer--row .vxe-footer--column>.vxe-cell .vxe-cell--item{height:30px;line-height:30px}.iho-table .vxe-table--render-default .vxe-body--column.col--selected{box-shadow:inset 0 0 0 2px var(--c-primary-color)}.iho-table .vxe-table--render-default .vxe-body--row.row--hover,.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--stripe{background-color:var(--c-hover-color)}.iho-table .vxe-table--render-default .vxe-body--row.row--checked,.iho-table .vxe-table--render-default .vxe-body--row.row--current,.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--checked,.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--current,.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--radio,.iho-table .vxe-table--render-default .vxe-body--row.row--radio{background-color:var(--c-primary-color-opacity2);text-shadow:0 0 1px}.iho-table .vxe-body--expanded-column,.iho-table .vxe-table--border-line{border-color:var(--c-border-color)!important}.iho-table .vxe-table--footer-wrapper{border-top-color:var(--c-border-color)!important}.iho-table .border--default .vxe-body--column,.iho-table .border--default .vxe-footer--column,.iho-table .border--default .vxe-header--column,.iho-table .border--inner .vxe-body--column,.iho-table .border--inner .vxe-footer--column,.iho-table .border--inner .vxe-header--column{background-image:linear-gradient(var(--c-border-color),var(--c-border-color))!important}.iho-table .border--full .vxe-body--column,.iho-table .border--full .vxe-footer--column,.iho-table .border--full .vxe-header--column{background-image:linear-gradient(var(--c-border-color),var(--c-border-color)),linear-gradient(var(--c-border-color),var(--c-border-color))!important}.iho-table .border--default .vxe-header--row:last-child .vxe-header--gutter,.iho-table .border--full .vxe-header--row:last-child .vxe-header--gutter,.iho-table .border--inner .vxe-header--row:last-child .vxe-header--gutter,.iho-table .border--outer .vxe-header--row:last-child .vxe-header--gutter{background-image:linear-gradient(var(--c-border-color),var(--c-border-color))!important}.iho-table .vxe-table--header-border-line{border-bottom-color:var(--c-border-color)!important}.iho-table .vxe-table--fixed-left-wrapper.scrolling--middle{box-shadow:7px 0 8px -3px rgba(0,0,0,.15)!important}.iho-table .vxe-table--fixed-right-wrapper.scrolling--middle{box-shadow:-7px 0 8px -3px rgba(0,0,0,.15)!important}.iho-table .icon-dot{background:var(--table-icon-color);box-shadow:0 2px 4px 0 var(--table-icon-shadow)}.iho-table .icon-dot,.iho-table .icon-dot-red{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-red{background:red;box-shadow:0 2px 4px 0 rgba(255,0,0,.5)}.iho-table .icon-dot-blue{background:blue;box-shadow:0 2px 4px 0 rgba(0,0,255,.5)}.iho-table .icon-dot-blue,.iho-table .icon-dot-green{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-green{background:green;box-shadow:0 2px 4px 0 rgba(0,128,0,.5)}.iho-table .icon-dot-gray{background:gray;box-shadow:0 2px 4px 0 hsla(0,0%,50%,.5)}.iho-table .icon-dot-gray,.iho-table .icon-dot-yellow{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-yellow{background:#ff0;box-shadow:0 2px 4px 0 rgba(255,255,0,.5)}.iho-table .icon-dot-resolved{background:#36be8c;box-shadow:0 2px 4px 0 rgba(54,190,140,.5)}.iho-table .icon-dot-huifu,.iho-table .icon-dot-resolved{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-huifu{background:#42d0f6;box-shadow:0 2px 4px 0 rgba(66,208,246,.5)}.iho-table .icon-dot-close{background:#718391;box-shadow:0 2px 4px 0 rgba(113,131,145,.5)}.iho-table .icon-dot-audit,.iho-table .icon-dot-close{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-audit{background:#f4ba32;box-shadow:0 2px 4px 0 rgba(244,186,50,.5)}.iho-table .icon-dot-design{background:#927ce1;box-shadow:0 2px 4px 0 rgba(146,124,225,.5)}.iho-table .icon-dot-design,.iho-table .icon-dot-develop{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-develop{background:#4eb0ef;box-shadow:0 2px 4px 0 rgba(78,176,239,.5)}.iho-table .icon-dot-develop-complete{background:#6381f9;border-radius:50%;box-shadow:0 2px 4px 0 rgba(99,129,249,.5);display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .is--filter-active .vxe-cell--filter .vxe-filter--btn{color:var(--c-primary-color)}.iho-table__filterIcon{cursor:pointer;padding:0 4px}.iho-table__filterIcon:hover{opacity:.7}.iho-table__filterIcon.is-active{color:var(--c-primary-color)}.iho-table__filterWrapper{display:flex;flex-direction:column;gap:8px;margin:8px 12px;width:240px}.iho-table__filterCheckAllWrapper{display:flex;justify-content:space-between}.iho-table__filterCheckAllWrapper>div{flex:1}.iho-table__filterButton{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:30px;padding:0 8px}.iho-table__filterButton--active{color:var(--c-primary-color)}.iho-table__filterButton:hover{background:rgba(0,0,0,.05)}.iho-table__filterListWrapper{border:1px solid rgba(0,0,0,.05)}.iho-table__filterListItem{align-items:center;border-radius:4px;display:flex;height:32px;padding:0 8px}.iho-table__filterListItem:hover{background:var(--c-primary-color-opacity2)}.iho-table__filterListItem .n-checkbox{width:100%}.iho-table__filterListItemContent{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:190px}.iho-table__filterFooter{display:flex;justify-content:space-between}.iho-table__time-picker{position:unset}.iho-table__time-picker .n-input{display:none}.iho-table__time-picker .v-binder-follower-container{height:auto;position:unset}.iho-table__time-picker .v-binder-follower-container .v-binder-follower-content{position:unset;transform:none!important}.iho-table__time-picker .v-binder-follower-container .v-binder-follower-content .n-time-picker-panel{box-shadow:none}.iho-table__scrollbar{margin:8px 8px 8px 0;max-height:255px}.iho-table .variable-height .vxe-cell,.iho-table .variable-height .vxe-cell--tree-node,.iho-table .variable-height .vxe-tree-cell{max-height:fit-content!important;white-space:break-spaces!important}.iho-table__selectMenu .n-scrollbar-rail__scrollbar{display:none!important}.iho-table__selectMenu .n-virtual-list::-webkit-scrollbar,.iho-table__selectMenu .n-virtual-list::-webkit-scrollbar-thumb{display:unset!important;height:6px;width:6px}.iho-table__selectMenu .n-virtual-list::-webkit-scrollbar-thumb{background:#bfbfbf;border-radius:4px}.iho-table__selectMenu .v-vl-items{min-width:100%;width:max-content}.iho-table__selectOption .n-base-select-option__content{overflow:visible!important;text-overflow:unset!important;word-break:keep-all!important}.iho-table .is--checked.vxe-checkbox,.iho-table .is--checked.vxe-checkbox .vxe-checkbox--icon,.iho-table .is--checked.vxe-custom--option,.iho-table .is--checked.vxe-custom--option .vxe-checkbox--icon,.iho-table .is--checked.vxe-export--panel-column-option,.iho-table .is--checked.vxe-export--panel-column-option .vxe-checkbox--icon,.iho-table .is--checked.vxe-table--filter-option,.iho-table .is--checked.vxe-table--filter-option .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-checkbox,.iho-table .is--indeterminate.vxe-checkbox .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-custom--option,.iho-table .is--indeterminate.vxe-custom--option .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-export--panel-column-option,.iho-table .is--indeterminate.vxe-export--panel-column-option .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-table--filter-option,.iho-table .is--indeterminate.vxe-table--filter-option .vxe-checkbox--icon,.iho-table .vxe-checkbox:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-custom--option:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-export--panel-column-option:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-table .vxe-sort--asc-btn.sort--active,.iho-table .vxe-table .vxe-sort--desc-btn.sort--active,.iho-table .vxe-table--filter-option:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-table--render-default .is--checked.vxe-cell--checkbox,.iho-table .vxe-table--render-default .is--checked.vxe-cell--checkbox .vxe-checkbox--icon,.iho-table .vxe-table--render-default .is--indeterminate.vxe-cell--checkbox,.iho-table .vxe-table--render-default .is--indeterminate.vxe-cell--checkbox .vxe-checkbox--icon,.iho-table .vxe-table--render-default .vxe-cell--checkbox:not(.is--disabled):hover .vxe-checkbox--icon{color:var(--c-primary-color)}.iho-table .vxe-header--column [annotation-hover-show=true]{visibility:hidden}.iho-table .vxe-header--column:hover [annotation-hover-show=true]{visibility:visible}@font-face{font-family:iho-table-iconfont;src:url(iconfont.ttf) format("truetype")}.iho-table .iho-table--iconfont{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:iho-table-iconfont!important;font-size:15px;font-style:normal}.iho-table .iho-table-icon-filter{display:inline-block;font-size:17px;transform:translateY(-1px);vertical-align:middle}.iho-table .iho-table-icon-filter:before{content:"\c2001"}.iho-table .iho-table-icon-date-filter{display:inline-block;transform:translateY(-1px)}.iho-table .iho-table-icon-date-filter:before{content:"\c2002"}.iho-table .row--custom{background-color:var(--row-background-color)}.iho-table__htmlRender *{display:inline!important}.iho-table__ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}