cnhis-design-vue 3.1.42-beta.4 → 3.1.42-beta.41

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 (217) hide show
  1. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  2. package/es/components/base-search/index.d.ts +2 -2
  3. package/es/components/base-search/src/index.vue.d.ts +2 -2
  4. package/es/components/base-search/src/index.vue.js +1 -1
  5. package/es/components/base-search/style/index.css +1 -1
  6. package/es/components/big-table/index.d.ts +3 -4
  7. package/es/components/big-table/src/BigTable.vue.d.ts +3 -4
  8. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  9. package/es/components/big-table/style/index.css +1 -1
  10. package/es/components/bpmn-workflow/index.d.ts +12 -0
  11. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.d.ts +12 -0
  12. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -1
  13. package/es/components/button-print/index.d.ts +4 -4
  14. package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -4
  15. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  16. package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -4
  17. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -4
  18. package/es/components/button-print/src/utils/print.js +1 -1
  19. package/es/components/classification/index.d.ts +1 -1
  20. package/es/components/classification/src/index.vue.d.ts +2 -2
  21. package/es/components/classification/style/index.css +1 -1
  22. package/es/components/config-provider/src/ConfigProvider.js +1 -1
  23. package/es/components/config-provider/src/interface.d.ts +4 -4
  24. package/es/components/date-picker/index.d.ts +4 -0
  25. package/es/components/date-picker/src/DatePicker.vue.d.ts +4 -0
  26. package/es/components/date-picker/src/DatePicker.vue.js +1 -1
  27. package/es/components/fabric-chart/index.d.ts +2 -2
  28. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
  29. package/es/components/fabric-chart/src/hooks/useBirthProcess.d.ts +1 -0
  30. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
  31. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
  32. package/es/components/fabric-chart/src/hooks/useCenter.js +1 -1
  33. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
  34. package/es/components/fabric-chart/src/hooks/useScaleColumn.d.ts +16 -0
  35. package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -0
  36. package/es/components/field-set/index.d.ts +26 -81
  37. package/es/components/field-set/src/FieldSet.vue.d.ts +28 -32
  38. package/es/components/field-set/src/FieldSet.vue.js +1 -1
  39. package/es/components/field-set/style/index.css +1 -1
  40. package/es/components/form-config/index.d.ts +39 -39
  41. package/es/components/form-config/src/FormConfig.vue.d.ts +39 -39
  42. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  43. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +15 -14
  44. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +20 -21
  45. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
  46. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  47. package/es/components/form-config/src/constants/index.d.ts +12 -1
  48. package/es/components/form-config/src/constants/index.js +1 -1
  49. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  50. package/es/components/form-config/src/types/index.d.ts +1 -0
  51. package/es/components/form-render/index.d.ts +15 -14
  52. package/es/components/form-render/index.js +1 -1
  53. package/es/components/form-render/src/FormRender.vue.d.ts +15 -14
  54. package/es/components/form-render/src/FormRender.vue.js +1 -1
  55. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +15 -14
  56. package/es/components/form-render/src/components/renderer/combination.js +1 -1
  57. package/es/components/form-render/src/components/renderer/complex.d.ts +1 -1
  58. package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -1
  59. package/es/components/form-render/src/components/renderer/levelSearchCascader.d.ts +18 -0
  60. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  61. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
  62. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
  63. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +38 -2
  64. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  65. package/es/components/form-render/src/components/renderer/remoteSearch.d.ts +18 -0
  66. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  67. package/es/components/form-render/src/components/renderer/searchCascade.d.ts +18 -0
  68. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  69. package/es/components/form-render/src/components/renderer/select.d.ts +32 -5
  70. package/es/components/form-render/src/components/renderer/select.js +1 -1
  71. package/es/components/form-render/src/hooks/index.d.ts +1 -1
  72. package/es/components/form-render/src/hooks/index.js +1 -1
  73. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +16 -0
  74. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -0
  75. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  76. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +13 -8
  77. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  78. package/es/components/form-render/src/types/fieldItem.d.ts +3 -4
  79. package/es/components/form-render/src/types/index.d.ts +2 -1
  80. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  81. package/es/components/iho-table/src/constants/index.d.ts +2 -2
  82. package/es/components/iho-table/src/constants/index.js +1 -1
  83. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +4 -4
  84. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  85. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +22 -21
  86. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.js +1 -1
  87. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +60 -237
  88. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +1 -4
  89. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +4 -16
  90. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +2 -2
  91. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -1
  92. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  93. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
  94. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
  95. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  96. package/es/components/iho-table/src/plugins/highLightSetPlugin.d.ts +1 -0
  97. package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -0
  98. package/es/components/iho-table/src/plugins/index.js +1 -1
  99. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
  100. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  101. package/es/components/iho-table/src/plugins/maxCheckSizePlugin.d.ts +1 -0
  102. package/es/components/iho-table/src/plugins/maxCheckSizePlugin.js +1 -0
  103. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +4 -0
  104. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +25 -3
  105. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  106. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  107. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -1
  108. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
  109. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  110. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -1
  111. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  112. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  113. package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +1 -0
  114. package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +1 -0
  115. package/es/components/iho-table/src/plugins/{rendererPlugins/widgets/variableHeightRendererPlugin.d.ts → varialbleHeightPlugin/index.d.ts} +1 -1
  116. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -0
  117. package/es/components/iho-table/src/types/index.d.ts +21 -5
  118. package/es/components/iho-table/src/types/pluginType.d.ts +10 -25
  119. package/es/components/iho-table/src/utils/index.d.ts +3 -0
  120. package/es/components/iho-table/src/utils/index.js +1 -1
  121. package/es/components/iho-table/style/iconfont.ttf +0 -0
  122. package/es/components/iho-table/style/index.css +1 -1
  123. package/es/components/index.css +1 -1
  124. package/es/components/index.js +1 -1
  125. package/es/components/info-header/index.d.ts +34 -32
  126. package/es/components/info-header/src/InfoHeader.vue.d.ts +34 -32
  127. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +3 -3
  128. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +3 -3
  129. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +2 -2
  130. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
  131. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +1 -1
  132. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +18 -17
  133. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +15 -14
  134. package/es/components/info-header/style/index.css +1 -1
  135. package/es/components/keyboard/index.d.ts +1 -1
  136. package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
  137. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  138. package/es/components/keyboard/src/constants/index.js +1 -1
  139. package/es/components/keyboard/style/index.css +1 -1
  140. package/es/components/map/index.d.ts +2 -14
  141. package/es/components/map/src/Map.vue.d.ts +1 -14
  142. package/es/components/map/src/types/index.d.ts +19 -0
  143. package/es/components/map/src/types/index.js +1 -0
  144. package/es/components/recommend-search/index.d.ts +20 -135
  145. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +22 -137
  146. package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
  147. package/es/components/recommend-search/src/components/BaseSearch.d.ts +84 -0
  148. package/es/components/recommend-search/src/components/BaseSearch.js +1 -0
  149. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +6 -66
  150. package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
  151. package/es/components/recommend-search/src/components/RecommendMenu.vue.d.ts +2 -4
  152. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
  153. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +6 -64
  154. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
  155. package/es/components/recommend-search/src/constant/index.d.ts +3 -0
  156. package/es/components/recommend-search/src/constant/index.js +1 -1
  157. package/es/components/scale-view/index.d.ts +29 -94
  158. package/es/components/scale-view/src/ScaleView.vue.d.ts +29 -94
  159. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  160. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +4 -4
  161. package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -1
  162. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  163. package/es/components/scale-view/src/hooks/use-component.d.ts +73 -3
  164. package/es/components/scale-view/style/index.css +1 -1
  165. package/es/components/select-label/style/index.css +1 -1
  166. package/es/components/select-person/index.d.ts +1 -1
  167. package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -1
  168. package/es/components/shortcut-setter/index.d.ts +16 -16
  169. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +16 -16
  170. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  171. package/es/components/steps-wheel/src/constants/index.js +1 -1
  172. package/es/components/steps-wheel/style/index.css +1 -1
  173. package/es/components/table-filter/index.d.ts +0 -1
  174. package/es/components/table-filter/index.js +1 -1
  175. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +1 -1
  176. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +1 -1
  177. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  178. package/es/components/table-filter/src/hooks/useMixins.js +1 -1
  179. package/es/components/table-filter/src/tool/baseOptions.d.ts +0 -10
  180. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  181. package/es/components/table-filter/src/tool/generateDefOptions.d.ts +0 -7
  182. package/es/components/table-filter/src/tool/generateDefOptions.js +1 -1
  183. package/es/components/table-filter/src/types/index.d.ts +11 -76
  184. package/es/components/time-picker/src/TimePicker.vue.js +1 -1
  185. package/es/components/vod-chunk-upload/index.d.ts +73 -3
  186. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +73 -3
  187. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
  188. package/es/shared/{mixins → hooks}/index.d.ts +1 -0
  189. package/es/shared/{mixins → hooks}/index.js +1 -1
  190. package/es/{components/form-render/src → shared}/hooks/useAsyncQueue.d.ts +0 -14
  191. package/es/shared/hooks/useAsyncQueue.js +1 -0
  192. package/es/shared/{mixins → hooks}/useDateTime.d.ts +2 -2
  193. package/es/shared/hooks/useDateTime.js +1 -0
  194. package/es/shared/utils/index.d.ts +3 -3
  195. package/es/shared/utils/index.js +1 -1
  196. package/package.json +2 -2
  197. package/es/components/form-render/src/hooks/useAsyncQueue.js +0 -1
  198. package/es/components/iho-table/index.d.ts +0 -4650
  199. package/es/components/iho-table/src/IhoTable.vue.d.ts +0 -4649
  200. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/variableHeightRendererPlugin.js +0 -1
  201. package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +0 -143
  202. package/es/components/recommend-search/src/components/BaseSearch.vue.js +0 -1
  203. package/es/components/scale-view/src/hooks/scaleview-props.d.ts +0 -115
  204. package/es/components/scale-view/src/hooks/scaleview-props.js +0 -1
  205. package/es/components/table-filter/src/hooks/export.d.ts +0 -1
  206. package/es/components/table-filter/src/hooks/export.js +0 -1
  207. package/es/components/table-filter/src/tool/getWidgetType.d.ts +0 -1
  208. package/es/components/table-filter/src/tool/getWidgetType.js +0 -1
  209. package/es/shared/mixins/useDateTime.js +0 -1
  210. package/es/shared/utils/colorLog.d.ts +0 -31
  211. package/es/shared/utils/colorLog.js +0 -1
  212. /package/es/components/base-search/style/{iconfont.ttf → base-search-iconfont.ttf} +0 -0
  213. /package/es/components/classification/style/{iconfont.ttf → classification-iconfont.ttf} +0 -0
  214. /package/es/components/info-header/style/{iconfont.ttf → info-header-font.ttf} +0 -0
  215. /package/es/components/select-label/style/{iconfont.ttf → select-label-iconfont.ttf} +0 -0
  216. /package/es/shared/{mixins → hooks}/useTheme.d.ts +0 -0
  217. /package/es/shared/{mixins → hooks}/useTheme.js +0 -0
