cnhis-design-vue 3.1.53-release.3 → 3.1.54-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/callback/src/components/render/popupMaps.d.ts +2 -0
- package/es/components/fabric-chart/index.d.ts +8 -9
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +8 -9
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.d.ts +6 -0
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -0
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +11 -0
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -0
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.d.ts +9 -0
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -0
- package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +1 -1
- package/es/components/field-set/index.d.ts +12 -2
- package/es/components/field-set/src/FieldSet.vue.d.ts +13 -3
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +2 -3
- package/es/components/field-set/src/components/Row.vue2.js +1 -1
- package/es/components/field-set/src/types/index.d.ts +1 -0
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +3 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +4 -0
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -0
- package/es/components/form-render/index.d.ts +1 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +2 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/inputNumber.js +1 -1
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +7 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +4 -3
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/utils/business.js +1 -1
- package/es/components/iho-table/index.d.ts +1 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -1
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +13 -8
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +3 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +17 -13
- package/es/components/info-header/src/InfoHeader.vue2.js +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +1 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +1 -0
- package/es/components/shortcut-provider/index.d.ts +1 -0
- package/es/components/shortcut-provider/src/ShortcutProvider.vue.d.ts +2 -0
- package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +2 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +8 -5
- package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +1 -1
- package/es/shared/hooks/index.d.ts +1 -0
- package/es/shared/hooks/index.js +1 -1
- package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +8 -3
- package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -1
- package/es/shared/hooks/useVersion.d.ts +3 -0
- package/es/shared/hooks/useVersion.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -687,6 +687,7 @@ export declare const CallbackMaps: Map<string, {
|
|
|
687
687
|
decoratorElement: HTMLElement | null | undefined;
|
|
688
688
|
} | null>;
|
|
689
689
|
};
|
|
690
|
+
useVersion: typeof import("../../../..").useVersion;
|
|
690
691
|
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
691
692
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|
|
692
693
|
form: any;
|
|
@@ -5591,6 +5592,7 @@ export declare const CallbackMaps: Map<string, {
|
|
|
5591
5592
|
header: any;
|
|
5592
5593
|
footer: any;
|
|
5593
5594
|
slotPropertiesPicker: (args: import("../../../..").AnyObject) => Pick<import("../../../..").AnyObject, "row" | "column" | "rowIndex" | "checked" | "$rowIndex" | "disabled" | "columnIndex" | "$columnIndex" | "_columnIndex" | "indeterminate">;
|
|
5595
|
+
useVersion: typeof import("../../../..").useVersion;
|
|
5594
5596
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange")[], "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
5595
5597
|
tableConfig: {
|
|
5596
5598
|
type: import("vue").PropType<import("../../../../../../es/components/iho-table").IhoTableConfig>;
|
|
@@ -57,15 +57,14 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
57
57
|
height: string;
|
|
58
58
|
}>;
|
|
59
59
|
propItems: any;
|
|
60
|
-
redrawPoints:
|
|
61
|
-
select:
|
|
62
|
-
clickMenu:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
};
|
|
60
|
+
redrawPoints: any;
|
|
61
|
+
select: any;
|
|
62
|
+
clickMenu: any;
|
|
63
|
+
useMeasureRuler: any;
|
|
64
|
+
useCaliper: any;
|
|
65
|
+
useCaliperRuler: any;
|
|
66
|
+
updatePolyline: any;
|
|
67
|
+
init: () => import("../../../es/shared/types").AnyObject;
|
|
69
68
|
PopupTip: import("vue").DefineComponent<{
|
|
70
69
|
show: {
|
|
71
70
|
type: BooleanConstructor;
|
|
@@ -59,15 +59,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
59
59
|
height: string;
|
|
60
60
|
}>;
|
|
61
61
|
propItems: any;
|
|
62
|
-
redrawPoints:
|
|
63
|
-
select:
|
|
64
|
-
clickMenu:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
};
|
|
62
|
+
redrawPoints: any;
|
|
63
|
+
select: any;
|
|
64
|
+
clickMenu: any;
|
|
65
|
+
useMeasureRuler: any;
|
|
66
|
+
useCaliper: any;
|
|
67
|
+
useCaliperRuler: any;
|
|
68
|
+
updatePolyline: any;
|
|
69
|
+
init: () => AnyObject;
|
|
71
70
|
PopupTip: import("vue").DefineComponent<{
|
|
72
71
|
show: {
|
|
73
72
|
type: BooleanConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as
|
|
1
|
+
import{defineComponent as e,ref as r,reactive as t,computed as s,onMounted as o,onBeforeUnmount as a,openBlock as l,createElementBlock as i,normalizeStyle as u,unref as n,createElementVNode as p,Fragment as c,createVNode as h,mergeProps as m,createCommentVNode as d}from"vue";import{fabric as f}from"../../../shared/utils/fabricjs/index.js";import v from"./components/PopupTip.vue.js";import w from"./components/PopupMenu.js";import"./hooks/useDraw.js";import"date-fns";import"lodash-es";import"./hooks/useEvent.js";import{useBirthProcessChart as g}from"./hooks/birthProcess/useBirthProcessChart.js";import{useTemperatureChart as C}from"./hooks/temperature/useTemperatureChart.js";import{useSurgicalAnesthesiaChart as k}from"./hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js";import{useElectrocardiogramChart as y}from"./hooks/electrocardiogram/useElectrocardiogramChart.js";var j=e({__name:"FabricChart",props:{type:{type:String,default:"temperature"},data:{type:Object,required:!0},addRenderItem:{type:Function}},emits:["change","add","remove","select","add:prevent"],setup(e,{expose:j,emit:P}){const x=e,b=r(null),M=r(),R=t({show:!1,point:{x:0,y:0},list:[]}),I=t({show:!1,point:{x:0,y:0},list:[],target:null}),A=s((()=>{var e;return null==(e=M.value)?void 0:e.wrapperEl})),E=s((()=>({width:`${x.data.width||800}px`,height:`${x.data.height||500}px`}))),{propItems:S,redrawPoints:T,select:_,clickMenu:F,useMeasureRuler:$,useCaliper:q,useCaliperRuler:B,updatePolyline:D}=function(){const e=[M,x,P,b,R,I];switch(x.type){case"birthProcess":return g(...e);case"surgicalAnesthesia":return k(...e);case"electrocardiogram":return y(...e);default:return C(...e)}}();return o((()=>{M.value=new f.Canvas(b.value,{width:S.canvasWidth,height:S.canvasHeight,backgroundColor:"#fff",selection:!1,stopContextMenu:!0,fireRightClick:!0,allowTouchScrolling:!0})})),a((()=>{var e,r,t,s;null==(r=null==(e=M.value)?void 0:e.off)||r.call(e),null==(s=null==(t=M.value)?void 0:t.clear)||s.call(t)})),j({redrawPoints:T,select:_,canvas:M,useMeasureRuler:$,useCaliper:q,useCaliperRuler:B,updatePolyline:D}),(e,r)=>(l(),i("div",{class:"c-fabric-chart",style:u(n(E))},[p("canvas",{ref_key:"canvasRef",ref:b},null,512),n(A)?(l(),i(c,{key:0},[h(v,m({propItems:n(S)},R),null,16,["propItems"]),h(n(w),m({propItems:n(S)},I,{show:I.show,"onUpdate:show":r[0]||(r[0]=e=>I.show=e),onClickMenu:n(F)}),null,16,["propItems","show","onClickMenu"])],64)):d("v-if",!0)],4))}});export{j as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import { fabric } from '../../../../../../es/shared/utils/fabricjs';
|
|
3
|
+
import { AnyObject } from '../../../../../../es/shared/types';
|
|
4
|
+
export declare function useElectrocardiogram(canvas: Ref<fabric.Canvas>, propItems: AnyObject, flag: Ref<boolean>): {
|
|
5
|
+
updatePolyline: (value: number) => void;
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultTextStyle as e,defaultStyle as o,drawLine as r}from"../useDraw.js";import{useGrid as n}from"../useGrid.js";import"date-fns";import{range as i}from"lodash-es";import"../useEvent.js";import"vue";import"../temperature/useShadow.js";import"naive-ui";import{useThrottleFn as s}from"@vueuse/core";function l(l,a,u){const{borderStyle:c,originX:d,originY:f,xCellWidth:p,endY:h,yCellHeight:m,endX:v,canvasWidth:g,canvasHeight:w,dataList:x,columnNumber:y}=a,k=new Set;let Y=null,X=null;function b(r=0){x.forEach(((n,i)=>{const{x:s,y:a}=n.origin,c=~~(n.data.length/y),d=n.data.reduce(((t,e,o)=>{const n=i<12&&o>=r&&o<=r+c||12===i?[{x:t.length+1,y:h-+e}]:[];return t.concat(n)}),[]),f=new t.Polyline(d,{fill:"transparent",stroke:"red",strokeWidth:10,left:s,top:a,scaleX:.1,scaleY:.1,originY:"center",hasControls:!1,hasBorders:!1,hoverCursor:"default",lockMovementX:!0,lockMovementY:!0}),g=new t.Text(String(n.title),{...e,left:s+p,top:a-2*m,originX:"left",originY:"top"});f.startIdx=r,k.add(f),function(e){e.on("mousedown",(e=>{if(!u.value&&1===e.button){const{pointer:r,target:n}=e;if(!n)return;const{x:i=0,y:s=0}=e.pointer||{},a=10*(i-n.left);if(!Y&&!X){const e=n.points.length;Y=new t.Rect({...o,width:300,height:200,stroke:"transparent",fill:"#fff"});const r=370,i=a-r<0?0:a-r,s=a+r>e-1?e-1:a+r,u=n.points.slice(i,s).map(((t,e)=>({x:e,y:t.y})));X=new t.Polyline(u,{...o,fill:"transparent",stroke:"red",strokeWidth:4,scaleX:.4,scaleY:.4,originY:"center",originX:"center"}),l.value.add(Y,X),l.value.discardActiveObject()}Y.setCoords().set({originX:v-i<=300?"right":"left",originY:h-s<=200?"bottom":"top",left:i,top:s}),X.setCoords().set({left:v-i<=300?i-150:i+150,top:h-s<=200?s-100:s+100})}})),e.on("mouseup",(t=>{u.value||1===t.button&&(Y&&(l.value.remove(Y),Y=null),X&&(l.value.remove(X),X=null))}))}(f),l.value.add(g,f)}))}n(l,a),function(){const{strokeWidth:e}=c,o=new t.Rect({...c,width:g-e,height:w-e,left:d,top:f,fill:"transparent"});l.value.add(o)}(),function(){const t=g/y,e=[];i(y).forEach((o=>{if(o+1>=y)return;const n=(o+1)*t,i=r([n,0,n,w],{stroke:"#000"});e.push(i)})),l.value.add(...e)}(),b();return{updatePolyline:s((t=>{if(1===y)return;const e=x[x.length-1].data.length,o=~~(e/y),r=t/100*e-o/2,n=r+o>e?e-o:Math.max(0,r);if(k.size){const[t]=[...k];if(t.startIdx===n)return;[...k].forEach((t=>l.value.remove(t))),k.clear()}b(n)}),250)}}export{l as useElectrocardiogram};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { fabric } from '../../../../../../es/shared/utils/fabricjs';
|
|
3
|
+
import { AnyObject } from '../../../../../../es/shared/types';
|
|
4
|
+
import { IPointTipProps, IPointMenuProps } from '../../../../../../es/components/fabric-chart/src/interface';
|
|
5
|
+
export declare function useElectrocardiogramChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
|
|
6
|
+
propItems: any;
|
|
7
|
+
updatePolyline: Ref<any>;
|
|
8
|
+
useMeasureRuler: Ref<any>;
|
|
9
|
+
useCaliper: Ref<any>;
|
|
10
|
+
useCaliperRuler: Ref<any>;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ref as e,computed as a,reactive as t,unref as r,watch as u}from"vue";import{defaultBorderStyle as i}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";import{useElectrocardiogram as l}from"./useElectrocardiogram.js";import{useMeasureInstrument as d}from"./useMeasureInstrument.js";function o(o,s,n,v,m,p){const g=e(),c=e(),h=e(),f=e(),C=a((()=>s.data.width)),b=a((()=>s.data.height)),j=a((()=>(C.value-0)/w.value)),y=a((()=>(b.value-0)/x.value)),w=a((()=>s.data.grid.mainXCell)),x=a((()=>s.data.grid.mainYCell)),M=a((()=>{var e;return(null==(e=s.data.grid)?void 0:e.event)||{selectable:!0,evented:!0}})),R=a((()=>{const{mode:e="2-6"}=s.data;return e.split("-").map((e=>+e))[0]})),X=a((()=>{const{dataList:e,width:a}=s.data,t=a/R.value,r=4*y.value,u=3*y.value;return e.map(((e,a)=>{const i=a%R.value,l=Math.floor(a/R.value);return{...e,origin:{x:i*t,y:l*r+u}}}))})),Y=t({canvasWidth:s.data.width,canvasHeight:s.data.height,borderStyle:{...i,...s.data.borderStyle||{}},grid:s.data.grid,originX:0,endX:C.value,originY:0,endY:b.value,xCellWidth:j.value,yCellHeight:y.value,gridXNumber:w.value,gridYNumber:x.value,event:M.value,dataList:X.value,columnNumber:r(R)});return u((()=>o.value),(e=>{e&&function(){const{useMeasureRuler:e,flag:a,useCaliper:t,useCaliperRuler:r}=d(o,Y),{updatePolyline:u}=l(o,Y,a);c.value=e,h.value=t,f.value=r,g.value=u}()}),{immediate:!0}),{propItems:Y,updatePolyline:g,useMeasureRuler:c,useCaliper:h,useCaliperRuler:f}}export{o as useElectrocardiogramChart};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import { fabric } from '../../../../../../es/shared/utils/fabricjs';
|
|
3
|
+
import { AnyObject } from '../../../../../../es/shared/types';
|
|
4
|
+
export declare function useMeasureInstrument(canvas: Ref<fabric.Canvas>, propItems: AnyObject): {
|
|
5
|
+
flag: Ref<boolean>;
|
|
6
|
+
useMeasureRuler: () => void;
|
|
7
|
+
useCaliper: () => void;
|
|
8
|
+
useCaliperRuler: () => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ref as e}from"vue";import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as o,drawText as r}from"../useDraw.js";import"date-fns";import"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";function i(i,n){const{borderStyle:l,grid:s,originX:u,originY:a,xCellWidth:f,endY:d,yCellHeight:c,endX:h,canvasWidth:v,rightAddAreaWidth:p,canvasHeight:g,dataList:x,columnNumber:m}=n,C=e(!1),y={origin:{x:0,y:0},line:null,rendering:!1},L={origin:{x:300,y:0},caliper:{width:100,height:60,rect:null},caliperRuler:{width:230,height:120,rect:null}};function b(e){k();const{width:o,height:n,rect:l}=L[e];if(l)return;const{x:s,y:u}=L.origin,a=L.caliper.height;L[e].rect=new t.Rect({left:s+2,top:u,width:o-4,height:n,strokeWidth:0,fill:"transparent",hasControls:!1,hasBorders:!1,hoverCursor:"default"});const f={hasControls:!1,hasBorders:!1,stroke:"blue",strokeWidth:2,__type:e},d=new t.Line([s,u,s,n],{...f,lockMovementY:!0}),c=new t.Line([s+o,u,s+o,n],{...f,lockMovementY:!0}),h=new t.Line([s,a,s+o,a],{...f,lockMovementX:!0,evented:"caliper"===e}),v=r([s,h.top+10],{value:w(h.x1,h.x2),fill:"blue",originX:"left",originY:"top"});d.rect=L[e].rect,c.rect=L[e].rect,h.rect=L[e].rect,Object.assign(L[e].rect,{leftLine:d,rightLine:c,horizontalLine:h,text:v}),function(e,t){e.on("moving",(()=>{const{leftLine:o,rightLine:r,horizontalLine:i,text:n}=e;null==o||o.setCoords().set({x1:e.left-2,y1:e.top,x2:e.left-2,y2:e.top+e.height}),null==r||r.setCoords().set({x1:e.left+e.width,y1:e.top,x2:e.left+e.width,y2:e.top+e.height});const l="caliper"===t?e.top+e.height:e.top+e.height/2;null==i||i.setCoords().set({x1:e.left-2,y1:l,x2:e.left+e.width,y2:l}),n.setCoords().set({left:e.left,top:l+10})})),e.on("mouseup",(t=>{1===t.button&&(i.value.discardActiveObject(),e.leftLine.bringToFront(),e.rightLine.bringToFront(),e.horizontalLine.bringToFront())}))}(L[e].rect,e),j(d,"left"),j(c,"right"),"caliper"===e&&j(h,"horizontal"),i.value.add(L[e].rect,d,c,h,v)}function w(e,t){var o;return`${`${null!=(o=(6e4/(t-e)*10).toFixed(2))?o:0}bpm`}\n${10*(t-e)+"ms"}`}function j(e,t){e.on("moving",(()=>{const{rect:o}=e;if(!o)return;const{leftLine:r,rightLine:i,horizontalLine:n,text:l}=o;if("horizontal"===t)return e.top<=o.top+1?e.setCoords().set({y1:o.top+1,y2:o.top+1}):e.setCoords().set({y1:e.top,y2:e.top}),o.setCoords().set({height:e.top-o.top}),null==r||r.setCoords().set({y2:e.top}),null==i||i.setCoords().set({y2:e.top}),void l.setCoords().set({top:e.top+10});"left"===t&&(e.left>=i.left-1?e.setCoords().set({x1:i.left-1,x2:i.left-1}):e.setCoords().set({x1:e.left,x2:e.left}),o.setCoords().set({left:e.left+2,width:i.left-e.left-4}),n.setCoords().set({x1:e.left}),l.setCoords().set({left:e.left})),"right"===t&&(e.left<=r.left+1?e.setCoords().set({x1:r.left+1,x2:r.left+1}):e.setCoords().set({x1:e.left,x2:e.left}),o.setCoords().set({width:e.left-r.left-4}),n.setCoords().set({x2:e.left})),l.set("text",w(n.x1,n.x2))}))}function k(){Object.values(L).forEach((e=>{const{rect:t}=e;t&&(i.value.remove(t),i.value.remove(t.leftLine),i.value.remove(t.rightLine),i.value.remove(t.horizontalLine),i.value.remove(t.text),e.rect=null)})),y.line&&(i.value.remove(y.line),y.line.text&&i.value.remove(y.line.text),y.line=null)}return i.value.on("mouse:down",(e=>{if(1===e.button&&C.value){const{x:t=0,y:o=0}=e.pointer||{};y.origin={x:t,y:o},y.rendering=!0}})),i.value.on("mouse:up",(e=>{const{button:t}=e;1===t&&C.value&&setTimeout((()=>{C.value=!1,y.rendering=!1})),3===t&&k()})),i.value.on("mouse:move",(e=>{var t;if(1===e.button&&C.value&&y.rendering){const{x:n=0,y:l=0}=e.pointer||{};y.line&&i.value.remove(y.line),(null==(t=y.line)?void 0:t.text)&&i.value.remove(y.line.text);const{x:s,y:u}=y.origin;y.line=o([s,u,n,l],{stroke:"blue"});const a=r([n,l+2*c],{value:`${-(l-u)/4+"mv"}\n${10*(n-s)+"ms"}`,fill:"blue"});y.line.text=a,i.value.add(y.line,a)}})),{flag:C,useMeasureRuler:function(){C.value||(C.value=!0)},useCaliper:function(){b("caliper")},useCaliperRuler:function(){b("caliperRuler")}}}export{i as useMeasureInstrument};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{defaultBorderStyle,defaultLineStyle,defaultRectStyle,defaultStyle,defaultTextStyle,drawArrow,drawLine,drawPoint,drawText,drawTextAndIconGroup,drawTextGroup}from"./useDraw.js";export{useGrid}from"./useGrid.js";export{useBirthProcessCumputedPoint,useCumputedPoint}from"./useCumputedPoint.js";export{bus,useCanvasEvent}from"./useEvent.js";export{drawScaleLine,drawScaleNumber,getScaleInfo}from"./useScaleColumn.js";export{useCommon}from"./useCommon.js";export{useBirthProcessChart}from"./birthProcess/useBirthProcessChart.js";export{useTemperatureChart}from"./temperature/useTemperatureChart.js";export{useSurgicalAnesthesiaChart}from"./surgicalAnesthesia/useSurgicalAnesthesiaChart.js";
|
|
1
|
+
export{defaultBorderStyle,defaultLineStyle,defaultRectStyle,defaultStyle,defaultTextStyle,drawArrow,drawLine,drawPoint,drawText,drawTextAndIconGroup,drawTextGroup}from"./useDraw.js";export{useGrid}from"./useGrid.js";export{useBirthProcessCumputedPoint,useCumputedPoint}from"./useCumputedPoint.js";export{bus,useCanvasEvent}from"./useEvent.js";export{drawScaleLine,drawScaleNumber,getScaleInfo}from"./useScaleColumn.js";export{useCommon}from"./useCommon.js";export{useBirthProcessChart}from"./birthProcess/useBirthProcessChart.js";export{useTemperatureChart}from"./temperature/useTemperatureChart.js";export{useSurgicalAnesthesiaChart}from"./surgicalAnesthesia/useSurgicalAnesthesiaChart.js";export{useElectrocardiogramChart}from"./electrocardiogram/useElectrocardiogramChart.js";
|
package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js
CHANGED
|
@@ -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{useDialog as n}from"naive-ui";import{defaultBorderStyle as o}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"../useEvent.js";import{cloneDeep as d,range as c}from"lodash-es";import"../temperature/useShadow.js";import{OTHER_MENU as p}from"../../constants/index.js";import{useTop as m}from"./useTop.js";import{useLeft as v}from"./useLeft.js";import{useCenter as h}from"./useCenter.js";import{useOther as f}from"./useOther.js";function g(g,y,x,w,b,j){const C=n(),Y=e(),H=e(),S=e(),D=t((()=>y.data.layout||{top:"drug",center:"xAxis",bottom:"intraoperatively"})),A=t((()=>{var e;return null!=(e=y.data.left.width)?e:0})),M=t((()=>{const{grid:e}=y.data;return e.mainXCell*e.subXCell})),T=t((()=>{const{grid:e}=y.data;return e.mainYCell*e.subYCell})),X=t((()=>s(y.data.top.treeData))),G=t((()=>y.data.top.tree.cellHeight)),V=t((()=>G.value*X.value)),k=t((()=>ee($("drug")||"top"))),P=t((()=>k.value+V.value)),L=t((()=>{var e;return Date.parse((null==(e=y.data.xAxis)?void 0:e.startTime)||u(new Date,"yyyy-MM-dd HH:mm:ss"))})),N=t((()=>{const e=d(y.data.xAxis),{spaceValue:t,spaceTimeStamp:a}=e,r=c(M.value/t+1).map((r=>0===r?e.startTime:u(new Date(L.value+r*t*a),"yyyy-MM-dd HH:mm:ss")));return{...e,list:r,left:A.value}})),O=function(){const e=d(y.data.top.treeData);let t=0;const{cellWidth:a,cellHeight:r}=y.data.top.tree;return function e(i,l=0){i.forEach((i=>{var n;const o={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);o.height=a*r,e(i.children,l+1)}else o.width=A.value-o.left;Object.assign(i,o)}))}(e),e}(),E=t((()=>ee($("xAxis")||"center"))),W=t((()=>{var e;const{width:t,right:a}=y.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),I=t((()=>ee($("intraoperatively")||"bottom"))),q=t((()=>{var e;const{show:t=!0,height:a}=(null==(e=y.data.other)?void 0:e.mark)||{};return t&&a?a:0})),z=t((()=>I.value+(y.data.height-V.value-N.value.height-q.value))),B=t((()=>(W.value-A.value)/M.value)),F=t((()=>(z.value-I.value)/T.value)),J=t((()=>N.value.spaceTimeStamp/B.value)),K=t((()=>{const{scaleValues:e}=y.data;return e.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:e.type,unit:e.unit,dataIndex:a}))))).flat()})),Q=t((()=>te("pulse"))),R=t((()=>te("temperature"))),U=t((()=>{var e;return(null==(e=y.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),Z=a({canvasWidth:y.data.width,canvasHeight:y.data.height,borderStyle:{...o,...y.data.borderStyle},pointSelectionStyle:y.data.pointSelectionStyle||{},grid:y.data.grid,top:y.data.top,left:y.data.left,other:y.data.other,topGridYNumber:r(X),topGridYCellHeight:r(G),topGridOriginY:r(k),topGridEndY:r(P),treeData:O,xAxis:r(N),originYXAxis:r(E),startTime:r(L),timeXCell:r(J),gridXNumber:r(M),gridYNumber:r(T),xCellWidth:r(B),yCellHeight:r(F),originX:r(A),endX:r(W),originY:r(I),endY:r(z),markHeight:r(q),itemList:r(K),scaleValues:y.data.scaleValues,pulseYCell:r(Q),temperatureYCell:r(R),event:r(U),dialog:C});function $(e){let t="";return Object.entries(D.value).some((([a,r])=>{if(r===e)return t=a,!0})),t}function _(e){const t=D.value[e],a=N.value.height;switch(t){case"drug":return V.value;case"xAxis":return a;default:return y.data.height-V.value-a}}function ee(e){switch(e){case"top":return 0;case"center":return _("top");default:return _("top")+_("center")}}function te(e){const{scaleValues:t}=y.data,a=t.find((t=>t.type===e));return F.value*(a.spaceGridNumber||1)/(a.spaceValue||1)}return i((async()=>{await l(),m(g,Z,x,b);const{redrawPoints:e,clickMenu:t,moveLimit:a,setPopup:r,updateData:i,getGridPoints:n,getContainPoints:o,showDialog:u,removeCurrentSelection:s}=h(g,Z,x,b,j);v(g,Z,x,b,a,r,i,n);const{clickMenu:d}=f(g,Z,x,b,j,a,o,u,s);H.value=e,S.value=e=>{const{item:a}=e;a.type&&p.map((e=>e.type)).includes(a.type)?d(e):t(e)}})),{propItems:Z,redrawPoints:H,select:Y,clickMenu:S}}export{g 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{useDialog as n}from"naive-ui";import{defaultBorderStyle as o}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"../useEvent.js";import{cloneDeep as d,range as c}from"lodash-es";import"../temperature/useShadow.js";import{OTHER_MENU as p}from"../../constants/index.js";import"@vueuse/core";import{useTop as m}from"./useTop.js";import{useLeft as v}from"./useLeft.js";import{useCenter as h}from"./useCenter.js";import{useOther as f}from"./useOther.js";function g(g,y,x,w,b,j){const C=n(),Y=e(),H=e(),S=e(),D=t((()=>y.data.layout||{top:"drug",center:"xAxis",bottom:"intraoperatively"})),A=t((()=>{var e;return null!=(e=y.data.left.width)?e:0})),M=t((()=>{const{grid:e}=y.data;return e.mainXCell*e.subXCell})),T=t((()=>{const{grid:e}=y.data;return e.mainYCell*e.subYCell})),X=t((()=>s(y.data.top.treeData))),G=t((()=>y.data.top.tree.cellHeight)),V=t((()=>G.value*X.value)),k=t((()=>ee($("drug")||"top"))),P=t((()=>k.value+V.value)),L=t((()=>{var e;return Date.parse((null==(e=y.data.xAxis)?void 0:e.startTime)||u(new Date,"yyyy-MM-dd HH:mm:ss"))})),N=t((()=>{const e=d(y.data.xAxis),{spaceValue:t,spaceTimeStamp:a}=e,r=c(M.value/t+1).map((r=>0===r?e.startTime:u(new Date(L.value+r*t*a),"yyyy-MM-dd HH:mm:ss")));return{...e,list:r,left:A.value}})),O=function(){const e=d(y.data.top.treeData);let t=0;const{cellWidth:a,cellHeight:r}=y.data.top.tree;return function e(i,l=0){i.forEach((i=>{var n;const o={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);o.height=a*r,e(i.children,l+1)}else o.width=A.value-o.left;Object.assign(i,o)}))}(e),e}(),E=t((()=>ee($("xAxis")||"center"))),W=t((()=>{var e;const{width:t,right:a}=y.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),I=t((()=>ee($("intraoperatively")||"bottom"))),q=t((()=>{var e;const{show:t=!0,height:a}=(null==(e=y.data.other)?void 0:e.mark)||{};return t&&a?a:0})),z=t((()=>I.value+(y.data.height-V.value-N.value.height-q.value))),B=t((()=>(W.value-A.value)/M.value)),F=t((()=>(z.value-I.value)/T.value)),J=t((()=>N.value.spaceTimeStamp/B.value)),K=t((()=>{const{scaleValues:e}=y.data;return e.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:e.type,unit:e.unit,dataIndex:a}))))).flat()})),Q=t((()=>te("pulse"))),R=t((()=>te("temperature"))),U=t((()=>{var e;return(null==(e=y.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),Z=a({canvasWidth:y.data.width,canvasHeight:y.data.height,borderStyle:{...o,...y.data.borderStyle},pointSelectionStyle:y.data.pointSelectionStyle||{},grid:y.data.grid,top:y.data.top,left:y.data.left,other:y.data.other,topGridYNumber:r(X),topGridYCellHeight:r(G),topGridOriginY:r(k),topGridEndY:r(P),treeData:O,xAxis:r(N),originYXAxis:r(E),startTime:r(L),timeXCell:r(J),gridXNumber:r(M),gridYNumber:r(T),xCellWidth:r(B),yCellHeight:r(F),originX:r(A),endX:r(W),originY:r(I),endY:r(z),markHeight:r(q),itemList:r(K),scaleValues:y.data.scaleValues,pulseYCell:r(Q),temperatureYCell:r(R),event:r(U),dialog:C});function $(e){let t="";return Object.entries(D.value).some((([a,r])=>{if(r===e)return t=a,!0})),t}function _(e){const t=D.value[e],a=N.value.height;switch(t){case"drug":return V.value;case"xAxis":return a;default:return y.data.height-V.value-a}}function ee(e){switch(e){case"top":return 0;case"center":return _("top");default:return _("top")+_("center")}}function te(e){const{scaleValues:t}=y.data,a=t.find((t=>t.type===e));return F.value*(a.spaceGridNumber||1)/(a.spaceValue||1)}return i((async()=>{await l(),m(g,Z,x,b);const{redrawPoints:e,clickMenu:t,moveLimit:a,setPopup:r,updateData:i,getGridPoints:n,getContainPoints:o,showDialog:u,removeCurrentSelection:s}=h(g,Z,x,b,j);v(g,Z,x,b,a,r,i,n);const{clickMenu:d}=f(g,Z,x,b,j,a,o,u,s);H.value=e,S.value=e=>{const{item:a}=e;a.type&&p.map((e=>e.type)).includes(a.type)?d(e):t(e)}})),{propItems:Z,redrawPoints:H,select:Y,clickMenu:S}}export{g as useSurgicalAnesthesiaChart};
|
|
@@ -1,7 +1,7 @@
|
|
|
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 type IType = 'temperature' | 'birthProcess' | 'surgicalAnesthesia' | undefined;
|
|
4
|
+
export declare type IType = 'temperature' | 'birthProcess' | 'surgicalAnesthesia' | 'electrocardiogram' | undefined;
|
|
5
5
|
interface IEvent {
|
|
6
6
|
selectable: boolean;
|
|
7
7
|
evented: boolean;
|
|
@@ -61,6 +61,9 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
61
61
|
type: BooleanConstructor;
|
|
62
62
|
default: boolean;
|
|
63
63
|
};
|
|
64
|
+
fieldShowMaxValue: {
|
|
65
|
+
type: NumberConstructor;
|
|
66
|
+
};
|
|
64
67
|
}, {
|
|
65
68
|
fieldsMapping: Record<string, string>;
|
|
66
69
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -123,6 +126,9 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
123
126
|
type: BooleanConstructor;
|
|
124
127
|
default: boolean;
|
|
125
128
|
};
|
|
129
|
+
fieldShowMaxValue: {
|
|
130
|
+
type: NumberConstructor;
|
|
131
|
+
};
|
|
126
132
|
}>> & {
|
|
127
133
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
128
134
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
@@ -135,6 +141,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
135
141
|
tableBodyRef: import("vue").Ref<HTMLDivElement | undefined>;
|
|
136
142
|
newFields: import("vue").Ref<import("../../../es/shared/types").AnyObject[]>;
|
|
137
143
|
columns: import("vue").Ref<{
|
|
144
|
+
[x: string]: any;
|
|
138
145
|
title: string;
|
|
139
146
|
type: "custom" | "text" | "checkbox" | "select" | "input" | "inputNumber";
|
|
140
147
|
field: string;
|
|
@@ -149,6 +156,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
149
156
|
fieldList: import("vue").ComputedRef<import("../../../es/shared/types").AnyObject[]>;
|
|
150
157
|
rowProps: {
|
|
151
158
|
columns: {
|
|
159
|
+
[x: string]: any;
|
|
152
160
|
title: string;
|
|
153
161
|
type: "custom" | "text" | "checkbox" | "select" | "input" | "inputNumber";
|
|
154
162
|
field: string;
|
|
@@ -434,7 +442,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
434
442
|
label: string;
|
|
435
443
|
value: number;
|
|
436
444
|
}[];
|
|
437
|
-
setDisabled: (column: import("../../../es/shared/types").AnyObject) =>
|
|
445
|
+
setDisabled: (column: import("../../../es/shared/types").AnyObject) => any;
|
|
438
446
|
onUpdateChecked: (checked: boolean, column: import("../../../es/shared/types").AnyObject) => void;
|
|
439
447
|
handleUpdateSelect: (value: string, column: import("../../../es/shared/types").AnyObject) => void;
|
|
440
448
|
NCheckbox: any;
|
|
@@ -444,7 +452,6 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
444
452
|
NTooltip: any;
|
|
445
453
|
NIcon: any;
|
|
446
454
|
setStyle: typeof import("./src/utils").setStyle;
|
|
447
|
-
isDisable: typeof import("./src/utils").isDisable;
|
|
448
455
|
ReorderTwoOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
449
456
|
isFunction: (value: any) => value is (...args: any[]) => any;
|
|
450
457
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "updateChecked"[], "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -611,6 +618,9 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
611
618
|
type: BooleanConstructor;
|
|
612
619
|
default: boolean;
|
|
613
620
|
};
|
|
621
|
+
fieldShowMaxValue: {
|
|
622
|
+
type: NumberConstructor;
|
|
623
|
+
};
|
|
614
624
|
}>> & {
|
|
615
625
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
616
626
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="lodash" />
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
|
-
import { setStyle,
|
|
3
|
+
import { setStyle, isDraggableItem } from './utils';
|
|
4
4
|
import { FieldSetItem, FieldSetColumnName, FieldSetColumnItem } from '../../../../es/components/field-set/src/types';
|
|
5
5
|
import { AnyObject } from '../../../../es/shared/types';
|
|
6
6
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -63,6 +63,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
63
63
|
type: BooleanConstructor;
|
|
64
64
|
default: boolean;
|
|
65
65
|
};
|
|
66
|
+
fieldShowMaxValue: {
|
|
67
|
+
type: NumberConstructor;
|
|
68
|
+
};
|
|
66
69
|
}, {
|
|
67
70
|
fieldsMapping: Record<string, string>;
|
|
68
71
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -125,6 +128,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
125
128
|
type: BooleanConstructor;
|
|
126
129
|
default: boolean;
|
|
127
130
|
};
|
|
131
|
+
fieldShowMaxValue: {
|
|
132
|
+
type: NumberConstructor;
|
|
133
|
+
};
|
|
128
134
|
}>> & {
|
|
129
135
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
130
136
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
@@ -137,6 +143,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
137
143
|
tableBodyRef: import("vue").Ref<HTMLDivElement | undefined>;
|
|
138
144
|
newFields: import("vue").Ref<AnyObject[]>;
|
|
139
145
|
columns: import("vue").Ref<{
|
|
146
|
+
[x: string]: any;
|
|
140
147
|
title: string;
|
|
141
148
|
type: "custom" | "text" | "checkbox" | "select" | "input" | "inputNumber";
|
|
142
149
|
field: string;
|
|
@@ -151,6 +158,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
151
158
|
fieldList: import("vue").ComputedRef<AnyObject[]>;
|
|
152
159
|
rowProps: {
|
|
153
160
|
columns: {
|
|
161
|
+
[x: string]: any;
|
|
154
162
|
title: string;
|
|
155
163
|
type: "custom" | "text" | "checkbox" | "select" | "input" | "inputNumber";
|
|
156
164
|
field: string;
|
|
@@ -419,7 +427,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
419
427
|
label: string;
|
|
420
428
|
value: number;
|
|
421
429
|
}[];
|
|
422
|
-
setDisabled: (column: AnyObject) =>
|
|
430
|
+
setDisabled: (column: AnyObject) => any;
|
|
423
431
|
onUpdateChecked: (checked: boolean, column: AnyObject) => void;
|
|
424
432
|
handleUpdateSelect: (value: string, column: AnyObject) => void;
|
|
425
433
|
NCheckbox: any;
|
|
@@ -429,7 +437,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
429
437
|
NTooltip: any;
|
|
430
438
|
NIcon: any;
|
|
431
439
|
setStyle: typeof setStyle;
|
|
432
|
-
isDisable: typeof isDisable;
|
|
433
440
|
ReorderTwoOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
434
441
|
isFunction: (value: any) => value is (...args: any[]) => any;
|
|
435
442
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "updateChecked"[], "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -596,6 +603,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
596
603
|
type: BooleanConstructor;
|
|
597
604
|
default: boolean;
|
|
598
605
|
};
|
|
606
|
+
fieldShowMaxValue: {
|
|
607
|
+
type: NumberConstructor;
|
|
608
|
+
};
|
|
599
609
|
}>> & {
|
|
600
610
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
601
611
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,computed as t,reactive as i,watch as o,openBlock as d,createElementBlock as a,normalizeStyle as r,createBlock as s,unref as n,withKeys as u,withModifiers as c,createCommentVNode as f,createElementVNode as h,Fragment as p,renderList as m,withCtx as y,createTextVNode as v,toDisplayString as b,createVNode as k,normalizeClass as
|
|
1
|
+
import{defineComponent as e,ref as l,computed as t,reactive as i,watch as o,openBlock as d,createElementBlock as a,normalizeStyle as r,createBlock as s,unref as n,withKeys as u,withModifiers as c,createCommentVNode as f,createElementVNode as h,Fragment as p,renderList as m,withCtx as y,createTextVNode as v,toDisplayString as b,createVNode as k,normalizeClass as x,mergeProps as g,renderSlot as w}from"vue";import{useThemeVars as S,NInput as A,NCheckbox as _,NTooltip as C,NIcon as F,NPopconfirm as W,NButton as E}from"naive-ui";import H from"../../../shared/components/VueDraggable/src/vuedraggable.js";import N from"./components/Row.vue.js";import{isArray as P,cloneDeep as q,isString as R,omit as V}from"lodash-es";import{isDisable as j,setStyle as B,isDraggableItem as I,isDraggable as M,getGroupTree as U}from"./utils/index.js";import{uuidGenerator as D}from"../../../shared/utils/index.js";import{HelpCircleSharp as O}from"@vicons/ionicons5";const T={class:"c-field-set__table-header"},K=h("span",null,"数值越小,优先级越高",-1),L=["tabindex"],G={key:1,class:"c-field-set__table-footer"};var $=e({__name:"FieldSet",props:{fields:{type:Array,default:()=>[]},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1},showColumnNames:{type:Array},groupSetting:{type:Object},customColumns:{type:Array,default:()=>[]},showSeq:{type:Boolean,default:!1},showSearch:{type:Boolean,default:!1},showSortPriority:{type:Boolean,default:!1},showHeadFilter:{type:Boolean,default:!1},fieldShowMaxValue:{type:Number}},emits:["save","close","reset"],setup(e,{expose:$,emit:z}){const J=e,Q={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},X=l(S().value.primaryColor),Y=l(""),Z=l(),ee=l([]),le=l([{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!!J.fieldShowMaxValue,field:"show",fieldShowMaxValue:J.fieldShowMaxValue},{title:"编辑",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"editable"},{title:"必填",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"required"},{title:"排序",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"sort"},{title:"加粗",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"bold"},{title:"默认排序",type:"select",field:"sortDirection"},{title:"排序优先级",type:"select",field:"sortPriority"},{title:"固定",type:"select",field:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"},{title:"表头筛选",type:"checkbox",isHeadCheckHide:!0,field:"isShowHeaderFilter"}]),te=t((()=>ee.value.flat())),ie=i({columns:le,fieldList:te,onUpdateChecked:function({checked:e,column:l}){const t=!e||he(l.field);l.checkedAll=!t}}),oe={keyword:Y.value,idx:0,startIdx:0},de=()=>{z("save",{tableFields:ne()})},ae=()=>{z("close")};function re(){ee.value=se(),fe(),z("reset")}function se(){const e=q(J.fields).map((e=>({...e,uuid:D()})));return Object.keys(Q).forEach((l=>{e.forEach((e=>{"old"==J.type&&Reflect.has(e,l)&&("isFixed"==l?e.fixedWay=1==e[l]?"LEFT":2==e[l]?"RIGHT":"NONE":["isShow","isSort"].includes(l)&&"boolean"!=typeof l?e[Q[l]]=1==e[l]:e[Q[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1),e.draggable=!!M(e)}))})),function(e){if(J.groupSetting){return U(J.groupSetting,e).reduce(((t,i)=>{const o=R(i)?e.find((e=>e.name===i)):l(i.children);return o&&t.push(o),t}),[])}return e;function l(t){const i=[];return t.forEach((t=>{if(t.children)i.push(...l(t.children));else{const l=e.find((e=>e.name===t));l&&i.push(l)}})),i}}(e)}function ne(){let e=[];return e="old"==J.type?te.value.map(((e,l)=>({id:e.id,field:e.name,visible:e.show,sequence:l,sortable:e.sort,title:e.alias,fixed:e.fixedWay,minWidth:e.columnWidth,bold:e.bold,sortDirection:e.sortDirection,sortPriority:e.sortPriority,...J.isEdit?{required:e.required,editable:e.editable}:{}}))):te.value,e.map((e=>V(e,["uuid"])))}function ue(){const e=oe.keyword!==Y.value;let l=Y.value?te.value.findIndex(((l,t)=>{var i;if(null==(i=l.title)?void 0:i.includes(Y.value))return!!e||t>oe.idx})):0;-1!==l||e||(l=oe.startIdx),Z.value.scrollTop=52*l,Object.assign(oe,{keyword:Y.value,idx:l},e?{startIdx:l}:{})}function ce(e){var l;return!!Y.value&&(null==(l=e.title)?void 0:l.includes(Y.value))}function fe(){var e,l;(null==(e=J.showColumnNames)?void 0:e.length)&&(le.value=le.value.filter((e=>{var l,t;return"title"===e.field||(null==(t=null==(l=J.showColumnNames)?void 0:l.includes)?void 0:t.call(l,e.field))}))),(null==(l=J.customColumns)?void 0:l.length)&&le.value.push(...J.customColumns),J.showSeq&&le.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),le.value.forEach((e=>{if(e.isShow=function(e){return!(["editable","required"].includes(e.field)&&!J.isEdit||"sortPriority"===e.field&&!J.showSortPriority||"isShowHeaderFilter"===e.field&&!J.showHeadFilter)}(e),"checkbox"===e.type){const l=ee.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!he(e.field)&&!l}}))}function he(e){return ee.value.flat().some((l=>!j(l,e)&&!l[e]&&"0001"!=l.id))}function pe(e){return!!I(e.relatedContext.element)}return o([()=>J.fields,()=>{var e;return null==(e=J.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(ee.value=se(),fe())}),{immediate:!0,deep:!0}),$({getTableFields:ne}),(l,t)=>(d(),a("div",{class:"c-field-set",style:r({"--row-height":"52px","--primary-color":X.value})},[e.showSearch?(d(),s(n(A),{key:0,class:"c-field-set__search-wrapper",value:Y.value,"onUpdate:value":t[0]||(t[0]=e=>Y.value=e),valueModifiers:{trim:!0},placeholder:"请输入字段标题",onKeydown:u(c(ue,["prevent"]),["enter"])},null,8,["value","onKeydown"])):f("v-if",!0),h("div",T,[(d(!0),a(p,null,m(le.value,((e,l)=>(d(),a(p,{key:l},[e.isShow?(d(),a("span",{key:0,class:"table-cell",style:r(n(B)(e))},["checkbox"!==e.type||e.isHeadCheckHide?(d(),a(p,{key:1},[v(b(e.title),1)],64)):(d(),s(n(_),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void te.value.forEach((e=>{j(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:y((()=>[v(b(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])),"sortPriority"===e.field?(d(),s(n(C),{key:2,trigger:"hover"},{trigger:y((()=>[k(n(F),{component:n(O),style:{top:"2px"}},null,8,["component"])])),default:y((()=>[K])),_:1})):f("v-if",!0)],4)):f("v-if",!0)],64)))),128))]),h("div",{class:"c-field-set__table-body",ref_key:"tableBodyRef",ref:Z},[k(n(H),{modelValue:ee.value,"onUpdate:modelValue":t[1]||(t[1]=e=>ee.value=e),animation:"150","item-key":"id",filter:".disabled",draggable:".item",move:pe},{item:y((({element:e,index:l})=>[e.hide?f("v-if",!0):(d(),a("div",{key:0,class:x(["item",n(I)(e)?"":"disabled"]),tabindex:l},[n(P)(e)?(d(!0),a(p,{key:0},m(e,((e,t)=>(d(),s(N,g(ie,{key:t,element:e,idx:l+1,"is-highlight":ce(e)}),null,16,["element","idx","is-highlight"])))),128)):(d(),s(N,g({key:1},ie,{element:e,idx:l+1,"is-highlight":ce(e)}),null,16,["element","idx","is-highlight"]))],10,L))])),_:1},8,["modelValue"])],512),e.footerFlag?(d(),a("div",G,[f(" 底部按钮插槽 "),w(l.$slots,"footer",{},(()=>[k(n(W),{onPositiveClick:re},{trigger:y((()=>[k(n(E),{style:{"margin-right":"8px"}},{default:y((()=>[v("恢复默认设置")])),_:1})])),default:y((()=>[v(" 确认要恢复系统默认设置吗? ")])),_:1}),k(n(E),{style:{"margin-right":"8px"},onClick:ae},{default:y((()=>[v("取消")])),_:1}),k(n(E),{type:"primary",onClick:de},{default:y((()=>[v("保存")])),_:1})]))])):f("v-if",!0)],4))}});export{$ as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { AnyObject } from '../../../../../es/shared/types';
|
|
3
3
|
import { FieldSetItem, FieldSetColumnItem } from '../../../../../es/components/field-set';
|
|
4
|
-
import { setStyle
|
|
4
|
+
import { setStyle } from '../utils';
|
|
5
5
|
declare const _default: import("vue").DefineComponent<{
|
|
6
6
|
element: {
|
|
7
7
|
type: PropType<Partial<{
|
|
@@ -135,7 +135,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
135
135
|
label: string;
|
|
136
136
|
value: number;
|
|
137
137
|
}[];
|
|
138
|
-
setDisabled: (column: AnyObject) =>
|
|
138
|
+
setDisabled: (column: AnyObject) => any;
|
|
139
139
|
onUpdateChecked: (checked: boolean, column: AnyObject) => void;
|
|
140
140
|
handleUpdateSelect: (value: string, column: AnyObject) => void;
|
|
141
141
|
NCheckbox: any;
|
|
@@ -145,7 +145,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
145
145
|
NTooltip: any;
|
|
146
146
|
NIcon: any;
|
|
147
147
|
setStyle: typeof setStyle;
|
|
148
|
-
isDisable: typeof isDisable;
|
|
149
148
|
ReorderTwoOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
150
149
|
isFunction: (value: any) => value is (...args: any[]) => any;
|
|
151
150
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "updateChecked"[], "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,openBlock as
|
|
1
|
+
import{defineComponent as e,openBlock as l,createElementBlock as t,Fragment as i,renderList as n,normalizeStyle as a,unref as r,createBlock as d,withCtx as o,createVNode as u,createCommentVNode as f,createElementVNode as s,normalizeClass as c,toDisplayString as m,withDirectives as p,vShow as v,resolveDynamicComponent as y}from"vue";import{NTooltip as h,NIcon as b,NCheckbox as k,NSelect as g,NInput as x,NInputNumber as N}from"naive-ui";import{setStyle as w,isDisable as U}from"../utils/index.js";import{ReorderTwoOutline as S}from"@vicons/ionicons5";import{isFunction as E,range as C}from"lodash-es";const H={class:"row"},L=["title"],O=s("span",null,"拖拽调整顺序",-1);var P=e({__name:"Row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1},fieldList:{type:Array,default:()=>[]},isHighlight:{type:Boolean}},emits:["updateChecked"],setup(e,{emit:P}){const D=e,R=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],A=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}];function F(e){switch(e.field){case"fixedWay":return R;case"sortDirection":return A;case"sortPriority":return function(){const e=C(1,D.fieldList.length+1).map((e=>({label:e.toString(),value:e}))),l=D.fieldList.filter((e=>!!e.sortPriority&&e.uuid!==D.element.uuid)).map((e=>e.sortPriority));return e.filter((e=>!l.includes(e.value)))}();default:return[]}}function _(e){var l;if("checkbox"===e.type)return"show"===e.field&&e.fieldShowMaxValue?!D.element[e.field]&&(null==(l=D.fieldList.filter((l=>l[e.field])))?void 0:l.length)===e.fieldShowMaxValue:U(D.element,e.field);if("sortPriority"!==e.field)return!1;const{sortDirection:t}=D.element;return!t||"NONE"===t}return(U,C)=>(l(),t("div",H,[(l(!0),t(i,null,n(e.columns,((n,U)=>{return l(),t(i,{key:U},[n.isShow?(l(),t("span",{key:0,class:"table-cell",title:e.element[n.field],style:a(r(w)(n))},["text"===n.type?(l(),t(i,{key:0},[0===U?(l(),d(r(h),{key:0,trigger:"hover"},{trigger:o((()=>[u(r(b),{style:{"margin-right":"5px",top:"2px"},component:r(S)},null,8,["component"])])),default:o((()=>[O])),_:1})):f("v-if",!0),s("span",{class:c([e.isHighlight&&"title"===n.field?"highlight":""])},m("seq"===n.field?e.idx:e.element[n.field]),3)],64)):f("v-if",!0),"checkbox"===n.type?p((l(),d(r(k),{key:1,disabled:_(n),checked:e.element[n.field],"onUpdate:checked":[l=>e.element[n.field]=l,e=>function(e,l){P("updateChecked",{checked:e,column:l})}(e,n)]},null,8,["disabled","checked","onUpdate:checked"])),[[v,(C=e.element,H=n.field,"isShowHeaderFilter"===H?C.isConfiguredHeaderFilter&&"0001"!=D.element.id:"0001"!=D.element.id)]]):f("v-if",!0),"select"===n.type?p((l(),d(r(g),{key:2,clearable:"",disabled:_(n),value:e.element[n.field],"onUpdate:value":[l=>e.element[n.field]=l,e=>function(e,l){"sortDirection"===l.field&&"NONE"===e&&(D.element.sortPriority=null)}(e,n)],options:F(n)},null,8,["disabled","value","onUpdate:value","options"])),[[v,"fixedWay"===n.field||"0001"!=e.element.id]]):f("v-if",!0),"input"===n.type?p((l(),d(r(x),{key:3,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l,clearable:""},null,8,["value","onUpdate:value"])),[[v,"0001"!=e.element.id]]):f("v-if",!0),"inputNumber"===n.type?(l(),d(r(N),{key:4,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l},null,8,["value","onUpdate:value"])):f("v-if",!0),"custom"===n.type&&r(E)(n.contentRender)?(l(),d(y((()=>n.contentRender(n,e.element))),{key:5})):f("v-if",!0)],12,L)):f("v-if",!0)],64);var C,H})),128))]))}});export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.c-field-set{display:flex;flex-flow:column nowrap;height:100%;width:100%}.c-field-set__search-wrapper.n-input{margin-bottom:12px;width:50%}.c-field-set .item{background:#fff}.c-field-set .item:active{background:#f2f2f2;box-shadow:0 0 10px 0 #d5d5d5}.c-field-set .item:focus{background-color:#f2f2f2}.c-field-set .item.disabled{cursor:not-allowed}.c-field-set .item .row{align-items:center;border-bottom:1px solid #e8e8e8;display:flex;height:var(--row-height);padding:5px 0}.c-field-set .table-cell{box-sizing:border-box;color:inherit;display:inline-block;padding:0 5px}.c-field-set .table-cell .highlight{background-color:var(--primary-color);color:#fff}.c-field-set__table-header{align-items:center;background:#f2f2f4;border:1px solid #f2f2f2;display:flex;height:52px}.c-field-set__table-body{flex:1;overflow-y:scroll}.c-field-set__table-footer{border-top:1px solid #d5d5d5;padding:12px 0}
|
|
1
|
+
.c-field-set{display:flex;flex-flow:column nowrap;height:100%;width:100%}.c-field-set__search-wrapper.n-input{margin-bottom:12px;width:50%}.c-field-set .item{background:#fff}.c-field-set .item:active{background:#f2f2f2;box-shadow:0 0 10px 0 #d5d5d5}.c-field-set .item:focus{background-color:#f2f2f2}.c-field-set .item.disabled{cursor:not-allowed}.c-field-set .item .row{align-items:center;border-bottom:1px solid #e8e8e8;display:flex;height:var(--row-height);padding:5px 0}.c-field-set .table-cell{box-sizing:border-box;color:inherit;display:inline-block;padding:0 5px}.c-field-set .table-cell .highlight{background-color:var(--primary-color);color:#fff}.c-field-set__table-header{align-items:center;background:#f2f2f4;border:1px solid #f2f2f2;display:flex;height:52px}.c-field-set__table-header .n-checkbox.n-checkbox--disabled .n-checkbox__label{color:var(--n-text-color)}.c-field-set__table-body{flex:1;overflow-y:scroll}.c-field-set__table-footer{border-top:1px solid #d5d5d5;padding:12px 0}
|
|
@@ -7270,6 +7270,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7270
7270
|
__extra?: boolean | undefined;
|
|
7271
7271
|
}[]>;
|
|
7272
7272
|
onFocus: () => Promise<void>;
|
|
7273
|
+
useVersion: typeof import("..").useVersion;
|
|
7273
7274
|
Draggable: import("vue").DefineComponent<{
|
|
7274
7275
|
list: {
|
|
7275
7276
|
type: ArrayConstructor;
|
|
@@ -8045,6 +8046,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
8045
8046
|
decoratorElement: HTMLElement | null | undefined;
|
|
8046
8047
|
} | null>;
|
|
8047
8048
|
};
|
|
8049
|
+
useVersion: typeof import("..").useVersion;
|
|
8048
8050
|
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
8049
8051
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|
|
8050
8052
|
form: any;
|
|
@@ -14506,6 +14508,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
14506
14508
|
decoratorElement: HTMLElement | null | undefined;
|
|
14507
14509
|
} | null>;
|
|
14508
14510
|
};
|
|
14511
|
+
useVersion: typeof import("..").useVersion;
|
|
14509
14512
|
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
14510
14513
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|
|
14511
14514
|
form: any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="lodash" />
|
|
2
|
+
import { useVersion } from '../../../../es/shared/hooks';
|
|
2
3
|
import { FormLowCodeReactions, AnyFn } from '../../../../es/shared/types';
|
|
3
4
|
import { PropType } from 'vue';
|
|
4
5
|
import { FormConfigItem, FormConfigTextFormatter, FormConfigVisitor } from '../../../../es/components/form-config/src/types';
|
|
@@ -7272,6 +7273,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7272
7273
|
__extra?: boolean | undefined;
|
|
7273
7274
|
}[]>;
|
|
7274
7275
|
onFocus: () => Promise<void>;
|
|
7276
|
+
useVersion: typeof useVersion;
|
|
7275
7277
|
Draggable: import("vue").DefineComponent<{
|
|
7276
7278
|
list: {
|
|
7277
7279
|
type: ArrayConstructor;
|
|
@@ -8047,6 +8049,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8047
8049
|
decoratorElement: HTMLElement | null | undefined;
|
|
8048
8050
|
} | null>;
|
|
8049
8051
|
};
|
|
8052
|
+
useVersion: typeof useVersion;
|
|
8050
8053
|
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
8051
8054
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|
|
8052
8055
|
form: any;
|
|
@@ -14508,6 +14511,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14508
14511
|
decoratorElement: HTMLElement | null | undefined;
|
|
14509
14512
|
} | null>;
|
|
14510
14513
|
};
|
|
14514
|
+
useVersion: typeof useVersion;
|
|
14511
14515
|
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
14512
14516
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|
|
14513
14517
|
form: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,provide as o,ref as t,computed as a,toRaw as r,openBlock as i,createElementBlock as
|
|
1
|
+
import{defineComponent as e,provide as o,ref as t,computed as a,toRaw as r,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,createVNode as u,withCtx as f,createBlock as d,isRef as c,createCommentVNode as p,createTextVNode as v}from"vue";import{useTheme as g}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as h,cloneDeep as _,isFunction as y}from"lodash-es";import"@vue/shared";import{uuidGenerator as C,traverse as x}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as j,NSpace as k}from"naive-ui";import{useVersion as F}from"../../../shared/hooks/useVersion.js";import L from"../../../shared/components/VueDraggable/src/vuedraggable.js";import V from"./components/FormConfigCreator.vue.js";import b from"./components/FormConfigDragDisplay.vue.js";import w from"./components/FormConfigEdit.vue.js";import R from"./components/FormConfigEventSetting.vue.js";import E from"./components/FormConfigMaterialItem.js";import{useDataNormalize as M}from"./hooks/useDataNormalize.js";import{InjectionFormConfigEmit as I,InjectionFieldList as D,InjectionMaterialList as H,InjectionLowCodeReactions as O,InjectionActiveFieldItem as S,FORM_CONFIG_GROUP as N}from"./constants/index.js";import"./utils/index.js";import{useSortableConfig as U}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const A=["id"],B={class:"form-config__material"},T=m("header",{class:"form-config__materialHeader"},"物料区",-1),P={class:"form-config__displayWrapper"},z={class:"form-config__displayHeader"},W={class:"form-config__config"},q=m("header",{class:"form-config__configHeader"},"配置区",-1),G={class:"form-config__configContent"};var J=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]},showLowCodeReactions:Boolean,formProps:{type:Object}},emits:["addItem","removeItem","reactionsValidateFailure"],setup(e,{expose:J,emit:K}){const Q=e;o(I,K);const X=C(),Y=g(),{getCommonConfig:Z}=U(),$=t([]);o(D,$);const ee=t([]);o(H,ee);const oe=t([]);function te(e){$.value.some((o=>o.key===e.key))||$.value.push(e)}o(O,oe);const ae=(e,o)=>y(Q.textFormatter)?Q.textFormatter(e,o):o,re=t();o(S,re);const ie=t(),{transform:se,inverseTransform:le}=M(Q),ne=a({get:()=>null,set(e){if(!e)return;const o=ue.value.find((o=>o.key===e));o&&(o.__extra=!0,ee.value.push(o),K("addItem",o))}}),me=t([]),ue=a((()=>{if(!h(me.value))return[];const e=[];return x([...ee.value,...$.value],(o=>e.push(o.key))),me.value.filter((o=>!e.find((e=>e===o.key))))}));async function fe(){Q.extraMaterialList&&!me.value.length&&(me.value=y(Q.extraMaterialList)?await Q.extraMaterialList():Q.extraMaterialList)}return J({loadData({fieldList:e,lowCodeReactions:o=[]}){let t=[],a=[];e.forEach((e=>function(e){"LINE_BAR"===e.type&&(e.children=[]);!1===e.show?a.push(e):t.push(e),"COMBINATION"===e.type&&h(e.children)&&e.children.length&&e.children.forEach((e=>{e.__isCombinationChild=!0}))}(_(r(e))))),$.value=se(t),ee.value=a,oe.value=o,re.value=void 0},validate(){var e;return null==(e=ie.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:le(_(r($.value)),e,{show:!0}),materialList:le(_(r(ee.value)),e,{show:!1}),lowCodeReactions:_(r(oe.value))}),clearExtraList(){me.value=[]}}),(o,t)=>(i(),s("section",l({class:"form-config",style:{"--max-height":e.maxHeight,...n(Y)},id:n(X)},n(F)()),[m("section",B,[T,u(n(L),l(n(Z)(),{class:"form-config__materialContent",modelValue:ee.value,"onUpdate:modelValue":t[0]||(t[0]=e=>ee.value=e)}),{item:f((({element:e})=>[u(n(E),{"form-config-item":e,"text-formatter":ae,"material-List":ee.value},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),d(n(j),{key:0,class:"form-config__materialExtraList",filterable:"",value:n(ne),"onUpdate:value":t[1]||(t[1]=e=>c(ne)?ne.value=e:null),placeholder:"请选择额外物料",options:n(ue),"label-field":"name","value-field":"key",onFocus:fe},null,8,["value","options"])):p("v-if",!0)]),m("section",P,[m("header",z,[v(" 布局区 "),u(n(k),null,{default:f((()=>[e.showLowCodeReactions?(i(),d(R,{key:0,modelValue:oe.value,"onUpdate:modelValue":t[2]||(t[2]=e=>oe.value=e),onValidateFailure:t[3]||(t[3]=e=>K("reactionsValidateFailure",e))},null,8,["modelValue"])):p("v-if",!0),u(V,{onSubmit:te})])),_:1})]),u(b,{class:"form-config__displayContent",group:n(N),"text-formatter":ae,modelValue:$.value,"onUpdate:modelValue":t[4]||(t[4]=e=>$.value=e)},null,8,["group","modelValue"])]),m("section",W,[q,m("section",G,[u(w,{ref_key:"formConfigEditRef",ref:ie,uuid:n(X),"bind-form-render-ref":e.formRenderRef,"form-props":e.formProps},null,8,["uuid","bind-form-render-ref","form-props"])])])],16,A))}});export{J as default};
|
|
@@ -703,6 +703,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
703
703
|
decoratorElement: HTMLElement | null | undefined;
|
|
704
704
|
} | null>;
|
|
705
705
|
};
|
|
706
|
+
useVersion: typeof import("../../..").useVersion;
|
|
706
707
|
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
707
708
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|
|
708
709
|
form: any;
|
|
@@ -6125,6 +6125,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6125
6125
|
decoratorElement: HTMLElement | null | undefined;
|
|
6126
6126
|
} | null>;
|
|
6127
6127
|
};
|
|
6128
|
+
useVersion: typeof import("../../../../../es/components/index").useVersion;
|
|
6128
6129
|
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
6129
6130
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|
|
6130
6131
|
form: any;
|
|
@@ -690,6 +690,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
690
690
|
decoratorElement: HTMLElement | null | undefined;
|
|
691
691
|
} | null>;
|
|
692
692
|
};
|
|
693
|
+
useVersion: typeof import("..").useVersion;
|
|
693
694
|
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
694
695
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|
|
695
696
|
form: any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormRequestDefine } from '../../../../es/shared/hooks';
|
|
1
|
+
import { FormRequestDefine, useVersion } from '../../../../es/shared/hooks';
|
|
2
2
|
import { AnyObject, FormLowCodeReactions, FormOperationalConfig } from '../../../../es/shared/types';
|
|
3
3
|
import { Field } from '@formily/core';
|
|
4
4
|
import { Component, FunctionalComponent, PropType } from 'vue';
|
|
@@ -685,6 +685,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
685
685
|
decoratorElement: HTMLElement | null | undefined;
|
|
686
686
|
} | null>;
|
|
687
687
|
};
|
|
688
|
+
useVersion: typeof useVersion;
|
|
688
689
|
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
689
690
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|
|
690
691
|
form: any;
|