cnhis-design-vue 3.1.50-beta.2 → 3.1.50-beta.21
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/card-reader-sdk/src/cardReaderSDK.d.ts +1 -0
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/card-reader-sdk/src/insuranceSDK.js +1 -1
- package/es/components/card-reader-sdk/src/types/index.d.ts +1 -1
- package/es/components/card-reader-sdk/src/utils/index.d.ts +0 -3
- package/es/components/card-reader-sdk/src/utils/index.js +1 -1
- package/es/components/classification/index.d.ts +3 -1
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +3 -1
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +3 -1
- package/es/components/classification/src/index.vue.d.ts +3 -1
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +3 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/useEvent.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useEvent.js +1 -1
- package/es/components/field-set/index.d.ts +14 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +14 -1
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/form-config/index.d.ts +422 -73
- package/es/components/form-config/src/FormConfig.vue.d.ts +423 -74
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +120 -23
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +138 -35
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +121 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +1 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -0
- package/es/components/form-config/src/constants/index.d.ts +19 -1
- package/es/components/form-config/src/constants/index.js +1 -1
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-config/src/types/index.d.ts +7 -3
- package/es/components/form-config/style/index.css +1 -1
- package/es/components/form-render/index.d.ts +120 -23
- package/es/components/form-render/src/FormRender.vue.d.ts +119 -22
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +120 -23
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +3 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -5
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +173 -4
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
- package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -1
- package/es/components/form-render/src/hooks/useFormContext.d.ts +15 -2
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +6 -6
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +2 -2
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
- package/es/components/form-render/src/types/index.d.ts +6 -21
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +26 -0
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +26 -0
- package/es/components/iho-table/src/constants/index.d.ts +1 -2
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +3 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +18 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +14 -1
- package/es/components/iho-table/src/utils/index.d.ts +1 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/src/utils/separateMap.d.ts +5 -0
- package/es/components/iho-table/src/utils/separateMap.js +1 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +346 -65
- package/es/components/info-header/src/InfoHeader.vue.d.ts +346 -65
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +86 -3
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +86 -3
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +206 -26
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +120 -23
- package/es/components/search-cascader/index.d.ts +4 -0
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +4 -0
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +121 -23
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +121 -23
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +2 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +2 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +3 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +28 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +20 -0
- package/es/shared/utils/business.d.ts +2 -1
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as e}from"../useDraw.js";import"date-fns";import"lodash-es";import"vue";import"./useShadow.js";import"naive-ui";function i(i,n,o){const{other:
|
|
1
|
+
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as e}from"../useDraw.js";import"date-fns";import"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"naive-ui";function i(i,n,o){const{other:r,vitalSignsOriginY:l,xCellWidth:s,yCellHeight:a,endX:u}=n;let c=0;function h(i,n,o){const r=[];String(i.value).split("").forEach(((n,o)=>{const l=new t.Text(n,{left:0,top:a*o,originX:"center",...e,objectCaching:!1,...i.style||{}});c=(a-(l.height||0))/2,r.push(l)}));const l={originX:"center",left:n,top:o+c,baseTop:(i.baseTop||0)*a,trueLeft:n,trueHeight:r.length*a,objectCaching:!1};return new t.Group(r,l)}!function(){if(!(null==r?void 0:r.list))return!1;const n=[],c=[];r.list.forEach(((t,e)=>{const i=0===e?"vertical":t.align||"vertical",n=o(t.time,!0);if(n>u)return;const r=c.find((t=>t.left==n));if(r)r[i].push(t);else{const e={left:n,vertical:[],horizontal:[]};e[i].push(t),c.push(e)}})),c.forEach((t=>{let e=l.originY,i=t.left;t.vertical.forEach(((o,r)=>{var u,c;const f=(o.baseTop||0)*a,g=(null==(u=n.at(-1))?void 0:u.left)||0;0===r&&t.left<=g&&(i=g+s);if(n.filter((t=>t.trueLeft===i)).length){const t=String(o.value).length*a,r=(null==(c=n.at(-1))?void 0:c.trueHeight)||0;e+=r,e+t+f>l.endY&&(e=l.originY,i+=s)}e+=f,String(o.value).length&&n.push(h(o,i,e))})),t.horizontal.forEach(((e,o)=>{var r;const u=l.originY+(e.baseTop||0)*a,c=(null==(r=n.at(-1))?void 0:r.left)||0;t.left<=c&&(i=c+s),String(e.value).length&&n.push(h(e,i,u))}))}));const f=n.length>0?new t.Group([...n],{...e,objectCaching:!1}):null;f&&i.value.add(f)}()}export{i as useOther};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,defaultStyle as l,drawTextGroup as i,defaultTextStyle as s}from"../useDraw.js";import"date-fns";import"lodash-es";import"vue";import"./useShadow.js";import"naive-ui";function o(o,u){const{grid:h,originX:n,endX:a,xCellWidth:c,gridXNumber:r,top:p,xScalevalueHeight:d,iconsWidth:f,topList:v,endXLimit:g,canvasWidth:y,borderStyle:m}=u;!function(){const S=[];g&&S.push(new t.Line([g,0,y,0],m));let w=0;v.forEach(((t,l)=>{if(l>0&&(w+=u[`${v[l-1].key}Height`]),"xScalevalue"==t.key)!function(t,l,o){const u=p.dayHeight;if(!u)return;l.push(e([n,o+u,a,o+u],m));const d=c*h.subSecondXCell,f=(r-h.surplusXCell)/h.subSecondXCell;for(let h=0;h<f;h++){const a=n+h*d,c=h%2==0?"上午":"下午",r=i({width:d,height:u,...m},{value:c,...s,...t.style||{}},{left:a,top:o});l.push(r),l.push(e([a+d,o,a+d,o+u],m))}}(t,S,w),function(t,l,o){var u;const r=p.xScalevalue.show&&null!=(u=p.dayHeight)?u:0,v=d-r;if(!v)return;l.push(e([f,o+d,a,o+d],m));const g=i({width:n-f,height:d,...m},{value:p.xScalevalue.title,...s,...t.style||{},...t.titleStyle||{}},{left:f,top:o});l.push(g),l.push(e([n,o,n,o+d],m));const y=[];for(let t=0;t<h.mainXCell;t++)y.push(p.xScalevalue.list);y.flat().forEach(((u,h)=>{const a=n+h*c,p=i({width:c,height:v,...m},{value:u.value,...s,...t.style||{},...u.style||{}},{left:a,top:o+r});l.push(p),l.push(e([a+c,o+r,a+c,o+r+v],m))}))}(t,S,w);else{if(!u[`${t.key}Height`])return;const o=u[`${v[l].key}Height`];!function(t,l,o){const a=u[`${t.key}Height`],r=i({width:n-f,height:a,...m},{value:t.title,...s,...(null==t?void 0:t.style)||{},...t.titleStyle||{}},{left:f,top:o});l.push(r);const p=c*h.subXCell;t.list.forEach(((u,h)=>{const c=n+h*p,r=i({width:p,height:a,...m},{value:u,...s,...(null==t?void 0:t.style)||{}},{left:c,top:o});l.push(e([c+p,o,c+p,o+a],m)),l.push(r)}))}(t,S,w),S.push(e([f,w+o,a,w+o],m)),S.push(e([n,w,n,w+o],m))}}));const X=S.length>0?new t.Group([...S],{...l,objectCaching:!1}):null;X&&X.sendToBack(),X&&o.value.add(X)}()}export{o as useTop};
|
|
1
|
+
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,defaultStyle as l,drawTextGroup as i,defaultTextStyle as s}from"../useDraw.js";import"date-fns";import"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"naive-ui";function o(o,u){const{grid:h,originX:n,endX:a,xCellWidth:c,gridXNumber:r,top:p,xScalevalueHeight:d,iconsWidth:f,topList:v,endXLimit:g,canvasWidth:y,borderStyle:m}=u;!function(){const S=[];g&&S.push(new t.Line([g,0,y,0],m));let w=0;v.forEach(((t,l)=>{if(l>0&&(w+=u[`${v[l-1].key}Height`]),"xScalevalue"==t.key)!function(t,l,o){const u=p.dayHeight;if(!u)return;l.push(e([n,o+u,a,o+u],m));const d=c*h.subSecondXCell,f=(r-h.surplusXCell)/h.subSecondXCell;for(let h=0;h<f;h++){const a=n+h*d,c=h%2==0?"上午":"下午",r=i({width:d,height:u,...m},{value:c,...s,...t.style||{}},{left:a,top:o});l.push(r),l.push(e([a+d,o,a+d,o+u],m))}}(t,S,w),function(t,l,o){var u;const r=p.xScalevalue.show&&null!=(u=p.dayHeight)?u:0,v=d-r;if(!v)return;l.push(e([f,o+d,a,o+d],m));const g=i({width:n-f,height:d,...m},{value:p.xScalevalue.title,...s,...t.style||{},...t.titleStyle||{}},{left:f,top:o});l.push(g),l.push(e([n,o,n,o+d],m));const y=[];for(let t=0;t<h.mainXCell;t++)y.push(p.xScalevalue.list);y.flat().forEach(((u,h)=>{const a=n+h*c,p=i({width:c,height:v,...m},{value:u.value,...s,...t.style||{},...u.style||{}},{left:a,top:o+r});l.push(p),l.push(e([a+c,o+r,a+c,o+r+v],m))}))}(t,S,w);else{if(!u[`${t.key}Height`])return;const o=u[`${v[l].key}Height`];!function(t,l,o){const a=u[`${t.key}Height`],r=i({width:n-f,height:a,...m},{value:t.title,...s,...(null==t?void 0:t.style)||{},...t.titleStyle||{}},{left:f,top:o});l.push(r);const p=c*h.subXCell;t.list.forEach(((u,h)=>{const c=n+h*p,r=i({width:p,height:a,...m},{value:u,...s,...(null==t?void 0:t.style)||{}},{left:c,top:o});l.push(e([c+p,o,c+p,o+a],m)),l.push(r)}))}(t,S,w),S.push(e([f,w+o,a,w+o],m)),S.push(e([n,w,n,w+o],m))}}));const X=S.length>0?new t.Group([...S],{...l,objectCaching:!1}):null;X&&X.sendToBack(),X&&o.value.add(X)}()}export{o as useTop};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { fabric } from '../../../../../es/shared/utils/fabricjs';
|
|
3
3
|
import { IPropItems } from '../interface';
|
|
4
|
+
export declare const bus: import("@vueuse/core").UseEventBusReturn<string, any>;
|
|
4
5
|
export declare function useCanvasEvent(canvas: Ref<fabric.Canvas>, propItems: IPropItems, emits: any): {
|
|
5
6
|
select: (key: string) => void;
|
|
6
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fabric as
|
|
1
|
+
import{fabric as e}from"../../../../shared/utils/fabricjs/index.js";import{useEventBus as t}from"@vueuse/core";const n=t("selection");function o(t,n,o){const{originY:l,originX:i,endX:s,endY:r,iconsWidth:d,selectionStyle:h,topList:c}=n;function u(n,o){const{left:l,top:i,width:s,height:r}=n,d=new e.Rect({key:o,left:null!=l?l:0,top:null!=i?i:0,width:s,height:r,stroke:"transparent",fill:"transparent",lockMovementX:!0,lockMovementY:!0,transparentCorners:!1,hasControls:!1,...h,strokeWidth:0});return t.value.add(d),d}let f=[];function a(e){k();p(null==f?void 0:f.find((t=>t.key===e)))}function k(){f.forEach((e=>{e.set("strokeWidth",0),e.key.endsWith("All")&&e.sendToBack()}))}function p(e){var n;t.value.discardActiveObject(),!(null==e?void 0:e.key.includes("grid"))&&(null==e||e.bringToFront()),null==e||e.set("strokeWidth",null!=(n=h.strokeWidth)?n:2)}return("boolean"!=typeof(null==h?void 0:h.evented)||(null==h?void 0:h.evented))&&(f=function(){const e=[];e.push(u({left:d,top:l+1,width:i-d,height:r-l-3},"left"));let t=0;return c.forEach(((o,l)=>{l>0&&(t+=n[`${c[l-1].key}Height`]);const r={top:t+1,height:n[`${o.key}Height`]-1};e.push(u({left:d,width:s-d,...r},o.key+"All")),e.push(u({left:d,width:i-d,...r},o.key+"Title")),e.push(u({left:i,width:s-i,...r},o.key))})),e.push(u({left:i,top:l+1,width:s-i,height:r-l-3},"grid")),e.forEach((e=>{e.key.endsWith("All")?(e.sendToBack(),e.on("mouseup",(t=>{const{button:n,pointer:l}=t;if(1==n){const t=e.key.replace("All",""),n=(null==l?void 0:l.x)&&(null==l?void 0:l.x)<=i?t+"Title":t;e.sendToBack(),a(n),o("select",n)}}))):e.on("mousedown",(()=>{k(),p(e),o("select",e.key)}))})),e}()),{select:a}}export{n as bus,o as useCanvasEvent};
|
|
@@ -53,6 +53,10 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
53
53
|
type: BooleanConstructor;
|
|
54
54
|
default: boolean;
|
|
55
55
|
};
|
|
56
|
+
showSortPriority: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
56
60
|
}, {
|
|
57
61
|
fieldsMapping: Record<string, string>;
|
|
58
62
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -107,6 +111,10 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
107
111
|
type: BooleanConstructor;
|
|
108
112
|
default: boolean;
|
|
109
113
|
};
|
|
114
|
+
showSortPriority: {
|
|
115
|
+
type: BooleanConstructor;
|
|
116
|
+
default: boolean;
|
|
117
|
+
};
|
|
110
118
|
}>> & {
|
|
111
119
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
112
120
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
@@ -150,7 +158,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
150
158
|
handleFieldSave: () => void;
|
|
151
159
|
onCancle: () => void;
|
|
152
160
|
reset: () => void;
|
|
153
|
-
|
|
161
|
+
getShowColumn: (column: import("../../../es/shared/types").AnyObject) => boolean;
|
|
154
162
|
initFields: () => import("../../../es/shared/types").AnyObject[];
|
|
155
163
|
handleGroup: (fields: import("../../../es/shared/types").AnyObject[]) => import("../../../es/shared/types").AnyObject[];
|
|
156
164
|
getTableFields: () => import("lodash").Omit<never, "uuid">[];
|
|
@@ -558,6 +566,10 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
558
566
|
type: BooleanConstructor;
|
|
559
567
|
default: boolean;
|
|
560
568
|
};
|
|
569
|
+
showSortPriority: {
|
|
570
|
+
type: BooleanConstructor;
|
|
571
|
+
default: boolean;
|
|
572
|
+
};
|
|
561
573
|
}>> & {
|
|
562
574
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
563
575
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
@@ -587,5 +599,6 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
587
599
|
isEdit: boolean;
|
|
588
600
|
customColumns: import("./src/types").FieldSetColumnItem[];
|
|
589
601
|
showSearch: boolean;
|
|
602
|
+
showSortPriority: boolean;
|
|
590
603
|
}>>;
|
|
591
604
|
export default FieldSet;
|
|
@@ -55,6 +55,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
55
55
|
type: BooleanConstructor;
|
|
56
56
|
default: boolean;
|
|
57
57
|
};
|
|
58
|
+
showSortPriority: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: boolean;
|
|
61
|
+
};
|
|
58
62
|
}, {
|
|
59
63
|
fieldsMapping: Record<string, string>;
|
|
60
64
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -109,6 +113,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
109
113
|
type: BooleanConstructor;
|
|
110
114
|
default: boolean;
|
|
111
115
|
};
|
|
116
|
+
showSortPriority: {
|
|
117
|
+
type: BooleanConstructor;
|
|
118
|
+
default: boolean;
|
|
119
|
+
};
|
|
112
120
|
}>> & {
|
|
113
121
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
114
122
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
@@ -152,7 +160,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
152
160
|
handleFieldSave: () => void;
|
|
153
161
|
onCancle: () => void;
|
|
154
162
|
reset: () => void;
|
|
155
|
-
|
|
163
|
+
getShowColumn: (column: AnyObject) => boolean;
|
|
156
164
|
initFields: () => AnyObject[];
|
|
157
165
|
handleGroup: (fields: AnyObject[]) => AnyObject[];
|
|
158
166
|
getTableFields: () => import("lodash").Omit<never, "uuid">[];
|
|
@@ -543,6 +551,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
543
551
|
type: BooleanConstructor;
|
|
544
552
|
default: boolean;
|
|
545
553
|
};
|
|
554
|
+
showSortPriority: {
|
|
555
|
+
type: BooleanConstructor;
|
|
556
|
+
default: boolean;
|
|
557
|
+
};
|
|
546
558
|
}>> & {
|
|
547
559
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
548
560
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
@@ -572,5 +584,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
572
584
|
isEdit: boolean;
|
|
573
585
|
customColumns: FieldSetColumnItem[];
|
|
574
586
|
showSearch: boolean;
|
|
587
|
+
showSortPriority: boolean;
|
|
575
588
|
}>;
|
|
576
589
|
export default _default;
|
|
@@ -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
|
|
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,mergeProps as g,renderSlot as x}from"vue";import{useThemeVars as w,NInput as A,NCheckbox as _,NTooltip as S,NIcon as C,NPopconfirm as W,NButton as E}from"naive-ui";import P from"../../../shared/components/VueDraggable/src/vuedraggable.js";import q from"./components/Row.vue.js";import{isArray as F,cloneDeep as N,isString as R,omit as j}from"lodash-es";import{isDisable as B,setStyle as I,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"},V=h("span",null,"数值越小,优先级越高",-1),K=["tabindex"],L={key:1,class:"c-field-set__table-footer"};var G=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}},emits:["save","close","reset"],setup(e,{expose:G,emit:H}){const M=e,$={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},z=l(w().value.primaryColor),J=l(""),Q=l(),X=l([]),Y=l([{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"show"},{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"}]),Z=t((()=>X.value.flat())),ee=i({columns:Y,fieldList:Z,onUpdateChecked:function({checked:e,column:l}){const t=!e||ue(l.field);l.checkedAll=!t}}),le={keyword:J.value,idx:0,startIdx:0},te=()=>{H("save",{tableFields:ae()})},ie=()=>{H("close")};function oe(){X.value=de(),ne(),H("reset")}function de(){const e=N(M.fields).map((e=>({...e,uuid:D()})));return Object.keys($).forEach((l=>{e.forEach((e=>{"old"==M.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[$[l]]=1==e[l]:e[$[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)}))})),function(e){if(M.groupSetting){return U(M.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 ae(){let e=[];return e="old"==M.type?Z.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,...M.isEdit?{required:e.required,editable:e.editable}:{}}))):Z.value,e.map((e=>j(e,["uuid"])))}function re(){const e=le.keyword!==J.value;let l=J.value?Z.value.findIndex(((l,t)=>{var i;if(null==(i=l.title)?void 0:i.includes(J.value))return!!e||t>le.idx})):0;-1!==l||e||(l=le.startIdx),Q.value.scrollTop=52*l,Object.assign(le,{keyword:J.value,idx:l},e?{startIdx:l}:{})}function se(e){var l;return!!J.value&&(null==(l=e.title)?void 0:l.includes(J.value))}function ne(){var e,l;(null==(e=M.showColumnNames)?void 0:e.length)&&(Y.value=Y.value.filter((e=>{var l,t;return"title"===e.field||(null==(t=null==(l=M.showColumnNames)?void 0:l.includes)?void 0:t.call(l,e.field))}))),(null==(l=M.customColumns)?void 0:l.length)&&Y.value.push(...M.customColumns),M.showSeq&&Y.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),Y.value.forEach((e=>{if(e.isShow=function(e){return!(["editable","required"].includes(e.field)&&!M.isEdit||"sortPriority"===e.field&&!M.showSortPriority)}(e),"checkbox"===e.type){const l=X.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!ue(e.field)&&!l}}))}function ue(e){return X.value.flat().some((l=>!B(l,e)&&!l[e]&&"0001"!=l.id))}return o([()=>M.fields,()=>{var e;return null==(e=M.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(X.value=de(),ne())}),{immediate:!0,deep:!0}),G({getTableFields:ae}),(l,t)=>(d(),a("div",{class:"c-field-set",style:r({"--row-height":"52px","--primary-color":z.value})},[e.showSearch?(d(),s(n(A),{key:0,class:"c-field-set__search-wrapper",value:J.value,"onUpdate:value":t[0]||(t[0]=e=>J.value=e),valueModifiers:{trim:!0},placeholder:"请输入字段标题",onKeydown:u(c(re,["prevent"]),["enter"])},null,8,["value","onKeydown"])):f("v-if",!0),h("div",T,[(d(!0),a(p,null,m(Y.value,((e,l)=>(d(),a(p,{key:l},[e.isShow?(d(),a("span",{key:0,class:"table-cell",style:r(n(I)(e))},["checkbox"===e.type?(d(),s(n(_),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void Z.value.forEach((e=>{B(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:y((()=>[v(b(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])):f("v-if",!0),v(" "+b("checkbox"!==e.type?e.title:"")+" ",1),"sortPriority"===e.field?(d(),s(n(S),{key:1,trigger:"hover"},{trigger:y((()=>[k(n(C),{component:n(O),style:{top:"2px"}},null,8,["component"])])),default:y((()=>[V])),_:1})):f("v-if",!0)],4)):f("v-if",!0)],64)))),128))]),h("div",{class:"c-field-set__table-body",ref_key:"tableBodyRef",ref:Q},[k(n(P),{modelValue:X.value,"onUpdate:modelValue":t[1]||(t[1]=e=>X.value=e),animation:"150","item-key":"id",draggable:".item"},{item:y((({element:e,index:l})=>[e.hide?f("v-if",!0):(d(),a("div",{key:0,class:"item",tabindex:l},[n(F)(e)?(d(!0),a(p,{key:0},m(e,((e,t)=>(d(),s(q,g(ee,{key:t,element:e,idx:l+1,"is-highlight":se(e)}),null,16,["element","idx","is-highlight"])))),128)):(d(),s(q,g({key:1},ee,{element:e,idx:l+1,"is-highlight":se(e)}),null,16,["element","idx","is-highlight"]))],8,K))])),_:1},8,["modelValue"])],512),e.footerFlag?(d(),a("div",L,[f(" 底部按钮插槽 "),x(l.$slots,"footer",{},(()=>[k(n(W),{onPositiveClick:oe},{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:ie},{default:y((()=>[v("取消")])),_:1}),k(n(E),{type:"primary",onClick:te},{default:y((()=>[v("保存")])),_:1})]))])):f("v-if",!0)],4))}});export{G as default};
|