@@ -1 +1 @@
1
- import{fabric as e}from"../utils/index.js";import{drawLine as t,defaultStyle as i,drawPoint as n,drawText as o,drawArrow as l}from"./useDraw.js";import s from"./useGrid.js";import{useShadow as r}from"./useShadow.js";import{TEMPERATURE_MENU as a,PAIN_MENU as u,OVERLAP as p}from"./constant.js";import{cloneDeep as c}from"lodash-es";import{isOneLine as d,getType as f,isValidValue as h,setOtherType as g,isEffectiveNode as v,getIndex as y,deleteProperty as m}from"../utils/utils.js";function x(x,b,w,L,j,k,Y,S,E,$,T){s(x,b);const{getEqualXTypes:P,repeatTip:O,maxLimitTip:M,minLimitTip:I}=T,{createShadowLines:A}=r(),{left:D,xScaleList:R,xCellWidth:C,yCellHeight:X,originX:z,endX:V,originY:F,endY:_,itemList:G,event:H,vitalSignsOriginY:q,painOriginY:W,hospitalizationDate:B,config:J,canvasHeight:K}=b,N=new Set,Q=["xinmai","mai"],U=new Map,Z=new Set,ee=new Set,te=new Set,ie=c(D.yScaleValue);function ne(t){var n;const o=ie.find((e=>"pulse"===e.type));if(o&&(null==(n=o.dataList)?void 0:n.length)&&(N.size&&x.value.remove(...N),N.clear(),U.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=U.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}(function(){const e=[],t=[],i=[];for(const e of U)t.push(e[1]),e[0]===Q[0]&&e[1].forEach((e=>{(U.get(Q[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],p=n[i-1],c=n[i+1],d=o[r-1],f=o[r+1];if(p&&d){if(p[0]!==d[0]){const e=Math.max(p[0],d[0]);l.push([p,d].find((t=>t[0]===e)))}}else p?l.push(p):d&&s.push(d);const h=Math.min(a[1],u[1]);l.push([a,u].find((e=>e[1]===h)));const g=Math.max(a[1],u[1]);s.push([a,u].find((e=>e[1]===g)));const v=()=>{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(c&&f){if(c[0]!==f[0]){const e=Math.min(c[0],f[0]);l.push([c,f].find((t=>t[0]===e))),v()}}else c?(l.push(c),v()):f?(s.push(f),v()):v()})),e})().forEach((t=>{var n,l,s,r,a,u;const p=t.map((e=>({x:e[0],y:e[1]}))),c=new e.Polygon(p,{...i,...(null==(n=o.shadow)?void 0:n.style)||{}});if("slash"==(null==(l=o.shadow)?void 0:l.mode)){c.set({fill:"transparent",stroke:(null==(r=null==(s=o.shadow)?void 0:s.style)?void 0:r.stroke)||"#f00"});const e=A(t,null==(a=o.shadow)?void 0:a.style._angle,null==(u=o.shadow)?void 0:u.style.space);e.forEach((e=>{var t;Object.assign(e,{...i,...(null==(t=o.shadow)?void 0:t.style)||{}}),N.add(e)})),x.value.add(...e)}N.add(c),x.value.add(c)}))}}function oe(){var e;const t=ie.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const o=Object.assign({},p,D.overlap||{}),l=[];Z.size&&[...Z].forEach((e=>{[...ee].forEach((t=>{if(t.origin&&e.left===t.left&&e.top===t.top){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...i,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),"humai"===e&&(r="circle"),l.push(n(r,{...o[e]||{},...s}))}}}))})),setTimeout((()=>{x.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),te.add(e)}))}))}function le(e,s,r){var a;const{type:u,riseStyle:p={},noRiseStyle:c={},verifiedStyle:f={},reduceStyle:v={},pacemaker:y={},upArrowStyle:m={},limitValueStyle:L={},nonePainPointStyle:k={},dataList:S=[]}=r,$=[],T=[],P=[];null==(a=e.list)||a.forEach(((a,O)=>{const M=d(u)?S.find((e=>e.key===a.key)):e,I=ae(a,r),A={};A.value=function(e,t,i){if(!(null==e?void 0:e.length)||!J.showValue)return;const{lineAttr:n={}}=i,l=e[1]<=q.originY+X?e[1]+X:e[1]-X,s=o([e[0],l],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return P.push(s),{obj:s,top:-X}}(I,a,M),function(e,s,a,d){var g,y;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(u))return;const{lineAttr:m={}}=a,{value:x}=d;let b,w,L,k,Y,S;if(s.noRise&&c.show)if(c.text)L=o([e[0],e[1]+5],{value:c.text.split("").join("\n"),originY:"top",...c.style||{}}),P.push(L);else{const t=e[1]+2*X;k=l([e[0],e[1],t],c.style||{}),P.push(k)}s.rise&&p.show&&p.text&&(Y=o([e[0],e[1]-(x?X:0)-5],{value:p.text.split("").join("\n"),originY:"bottom",...p.style||{}}),P.push(Y));s.verified&&(S=o([e[0],e[1]-(x?X:0)-5],{value:"v",originX:"center",originY:"bottom",...f}),P.push(S));if(h(s.physicsReduce)||h(s.drugReduce)){const o=j(u,r.list,null!=(g=s.physicsReduce)?g:s.drugReduce);b=t([...e,e[0],o],{...m,...v.line,...i}),w=n((null==(y=null==v?void 0:v.point)?void 0:y.type)||"circle",{left:e[0],top:o,...v.point,...i,originY:o===K?"bottom":"center"}),b&&P.push(b),w&&P.push(w)}Object.assign(d,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:L,top:5},arrowGroup:{obj:k,top:2*X},riseText:{obj:Y,top:(x?-X:0)-5},verifiedText:{obj:S,top:(x?-X:0)-5},reducePoint:{obj:w,type:"reduce"}})}(I,a,M,A),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(u))return;let s,a;const{upArrowShow:p=!1,limitValueShow:c=!1}=i;if(p&&t.value>180){let t=e[1]-2.5*X,i=[e[1]-X/2,t];t<q.originY&&(t=e[1]+2.5*X,i=[t,e[1]+X/2]),s=l([e[0],i[0],i[1]],m,"up"),P.push(s)}if(c){const i={value:t.value,originX:"center",originY:"center",...L};if(t.value>Math.max(...r.list)){const t=s?e[1]+X/2+s.height:e[1]+X;a=o([e[0],t],i),P.push(a)}t.value<Math.min(...r.list)&&(a=o([e[0],e[1]-X],i),P.push(a))}Object.assign(n,{upArrow:{obj:s},limitValue:{obj:a,top:-X}})}(I,a,M,A),function(i,o,l,a,p){let c,d;const{pointAttr:f={},lineAttr:h={},title:v="",key:m,type:L="circle"}=a,j=e.list[l+1],S=ae(j,r),P=se(u,e.list[l].value),O=S&&se(u,j.value);!i||!S||o.breakpoint||P||O||i[0]===S[0]||(d=t([...i,...S],{...h}));const M=o.pacemakerShow&&"pulse"==u?y.value:P?0:L,I=T[l-1],A={origin:{data:o,title:v,key:m||"",unit:r.unit,type:u,_type:g(v,u),dataIndex:s,index:l},leftLine:I,rightLine:d,otherObj:p,lockMovementX:!0,...o.pacemakerShow&&"pulse"==u?y.style:f,...b.event,...P?{selectable:!1,evented:!1,...k}:{}};if(I){const e=I.get("y2");c=n(M,{left:I.get("x2"),top:P?e-5:e,...A})}else i&&(A.leftLine=null,c=n(M,{left:i[0],top:P?i[1]-5:i[1],...A}));T.push(d),c&&(v.includes("脉搏")?Z.add(c):ee.add(c),function(e){H.hovered&&(e.on("mouseover",(()=>{re(e)})),e.on("mouseout",(()=>{E.show=!1})));e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?W:q;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}=t||{};"reduce"!==n&&("line"===n?null==i||i.setCoords().set({x1:e.left,y1:e.top}):null==i||i.setCoords().set({left:e.left,top:e.top+o}))})),ne(e)}(e),H.hovered&&re(e)})),e.on("mouseup",(t=>{if(E.show=!1,1===t.button){const{type:t}=e.origin,i=Y(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};x.value.discardActiveObject(),w("change",n),pe(n,"change")}}))}(c),$.push(c),te.add(c))}(I,a,O,M,A)})),"pulse"===u&&Q.forEach((e=>{U.set(e,$.filter((t=>{var i;return(null==(i=t.origin)?void 0:i.key)===e})).map((e=>[e.left,e.top])))})),Promise.all($).then((e=>{const t=T.filter((e=>e));let i=null;e=e.map((e=>(e&&i&&(i.nextPoint=e,e.prevPoint=i),i=e||i,e))),Promise.all(P).then((i=>{x.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&&x.value.remove(e.leftLine),e.rightLine&&x.value.remove(e.rightLine))}}(t,e)}))}))}))}function se(e,t){return"pain"===e&&0==t}function re(e){const{title:t,unit:i,type:n,data:o}=e.origin;E.point={x:e.left,y:e.top},E.list=[function(){const{value:l=Y(n,e.top),drugReduce:s,physicsReduce:r}=o||{};if(h(s))return`药物降${"pain"==n?"痛":"温"} ${l}—>${s}${i||""}`;if(h(r))return`物理降${"pain"==n?"痛":"温"} ${l}—>${r}${i||""}`;return`${t} ${l}${i||""}`}(),`时间 ${((null==o?void 0:o.time)||k(e.left)).slice(-5)}`],E.show=!0}function ae(e,t){const i="pain"===t.type?W:q;if(v(e)&&function(e){const[t]=R,i=R.at(-1),n=t.start,o=i.end,l=new Date(e).getTime();return l>=n&&l<=o}(e.time)){const n=L(e.time),o=j(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}}function ue(e){const t=new Date,i=`00${t.getMonth()+1}`.slice(-2),n=`00${t.getDate()}`.slice(-2),o=new Date(`${t.getFullYear()}-${i}-${n} 23:59:59`).getTime(),l=new Date(`${k(e)}:00`).getTime();return B&&l<new Date(B).getTime()?(I(),!1):!(l>o)||(M(),!1)}function pe(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=ie.find((e=>e.type===i));if("add"===t){const e=d(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=y(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;ce()}function ce(){var e;te.size&&(null==(e=x.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}([...te]))),U.clear(),te.clear(),Z.clear(),ee.clear(),ie.forEach((e=>{e.dataList.forEach(((t,i)=>{d(e.type)&&!t.enable||le(t,i,e)}))})),ne(),oe()}return U.clear(),Z.clear(),ee.clear(),ie.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const i=j(e.type,e.list,e.positionLine.value),n=t([z,i,V,i],e.positionLine);x.value.add(n)}(e),e.dataList.forEach(((t,i)=>{d(e.type)&&!t.enable||le(t,i,e)}))})),ne(),oe(),b.event.evented&&x.value.on("mouse:up",(e=>{var t;if(3===e.button){const{x:i=0,y:n=0}=e.pointer||{};if(i>=z&&i<=V&&n>=F&&n<=_){$.point={x:i,y:n},$.show=!0;const{type:o}=(null==(t=e.target)?void 0:t.origin)||{};if(e.target&&["temperature","pain"].includes(o))"temperature"===o&&($.list=[...a]),"pain"===o&&($.list=[...u]),$.target=e.target;else{$.target=null,$.list=["新增节点"],G.forEach((t=>{if(!P(i,"_type",C).includes(t.bigType)){const i=["pain"].includes(t.bigType)?W:q;n>=i.originY&&n<=i.endY&&$.list.push({renderItem:S?S(t):()=>t.title,origin:{title:t.title,unit:t.unit,type:f(t.bigType),dataIndex:t.dataIndex,key:t.key},pointer:e.pointer})}}));const t=ue(i);t&&1!==$.list.length||($.show=!1,1===$.list.length&&t&&O())}}}})),{pointTipProps:E,pointMenuProps:$,clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=m(i,[...a,...u]);s[`${e.type}`]=e.value,d(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};w("change",r),pe(r,"change")}else{const t={data:{time:k(e.pointer.x),value:Y(e.origin.type,e.pointer.y),...d(e.origin.type)?{key:e.origin.key}:{}},...e.origin};w("add",t),pe(t)}},setPopup:re,isAddPoint:ue,updateData:pe,redrawPoints:ce}}export{x as useCenter};
1
+ import{fabric as e}from"../utils/index.js";import{drawLine as t,defaultStyle as i,drawPoint as n,drawText as o,drawArrow as l}from"./useDraw.js";import s from"./useGrid.js";import{useShadow as r}from"./useShadow.js";import{TEMPERATURE_MENU as a,PAIN_MENU as u,OVERLAP as p}from"./constant.js";import{cloneDeep as c}from"lodash-es";import{isOneLine as d,getType as f,isValidValue as h,setOtherType as v,isEffectiveNode as g,getIndex as y,deleteProperty as m}from"../utils/utils.js";function b(b,x,w,L,j,k,Y,S,E,$,T){s(b,x);const{getEqualXTypes:M,repeatTip:P,maxLimitTip:O,minLimitTip:I}=T,{createShadowLines:A}=r(),{left:D,xScaleList:R,xCellWidth:C,yCellHeight:X,originX:z,endX:V,originY:F,endY:_,itemList:G,event:H,vitalSignsOriginY:q,painOriginY:W,hospitalizationDate:B,config:J,canvasHeight:K}=x,N=new Set,Q=["xinmai","mai"],U=new Map,Z=new Set,ee=new Set,te=new Set,ie=c(D.yScaleValue);function ne(t){var n;const o=ie.find((e=>"pulse"===e.type));if(o&&(null==(n=o.dataList)?void 0:n.length)&&(N.size&&b.value.remove(...N),N.clear(),U.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=U.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}(function(){const e=[],t=[],i=[];for(const e of U)t.push(e[1]),e[0]===Q[0]&&e[1].forEach((e=>{(U.get(Q[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],p=n[i-1],c=n[i+1],d=o[r-1],f=o[r+1];if(p&&d){if(p[0]!==d[0]){const e=Math.max(p[0],d[0]);l.push([p,d].find((t=>t[0]===e)))}}else p?l.push(p):d&&s.push(d);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(c&&f){if(c[0]!==f[0]){const e=Math.min(c[0],f[0]);l.push([c,f].find((t=>t[0]===e))),g()}}else c?(l.push(c),g()):f?(s.push(f),g()):g()})),e})().forEach((t=>{var n,l,s,r,a,u;const p=t.map((e=>({x:e[0],y:e[1]}))),c=new e.Polygon(p,{...i,...(null==(n=o.shadow)?void 0:n.style)||{}});if("slash"==(null==(l=o.shadow)?void 0:l.mode)){c.set({fill:"transparent",stroke:(null==(r=null==(s=o.shadow)?void 0:s.style)?void 0:r.stroke)||"#f00"});const e=A(t,null==(a=o.shadow)?void 0:a.style._angle,null==(u=o.shadow)?void 0:u.style.space);e.forEach((e=>{var t;Object.assign(e,{...i,...(null==(t=o.shadow)?void 0:t.style)||{}}),N.add(e)})),b.value.add(...e)}N.add(c),b.value.add(c)}))}}function oe(){var e;const t=ie.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const o=Object.assign({},p,D.overlap||{}),l=[];Z.size&&[...Z].forEach((e=>{[...ee].forEach((t=>{if(t.origin&&e.left===t.left&&e.top===t.top){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...i,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),"humai"===e&&(r="circle"),l.push(n(r,{...o[e]||{},...s}))}}}))})),setTimeout((()=>{b.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),te.add(e)}))}))}function le(e,s,r){var a;const{type:u,riseStyle:p={},noRiseStyle:c={},verifiedStyle:f={},reduceStyle:g={},pacemaker:y={},upArrowStyle:m={},limitValueStyle:L={},nonePainPointStyle:k={},dataList:S=[]}=r,$=[],T=[],M=[];null==(a=e.list)||a.forEach(((a,P)=>{const O=d(u)?S.find((e=>e.key===a.key)):e,I=ae(a,r),A={};A.value=function(e,t,i){if(!(null==e?void 0:e.length)||!J.showValue)return;const{lineAttr:n={}}=i,l=e[1]<=q.originY+X?e[1]+X:e[1]-X,s=o([e[0],l],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return M.push(s),{obj:s,top:-X}}(I,a,O),function(e,s,a,d){var v,y;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(u))return;const{lineAttr:m={}}=a,{value:b}=d;let x,w,L,k,Y,S;if(s.noRise&&c.show)if(c.text)L=o([e[0],e[1]+5],{value:c.text.split("").join("\n"),originY:"top",...c.style||{}}),M.push(L);else{const t=e[1]+2*X;k=l([e[0],e[1],t],c.style||{}),M.push(k)}s.rise&&p.show&&p.text&&(Y=o([e[0],e[1]-(b?X:0)-5],{value:p.text.split("").join("\n"),originY:"bottom",...p.style||{}}),M.push(Y));s.verified&&(S=o([e[0],e[1]-(b?X:0)-5],{value:"v",originX:"center",originY:"bottom",...f}),M.push(S));if(h(s.physicsReduce)||h(s.drugReduce)){const o=j(u,r.list,null!=(v=s.physicsReduce)?v:s.drugReduce);x=t([...e,e[0],o],{...m,...g.line,...i}),w=n((null==(y=null==g?void 0:g.point)?void 0:y.type)||"circle",{left:e[0],top:o,...g.point,...i,originY:o===K?"bottom":"center"}),x&&M.push(x),w&&M.push(w)}Object.assign(d,{reduceLine:{obj:x,type:"line"},noRiseText:{obj:L,top:5},arrowGroup:{obj:k,top:2*X},riseText:{obj:Y,top:(b?-X:0)-5},verifiedText:{obj:S,top:(b?-X:0)-5},reducePoint:{obj:w,type:"reduce"}})}(I,a,O,A),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(u))return;let s,a;const{upArrowShow:p=!1,limitValueShow:c=!1}=i;if(p&&+t.value>180){let t=e[1]-2.5*X,i=[e[1]-X/2,t];t<q.originY&&(t=e[1]+2.5*X,i=[t,e[1]+X/2]),s=l([e[0],i[0],i[1]],m,"up"),M.push(s)}if(c){const i={value:t.value,originX:"center",originY:"center",...L};if(+t.value>Math.max(...r.list)){const t=s?e[1]+X/2+s.height:e[1]+X;a=o([e[0],t],i),M.push(a)}+t.value<Math.min(...r.list)&&(a=o([e[0],e[1]-X],i),M.push(a))}Object.assign(n,{upArrow:{obj:s},limitValue:{obj:a,top:-X}})}(I,a,O,A),function(i,o,l,a,p){let c,d;const{pointAttr:f={},lineAttr:h={},title:g="",key:m,type:L="circle"}=a,j=e.list[l+1],S=ae(j,r),M=se(u,e.list[l].value),P=S&&se(u,j.value);!i||!S||o.breakpoint||M||P||i[0]===S[0]||(d=t([...i,...S],{...h}));const O=o.pacemakerShow&&"pulse"==u?y.value:M?0:L,I=T[l-1],A={origin:{data:o,title:g,key:m||"",unit:r.unit,type:u,_type:v(g,u),dataIndex:s,index:l},leftLine:I,rightLine:d,otherObj:p,lockMovementX:!0,...o.pacemakerShow&&"pulse"==u?y.style:f,...x.event.hovered?x.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:x.event,...M?{selectable:!1,evented:!1,...k}:{}};if(I){const e=I.get("y2");c=n(O,{left:I.get("x2"),top:M?e-5:e,...A})}else i&&(A.leftLine=null,c=n(O,{left:i[0],top:M?i[1]-5:i[1],...A}));T.push(d),c&&(g.includes("脉搏")?Z.add(c):ee.add(c),function(e){H.hovered&&(e.on("mouseover",(()=>{re(e)})),e.on("mouseout",(()=>{E.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?W:q;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}=t||{};"reduce"!==n&&("line"===n?null==i||i.setCoords().set({x1:e.left,y1:e.top}):null==i||i.setCoords().set({left:e.left,top:e.top+o}))})),ne(e)}(e),H.hovered&&re(e)})),e.on("mouseup",(t=>{if(E.show=!1,1===t.button){const{type:t}=e.origin,i=Y(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};b.value.discardActiveObject(),w("change",n),pe(n,"change")}}))}(c),$.push(c),te.add(c))}(I,a,P,O,A)})),"pulse"===u&&Q.forEach((e=>{U.set(e,$.filter((t=>{var i;return(null==(i=t.origin)?void 0:i.key)===e})).map((e=>[e.left,e.top])))})),Promise.all($).then((e=>{const t=T.filter((e=>e));let i=null;e=e.map((e=>(e&&i&&(i.nextPoint=e,e.prevPoint=i),i=e||i,e))),Promise.all(M).then((i=>{b.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&&b.value.remove(e.leftLine),e.rightLine&&b.value.remove(e.rightLine))}}(t,e)}))}))}))}function se(e,t){return"pain"===e&&0==t}function re(e){const{title:t,unit:i,type:n,data:o}=e.origin;E.point={x:e.left,y:e.top},E.list=[function(){const{drugReduce:l,physicsReduce:s}=o||{},r=Y(n,e.top);if(h(l))return`药物降${"pain"==n?"痛":"温"} ${r}—>${l}${i||""}`;if(h(s))return`物理降${"pain"==n?"痛":"温"} ${r}—>${s}${i||""}`;return`${t} ${r}${i||""}`}(),`时间 ${((null==o?void 0:o.time)||k(e.left)).slice(-5)}`],E.show=!0}function ae(e,t){const i="pain"===t.type?W:q;if(g(e)&&function(e){const[t]=R,i=R.at(-1),n=t.start,o=i.end,l=new Date(e).getTime();return l>=n&&l<=o}(e.time)){const n=L(e.time),o=j(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}}function ue(e){const t=new Date,i=`00${t.getMonth()+1}`.slice(-2),n=`00${t.getDate()}`.slice(-2),o=new Date(`${t.getFullYear()}-${i}-${n} 23:59:59`).getTime(),l=new Date(`${k(e)}:00`).getTime();return B&&l<new Date(B).getTime()?(I(),!1):!(l>o)||(O(),!1)}function pe(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=ie.find((e=>e.type===i));if("add"===t){const e=d(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=y(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;ce()}function ce(){var e;te.size&&(null==(e=b.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}([...te]))),U.clear(),te.clear(),Z.clear(),ee.clear(),ie.forEach((e=>{e.dataList.forEach(((t,i)=>{d(e.type)&&!t.enable||le(t,i,e)}))})),ne(),oe()}return U.clear(),Z.clear(),ee.clear(),ie.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const i=j(e.type,e.list,e.positionLine.value),n=t([z,i,V,i],e.positionLine);b.value.add(n)}(e),e.dataList.forEach(((t,i)=>{d(e.type)&&!t.enable||le(t,i,e)}))})),ne(),oe(),x.event.evented&&b.value.on("mouse:up",(e=>{var t;if(3===e.button){const{x:i=0,y:n=0}=e.pointer||{};if(i>=z&&i<=V&&n>=F&&n<=_){$.point={x:i,y:n},$.show=!0;const{type:o}=(null==(t=e.target)?void 0:t.origin)||{};if(e.target&&["temperature","pain"].includes(o))"temperature"===o&&($.list=[...a]),"pain"===o&&($.list=[...u]),$.target=e.target;else{$.target=null,$.list=["新增节点"],G.forEach((t=>{if(!M(i,"_type",C).includes(t.bigType)){const i=["pain"].includes(t.bigType)?W:q;n>=i.originY&&n<=i.endY&&$.list.push({renderItem:S?S(t):()=>t.title,origin:{title:t.title,unit:t.unit,type:f(t.bigType),dataIndex:t.dataIndex,key:t.key},pointer:e.pointer})}}));const t=ue(i);t&&1!==$.list.length||($.show=!1,1===$.list.length&&t&&P())}}}})),{pointTipProps:E,pointMenuProps:$,clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=m(i,[...a,...u]);s[`${e.type}`]=e.value,d(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};w("change",r),pe(r,"change")}else{const t={data:{time:k(e.pointer.x),value:Y(e.origin.type,e.pointer.y),...d(e.origin.type)?{key:e.origin.key}:{}},...e.origin};w("add",t),pe(t)}},setPopup:re,isAddPoint:ue,updateData:pe,redrawPoints:ce}}export{b as useCenter};
@@ -1 +1 @@
1
- import{fabric as t}from"../utils/index.js";import{defaultBorderStyle as e,defaultTextStyle as i,defaultStyle as n,drawPoint as o,drawTextGroup as l,defaultRectStyle as r}from"./useDraw.js";import{getType as s,isOneLine as u}from"../utils/utils.js";function h(h,a,c,g,p,f,d,y,w,v,S,b){var m,Y;const{getEqualXTypes:x,repeatTip:X}=b,{originY:T,endY:N,originX:L,endX:M,xCellWidth:V,yCellHeight:C,left:j,vitalSignsOriginY:k,painOriginY:E,painHeight:I,iconsWidth:G,itemList:H,painIndex:O,right:W,canvasWidth:A,canvasHeight:R,getRightInfo:_}=a;function B(e,n,o,l){const{position:r}=n;return new t.Text(String(e),{...i,originX:"left"==r?"right":"right"==r?"left":"center",left:o,top:l,...n.style})}function J(t="center",e,i){let n=e+i/2,o=[n-4.5,n+4.5],l=[n-2.5,n+2.5],r=n;return"right"===t&&(n=e,o=[n,n+9],l=[n,n+5],r=o[1]),"left"===t&&(n=e+i,o=[n-9,n],l=[n-5,n],r=o[0]),{lineXMain:o,lineXSub:l,textLeft:r}}function $(o){var s;if(!(null==o?void 0:o.length))return;const{layout:u}=o[0];let a=G,c=L;"right"===u&&(a=M,c=M+(null!=(s=null==W?void 0:W.width)?s:0));const g=[],p=I&&"right"!==u?o.length-1:o.length,f=(c-a)/p,d=f+(c-a)%p;o.forEach(((o,s)=>{var c,p;if("pain"===o.type)return void function(n){const o=l({width:L-G,height:I,...r},{value:`${n.title}`,...i,...n.style||{}},{left:G,top:E.originY}),s=[];if(n.showScale||n.showNumber){const{lineXMain:i,textLeft:o}=J(n.position,G,L-G),l=n.list.length;n.list.forEach(((r,u)=>{let h=E.endY-u*C*n.spaceGridNumber;0===u&&(h=N-5);const a=0===u||u===l-1;if(!n.showNumber||a&&!n.showMaxMinNumber||s.push(B(r,n,o,h)),n.showScale&&0!==u){const[o,l]=i,r=new t.Line([o,h,l,h],{...e,...n.style});s.push(r)}}))}h.value.add(o,...s),o.sendToBack()}(o);const y=[];function w(i){const n=new t.Line(i,{...e,...o.style});y.push(n)}const v=0===s?d:f,S=0===s?a:d+a+(s-1)*f,b="right"===u?0:k.originY,m="right"===u?R:k.endY,Y=s>0?new t.Line([S,b,S,m],{...e}):null;Y&&y.push(Y);const x=S+v/2,X=o.spaceGridNumber||5;if(o.showScale||o.showNumber){const t=X*C/5,e=o.position||"center",{lineXMain:i,lineXSub:n,textLeft:l}=J(o.position,S,v),r=null==(c=o.list)?void 0:c.length;null==(p=null==o?void 0:o.list)||p.forEach(((s,u)=>{const h=k.endY-u*C*X,a=0===u||u===r-1;if(o.showNumber&&(!a||o.showMaxMinNumber)){const t=0==u?h-5:h,e=B(s,o,l,t),i=k.originY+e.height/2;t<i&&e.set({top:i}),y.push(e)}if(o.showScale&&u!==r-1)for(let l=0;l<5;l++)if(l>0||!o.showNumber||"center"!==e){const e=0==l?i[0]:n[0],o=0==l?i[1]:n[1],s=h-l*t;s>k.originY&&(w([e,s,o,s]),u==r-2&&4==l&&w([i[0],s-t,i[1],s-t]))}}))}let T=o.title||"";o.unit&&(T+="\n"+o.unit),T&&y.push(new t.Text(String(T),{...i,left:x,top:k.originY+C*X/2,textAlign:"center",...o.style}));const M=new t.Group(y,{...n,objectCaching:!1});g.push(M)}));const y=g.length>0?new t.Group([...g],{...n,objectCaching:!1}):null;y&&h.value.add(y),y&&y.sendToBack()}function q(t){return t.left>=L&&t.left<M&&t.top>=T&&t.top<=N}G&&function(){const e=JSON.parse(JSON.stringify(H));let i=N;const l=G-j.icons.marginRight;e.reverse().forEach((e=>{i-=10;let r=e.title.replace(/(.{2})/g,"$1\n");r.endsWith("\n")&&(r=r.slice(0,r.length-1));const f=new t.Text(String(r),{...n,objectCaching:!1,...e.titleStyle||{},originX:"right",originY:"bottom",left:l-(e.pointAttr.width||10)-5,top:i,lineHeight:1,fontSize:12}),d=o(e.type,{left:l,top:i-(f.height||30)/2-1,...e.pointAttr,originY:"center",originX:"right",origin:{title:e.title,unit:e.unit,type:s(e.bigType),_type:e.bigType,dataIndex:e.dataIndex,key:e.key,isMenu:!0},originLeft:l,originTop:i-(f.height||30)/2-1,...a.event});var b;i-=f.height||30,(b=d).on("moving",(()=>{b.set("originX","center"),function(t){if(t.left>=L&&t.left<=M){t.setCoords();const e="pain"===t.origin.type?E:k;t.top<e.originY&&t.set("top",e.originY),t.top>e.endY&&t.set("top",e.endY)}}(b),q(b)?g(b):p.show=!1})),b.on("mouseup:before",(t=>{if(p.show=!1,0===t.e.button&&q(b)){const t=x(b.left,"_type",V).includes(b.origin._type),e=v(b.left);if(!e||t)t&&e&&X();else{const t={data:{time:y(b.left),value:w(b.origin.type,b.top),...u(b.origin.type)?{key:b.origin.key}:{}},...b.origin};c("add",t),S(t)}}!function(t){t.setCoords().set({originX:"right",left:t.originLeft,top:t.originTop})}(b)})),h.value.add(f,d)}))}();const z=j.yScaleValue.filter((t=>"left"===t.layout&&"pain"!==t.type&&t.show));if((null==W?void 0:W.width)&&"left"===(null==(m=null==W?void 0:W.yScaleValue)?void 0:m.layout)&&(null==(Y=null==W?void 0:W.yScaleValue)?void 0:Y.show)&&z.push(_),O>0&&j.yScaleValue[O].show){const t=j.yScaleValue[O];0===O&&j.yScaleValue.length>1&&z.unshift(t),O==j.yScaleValue.length-1&&z.push(t)}const D=z.findIndex((t=>"pulse"===t.type&&t.show&&t.doubleShow)),F=z[D];return D>-1&&z.splice(D,0,{...F,title:(null==F?void 0:F.doubleTitle)||(null==F?void 0:F.title)}),$(z),h.value.add(new t.Rect({left:G,top:0,width:A-G-1,height:R-1,fill:"transparent",...e})),{drawScaleValue:$}}export{h as useLeft};
1
+ import{fabric as t}from"../utils/index.js";import{defaultBorderStyle as e,defaultTextStyle as i,defaultStyle as n,drawPoint as o,drawTextGroup as l,defaultRectStyle as r}from"./useDraw.js";import{getScaleInfo as s,drawScaleNumber as u,drawScaleLine as a}from"./useScaleColumn.js";import{getType as h,isOneLine as g}from"../utils/utils.js";function c(c,p,d,f,y,w,v,m,S,Y,b,x){var T,X;const{getEqualXTypes:C,repeatTip:N}=x,{originY:V,endY:j,originX:L,endX:M,xCellWidth:k,yCellHeight:E,left:I,vitalSignsOriginY:G,painOriginY:H,painHeight:O,iconsWidth:W,itemList:A,painIndex:R,right:_,canvasWidth:B,canvasHeight:J,getRightInfo:$}=p;function q(o){var h;if(!(null==o?void 0:o.length))return;const{layout:g}=o[0];let p=W,d=L;"right"===g&&(p=M,d=M+(null!=(h=null==_?void 0:_.width)?h:0));const f=[],y=O&&"right"!==g?o.length-1:o.length,w=(d-p)/y,v=w+(d-p)%y;o.forEach(((o,h)=>{if("pain"===o.type)return void function(n){const{list:o=[],spaceGridNumber:a=5,showScale:h,showNumber:g,position:p,showMaxMinNumber:d,style:f,title:y}=n,w=l({width:L-W,height:O,...r},{value:`${y}`,...i,...f||{}},{left:W,top:H.originY}),v=[];if(h||g){const{lineXMain:i,textLeft:l}=s(p,W,L-W),r=o.length;o.forEach(((o,s)=>{let c=H.endY-s*E*a;if(0===s&&(c=j-5),!g||(0===s||s===r-1)&&!d||v.push(u(o,n,l,c)),h&&0!==s){const[n,o]=i,l=new t.Line([n,c,o,c],{...e,...f});v.push(l)}}))}c.value.add(w,...v),w.sendToBack()}(o);const d=[],y=0===h?v:w,m=0===h?p:v+p+(h-1)*w,S="right"===g?0:G.originY,Y="right"===g?J:G.endY,b=h>0?new t.Line([m,S,m,Y],{...e}):null;b&&d.push(b);const x=m+y/2,{list:T=[],spaceGridNumber:X=5,showScale:C,showNumber:N,position:V,showMaxMinNumber:M}=o;if(C||N){const{lineXMain:t,lineXSub:e,textLeft:i}=s(V,m,y),n=T.length;T.forEach(((l,r)=>{const s=G.endY-r*E*X;if(N&&(!(0===r||r===n-1)||M)){const t=0==r?s-5:s,e=u(l,o,i,t),n=G.originY+e.height/2;t<n&&e.set({top:n}),d.push(e)}d.push(...a(o,r,t,e,s,E,G.originY))}))}let k=o.title||"";o.unit&&(k+="\n"+o.unit),k&&d.push(new t.Text(String(k),{...i,left:x,top:G.originY+E*X/2,textAlign:"center",...o.style}));const I=new t.Group(d,{...n,objectCaching:!1});f.push(I)}));const m=f.length>0?new t.Group([...f],{...n,objectCaching:!1}):null;m&&c.value.add(m),m&&m.sendToBack()}function z(t){return t.left>=L&&t.left<M&&t.top>=V&&t.top<=j}W&&function(){const e=JSON.parse(JSON.stringify(A));let i=j;const l=W-I.icons.marginRight;e.reverse().forEach((e=>{i-=10;let r=e.title.replace(/(.{2})/g,"$1\n");r.endsWith("\n")&&(r=r.slice(0,r.length-1));const s=new t.Text(String(r),{...n,objectCaching:!1,...e.titleStyle||{},originX:"right",originY:"bottom",left:l-(e.pointAttr.width||10)-5,top:i,lineHeight:1,fontSize:12}),u=o(e.type,{left:l,top:i-(s.height||30)/2-1,...e.pointAttr,originY:"center",originX:"right",origin:{title:e.title,unit:e.unit,type:h(e.bigType),_type:e.bigType,dataIndex:e.dataIndex,key:e.key,isMenu:!0},originLeft:l,originTop:i-(s.height||30)/2-1,...p.event});var a;i-=s.height||30,(a=u).on("moving",(()=>{a.set("originX","center"),function(t){if(t.left>=L&&t.left<=M){t.setCoords();const e="pain"===t.origin.type?H:G;t.top<e.originY&&t.set("top",e.originY),t.top>e.endY&&t.set("top",e.endY)}}(a),z(a)?f(a):y.show=!1})),a.on("mouseup:before",(t=>{if(y.show=!1,0===t.e.button&&z(a)){const t=C(a.left,"_type",k).includes(a.origin._type),e=Y(a.left);if(!e||t)t&&e&&N();else{const t={data:{time:m(a.left),value:S(a.origin.type,a.top),...g(a.origin.type)?{key:a.origin.key}:{}},...a.origin};d("add",t),b(t)}}!function(t){t.setCoords().set({originX:"right",left:t.originLeft,top:t.originTop})}(a)})),c.value.add(s,u)}))}();const D=I.yScaleValue.filter((t=>"left"===t.layout&&"pain"!==t.type&&t.show));if((null==_?void 0:_.width)&&"left"===(null==(T=null==_?void 0:_.yScaleValue)?void 0:T.layout)&&(null==(X=null==_?void 0:_.yScaleValue)?void 0:X.show)&&D.push($),R>0&&I.yScaleValue[R].show){const t=I.yScaleValue[R];0===R&&I.yScaleValue.length>1&&D.unshift(t),R==I.yScaleValue.length-1&&D.push(t)}const F=D.findIndex((t=>"pulse"===t.type&&t.show&&t.doubleShow)),K=D[F];return F>-1&&D.splice(F,0,{...K,title:(null==K?void 0:K.doubleTitle)||(null==K?void 0:K.title)}),q(D),c.value.add(new t.Rect({left:W,top:0,width:B-W-1,height:J-1,fill:"transparent",...e})),{drawScaleValue:q}}export{c as useLeft};
@@ -0,0 +1,16 @@
1
+ import { fabric } from '../utils';
2
+ import { AnyObject } from '../../../../../es/shared/types';
3
+ /**
4
+ * @description 获取一些刻度坐标信息
5
+ * @param position {'left'|'center'|'right'} 刻度位置
6
+ * @param x {number} 绘制刻度空间矩形的left坐标值
7
+ * @param width {number} 会子刻度空间矩形的宽度值
8
+ * @return { lineXMain, lineXSub, textLeft } {主刻度线的x1、x2坐标值, 副刻度线的x1、x2坐标值, 刻度数值的left坐标值}
9
+ */
10
+ export declare function getScaleInfo(position: string | undefined, x: number, width: number): {
11
+ lineXMain: number[];
12
+ lineXSub: number[];
13
+ textLeft: number;
14
+ };
15
+ export declare function drawScaleNumber(text: string | number, item: AnyObject, left: number, top: number): fabric.Text;
16
+ export declare function drawScaleLine(item: AnyObject, i: number, lineXMain: number[], lineXSub: number[], baseTop: number, yCellHeight: number, originY: number, _listLen?: number): Array<fabric.Object | fabric.Line>;
@@ -0,0 +1 @@
1
+ import{fabric as t}from"../utils/index.js";import{defaultTextStyle as e,defaultBorderStyle as n}from"./useDraw.js";function i(t="center",e,n){let i=e+n/2,r=[i-4.5,i+4.5],o=[i-2.5,i+2.5],l=i;return"right"===t&&(i=e,r=[i,i+9],o=[i,i+5],l=r[1]),"left"===t&&(i=e+n,r=[i-9,i],o=[i-5,i],l=r[0]),{lineXMain:r,lineXSub:o,textLeft:l}}function r(n,i,r,o){const{position:l,style:s,scaleNumberStyle:c}=i;return new t.Text(String(n),{...e,originX:"left"==l?"right":"right"==l?"left":"center",left:r,top:o,...s||c||{}})}function o(e,i,r){const o=new t.Line(i,{...n,...e.style||e.scaleLineStyle||{}});r.push(o)}function l(t,e,n,i,r,l,s,c){var u;const f=[],p=c||(null==(u=t.list)?void 0:u.length),a=t.position||"center",h=(t.spaceGridNumber||(c?1:5))*l/5;if(t.showScale&&e!==p-1)for(let l=0;l<5;l++)if(l>0||!t.showNumber||"center"!==a){const c=0==l?n[0]:i[0],u=0==l?n[1]:i[1],a=r-l*h;a>s&&(o(t,[c,a,u,a],f),e==p-2&&4==l&&o(t,[n[0],a-h,n[1],a-h],f))}return f}export{l as drawScaleLine,r as drawScaleNumber,i as getScaleInfo};
@@ -36,13 +36,14 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
36
36
  };
