cnhis-design-vue 3.1.57 → 3.2.1-alpha.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.
Files changed (146) hide show
  1. package/es/components/button-print/index.d.ts +1 -0
  2. package/es/components/button-print/src/ButtonPrint.vue.d.ts +1 -0
  3. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  4. package/es/components/button-print/src/utils/print.d.ts +15 -3
  5. package/es/components/button-print/src/utils/print.js +1 -1
  6. package/es/components/calendar/index.d.ts +24 -13
  7. package/es/components/calendar/src/Calendar.vue.d.ts +24 -13
  8. package/es/components/calendar/src/Calendar.vue2.js +1 -1
  9. package/es/components/callback/src/components/render/popupMaps.d.ts +292 -2
  10. package/es/components/drag-scroll/index.d.ts +2 -0
  11. package/es/components/drag-scroll/index.js +1 -0
  12. package/es/components/drag-scroll/src/index.d.ts +4 -0
  13. package/es/components/drag-scroll/src/index.js +1 -0
  14. package/es/components/drag-scroll/src/types.d.ts +24 -0
  15. package/es/components/drag-scroll/src/types.js +1 -0
  16. package/es/components/fabric-chart/src/constants/index.d.ts +2 -1
  17. package/es/components/fabric-chart/src/constants/index.js +1 -1
  18. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  19. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  20. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  21. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  22. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  23. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  24. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  25. package/es/components/fabric-chart/src/interface.d.ts +1 -1
  26. package/es/components/fabric-chart/src/utils/index.js +1 -1
  27. package/es/components/field-set/index.d.ts +1 -1
  28. package/es/components/field-set/src/FieldColor.vue.d.ts +3 -2
  29. package/es/components/field-set/src/FieldSet.vue.d.ts +2 -1
  30. package/es/components/field-set/src/Index.vue.d.ts +1 -1
  31. package/es/components/field-set/src/Index.vue2.js +1 -1
  32. package/es/components/field-set/src/TableStyle.vue.d.ts +71 -0
  33. package/es/components/field-set/src/TableStyle.vue.js +1 -0
  34. package/es/components/field-set/src/TableStyle.vue2.js +1 -0
  35. package/es/components/field-set/src/components/Row.vue.d.ts +2 -1
  36. package/es/components/field-set/src/components/Row.vue2.js +1 -1
  37. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
  38. package/es/components/field-set/src/types/index.d.ts +1 -1
  39. package/es/components/field-set/style/index.css +1 -1
  40. package/es/components/form-config/index.d.ts +45 -4
  41. package/es/components/form-config/src/FormConfig.vue.d.ts +45 -4
  42. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +16 -2
  43. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +22 -2
  44. package/es/components/form-render/index.d.ts +16 -2
  45. package/es/components/form-render/index.js +1 -1
  46. package/es/components/form-render/src/FormRender.vue.d.ts +15 -1
  47. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  48. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +16 -2
  49. package/es/components/form-render/src/FormRenderWrapper.vue2.js +1 -1
  50. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  51. package/es/components/form-render/src/components/renderer/index.js +1 -1
  52. package/es/components/form-render/src/components/renderer/select.d.ts +2 -0
  53. package/es/components/form-render/src/components/renderer/select.js +1 -1
  54. package/es/components/form-render/src/components/renderer/simpleComponent.js +1 -1
  55. package/es/components/form-render/src/components/renderer/time.d.ts +7 -0
  56. package/es/components/form-render/src/components/renderer/time.js +1 -0
  57. package/es/components/form-render/src/hooks/index.d.ts +1 -0
  58. package/es/components/form-render/src/hooks/index.js +1 -1
  59. package/es/components/form-render/src/hooks/useAutoHidden.d.ts +1 -1
  60. package/es/components/form-render/src/hooks/useAutoHidden.js +1 -1
  61. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  62. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +6 -4
  63. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
  64. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  65. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  66. package/es/components/form-render/src/hooks/useSelectedSetting.d.ts +5 -0
  67. package/es/components/form-render/src/hooks/useSelectedSetting.js +1 -0
  68. package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
  69. package/es/components/form-render/src/types/index.d.ts +2 -0
  70. package/es/components/form-render/src/utils/business.d.ts +1 -1
  71. package/es/components/form-render/src/utils/business.js +1 -1
  72. package/es/components/form-render/src/utils/index.d.ts +1 -0
  73. package/es/components/form-render/src/utils/index.js +1 -1
  74. package/es/components/iho-table/index.d.ts +276 -0
  75. package/es/components/iho-table/src/IhoTable.vue.d.ts +276 -0
  76. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  77. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -5
  78. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  79. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +2 -1
  80. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
  81. package/es/components/iho-table/src/plugins/dragScrollPlugin.js +1 -1
  82. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
  83. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  84. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  85. package/es/components/iho-table/src/plugins/headerPlugin.js +1 -1
  86. package/es/components/iho-table/src/plugins/index.js +1 -1
  87. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin.js +1 -1
  88. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
  89. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -1
  90. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +1 -1
  91. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  92. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  93. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  94. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  95. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +15 -12
  96. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  97. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
  98. package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -1
  99. package/es/components/iho-table/src/plugins/verticalTablePlugin/constants.d.ts +1 -0
  100. package/es/components/iho-table/src/plugins/verticalTablePlugin/constants.js +1 -0
  101. package/es/components/iho-table/src/plugins/verticalTablePlugin/index.d.ts +1 -0
  102. package/es/components/iho-table/src/plugins/verticalTablePlugin/index.js +1 -0
  103. package/es/components/iho-table/src/plugins/verticalTablePlugin/renderer.d.ts +6 -0
  104. package/es/components/iho-table/src/plugins/verticalTablePlugin/renderer.js +1 -0
  105. package/es/components/iho-table/src/plugins/verticalTablePlugin/types.d.ts +12 -0
  106. package/es/components/iho-table/src/plugins/verticalTablePlugin/types.js +1 -0
  107. package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.d.ts +28 -0
  108. package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.js +1 -0
  109. package/es/components/iho-table/src/types/index.d.ts +10 -1
  110. package/es/components/iho-table/src/types/pluginType.d.ts +3 -1
  111. package/es/components/iho-table/src/utils/index.d.ts +5 -7
  112. package/es/components/iho-table/src/utils/index.js +1 -1
  113. package/es/components/index.css +1 -1
  114. package/es/components/index.d.ts +1 -0
  115. package/es/components/index.js +1 -1
  116. package/es/components/info-header/index.d.ts +37 -4
  117. package/es/components/info-header/src/InfoHeader.vue.d.ts +37 -4
  118. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -0
  119. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -0
  120. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +17 -2
  121. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +16 -2
  122. package/es/components/search-cascader/index.d.ts +1 -1
  123. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +1 -1
  124. package/es/components/search-cascader/src/components/SearchMenu.d.ts +1 -1
  125. package/es/components/shortcut-setter/index.d.ts +17 -2
  126. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +17 -2
  127. package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
  128. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
  129. package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
  130. package/es/components/table-export-field/style/index.css +1 -1
  131. package/es/components/table-export-field/style/table-export-field-iconfont.ttf +0 -0
  132. package/es/shared/assets/img/table_style_1.png.js +1 -0
  133. package/es/shared/assets/img/table_style_2.png.js +1 -0
  134. package/es/shared/assets/img/table_style_3.png.js +1 -0
  135. package/es/shared/assets/img/table_style_4.png.js +1 -0
  136. package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
  137. package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +3 -1
  138. package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -1
  139. package/es/shared/hooks/selectHooks/useSearchContent.d.ts +1 -1
  140. package/es/shared/hooks/selectHooks/useSearchContent.js +1 -1
  141. package/es/shared/package.json.js +1 -1
  142. package/es/shared/types/business.d.ts +15 -6
  143. package/es/shared/utils/business.d.ts +1 -1
  144. package/es/shared/utils/index.d.ts +2 -1
  145. package/es/shared/utils/index.js +1 -1
  146. package/package.json +16 -15
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawText as e,defaultStyle as i,defaultRectStyle as n,drawTextGroup as o,drawLine as l,drawPoint as r}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import{useBirthProcessCumputedPoint as a}from"../useCumputedPoint.js";import"../useEvent.js";import"vue";import{cloneDeep as f}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";function c(c,u,d,m,h){const{computedX:p,getXValue:v}=a(u),{originX:g,endX:x,xCellWidth:L,originYXAxis:X,top:C,canvasWidth:w,borderStyle:Y,treeData:y,xAxis:S,topGridYNumber:j,topGridOriginY:b,topGridYCellHeight:k,topGridEndY:G,event:I}=u,z=new Set;function A(t,e,i){let n;const{content:o}=t.value||{};if(o){const{textStyle:l}=C.data||{},{startLine:s,endLine:a}=e;n=r(o,{fontSize:12,...l,backgroundColor:"#fff",lockMovementX:!0,lockMovementY:!0});const f=E(n,e,i);n&&(n.set(f),n.origin={data:t},$(n),s&&(s.text=n),a&&(a.text=n))}return n}function E(t,e,i){const n=t.width+1,{startLine:o,centerLine:l,endLine:r}=e,s={top:i,originX:"center",originY:"center"};return l&&n<=l.width?s.left=l.x1+l.width/2:r&&n<=r.limitX.x2-r.left?(s.originX="left",s.left=r.left+1):o&&!r&&n<=o.limitX.x2-o.left?(s.originX="left",s.left=o.left+(o.isCustomIcon?5:1)):o&&n<=o.left-o.limitX.x1?(s.originX="right",s.left=o.left-(o.isCustomIcon?5:1)):l?(s.originY="top",s.left=l.x1+l.width/2,s.top=i+1,s.fontSize=10):o&&(s.originX="left",s.originY="top",s.fontSize=10,s.left=o.left,s.top=i+1),s}function M(e,{isCustomIcon:i,isContinue:n,isLeft:o}){const{x:s,y1:a,y2:f,halfY:c}=e;if(!s||s<g||s>x)return;const{lineStyle:u}=C.data||{};let d;const m={left:s,top:c};d=i?r("circle",{fill:u.stroke,...m}):n?r(">",{fill:u.stroke,...m,fontSize:18}):l([s,a,s,c],u);const h=new t.Rect({width:L,height:k,fill:"transparent",left:s-L/2,top:a}),p=new t.Group([d,h],{originX:"center",originY:"center",hasControls:!1,hasBorders:!1,objectCaching:!1,hoverCursor:"pointer",lockMovementY:!0});return p.isLeft=o,p.isCustomIcon=i,$(p),p}function $(t){I.hovered&&(t.on("mouseover",(()=>{W(t,"hover")})),t.on("mouseout",(()=>{m.show=!1}))),t.lockMovementX&&t.lockMovementY||(t.on("moving",(()=>{!function(t){t.setCoords(),t.left<t.limitX.x1&&t.set("left",t.limitX.x1);t.left>t.limitX.x2&&t.set("left",t.limitX.x2)}(t),function(t){if(t.centerLine){const e=t.isLeft?{x1:t.left}:{x2:t.left};t.centerLine.setCoords().set(e)}if(t.text){const e=E(t.text,{startLine:t.isLeft?t:t.nearLine,centerLine:t.centerLine,endLine:t.isLeft?t.nearLine:t},t.top);t.text.setCoords().set(e)}}(t),I.hovered&&W(t)})),t.on("mouseup",(e=>{if(1===e.button){!function(t){t.isLeft?(t.prevLine&&(t.prevLine.limitX.x2=t.left),t.nearLine&&(t.nearLine.limitX.x1=t.left)):(t.nextLine&&(t.nextLine.limitX.x1=t.left),t.nearLine&&(t.nearLine.limitX.x2=t.left))}(t);const e={type:"tree",...t.origin};d("change",e)}})))}function W(t,e="moving"){var i,n,o;const{data:l}=t.origin;m.point={x:t.left,y:t.top};let[r="",s=""]=l.time||[];if("moving"===e){const e=v(t.left);t.isLeft?r=e:s=e,l.time=[r,s],t.text&&(t.text.origin.data.time=[r,s])}m.list=[`开始时间 ${r}`,`结束时间 ${s}`,`流速 ${(null==(i=l.value)?void 0:i.currentSpeed)||""}`,`浓度 ${(null==(n=l.value)?void 0:n.consistence)||""}`,`总量 ${(null==(o=l.value)?void 0:o.total)||""}`],m.show=!0}s(c,{...u,gridYNumber:j,originY:b,yCellHeight:k,endY:G}),function(){var o;const{height:l,list:r,left:s,spaceValue:a}=S;if(!l)return;const f=[],u=X+l/2;r.forEach(((t,i)=>{const n=s+i*L*a;f.push(e([n,u],{value:t.slice(11,16)}))}));const d=f.length>0?new t.Group([...f],{...i,objectCaching:!1}):null;d&&c.value.add(d);const m=new t.Rect({width:w,height:l,left:0,top:X,...n,originX:"left",originY:"top",...Y}),h=e([x+(w-x)/2,u],{value:"总量",...null==(o=C.data)?void 0:o.totalStyle});c.value.add(m,h)}(),function(){var n;const r=(null==(n=null==C?void 0:C.tree)?void 0:n.textStyle)||{},s=[];!function t(i){i.forEach((i=>{var n;const{width:a,height:u,left:d,top:m,title:h=""}=i,v={value:h,...r};(null==(n=i.children)?void 0:n.length)?(v.value=h.split("").join("\n"),t(i.children)):(v.textAlign="left",function(t){if(!(null==t?void 0:t.data)||!Array.isArray(t.data))return;const{lineStyle:e}=C.data||{},i=t.top,n=i+k,o=n-k/2,r={y1:i,y2:n,halfY:o};let s=null;const a=f(t);delete a.data,t.data.forEach(((t,i,n)=>{const{time:f,continue:c}=t,[u,d]=f,m=u&&p(u),h=d&&p(d),v=M({...r,x:m},{isCustomIcon:!h&&!c,isContinue:!1,isLeft:!0}),L=M({...r,x:h},{isCustomIcon:!1,isContinue:!!c});let X;if((v||m<g)&&(L||h>x)){X=l([v?m:g,o,L?h:x,o],e)}const C={startLine:v,centerLine:X,endLine:L};let w,Y;!function(t,e,i){const{startLine:n,centerLine:o,endLine:l}=e,{startLine:r,endLine:s}=t||{};if(n){n.origin=i;const t={x1:g,x2:l?l.left:x};s?(t.x1=s.left,s.limitX.x2=n.left,n.prevLine=s,s.nextLine=n):r&&(t.x1=r.left,r.limitX.x2=n.left,n.prevLine=r,r.nextLine=n),n.limitX=t,o&&(n.centerLine=o)}if(l){l.origin=i;const t={x1:n?n.left:g,x2:x};l.limitX=t,o&&(l.centerLine=o)}n&&l&&(n.nearLine=l,l.nearLine=n)}(s,C,Object.assign({},a,{data:t,index:i})),s&&(w=A(n[i-1],s,o)),i===n.length-1&&(Y=A(t,C,o)),s=C,X&&z.add(X),v&&z.add(v),L&&z.add(L),w&&z.add(w),Y&&z.add(Y)}))}(i),function(t){var i;if(!(null==t?void 0:t.total))return;const n=t.top+k/2,o=x+(w-x)/2,l=e([o,n],{value:t.total,...null==(i=C.data)?void 0:i.totalStyle}),r=w-Y.strokeWidth;o+l.width>r&&l.set({originX:"right",left:r});l&&c.value.add(l)}(i)),s.push(o({width:a,height:u,...Y},v,{left:d,top:m},!0))}))}(y);const a=s.length>0?new t.Group([...s],{...i,objectCaching:!1}):null;a&&c.value.add(a),z.size&&c.value.add(...z)}()}export{c as useTop};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawText as e,defaultStyle as i,defaultRectStyle as n,drawTextGroup as o,drawLine as l,drawPoint as r}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import{useBirthProcessCumputedPoint as a}from"../useCumputedPoint.js";import"../useEvent.js";import"vue";import{cloneDeep as f}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";function c(c,u,d,m,h){const{computedX:v,getXValue:p}=a(u),{originX:g,endX:x,xCellWidth:L,originYXAxis:X,top:C,canvasWidth:w,borderStyle:Y,treeData:y,xAxis:S,topGridYNumber:j,topGridOriginY:b,topGridYCellHeight:k,topGridEndY:G,event:I}=u,z=new Set;function A(t,e,i){let n;const{content:o}=t.value||{};if(o){const{textStyle:l}=C.data||{},{startLine:s,endLine:a}=e;n=r(o,{fontSize:12,...l,backgroundColor:"#fff",lockMovementX:!0,lockMovementY:!0});const f=E(n,e,i);n&&(n.set(f),n.origin={data:t},$(n),s&&(s.text=n),a&&(a.text=n))}return n}function E(t,e,i){const n=t.width+1,{startLine:o,centerLine:l,endLine:r}=e,s={top:i,originX:"center",originY:"center"};return l&&n<=l.width?s.left=l.x1+l.width/2:r&&n<=r.limitX.x2-r.left?(s.originX="left",s.left=r.left+1):o&&!r&&n<=o.limitX.x2-o.left?(s.originX="left",s.left=o.left+(o.isCustomIcon?5:1)):o&&n<=o.left-o.limitX.x1?(s.originX="right",s.left=o.left-(o.isCustomIcon?5:1)):l?(s.originY="top",s.left=l.x1+l.width/2,s.top=i+1,s.fontSize=10):o&&(s.originX="left",s.originY="top",s.fontSize=10,s.left=o.left,s.top=i+1),s}function M(e,{isCustomIcon:i,isContinue:n,isLeft:o}){const{x:s,y1:a,y2:f,halfY:c}=e;if(!s||s<g||s>x)return;const{lineStyle:u}=C.data||{};let d;const m={left:s,top:c};d=i?r("circle",{fill:u.stroke,...m}):n?r(">",{fill:u.stroke,...m,fontSize:18}):l([s,a,s,c],u);const h=new t.Rect({width:L,height:k,fill:"transparent",left:s-L/2,top:a}),v=new t.Group([d,h],{originX:"center",originY:"center",hasControls:!1,hasBorders:!1,objectCaching:!1,hoverCursor:"pointer",lockMovementY:!0});return v.isLeft=o,v.isCustomIcon=i,$(v),v}function $(t){I.hovered&&(t.on("mouseover",(()=>{W(t,"hover")})),t.on("mouseout",(()=>{m.show=!1}))),t.lockMovementX&&t.lockMovementY||(t.on("moving",(()=>{!function(t){t.setCoords(),t.left<t.limitX.x1&&t.set("left",t.limitX.x1);t.left>t.limitX.x2&&t.set("left",t.limitX.x2)}(t),function(t){if(t.centerLine){const e=t.isLeft?{x1:t.left}:{x2:t.left};t.centerLine.setCoords().set(e)}if(t.text){const e=E(t.text,{startLine:t.isLeft?t:t.nearLine,centerLine:t.centerLine,endLine:t.isLeft?t.nearLine:t},t.top);t.text.setCoords().set(e)}}(t),I.hovered&&W(t)})),t.on("mouseup",(e=>{if(1===e.button){!function(t){t.isLeft?(t.prevLine&&(t.prevLine.limitX.x2=t.left),t.nearLine&&(t.nearLine.limitX.x1=t.left)):(t.nextLine&&(t.nextLine.limitX.x1=t.left),t.nearLine&&(t.nearLine.limitX.x2=t.left))}(t);const e={type:"tree",...t.origin};d("change",e)}})))}function W(t,e="moving"){var i,n,o;const{data:l}=t.origin;m.point={x:t.left,y:t.top};let[r="",s=""]=l.time||[];if("moving"===e){const e=p(t.left);t.isLeft?r=e:s=e,l.time=[r,s],t.text&&(t.text.origin.data.time=[r,s])}m.list=[`开始时间 ${r}`,`结束时间 ${s}`,`流速 ${(null==(i=l.value)?void 0:i.currentSpeed)||""}`,`浓度 ${(null==(n=l.value)?void 0:n.consistence)||""}`,`总量 ${(null==(o=l.value)?void 0:o.total)||""}`],m.show=!0}s(c,{...u,gridYNumber:j,originY:b,yCellHeight:k,endY:G}),function(){var o;const{height:l,list:r,left:s,spaceValue:a}=S;if(!l)return;const f=[],u=X+l/2;r.forEach(((t,i)=>{const n=s+i*L*a;f.push(e([n,u],{value:t.slice(11,16)}))}));const d=f.length>0?new t.Group([...f],{...i,objectCaching:!1}):null;d&&c.value.add(d);const m=new t.Rect({width:w,height:l,left:0,top:X,...n,originX:"left",originY:"top",...Y});c.value.add(m);const{show:h=!0}=C;if(!h)return;const v=e([x+(w-x)/2,u],{value:"总量",...null==(o=C.data)?void 0:o.totalStyle});c.value.add(v)}(),function(){var n;const r=(null==(n=null==C?void 0:C.tree)?void 0:n.textStyle)||{},s=[];!function t(i){i.forEach((i=>{var n;const{width:a,height:u,left:d,top:m,title:h=""}=i,p={value:h,...r};(null==(n=i.children)?void 0:n.length)?(p.value=h.split("").join("\n"),t(i.children)):(p.textAlign="left",function(t){if(!(null==t?void 0:t.data)||!Array.isArray(t.data))return;const{lineStyle:e}=C.data||{},i=t.top,n=i+k,o=n-k/2,r={y1:i,y2:n,halfY:o};let s=null;const a=f(t);delete a.data,t.data.forEach(((t,i,n)=>{const{time:f,continue:c}=t,[u,d]=f,m=u&&v(u),h=d&&v(d),p=M({...r,x:m},{isCustomIcon:!h&&!c,isContinue:!1,isLeft:!0}),L=M({...r,x:h},{isCustomIcon:!1,isContinue:!!c});let X;if((p||m<g)&&(L||h>x)){X=l([p?m:g,o,L?h:x,o],e)}const C={startLine:p,centerLine:X,endLine:L};let w,Y;!function(t,e,i){const{startLine:n,centerLine:o,endLine:l}=e,{startLine:r,endLine:s}=t||{};if(n){n.origin=i;const t={x1:g,x2:l?l.left:x};s?(t.x1=s.left,s.limitX.x2=n.left,n.prevLine=s,s.nextLine=n):r&&(t.x1=r.left,r.limitX.x2=n.left,n.prevLine=r,r.nextLine=n),n.limitX=t,o&&(n.centerLine=o)}if(l){l.origin=i;const t={x1:n?n.left:g,x2:x};l.limitX=t,o&&(l.centerLine=o)}n&&l&&(n.nearLine=l,l.nearLine=n)}(s,C,Object.assign({},a,{data:t,index:i})),s&&(w=A(n[i-1],s,o)),i===n.length-1&&(Y=A(t,C,o)),s=C,X&&z.add(X),p&&z.add(p),L&&z.add(L),w&&z.add(w),Y&&z.add(Y)}))}(i),function(t){var i;if(!(null==t?void 0:t.total))return;const n=t.top+k/2,o=x+(w-x)/2,l=e([o,n],{value:t.total,...null==(i=C.data)?void 0:i.totalStyle}),r=w-Y.strokeWidth;o+l.width>r&&l.set({originX:"right",left:r});l&&c.value.add(l)}(i)),s.push(o({width:a,height:u,...Y},p,{left:d,top:m},!0))}))}(y);const a=s.length>0?new t.Group([...s],{...i,objectCaching:!1}):null;a&&c.value.add(a),z.size&&c.value.add(...z)}()}export{c as useTop};
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as i,defaultStyle as n,drawPoint as o,drawText as l,drawArrow as s}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import"date-fns";import{isOneLine as a,getType as u,isOverlapPoint as c,isValidValue as d,setOtherType as p,isEffectiveNode as f,getTime as h,getIndex as v,deleteProperty as g}from"../../utils/index.js";import"../useEvent.js";import{useCommon as y}from"../useCommon.js";import"vue";import{cloneDeep as m,flatten as b}from"lodash-es";import"naive-ui";import"@vueuse/core";import{TEMPERATURE_MENU as x,PAIN_MENU as j,OVERLAP as w}from"../../constants/index.js";function k(k,S,Y,E,M,$,O,C,P,A){r(k,S);const{getEqualXTypes:I,handleAddPrevent:R}=y(k,Y,S),{createShadowLines:T}=t(),{left:V,xScaleList:X,xCellWidth:z,yCellHeight:D,originX:F,endX:H,originY:_,endY:W,itemList:q,event:G,vitalSignsOriginY:B,painOriginY:J,hospitalizationDate:K,config:N,canvasHeight:Q}=S,U=new Set,Z=["xinmai","mai"],ee=new Map,te=new Set,ie=new Set,ne=new Set,oe=m(V.yScaleValue);function le(t){var o;const l=oe.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(U.size&&k.value.remove(...U),U.clear(),ee.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=ee.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}const o=function(){const e=[],t=[],i=[];for(const e of ee)t.push(e[1]),e[0]===Z[0]&&e[1].forEach((e=>{(ee.get(Z[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],s=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),r=o.findIndex((e=>e[0]===t)),a=n[i],u=o[r],c=n[i-1],d=n[i+1],p=o[r-1],f=o[r+1];if(c&&p){if(c[0]!==p[0]){const e=Math.max(c[0],p[0]);l.push([c,p].find((t=>t[0]===e)))}}else c?l.push(c):p&&s.push(p);const h=Math.min(a[1],u[1]);l.push([a,u].find((e=>e[1]===h)));const v=Math.max(a[1],u[1]);s.push([a,u].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=t.at(-1);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(d&&f){if(d[0]!==f[0]){const e=Math.min(d[0],f[0]);l.push([d,f].find((t=>t[0]===e))),g()}}else d?(l.push(d),g()):f?(s.push(f),g()):g()})),e}(),{mode:s,style:r={}}=l.shadow||{};o.forEach((t=>{const o=t.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...n,...r,strokeWidth:1});if(["slash","line"].includes(s)){l.set({fill:"transparent",stroke:r.stroke||"#f00"});const e=[];if(["slash"].includes(s))e.push(...T(t,r._angle,r.space)),e.forEach((e=>{Object.assign(e,{...n,...r}),U.add(e)}));else{const n=function(e){const t=e.reduce(((e,t)=>{const i=Math.trunc(t[0]);return e[i]=e[i]?e[i].concat([t]):[t],e}),{}),i=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return i}(t);n.forEach((t=>{const n=i([...b(t)],{...r,originX:"center"});e.push(n),U.add(n)}))}k.value.add(...e)}U.add(l),k.value.add(l)}))}}function se(){var e;const t=oe.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const i=Object.assign({},w,V.overlap||{}),l=[];te.size&&[...te].forEach((e=>{[...ie].forEach((t=>{if(t.origin&&c(e,t)){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...n,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),"humai"===e&&(r="circle"),l.push(o(r,{...i[e]||{},...s}))}}}))})),setTimeout((()=>{k.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ne.add(e)}))}))}function re(e,t,r){var u;const{type:c,riseStyle:f={},noRiseStyle:h={},verifiedStyle:v={},reduceStyle:g={},pacemaker:y={},upArrowStyle:m={},limitValueStyle:b={},nonePainPointStyle:x={},belowMinValueStyle:j={},dataList:w=[],list:E=[]}=r,{type:$,textStyle:C,showConnectLine:A=!1}=x,I=[],R=[],T=[];let V=null;null==(u=e.list)||u.forEach(((u,x)=>{const X=a(c)?w.find((e=>e.key===u.key)):e,F=ce(u,r),H=e.list[x+1],_=H?ce(H,r):void 0,W=H?a(c)?w.find((e=>e.key===H.key)):e:{},{title:q=""}=X;if(!("脉搏"===q&&"脉搏"!==W.title||"脉搏"!==q&&"脉搏"===W.title)&&F&&_&&Math.abs(F[0]-_[0])<=1){const e=F[0]-z/2;F[0]=e+z/4,_[0]=V=F[0]+z/2}else F&&V&&(F[0]=V),V=null;const K={};K.value=function(e,t,i){if(!(null==e?void 0:e.length)||!N.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=B.originY+D?e[1]+D:e[1]-D,s=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return T.push(s),{obj:s,top:-D}}(F,u,X),function(e,t,r,a){var u,p;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(c))return;const{lineAttr:y={}}=r,{value:m}=a;let b,x,j,w,k;if(t.noRise&&h.show){const t=L(h)?M(c,E,35):e[1];if(h.text)j=l([e[0],L(h)?t:t+5],{value:h.text.split("").join("\n"),originY:"top",...h.style});else{const i=t+2*D;j=s([e[0],t,i],{...h.style})}T.push(j)}t.rise&&f.show&&f.text&&(w=l([e[0],e[1]-(m?D:0)-5],{value:f.text.split("").join("\n"),originY:"bottom",...f.style}),T.push(w));t.verified&&(k=l([e[0],e[1]-(m?D:0)-5],{value:"v",originX:"center",originY:"bottom",...v}),T.push(k));if(d(t.physicsReduce)||d(t.drugReduce)){const l=M(c,E,null!=(u=t.physicsReduce)?u:t.drugReduce),s=l<e[1]&&(null==N?void 0:N.hypothermyViewCustom)?e[0]+z/2:e[0];b=i([...e,s,l],{...y,...g.line,...n}),x=o((null==(p=null==g?void 0:g.point)?void 0:p.type)||"circle",{left:s,top:l,...g.point,...n,originY:l===Q?"bottom":"center"}),b&&T.push(b),x&&T.push(x)}Object.assign(a,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:j,top:h.text?5:2*D,isFixed:L(h)},riseText:{obj:w,top:(m?-D:0)-5},verifiedText:{obj:k,top:(m?-D:0)-5},reducePoint:{obj:x,type:"reduce"}})}(F,u,X,K),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(c))return;const o=Math.max(...E),r=Math.min(...E);let a,u,d;const{upArrowShow:p=!1,limitValueShow:f=!1}=i;if(p&&+t.value>180){let t=e[1]-2.5*D,i=[e[1]-D/2,t];t<B.originY&&(t=e[1]+2.5*D,i=[t,e[1]+D/2]),a=s([e[0],i[0],i[1]],m,"up"),T.push(a)}if(f){const i={value:t.value,originX:"center",originY:"center",...b};if(+t.value>o){const t=a?e[1]+D/2+a.height:e[1]+D;u=l([e[0],t],i),T.push(u)}+t.value<r&&(u=l([e[0],e[1]-D],i),T.push(u))}if(j.show&&+t.value<r){const t=e[1];if(j.text)d=l([e[0],e[1]+5],{value:j.text.split("").join("\n"),originY:"top",...j.style});else{const i=t+2*D;d=s([e[0],t,i],{...j.style})}T.push(d)}Object.assign(n,{upArrow:{obj:a},limitValue:{obj:u,top:-D},belowMinValue:{obj:d,top:j.text?5:2*D,moveHide:!0}})}(F,u,X,K),function(n,l,s,a,u,d){let f,h;const{pointAttr:v={},lineAttr:g={},title:m="",key:b,type:x="circle"}=u,j=e.list[a+1],w=ae(c,e.list[a].value),L=l&&ae(c,j.value);if(n&&l&&!s.breakpoint&&(!w&&!L||A)&&n[0]!==l[0]){h=i([...n,...l],{...g});const{obj:e}=(null==d?void 0:d.reducePoint)||{};if((null==e?void 0:e.top)<n[1]&&(null==N?void 0:N.hypothermyViewCustom)){const t=i([e.left,e.top,...l],{...g});T.unshift(t),Object.assign(d,{reduceRightLine:{obj:t,type:"reduce"}}),h.set("stroke","transparent")}}const E=s.pacemakerShow&&"pulse"==c?y.value:w&&"number"===$?0:x,M=R[a-1],V={origin:{data:s,title:m,key:b||"",unit:r.unit,type:c,_type:p(m,c),dataIndex:t,index:a},leftLine:M,rightLine:h,otherObj:d,lockMovementX:!0,...s.pacemakerShow&&"pulse"==c?y.style:v,...S.event.hovered?S.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:S.event,...w?{selectable:!1,evented:!1,..."number"===$?C:{}}:{}};n&&(M?V.leftLine.set("x2",n[0]):V.leftLine=null,f=o(E,{left:n[0],top:w?n[1]-5:n[1],...V}));R.push(h),f&&(m.includes("脉搏")?te.add(f):ie.add(f),function(e){G.hovered&&(e.on("mouseover",(()=>{ue(e,"hover")})),e.on("mouseout",(()=>{P.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?J:B;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0,isFixed:l,moveHide:s=!1}=t||{};"reduce"!==n&&i&&("line"===n?i.setCoords().set({x1:e.left,y1:e.top}):(l||i.setCoords().set({left:e.left,top:e.top+o}),s&&(k.value.remove(i),delete e.otherObj.obj)))})),le(e)}(e),G.hovered&&ue(e)})),e.on("mouseup",(t=>{if(P.show=!1,1===t.button){const{type:t}=e.origin,i=O(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};k.value.discardActiveObject(),Y("change",n),pe(n,"change")}}))}(f),I.push(f),ne.add(f))}(F,_,u,x,X,K)})),"pulse"===c&&Z.forEach((e=>{ee.set(e,I.filter((t=>{var i;return(null==(i=t.origin)?void 0:i.key)===e})).map((e=>[e.left,e.top])))})),Promise.all(I).then((e=>{const t=R.filter((e=>e));Promise.all(T).then((i=>{k.value.add(...t,...e,...i),e.forEach((t=>{null==t||t.bringToFront(),function(e,t){if("pulse"===e.origin.type){t.filter((t=>t.left===e.left&&"pulse"===t.origin.type)).length>1&&(e.leftLine&&k.value.remove(e.leftLine),e.rightLine&&k.value.remove(e.rightLine))}}(t,e)}))}))}))}function ae(e,t){return"pain"===e&&0==t}function ue(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;P.point={x:e.left,y:e.top},P.list=[function(){const{drugReduce:s,physicsReduce:r}=l||{},a="hover"===t?l.value:O(o,e.top);if(d(s))return`药物降${"pain"==o?"痛":"温"} ${a}—>${s}${n||""}`;if(d(r))return`物理降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;return`${i} ${a}${n||""}`}(),`时间 ${((null==l?void 0:l.time)||$(e.left)).slice(-5)}`],P.show=!0}function ce(e,t){const i="pain"===t.type?J:B;if(!f(e)||!function(e){const[t]=X,i=X.at(-1),n=t.start,o=i.end,l=h(e);return l>=n&&l<=o}(e.time))return;const n=E(e.time),o=M(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}function de(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=h(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=h(`${$(e)}:00`);return K&&l<h(K)?(R("exceedMin"),!1):!(l>o)||(R("exceedMax"),!1)}function pe(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=oe.find((e=>e.type===i));if("add"===t){const e=a(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=v(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;fe()}function fe(){var e;ne.size&&(null==(e=k.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...ne]))),ee.clear(),ne.clear(),te.clear(),ie.clear(),oe.forEach((e=>{e.dataList.forEach(((t,i)=>{a(e.type)&&!t.enable||re(t,i,e)}))})),le(),se()}return ee.clear(),te.clear(),ie.clear(),oe.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=M(e.type,e.list,e.positionLine.value),n=i([F,t,H,t],e.positionLine);k.value.add(n)}(e),e.dataList.forEach(((t,i)=>{!t.show||a(e.type)&&!t.enable||re(t,i,e)}))})),le(),se(),k.value.on("mouse:up",(e=>{const{button:t,target:i,pointer:n={}}=e;if(3===t){if(!S.event.evented)return;const{x:e=0,y:t=0}=n;if(e>=F&&e<=H&&t>=_&&t<=W){A.point={x:e,y:t},A.show=!0;const{type:o}=(null==i?void 0:i.origin)||{};if(i&&["temperature","pain"].includes(o))"temperature"===o&&(A.list=[...x]),"pain"===o&&(A.list=[...j]),A.target=i;else{A.target=null,A.list=["新增节点"],q.forEach((i=>{if(!I([...ne],e,"_type").includes(i.bigType)){const e=["pain"].includes(i.bigType)?J:B;t>=e.originY&&t<=e.endY&&A.list.push({renderItem:C?C(i):()=>i.title,origin:{title:i.title,unit:i.unit,type:u(i.bigType),dataIndex:i.dataIndex,key:i.key},pointer:n})}}));const i=de(e);i&&1!==A.list.length||(A.show=!1,1===A.list.length&&i&&R("repeat"))}}}if(1===t){if(i)return;const{x:e=0,y:t=0}=n;e>=F&&e<=H&&t>0&&t<Q&&Y("click:grid",{x:e,y:t,time:$(e)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=g(i,[...x,...j]);s[`${e.type}`]=e.value,a(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};Y("change",r),pe(r,"change")}else{const t={data:{time:$(e.pointer.x),value:O(e.origin.type,e.pointer.y),...a(e.origin.type)?{key:e.origin.key}:{}},...e.origin};Y("add",t),pe(t)}},setPopup:ue,isAddPoint:de,updateData:pe,redrawPoints:fe,gridPoints:ne}}function L(e){return"fixed"===e.position}export{k as useCenter};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as i,defaultStyle as n,drawPoint as o,drawText as l,drawArrow as s}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import"date-fns";import{isOneLine as a,getType as u,isOverlapPoint as c,getFloorNumber as d,isValidValue as p,setOtherType as f,isEffectiveNode as h,getTime as v,getIndex as g,deleteProperty as y}from"../../utils/index.js";import"../useEvent.js";import{useCommon as m}from"../useCommon.js";import"vue";import{cloneDeep as x,flatten as b}from"lodash-es";import"naive-ui";import"@vueuse/core";import{TEMPERATURE_MENU as j,PAIN_MENU as w,OVERLAP as L}from"../../constants/index.js";function k(k,Y,E,M,$,O,C,P,A,I){r(k,Y);const{getEqualXTypes:R,handleAddPrevent:T}=m(k,E,Y),{createShadowLines:V}=t(),{left:X,xScaleList:z,xCellWidth:D,yCellHeight:F,originX:H,endX:_,originY:W,endY:q,itemList:G,event:B,vitalSignsOriginY:J,painOriginY:K,hospitalizationDate:N,config:Q,canvasHeight:U}=Y,Z=new Set,ee=["xinmai","mai"],te=new Map,ie=new Set,ne=new Set,oe=new Set,le=x(X.yScaleValue);function se(t){var o;const l=le.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(Z.size&&k.value.remove(...Z),Z.clear(),te.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=te.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}const o=function(){const e=[],t=[],i=[];for(const e of te)t.push(e[1]),e[0]===ee[0]&&e[1].forEach((e=>{(te.get(ee[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],s=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),r=o.findIndex((e=>e[0]===t)),a=n[i],u=o[r],c=n[i-1],d=n[i+1],p=o[r-1],f=o[r+1];if(c&&p){if(c[0]!==p[0]){const e=Math.max(c[0],p[0]);l.push([c,p].find((t=>t[0]===e)))}}else c?l.push(c):p&&s.push(p);const h=Math.min(a[1],u[1]);l.push([a,u].find((e=>e[1]===h)));const v=Math.max(a[1],u[1]);s.push([a,u].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=t.at(-1);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(d&&f){if(d[0]!==f[0]){const e=Math.min(d[0],f[0]);l.push([d,f].find((t=>t[0]===e))),g()}}else d?(l.push(d),g()):f?(s.push(f),g()):g()})),e}(),{mode:s,style:r={}}=l.shadow||{};o.forEach((t=>{const o=t.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...n,...r,strokeWidth:1});if(["slash","line"].includes(s)){l.set({fill:"transparent",stroke:r.stroke||"#f00"});const e=[];if(["slash"].includes(s))e.push(...V(t,r._angle,r.space)),e.forEach((e=>{Object.assign(e,{...n,...r}),Z.add(e)}));else{const n=function(e){const t=e.reduce(((e,t)=>{const i=Math.trunc(t[0]);return e[i]=e[i]?e[i].concat([t]):[t],e}),{}),i=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return i}(t);n.forEach((t=>{const n=i([...b(t)],{...r,originX:"center"});e.push(n),Z.add(n)}))}k.value.add(...e)}Z.add(l),k.value.add(l)}))}}function re(){var e;const t=le.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const i=Object.assign({},L,X.overlap||{}),l=[];ie.size&&[...ie].forEach((e=>{[...ne].forEach((t=>{if(t.origin&&c(e,t)){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...n,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),"humai"===e&&(r="circle"),l.push(o(r,{...i[e]||{},...s}))}}}))})),setTimeout((()=>{k.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),oe.add(e)}))}))}function ae(e,t,r){var u;const{type:c,riseStyle:h={},noRiseStyle:v={},verifiedStyle:g={},reduceStyle:y={},pacemaker:m={},upArrowStyle:x={},limitValueStyle:b={},nonePainPointStyle:j={},belowMinValueStyle:w={},dataList:L=[],list:M=[]}=r,{type:O,textStyle:P,showConnectLine:I=!1}=j,R=[],T=[],V=[];let X=null;if(null==(u=e.list)||u.forEach(((u,j)=>{const z=a(c)?L.find((e=>e.key===u.key)):e,H=de(u,r),_=e.list[j+1],W=_?de(_,r):void 0,q=_?a(c)?L.find((e=>e.key===_.key)):e:{},{title:G=""}=z;if("脉搏"===G&&"脉搏"!==q.title||"脉搏"!==G&&"脉搏"===q.title||!H||!W||d(H[0],1)!==d(W[0],1))H&&X&&(H[0]=X),X=null;else{const e=H[0]-D/2;H[0]=e+D/4,W[0]=X=H[0]+D/2}const N={};N.value=function(e,t,i){if(!(null==e?void 0:e.length)||!Q.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=J.originY+F?e[1]+F:e[1]-F,s=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return V.push(s),{obj:s,top:-F}}(H,u,z),function(e,t,r,a){var u,d;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(c))return;const{lineAttr:f={}}=r,{value:m}=a;let x,b,j,w,L;if(t.noRise&&v.show){const t=S(v)?$(c,M,35):e[1];if(v.text)j=l([e[0],S(v)?t:t+5],{value:v.text.split("").join("\n"),originY:"top",...v.style});else{const i=t+2*F;j=s([e[0],t,i],{...v.style})}V.push(j)}t.rise&&h.show&&h.text&&(w=l([e[0],e[1]-(m?F:0)-5],{value:h.text.split("").join("\n"),originY:"bottom",...h.style}),V.push(w));t.verified&&(L=l([e[0],e[1]-(m?F:0)-5],{value:"v",originX:"center",originY:"bottom",...g}),V.push(L));if(p(t.physicsReduce)||p(t.drugReduce)){const l=$(c,M,null!=(u=t.physicsReduce)?u:t.drugReduce),s=l<e[1]&&(null==Q?void 0:Q.hypothermyViewCustom)?e[0]+D/2:e[0];x=i([...e,s,l],{...f,...y.line,...n}),b=o((null==(d=null==y?void 0:y.point)?void 0:d.type)||"circle",{left:s,top:l,...y.point,...n,originY:l===U?"bottom":"center"}),x&&V.push(x),b&&V.push(b)}Object.assign(a,{reduceLine:{obj:x,type:"line"},noRiseText:{obj:j,top:v.text?5:2*F,isFixed:S(v)},riseText:{obj:w,top:(m?-F:0)-5},verifiedText:{obj:L,top:(m?-F:0)-5},reducePoint:{obj:b,type:"reduce"}})}(H,u,z,N),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(c))return;const o=Math.max(...M),r=Math.min(...M);let a,u,d;const{upArrowShow:p=!1,limitValueShow:f=!1}=i;if(p&&+t.value>180){let t=e[1]-2.5*F,i=[e[1]-F/2,t];t<J.originY&&(t=e[1]+2.5*F,i=[t,e[1]+F/2]),a=s([e[0],i[0],i[1]],x,"up"),V.push(a)}if(f){const i={value:t.value,originX:"center",originY:"center",...b};if(+t.value>o){const t=a?e[1]+F/2+a.height:e[1]+F;u=l([e[0],t],i),V.push(u)}+t.value<r&&(u=l([e[0],e[1]-F],i),V.push(u))}if(w.show&&+t.value<r){const t=e[1];if(w.text)d=l([e[0],e[1]+5],{value:w.text.split("").join("\n"),originY:"top",...w.style});else{const i=t+2*F;d=s([e[0],t,i],{...w.style})}V.push(d)}Object.assign(n,{upArrow:{obj:a},limitValue:{obj:u,top:-F},belowMinValue:{obj:d,top:w.text?5:2*F,moveHide:!0}})}(H,u,z,N),function(n,l,s,a,u,d){let p,h;const{pointAttr:v={},lineAttr:g={},title:y="",key:x,type:b="circle"}=u,j=e.list[a+1],w=ue(c,e.list[a].value),L=l&&ue(c,j.value);if(n&&l&&!s.breakpoint&&(!w&&!L||I)){h=i([...n,...l],{...g});const{obj:e}=(null==d?void 0:d.reducePoint)||{};if((null==e?void 0:e.top)<n[1]&&(null==Q?void 0:Q.hypothermyViewCustom)){const t=i([e.left,e.top,...l],{...g});V.unshift(t),Object.assign(d,{reduceRightLine:{obj:t,type:"reduce"}}),h.set("stroke","transparent")}}const S=s.pacemakerShow&&"pulse"==c?m.value:w&&"number"===O?0:b,M=T[a-1],$={origin:{data:s,title:y,key:x||"",unit:r.unit,type:c,_type:f(y,c),dataIndex:t,index:a},leftLine:M,rightLine:h,otherObj:d,lockMovementX:!0,...s.pacemakerShow&&"pulse"==c?m.style:v,...Y.event.hovered?Y.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:Y.event,...w?{selectable:!1,evented:!1,..."number"===O?P:{}}:{}};n&&(M?$.leftLine.set("x2",n[0]):$.leftLine=null,p=o(S,{left:n[0],top:w?n[1]-5:n[1],...$}));T.push(h),p&&(y.includes("脉搏")?ie.add(p):ne.add(p),function(e){B.hovered&&(e.on("mouseover",(()=>{ce(e,"hover")})),e.on("mouseout",(()=>{A.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?K:J;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0,isFixed:l,moveHide:s=!1}=t||{};"reduce"!==n&&i&&("line"===n?i.setCoords().set({x1:e.left,y1:e.top}):(l||i.setCoords().set({left:e.left,top:e.top+o}),s&&(k.value.remove(i),delete e.otherObj.obj)))})),se(e)}(e),B.hovered&&ce(e)})),e.on("mouseup",(t=>{if(A.show=!1,1===t.button){const{type:t}=e.origin,i=C(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};k.value.discardActiveObject(),E("change",n),fe(n,"change")}}))}(p),R.push(p),oe.add(p))}(H,W,u,j,z,N)})),"pulse"===c){const e={};ee.forEach((t=>{e[t]=R.filter((e=>{var i;return(null==(i=e.origin)?void 0:i.key)===t}))}));let t=null;ee.forEach((i=>{te.set(i,e[i].map(((e,i,n)=>{var o,l;const s=n[i+1];if(s&&d(e.left,1)===d(s.left,1)){const i=e.left-D/2;e.set("left",i+D/4),null==(o=e.rightLine)||o.set("x1",e.left),t=e.left+D/2,s.set("left",t)}else t&&(null==(l=e.leftLine)||l.set("x2",t),e.set("left",t)),t=null;return[e.left,e.top]})))}))}Promise.all(R).then((e=>{const t=T.filter((e=>e));Promise.all(V).then((i=>{k.value.add(...t,...e,...i),e.forEach((t=>{null==t||t.bringToFront(),function(e,t){if("pulse"===e.origin.type){t.filter((t=>t.left===e.left&&"pulse"===t.origin.type)).length>1&&(e.leftLine&&k.value.remove(e.leftLine),e.rightLine&&k.value.remove(e.rightLine))}}(t,e)}))}))}))}function ue(e,t){return"pain"===e&&0==t}function ce(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;A.point={x:e.left,y:e.top},A.list=[function(){const{drugReduce:s,physicsReduce:r}=l||{},a="hover"===t?l.value:C(o,e.top);if(p(s))return`药物降${"pain"==o?"痛":"温"} ${a}—>${s}${n||""}`;if(p(r))return`物理降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;return`${i} ${a}${n||""}`}(),`时间 ${((null==l?void 0:l.time)||O(e.left)).slice(-5)}`],A.show=!0}function de(e,t){const i="pain"===t.type?K:J;if(!h(e)||!function(e){const[t]=z,i=z.at(-1),n=t.start,o=i.end,l=v(e);return l>=n&&l<=o}(e.time))return;const n=M(e.time),o=$(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}function pe(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=v(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=v(`${O(e)}:00`);return N&&l<v(N)?(T("exceedMin"),!1):!(l>o)||(T("exceedMax"),!1)}function fe(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=le.find((e=>e.type===i));if("add"===t){const e=a(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=g(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;he()}function he(){var e;oe.size&&(null==(e=k.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...oe]))),te.clear(),oe.clear(),ie.clear(),ne.clear(),le.forEach((e=>{e.dataList.forEach(((t,i)=>{a(e.type)&&!t.enable||ae(t,i,e)}))})),se(),re()}return te.clear(),ie.clear(),ne.clear(),le.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=$(e.type,e.list,e.positionLine.value),n=i([H,t,_,t],e.positionLine);k.value.add(n)}(e),e.dataList.forEach(((t,i)=>{!t.show||a(e.type)&&!t.enable||ae(t,i,e)}))})),se(),re(),k.value.on("mouse:up",(e=>{const{button:t,target:i,pointer:n={}}=e;if(3===t){if(!Y.event.evented)return;const{x:e=0,y:t=0}=n;if(e>=H&&e<=_&&t>=W&&t<=q){I.point={x:e,y:t},I.show=!0;const{type:o}=(null==i?void 0:i.origin)||{};if(i&&["temperature","pain"].includes(o))"temperature"===o&&(I.list=[...j]),"pain"===o&&(I.list=[...w]),I.target=i;else{I.target=null,I.list=["新增节点"],G.forEach((i=>{if(!R([...oe],e,"_type").includes(i.bigType)){const e=["pain"].includes(i.bigType)?K:J;t>=e.originY&&t<=e.endY&&I.list.push({renderItem:P?P(i):()=>i.title,origin:{title:i.title,unit:i.unit,type:u(i.bigType),dataIndex:i.dataIndex,key:i.key},pointer:n})}}));const i=pe(e);i&&1!==I.list.length||(I.show=!1,1===I.list.length&&i&&T("repeat"))}}}if(1===t){if(i)return;const{x:e=0,y:t=0}=n;e>=H&&e<=_&&t>0&&t<U&&E("click:grid",{x:e,y:t,time:O(e)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=y(i,[...j,...w]);s[`${e.type}`]=e.value,a(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};E("change",r),fe(r,"change")}else{const t={data:{time:O(e.pointer.x),value:C(e.origin.type,e.pointer.y),...a(e.origin.type)?{key:e.origin.key}:{}},...e.origin};E("add",t),fe(t)}},setPopup:ce,isAddPoint:pe,updateData:fe,redrawPoints:he,gridPoints:oe}}function S(e){return"fixed"===e.position}export{k as useCenter};
@@ -175,5 +175,5 @@ export declare type IPointMenuProps = Pick<IPointTipProps, 'show' | 'point'> & {
175
175
  target: any;
176
176
  };
177
177
  export declare type IFabricChartMainParam = [Ref<fabric.Canvas>, any, any, Ref<any>, IPointTipProps, IPointMenuProps];
178
- export declare type IPonter = [number, number];
178
+ export declare type IPointer = [number, number];
179
179
  export {};
@@ -1 +1 @@
1
- import{isNull as n,isNumber as t}from"lodash-es";function e(n){return(null==n?void 0:n.time)&&((null==n?void 0:n.value)||0===(null==n?void 0:n.value))}function r(n,t){const e={};for(const r in n)t.map((n=>n.type)).includes(r)||(e[r]=n[r]);return e}function u(n,t){const e=t.findIndex((t=>p(t.time)>p(n)));return~e?e:t.length}function o(n){return["temperature","pulse"].includes(n)}function i(n,t){return n.includes("心率")?"pulse_other":t}function l(n){return n.includes("_other")?n.split("_")[0]:n}function c(t){return!Number.isNaN(+t)&&!n(t)}function f(n,t){return a(n.left,1)===a(t.left,1)&&Math.abs(a(n.top,1)-a(t.top,1))<=2}function a(n,t=100){return Math.floor(n*t)/t}function s(n){let t=0;return n.forEach((n=>{var e;(null==(e=n.children)?void 0:e.length)?t+=s(n.children):t++})),t}function p(n){return n?t(n)?new Date(n).getTime():Date.parse(n.replace(/-/g,"/")):Date.now()}function d(n,t){const e=[],[r,u]=n;for(let n=r;t>0?n<=u:n>=u;n+=t)e.push(n);return e}function h(n){const{width:t,height:e,left:r,top:u}=n,o=t/2,i=e/2;return{minLeft:r-o,maxLeft:r+o,minTop:u-i,maxTop:u+i}}export{r as deleteProperty,s as getChildrenSize,a as getFloorNumber,u as getIndex,h as getPointRange,d as getScaleNumberList,p as getTime,l as getType,e as isEffectiveNode,o as isOneLine,f as isOverlapPoint,c as isValidValue,i as setOtherType};
1
+ import{isNull as n,isNumber as t}from"lodash-es";function e(n){return(null==n?void 0:n.time)&&((null==n?void 0:n.value)||0===(null==n?void 0:n.value))}function r(n,t){const e={};for(const r in n)t.map((n=>n.type)).includes(r)||(e[r]=n[r]);return e}function u(n,t){const e=t.findIndex((t=>p(t.time)>p(n)));return~e?e:t.length}function o(n){return["temperature","pulse"].includes(n)}function i(n,t){return n.includes("心率")?"pulse_other":t}function l(n){return n.includes("_other")?n.split("_")[0]:n}function c(t){return!Number.isNaN(+t)&&!n(t)}function f(n,t){return a(n.left,1)===a(t.left,1)&&Math.abs(a(n.top,1)-a(t.top,1))<=2}function a(n,t=100){return Math.floor(n*t)/t}function s(n){let t=0;return n.forEach((n=>{var e;(null==(e=n.children)?void 0:e.length)?t+=s(n.children):t++})),t}function p(n){return n?t(n)?new Date(n).getTime():Date.parse(n.replace(/-/g,"/")):Date.now()}function d(n,t){const e=[],[r,u]=n;t=t||1;for(let n=r;t>0?n<=u:n>=u;n+=t)e.push(n);return e}function h(n){const{width:t,height:e,left:r,top:u}=n,o=t/2,i=e/2;return{minLeft:r-o,maxLeft:r+o,minTop:u-i,maxTop:u+i}}export{r as deleteProperty,s as getChildrenSize,a as getFloorNumber,u as getIndex,h as getPointRange,d as getScaleNumberList,p as getTime,l as getType,e as isEffectiveNode,o as isOneLine,f as isOverlapPoint,c as isValidValue,i as setOtherType};
@@ -61,7 +61,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
61
61
  }[]>;
62
62
  onSave: () => void;
63
63
  setRef: (e: any, id: string) => void;
64
- getTableFields: (type?: "field" | "fieldColor" | "highlightRow" | undefined) => any;
64
+ getTableFields: (type?: "field" | "fieldColor" | "highlightRow" | "tableStyle" | undefined) => any;
65
65
  NTabs: any;
66
66
  NTabPane: import("vue").DefineComponent<{
67
67
  readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -351,6 +351,7 @@ declare const _default: import("vue").DefineComponent<{
351
351
  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<{}>>, {}>;
352
352
  TrashOutline: 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<{}>>, {}>;
353
353
  CreateOutline: 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<{}>>, {}>;
354
+ HelpCircleOutline: 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<{}>>, {}>;
354
355
  isFunction: (value: any) => value is (...args: any[]) => any;
355
356
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
356
357
  element: {
@@ -456,9 +457,9 @@ declare const _default: import("vue").DefineComponent<{
456
457
  requiredDisable: boolean;
457
458
  hide: boolean;
458
459
  }>;
459
- isHighlightRow: boolean;
460
460
  idx: number;
461
461
  isHighlight: boolean;
462
+ isHighlightRow: boolean;
462
463
  }>;
463
464
  EditDialog: import("vue").DefineComponent<{
464
465
  visible: {
@@ -503,7 +504,7 @@ declare const _default: import("vue").DefineComponent<{
503
504
  formRef: import("vue").Ref<any>;
504
505
  conditionRef: import("vue").Ref<any>;
505
506
  filterVisible: import("vue").Ref<boolean>;
506
- title: import("vue").ComputedRef<"修改" | "新增" | "过滤条件">;
507
+ title: import("vue").ComputedRef<"新增" | "修改" | "过滤条件">;
507
508
  model: {
508
509
  name: string;
509
510
  color: string;
@@ -469,6 +469,7 @@ declare const _default: import("vue").DefineComponent<{
469
469
  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<{}>>, {}>;
470
470
  TrashOutline: 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<{}>>, {}>;
471
471
  CreateOutline: 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<{}>>, {}>;
472
+ HelpCircleOutline: 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<{}>>, {}>;
472
473
  isFunction: (value: any) => value is (...args: any[]) => any;
473
474
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
474
475
  element: {
@@ -574,9 +575,9 @@ declare const _default: import("vue").DefineComponent<{
574
575
  requiredDisable: boolean;
575
576
  hide: boolean;
576
577
  }>;
577
- isHighlightRow: boolean;
578
578
  idx: number;
579
579
  isHighlight: boolean;
580
+ isHighlightRow: boolean;
580
581
  }>;
581
582
  isArray: {
582
583
  (value?: any): value is any[];
@@ -59,7 +59,7 @@ declare const _default: import("vue").DefineComponent<{
59
59
  }[]>;
60
60
  onSave: () => void;
61
61
  setRef: (e: any, id: string) => void;
62
- getTableFields: (type?: 'field' | 'fieldColor' | 'highlightRow') => any;
62
+ getTableFields: (type?: 'field' | 'fieldColor' | 'highlightRow' | 'tableStyle') => any;
63
63
  NTabs: any;
64
64
  NTabPane: import("vue").DefineComponent<{
65
65
  readonly tab: PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -1 +1 @@
1
- import{defineComponent as e,provide as t,reactive as l,ref as i,computed as o,openBlock as a,createElementBlock as r,normalizeStyle as s,unref as d,createBlock as n,withCtx as f,Fragment as m,renderList as u,resolveDynamicComponent as h,mergeProps as p,createSlots as b,renderSlot as v,h as g}from"vue";import{useThemeVars as y,NTabs as c,NTabPane as F}from"naive-ui";import C from"./FieldSet.vue.js";import w from"./FieldColor.vue.js";import{InjectionFieldList as L,InjectionQueryWordbookData as T}from"./constants/index.js";var _=e({__name:"Index",props:{showTabNames:{type:Array,default:()=>["field"]},fieldColorList:{type:Array,default:()=>[]},highlightRowColorList:{type:Array,default:()=>[]},fieldList:{type:Object},queryWordbookData:{type:Function}},emits:["save"],setup(e,{expose:_,emit:$}){const k=e;t(L,k.fieldList),t(T,k.queryWordbookData);const x=l({}),R=i(y().value.primaryColor),j=o((()=>[{name:"field",tab:"字段设置",render:()=>g(C,{rowHeight:52})},{name:"fieldColor",tab:"字段颜色",render:()=>g(w,{isFieldColor:!0,defaultList:k.fieldColorList})},{name:"highlightRow",tab:"高亮行",render:()=>g(w,{isFieldColor:!1,defaultList:k.highlightRowColorList})}].filter((e=>k.showTabNames.includes(e.name)))));function A(){var e,t,l;$("save",{tableFields:null==(e=x.field)?void 0:e.getTableFields(),tableFieldColors:null==(t=x.fieldColor)?void 0:t.getTableFields(),tableHighlightRows:null==(l=x.highlightRow)?void 0:l.getTableFields()})}function S(e,t){x[t]=e}return _({getTableFields:function(e){var t;return null==(t=x[e||"field"])?void 0:t.getTableFields()}}),(e,t)=>(a(),r("div",{class:"c-field-set",style:s({"--row-height":"52px","--primary-color":R.value})},[d(j).length>1?(a(),n(d(c),{key:0,type:"line",naimated:""},{default:f((()=>[(a(!0),r(m,null,u(d(j),(t=>(a(),n(d(F),{key:t.name,name:t.name,tab:t.tab,"display-directive":"show"},{default:f((()=>[(a(),n(h(t.render()),p(e.$attrs,{ref_for:!0,ref:e=>S(e,t.name),onSave:A}),b({_:2},[u(e.$slots,((t,l)=>({name:l,fn:f((()=>[v(e.$slots,l)]))})))]),1040))])),_:2},1032,["name","tab"])))),128))])),_:3})):(a(),n(h(d(j)[0].render()),p({key:1},e.$attrs,{ref:e=>S(e,d(j)[0].name),onSave:A}),b({_:2},[u(e.$slots,((t,l)=>({name:l,fn:f((()=>[v(e.$slots,l)]))})))]),1040))],4))}});export{_ as default};
1
+ import{defineComponent as e,provide as l,reactive as t,ref as i,computed as o,openBlock as a,createElementBlock as r,normalizeStyle as s,unref as d,createBlock as n,withCtx as f,Fragment as m,renderList as u,resolveDynamicComponent as b,mergeProps as y,createSlots as h,renderSlot as p,h as v}from"vue";import{useThemeVars as g,NTabs as c,NTabPane as F}from"naive-ui";import C from"./FieldSet.vue.js";import w from"./FieldColor.vue.js";import T from"./TableStyle.vue.js";import{InjectionFieldList as L,InjectionQueryWordbookData as S}from"./constants/index.js";var _=e({__name:"Index",props:{showTabNames:{type:Array,default:()=>["field"]},fieldColorList:{type:Array,default:()=>[]},highlightRowColorList:{type:Array,default:()=>[]},fieldList:{type:Object},queryWordbookData:{type:Function}},emits:["save"],setup(e,{expose:_,emit:$}){const j=e;l(L,j.fieldList),l(S,j.queryWordbookData);const k=t({}),x=i(g().value.primaryColor),R=o((()=>[{name:"field",tab:"字段设置",render:()=>v(C,{rowHeight:52})},{name:"fieldColor",tab:"字段颜色",render:()=>v(w,{isFieldColor:!0,defaultList:j.fieldColorList})},{name:"highlightRow",tab:"高亮行",render:()=>v(w,{isFieldColor:!1,defaultList:j.highlightRowColorList})},{name:"tableStyle",tab:"表格样式",render:()=>v(T)}].filter((e=>j.showTabNames.includes(e.name)))));function A(){var e,l,t,i;$("save",{tableFields:null==(e=k.field)?void 0:e.getTableFields(),tableFieldColors:null==(l=k.fieldColor)?void 0:l.getTableFields(),tableHighlightRows:null==(t=k.highlightRow)?void 0:t.getTableFields(),tableStyle:null==(i=k.tableStyle)?void 0:i.getTableFields()})}function q(e,l){k[l]=e}return _({getTableFields:function(e){var l;return null==(l=k[e||"field"])?void 0:l.getTableFields()}}),(e,l)=>(a(),r("div",{class:"c-field-set",style:s({"--row-height":"52px","--primary-color":x.value})},[d(R).length>1?(a(),n(d(c),{key:0,type:"line",naimated:""},{default:f((()=>[(a(!0),r(m,null,u(d(R),(l=>(a(),n(d(F),{key:l.name,name:l.name,tab:l.tab,"display-directive":"show"},{default:f((()=>[(a(),n(b(l.render()),y(e.$attrs,{ref_for:!0,ref:e=>q(e,l.name),onSave:A}),h({_:2},[u(e.$slots,((l,t)=>({name:t,fn:f((()=>[p(e.$slots,t)]))})))]),1040))])),_:2},1032,["name","tab"])))),128))])),_:3})):(a(),n(b(d(R)[0].render()),y({key:1},e.$attrs,{ref:e=>q(e,d(R)[0].name),onSave:A}),h({_:2},[u(e.$slots,((l,t)=>({name:t,fn:f((()=>[p(e.$slots,t)]))})))]),1040))],4))}});export{_ as default};
@@ -0,0 +1,71 @@
1
+ import { PropType } from 'vue';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ tableStyleConfig: {
4
+ type: PropType<Partial<{
5
+ stripe: boolean;
6
+ border: boolean;
7
+ }>>;
8
+ default: () => {
9
+ stripe: boolean;
10
+ border: boolean;
11
+ };
12
+ };
13
+ }, {
14
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
15
+ tableStyleConfig: {
16
+ type: PropType<Partial<{
17
+ stripe: boolean;
18
+ border: boolean;
19
+ }>>;
20
+ default: () => {
21
+ stripe: boolean;
22
+ border: boolean;
23
+ };
24
+ };
25
+ }>> & {
26
+ onSave?: ((...args: any[]) => any) | undefined;
27
+ onClose?: ((...args: any[]) => any) | undefined;
28
+ }>>;
29
+ tableDemoList: import("vue").Ref<{
30
+ title: string;
31
+ label: string;
32
+ border: boolean;
33
+ }[]>;
34
+ tableStyle: {
35
+ stripe?: boolean | undefined;
36
+ border?: boolean | undefined;
37
+ };
38
+ emit: (event: "close" | "save", ...args: any[]) => void;
39
+ getTableStyle: (border: boolean) => string;
40
+ toggle: (border: boolean) => void;
41
+ onCancle: () => void;
42
+ onSave: () => void;
43
+ getTableFields: () => {
44
+ stripe?: boolean | undefined;
45
+ border?: boolean | undefined;
46
+ };
47
+ NSwitch: any;
48
+ NIcon: any;
49
+ NButton: any;
50
+ CheckmarkCircle: 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<{}>>, {}>;
51
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "save")[], "close" | "save", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
52
+ tableStyleConfig: {
53
+ type: PropType<Partial<{
54
+ stripe: boolean;
55
+ border: boolean;
56
+ }>>;
57
+ default: () => {
58
+ stripe: boolean;
59
+ border: boolean;
60
+ };
61
+ };
62
+ }>> & {
63
+ onSave?: ((...args: any[]) => any) | undefined;
64
+ onClose?: ((...args: any[]) => any) | undefined;
65
+ }, {
66
+ tableStyleConfig: Partial<{
67
+ stripe: boolean;
68
+ border: boolean;
69
+ }>;
70
+ }>;
71
+ export default _default;
@@ -0,0 +1 @@
1
+ import e from"./TableStyle.vue2.js";import l from"../../../_virtual/_plugin-vue_export-helper.js";var r=l(e,[["__file","TableStyle.vue"]]);export{r as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as t,reactive as r,watch as l,openBlock as s,createElementBlock as a,createElementVNode as i,createVNode as o,unref as n,Fragment as d,renderList as p,toDisplayString as b,normalizeClass as m,withDirectives as c,vShow as u,withCtx as v,createTextVNode as f}from"vue";import{NSwitch as g,NIcon as y,NButton as _}from"naive-ui";import{CheckmarkCircle as C}from"@vicons/ionicons5";import h from"../../../shared/assets/img/table_style_1.png.js";import S from"../../../shared/assets/img/table_style_2.png.js";import j from"../../../shared/assets/img/table_style_3.png.js";import k from"../../../shared/assets/img/table_style_4.png.js";const x={class:"main-wrapper"},w={class:"set-item"},z=i("span",{style:{"margin-right":"20px"}},"开启斑马线",-1),T={class:"set-item table-item"},F=["onClickCapture"],O={class:"table-bg"},U=["src"],q={class:"table-style__desc"},A={class:"circle"},B={class:"main-wrapper__table-footer"};var D=e({__name:"TableStyle",props:{tableStyleConfig:{type:Object,default:()=>({stripe:!1,border:!0})}},emits:["save","close"],setup(e,{expose:D,emit:E}){var G,H;const I=e,J=t([{title:"样式一",label:"无列分割线",border:!(null==(G=I.tableStyleConfig)?void 0:G.border)},{title:"样式二",label:"列分割线",border:!!(null==(H=I.tableStyleConfig)?void 0:H.border)}]),K=r(I.tableStyleConfig);function L(){E("close")}function M(){E("save")}return l((()=>I.tableStyleConfig),(e=>{const{stripe:t=!1,border:r=!0}=e;K.stripe=t,K.border=r}),{immediate:!0,deep:!0}),D({getTableFields:function(){return K}}),(e,t)=>(s(),a("div",x,[i("div",w,[z,o(n(g),{value:K.stripe,"onUpdate:value":t[0]||(t[0]=e=>K.stripe=e),size:"small"},null,8,["value"])]),i("div",T,[(s(!0),a(d,null,p(J.value,((e,t)=>{return s(),a(d,{key:t},[i("h4",null,b(e.title),1),i("div",{class:m(["table-style",{active:e.border===K.border}]),onClickCapture:()=>{return t=e.border,void(K.border=t);var t}},[i("div",O,[i("img",{src:(r=e.border,K.stripe?r?h:j:r?S:k),alt:""},null,8,U)]),i("div",q,[c(o(n(y),{size:20,component:n(C)},null,8,["component"]),[[u,e.border===K.border]]),c(i("i",A,null,512),[[u,e.border!==K.border]]),i("span",null,b(e.label),1)])],42,F)],64);var r})),128))]),i("div",B,[o(n(_),{style:{"margin-right":"8px"},onClick:L},{default:v((()=>[f("取消")])),_:1}),o(n(_),{type:"primary",onClick:M},{default:v((()=>[f("保存")])),_:1})])]))}});export{D as default};
@@ -176,6 +176,7 @@ declare const _default: import("vue").DefineComponent<{
176
176
  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<{}>>, {}>;
177
177
  TrashOutline: 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<{}>>, {}>;
178
178
  CreateOutline: 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<{}>>, {}>;
179
+ HelpCircleOutline: 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<{}>>, {}>;
179
180
  isFunction: (value: any) => value is (...args: any[]) => any;
180
181
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
181
182
  element: {
@@ -281,8 +282,8 @@ declare const _default: import("vue").DefineComponent<{
281
282
  requiredDisable: boolean;
282
283
  hide: boolean;
283
284
  }>;
284
- isHighlightRow: boolean;
285
285
  idx: number;
286
286
  isHighlight: boolean;
287
+ isHighlightRow: boolean;
287
288
  }>;
288
289
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,openBlock as l,createElementBlock as t,Fragment as i,renderList as n,normalizeStyle as a,unref as o,createBlock as r,withCtx as d,createVNode as u,createCommentVNode as c,createElementVNode as s,normalizeClass as f,toDisplayString as m,withDirectives as p,vShow as v,resolveDynamicComponent as y,createTextVNode as h}from"vue";import{NTooltip as g,NIcon as b,NCheckbox as k,NSelect as x,NColorPicker as w,NInput as N,NInputNumber as U,NPopconfirm as S}from"naive-ui";import{setStyle as _,setColorInfo as C,isDisable as H}from"../utils/index.js";import{ReorderTwoOutline as E,CreateOutline as O,TrashOutline as P}from"@vicons/ionicons5";import{isFunction as R,range as j}from"lodash-es";import{COLOR_MAP as D}from"../constants/index.js";const M={class:"row"},A=["title"],F=s("span",null,"拖拽调整顺序",-1);var B=e({__name:"Row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1},data:{type:Array,default:()=>[]},isHighlight:{type:Boolean},index:{type:Number,default:0},isHighlightRow:{type:Boolean,default:!1}},emits:["updateChecked","edit"],setup(e,{emit:B}){const T=e,V=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],W=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}],q=[{label:"字体",value:"font"},{label:"背景",value:"background"}],G=Object.entries(D).map((([e])=>e));function I(){T.data.splice(T.index,1)}function L(){B("edit",T.element)}function z(e){switch(e.field){case"fixedWay":return V;case"sortDirection":return W;case"sortPriority":return function(){const e=j(1,T.data.length+1).map((e=>({label:e.toString(),value:e}))),l=T.data.filter((e=>!!e.sortPriority&&e.uuid!==T.element.uuid)).map((e=>e.sortPriority));return e.filter((e=>!l.includes(e.value)))}();case"colorScope":return q;default:return[]}}function J(e){var l;if(1==T.element.defaultMark||"color"===e.type&&T.isHighlightRow)return!0;if("checkbox"===e.type)return"show"===e.field&&e.fieldShowMaxValue?!T.element[e.field]&&(null==(l=T.data.filter((l=>l[e.field])))?void 0:l.length)===e.fieldShowMaxValue:H(T.element,e.field);if("sortPriority"!==e.field)return!1;const{sortDirection:t}=T.element;return!t||"NONE"===t}function K(e){return["title","result"].includes(e.field)&&T.element.style||{}}return(H,j)=>(l(),t("div",M,[(l(!0),t(i,null,n(e.columns,((n,H)=>{return l(),t(i,{key:H},[n.isShow?(l(),t("span",{key:0,class:"table-cell",title:e.element[n.field],style:a(o(_)(n,H))},["text"===n.type?(l(),t(i,{key:0},[0===H?(l(),r(o(g),{key:0,trigger:"hover"},{trigger:d((()=>[u(o(b),{style:{"margin-right":"5px",top:"2px"},component:o(E)},null,8,["component"])])),default:d((()=>[F])),_:1})):c("v-if",!0),s("span",{class:f([e.isHighlight&&"title"===n.field?"highlight":""]),style:a(K(n))},m("seq"===n.field?e.idx:e.element[n.field]),7)],64)):c("v-if",!0),"checkbox"===n.type?p((l(),r(o(k),{key:1,disabled:J(n),checked:e.element[n.field],"onUpdate:checked":[l=>e.element[n.field]=l,e=>function(e,l){B("updateChecked",{checked:e,column:l})}(e,n)]},null,8,["disabled","checked","onUpdate:checked"])),[[v,(D=e.element,M=n.field,"isShowHeaderFilter"===M?D.isConfiguredHeaderFilter&&"0001"!=T.element.id:"0001"!=T.element.id)]]):c("v-if",!0),"select"===n.type?p((l(),r(o(x),{key:2,clearable:"",disabled:J(n),value:e.element[n.field],"onUpdate:value":[l=>e.element[n.field]=l,e=>function(e,l){"sortDirection"===l.field&&"NONE"===e&&(T.element.sortPriority=null),"colorScope"===l.field&&C(T.element)}(e,n)],options:z(n)},null,8,["disabled","value","onUpdate:value","options"])),[[v,"fixedWay"===n.field||"0001"!=e.element.id]]):c("v-if",!0),"color"===n.type?(l(),r(o(w),{key:3,class:"c-field-set__color-picker",clearable:"",disabled:J(n),value:e.element[n.field],"onUpdate:value":[l=>e.element[n.field]=l,j[0]||(j[0]=l=>o(C)(e.element))],"show-preview":"",modes:["hex"],swatches:o(G)},null,8,["disabled","value","onUpdate:value","swatches"])):c("v-if",!0),"input"===n.type?p((l(),r(o(N),{key:4,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l,clearable:""},null,8,["value","onUpdate:value"])),[[v,"0001"!=e.element.id]]):c("v-if",!0),"inputNumber"===n.type?(l(),r(o(U),{key:5,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l},null,8,["value","onUpdate:value"])):c("v-if",!0),"custom"===n.type&&o(R)(n.contentRender)?(l(),r(y((()=>n.contentRender(n,e.element))),{key:6})):c("v-if",!0),"custom"===n.type&&"opt"===n.field&&1!=e.element.defaultMark?(l(),t(i,{key:7},[u(o(g),{trigger:"hover"},{trigger:d((()=>[u(o(b),{component:o(O),onClick:L},null,8,["component"])])),default:d((()=>[h(" 编辑 ")])),_:1}),u(o(S),{onPositiveClick:I},{trigger:d((()=>[u(o(g),{trigger:"hover"},{trigger:d((()=>[u(o(b),{component:o(P)},null,8,["component"])])),default:d((()=>[h(" 删除 ")])),_:1})])),default:d((()=>[h(" 是否确认删除? ")])),_:1})],64)):c("v-if",!0)],12,A)):c("v-if",!0)],64);var D,M})),128))]))}});export{B as default};
1
+ import{defineComponent as e,openBlock as l,createElementBlock as t,Fragment as i,renderList as n,normalizeStyle as o,unref as a,createVNode as r,withCtx as d,createBlock as u,createElementVNode as c,toDisplayString as s,createCommentVNode as f,normalizeClass as p,withDirectives as m,vShow as v,resolveDynamicComponent as y,createTextVNode as h}from"vue";import{NTooltip as g,NIcon as b,NCheckbox as k,NSelect as x,NColorPicker as w,NInput as N,NInputNumber as U,NPopconfirm as S}from"naive-ui";import{setStyle as _,setColorInfo as C,isDisable as H}from"../utils/index.js";import{ReorderTwoOutline as D,HelpCircleOutline as E,CreateOutline as O,TrashOutline as P}from"@vicons/ionicons5";import{isFunction as R,range as j}from"lodash-es";import{COLOR_MAP as M}from"../constants/index.js";const A={class:"row"},F=["title"],B=c("span",null,"拖拽调整顺序",-1);var T=e({__name:"Row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1},data:{type:Array,default:()=>[]},isHighlight:{type:Boolean},index:{type:Number,default:0},isHighlightRow:{type:Boolean,default:!1}},emits:["updateChecked","edit"],setup(e,{emit:T}){const V=e,W=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],q=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}],G=[{label:"字体",value:"font"},{label:"背景",value:"background"}],I=Object.entries(M).map((([e])=>e));function L(){V.data.splice(V.index,1)}function z(){T("edit",V.element)}function J(e){switch(e.field){case"fixedWay":return W;case"sortDirection":return q;case"sortPriority":return function(){const e=j(1,V.data.length+1).map((e=>({label:e.toString(),value:e}))),l=V.data.filter((e=>!!e.sortPriority&&e.uuid!==V.element.uuid)).map((e=>e.sortPriority));return e.filter((e=>!l.includes(e.value)))}();case"colorScope":return G;default:return[]}}function K(e){var l;if(1==V.element.defaultMark||"color"===e.type&&V.isHighlightRow)return!0;if("checkbox"===e.type)return"show"===e.field&&e.fieldShowMaxValue?!V.element[e.field]&&(null==(l=V.data.filter((l=>l[e.field])))?void 0:l.length)===e.fieldShowMaxValue:H(V.element,e.field);if("sortPriority"!==e.field)return!1;const{sortDirection:t}=V.element;return!t||"NONE"===t}function Q(e){return["title","result"].includes(e.field)&&V.element.style||{}}return(H,j)=>(l(),t("div",A,[(l(!0),t(i,null,n(e.columns,((n,H)=>{return l(),t(i,{key:H},[n.isShow?(l(),t("span",{key:0,class:"table-cell",title:e.element[n.field],style:o(a(_)(n,H))},["text"===n.type?(l(),t(i,{key:0},[0===H?(l(),t(i,{key:0},[r(a(g),{trigger:"hover"},{trigger:d((()=>[r(a(b),{style:{"margin-right":"5px",top:"2px"},component:a(D)},null,8,["component"])])),default:d((()=>[B])),_:1}),"title"===n.field&&e.element.feildDescribe?(l(),u(a(g),{key:0,trigger:"hover"},{trigger:d((()=>[r(a(b),{style:{"margin-right":"5px",top:"2px"},component:a(E)},null,8,["component"])])),default:d((()=>[c("span",null,s(e.element.feildDescribe),1)])),_:1})):f("v-if",!0)],64)):f("v-if",!0),c("span",{class:p([e.isHighlight&&"title"===n.field?"highlight":""]),style:o(Q(n))},s("seq"===n.field?e.idx:e.element[n.field]),7)],64)):f("v-if",!0),"checkbox"===n.type?m((l(),u(a(k),{key:1,disabled:K(n),checked:e.element[n.field],"onUpdate:checked":[l=>e.element[n.field]=l,e=>function(e,l){T("updateChecked",{checked:e,column:l})}(e,n)]},null,8,["disabled","checked","onUpdate:checked"])),[[v,(M=e.element,A=n.field,"isShowHeaderFilter"===A?M.isConfiguredHeaderFilter&&"0001"!=V.element.id:"0001"!=V.element.id)]]):f("v-if",!0),"select"===n.type?m((l(),u(a(x),{key:2,clearable:"",disabled:K(n),value:e.element[n.field],"onUpdate:value":[l=>e.element[n.field]=l,e=>function(e,l){"sortDirection"===l.field&&"NONE"===e&&(V.element.sortPriority=null),"colorScope"===l.field&&C(V.element)}(e,n)],options:J(n)},null,8,["disabled","value","onUpdate:value","options"])),[[v,"fixedWay"===n.field||"0001"!=e.element.id]]):f("v-if",!0),"color"===n.type?(l(),u(a(w),{key:3,class:"c-field-set__color-picker",clearable:"",disabled:K(n),value:e.element[n.field],"onUpdate:value":[l=>e.element[n.field]=l,j[0]||(j[0]=l=>a(C)(e.element))],"show-preview":"",modes:["hex"],swatches:a(I)},null,8,["disabled","value","onUpdate:value","swatches"])):f("v-if",!0),"input"===n.type?m((l(),u(a(N),{key:4,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(),u(a(U),{key:5,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&&a(R)(n.contentRender)?(l(),u(y((()=>n.contentRender(n,e.element))),{key:6})):f("v-if",!0),"custom"===n.type&&"opt"===n.field&&1!=e.element.defaultMark?(l(),t(i,{key:7},[r(a(g),{trigger:"hover"},{trigger:d((()=>[r(a(b),{component:a(O),onClick:z},null,8,["component"])])),default:d((()=>[h(" 编辑 ")])),_:1}),r(a(S),{onPositiveClick:L},{trigger:d((()=>[r(a(g),{trigger:"hover"},{trigger:d((()=>[r(a(b),{component:a(P)},null,8,["component"])])),default:d((()=>[h(" 删除 ")])),_:1})])),default:d((()=>[h(" 是否确认删除? ")])),_:1})],64)):f("v-if",!0)],12,F)):f("v-if",!0)],64);var M,A})),128))]))}});export{T as default};
@@ -44,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
44
44
  formRef: import("vue").Ref<any>;
45
45
  conditionRef: import("vue").Ref<any>;
46
46
  filterVisible: import("vue").Ref<boolean>;
47
- title: import("vue").ComputedRef<"修改" | "新增" | "过滤条件">;
47
+ title: import("vue").ComputedRef<"新增" | "修改" | "过滤条件">;
48
48
  model: {
49
49
  name: string;
50
50
  color: string;
@@ -30,7 +30,7 @@ export declare type FieldSetColumnItem = {
30
30
  contentRender?: (column: AnyObject, row: AnyObject) => VNode | String;
31
31
  [key: string]: any;
32
32
  };
33
- export declare type FieldSetTab = 'field' | 'fieldColor' | 'highlightRow';
33
+ export declare type FieldSetTab = 'field' | 'fieldColor' | 'highlightRow' | 'tableStyle';
34
34
  export declare type ColorSetItem = {
35
35
  name: string;
36
36
  columnName?: string;
@@ -1 +1 @@
1
- .c-field-set{height:100%;width:100%}.c-field-set__color-picker .n-color-picker-trigger__value{display:none}.c-field-set .main-wrapper{display:flex;flex-flow:column nowrap;height:100%;width:100%}.c-field-set .main-wrapper__search-wrapper.n-input{margin-bottom:12px;width:50%}.c-field-set .main-wrapper .item{background:#fff}.c-field-set .main-wrapper .item:active{background:#f2f2f2;box-shadow:0 0 10px 0 #d5d5d5}.c-field-set .main-wrapper .item:focus{background-color:#f2f2f2}.c-field-set .main-wrapper .item.disabled{cursor:not-allowed}.c-field-set .main-wrapper .item .row{align-items:center;border-bottom:1px solid #e8e8e8;display:flex;height:var(--row-height);padding:5px 0}.c-field-set .main-wrapper .table-cell{box-sizing:border-box;color:inherit;display:inline-block;padding:0 5px}.c-field-set .main-wrapper .table-cell .highlight{background-color:var(--primary-color);color:#fff}.c-field-set .main-wrapper .table-cell .c-field-set__color-picker{display:block}.c-field-set .main-wrapper__table-header{align-items:center;background:#f2f2f4;border:1px solid #f2f2f2;display:flex;height:52px}.c-field-set .main-wrapper__table-header .n-checkbox.n-checkbox--disabled .n-checkbox__label{color:var(--n-text-color)}.c-field-set .main-wrapper__table-body{flex:1;overflow-y:auto}.c-field-set .main-wrapper__table-footer{border-top:1px solid #d5d5d5;padding:12px 0}.c-field-set__color-block{display:inline-block;margin-left:20px;position:relative}.c-field-set__color-block:before{background-color:var(--color);border-radius:2px;content:"";height:14px;left:-20px;position:absolute;top:3px;width:14px}.c-field-set__space{width:100%}.c-field-set__space>div:first-child{width:80%}.c-field-set__space .filter-btn{color:var(--c-primary-color);cursor:pointer}.c-field-set__condition .opt-btn{cursor:pointer;display:inline-flex}.c-field-set__condition .condition-wrapper__item{align-items:center;display:flex;margin-top:10px}.c-field-set__condition .condition-wrapper__item .item-index{margin-right:10px}.c-field-set__condition .condition-wrapper__item>.n-date-picker,.c-field-set__condition .condition-wrapper__item>.n-input,.c-field-set__condition .condition-wrapper__item>.n-input-number,.c-field-set__condition .condition-wrapper__item>.n-select{margin-right:10px;width:20%}.c-field-set__condition .sql-expression-wrapper{margin-top:10px}
1
+ .c-field-set{height:100%;width:100%}.c-field-set__color-picker .n-color-picker-trigger__value{display:none}.c-field-set .main-wrapper{display:flex;flex-flow:column nowrap;height:100%;width:100%}.c-field-set .main-wrapper__search-wrapper.n-input{margin-bottom:12px;width:50%}.c-field-set .main-wrapper .item{background:#fff}.c-field-set .main-wrapper .item:active{background:#f2f2f2;box-shadow:0 0 10px 0 #d5d5d5}.c-field-set .main-wrapper .item:focus{background-color:#f2f2f2}.c-field-set .main-wrapper .item.disabled{cursor:not-allowed}.c-field-set .main-wrapper .item .row{align-items:center;border-bottom:1px solid #e8e8e8;display:flex;height:var(--row-height);padding:5px 0}.c-field-set .main-wrapper .table-cell{box-sizing:border-box;color:inherit;display:inline-block;padding:0 5px}.c-field-set .main-wrapper .table-cell .highlight{background-color:var(--primary-color);color:#fff}.c-field-set .main-wrapper .table-cell .c-field-set__color-picker{display:block}.c-field-set .main-wrapper__table-header{align-items:center;background:#f2f2f4;border:1px solid #f2f2f2;display:flex;height:52px}.c-field-set .main-wrapper__table-header .n-checkbox.n-checkbox--disabled .n-checkbox__label{color:var(--n-text-color)}.c-field-set .main-wrapper__table-body{flex:1;overflow-y:auto}.c-field-set .main-wrapper__table-footer{border-top:1px solid #d5d5d5;padding:12px 0}.c-field-set .main-wrapper .set-item{padding:10px 0}.c-field-set .main-wrapper .set-item.table-item{border-top:1px solid #e8e8e8;width:50%}.c-field-set .main-wrapper .set-item.table-item h4{font-size:16px;font-weight:400;margin-bottom:12px}.c-field-set .main-wrapper .set-item.table-item .table-style{background:#e5e5e5;border:2px solid #cfcfcf;border-radius:4px;cursor:pointer;margin-bottom:10px;padding:20px 0 0}.c-field-set .main-wrapper .set-item.table-item .table-style .table-bg{background:#fff;border-radius:5px;margin:0 20px 20px;padding:10px}.c-field-set .main-wrapper .set-item.table-item .table-style .table-bg img{width:100%}.c-field-set .main-wrapper .set-item.table-item .table-style__desc{align-items:center;background:#fff;display:flex;padding:10px}.c-field-set .main-wrapper .set-item.table-item .table-style__desc .n-icon{color:var(--c-primary-color);font-size:20px}.c-field-set .main-wrapper .set-item.table-item .table-style__desc .circle{border:1px solid #d5d5d5;border-radius:50%;display:inline-block;height:18px;width:18px}.c-field-set .main-wrapper .set-item.table-item .table-style__desc span{margin-left:5px}.c-field-set .main-wrapper .set-item.table-item .table-style.active{background:#e2ebfa;border:2px solid var(--c-primary-color)}.c-field-set__color-block{display:inline-block;margin-left:20px;position:relative}.c-field-set__color-block:before{background-color:var(--color);border-radius:2px;content:"";height:14px;left:-20px;position:absolute;top:3px;width:14px}.c-field-set__space{width:100%}.c-field-set__space>div:first-child{width:80%}.c-field-set__space .filter-btn{color:var(--c-primary-color);cursor:pointer}.c-field-set__condition .opt-btn{cursor:pointer;display:inline-flex}.c-field-set__condition .condition-wrapper__item{align-items:center;display:flex;margin-top:10px}.c-field-set__condition .condition-wrapper__item .item-index{margin-right:10px}.c-field-set__condition .condition-wrapper__item>.n-date-picker,.c-field-set__condition .condition-wrapper__item>.n-input,.c-field-set__condition .condition-wrapper__item>.n-input-number,.c-field-set__condition .condition-wrapper__item>.n-select{margin-right:10px;width:20%}.c-field-set__condition .sql-expression-wrapper{margin-top:10px}