37
37
  }, {
38
38
  fieldsMapping: Record<string, string>;
39
- selectOptions: Record<string, string>[];
39
+ fixedWayOptions: {
40
+ label: string;
41
+ value: string;
42
+ }[];
40
43
  sortOptions: {
41
44
  label: string;
42
45
  value: string;
43
46
  }[];
44
- emit: (event: "reset" | "onSave" | "onClose", ...args: any[]) => void;
45
- settingView: any;
46
47
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
47
48
  fields: {
48
49
  type: import("vue").PropType<Partial<{
@@ -79,83 +80,25 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
79
80
  };
80
81
  }>> & {
81
82
  onReset?: ((...args: any[]) => any) | undefined;
82
- onOnSave?: ((...args: any[]) => any) | undefined;
83
- onOnClose?: ((...args: any[]) => any) | undefined;
83
+ onClose?: ((...args: any[]) => any) | undefined;
84
+ onSave?: ((...args: any[]) => any) | undefined;
84
85
  }>>;
85
- initFields: () => any[];
86
- state: {
87
- spinning: boolean;
88
- isCustomSearch: boolean;
89
- clickItem: {
90
- [key: string]: any;
91
- };
92
- fields: Partial<{
93
- [key: string]: any;
94
- id: string;
95
- name: string;
96
- show: boolean;
97
- sort: boolean;
98
- sortDirection: "NONE" | "ASC" | "DESC";
99
- title: string;
100
- alias: string;
101
- fixedShow: boolean;
102
- fixedWay: "NONE" | "LEFT" | "RIGHT";
103
- columnWidth: number | null;
104
- editable: boolean;
105
- editableDisable: boolean;
106
- required: boolean;
107
- requiredDisable: boolean;
108
- hide: boolean;
109
- }>[];
110
- widthShow: string;
111
- widthLarge: string;
112
- };
113
- leftStyle: (ele: Partial<{
114
- [key: string]: any;
115
- id: string;
116
- name: string;
117
- show: boolean;
118
- sort: boolean;
119
- sortDirection: "NONE" | "ASC" | "DESC";
120
- title: string;
121
- alias: string;
122
- fixedShow: boolean;
123
- fixedWay: "NONE" | "LEFT" | "RIGHT";
124
- columnWidth: number | null;
125
- editable: boolean;
126
- editableDisable: boolean;
127
- required: boolean;
128
- requiredDisable: boolean;
129
- hide: boolean;
130
- }>) => {
131
- background: string | undefined;
132
- };
133
- showCheckBox: (key: string) => boolean;
134
- hideTab: () => void;
135
- getTableFields: () => any[];
86
+ emit: (event: "close" | "save" | "reset", ...args: any[]) => void;
87
+ newFields: import("vue").Ref<import("../../../es/shared/types").AnyObject[]>;
88
+ columns: import("vue").Ref<import("../../../es/shared/types").AnyObject[]>;
136
89
  handleFieldSave: () => void;
137
90
  onCancle: () => void;
138
91
  reset: () => void;
139
- calculateCheck: (key: string) => boolean;
140
- handleAllCheck: (e: boolean, key: string) => void;
141
- handleFieldClick: (item: Partial<{
142
- [key: string]: any;
143
- id: string;
144
- name: string;
145
- show: boolean;
146
- sort: boolean;
147
- sortDirection: "NONE" | "ASC" | "DESC";
148
- title: string;
149
- alias: string;
150
- fixedShow: boolean;
151
- fixedWay: "NONE" | "LEFT" | "RIGHT";
152
- columnWidth: number | null;
153
- editable: boolean;
154
- editableDisable: boolean;
155
- required: boolean;
156
- requiredDisable: boolean;
157
- hide: boolean;
158
- }>) => void;
92
+ setOptions: (column: import("../../../es/shared/types").AnyObject) => {
93
+ label: string;
94
+ value: string;
95
+ }[];
96
+ setStyle: (column: import("../../../es/shared/types").AnyObject) => import("vue").CSSProperties;
97
+ isShowColumn: (column: import("../../../es/shared/types").AnyObject) => boolean;
98
+ initFields: () => import("../../../es/shared/types").AnyObject[];
99
+ getTableFields: () => import("../../../es/shared/types").AnyObject[];
100
+ handleAllCheck: (checked: boolean, field: string) => void;
101
+ handleCheck: (checked: boolean, column: import("../../../es/shared/types").AnyObject) => void;
159
102
  isDisable: (item: Partial<{
160
103
  [key: string]: any;
161
104
  id: string;
@@ -174,15 +117,16 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
174
117
  requiredDisable: boolean;
175
118
  hide: boolean;
176
119
  }>, key: string) => any;
177
- setWidth: () => void;
120
+ initColumns: () => void;
121
+ isNoAllCheck: (field: string) => boolean;
178
122
  NButton: any;
179
123
  NCheckbox: any;
180
124
  NSelect: any;
181
125
  NInput: any;
182
126
  NInputNumber: any;
183
- NSpin: any;
184
127
  NTooltip: any;
185
128
  NPopconfirm: any;
129
+ NIcon: any;
186
130
  Draggable: import("vue").DefineComponent<{
187
131
  list: {
188
132
  type: ArrayConstructor;
@@ -256,7 +200,8 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
256
200
  modelValue: unknown[];
257
201
  componentData: Record<string, any>;
258
202
  }>;
259
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "onSave" | "onClose")[], "reset" | "onSave" | "onClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
203
+ 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<{}>>, {}>;
204
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "save" | "reset")[], "close" | "save" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
260
205
  fields: {
261
206
  type: import("vue").PropType<Partial<{
262
207
  [key: string]: any;
@@ -292,8 +237,8 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
292
237
  };
293
238
  }>> & {
294
239
  onReset?: ((...args: any[]) => any) | undefined;
295
- onOnSave?: ((...args: any[]) => any) | undefined;
296
- onOnClose?: ((...args: any[]) => any) | undefined;
240
+ onClose?: ((...args: any[]) => any) | undefined;
241
+ onSave?: ((...args: any[]) => any) | undefined;
297
242
  }, {
298
243
  type: string;
299
244
  fields: Partial<{
@@ -1,15 +1,6 @@
1
- import { PropType } from 'vue';
1
+ import { PropType, CSSProperties } from 'vue';
2
2
  import { FieldSetItem } from '../../../../es/components/field-set/src/types';
3
- declare type Istate = {
4
- spinning: boolean;
5
- isCustomSearch: boolean;
6
- clickItem: {
7
- [key: string]: any;
8
- };
9
- fields: FieldSetItem[];
10
- widthShow: string;
11
- widthLarge: string;
12
- };
3
+ import { AnyObject } from '../../../../es/shared/types';
13
4
  declare const _default: import("vue").DefineComponent<{
14
5
  fields: {
15
6
  type: PropType<Partial<{
@@ -46,13 +37,14 @@ declare const _default: import("vue").DefineComponent<{
46
37
  };
47
38
  }, {
48
39
  fieldsMapping: Record<string, string>;
49
- selectOptions: Record<string, string>[];
40
+ fixedWayOptions: {
41
+ label: string;
42
+ value: string;
43
+ }[];
50
44
  sortOptions: {
51
45
  label: string;
52
46
  value: string;
53
47
  }[];
54
- emit: (event: "reset" | "onSave" | "onClose", ...args: any[]) => void;
55
- settingView: any;
56
48
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
57
49
  fields: {
58
50
  type: PropType<Partial<{
@@ -89,33 +81,36 @@ declare const _default: import("vue").DefineComponent<{
89
81
  };
90
82
  }>> & {
91
83
  onReset?: ((...args: any[]) => any) | undefined;
92
- onOnSave?: ((...args: any[]) => any) | undefined;
93
- onOnClose?: ((...args: any[]) => any) | undefined;
84
+ onClose?: ((...args: any[]) => any) | undefined;
85
+ onSave?: ((...args: any[]) => any) | undefined;
94
86
  }>>;
95
- initFields: () => any[];
96
- state: Istate;
97
- leftStyle: (ele: FieldSetItem) => {
98
- background: string | undefined;
99
- };
100
- showCheckBox: (key: string) => boolean;
101
- hideTab: () => void;
102
- getTableFields: () => any[];
87
+ emit: (event: "close" | "save" | "reset", ...args: any[]) => void;
88
+ newFields: import("vue").Ref<AnyObject[]>;
89
+ columns: import("vue").Ref<AnyObject[]>;
103
90
  handleFieldSave: () => void;
104
91
  onCancle: () => void;
105
92
  reset: () => void;
106
- calculateCheck: (key: string) => boolean;
107
- handleAllCheck: (e: boolean, key: string) => void;
108
- handleFieldClick: (item: FieldSetItem) => void;
93
+ setOptions: (column: AnyObject) => {
94
+ label: string;
95
+ value: string;
96
+ }[];
97
+ setStyle: (column: AnyObject) => CSSProperties;
98
+ isShowColumn: (column: AnyObject) => boolean;
99
+ initFields: () => AnyObject[];
100
+ getTableFields: () => AnyObject[];
101
+ handleAllCheck: (checked: boolean, field: string) => void;
102
+ handleCheck: (checked: boolean, column: AnyObject) => void;
109
103
  isDisable: (item: FieldSetItem, key: string) => any;
110
- setWidth: () => void;
104
+ initColumns: () => void;
105
+ isNoAllCheck: (field: string) => boolean;
111
106
  NButton: any;
112
107
  NCheckbox: any;
113
108
  NSelect: any;
114
109
  NInput: any;
115
110
  NInputNumber: any;
116
- NSpin: any;
117
111
  NTooltip: any;
118
112
  NPopconfirm: any;
113
+ NIcon: any;
119
114
  Draggable: import("vue").DefineComponent<{
120
115
  list: {
121
116
  type: ArrayConstructor;
@@ -189,7 +184,8 @@ declare const _default: import("vue").DefineComponent<{
189
184
  modelValue: unknown[];
190
185
  componentData: Record<string, any>;
191
186
  }>;
192
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "onSave" | "onClose")[], "reset" | "onSave" | "onClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
187
+ 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<{}>>, {}>;
188
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "save" | "reset")[], "close" | "save" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
193
189
  fields: {
194
190
  type: PropType<Partial<{
195
191
  [key: string]: any;
@@ -225,8 +221,8 @@ declare const _default: import("vue").DefineComponent<{
225
221
  };
226
222
  }>> & {
227
223
  onReset?: ((...args: any[]) => any) | undefined;
228
- onOnSave?: ((...args: any[]) => any) | undefined;
229
- onOnClose?: ((...args: any[]) => any) | undefined;
224
+ onClose?: ((...args: any[]) => any) | undefined;
225
+ onSave?: ((...args: any[]) => any) | undefined;
230
226
  }, {
231
227
  type: string;
232
228
  fields: Partial<{
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,reactive as t,watch as i,onMounted as s,openBlock as d,createElementBlock as a,normalizeStyle as o,createVNode as n,unref as c,withCtx as h,createElementVNode as r,normalizeClass as u,createCommentVNode as p,createBlock as f,createTextVNode as w,toDisplayString as v,withDirectives as k,vShow as y,renderSlot as b}from"vue";import{NSpin as g,NCheckbox as m,NTooltip as U,NSelect as S,NInput as x,NInputNumber as E,NPopconfirm as _,NButton as W}from"naive-ui";import C from"../../../shared/components/VueDraggable/src/vuedraggable.js";import O from"../../../_virtual/plugin-vue_export-helper.js";const F={class:"fields-set-content"},q={class:"fields-table"},D=r("span",{class:"width-show",style:{width:"4%"}},null,-1),N=r("span",{class:"width-large"},"所有字段",-1),P={class:"width-show"},j={key:0,class:"width-show"},R={key:1,class:"width-show"},I={class:"width-show"},L={class:"width-show"},T=r("span",{class:"width-showed"},"默认排序",-1),z=r("span",{class:"width-showed"},"固定",-1),A=r("span",{class:"width-word"},"自定义标题",-1),B=r("span",{class:"width-showed"},"列宽",-1),G=["onClick"],H={class:"width-show drag-icon-wrap"},J=r("span",{class:"iconfont icon-a-menzhenyishengzhanxitongtubiaotuozhuai",style:{color:"#000"}},null,-1),V=r("span",null,"拖拽调整顺序",-1),$=r("span",{style:{width:"14px","margin-right":"6px"}},null,-1),K={class:"width-show"},M={key:0,class:"width-show"},Q={key:1,class:"width-show"},X={class:"width-show"},Y={class:"width-show"},Z={class:"width-showed"},ee={class:"width-showed"},le={class:"width-word"},te={class:"width-showed"},ie={key:0,class:"check-options"},se={class:"btn-operate"};var de=O(e({__name:"FieldSet",props:{fields:{type:Array,default:function(){return[]}},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1}},emits:["onSave","onClose","reset"],setup(e,{expose:O,emit:de}){const ae=e,oe={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},ne=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],ce=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}],he=l(null);function re(){const e=ae.fields?JSON.parse(JSON.stringify(ae.fields)):[];return Object.keys(oe).forEach((l=>{e.forEach((e=>{"old"==ae.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[oe[l]]=1==e[l]:e[oe[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1)}))})),e}const ue=t({spinning:!1,isCustomSearch:!0,clickItem:{},fields:[],widthShow:"9%",widthLarge:"19%"}),pe=e=>ue.fields.some((l=>Object.prototype.hasOwnProperty.call(l,e))),fe=()=>{if("old"==ae.type){let e=[];return ue.fields.length>0&&ue.fields.forEach(((l,t)=>{e.push({id:l.id,field:l.name,visible:l.show,sequence:t,sortable:l.sort,title:l.alias,fixed:l.fixedWay,minWidth:l.columnWidth,bold:l.bold,sortDirection:l.sortDirection,...ae.isEdit?{required:l.required,editable:l.editable}:{}})})),e}return ue.fields},we=()=>{de("onSave",{tableFields:fe()})},ve=()=>{de("onClose")};function ke(){ue.fields=re(),de("reset")}const ye=e=>!!ue.fields.length&&ue.fields.every((l=>!(Object.prototype.hasOwnProperty.call(l,e)&&!ge(l,e))||l[e])),be=(e,l)=>{const t=e,i=ue.fields.map((e=>(Object.prototype.hasOwnProperty.call(e,l)&&!ge(e,l)&&(e[l]=t),e)));ue.fields=i};function ge(e,l){return["editable","required"].includes(l)&&e[`${l}Disable`]||["sort"].includes(l)&&1==e.notParticipatingSort}return i((()=>ae.fields),(e=>{(null==e?void 0:e.length)>0&&(ue.fields=re())}),{immediate:!0,deep:!0}),s((()=>{var e;null==(e=he.value)||e.style.setProperty("margin","auto"),ae.isEdit&&(ue.widthShow="8%",ue.widthLarge="13%")})),O({getTableFields:fe}),(l,t)=>(d(),a("div",{ref_key:"settingView",ref:he,class:"c-field-set",style:o({"--width-show":ue.widthShow,"--width-large":ue.widthLarge})},[n(c(g),{show:ue.spinning,tip:"...",style:{width:"100%",height:"100%"}},{default:h((()=>[r("div",F,[r("div",q,[r("div",{class:u(["setting-title",{"seting-title-api":!ue.isCustomSearch}])},[D,p(" 字段名称 "),N,p(" 显示 "),r("span",P,[pe("show")?(d(),f(c(m),{key:0,checked:ye("show"),"onUpdate:checked":t[0]||(t[0]=e=>be(e,"show"))},null,8,["checked"])):p("v-if",!0),w(" 显示 ")]),p(" 可编辑 "),e.isEdit?(d(),a("span",j,[pe("editable")?(d(),f(c(m),{key:0,checked:ye("editable"),"onUpdate:checked":t[1]||(t[1]=e=>be(e,"editable"))},null,8,["checked"])):p("v-if",!0),w(" 编辑 ")])):p("v-if",!0),p(" 是否必填 "),e.isEdit?(d(),a("span",R,[pe("required")?(d(),f(c(m),{key:0,checked:ye("required"),"onUpdate:checked":t[2]||(t[2]=e=>be(e,"required"))},null,8,["checked"])):p("v-if",!0),w(" 必填 ")])):p("v-if",!0),p(" 排序 "),r("span",I,[pe("sort")?(d(),f(c(m),{key:0,checked:ye("sort"),"onUpdate:checked":t[3]||(t[3]=e=>be(e,"sort"))},null,8,["checked"])):p("v-if",!0),w(" 排序 ")]),r("span",L,[n(c(m),{checked:ye("bold"),"onUpdate:checked":t[4]||(t[4]=e=>be(e,"bold"))},null,8,["checked"]),w(" 加粗 ")]),p(" 默认排序 "),T,p(" 固定 "),z,p(" 自定义标题 "),A,p(" 列宽 "),B],2),r("div",{ref:"setShow",class:u(["set-show",{"set-show-api":!ue.isCustomSearch}])},[n(c(C),{list:ue.fields,animation:"150","item-key":"id",tag:"ul"},{item:h((({element:l})=>{return[l.hide?p("v-if",!0):(d(),a("li",{key:0,class:"left-style",style:o((t=l,{background:ue.clickItem.id===t.id?"#f2f2f2":void 0})),onClick:e=>{return t=l,void(ue.clickItem=t);var t}},[r("span",H,[n(c(U),{trigger:"hover"},{trigger:h((()=>[J])),default:h((()=>[V])),_:1})]),p(" 字段名称 "),r("span",{class:u(["width-large title-item",{blue:l.extraField}])},[$,r("span",null,v(l.title),1)],2),p(" 显示 "),r("span",K,[k(n(c(m),{checked:l.show,"onUpdate:checked":e=>l.show=e},null,8,["checked","onUpdate:checked"]),[[y,"0001"!=l.id]])]),p(" 是否可编辑 "),e.isEdit?(d(),a("span",M,[k(n(c(m),{disabled:l.editableDisable,checked:l.editable,"onUpdate:checked":e=>l.editable=e},null,8,["disabled","checked","onUpdate:checked"]),[[y,"0001"!=l.id]])])):p("v-if",!0),p(" 是否必填 "),e.isEdit?(d(),a("span",Q,[k(n(c(m),{disabled:l.requiredDisable,checked:l.required,"onUpdate:checked":e=>l.required=e},null,8,["disabled","checked","onUpdate:checked"]),[[y,"0001"!=l.id]])])):p("v-if",!0),p(" 排序 "),r("span",X,[k(n(c(m),{checked:l.sort,"onUpdate:checked":e=>l.sort=e,disabled:1==l.notParticipatingSort},null,8,["checked","onUpdate:checked","disabled"]),[[y,"0001"!=l.id]])]),p(" 加粗 "),r("span",Y,[k(n(c(m),{checked:l.bold,"onUpdate:checked":e=>l.bold=e},null,8,["checked","onUpdate:checked"]),[[y,"0001"!=l.id]])]),p(" 默认排序 "),r("span",Z,[k(n(c(S),{value:l.sortDirection,"onUpdate:value":e=>l.sortDirection=e,options:ce,style:{width:"90%",display:"flex"}},null,8,["value","onUpdate:value"]),[[y,"0001"!=l.id]])]),p(" 固定 "),r("span",ee,[n(c(S),{value:l.fixedWay,"onUpdate:value":e=>l.fixedWay=e,options:ne,style:{width:"90%",display:"flex"}},null,8,["value","onUpdate:value"])]),p(" 自定义标题 "),r("span",le,[k(n(c(x),{value:l.alias,"onUpdate:value":e=>l.alias=e,style:{width:"90%"},clearable:""},null,8,["value","onUpdate:value"]),[[y,"0001"!=l.id]])]),p(" 列宽 "),r("span",te,[n(c(E),{value:l.columnWidth,"onUpdate:value":e=>l.columnWidth=e,clearable:""},null,8,["value","onUpdate:value"])])],12,G))];var t})),_:1},8,["list"])],2)]),ae.footerFlag?(d(),a("div",ie,[r("div",se,[b(l.$slots,"footer",{},(()=>[n(c(_),{onPositiveClick:ke},{trigger:h((()=>[n(c(W),{style:{"margin-right":"8px"}},{default:h((()=>[w("恢复默认设置")])),_:1})])),default:h((()=>[w(" 确认要恢复系统默认设置吗? ")])),_:1}),n(c(W),{style:{"margin-right":"8px"},onClick:ve},{default:h((()=>[w("取消")])),_:1}),n(c(W),{type:"primary",onClick:we},{default:h((()=>[w("保存")])),_:1})]))])])):p("v-if",!0)])])),_:3},8,["show"])],4))}}),[["__file","FieldSet.vue"]]);export{de as default};
1
+ import{defineComponent as e,ref as l,watch as t,openBlock as i,createElementBlock as d,createElementVNode as a,Fragment as o,renderList as c,normalizeStyle as s,createBlock as n,unref as r,withCtx as u,createTextVNode as f,toDisplayString as p,createCommentVNode as h,createVNode as v,withDirectives as b,vShow as y,renderSlot as k}from"vue";import{NCheckbox as x,NTooltip as m,NIcon as g,NSelect as _,NInput as A,NInputNumber as S,NPopconfirm as E,NButton as w}from"naive-ui";import W from"../../../shared/components/VueDraggable/src/vuedraggable.js";import{ReorderTwoOutline as N}from"@vicons/ionicons5";import F from"../../../_virtual/plugin-vue_export-helper.js";const U={class:"c-field-set"},O={class:"c-field-set__table-header"},R={class:"c-field-set__table-body"},q=["tabindex"],D=["title"],C=a("span",null,"拖拽调整顺序",-1),T={key:0,class:"c-field-set__table-footer"};var j=F(e({__name:"FieldSet",props:{fields:{type:Array,default:function(){return[]}},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1}},emits:["save","close","reset"],setup(e,{expose:F,emit:j}){const P=e,B={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},G=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],H=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}],I=l([]),J=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:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"}]),L=()=>{j("save",{tableFields:Q()})},$=()=>{j("close")};function V(){I.value=M(),Y(),j("reset")}function z(e){return"fixedWay"===e.field?G:H}function K(e){const l={flex:"1 1 90px"};switch(e.type){case"text":Object.assign(l,{flex:"0 0 120px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"});break;case"checkbox":l.flex="1 1 60px";break;case"select":l.flex="1 1 80px";break;case"input":l.flex="1 1 100px"}return l}function M(){const e=JSON.parse(JSON.stringify(P.fields||[]));return Object.keys(B).forEach((l=>{e.forEach((e=>{"old"==P.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[B[l]]=1==e[l]:e[B[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1)}))})),e}const Q=()=>{if("old"==P.type){const e=[];return I.value.length>0&&I.value.forEach(((l,t)=>{e.push({id:l.id,field:l.name,visible:l.show,sequence:t,sortable:l.sort,title:l.alias,fixed:l.fixedWay,minWidth:l.columnWidth,bold:l.bold,sortDirection:l.sortDirection,...P.isEdit?{required:l.required,editable:l.editable}:{}})})),e}return I.value};function X(e,l){return["editable","required"].includes(l)&&e[`${l}Disable`]||["sort"].includes(l)&&1==e.notParticipatingSort}function Y(){J.value.forEach((e=>{if(function(e){const l=["editable","required"].includes(e.field);return l&&P.isEdit||!l}(e)&&(e.isShow=!0),"checkbox"===e.type){const l=I.value.every((l=>!Reflect.has(l,e.field)));e.checkedAll=!Z(e.field)&&!l}}))}function Z(e){return I.value.some((l=>!X(l,e)&&!l[e]&&"0001"!=l.id))}return t((()=>P.fields),(e=>{(null==e?void 0:e.length)>0&&(I.value=M(),Y())}),{immediate:!0,deep:!0}),F({getTableFields:Q}),(l,t)=>(i(),d("div",U,[a("div",O,[(i(!0),d(o,null,c(J.value,((e,l)=>(i(),d(o,{key:l},[e.isShow?(i(),d("span",{key:0,class:"table-cell",style:s(K(e))},["checkbox"===e.type?(i(),n(r(x),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void I.value.forEach((e=>{X(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:u((()=>[f(p(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])):h("v-if",!0),f(" "+p("checkbox"!==e.type?e.title:""),1)],4)):h("v-if",!0)],64)))),128))]),a("div",R,[v(r(W),{list:I.value,animation:"150","item-key":"id",tag:"ul"},{item:u((({element:e,index:l})=>[e.hide?h("v-if",!0):(i(),d("li",{key:0,tabindex:l},[(i(!0),d(o,null,c(J.value,((l,t)=>(i(),d(o,{key:t},[l.isShow?(i(),d("span",{key:0,class:"table-cell",title:e[l.field],style:s(K(l))},["text"===l.type?(i(),d(o,{key:0},[v(r(m),{trigger:"hover"},{trigger:u((()=>[v(r(g),{style:{"margin-right":"5px",top:"2px"},component:r(N)},null,8,["component"])])),default:u((()=>[C])),_:1}),f(" "+p(e[l.field]),1)],64)):h("v-if",!0),"checkbox"===l.type?b((i(),n(r(x),{key:1,disabled:X(e,l.field),checked:e[l.field],"onUpdate:checked":[t=>e[l.field]=t,e=>function(e,l){const t=!e||Z(l.field);l.checkedAll=!t}(e,l)]},null,8,["disabled","checked","onUpdate:checked"])),[[y,"0001"!=e.id]]):h("v-if",!0),"select"===l.type?b((i(),n(r(_),{key:2,value:e[l.field],"onUpdate:value":t=>e[l.field]=t,options:z(l)},null,8,["value","onUpdate:value","options"])),[[y,"fixedWay"===l.field||"0001"!=e.id]]):h("v-if",!0),"input"===l.type?b((i(),n(r(A),{key:3,value:e[l.field],"onUpdate:value":t=>e[l.field]=t,clearable:""},null,8,["value","onUpdate:value"])),[[y,"0001"!=e.id]]):h("v-if",!0),"inputNumber"===l.type?(i(),n(r(S),{key:4,value:e[l.field],"onUpdate:value":t=>e[l.field]=t},null,8,["value","onUpdate:value"])):h("v-if",!0)],12,D)):h("v-if",!0)],64)))),128))],8,q))])),_:1},8,["list"])]),e.footerFlag?(i(),d("div",T,[h(" 底部按钮插槽 "),k(l.$slots,"footer",{},(()=>[v(r(E),{onPositiveClick:V},{trigger:u((()=>[v(r(w),{style:{"margin-right":"8px"}},{default:u((()=>[f("恢复默认设置")])),_:1})])),default:u((()=>[f(" 确认要恢复系统默认设置吗? ")])),_:1}),v(r(w),{style:{"margin-right":"8px"},onClick:$},{default:u((()=>[f("取消")])),_:1}),v(r(w),{type:"primary",onClick:L},{default:u((()=>[f("保存")])),_:1})]))])):h("v-if",!0)]))}}),[["__file","FieldSet.vue"]]);export{j as default};
@@ -1 +1 @@
1
- .c-field-set{height:100%;position:relative}.c-field-set ul{margin:0;padding:0}.c-field-set .fields-set-content{display:flex;flex-direction:column;height:100%;overflow:hidden}.c-field-set .fields-set-content .fields-table{display:flex;flex:1;flex-direction:column;overflow:auto}.c-field-set .n-spin-container{height:100%;width:100%}.c-field-set .n-spin-content{height:100%}.c-field-set .setting-title{background:#f2f2f4;border:1px solid #f2f2f2;height:52px;line-height:52px}.c-field-set .setting-title span{display:inline-block}.c-field-set .setting-title.seting-title-api .width-large{width:15%}.c-field-set .set-show{min-height:100px;overflow-y:auto}.c-field-set .set-show.set-show-api .width-large{width:15%}.c-field-set .set-show .left-style.sortable-chosen{background:#fafafa;box-shadow:0 0 10px 0 #d5d5d5}.c-field-set .set-show li{align-items:center;border-bottom:1px solid #e8e8e8;display:flex;height:52px;line-height:52px;padding:5px 0}.c-field-set .set-show .is-sort-style{border:1px solid #d5d5d5;border-radius:4px;color:#38454f;height:32px;margin-right:5px;outline:none;text-indent:6px;width:87px}.c-field-set .set-show .is-sort-style:disabled{background:#f5f5f5;cursor:not-allowed}.c-field-set .set-show .col-width-style{width:70px}.c-field-set .set-show .title-item{align-items:center;display:inline-flex;justify-content:flex-start;text-align:left}.c-field-set .set-show .title-item>span{display:inline-block;max-width:calc(100% - 20px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-field-set .alias-style{border:1px solid #d4dee5;border-radius:4px;color:#38454f;height:32px;outline:none;text-indent:16px}.c-field-set .btn-operate{border-top:1px solid #d5d5d5;padding:12px 0}.c-field-set .width-show{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:var(--width-show)}.c-field-set .drag-icon-wrap{cursor:pointer;text-align:center;width:5%!important}.c-field-set .width-showed{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-field-set .width-showed select{width:90%!important}.c-field-set span.width-showed{width:10%}.c-field-set .width-word{display:inline-block;line-height:52px;overflow:hidden;white-space:nowrap;width:var(--width-large)}.c-field-set .width-word input{width:90%!important}.c-field-set .width-large{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:var(--width-large)}
1
+ .c-field-set{display:flex;flex-flow:column nowrap;height:100%;width:100%}.c-field-set ul{margin:0;padding:0}.c-field-set ul li{align-items:center;background:#fff;border-bottom:1px solid #e8e8e8;display:flex;height:52px;padding:5px 0}.c-field-set ul li:active{background:#f2f2f2;box-shadow:0 0 10px 0 #d5d5d5}.c-field-set ul li:focus{background-color:#f2f2f2}.c-field-set .table-cell{box-sizing:border-box;display:inline-block;padding:0 5px}.c-field-set__table-header{align-items:center;background:#f2f2f4;border:1px solid #f2f2f2;display:flex;height:52px}.c-field-set__table-body{flex:1;overflow-y:scroll}.c-field-set__table-footer{border-top:1px solid #d5d5d5;padding:12px 0}