cnhis-design-vue 3.2.14-beta.2 → 3.2.14-beta.24

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 (233) hide show
  1. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  2. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  3. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  4. package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
  5. package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +1 -1
  6. package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
  7. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  8. package/es/components/big-table/src/components/edit-form/edit-date.js +1 -1
  9. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  10. package/es/components/big-table/src/components/edit-form/edit-time.js +1 -1
  11. package/es/components/big-table/src/components/input-button.vue2.js +1 -1
  12. package/es/components/big-table/src/hooks/useTableParse.js +1 -1
  13. package/es/components/button-print/index.d.ts +4 -0
  14. package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -0
  15. package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -1
  16. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +4 -0
  17. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  18. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  19. package/es/components/classification/src/components/set-classification/index.vue2.js +1 -1
  20. package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
  21. package/es/components/classification/src/index.vue2.js +1 -1
  22. package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +1 -1
  23. package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -1
  24. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  25. package/es/components/expand-field/src/index.vue2.js +1 -1
  26. package/es/components/expand-field/src/utils/constant.js +1 -1
  27. package/es/components/fabric-chart/index.d.ts +19 -2
  28. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +19 -2
  29. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  30. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
  31. package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +13 -0
  32. package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -1
  33. package/es/components/fabric-chart/src/components/useStyle.js +1 -1
  34. package/es/components/fabric-chart/src/constants/index.js +1 -1
  35. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  36. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.d.ts +1 -0
  37. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  38. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
  39. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  40. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +1 -0
  41. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  42. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
  43. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -1
  44. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
  45. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  47. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  48. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +1 -0
  49. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  50. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +7 -1
  51. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  52. package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
  53. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  54. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  55. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  56. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.d.ts +1 -0
  57. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  58. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  59. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
  60. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  61. package/es/components/fabric-chart/src/interface.d.ts +2 -0
  62. package/es/components/fabric-chart/src/utils/index.d.ts +1 -0
  63. package/es/components/fabric-chart/src/utils/index.js +1 -1
  64. package/es/components/field-set/src/FieldColor.vue.d.ts +3 -3
  65. package/es/components/field-set/src/FieldColor.vue2.js +1 -1
  66. package/es/components/field-set/src/FieldFilter.vue.d.ts +5 -4
  67. package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
  68. package/es/components/field-set/src/FieldSet.vue.d.ts +2 -2
  69. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  70. package/es/components/field-set/src/Index.vue2.js +1 -1
  71. package/es/components/field-set/src/TableStyle.vue2.js +1 -1
  72. package/es/components/field-set/src/components/condition.vue2.js +1 -1
  73. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
  74. package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -1
  75. package/es/components/field-set/src/components/edit-filter.vue2.js +1 -1
  76. package/es/components/field-set/src/components/table-row.vue.d.ts +2 -2
  77. package/es/components/field-set/src/components/table-row.vue2.js +1 -1
  78. package/es/components/field-set/src/constants/filter.d.ts +21 -12
  79. package/es/components/field-set/src/constants/filter.js +1 -1
  80. package/es/components/field-set/src/constants/index.js +1 -1
  81. package/es/components/field-set/src/types/index.d.ts +1 -1
  82. package/es/components/form-config/index.d.ts +7 -5
  83. package/es/components/form-config/index.js +1 -1
  84. package/es/components/form-config/src/FormConfig.vue.d.ts +7 -5
  85. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  86. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +2 -0
  87. package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -1
  88. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +2 -2
  89. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
  90. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
  91. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -1
  92. package/es/components/form-config/src/constants/index.d.ts +1 -11
  93. package/es/components/form-config/src/constants/index.js +1 -1
  94. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  95. package/es/components/form-config/src/hooks/useLocale.d.ts +52 -0
  96. package/es/components/form-config/src/hooks/useLocale.js +1 -0
  97. package/es/components/form-render/index.js +1 -1
  98. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
  99. package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -1
  100. package/es/components/form-render/src/components/renderer/combination/tableCombination.js +1 -1
  101. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  102. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  103. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  104. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  105. package/es/components/form-render/src/hooks/usePresetScope.d.ts +1 -1
  106. package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
  107. package/es/components/form-render/src/utils/index.d.ts +1 -0
  108. package/es/components/form-render/src/utils/index.js +1 -1
  109. package/es/components/iho-chat/index.d.ts +612 -52
  110. package/es/components/iho-chat/src/Index.vue.d.ts +615 -59
  111. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  112. package/es/components/iho-chat/src/api/index.d.ts +1 -0
  113. package/es/components/iho-chat/src/api/index.js +1 -1
  114. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +32 -1
  115. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  116. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +52 -3
  117. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  118. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +52 -2
  119. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  120. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +221 -11
  121. package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
  122. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +82 -6
  123. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  124. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +19 -1
  125. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  126. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +20 -2
  127. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  128. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +71 -4
  129. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  130. package/es/components/iho-chat/src/components/ContextMenu.d.ts +11 -2
  131. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  132. package/es/components/iho-chat/src/components/MessageTemplate.vue.d.ts +1 -1
  133. package/es/components/iho-chat/src/components/MessageTemplate.vue2.js +1 -1
  134. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +51 -2
  135. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
  136. package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +19 -1
  137. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  138. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +66 -1
  139. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  140. package/es/components/iho-chat/src/components/Video.vue.d.ts +19 -1
  141. package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
  142. package/es/components/iho-chat/src/constants/index.d.ts +13 -3
  143. package/es/components/iho-chat/src/constants/index.js +1 -1
  144. package/es/components/iho-chat/src/hooks/index.d.ts +2 -2
  145. package/es/components/iho-chat/src/hooks/index.js +1 -1
  146. package/es/components/iho-chat/src/hooks/useData.d.ts +94 -0
  147. package/es/components/iho-chat/src/hooks/useData.js +1 -0
  148. package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
  149. package/es/components/iho-chat/src/hooks/useVideo.d.ts +19 -1
  150. package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
  151. package/es/components/iho-chat/src/hooks/useWebSocket.d.ts +3 -0
  152. package/es/components/iho-chat/src/hooks/useWebSocket.js +1 -0
  153. package/es/components/iho-chat/src/types/index.d.ts +0 -6
  154. package/es/components/iho-chat/src/types/index.js +1 -1
  155. package/es/components/iho-chat/src/utils/index.d.ts +1 -0
  156. package/es/components/iho-chat/src/utils/index.js +1 -1
  157. package/es/components/iho-chat/style/index.css +1 -1
  158. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  159. package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/dynamicFilter.vue2.js +1 -1
  160. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  161. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  162. package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +1 -1
  163. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  164. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  165. package/es/components/iho-table/src/utils/index.js +1 -1
  166. package/es/components/index.css +1 -1
  167. package/es/components/index.js +1 -1
  168. package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -1
  169. package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
  170. package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -1
  171. package/es/components/map/src/Map.vue2.js +1 -1
  172. package/es/components/picture-clipper/src/PictureClipper.vue2.js +1 -1
  173. package/es/components/quick-search/src/index.vue2.js +1 -1
  174. package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -1
  175. package/es/components/scale-view/index.d.ts +31 -0
  176. package/es/components/scale-view/src/ScaleView.vue.d.ts +13 -0
  177. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  178. package/es/components/scale-view/src/components/composables/choose-common.js +1 -1
  179. package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -1
  180. package/es/components/scale-view/src/components/formitem/r-checkbox.d.ts +9 -0
  181. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
  182. package/es/components/scale-view/src/components/formitem/r-input.d.ts +9 -0
  183. package/es/components/scale-view/src/components/formitem/r-input.js +1 -1
  184. package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
  185. package/es/components/scale-view/src/components/formitem/r-radio.d.ts +9 -0
  186. package/es/components/scale-view/src/components/formitem/r-radio.js +1 -1
  187. package/es/components/scale-view/src/components/formitem/r-select.js +1 -1
  188. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
  189. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
  190. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  191. package/es/components/scale-view/src/hooks/scaleview-methods.js +1 -1
  192. package/es/components/scale-view/src/hooks/scaleview-props.d.ts +4 -0
  193. package/es/components/scale-view/src/hooks/scaleview-props.js +1 -1
  194. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  195. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
  196. package/es/components/scale-view/src/hooks/use-component.d.ts +72 -0
  197. package/es/components/scale-view/style/index.css +1 -1
  198. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  199. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  200. package/es/components/select-label/src/components/label-classify.vue2.js +1 -1
  201. package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -1
  202. package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
  203. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  204. package/es/components/select-person/src/SelectPersonType.vue2.js +1 -1
  205. package/es/components/select-person/src/index.vue2.js +1 -1
  206. package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
  207. package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +1 -1
  208. package/es/components/table-filter/src/components/bi-filter/helpers/options.js +1 -1
  209. package/es/components/table-filter/src/components/bi-filter/index.vue2.js +1 -1
  210. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
  211. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
  212. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -1
  213. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
  214. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +4 -7
  215. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
  216. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +4 -7
  217. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1 -1
  218. package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +1 -1
  219. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +4 -7
  220. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  221. package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +1 -1
  222. package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -1
  223. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -1
  224. package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -1
  225. package/es/shared/package.json.js +1 -1
  226. package/es/shared/types/index.d.ts +3 -0
  227. package/es/shared/utils/index.d.ts +1 -0
  228. package/es/shared/utils/index.js +1 -1
  229. package/package.json +2 -2
  230. package/es/components/iho-chat/src/hooks/useSession.d.ts +0 -12
  231. package/es/components/iho-chat/src/hooks/useSession.js +0 -1
  232. package/es/components/iho-chat/src/hooks/useState.d.ts +0 -18
  233. package/es/components/iho-chat/src/hooks/useState.js +0 -1
@@ -1 +1 @@
1
- @font-face{font-family:scale-view-iconfont;src:url(scale-view-iconfont.ttf?t=1682489008262) format("truetype")}.scale-view-iconfont{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:scale-view-iconfont!important;font-size:14px;font-style:normal}.icon-scale-view-menzhenyishengzhanxitongtubiaoguanbi:before{content:"\e76e"}.icon-scale-view-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-scale-view-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.icon-scale-view-shijian:before{content:"\e8c5"}.icon-scale-view-qianming:before{content:"\e6ca"}.icon-scale-view-cuo:before{content:"\e6e5"}.icon-scale-view-dui:before{content:"\e7c8"}.icon-scale-view-dengpao:before{content:"\e719"}.c-scale-view-block .c-choice-wrap{display:flex;flex-wrap:wrap;width:100%}.c-scale-view-block .c-choice-wrap .c-choice-radio-div{align-items:center;display:flex;flex-wrap:wrap}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-input.n-input--disabled{background:#fff}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled{border:1px solid transparent;padding-left:4px}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked{border-color:#2d7aff;border-radius:4px;color:#000!important;font-weight:700;padding-bottom:4px;padding-top:4px}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked .other-span,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked .other-span{color:#000!important}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked .n-radio__dot,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked .n-radio__dot{background-color:var(--n-color-active);box-shadow:var(--n-box-shadow-active)}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked .n-radio__dot:before,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked .n-radio__dot:before{background:var(--n-dot-color-active)}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked .n-checkbox-box,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked .n-checkbox-box{background-color:var(--n-color-checked)}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked .n-checkbox-box .n-checkbox-box__border,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked .n-checkbox-box .n-checkbox-box__border{border-color:#2d7aff}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked .n-checkbox-box .n-checkbox-icon .check-icon,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked .n-checkbox-box .n-checkbox-icon .line-icon,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked .n-checkbox-box .n-checkbox-icon .check-icon,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked .n-checkbox-box .n-checkbox-icon .line-icon{fill:var(--n-check-mark-color)}.c-scale-view-block .c-choice-wrap .n-radio-input{height:14px;width:14px}.c-scale-view-block .c-choice-wrap .scale-choice-img-wrap{background:#fff;border:1px solid #d5d5d5;border-radius:4px;display:inline-block;height:62px;margin-right:16px;min-width:74px;position:relative;width:74px}.c-scale-view-block .c-choice-wrap .scale-choice-img-wrap:hover .scale-preview-wrap{display:flex}.c-scale-view-block .c-choice-wrap .scale-choice-img-wrap>img{height:100%;object-fit:cover;width:100%}.c-scale-view-block .c-choice-wrap .scale-choice-img-wrap .scale-preview-wrap{align-items:center;background:rgba(0,0,0,.75);border-radius:8px;bottom:0;display:none;font-size:20px;justify-content:center;left:0;position:absolute;right:0;top:0}.c-scale-view-block .c-choice-wrap .scale-choice-img-wrap .scale-preview-wrap i.anticon{color:#fff;margin:0}.c-scale-view-block .c-choice-wrap .presuffix-wrap{align-items:center;display:inline-flex;white-space:normal;width:100%}.c-scale-view-block .c-choice-wrap .n-input{border-bottom:1px solid #d9d9d9;flex:1;max-width:300px}.c-scale-view-block .c-choice-wrap .choose-other{flex:1}.c-scale-view-block .c-choice-wrap .other-span{word-break:break-all}.c-scale-view-block .c-choice-wrap.choice-wrap-1 .c-choice-radio-div{width:100%}.c-scale-view-block .c-choice-wrap.choice-wrap-1 .c-choice-radio-div .n-input{max-width:300px}.c-scale-view-block .c-choice-wrap.choice-wrap-2 .c-choice-radio-div{width:50%}.c-scale-view-block .c-choice-wrap.choice-wrap-3 .c-choice-radio-div{width:33%}.c-scale-view-block .c-choice-wrap.choice-wrap-4 .c-choice-radio-div{width:25%}.c-scale-view-block .c-choice-wrap label{align-items:center;display:inline-flex;margin:4px 0}.c-scale-view-block .c-choice-wrap label .n-radio__label{align-items:center;display:inline-flex;flex:1;white-space:normal}.c-scale-view-block .c-choice-wrap .n-checkbox{align-items:center;display:inline-flex;margin:4px 0}.c-scale-view-block .c-choice-wrap .n-checkbox .n-checkbox__label{align-items:center;display:inline-flex;flex:1;white-space:normal}.c-scale-view-block{box-sizing:border-box;color:rgba(0,0,0,.65);height:100%;overflow:hidden;padding-top:4px;position:relative;text-align:left;width:100%}.c-scale-view-block-hasfooter{padding-bottom:50px}.c-scale-view-block .scale-container{box-sizing:border-box;height:100%;overflow-y:auto;transform-origin:0 0;width:100%}.c-scale-view-block .scale-container.scale-container-nopadding{display:flex;flex-direction:column;height:100%}.c-scale-view-block .scale-container::-webkit-scrollbar{background-color:#f5f5f5;height:6px;width:10px}.c-scale-view-block .scale-container::-webkit-scrollbar-track{background-color:#f2f2f2;border-radius:10px}.c-scale-view-block .scale-container::-webkit-scrollbar-thumb{background-color:#dbdcdc;border-radius:10px}.c-scale-view-block .scale-container .n-base-selection--selected.n-base-selection--disabled .n-base-selection-overlay__wrapper{color:#000;font-weight:700}.c-scale-view-block .scale-container .n-base-selection--selected.n-base-selection--disabled.n-base-selection--multiple .n-base-selection-tag-wrapper .n-tag.n-tag--disabled{--n-border:1px solid #2d7aff!important;--n-border-radius:4px!important;--n-opacity-disabled:1!important;border-color:#2d7aff!important;color:#000;font-weight:700}.c-scale-view-block .scale-container .n-base-selection--selected.n-base-selection--disabled.n-base-selection--multiple .n-base-selection-tag-wrapper .n-tag.n-tag--disabled .n-base-close{display:none}.c-scale-view-block .scale-container .n-input.n-input--disabled .n-input__input-el,.c-scale-view-block .scale-container .n-input.n-input--disabled .n-input__textarea-el{color:#000;font-weight:700}.c-scale-view-block .lb-title{text-align:center}.c-scale-view-block .map-container{cursor:pointer}.c-scale-view-block .linebar-div{margin-top:24px;text-align:center;width:100%}.c-scale-view-block .linebar-div .n-divider{margin-top:4px}.c-scale-view-block .my-prompt{background-color:#fff;border-radius:4px;box-shadow:0 5px 13px rgba(0,0,0,.14);padding:10px}.c-scale-view-block .img-card{width:100%}.c-scale-view-block .main{box-sizing:border-box}.c-scale-view-block .main .scale-label-required{font-weight:700}.c-scale-view-block .main .required-text{color:#e02828;font-weight:700}.c-scale-view-block .main .score-i{word-break:keep-all}.c-scale-view-block .main .evalute-label{background:rgba(45,122,255,.1);border:1px solid rgba(45,122,255,.5);border-radius:4px;color:#2d7aff;display:inline-block;font-size:12px;height:20px;line-height:20px;margin-left:4px;padding:0 5px}.c-scale-view-block .main .evalute-tip{background:rgba(255,194,0,.15);border-radius:2px;color:#fe9626;cursor:pointer;display:inline-block;margin-left:8px;padding:0 5px}.c-scale-view-block .footer{align-items:center;background:#fff;border-top:1px solid #e8e8e8;bottom:0;box-sizing:border-box;display:flex;flex-basis:50px;height:50px;left:0;position:absolute;width:100%}.c-scale-view-block .footer .n-button+.n-button{margin-left:8px}.n-dialog.n-modal.c-evatip-dialog-wrap{max-height:unset;overflow-y:hidden;padding:0;width:494px!important}.n-dialog.n-modal.c-evatip-dialog-wrap .n-dialog__title{border-bottom:1px solid #e8e8e8;font-weight:600;height:52px;line-height:52px;padding-left:16px}.n-dialog.n-modal.c-evatip-dialog-wrap .n-base-icon{color:#666;margin:0;position:absolute}.n-dialog.n-modal.c-evatip-dialog-wrap .n-dialog__content{margin:0}.n-dialog.n-modal.c-evatip-dialog-wrap .evatip-container{color:#2e2e2e;font-size:16px;max-height:60vh;min-height:100px;overflow-y:auto;padding:26px 16px}.n-dialog.n-modal.c-evatip-dialog-wrap .evatip-container p{border:1px solid hsla(0,0%,84%,.6);border-radius:4px;font-size:14px;margin-bottom:0;margin-top:12px;padding:16px}.n-dialog.n-modal.c-evatip-dialog-wrap .n-dialog__action{border-top:1px solid #e8e8e8;box-sizing:border-box;display:block;padding:10px 16px;text-align:right;width:100%}.c-scale-view-block .c-answerParse{background:hsla(0,64%,98%,.6);border-radius:8px;color:#2e2e2e;margin-bottom:12px;margin-top:6px;padding:16px}.c-scale-view-block .c-answerParse .answer-res-wrap{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.c-scale-view-block .c-answerParse .answer-res-wrap .answer-res{align-items:center;background:#f06f64;border-radius:18px;color:#fff;display:inline-flex;font-weight:700;line-height:36px;padding:0 18px}.c-scale-view-block .c-answerParse .answer-res-wrap .answer-res svg{font-size:16px;margin-right:8px}.c-scale-view-block .c-answerParse .answer-res-wrap .answer-score{color:#2e2e2e;font-size:14px;font-weight:600}.c-scale-view-block .c-answerParse .correct-answer{line-height:20px;margin-bottom:16px}.c-scale-view-block .c-answerParse .correct-answer p{display:inline-block;font-weight:700}.c-scale-view-block .c-answerParse .correct-answer span{color:#91c850;font-size:16px;word-break:break-all}.c-scale-view-block .c-answerParse .answer-key{line-height:20px}.c-scale-view-block .c-answerParse .answer-key p{font-weight:700;line-height:20px;margin-bottom:16px}.c-scale-view-block .c-answerParse .answer-key span{word-break:break-all}.c-scale-view-block .c-answerParse.answerParse-success{background:rgba(234,251,228,.6)}.c-scale-view-block .c-answerParse.answerParse-success .answer-res{background:#91c850}.c-scale-view-block .c-evaluateCountdown{background:#f2f2f4;border-radius:8px;color:#212121;position:absolute;right:0;text-align:center;top:0;z-index:2}.c-scale-view-block .c-evaluateCountdown .c-evaluateCountdown-wrap{min-width:166px;padding:8px 12px}.c-scale-view-block .c-evaluateCountdown .evaluate-toggle-icon{cursor:pointer;font-size:16px;position:absolute;right:10px;top:11px;z-index:3}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-hasTime:not(.evaluateCountdown-EvaluetaResSituation){background:#f1f1f4;padding:8px 32px}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-hasTime:not(.evaluateCountdown-EvaluetaResSituation) .countdown{font-size:26px;line-height:40px}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-hasTime:not(.evaluateCountdown-EvaluetaResSituation) .countdown span{line-height:unset}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-hasTime:not(.evaluateCountdown-EvaluetaResSituation) .countdown svg{display:none}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-EvaluetaResSituation{text-align:left}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-EvaluetaResSituation.evaluateCountdown-hasTime{padding:8px 32px}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-EvaluetaResSituation.evaluateCountdown-hasTime .evaluate-toggle-icon{font-size:18px;right:8px;top:18px}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-EvaluetaResSituation .countdown{font-size:26px;line-height:40px}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-EvaluetaResSituation .countdown span{line-height:unset}.c-scale-view-block .c-evaluateCountdown .countdown{align-items:center;color:#000;display:flex;font-size:14px;justify-content:center}.c-scale-view-block .c-evaluateCountdown .countdown span{line-height:18px}.c-scale-view-block .c-evaluateCountdown .countdown svg{color:#969696;font-size:16px;margin-left:8px}.c-scale-view-block .c-evaluateCountdown .countdown.countdown-red{color:#ff1818}.c-scale-view-block .c-evaluateCountdown .answered-blue{color:#2d7aff}.c-scale-view-block .c-evaluateCountdown .answered-blod{font-weight:700}.c-scale-view-block .c-evaluate-page{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.c-scale-view-block .c-evaluate-page .evaluate-container{border:1px solid #e0e0e0;border-radius:15px;padding:45px 32px;text-align:center;width:620px}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-name{color:#212121;font-size:20px;line-height:28px;margin-bottom:10px;max-height:88px;overflow-y:auto;word-break:break-all}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-explain{background:#f2f2f4;border-radius:8px;margin-bottom:24px;overflow:hidden;padding:12px 22px 12px 30px;text-align:left}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-explain>div{max-height:206px;overflow-y:auto;padding-right:8px;word-break:break-all}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-score{display:flex;margin-bottom:24px}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-score li+li{border-left:1px solid hsla(0,0%,84%,.6)}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-score li{flex:1}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-score li div{color:#000;font-size:36px;line-height:50px}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-score li span{color:rgba(0,0,0,.6);font-size:14px;line-height:20px}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-time-range{color:#000;font-size:14px;line-height:20px;margin-bottom:20px}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-btn{border-radius:8px;color:#fff;font-size:18px;height:unset;padding:16px 0;text-align:center;width:380px}.c-scale-view-block .c-totalScore-warp{background:#f2f2f4;border-radius:6px;color:#666;font-size:14px;font-weight:400;margin-bottom:16px;padding:16px}.c-scale-view-block .c-totalScore-warp div+div{margin-top:4px}.c-scale-view-block .c-totalScore-warp span{color:#090909;font-weight:500}.c-scale-view-block .c-totalScore-warp .score-result{color:#2d7aff}.c-scale-view-block .c-sign-wrap .sigan-content-wrap{display:flex;flex-wrap:wrap}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item{border:1px solid #d5d5d5;border-radius:4px;box-sizing:border-box;height:96px;margin-right:16px;overflow:hidden;position:relative;width:200px}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item>img{height:100%;width:100%}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item:hover>div{display:flex}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item>div{align-items:center;background:rgba(0,0,0,.8);border-radius:4px;bottom:0;display:none;justify-content:center;left:0;position:absolute;right:0;top:0}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item>div .n-icon{color:#fff;cursor:pointer;font-size:18px}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item>div .n-icon+.n-icon{margin-left:20px}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .add-sign-wrap{align-items:center;background:#fafafa;border:1px dashed #d5d5d5;border-radius:4px;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;height:96px;justify-content:center;width:200px}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .add-sign-wrap .scale-view-iconfont{color:#000;font-size:32px}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .add-sign-wrap span,.c-scale-view-block .sign-com-wrap>span{color:#585858}.c-scale-view-block .sign-com-wrap .sign-canvas{border:1px solid hsla(0,0%,84%,.6);border-radius:4px;margin-top:16px}.c-scale-view-block li,.c-scale-view-block ul{list-style:none;margin:0;padding:0}.c-scale-view-block .n-input{text-align:left;width:100%}.c-scale-view-block .n-form-item{--n-label-height:unset!important}.c-scale-view-block .c-scle-form-item>.n-form-item-blank{display:block}.c-scale-view-block .no-data-tip{align-items:center;color:#333;display:flex;flex-direction:column;font-size:22px;height:100%;justify-content:center;width:100%}.c-scale-view-block .no-data-tip>img{max-width:70%;width:260px}.c-scale-view-block .no-data-tip>p{color:rgba(0,0,0,.8);font-size:16px;margin-bottom:0;margin-top:12px}.c-scale-view-block .no-data-tip>span{color:rgba(0,0,0,.4);font-size:14px;margin-top:6px}.c-scale-view-block .c-scale-address{max-width:500px}.c-scale-view-block .c-scale-address .field-row{display:flex;overflow:hidden;width:100%}.c-scale-view-block .c-scale-address .field-row .n-select{flex:1;padding:0 5px 5px 0;width:100%}.c-scale-view-block .c-scale-address .field-row .n-select:last-child{padding-right:0}.c-scale-view-block .c-scale-collection,.c-scale-view-block .c-scale-collection .img-card{width:100%}.c-scale-view-block .c-scale-collection.scale-collection-title{text-align:center}.c-scale-view-block .c-scale-collection.scale-collection-title h1{font-weight:500}.c-scale-view-block .c-scale-collection.prompt-message{background-color:#fff;border-radius:4px;box-shadow:0 5px 13px rgba(0,0,0,.14);color:#666;padding:10px;position:relative}.c-scale-view-block .c-scale-collection.prompt-message.is-weak{color:#999}.c-scale-view-block .c-scale-collection.prompt-message.is-strong{color:#ff1818;padding:8px 8px 8px 35px}.c-scale-view-block .c-scale-collection.prompt-message .prompt-icon{font-size:18px;left:8px;position:absolute;top:8px}.c-scale-view-block .c-scale-collection.prompt-message .prompt-message-content{font-size:14px;line-height:16px;word-break:break-all}.c-scale-view-block .c-time-range{align-items:center;display:flex}.c-scale-view-block .c-map-container{cursor:pointer;width:100%}.c-scale-view-block .c-map-container .n-input.map-input .n-input__prefix{transform:rotate(180deg)}.c-scale-view-block .c-map-container .n-input.map-input .n-input__prefix .n-icon{color:rgba(0,0,0,.65)}.c-scale-view-block .c-map-container .n-input.map-input.n-input .n-input__input-el{background-color:#fff;color:rgba(0,0,0,.65);cursor:pointer}.c-scale-view-block .c-scale-upload{width:100%}.c-scale-view-block .c-scale-upload .n-upload-file-list{display:flex}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-file .n-upload-file-info .n-upload-file-info__action.n-upload-file-info__action--image-card-type{background:rgba(0,0,0,.5);box-sizing:border-box}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-file .n-upload-file-info .n-upload-file-info__action.n-upload-file-info__action--image-card-type span.n-button__icon{color:#fff}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-trigger.n-upload-trigger--image-card{background-color:#fafafa;border-color:#d5d5d5;height:184px;width:184px}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-file.n-upload-file--image-card-type{background-color:#fafafa;border-color:#d5d5d5;height:184px;padding:8px;width:184px}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-file.n-upload-file--image-card-type .n-image{height:100%}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-file.n-upload-file--image-card-type img{object-fit:cover!important}.c-scale-view-block .c-scale-upload .upload-img-wrap{align-items:center;display:flex;flex-direction:column}.c-scale-view-block .c-scale-upload .dragger-upload-text{align-items:center;display:flex}.c-scale-view-block .c-scale-upload.scale-upload-file .n-upload-dragger{padding:16px 0}.c-scale-view-block .c-scale-upload.scale-upload-file .n-upload{--n-item-disabled-opacity:1!important;opacity:1!important}.c-scale-view-block .c-scale-upload.scale-upload-file .dragger-upload-text{color:rgba(0,0,0,.65)}.c-scale-view-block .c-scale-upload.scale-upload-file .n-upload-file-list{display:flex;flex-direction:column;width:100%}.c-scale-view-block .c-scale-upload.scale-upload-file .n-upload-file-list .n-upload-file{width:100%}.c-scale-view-block .c-scale-upload.scale-upload-file .n-upload-trigger{background:#fafafa;border-color:#d5d5d5;width:100%}.c-scale-view-block .text-over-tooltip-components{display:inline-block;max-width:98%}.c-scale-view-block .text-over-tooltip-components .ellipsis{color:#35393c;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-scale-view-block .text-over-tooltip-components .ellipsis i{font-style:normal;white-space:nowrap;word-break:keep-all}.c-scale-view-block .text-over-tooltip-components .fs20{color:green;font-size:20px;font-weight:600;line-height:22px}.c-scale-view-block .text-over-tooltip-components .fs12{color:orange;font-size:12px;font-weight:400;line-height:14px}.c-scale-view-block .des-content-wrap{padding:0 16px}.c-scale-view-block .des-content-wrap .des-content-div{padding-bottom:24px;text-align:left;white-space:break-spaces;word-break:break-word}.c-scale-view-block .des-content-wrap .des-content-div img,.c-scale-view-block .des-content-wrap .des-content-div video{max-width:100%}.c-scale-view-block .des-content-wrap .des-content-div p{margin:0}.c-scale-map-modal .n-card__content{overflow:hidden}.c-scale-modal-container.n-dialog{display:flex;flex-direction:column;height:60vh}.c-scale-modal-container.n-dialog.n-modal{min-width:560px;padding:0;width:50vw}.c-scale-modal-container.n-dialog .n-dialog__title{background:#fff;border-bottom:1px solid #e8e8e8;border-radius:8px 8px 0 0;box-sizing:border-box;height:52px;line-height:52px;padding:14px 16px}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content{align-items:center;color:#000;display:flex;font-size:16px;height:100%;justify-content:space-between;overflow:hidden;width:100%}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .modal-title-drag{flex:1}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .svg-wrap{right:16px}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .svg-wrap svg{cursor:pointer;font-size:14px}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .svg-wrap svg+svg{margin-left:16px}.c-scale-modal-container.n-dialog .n-dialog__content{height:100%;margin:0;overflow:hidden;padding:16px}.c-scale-modal-container.n-dialog .n-dialog__action{background:transparent;border-radius:0 0 8px 8px;border-top:1px solid #e8e8e8;box-sizing:border-box;height:52px;padding:10px 16px;text-align:right}.c-scale-upload .n-upload-dragger:hover,.scale-upload-file .n-upload-dragger:hover{background:#f3f7ff}.c-scale-upload .n-upload-dragger:hover .dragger-upload-text,.c-scale-upload .n-upload-dragger:hover .upload-img-wrap,.scale-upload-file .n-upload-dragger:hover .dragger-upload-text,.scale-upload-file .n-upload-dragger:hover .upload-img-wrap{color:#2d7aff}
1
+ @font-face{font-family:scale-view-iconfont;src:url(scale-view-iconfont.ttf?t=1682489008262) format("truetype")}.scale-view-iconfont{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:scale-view-iconfont!important;font-size:14px;font-style:normal}.icon-scale-view-menzhenyishengzhanxitongtubiaoguanbi:before{content:"\e76e"}.icon-scale-view-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-scale-view-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.icon-scale-view-shijian:before{content:"\e8c5"}.icon-scale-view-qianming:before{content:"\e6ca"}.icon-scale-view-cuo:before{content:"\e6e5"}.icon-scale-view-dui:before{content:"\e7c8"}.icon-scale-view-dengpao:before{content:"\e719"}.input-print-span{border:1px solid #e0e0e6;border-radius:4px;color:#333639;font-size:14px;line-height:1.5;padding:4px 12px;text-align:left;width:100%;word-break:break-word}.input-print-span.input-print-span-empty{color:#c8c9cc}.c-scale-view-block .c-choice-wrap{display:flex;flex-wrap:wrap;width:100%}.c-scale-view-block .c-choice-wrap .c-choice-radio-div{align-items:center;display:flex;flex-wrap:wrap}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .c-radio-textarea{width:100%}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .print-span{border-bottom:1px solid #d9d9d9;color:#333639;flex:1;font-size:14px;line-height:1.5;min-width:80px;padding:4px 12px;word-break:break-word}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .print-span.print-span-empty{color:#c8c9cc}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-input.n-input--disabled{background:#fff}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled{border:1px solid transparent;padding-left:4px}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked{border-color:#2d7aff;border-radius:4px;color:#000!important;font-weight:700;padding-bottom:4px;padding-top:4px}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked .other-span,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked .other-span{color:#000!important}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked .n-radio__dot,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked .n-radio__dot{background-color:var(--n-color-active);box-shadow:var(--n-box-shadow-active)}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked .n-radio__dot:before,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked .n-radio__dot:before{background:var(--n-dot-color-active)}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked .n-checkbox-box,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked .n-checkbox-box{background-color:var(--n-color-checked)}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked .n-checkbox-box .n-checkbox-box__border,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked .n-checkbox-box .n-checkbox-box__border{border-color:#2d7aff}.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked .n-checkbox-box .n-checkbox-icon .check-icon,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-checkbox--disabled.n-checkbox--checked .n-checkbox-box .n-checkbox-icon .line-icon,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked .n-checkbox-box .n-checkbox-icon .check-icon,.c-scale-view-block .c-choice-wrap .c-choice-radio-div .n-radio--disabled.n-radio--checked .n-checkbox-box .n-checkbox-icon .line-icon{fill:var(--n-check-mark-color)}.c-scale-view-block .c-choice-wrap .n-radio-input{height:14px;width:14px}.c-scale-view-block .c-choice-wrap .scale-choice-img-wrap{background:#fff;border:1px solid #d5d5d5;border-radius:4px;display:inline-block;height:62px;margin-right:16px;min-width:74px;position:relative;width:74px}.c-scale-view-block .c-choice-wrap .scale-choice-img-wrap:hover .scale-preview-wrap{display:flex}.c-scale-view-block .c-choice-wrap .scale-choice-img-wrap>img{height:100%;object-fit:cover;width:100%}.c-scale-view-block .c-choice-wrap .scale-choice-img-wrap .scale-preview-wrap{align-items:center;background:rgba(0,0,0,.75);border-radius:8px;bottom:0;display:none;font-size:20px;justify-content:center;left:0;position:absolute;right:0;top:0}.c-scale-view-block .c-choice-wrap .scale-choice-img-wrap .scale-preview-wrap i.anticon{color:#fff;margin:0}.c-scale-view-block .c-choice-wrap .presuffix-wrap{align-items:center;display:inline-flex;flex-wrap:wrap;width:100%}.c-scale-view-block .c-choice-wrap .presuffix-wrap .presuffix-span{word-wrap:break-word;flex-shrink:0;max-width:100%;white-space:break-spaces;word-break:break-all}.c-scale-view-block .c-choice-wrap .n-input{border-bottom:1px solid #d9d9d9;flex:1;min-width:80px}.c-scale-view-block .c-choice-wrap .choose-other{flex:1}.c-scale-view-block .c-choice-wrap .other-span{word-break:break-all}.c-scale-view-block .c-choice-wrap.choice-wrap-1 .c-choice-radio-div{width:100%}.c-scale-view-block .c-choice-wrap.choice-wrap-2 .c-choice-radio-div{width:50%}.c-scale-view-block .c-choice-wrap.choice-wrap-3 .c-choice-radio-div{width:33%}.c-scale-view-block .c-choice-wrap.choice-wrap-4 .c-choice-radio-div{width:25%}.c-scale-view-block .c-choice-wrap label{align-items:center;display:inline-flex;margin:4px 0}.c-scale-view-block .c-choice-wrap label .n-radio__label{align-items:center;display:inline-flex;flex:1;white-space:normal}.c-scale-view-block .c-choice-wrap .n-checkbox{align-items:center;display:inline-flex;margin:4px 0}.c-scale-view-block .c-choice-wrap .n-checkbox .n-checkbox__label{align-items:center;display:inline-flex;flex:1;white-space:normal}.c-scale-view-block{box-sizing:border-box;color:rgba(0,0,0,.65);height:100%;overflow:hidden;padding-top:4px;position:relative;text-align:left;width:100%}.c-scale-view-block-hasfooter{padding-bottom:50px}.c-scale-view-block .scale-container{box-sizing:border-box;height:100%;overflow-y:auto;transform-origin:0 0;width:100%}.c-scale-view-block .scale-container.scale-container-nopadding{display:flex;flex-direction:column;height:100%}.c-scale-view-block .scale-container::-webkit-scrollbar{background-color:#f5f5f5;height:6px;width:10px}.c-scale-view-block .scale-container::-webkit-scrollbar-track{background-color:#f2f2f2;border-radius:10px}.c-scale-view-block .scale-container::-webkit-scrollbar-thumb{background-color:#dbdcdc;border-radius:10px}.c-scale-view-block .scale-container .n-base-selection--selected.n-base-selection--disabled .n-base-selection-overlay__wrapper{color:#000;font-weight:700}.c-scale-view-block .scale-container .n-base-selection--selected.n-base-selection--disabled.n-base-selection--multiple .n-base-selection-tag-wrapper .n-tag.n-tag--disabled{--n-border:1px solid #2d7aff!important;--n-border-radius:4px!important;--n-opacity-disabled:1!important;border-color:#2d7aff!important;color:#000;font-weight:700}.c-scale-view-block .scale-container .n-base-selection--selected.n-base-selection--disabled.n-base-selection--multiple .n-base-selection-tag-wrapper .n-tag.n-tag--disabled .n-base-close{display:none}.c-scale-view-block .scale-container .n-input.n-input--disabled .n-input__input-el,.c-scale-view-block .scale-container .n-input.n-input--disabled .n-input__textarea-el{color:#000;font-weight:700}.c-scale-view-block .lb-title{text-align:center}.c-scale-view-block .map-container{cursor:pointer}.c-scale-view-block .linebar-div{margin-top:24px;text-align:center;width:100%}.c-scale-view-block .linebar-div .n-divider{margin-top:4px}.c-scale-view-block .my-prompt{background-color:#fff;border-radius:4px;box-shadow:0 5px 13px rgba(0,0,0,.14);padding:10px}.c-scale-view-block .img-card{width:100%}.c-scale-view-block .main{box-sizing:border-box}.c-scale-view-block .main .scale-label-required{font-weight:700}.c-scale-view-block .main .required-text{color:#e02828;font-weight:700}.c-scale-view-block .main .score-i{word-break:keep-all}.c-scale-view-block .main .evalute-label{background:rgba(45,122,255,.1);border:1px solid rgba(45,122,255,.5);border-radius:4px;color:#2d7aff;display:inline-block;font-size:12px;height:20px;line-height:20px;margin-left:4px;padding:0 5px}.c-scale-view-block .main .evalute-tip{background:rgba(255,194,0,.15);border-radius:2px;color:#fe9626;cursor:pointer;display:inline-block;margin-left:8px;padding:0 5px}.c-scale-view-block .footer{align-items:center;background:#fff;border-top:1px solid #e8e8e8;bottom:0;box-sizing:border-box;display:flex;flex-basis:50px;height:50px;left:0;position:absolute;width:100%}.c-scale-view-block .footer .n-button+.n-button{margin-left:8px}.n-dialog.n-modal.c-evatip-dialog-wrap{max-height:unset;overflow-y:hidden;padding:0;width:494px!important}.n-dialog.n-modal.c-evatip-dialog-wrap .n-dialog__title{border-bottom:1px solid #e8e8e8;font-weight:600;height:52px;line-height:52px;padding-left:16px}.n-dialog.n-modal.c-evatip-dialog-wrap .n-base-icon{color:#666;margin:0;position:absolute}.n-dialog.n-modal.c-evatip-dialog-wrap .n-dialog__content{margin:0}.n-dialog.n-modal.c-evatip-dialog-wrap .evatip-container{color:#2e2e2e;font-size:16px;max-height:60vh;min-height:100px;overflow-y:auto;padding:26px 16px}.n-dialog.n-modal.c-evatip-dialog-wrap .evatip-container p{border:1px solid hsla(0,0%,84%,.6);border-radius:4px;font-size:14px;margin-bottom:0;margin-top:12px;padding:16px}.n-dialog.n-modal.c-evatip-dialog-wrap .n-dialog__action{border-top:1px solid #e8e8e8;box-sizing:border-box;display:block;padding:10px 16px;text-align:right;width:100%}.c-scale-view-block .c-answerParse{background:hsla(0,64%,98%,.6);border-radius:8px;color:#2e2e2e;margin-bottom:12px;margin-top:6px;padding:16px}.c-scale-view-block .c-answerParse .answer-res-wrap{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.c-scale-view-block .c-answerParse .answer-res-wrap .answer-res{align-items:center;background:#f06f64;border-radius:18px;color:#fff;display:inline-flex;font-weight:700;line-height:36px;padding:0 18px}.c-scale-view-block .c-answerParse .answer-res-wrap .answer-res svg{font-size:16px;margin-right:8px}.c-scale-view-block .c-answerParse .answer-res-wrap .answer-score{color:#2e2e2e;font-size:14px;font-weight:600}.c-scale-view-block .c-answerParse .correct-answer{line-height:20px;margin-bottom:16px}.c-scale-view-block .c-answerParse .correct-answer p{display:inline-block;font-weight:700}.c-scale-view-block .c-answerParse .correct-answer span{color:#91c850;font-size:16px;word-break:break-all}.c-scale-view-block .c-answerParse .answer-key{line-height:20px}.c-scale-view-block .c-answerParse .answer-key p{font-weight:700;line-height:20px;margin-bottom:16px}.c-scale-view-block .c-answerParse .answer-key span{word-break:break-all}.c-scale-view-block .c-answerParse.answerParse-success{background:rgba(234,251,228,.6)}.c-scale-view-block .c-answerParse.answerParse-success .answer-res{background:#91c850}.c-scale-view-block .c-evaluateCountdown{background:#f2f2f4;border-radius:8px;color:#212121;position:absolute;right:0;text-align:center;top:0;z-index:2}.c-scale-view-block .c-evaluateCountdown .c-evaluateCountdown-wrap{min-width:166px;padding:8px 12px}.c-scale-view-block .c-evaluateCountdown .evaluate-toggle-icon{cursor:pointer;font-size:16px;position:absolute;right:10px;top:11px;z-index:3}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-hasTime:not(.evaluateCountdown-EvaluetaResSituation){background:#f1f1f4;padding:8px 32px}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-hasTime:not(.evaluateCountdown-EvaluetaResSituation) .countdown{font-size:26px;line-height:40px}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-hasTime:not(.evaluateCountdown-EvaluetaResSituation) .countdown span{line-height:unset}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-hasTime:not(.evaluateCountdown-EvaluetaResSituation) .countdown svg{display:none}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-EvaluetaResSituation{text-align:left}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-EvaluetaResSituation.evaluateCountdown-hasTime{padding:8px 32px}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-EvaluetaResSituation.evaluateCountdown-hasTime .evaluate-toggle-icon{font-size:18px;right:8px;top:18px}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-EvaluetaResSituation .countdown{font-size:26px;line-height:40px}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-EvaluetaResSituation .countdown span{line-height:unset}.c-scale-view-block .c-evaluateCountdown .countdown{align-items:center;color:#000;display:flex;font-size:14px;justify-content:center}.c-scale-view-block .c-evaluateCountdown .countdown span{line-height:18px}.c-scale-view-block .c-evaluateCountdown .countdown svg{color:#969696;font-size:16px;margin-left:8px}.c-scale-view-block .c-evaluateCountdown .countdown.countdown-red{color:#ff1818}.c-scale-view-block .c-evaluateCountdown .answered-blue{color:#2d7aff}.c-scale-view-block .c-evaluateCountdown .answered-blod{font-weight:700}.c-scale-view-block .c-evaluate-page{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.c-scale-view-block .c-evaluate-page .evaluate-container{border:1px solid #e0e0e0;border-radius:15px;padding:45px 32px;text-align:center;width:620px}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-name{color:#212121;font-size:20px;line-height:28px;margin-bottom:10px;max-height:88px;overflow-y:auto;word-break:break-all}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-explain{background:#f2f2f4;border-radius:8px;margin-bottom:24px;overflow:hidden;padding:12px 22px 12px 30px;text-align:left}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-explain>div{max-height:206px;overflow-y:auto;padding-right:8px;word-break:break-all}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-score{display:flex;margin-bottom:24px}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-score li+li{border-left:1px solid hsla(0,0%,84%,.6)}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-score li{flex:1}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-score li div{color:#000;font-size:36px;line-height:50px}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-score li span{color:rgba(0,0,0,.6);font-size:14px;line-height:20px}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-time-range{color:#000;font-size:14px;line-height:20px;margin-bottom:20px}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-btn{border-radius:8px;color:#fff;font-size:18px;height:unset;padding:16px 0;text-align:center;width:380px}.c-scale-view-block .c-totalScore-warp{background:#f2f2f4;border-radius:6px;color:#666;font-size:14px;font-weight:400;margin-bottom:16px;padding:16px}.c-scale-view-block .c-totalScore-warp div+div{margin-top:4px}.c-scale-view-block .c-totalScore-warp span{color:#090909;font-weight:500}.c-scale-view-block .c-totalScore-warp .score-result{color:#2d7aff}.c-scale-view-block .c-sign-wrap .sigan-content-wrap{display:flex;flex-wrap:wrap}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item{border:1px solid #d5d5d5;border-radius:4px;box-sizing:border-box;height:96px;margin-right:16px;overflow:hidden;position:relative;width:200px}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item>img{height:100%;width:100%}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item:hover>div{display:flex}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item>div{align-items:center;background:rgba(0,0,0,.8);border-radius:4px;bottom:0;display:none;justify-content:center;left:0;position:absolute;right:0;top:0}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item>div .n-icon{color:#fff;cursor:pointer;font-size:18px}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item>div .n-icon+.n-icon{margin-left:20px}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .add-sign-wrap{align-items:center;background:#fafafa;border:1px dashed #d5d5d5;border-radius:4px;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;height:96px;justify-content:center;width:200px}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .add-sign-wrap .scale-view-iconfont{color:#000;font-size:32px}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .add-sign-wrap span,.c-scale-view-block .sign-com-wrap>span{color:#585858}.c-scale-view-block .sign-com-wrap .sign-canvas{border:1px solid hsla(0,0%,84%,.6);border-radius:4px;margin-top:16px}.c-scale-view-block li,.c-scale-view-block ul{list-style:none;margin:0;padding:0}.c-scale-view-block .n-input{text-align:left;width:100%}.c-scale-view-block .n-form-item{--n-label-height:unset!important}.c-scale-view-block .c-scle-form-item>.n-form-item-blank{display:block}.c-scale-view-block .no-data-tip{align-items:center;color:#333;display:flex;flex-direction:column;font-size:22px;height:100%;justify-content:center;width:100%}.c-scale-view-block .no-data-tip>img{max-width:70%;width:260px}.c-scale-view-block .no-data-tip>p{color:rgba(0,0,0,.8);font-size:16px;margin-bottom:0;margin-top:12px}.c-scale-view-block .no-data-tip>span{color:rgba(0,0,0,.4);font-size:14px;margin-top:6px}.c-scale-view-block .c-scale-address{max-width:500px}.c-scale-view-block .c-scale-address .field-row{display:flex;overflow:hidden;width:100%}.c-scale-view-block .c-scale-address .field-row .n-select{flex:1;padding:0 5px 5px 0;width:100%}.c-scale-view-block .c-scale-address .field-row .n-select:last-child{padding-right:0}.c-scale-view-block .c-scale-collection,.c-scale-view-block .c-scale-collection .img-card{width:100%}.c-scale-view-block .c-scale-collection.scale-collection-title{text-align:center}.c-scale-view-block .c-scale-collection.scale-collection-title h1{font-weight:500}.c-scale-view-block .c-scale-collection.prompt-message{background-color:#fff;border-radius:4px;box-shadow:0 5px 13px rgba(0,0,0,.14);color:#666;padding:10px;position:relative}.c-scale-view-block .c-scale-collection.prompt-message.is-weak{color:#999}.c-scale-view-block .c-scale-collection.prompt-message.is-strong{color:#ff1818;padding:8px 8px 8px 35px}.c-scale-view-block .c-scale-collection.prompt-message .prompt-icon{font-size:18px;left:8px;position:absolute;top:8px}.c-scale-view-block .c-scale-collection.prompt-message .prompt-message-content{font-size:14px;line-height:16px;word-break:break-all}.c-scale-view-block .c-time-range{align-items:center;display:flex}.c-scale-view-block .c-map-container{cursor:pointer;width:100%}.c-scale-view-block .c-map-container .n-input.map-input .n-input__prefix{transform:rotate(180deg)}.c-scale-view-block .c-map-container .n-input.map-input .n-input__prefix .n-icon{color:rgba(0,0,0,.65)}.c-scale-view-block .c-map-container .n-input.map-input.n-input .n-input__input-el{background-color:#fff;color:rgba(0,0,0,.65);cursor:pointer}.c-scale-view-block .c-scale-upload{width:100%}.c-scale-view-block .c-scale-upload .n-upload-file-list{display:flex}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-file .n-upload-file-info .n-upload-file-info__action.n-upload-file-info__action--image-card-type{background:rgba(0,0,0,.5);box-sizing:border-box}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-file .n-upload-file-info .n-upload-file-info__action.n-upload-file-info__action--image-card-type span.n-button__icon{color:#fff}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-trigger.n-upload-trigger--image-card{background-color:#fafafa;border-color:#d5d5d5;height:184px;width:184px}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-file.n-upload-file--image-card-type{background-color:#fafafa;border-color:#d5d5d5;height:184px;padding:8px;width:184px}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-file.n-upload-file--image-card-type .n-image{height:100%}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-file.n-upload-file--image-card-type img{object-fit:cover!important}.c-scale-view-block .c-scale-upload .upload-img-wrap{align-items:center;display:flex;flex-direction:column}.c-scale-view-block .c-scale-upload .dragger-upload-text{align-items:center;display:flex}.c-scale-view-block .c-scale-upload.scale-upload-file .n-upload-dragger{padding:16px 0}.c-scale-view-block .c-scale-upload.scale-upload-file .n-upload{--n-item-disabled-opacity:1!important;opacity:1!important}.c-scale-view-block .c-scale-upload.scale-upload-file .dragger-upload-text{color:rgba(0,0,0,.65)}.c-scale-view-block .c-scale-upload.scale-upload-file .n-upload-file-list{display:flex;flex-direction:column;width:100%}.c-scale-view-block .c-scale-upload.scale-upload-file .n-upload-file-list .n-upload-file{width:100%}.c-scale-view-block .c-scale-upload.scale-upload-file .n-upload-trigger{background:#fafafa;border-color:#d5d5d5;width:100%}.c-scale-view-block .text-over-tooltip-components{display:inline-block;max-width:98%}.c-scale-view-block .text-over-tooltip-components .ellipsis{color:#35393c;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-scale-view-block .text-over-tooltip-components .ellipsis i{font-style:normal;white-space:nowrap;word-break:keep-all}.c-scale-view-block .text-over-tooltip-components .fs20{color:green;font-size:20px;font-weight:600;line-height:22px}.c-scale-view-block .text-over-tooltip-components .fs12{color:orange;font-size:12px;font-weight:400;line-height:14px}.c-scale-view-block .des-content-wrap{padding:0 16px}.c-scale-view-block .des-content-wrap .des-content-div{padding-bottom:24px;text-align:left;white-space:break-spaces;word-break:break-word}.c-scale-view-block .des-content-wrap .des-content-div img,.c-scale-view-block .des-content-wrap .des-content-div video{max-width:100%}.c-scale-view-block .des-content-wrap .des-content-div p{margin:0}.c-scale-map-modal .n-card__content{overflow:hidden}.c-scale-modal-container.n-dialog{display:flex;flex-direction:column;height:60vh}.c-scale-modal-container.n-dialog.n-modal{min-width:560px;padding:0;width:50vw}.c-scale-modal-container.n-dialog .n-dialog__title{background:#fff;border-bottom:1px solid #e8e8e8;border-radius:8px 8px 0 0;box-sizing:border-box;height:52px;line-height:52px;padding:14px 16px}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content{align-items:center;color:#000;display:flex;font-size:16px;height:100%;justify-content:space-between;overflow:hidden;width:100%}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .modal-title-drag{flex:1}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .svg-wrap{right:16px}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .svg-wrap svg{cursor:pointer;font-size:14px}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .svg-wrap svg+svg{margin-left:16px}.c-scale-modal-container.n-dialog .n-dialog__content{height:100%;margin:0;overflow:hidden;padding:16px}.c-scale-modal-container.n-dialog .n-dialog__action{background:transparent;border-radius:0 0 8px 8px;border-top:1px solid #e8e8e8;box-sizing:border-box;height:52px;padding:10px 16px;text-align:right}.c-scale-upload .n-upload-dragger:hover,.scale-upload-file .n-upload-dragger:hover{background:#f3f7ff}.c-scale-upload .n-upload-dragger:hover .dragger-upload-text,.c-scale-upload .n-upload-dragger:hover .upload-img-wrap,.scale-upload-file .n-upload-dragger:hover .dragger-upload-text,.scale-upload-file .n-upload-dragger:hover .upload-img-wrap{color:#2d7aff}
@@ -1 +1 @@
1
- import{defineComponent as e,computed as a,provide as l,ref as t,nextTick as o,watch as r,openBlock as u,createBlock as n,unref as s,mergeProps as i,isRef as d,withCtx as c,createElementVNode as v,createVNode as p,createCommentVNode as f,normalizeStyle as h,renderSlot as y}from"vue";import{useTheme as m}from"../../../shared/hooks/useTheme.js";import{useEventBus as b,useVModel as g,onClickOutside as k,useDebounceFn as w}from"@vueuse/core";import"date-fns";import{isArray as S,isString as C,isObject as j,isFunction as K}from"lodash-es";import{isPromise as P,NOOP as _}from"@vue/shared";import{uuidGenerator as N}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NPopover as x,NInput as A}from"naive-ui";import"../../../shared/hooks/useScrollLoading.js";import L from"./components/ClearIcon.vue.js";import{InjectionSearchCascaderCheckAbleLevel as U,InjectionKeyboardEventBus as W,InjectionSearchCascaderLoadingNode as B,InjectionSearchCascaderValue as F}from"./constants/index.js";import{SearchMenu as I}from"./components/SearchMenu.js";const T={style:{width:"100%"}},V=["id"];var E=e({__name:"SearchCascader",props:{value:{type:[String,Array]},show:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},childKey:{type:String,default:"children"},placeholder:{type:String,default:"请选择"},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},options:{type:Array,default:()=>[]},search:{type:Function},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},checkAbleLevel:{type:[Number,String],default:"last"},beforeSetValue:{type:Function},menuWidth:{type:[Number,String],default:150},disabled:Boolean,inputProps:{type:Object},popperProps:{type:Object}},emits:["update:value","focus","update:show"],setup(e,{expose:E,emit:O}){const R=e,$=m();const H=a((()=>!R.disabled&&R.clearable&&(S(R.value)?R.value.length:!!R.value)));function M(){!function(e){if(!K(R.beforeSetValue))return O("update:value",e);const a=R.beforeSetValue(e);P(a)?a.then((e=>O("update:value",e)),_):O("update:value",a)}([])}function q(e){var a;"INPUT"===(null==(a=e.target)?void 0:a.tagName)&&ae()}const z=e=>{var a;"INPUT"!==(null==(a=e.target)?void 0:a.tagName)||"Enter"!==e.code||Q.value?G.emit(e.key,e):ae()},D=a((()=>({"--menu-width":R.menuWidth}))),G=b("cascaderKeydown"),J=N(),Q=g(R,"show",O);l(U,a((()=>R.checkAbleLevel))),l(W,G);const X=t(""),Y=a((()=>C(R.value)&&R.value?R.value:S(R.value)&&R.value.length?R.value.map((e=>j(e)?e[R.labelKey]:e)).join(" / "):R.editPlaceholder)),Z=a({get:()=>Q.value?X.value:C(R.value)?R.value:S(R.value)?R.value.reduce(((e,a,l)=>0===l?a[R.labelKey]:e+" / "+a[R.labelKey]),""):"",set(e){X.value=e,se(void 0,e)}});function ee(e){O("focus",e)}function ae(){Q.value||R.disabled||(Q.value=!0,X.value="",se())}async function le(){var e;Q.value=!1,null==(e=te.value)||e.blur()}const te=t();k(te,(e=>{var a;if(!Q.value)return;const l=e;if(!l.target)return le();!function(e){let a=!1,l=e;for(;l;){if(l.id===J){a=!0;break}l=l.parentElement}return a}(l.target)?le():null==(a=te.value)||a.focus()}));const oe=t(),re=t(),ue=t(),ne=t(null);l(B,ne),l(F,a((()=>R.value)));const se=w((async(e,a)=>{var l;const{type:t,node:r,dbClick:u}=e||{};try{if("update"===t)return void(K(R.search)&&R.search({...r,isLeaf:!0}));ne.value=r;const e=await(K(R.search)&&R.search(r,a,u));re.value=j(e)||S(e)?e:r}finally{ne.value=null,await o(),null==(l=oe.value)||l.syncPosition()}}),400),ie=e=>{ue.value=e};return r((()=>R.show),(e=>{e&&(ue.value={})})),E({getWidth(){var e;if(!te.value)return 0;const a=null==(e=te.value)?void 0:e.$el;return a?a.clientWidth:void 0},setCursor(e){ue.value=e}}),(a,l)=>(u(),n(s(x),i({class:"search-cascader",trigger:"manual",show:s(Q),"onUpdate:show":l[1]||(l[1]=e=>d(Q)?Q.value=e:null),"show-arrow":!1,placement:"bottom-start",style:s(D),disabled:e.disabled,width:e.options.length?void 0:"trigger",ref_key:"popoverRef",ref:oe},e.popperProps),{trigger:c((()=>[v("div",T,[p(s(A),i({disabled:e.disabled,class:{"search-cascader__input":!e.disabled},placeholder:s(Q)?s(Y):e.placeholder,clearable:!1,value:s(Z),"onUpdate:value":l[0]||(l[0]=e=>d(Z)?Z.value=e:null),readonly:!s(Q),ref_key:"inputRef",ref:te,onFocus:ee,onClick:q,onKeydown:z},e.inputProps),{suffix:c((()=>[s(H)?(u(),n(L,{key:0,onClick:M})):f("v-if",!0)])),_:1},16,["disabled","class","placeholder","value","readonly"])])])),default:c((()=>[v("section",{id:s(J)},[p(s(I),{style:h(s($)),"label-key":e.labelKey,"value-key":e.valueKey,options:e.options,onNodeClick:s(se),onChangeCursor:ie,"current-node":re.value,"cursor-node":ue.value},{empty:c((()=>[y(a.$slots,"empty")])),_:3},8,["style","label-key","value-key","options","onNodeClick","current-node","cursor-node"])],8,V)])),_:3},16,["show","style","disabled","width"]))}});export{E as default};
1
+ import{defineComponent as e,computed as a,provide as l,ref as t,nextTick as o,watch as r,openBlock as u,createBlock as n,unref as s,mergeProps as i,isRef as d,withCtx as c,createElementVNode as v,createVNode as p,createCommentVNode as f,normalizeStyle as h,renderSlot as y}from"vue";import{useTheme as m}from"../../../shared/hooks/useTheme.js";import{useEventBus as b,useVModel as g,onClickOutside as w,useDebounceFn as k}from"@vueuse/core";import"date-fns";import{isArray as S,isString as C,isObject as j,isFunction as K}from"lodash-es";import{isPromise as P,NOOP as _}from"@vue/shared";import{uuidGenerator as N}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NPopover as x,NInput as L}from"naive-ui";import"../../../shared/hooks/useScrollLoading.js";import A from"./components/ClearIcon.vue.js";import{InjectionSearchCascaderCheckAbleLevel as B,InjectionKeyboardEventBus as U,InjectionSearchCascaderLoadingNode as W,InjectionSearchCascaderValue as F}from"./constants/index.js";import{SearchMenu as I}from"./components/SearchMenu.js";var T;const V={style:{width:"100%"}},E=["id"];var O=e({__name:"SearchCascader",props:{value:{type:[String,Array]},show:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},childKey:{type:String,default:"children"},placeholder:{type:String,default:(null==(T=window.getLanguageByCode)?void 0:T.call(window,"10010.1.147"))||"请选择"},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},options:{type:Array,default:()=>[]},search:{type:Function},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},checkAbleLevel:{type:[Number,String],default:"last"},beforeSetValue:{type:Function},menuWidth:{type:[Number,String],default:150},disabled:Boolean,inputProps:{type:Object},popperProps:{type:Object}},emits:["update:value","focus","update:show"],setup(e,{expose:T,emit:O}){const R=e,$=m();const H=a((()=>!R.disabled&&R.clearable&&(S(R.value)?R.value.length:!!R.value)));function M(){!function(e){if(!K(R.beforeSetValue))return O("update:value",e);const a=R.beforeSetValue(e);P(a)?a.then((e=>O("update:value",e)),_):O("update:value",a)}([])}function q(e){var a;"INPUT"===(null==(a=e.target)?void 0:a.tagName)&&ae()}const z=e=>{var a;"INPUT"!==(null==(a=e.target)?void 0:a.tagName)||"Enter"!==e.code||Q.value?G.emit(e.key,e):ae()},D=a((()=>({"--menu-width":R.menuWidth}))),G=b("cascaderKeydown"),J=N(),Q=g(R,"show",O);l(B,a((()=>R.checkAbleLevel))),l(U,G);const X=t(""),Y=a((()=>C(R.value)&&R.value?R.value:S(R.value)&&R.value.length?R.value.map((e=>j(e)?e[R.labelKey]:e)).join(" / "):R.editPlaceholder)),Z=a({get:()=>Q.value?X.value:C(R.value)?R.value:S(R.value)?R.value.reduce(((e,a,l)=>0===l?a[R.labelKey]:e+" / "+a[R.labelKey]),""):"",set(e){X.value=e,se(void 0,e)}});function ee(e){O("focus",e)}function ae(){Q.value||R.disabled||(Q.value=!0,X.value="",se())}async function le(){var e;Q.value=!1,null==(e=te.value)||e.blur()}const te=t();w(te,(e=>{var a;if(!Q.value)return;const l=e;if(!l.target)return le();!function(e){let a=!1,l=e;for(;l;){if(l.id===J){a=!0;break}l=l.parentElement}return a}(l.target)?le():null==(a=te.value)||a.focus()}));const oe=t(),re=t(),ue=t(),ne=t(null);l(W,ne),l(F,a((()=>R.value)));const se=k((async(e,a)=>{var l;const{type:t,node:r,dbClick:u}=e||{};try{if("update"===t)return void(K(R.search)&&R.search({...r,isLeaf:!0}));ne.value=r;const e=await(K(R.search)&&R.search(r,a,u));re.value=j(e)||S(e)?e:r}finally{ne.value=null,await o(),null==(l=oe.value)||l.syncPosition()}}),400),ie=e=>{ue.value=e};return r((()=>R.show),(e=>{e&&(ue.value={})})),T({getWidth(){var e;if(!te.value)return 0;const a=null==(e=te.value)?void 0:e.$el;return a?a.clientWidth:void 0},setCursor(e){ue.value=e}}),(a,l)=>(u(),n(s(x),i({class:"search-cascader",trigger:"manual",show:s(Q),"onUpdate:show":l[1]||(l[1]=e=>d(Q)?Q.value=e:null),"show-arrow":!1,placement:"bottom-start",style:s(D),disabled:e.disabled,width:e.options.length?void 0:"trigger",ref_key:"popoverRef",ref:oe},e.popperProps),{trigger:c((()=>[v("div",V,[p(s(L),i({disabled:e.disabled,class:{"search-cascader__input":!e.disabled},placeholder:s(Q)?s(Y):e.placeholder,clearable:!1,value:s(Z),"onUpdate:value":l[0]||(l[0]=e=>d(Z)?Z.value=e:null),readonly:!s(Q),ref_key:"inputRef",ref:te,onFocus:ee,onClick:q,onKeydown:z},e.inputProps),{suffix:c((()=>[s(H)?(u(),n(A,{key:0,onClick:M})):f("v-if",!0)])),_:1},16,["disabled","class","placeholder","value","readonly"])])])),default:c((()=>[v("section",{id:s(J)},[p(s(I),{style:h(s($)),"label-key":e.labelKey,"value-key":e.valueKey,options:e.options,onNodeClick:s(se),onChangeCursor:ie,"current-node":re.value,"cursor-node":ue.value},{empty:c((()=>[y(a.$slots,"empty")])),_:3},8,["style","label-key","value-key","options","onNodeClick","current-node","cursor-node"])],8,E)])),_:3},16,["show","style","disabled","width"]))}});export{O as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,reactive as t,computed as a,onMounted as i,watch as o,openBlock as s,createElementBlock as n,Fragment as d,createElementVNode as c,createBlock as b,unref as r,withCtx as m,renderList as p,normalizeStyle as u,createVNode as L,toDisplayString as y,withDirectives as h,normalizeClass as C,createTextVNode as f,vShow as v,createCommentVNode as g,mergeProps as I,nextTick as w}from"vue";import{NSpace as x,NTag as S,NTooltip as O,NIcon as k,NModal as j}from"naive-ui";import{AddCircleOutline as N}from"@vicons/ionicons5";import W from"./LabelFormContent.vue.js";import{handleLabelColor as P}from"../../../shared/utils/vexutils.js";import _ from"../../../shared/utils/vexutilsExpand.js";const B={class:"c-select-label"},E=c("span",null,"常用",-1),A={key:2,class:"outexplicit"},H=c("span",null,"选择标签",-1),z={class:"svg-wrap"};var F=e({__name:"SelectLabel",props:{selectedList:{type:Array,default:()=>[]},selectedListObj:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isDetail:{type:Boolean,default:!1},isLock:{type:Boolean,default:!1},sourceType:{type:String,default:""},explicit:{type:Boolean,default:!1},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},queryCommonlabels:{type:Function,default:()=>Promise.resolve({data:{}})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})}},emits:["onChange"],setup(e,{emit:F}){const V=e,T=l(null),U=t({labelVisible:!1,editLabelItem:{},labelSelectedList:[],labelSelectedEdit:[],inited:!1,isChangeWindow:!1,modalWidth:"763px",modalHeight:"404px",maxHeight:"404px",commonLabelList:[],multipleChoiceConfig:{}});const D=a((()=>{const e=(null==V?void 0:V.item)||{};return(1==e.is_edit||e.isShow)&&!V.isDetail})),$=a((()=>{var e,l;let t=null==(e=V.item)?void 0:e.val_key;if(!t||!V.selectedListObj)return V.selectedList;let a=null==(l=V.selectedListObj)?void 0:l[t];return a||V.selectedList})),q=(e,l)=>{e.length&&e.forEach((e=>{let t=l.some((l=>l.labelId==e.labelId));e.isSelect=t}))},J=(e,l)=>{let t=U.multipleChoiceConfig,a=U.labelSelectedList||[];if(e){if(a.some((e=>e.labelId==l.labelId)))return;"2"==t[l.typeId]&&(a=a.filter((e=>e.typeId!==l.typeId))),a.push(l)}else{const e=a.findIndex((e=>e.labelId==l.labelId));-1!=e&&a.splice(e,1)}F("onChange",[...a]),U.labelSelectedList=a},R=e=>{V.isLock||(V.explicit||"init"===e||(U.labelVisible=!0),Q(V.item))},K=()=>{var e;V.explicit||(null==(e=T.value)||e.resetShowAdd(),U.editLabelItem.showAdd=!1,U.editLabelItem={},U.inited=!1,U.modalWidth="763px",U.modalHeight="404px",U.maxHeight="404px",U.isChangeWindow=!1,U.labelVisible=!1)},G=()=>{U.isChangeWindow=!U.isChangeWindow;let e=document.body.clientHeight;U.modalWidth="763px"===U.modalWidth?"100%":"763px",U.modalHeight="404px"===U.modalHeight?e-110+"px":"404px",U.maxHeight="auto"===U.modalHeight?"404px":"none"},M=()=>{var e;null==(e=T.value)||e.handleLabelForm((e=>{F("onChange",[...e]),U.labelSelectedList=e,q(U.commonLabelList,e),K()}))},Q=async(e,l)=>{const{rows:t,results:a}=await V.getLabelList(e,{update:l}),i=t||[],o={},s=`${e.val_key}_${e.name}`,n=l?[...U.labelSelectedEdit||[]]:[...U.labelSelectedList||[]];i.forEach((e=>{e.cacheKey=s,e.isSelect=!1,o[e.typeName]?o[e.typeName].itemList.push({...e}):o[e.typeName]={itemList:[{...e}],showAdd:!1,addVal:"",typeName:e.typeName,typeId:e.typeId}})),a&&(e.labelObj=o,e.labelList=i),l&&(U.labelSelectedEdit=n),U.editLabelItem=e,X(a)},X=e=>{if(!e)return!1;let l=Object.keys(e),t={},a=(e.typeList||[]).reduce(((e,l)=>(t[l.typeId]=l.multipleChoice,e[l.typeName]={multipleChoice:l.multipleChoice,parentColor:l.parentColor,allowCreateByPersonal:l.allowCreateByPersonal},e)),{});V.explicit&&(U.multipleChoiceConfig=t),l.forEach((l=>{var t,i,o,s,n,d,c;"typeList"!==l&&("emptyTypes"!==l?_.isPlainObject(e[l])?U.editLabelItem.labelObj[l]?(U.editLabelItem.labelObj[l].isNoAdd=!0,U.editLabelItem.labelObj[l].multipleChoice=null==(i=a[l])?void 0:i.multipleChoice,U.editLabelItem.labelObj[l].allowCreateByPersonal=null==(o=a[l])?void 0:o.allowCreateByPersonal,U.editLabelItem.labelObj[l].parentColor=null==(s=a[l])?void 0:s.parentColor):U.editLabelItem.labelObj[l]={addVal:"",showAdd:!1,itemList:!1,typeId:"",typeName:l,allowCreateByPersonal:null==(t=a[l])?void 0:t.allowCreateByPersonal,...a[l]||{}}:(U.editLabelItem.labelObj[l].multipleChoice=null==(n=a[l])?void 0:n.multipleChoice,U.editLabelItem.labelObj[l].allowCreateByPersonal=null==(d=a[l])?void 0:d.allowCreateByPersonal,U.editLabelItem.labelObj[l].parentColor=null==(c=a[l])?void 0:c.parentColor):e[l].forEach((e=>{U.editLabelItem.labelObj[e.typeName]={addVal:"",showAdd:!1,itemList:[],typeId:e.typeId,typeName:e.typeName,allowCreateByPersonal:e.allowCreateByPersonal,...a[e.typeName]||{}}})))}))},Y=()=>{Q(V.item,!0)},Z=()=>{M()},ee=(e,l)=>{V.explicit&&w((()=>{var t;null==(t=T.value)||t.hanldeSetLabelItem(e,l)}))};return i((()=>{V.explicit?R():(async e=>{const{rows:l,results:t}=await V.getLabelList(e);if(!t)return!1;let a=(t.typeList||[]).reduce(((e,l)=>(e[l.typeId]=l.multipleChoice,e)),{});U.multipleChoiceConfig=a})(V.item)})),o((()=>$.value),(e=>{if(e){let l=Array.isArray(e)?e:[];U.labelSelectedList=JSON.parse(JSON.stringify(l)),q(U.commonLabelList,U.labelSelectedList)}}),{immediate:!0,deep:!0}),o((()=>{var e;return null==(e=V.item)?void 0:e.label_type}),(e=>{e&&"form"==V.sourceType&&(async e=>{var l;let{data:t={}}=await V.queryCommonlabels(e)||{};if("SUCCESS"!==t.result)return;let a=(null==(l=t.map)?void 0:l.rows)||[];q(a,U.labelSelectedList),U.commonLabelList=a})(e)}),{immediate:!0,deep:!0}),(l,t)=>(s(),n(d,null,[c("div",B,[e.explicit?g("v-if",!0):(s(),b(r(x),{key:0,align:"center"},{default:m((()=>[(s(!0),n(d,null,p(U.labelSelectedList,(l=>(s(),b(r(S),{bordered:!1,key:l.labelId,style:u(r(P)(l,!0)),closable:r(D)&&!e.isLock,onClose:e=>(e=>{const l=U.labelSelectedList||[],t=l.findIndex((l=>l.labelId==e.labelId));-1!=t&&l.splice(t,1),F("onChange",[...l]),U.labelSelectedList=l,ee(e.labelId,!1)})(l),size:"small"},{default:m((()=>[L(r(O),{placement:"top-start"},{trigger:m((()=>[c("span",null,y(l.labelName),1)])),default:m((()=>[c("span",null,y(l.labelName),1)])),_:2},1024)])),_:2},1032,["style","closable","onClose"])))),128)),e.explicit||e.isLock?g("v-if",!0):h((s(),n("span",{key:0,class:C(["form-add-icon form-add-icon-label",{disable:e.isLock}]),onClick:R},[L(r(k),{class:"add-icon",component:r(N)},null,8,["component"]),f(" 新增 ")],2)),[[v,r(D)]])])),_:1})),"form"==e.sourceType&&U.commonLabelList.length&&r(D)&&!e.explicit?(s(),b(r(x),{key:1,align:"center",class:"common-label"},{default:m((()=>[E,(s(!0),n(d,null,p(U.commonLabelList,((e,l)=>(s(),b(r(S),{checkable:"",checked:e.isSelect,"onUpdate:checked":l=>function(e,l){l.isSelect=e,J(e,l)}(l,e),key:l,style:u(r(P)(e)),size:"small"},{default:m((()=>[L(r(O),{placement:"top-start"},{trigger:m((()=>[c("span",null,y(e.labelName),1)])),default:m((()=>[c("span",null,y(e.labelName),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])),_:1})):g("v-if",!0),e.explicit&&r(D)?(s(),n("div",A,[L(W,I(l.$attrs,{ref_key:"labelFormContentRef",ref:T,explicit:e.explicit,labelSelectedList:U.labelSelectedList,isChangeWindow:U.isChangeWindow,labelOptions:U.editLabelItem.labelObj,deleteLabel:e.deleteLabel,saveLabelItem:e.saveLabelItem,onUpdateLabelData:Y,onExplicitOnChange:Z}),null,16,["explicit","labelSelectedList","isChangeWindow","labelOptions","deleteLabel","saveLabelItem"])])):g("v-if",!0)]),g(" 弹窗 "),L(r(j),{preset:"dialog",class:C(["label-form-modal-wrap modal-wrap standard-modal standard-modal-white",{"modal-screen":U.isChangeWindow}]),show:U.labelVisible,"onUpdate:show":t[0]||(t[0]=e=>U.labelVisible=e),onPositiveClick:M,onNegativeClick:K,onClose:K,"mask-closable":!1,"close-on-esc":!1,"show-icon":!1,"negative-text":"取消","positive-text":"确定",style:u({width:U.modalWidth})},{header:m((()=>[H,c("div",z,[c("i",{onClick:G,class:C(["iconfont-select-label",U.isChangeWindow?"icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-select-label-menzhenyishengzhanxitongtubiaozuidahua"])},null,2)])])),default:m((()=>[L(W,I(l.$attrs,{ref_key:"labelFormContentRef",ref:T,labelSelectedList:U.labelSelectedList,isChangeWindow:U.isChangeWindow,labelOptions:U.editLabelItem.labelObj,sourceType:e.sourceType,deleteLabel:e.deleteLabel,saveLabelItem:e.saveLabelItem,onUpdateLabelData:Y}),null,16,["labelSelectedList","isChangeWindow","labelOptions","sourceType","deleteLabel","saveLabelItem"])])),_:1},8,["show","class","style"])],64))}});export{F as default};
1
+ import{defineComponent as e,ref as l,reactive as t,computed as a,onMounted as i,watch as o,openBlock as s,createElementBlock as n,Fragment as d,createElementVNode as c,createBlock as r,unref as b,withCtx as m,renderList as p,normalizeStyle as u,createVNode as L,toDisplayString as y,withDirectives as h,normalizeClass as C,createTextVNode as f,vShow as v,createCommentVNode as g,mergeProps as w,nextTick as I}from"vue";import{NSpace as x,NTag as S,NTooltip as O,NIcon as k,NModal as j}from"naive-ui";import{AddCircleOutline as N}from"@vicons/ionicons5";import W from"./LabelFormContent.vue.js";import{handleLabelColor as P}from"../../../shared/utils/vexutils.js";import _ from"../../../shared/utils/vexutilsExpand.js";const B={class:"c-select-label"},E=c("span",null,"常用",-1),A={key:2,class:"outexplicit"},H=c("span",null,"选择标签",-1),z={class:"svg-wrap"};var F=e({__name:"SelectLabel",props:{selectedList:{type:Array,default:()=>[]},selectedListObj:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isDetail:{type:Boolean,default:!1},isLock:{type:Boolean,default:!1},sourceType:{type:String,default:""},explicit:{type:Boolean,default:!1},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},queryCommonlabels:{type:Function,default:()=>Promise.resolve({data:{}})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})}},emits:["onChange"],setup(e,{emit:F}){const V=e,T=l(null),U=t({labelVisible:!1,editLabelItem:{},labelSelectedList:[],labelSelectedEdit:[],inited:!1,isChangeWindow:!1,modalWidth:"763px",modalHeight:"404px",maxHeight:"404px",commonLabelList:[],multipleChoiceConfig:{}});const D=a((()=>{const e=(null==V?void 0:V.item)||{};return(1==e.is_edit||e.isShow)&&!V.isDetail})),$=a((()=>{var e,l;let t=null==(e=V.item)?void 0:e.val_key;if(!t||!V.selectedListObj)return V.selectedList;let a=null==(l=V.selectedListObj)?void 0:l[t];return a||V.selectedList})),q=(e,l)=>{e.length&&e.forEach((e=>{let t=l.some((l=>l.labelId==e.labelId));e.isSelect=t}))},J=(e,l)=>{let t=U.multipleChoiceConfig,a=U.labelSelectedList||[];if(e){if(a.some((e=>e.labelId==l.labelId)))return;"2"==t[l.typeId]&&(a=a.filter((e=>e.typeId!==l.typeId))),a.push(l)}else{const e=a.findIndex((e=>e.labelId==l.labelId));-1!=e&&a.splice(e,1)}F("onChange",[...a]),U.labelSelectedList=a},R=e=>{V.isLock||(V.explicit||"init"===e||(U.labelVisible=!0),Q(V.item))},K=()=>{var e;V.explicit||(null==(e=T.value)||e.resetShowAdd(),U.editLabelItem.showAdd=!1,U.editLabelItem={},U.inited=!1,U.modalWidth="763px",U.modalHeight="404px",U.maxHeight="404px",U.isChangeWindow=!1,U.labelVisible=!1)},G=()=>{U.isChangeWindow=!U.isChangeWindow;let e=document.body.clientHeight;U.modalWidth="763px"===U.modalWidth?"100%":"763px",U.modalHeight="404px"===U.modalHeight?e-110+"px":"404px",U.maxHeight="auto"===U.modalHeight?"404px":"none"},M=()=>{var e;null==(e=T.value)||e.handleLabelForm((e=>{F("onChange",[...e]),U.labelSelectedList=e,q(U.commonLabelList,e),K()}))},Q=async(e,l)=>{const{rows:t,results:a}=await V.getLabelList(e,{update:l}),i=t||[],o={},s=`${e.val_key}_${e.name}`,n=l?[...U.labelSelectedEdit||[]]:[...U.labelSelectedList||[]];i.forEach((e=>{e.cacheKey=s,e.isSelect=!1,o[e.typeName]?o[e.typeName].itemList.push({...e}):o[e.typeName]={itemList:[{...e}],showAdd:!1,addVal:"",typeName:e.typeName,typeId:e.typeId}})),a&&(e.labelObj=o,e.labelList=i),l&&(U.labelSelectedEdit=n),U.editLabelItem=e,X(a)},X=e=>{if(!e)return!1;let l=Object.keys(e),t={},a=(e.typeList||[]).reduce(((e,l)=>(t[l.typeId]=l.multipleChoice,e[l.typeName]={multipleChoice:l.multipleChoice,parentColor:l.parentColor,allowCreateByPersonal:l.allowCreateByPersonal},e)),{});V.explicit&&(U.multipleChoiceConfig=t),l.forEach((l=>{var t,i,o,s,n,d,c;"typeList"!==l&&("emptyTypes"!==l?_.isPlainObject(e[l])?U.editLabelItem.labelObj[l]?(U.editLabelItem.labelObj[l].isNoAdd=!0,U.editLabelItem.labelObj[l].multipleChoice=null==(i=a[l])?void 0:i.multipleChoice,U.editLabelItem.labelObj[l].allowCreateByPersonal=null==(o=a[l])?void 0:o.allowCreateByPersonal,U.editLabelItem.labelObj[l].parentColor=null==(s=a[l])?void 0:s.parentColor):U.editLabelItem.labelObj[l]={addVal:"",showAdd:!1,itemList:!1,typeId:"",typeName:l,allowCreateByPersonal:null==(t=a[l])?void 0:t.allowCreateByPersonal,...a[l]||{}}:(U.editLabelItem.labelObj[l].multipleChoice=null==(n=a[l])?void 0:n.multipleChoice,U.editLabelItem.labelObj[l].allowCreateByPersonal=null==(d=a[l])?void 0:d.allowCreateByPersonal,U.editLabelItem.labelObj[l].parentColor=null==(c=a[l])?void 0:c.parentColor):e[l].forEach((e=>{U.editLabelItem.labelObj[e.typeName]={addVal:"",showAdd:!1,itemList:[],typeId:e.typeId,typeName:e.typeName,allowCreateByPersonal:e.allowCreateByPersonal,...a[e.typeName]||{}}})))}))},Y=()=>{Q(V.item,!0)},Z=()=>{M()},ee=(e,l)=>{V.explicit&&I((()=>{var t;null==(t=T.value)||t.hanldeSetLabelItem(e,l)}))};return i((()=>{V.explicit?R():(async e=>{const{rows:l,results:t}=await V.getLabelList(e);if(!t)return!1;let a=(t.typeList||[]).reduce(((e,l)=>(e[l.typeId]=l.multipleChoice,e)),{});U.multipleChoiceConfig=a})(V.item)})),o((()=>$.value),(e=>{if(e){let l=Array.isArray(e)?e:[];U.labelSelectedList=JSON.parse(JSON.stringify(l)),q(U.commonLabelList,U.labelSelectedList)}}),{immediate:!0,deep:!0}),o((()=>{var e;return null==(e=V.item)?void 0:e.label_type}),(e=>{e&&"form"==V.sourceType&&(async e=>{var l;let{data:t={}}=await V.queryCommonlabels(e)||{};if("SUCCESS"!==t.result)return;let a=(null==(l=t.map)?void 0:l.rows)||[];q(a,U.labelSelectedList),U.commonLabelList=a})(e)}),{immediate:!0,deep:!0}),(l,t)=>{var a,i;return s(),n(d,null,[c("div",B,[e.explicit?g("v-if",!0):(s(),r(b(x),{key:0,align:"center"},{default:m((()=>[(s(!0),n(d,null,p(U.labelSelectedList,(l=>(s(),r(b(S),{bordered:!1,key:l.labelId,style:u(b(P)(l,!0)),closable:b(D)&&!e.isLock,onClose:e=>(e=>{const l=U.labelSelectedList||[],t=l.findIndex((l=>l.labelId==e.labelId));-1!=t&&l.splice(t,1),F("onChange",[...l]),U.labelSelectedList=l,ee(e.labelId,!1)})(l),size:"small"},{default:m((()=>[L(b(O),{placement:"top-start"},{trigger:m((()=>[c("span",null,y(l.labelName),1)])),default:m((()=>[c("span",null,y(l.labelName),1)])),_:2},1024)])),_:2},1032,["style","closable","onClose"])))),128)),e.explicit||e.isLock?g("v-if",!0):h((s(),n("span",{key:0,class:C(["form-add-icon form-add-icon-label",{disable:e.isLock}]),onClick:R},[L(b(k),{class:"add-icon",component:b(N)},null,8,["component"]),f(" 新增 ")],2)),[[v,b(D)]])])),_:1})),"form"==e.sourceType&&U.commonLabelList.length&&b(D)&&!e.explicit?(s(),r(b(x),{key:1,align:"center",class:"common-label"},{default:m((()=>[E,(s(!0),n(d,null,p(U.commonLabelList,((e,l)=>(s(),r(b(S),{checkable:"",checked:e.isSelect,"onUpdate:checked":l=>function(e,l){l.isSelect=e,J(e,l)}(l,e),key:l,style:u(b(P)(e)),size:"small"},{default:m((()=>[L(b(O),{placement:"top-start"},{trigger:m((()=>[c("span",null,y(e.labelName),1)])),default:m((()=>[c("span",null,y(e.labelName),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])),_:1})):g("v-if",!0),e.explicit&&b(D)?(s(),n("div",A,[L(W,w(l.$attrs,{ref_key:"labelFormContentRef",ref:T,explicit:e.explicit,labelSelectedList:U.labelSelectedList,isChangeWindow:U.isChangeWindow,labelOptions:U.editLabelItem.labelObj,deleteLabel:e.deleteLabel,saveLabelItem:e.saveLabelItem,onUpdateLabelData:Y,onExplicitOnChange:Z}),null,16,["explicit","labelSelectedList","isChangeWindow","labelOptions","deleteLabel","saveLabelItem"])])):g("v-if",!0)]),g(" 弹窗 "),L(b(j),{preset:"dialog",class:C(["label-form-modal-wrap modal-wrap standard-modal standard-modal-white",{"modal-screen":U.isChangeWindow}]),show:U.labelVisible,"onUpdate:show":t[0]||(t[0]=e=>U.labelVisible=e),onPositiveClick:M,onNegativeClick:K,onClose:K,"mask-closable":!1,"close-on-esc":!1,"show-icon":!1,"negative-text":(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.28"))||"取消","positive-text":(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.27"))||"确定",style:u({width:U.modalWidth})},{header:m((()=>[H,c("div",z,[c("i",{onClick:G,class:C(["iconfont-select-label",U.isChangeWindow?"icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-select-label-menzhenyishengzhanxitongtubiaozuidahua"])},null,2)])])),default:m((()=>[L(W,w(l.$attrs,{ref_key:"labelFormContentRef",ref:T,labelSelectedList:U.labelSelectedList,isChangeWindow:U.isChangeWindow,labelOptions:U.editLabelItem.labelObj,sourceType:e.sourceType,deleteLabel:e.deleteLabel,saveLabelItem:e.saveLabelItem,onUpdateLabelData:Y}),null,16,["labelSelectedList","isChangeWindow","labelOptions","sourceType","deleteLabel","saveLabelItem"])])),_:1},8,["show","class","style"])],64)}}});export{F as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,watch as a,openBlock as s,createElementBlock as t,createCommentVNode as i,unref as d,Fragment as c,createElementVNode as n,renderList as o,createBlock as u,normalizeStyle as y,normalizeClass as f,withCtx as p,createVNode as m,toDisplayString as r,withDirectives as b,withModifiers as v,vShow as h,createTextVNode as k}from"vue";import{NTag as I,NTooltip as g,NIcon as C,NButton as L,NInput as A}from"naive-ui";import{Close as B,Add as F}from"@vicons/ionicons5";const P={class:"edit-content"},V={key:0,class:"label-disable-wrap"},_=[n("p",{class:"label-disable-title"},"无可选标签",-1),n("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],w={class:"label-content"},N={key:0,class:"selfval"},T={key:1,class:"selfval"};var E=e({__name:"label-classify",props:{classifyItem:{default:()=>({})},handleLabelChange:{type:Function,default:()=>{}},handleLabelColor:{type:Function,default:()=>{}},handleDelLabel:{type:Function,default:()=>{}},handleAddLabel:{type:Function,default:()=>{}},hanldeBlur:{type:Function,default:()=>{}},clearaddVal:{type:Function,default:()=>{}},isEdit:{type:Boolean,default:!1},sourceType:null},setup(e){var E;const U=e;let x=l((null==(E=U.classifyItem)?void 0:E.itemList)||[]);return a((()=>U.classifyItem),(e=>{x.value=(null==e?void 0:e.itemList)||[]}),{immediate:!0,deep:!0}),(l,a)=>(s(),t("div",P,[i(" disable "),d(x)?(s(),t(c,{key:1},[i(" "),n("div",w,[(s(!0),t(c,null,o(d(x),(l=>(s(),u(d(I),{checkable:"",checked:l.isSelect,"onUpdate:checked":a=>((e,l,a)=>{l.isSelect=e,U.handleLabelChange(e,l,a)})(a,l,e.classifyItem),key:l.labelId,style:y(e.handleLabelColor(l)),class:f({"sys-label-tag":l.isPublic&&1==l.isPublic})},{default:p((()=>[m(d(g),{placement:"top-start"},{trigger:p((()=>[n("span",null,r(l.labelName),1)])),default:p((()=>[n("span",null,r(l.labelName),1)])),_:2},1024),"guage"!=e.sourceType?b((s(),u(d(C),{key:0,class:"label-close",component:d(B),onClick:v((a=>e.handleDelLabel(l,e.classifyItem)),["stop"])},null,8,["component","onClick"])),[[h,!(l.isPublic&&1==l.isPublic)]]):i("v-if",!0)])),_:2},1032,["checked","onUpdate:checked","style","class"])))),128)),1==e.classifyItem.allowCreateByPersonal?(s(),t(c,{key:0},[e.isEdit&&!e.classifyItem.isNoAdd&&"guage"!=e.sourceType?b((s(),u(d(L),{key:0,dashed:"",class:"label-add",onClick:a[0]||(a[0]=l=>e.handleAddLabel(l,e.classifyItem))},{default:p((()=>[e.classifyItem.addVal?(s(),t("span",N,r(e.classifyItem.addVal),1)):(s(),t("span",T,[m(d(C),{component:d(F)},null,8,["component"]),k("标签")]))])),_:1},512)),[[h,!e.classifyItem.showAdd]]):i("v-if",!0),i(" 是否允许新增个人标签 allowCreateByPersonal "),e.isEdit&&!e.classifyItem.isNoAdd&&"guage"!=e.sourceType?b((s(),u(d(A),{key:1,class:"label-add add-input",value:e.classifyItem.addVal,"onUpdate:value":a[2]||(a[2]=l=>e.classifyItem.addVal=l),valueModifiers:{trim:!0},onBlur:a[3]||(a[3]=l=>e.hanldeBlur(l,e.classifyItem))},{suffix:p((()=>[m(d(C),{component:d(B),onClick:a[1]||(a[1]=v((l=>e.clearaddVal(l,e.classifyItem)),["stop"]))},null,8,["component"])])),_:1},8,["value"])),[[h,e.classifyItem.showAdd]]):i("v-if",!0)],64)):i("v-if",!0)])],2112)):(s(),t("div",V,_))]))}});export{E as default};
1
+ import{defineComponent as e,ref as l,watch as a,openBlock as s,createElementBlock as t,createCommentVNode as i,unref as d,Fragment as n,createElementVNode as c,renderList as o,createBlock as u,normalizeStyle as y,normalizeClass as f,withCtx as p,createVNode as m,toDisplayString as r,withDirectives as b,withModifiers as v,vShow as h,createTextVNode as k}from"vue";import{NTag as I,NTooltip as g,NIcon as C,NButton as L,NInput as w}from"naive-ui";import{Close as B,Add as A}from"@vicons/ionicons5";const F={class:"edit-content"},P={key:0,class:"label-disable-wrap"},V=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],_={class:"label-content"},N={key:0,class:"selfval"},T={key:1,class:"selfval"};var E=e({__name:"label-classify",props:{classifyItem:{default:()=>({})},handleLabelChange:{type:Function,default:()=>{}},handleLabelColor:{type:Function,default:()=>{}},handleDelLabel:{type:Function,default:()=>{}},handleAddLabel:{type:Function,default:()=>{}},hanldeBlur:{type:Function,default:()=>{}},clearaddVal:{type:Function,default:()=>{}},isEdit:{type:Boolean,default:!1},sourceType:null},setup(e){var E;const U=e;let x=l((null==(E=U.classifyItem)?void 0:E.itemList)||[]);return a((()=>U.classifyItem),(e=>{x.value=(null==e?void 0:e.itemList)||[]}),{immediate:!0,deep:!0}),(l,a)=>(s(),t("div",F,[i(" disable "),d(x)?(s(),t(n,{key:1},[i(" "),c("div",_,[(s(!0),t(n,null,o(d(x),(l=>(s(),u(d(I),{checkable:"",checked:l.isSelect,"onUpdate:checked":a=>((e,l,a)=>{l.isSelect=e,U.handleLabelChange(e,l,a)})(a,l,e.classifyItem),key:l.labelId,style:y(e.handleLabelColor(l)),class:f({"sys-label-tag":l.isPublic&&1==l.isPublic})},{default:p((()=>[m(d(g),{placement:"top-start"},{trigger:p((()=>[c("span",null,r(l.labelName),1)])),default:p((()=>[c("span",null,r(l.labelName),1)])),_:2},1024),"guage"!=e.sourceType?b((s(),u(d(C),{key:0,class:"label-close",component:d(B),onClick:v((a=>e.handleDelLabel(l,e.classifyItem)),["stop"])},null,8,["component","onClick"])),[[h,!(l.isPublic&&1==l.isPublic)]]):i("v-if",!0)])),_:2},1032,["checked","onUpdate:checked","style","class"])))),128)),1==e.classifyItem.allowCreateByPersonal?(s(),t(n,{key:0},[e.isEdit&&!e.classifyItem.isNoAdd&&"guage"!=e.sourceType?b((s(),u(d(L),{key:0,dashed:"",class:"label-add",onClick:a[0]||(a[0]=l=>e.handleAddLabel(l,e.classifyItem))},{default:p((()=>{var l;return[e.classifyItem.addVal?(s(),t("span",N,r(e.classifyItem.addVal),1)):(s(),t("span",T,[m(d(C),{component:d(A)},null,8,["component"]),k((null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.297"))||"标签")]))]})),_:1},512)),[[h,!e.classifyItem.showAdd]]):i("v-if",!0),i(" 是否允许新增个人标签 allowCreateByPersonal "),e.isEdit&&!e.classifyItem.isNoAdd&&"guage"!=e.sourceType?b((s(),u(d(w),{key:1,class:"label-add add-input",value:e.classifyItem.addVal,"onUpdate:value":a[2]||(a[2]=l=>e.classifyItem.addVal=l),valueModifiers:{trim:!0},onBlur:a[3]||(a[3]=l=>e.hanldeBlur(l,e.classifyItem))},{suffix:p((()=>[m(d(C),{component:d(B),onClick:a[1]||(a[1]=v((l=>e.clearaddVal(l,e.classifyItem)),["stop"]))},null,8,["component"])])),_:1},8,["value"])),[[h,e.classifyItem.showAdd]]):i("v-if",!0)],64)):i("v-if",!0)])],2112)):(s(),t("div",P,V))]))}});export{E as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,watch as a,openBlock as t,createElementBlock as s,createCommentVNode as i,withDirectives as r,createElementVNode as o,normalizeClass as c,createVNode as d,unref as n,withCtx as f,Fragment as y,renderList as p,createBlock as b,createTextVNode as u,toDisplayString as m,vShow as g}from"vue";import{NAnchor as h,NAnchorLink as v}from"naive-ui";import C from"./iho-label-classify.vue.js";const w={key:0,class:"label-disable-wrap"},L=[o("p",{class:"label-disable-title"},"无可选标签",-1),o("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],I={style:{height:"100%"}},x={class:"label-wrap"},k=["id"];var N=e({__name:"IhoLabelFormContent",props:{selectedList:{type:Array,default:()=>[]},categoryList:{type:Array,default:()=>[]},isChangeWindow:{type:Boolean,default:!1},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange"],setup(e,{expose:N,emit:S}){const A=e,O=l(),$=l(null),_=()=>{var e;return null==(e=$.value)?void 0:e.querySelector(".right-label-wrap")},F=e=>{e.preventDefault()},W=(e,l,a)=>{let t=O.value||[];if(e)t.push({classifyId:a.classifyId,classifyName:a.classifyName,labelCode:l.labelCode,labelShowText:l.labelShowText,backgroundColor:l.backgroundColor});else{const e=t.findIndex((e=>e.classifyId===a.classifyId&&e.labelCode===l.labelCode));e>-1&&t.splice(e,1)}O.value=t,A.explicit&&S("explicitOnChange",t)};return a((()=>A.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];O.value=JSON.parse(JSON.stringify(l))}}),{immediate:!0,deep:!0}),N({handleLabelForm:e=>{e([...O.value||[]])}}),(l,a)=>(t(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:$},[e.categoryList.length?i("v-if",!0):(t(),s("div",w,L)),r(o("div",I,[o("div",x,[o("div",{class:c(["left-label-wrap",{"total-left-label-wrap":e.isChangeWindow}])},[d(n(h),{"offset-target":_,type:"block",onClick:F},{default:f((()=>[(t(!0),s(y,null,p(e.categoryList,(e=>(t(),b(n(v),{key:e.classifyId,href:`#${e.classifyId}-${e.classifyName}`,title:e.classifyName},null,8,["href","title"])))),128))])),_:1})],2),o("div",{class:c(["right-label-wrap",{"total-right-label-wrap":e.isChangeWindow}])},[(t(!0),s(y,null,p(e.categoryList,((e,l)=>(t(),s("div",{key:l,class:"edit-label-content"},[o("div",{class:"edit-label",id:`${e.classifyId}-${e.classifyName}`},[u(m(e.classifyName),1),i(" <span class=\"edit-label-type\">({{ v.multipleChoice == 2 ? '单' : '多' }}选)</span> ")],8,k),d(C,{categoryItem:e,selectedList:O.value,handleLabelChange:W},null,8,["categoryItem","selectedList"])])))),128))],2)])],512),[[g,e.categoryList.length>0]])],512))}});export{N as default};
1
+ import{defineComponent as e,ref as l,watch as a,openBlock as t,createElementBlock as s,createCommentVNode as i,withDirectives as o,createElementVNode as r,normalizeClass as c,createVNode as d,unref as n,withCtx as f,Fragment as y,renderList as p,createBlock as u,createTextVNode as b,toDisplayString as v,vShow as m}from"vue";import{NAnchor as g,NAnchorLink as h}from"naive-ui";import C from"./iho-label-classify.vue.js";const x={key:0,class:"label-disable-wrap"},w=[r("p",{class:"label-disable-title"},"无可选标签",-1),r("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],L={style:{height:"100%"}},I={class:"label-wrap"},k=["id"];var N=e({__name:"IhoLabelFormContent",props:{selectedList:{type:Array,default:()=>[]},categoryList:{type:Array,default:()=>[]},isChangeWindow:{type:Boolean,default:!1},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange"],setup(e,{expose:N,emit:S}){const A=e,O=l(),$=l(null),_=()=>{var e;return null==(e=$.value)?void 0:e.querySelector(".right-label-wrap")},F=e=>{e.preventDefault()},W=(e,l,a)=>{let t=O.value||[];if(e)l.exclusiveCode&&(t=t.filter((e=>e.exclusiveCode!=l.exclusiveCode))),t.push({classifyId:a.classifyId,classifyName:a.classifyName,labelCode:l.labelCode,labelShowText:l.labelShowText,backgroundColor:l.backgroundColor,fontColor:l.fontColor,exclusiveCode:l.exclusiveCode});else{const e=t.findIndex((e=>e.classifyId===a.classifyId&&e.labelCode===l.labelCode));e>-1&&t.splice(e,1)}O.value=t,A.explicit&&S("explicitOnChange",t)};return a((()=>A.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];O.value=JSON.parse(JSON.stringify(l))}}),{immediate:!0,deep:!0}),N({handleLabelForm:e=>{e([...O.value||[]])}}),(l,a)=>(t(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:$},[e.categoryList.length?i("v-if",!0):(t(),s("div",x,w)),o(r("div",L,[r("div",I,[r("div",{class:c(["left-label-wrap",{"total-left-label-wrap":e.isChangeWindow}])},[d(n(g),{"offset-target":_,type:"block",onClick:F},{default:f((()=>[(t(!0),s(y,null,p(e.categoryList,(e=>(t(),u(n(h),{key:e.classifyId,href:`#${e.classifyId}-${e.classifyName}`,title:e.classifyName},null,8,["href","title"])))),128))])),_:1})],2),r("div",{class:c(["right-label-wrap",{"total-right-label-wrap":e.isChangeWindow}])},[(t(!0),s(y,null,p(e.categoryList,((e,l)=>(t(),s("div",{key:l,class:"edit-label-content"},[r("div",{class:"edit-label",id:`${e.classifyId}-${e.classifyName}`},[b(v(e.classifyName),1),i(" <span class=\"edit-label-type\">({{ v.multipleChoice == 2 ? '单' : '多' }}选)</span> ")],8,k),d(C,{categoryItem:e,selectedList:O.value,handleLabelChange:W},null,8,["categoryItem","selectedList"])])))),128))],2)])],512),[[m,e.categoryList.length>0]])],512))}});export{N as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,reactive as i,watch as a,openBlock as o,createElementBlock as t,Fragment as n,createElementVNode as s,createBlock as d,unref as c,withCtx as r,renderList as p,normalizeStyle as h,createVNode as g,toDisplayString as m,createTextVNode as u,createCommentVNode as x,normalizeClass as b}from"vue";import{NSpace as f,NTag as C,NTooltip as y,NIcon as v,NModal as w}from"naive-ui";import{AddCircleOutline as L}from"@vicons/ionicons5";import W from"./IhoLabelFormContent.vue.js";const k={class:"c-select-label"},H={key:1,class:"outexplicit"},_=s("span",null,"选择标签",-1),z={class:"svg-wrap"};var I=e({__name:"IhoSelectLabel",props:{selectedList:{type:Array,default:()=>[]},categoryList:{type:Array,default:()=>[]},explicit:{type:Boolean,default:!1}},emits:["onChange"],setup(e,{emit:I}){const S=e,V=l(null),A=l(),F=i({labelVisible:!1,isChangeWindow:!1,modalWidth:"763px",modalHeight:"404px",maxHeight:"404px"}),O=()=>{S.explicit||(F.labelVisible=!0)},N=()=>{S.explicit||(F.modalWidth="763px",F.modalHeight="404px",F.maxHeight="404px",F.isChangeWindow=!1,F.labelVisible=!1)},E=()=>{F.isChangeWindow=!F.isChangeWindow;let e=document.body.clientHeight;F.modalWidth="763px"===F.modalWidth?"100%":"763px",F.modalHeight="404px"===F.modalHeight?e-110+"px":"404px",F.maxHeight="auto"===F.modalHeight?"404px":"none"},J=()=>{var e;null==(e=V.value)||e.handleLabelForm((e=>{I("onChange",[...e]),A.value=e,N()}))},R=()=>{J()};return a((()=>S.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];A.value=JSON.parse(JSON.stringify(l))}}),{immediate:!0,deep:!0}),(l,i)=>(o(),t(n,null,[s("div",k,[e.explicit?x("v-if",!0):(o(),d(c(f),{key:0,align:"center"},{default:r((()=>[(o(!0),t(n,null,p(A.value,(e=>{return o(),d(c(C),{bordered:!1,key:`${e.classifyId}-${e.labelCode}`,class:"select-label-active",style:h((l=e,{background:l.backgroundColor,color:(null==l?void 0:l.fontColor)||"#fff",borderColor:l.backgroundColor})),size:"small",closable:"",onClose:l=>(e=>{const l=A.value||[],i=l.findIndex((l=>l.classifyId==e.classifyId&&l.labelCode==e.labelCode));i>-1&&l.splice(i,1),A.value=l,I("onChange",[...l])})(e)},{default:r((()=>[g(c(y),{placement:"top-start",duration:0},{trigger:r((()=>[s("span",null,m(e.labelShowText),1)])),default:r((()=>[s("span",null,m(e.labelShowText),1)])),_:2},1024)])),_:2},1032,["style","onClose"]);var l})),128)),e.explicit?x("v-if",!0):(o(),t("span",{key:0,class:"form-add-icon form-add-icon-label",onClick:O},[g(c(v),{class:"add-icon",component:c(L)},null,8,["component"]),u(" 新增 ")]))])),_:1})),e.explicit?(o(),t("div",H,[g(W,{ref_key:"labelFormContentRef",ref:V,categoryList:e.categoryList,selectedList:e.selectedList,isChangeWindow:F.isChangeWindow,explicit:e.explicit,onExplicitOnChange:R},null,8,["categoryList","selectedList","isChangeWindow","explicit"])])):x("v-if",!0)]),x(" 弹窗 "),g(c(w),{preset:"dialog",class:b(["label-form-modal-wrap modal-wrap standard-modal standard-modal-white",{"modal-screen":F.isChangeWindow}]),show:F.labelVisible,"onUpdate:show":i[0]||(i[0]=e=>F.labelVisible=e),onPositiveClick:J,onNegativeClick:N,onClose:N,"mask-closable":!1,"close-on-esc":!1,"show-icon":!1,"negative-text":"取消","positive-text":"确定",style:h({width:F.modalWidth})},{header:r((()=>[_,s("div",z,[s("i",{onClick:E,class:b(["iconfont-select-label",F.isChangeWindow?"icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-select-label-menzhenyishengzhanxitongtubiaozuidahua"])},null,2)])])),default:r((()=>[g(W,{ref_key:"labelFormContentRef",ref:V,categoryList:e.categoryList,selectedList:A.value,isChangeWindow:F.isChangeWindow,explicit:e.explicit,onExplicitOnChange:R},null,8,["categoryList","selectedList","isChangeWindow","explicit"])])),_:1},8,["show","class","style"])],64))}});export{I as default};
1
+ import{defineComponent as e,ref as l,reactive as i,watch as a,openBlock as o,createElementBlock as t,Fragment as n,createElementVNode as s,createBlock as d,unref as c,withCtx as r,renderList as p,normalizeStyle as g,createVNode as h,toDisplayString as u,createTextVNode as m,createCommentVNode as x,normalizeClass as b}from"vue";import{NSpace as C,NTag as f,NTooltip as y,NIcon as w,NModal as v}from"naive-ui";import{AddCircleOutline as L}from"@vicons/ionicons5";import{cloneDeep as W}from"lodash-es";import k from"./IhoLabelFormContent.vue.js";const H={class:"c-select-label"},_={key:1,class:"outexplicit"},z=s("span",null,"选择标签",-1),I={class:"svg-wrap"};var V=e({__name:"IhoSelectLabel",props:{selectedList:{type:Array,default:()=>[]},categoryList:{type:Array,default:()=>[]},explicit:{type:Boolean,default:!1}},emits:["onChange"],setup(e,{emit:V}){const A=e,F=l(null),B=l(),S=i({labelVisible:!1,isChangeWindow:!1,modalWidth:"763px",modalHeight:"404px",maxHeight:"404px"}),E=()=>{A.explicit||(S.labelVisible=!0)},O=()=>{A.explicit||(S.modalWidth="763px",S.modalHeight="404px",S.maxHeight="404px",S.isChangeWindow=!1,S.labelVisible=!1)},R=()=>{S.isChangeWindow=!S.isChangeWindow;let e=document.body.clientHeight;S.modalWidth="763px"===S.modalWidth?"100%":"763px",S.modalHeight="404px"===S.modalHeight?e-110+"px":"404px",S.maxHeight="auto"===S.modalHeight?"404px":"none"},T=()=>{var e;null==(e=F.value)||e.handleLabelForm((e=>{V("onChange",[...e]),B.value=e,O()}))},$=()=>{T()};return a((()=>A.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];B.value=W(l)}}),{immediate:!0,deep:!0}),(l,i)=>{var a,W;return o(),t(n,null,[s("div",H,[e.explicit?x("v-if",!0):(o(),d(c(C),{key:0,align:"center"},{default:r((()=>[(o(!0),t(n,null,p(B.value,(e=>{return o(),d(c(f),{bordered:!1,key:`${e.classifyId}-${e.labelCode}`,class:"select-label-active",style:g((l=e,{background:l.backgroundColor,color:(null==l?void 0:l.fontColor)||"#fff",borderColor:l.backgroundColor})),size:"small",closable:"",onClose:l=>(e=>{const l=B.value||[],i=l.findIndex((l=>l.classifyId==e.classifyId&&l.labelCode==e.labelCode));i>-1&&l.splice(i,1),B.value=l,V("onChange",[...l])})(e)},{default:r((()=>[h(c(y),{placement:"top-start",duration:0},{trigger:r((()=>[s("span",null,u(e.labelShowText),1)])),default:r((()=>[s("span",null,u(e.labelShowText),1)])),_:2},1024)])),_:2},1032,["style","onClose"]);var l})),128)),e.explicit?x("v-if",!0):(o(),t("span",{key:0,class:"form-add-icon form-add-icon-label",onClick:E},[h(c(w),{class:"add-icon",component:c(L)},null,8,["component"]),m(" 新增 ")]))])),_:1})),e.explicit?(o(),t("div",_,[h(k,{ref_key:"labelFormContentRef",ref:F,categoryList:e.categoryList,selectedList:e.selectedList,isChangeWindow:S.isChangeWindow,explicit:e.explicit,onExplicitOnChange:$},null,8,["categoryList","selectedList","isChangeWindow","explicit"])])):x("v-if",!0)]),x(" 弹窗 "),h(c(v),{preset:"dialog",class:b(["label-form-modal-wrap modal-wrap standard-modal standard-modal-white",{"modal-screen":S.isChangeWindow}]),show:S.labelVisible,"onUpdate:show":i[0]||(i[0]=e=>S.labelVisible=e),onPositiveClick:T,onNegativeClick:O,onClose:O,"mask-closable":!1,"close-on-esc":!1,"show-icon":!1,"negative-text":(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.28"))||"取消","positive-text":(null==(W=window.getLanguageByCode)?void 0:W.call(window,"10010.1.27"))||"确定",style:g({width:S.modalWidth})},{header:r((()=>[z,s("div",I,[s("i",{onClick:R,class:b(["iconfont-select-label",S.isChangeWindow?"icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-select-label-menzhenyishengzhanxitongtubiaozuidahua"])},null,2)])])),default:r((()=>[h(k,{ref_key:"labelFormContentRef",ref:F,categoryList:e.categoryList,selectedList:B.value,isChangeWindow:S.isChangeWindow,explicit:e.explicit,onExplicitOnChange:$},null,8,["categoryList","selectedList","isChangeWindow","explicit"])])),_:1},8,["show","class","style"])],64)}}});export{V as default};
@@ -1 +1 @@
1
- import{defineComponent as e,inject as l,ref as t,computed as n,reactive as a,watch as i,openBlock as u,createBlock as r,unref as o,withCtx as c,createVNode as s,createCommentVNode as d,withKeys as p,createTextVNode as v,toDisplayString as h,createElementBlock as y,Fragment as f,renderList as k,withDirectives as m,vShow as b,mergeProps as g,createElementVNode as _,renderSlot as S}from"vue";import{NGrid as w,NGi as T,NSpace as x,NInputGroup as C,NInput as j,NIcon as L,NButton as F,NTag as O,NCheckbox as D,NEmpty as E,NTree as N}from"naive-ui";import{CloseCircleSharp as I}from"@vicons/ionicons5";import{searchFilterTree as P,getExpandedKeys as $}from"./utils/index.js";import{cloneDeep as R}from"lodash-es";import{SelectItemTypesConfig as A,SelectRoleEnumsConfig as B,SearchTypeConfig as K}from"./types/enums.js";import U from"./components/SearchMultiple.vue.js";import q from"./components/SearchOrgAndStaff.vue.js";import{InjectionSelectPersonEmits as H}from"./constants/index.js";const M={key:0,class:"select-type-tags"},W={key:4,class:"tree-content"},G={key:0},z={class:"c-select-person__scroll",style:{height:"342px"}};var J=e({__name:"SelectPerson",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},searchInner:{type:Boolean,default:!1},searchFilter:{type:Object,default:()=>({})},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])},showSelectType:{type:Boolean,default:!1},roleData:{type:Array,default:()=>[]},roleFields:{type:Object,default:()=>({label:"name",key:"id",children:"children"})},forceShowSelectAll:{type:Boolean}},setup(e,{expose:J}){const Q=e,V={isOpen:!1,multiple:!1,customTitles:["联系人","部门"],itemHeight:250},X=[{key:"main",label:"选人员"},{key:"dept",label:"选科室"},{key:"role",label:"选角色"}],Y={dept:"科室",role:"角色"},Z=l(H),ee=t(""),le=t(!1),te=t([]),ne=t([]),ae=t([]),ie=t([]),ue=t([]),re=t(!1),oe=R(function e(l){var t;for(let n=0,a=l.length;n<a;n++){const a=l[n],i=Q.wordbook.children||"children";if(null==(t=a[i])?void 0:t.length){const l=Ne(a[i],[]);a.innerItemsNum=l.length,a.innerLeafs=l,a.children=e(a[i])}}return Q.showSelectType?l:Ie(l,"")}(Q.data)),ce=t([]),se=n((()=>!!Q.queryLoadChildData)),de=n((()=>{var e,l;return null!=(l=null==(e=null==Q?void 0:Q.treeSetting)?void 0:e.checkStrategy)?l:"child"})),pe=n((()=>(null==Q?void 0:Q.searchFilter)&&Object.keys(null==Q?void 0:Q.searchFilter).length>0)),ve=t("main"),he=n((()=>pe.value?{...R(V),...Q.searchFilter}:R(V))),ye=n((()=>{var e,l;return null!=(l=null==(e=null==Q?void 0:Q.wordbookChild)?void 0:e.user_expand_keys)?l:[]})),fe=n((()=>{if(Q.showSelectType){return function(e,l){let t={};return e.reduce(((e,n)=>(!t[n[l]]&&(t[n[l]]=e.push(n)),e)),[])}([...be.main.filter((e=>(e.itemType=A.PERSON,e[_e.value]==B.STAFF))),...be.dept.filter((e=>(e.itemType=A.DEPT,e[_e.value]==B.DEPT))),...be.role.filter((e=>(e.itemType=A.ROLE,e)))],"key")}let e=[];return te.value.forEach((l=>{for(let t=0,n=ie.value.length;t<n;t++){const n=ie.value[t];if(n.key==l){e.push(n);break}}})),e})),ke=a({main:[],dept:[],role:[],temp:[]}),me=a({main:[],dept:[],role:[]}),be=a({main:[],dept:[],role:[]}),ge=a({main:[],dept:[],role:[]}),_e=n((()=>{var e;return(null==(e=Q.wordbook)?void 0:e.type)||"type"})),Se=n((()=>Q.wordbookChild.user_id_obj||Q.wordbook.parent_id_obj||Date.now()));function we(){ke.main=ke.temp=oe,je(ke.temp,null,(e=>{ge.main.push(e.key)})),ce.value=ge.main,ke.dept=Te(R(oe),(e=>{ge.dept.push(e.key)})),ke.role=xe(R(Q.roleData),(e=>{ge.role.push(e.key)}))}function Te(e,l){return e.filter((e=>{var t;Q.showSelectType&&(null==(t=e.children)?void 0:t.length)&&(e.children=Te(e.children,l));const n=e[_e.value]==B.DEPT;return n&&Le(e,l),n}))}function xe(e,l){const{label:t,key:n,children:a="children"}=Q.roleFields;return e.map((e=>{var i;return e.key=e[n],e.label=e.title=e[t],(null==(i=e[a])?void 0:i.length)&&(e.children=xe(e[a],l)),Le(e,l),e}))}function Ce(e,l){var t,n;const a=["main","dept"].includes(l)?Se.value:null==(t=Q.roleFields)?void 0:t.key;for(let t=0,i=e.length;t<i;t++){const i=e[t],u=ue.value.map((e=>e.key));me[l].includes(i.key)&&!u.includes(i.key)&&be[l].push({...i,key:i[a]}),(null==(n=i.children)?void 0:n.length)&&Ce(i.children,l)}}function je(e,l,t){var n,a;for(let i=0,u=e.length;i<u;i++){const u=e[i];let r=ye.value.reduce(((e,l)=>e+(u[l]?`${u[l]},`:"")),"");u.title_expand_strs=r.slice(0,-1),u.title=Ee(u),u.label=Ee(u),u.parentNode=l,u.key||(u.key=u[Q.wordbookChild.user_id_obj]||u[Q.wordbook.parent_id_obj]||Date.now()),(null==(n=u.children)?void 0:n.length)?(je(u.children,u,t),Oe(u)):0===(null==(a=u.children)?void 0:a.length)&&Reflect.deleteProperty(u,"children"),Le(u,t)}}function Le(e,l){var t,n;switch(null!=(n=null==(t=null==Q?void 0:Q.treeSetting)?void 0:t.checkStrategy)?n:"child"){case"child":!function(e,l){e.disabled||e.children||!e.key||l&&l(e)}(e,l);break;case"parent":!function(e,l){e.disabled||e.tempTitle||!e.key||l&&l(e)}(e,l)}}async function Fe(e){if(Q.queryLoadChildData){const l=await Q.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.title}/${l.tempTitle}`:l.title})))),l}return e}function Oe(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function De({option:e}){var l,t;if((null==(l=e.children)?void 0:l.length)||se.value&&!(null==e?void 0:e.isLeaf)){const l=Q.wordbook.user_count_obj&&e[Q.wordbook.user_count_obj]||"",t=l?`(${l})`:"",n=`${e.title}${t}`;return s("span",{title:n},[n])}{const l=null!=(t=e.title_expand_strs)?t:"";return s("p",{class:"user_item"},[s("span",{title:e.title},[e.title]),s("span",{class:"user_item_expand",title:l},[l])])}}function Ee(e){return e[Q.wordbookChild.user_name_obj]||e[Q.wordbook.parent_name_obj]||e.orgName||e.title||""}function Ne(e,l){var t;for(let n=0,a=e.length;n<a;n++){const a=e[n];(null==(t=a.children)?void 0:t.length)?Ne(a.children,l):!a.disabled&&l.push(a)}return l}function Ie(e,l){return e&&0!==e.length?e.map((e=>{var t;const n=Ee(e),a=l?`${n}/${l}`:n;return{...e,tempTitle:l,children:(null==(t=e.children)?void 0:t.length)?Ie(null==e?void 0:e.children,a):[]}})):[]}async function Pe(){var e,l;const t=null!=(l=null==(e=null==Q?void 0:Q.wordbook)?void 0:e.filter_key)?l:"keyword";if(re.value=!!ee.value.trim(),se.value)ae.value=await Q.queryTreeSearch(ee.value);else{const e=function(){const e={[K.SEARCH_ORG_STAFF]:pe.value,[K.SEARCH_ORG]:Q.searchInner},l=Object.keys(e).find((l=>e[l]));return null!=l?l:""}();ae.value=P(e,ke.temp,ee.value,t)}ne.value=ae.value.length&&ee.value?$(ae.value):[]}function $e(e,l){var t,n;switch(null!=(n=null==(t=null==Q?void 0:Q.treeSetting)?void 0:t.checkStrategy)?n:"child"){case"child":!function(e,l){for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&(!n.children||n.isLeaf)&&(l&&!te.value.includes(n.key)&&te.value.push(n.key),!l)){const e=te.value.findIndex((e=>e===n.key));te.value.splice(e,1)}n.children&&$e(n.children,l)}}(e,l);break;case"parent":!function(e,l){te.value=[];for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&!n.tempTitle&&(l&&!te.value.includes(n.key)&&te.value.push(n.key),!l)){const e=te.value.findIndex((e=>e===n.key));te.value.splice(e,1)}}}(e,l)}}function Re(e){$e(ae.value,e)}function Ae(e){var l;for(let t=0,n=e.length;t<n;t++){const n=e[t],a=ue.value.map((e=>e.key));te.value.includes(n.key)&&!a.includes(n.key)&&ie.value.push({key:n.key,name:n.title,parentName:n.tempTitle,innerItemsNum:n.innerItemsNum,innerLeafs:n.innerLeafs,originItem:n}),(null==(l=n.children)?void 0:l.length)&&Ae(n.children)}}function Be(e){if(Q.showSelectType){const l=ve.value;te.value=me[l]=e}else te.value=e}function Ke(){Object.keys(me).forEach((e=>{me[e]=be[e]=[]})),te.value=[]}function Ue(e){te.value=e}function qe(){ee.value="",setTimeout((()=>{Pe()}))}return i((()=>Q.data),(e=>{!function(){if(we(),ae.value=ke.temp,Q.defaultList.length>0)if(se.value)Q.defaultList.forEach((e=>te.value.push(e.key))),ie.value=R(Q.defaultList),ue.value=R(Q.defaultList);else{if(Q.showSelectType){const e=ve.value;return Q.defaultList.forEach((e=>{e.itemType===A.PERSON&&(me.main.push(e[Se.value]),be.main.push(e)),e.itemType===A.DEPT&&(me.dept.push(e[Se.value]),be.dept.push(e)),e.itemType===A.ROLE&&(me.role.push(e[Q.roleFields.key]),be.role.push(e))})),void(te.value=me[e])}Q.defaultList.forEach((e=>te.value.push(e))),Ae(ke.temp)}}()}),{immediate:!0}),i((()=>te),(e=>{if(Q.showSelectType){const l=ve.value;be[l]=ue.value.filter((l=>e.value.includes(l.key))),Ce(ke[l],l),Q.showSelectType?le.value=ce.value.every((e=>te.value.findIndex((l=>l===e))>-1)):le.value=ce.value.every((e=>ie.value.findIndex((l=>l.key===e))>-1));const t=fe.value.map((e=>e.key));return Z("check",t),void Z("checkWithLevel",fe.value)}ie.value=ue.value.filter((l=>e.value.includes(l.key))),Ae(se.value?ae.value:ke.temp);const l=ie.value.filter((l=>e.value.includes(l.key)));Z("check",e.value),Z("checkWithLevel",l)}),{deep:!0}),i((()=>ee.value),(e=>{e||qe()})),J({getCheckWithLevel:function(){var e;if(Q.showSelectType)return null!=(e=fe.value)?e:[];const l=te.value,t=ie.value.filter((e=>l.includes(e.key)));return null!=t?t:[]}}),(l,t)=>(u(),r(o(w),{cols:2,class:"c-select-person"},{default:c((()=>[s(o(T),null,{default:c((()=>[s(o(x),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:c((()=>[s(o(C),{style:{"margin-bottom":"12px"}},{default:c((()=>[d(" clearable "),s(o(j),{class:"search-input",value:ee.value,"onUpdate:value":t[0]||(t[0]=e=>ee.value=e),placeholder:e.searchPlaceholder,onKeyup:p(Pe,["enter"])},{suffix:c((()=>[ee.value?(u(),r(o(L),{key:0,class:"search-clear",component:o(I),size:"16",onClick:qe},null,8,["component"])):d("v-if",!0)])),_:1},8,["value","placeholder","onKeyup"]),s(o(F),{type:"primary",onClick:Pe},{default:c((()=>[v(h(e.searchButtonText),1)])),_:1})])),_:1}),e.showSelectType?(u(),y("div",M,[(u(),y(f,null,k(X,(e=>s(o(O),{round:"",checkable:"",checked:ve.value===e.key,key:e.key,"onUpdate:checked":l=>function(e){ve.value=e.key,ae.value=ke.temp=ke[e.key],te.value=me[e.key],ce.value=ge[e.key]}(e)},{default:c((()=>[v(h(e.label),1)])),_:2},1032,["checked","onUpdate:checked"]))),64))])):d("v-if",!0),e.multiple&&!re.value?m((u(),r(o(D),{key:1,checked:le.value,"onUpdate:checked":[t[1]||(t[1]=e=>le.value=e),Re]},{default:c((()=>[v(" 全选 ")])),_:1},8,["checked"])),[[b,e.forceShowSelectAll||ce.value.length<1e3]]):d("v-if",!0),d(" 支持选人 "),e.searchInner&&e.multiple&&re.value&&"parent"===o(de)?(u(),r(U,{key:2,treeData:ae.value,checkedKeys:te.value,onNotifyCheck:Ue},null,8,["treeData","checkedKeys"])):o(pe)&&re.value&&"parent"===o(de)?(u(),y(f,{key:3},[d(" 同时兼容选人和选部门 "),d(" v-else-if=\"isSearchFilter && multiple && isSearch && checkStrategyResult === 'parent'\" "),s(q,{treeData:ae.value,checkedKeys:te.value,searchFilter:o(he),isMultiple:e.multiple,onNotifyCheck:Ue,onNotifyClear:qe},null,8,["treeData","checkedKeys","searchFilter","isMultiple"])],2112)):(u(),y("div",W,[0===ae.value.length?(u(),r(o(E),{key:0,description:"暂无数据"})):(u(),r(o(N),g({key:1,"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":te.value,"expanded-keys":ne.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>ne.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":te.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>te.value=e),data:ae.value,"check-strategy":"child","render-label":De},e.treeSetting,{"onUpdate:checkedKeys":Be,onLoad:Fe}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"]))]))])),_:1})])),_:1}),s(o(T),null,{default:c((()=>[s(o(x),{vertical:"",style:{"padding-left":"12px"}},{default:c((()=>[s(o(x),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:c((()=>[e.showCount?(u(),y("span",G,"已选择:"+h(o(fe).length),1)):d("v-if",!0),e.showClear?(u(),y("span",{key:1,class:"c-select-person__clear-btn",onClick:Ke},"清空")):d("v-if",!0)])),_:1}),_("div",z,[(u(!0),y(f,null,k(o(fe),(t=>(u(),y("span",{class:"c-select-person__tag-item",key:t.key},[d(" 标签插槽 "),S(l.$slots,"tag",{tag:t},(()=>[v(h(t.name)+" "+h(t.parentName?`(${t.parentName})`:"")+" "+h(t.innerItemsNum?`(${t.innerItemsNum}人)`:"")+" "+h(e.showSelectType&&Y[t.itemType]?`(${Y[t.itemType]})`:""),1)])),s(o(L),{class:"tag-close",component:o(I),onClick:e=>function(e){if(Q.showSelectType){const l=e.itemType===A.PERSON?"main":e.itemType;return me[l]=me[l].filter((l=>l!==e.key)),be[l]=ue.value.filter((e=>me[l].includes(e.key))),Ce(ke[l],l),void(ve.value==l&&(te.value=me[l]))}te.value=te.value.filter((l=>l!==e.key))}(t)},null,8,["component","onClick"])])))),128))])])),_:3})])),_:3})])),_:3}))}});export{J as default};
1
+ import{defineComponent as e,inject as l,ref as t,computed as n,reactive as a,watch as i,openBlock as u,createBlock as r,unref as o,withCtx as c,createVNode as d,createCommentVNode as s,withKeys as p,createTextVNode as v,toDisplayString as h,createElementBlock as y,Fragment as f,renderList as k,withDirectives as m,vShow as g,mergeProps as b,createElementVNode as _,renderSlot as w}from"vue";import{NGrid as S,NGi as T,NSpace as C,NInputGroup as x,NInput as L,NIcon as j,NButton as F,NTag as O,NCheckbox as D,NEmpty as E,NTree as N}from"naive-ui";import{CloseCircleSharp as I}from"@vicons/ionicons5";import{searchFilterTree as P,getExpandedKeys as $}from"./utils/index.js";import{cloneDeep as R}from"lodash-es";import{SelectItemTypesConfig as A,SelectRoleEnumsConfig as B,SearchTypeConfig as K}from"./types/enums.js";import U from"./components/SearchMultiple.vue.js";import q from"./components/SearchOrgAndStaff.vue.js";import{InjectionSelectPersonEmits as H}from"./constants/index.js";var M;const W={key:0,class:"select-type-tags"},G={key:4,class:"tree-content"},z={key:0},J={class:"c-select-person__scroll",style:{height:"342px"}};var Q=e({__name:"SelectPerson",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:(null==(M=window.getLanguageByCode)?void 0:M.call(window,"10010.1.36"))||"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},searchInner:{type:Boolean,default:!1},searchFilter:{type:Object,default:()=>({})},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])},showSelectType:{type:Boolean,default:!1},roleData:{type:Array,default:()=>[]},roleFields:{type:Object,default:()=>({label:"name",key:"id",children:"children"})},forceShowSelectAll:{type:Boolean}},setup(e,{expose:M}){var Q;const V=e,X={isOpen:!1,multiple:!1,customTitles:["联系人","部门"],itemHeight:250},Y=[{key:"main",label:"选人员"},{key:"dept",label:"选科室"},{key:"role",label:"选角色"}],Z={dept:(null==(Q=window.getLanguageByCode)?void 0:Q.call(window,"10010.1.202"))||"科室",role:"角色"},ee=l(H),le=t(""),te=t(!1),ne=t([]),ae=t([]),ie=t([]),ue=t([]),re=t([]),oe=t(!1),ce=R(function e(l){var t;for(let n=0,a=l.length;n<a;n++){const a=l[n],i=V.wordbook.children||"children";if(null==(t=a[i])?void 0:t.length){const l=Ie(a[i],[]);a.innerItemsNum=l.length,a.innerLeafs=l,a.children=e(a[i])}}return V.showSelectType?l:Pe(l,"")}(V.data)),de=t([]),se=n((()=>!!V.queryLoadChildData)),pe=n((()=>{var e,l;return null!=(l=null==(e=null==V?void 0:V.treeSetting)?void 0:e.checkStrategy)?l:"child"})),ve=n((()=>(null==V?void 0:V.searchFilter)&&Object.keys(null==V?void 0:V.searchFilter).length>0)),he=t("main"),ye=n((()=>ve.value?{...R(X),...V.searchFilter}:R(X))),fe=n((()=>{var e,l;return null!=(l=null==(e=null==V?void 0:V.wordbookChild)?void 0:e.user_expand_keys)?l:[]})),ke=n((()=>{if(V.showSelectType){return function(e,l){let t={};return e.reduce(((e,n)=>(!t[n[l]]&&(t[n[l]]=e.push(n)),e)),[])}([...be.main.filter((e=>(e.itemType=A.PERSON,e[we.value]==B.STAFF))),...be.dept.filter((e=>(e.itemType=A.DEPT,e[we.value]==B.DEPT))),...be.role.filter((e=>(e.itemType=A.ROLE,e)))],"key")}let e=[];return ne.value.forEach((l=>{for(let t=0,n=ue.value.length;t<n;t++){const n=ue.value[t];if(n.key==l){e.push(n);break}}})),e})),me=a({main:[],dept:[],role:[],temp:[]}),ge=a({main:[],dept:[],role:[]}),be=a({main:[],dept:[],role:[]}),_e=a({main:[],dept:[],role:[]}),we=n((()=>{var e;return(null==(e=V.wordbook)?void 0:e.type)||"type"})),Se=n((()=>V.wordbookChild.user_id_obj||V.wordbook.parent_id_obj||Date.now()));function Te(){me.main=me.temp=ce,je(me.temp,null,(e=>{_e.main.push(e.key)})),de.value=_e.main,me.dept=Ce(R(ce),(e=>{_e.dept.push(e.key)})),me.role=xe(R(V.roleData),(e=>{_e.role.push(e.key)}))}function Ce(e,l){return e.filter((e=>{var t;V.showSelectType&&(null==(t=e.children)?void 0:t.length)&&(e.children=Ce(e.children,l));const n=e[we.value]==B.DEPT;return n&&Fe(e,l),n}))}function xe(e,l){const{label:t,key:n,children:a="children"}=V.roleFields;return e.map((e=>{var i;return e.key=e[n],e.label=e.title=e[t],(null==(i=e[a])?void 0:i.length)&&(e.children=xe(e[a],l)),Fe(e,l),e}))}function Le(e,l){var t,n;const a=["main","dept"].includes(l)?Se.value:null==(t=V.roleFields)?void 0:t.key;for(let t=0,i=e.length;t<i;t++){const i=e[t],u=re.value.map((e=>e.key));ge[l].includes(i.key)&&!u.includes(i.key)&&be[l].push({...i,key:i[a]}),(null==(n=i.children)?void 0:n.length)&&Le(i.children,l)}}function je(e,l,t){var n,a;for(let i=0,u=e.length;i<u;i++){const u=e[i];let r=fe.value.reduce(((e,l)=>e+(u[l]?`${u[l]},`:"")),"");u.title_expand_strs=r.slice(0,-1),u.title=Ne(u),u.label=Ne(u),u.parentNode=l,u.key||(u.key=u[V.wordbookChild.user_id_obj]||u[V.wordbook.parent_id_obj]||Date.now()),(null==(n=u.children)?void 0:n.length)?(je(u.children,u,t),De(u)):0===(null==(a=u.children)?void 0:a.length)&&Reflect.deleteProperty(u,"children"),Fe(u,t)}}function Fe(e,l){var t,n;switch(null!=(n=null==(t=null==V?void 0:V.treeSetting)?void 0:t.checkStrategy)?n:"child"){case"child":!function(e,l){e.disabled||e.children||!e.key||l&&l(e)}(e,l);break;case"parent":!function(e,l){e.disabled||e.tempTitle||!e.key||l&&l(e)}(e,l)}}async function Oe(e){if(V.queryLoadChildData){const l=await V.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.title}/${l.tempTitle}`:l.title})))),l}return e}function De(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function Ee({option:e}){var l,t;if((null==(l=e.children)?void 0:l.length)||se.value&&!(null==e?void 0:e.isLeaf)){const l=V.wordbook.user_count_obj&&e[V.wordbook.user_count_obj]||"",t=l?`(${l})`:"",n=`${e.title}${t}`;return d("span",{title:n},[n])}{const l=null!=(t=e.title_expand_strs)?t:"";return d("p",{class:"user_item"},[d("span",{title:e.title},[e.title]),d("span",{class:"user_item_expand",title:l},[l])])}}function Ne(e){return e[V.wordbookChild.user_name_obj]||e[V.wordbook.parent_name_obj]||e.orgName||e.title||""}function Ie(e,l){var t;for(let n=0,a=e.length;n<a;n++){const a=e[n];(null==(t=a.children)?void 0:t.length)?Ie(a.children,l):!a.disabled&&l.push(a)}return l}function Pe(e,l){return e&&0!==e.length?e.map((e=>{var t;const n=Ne(e),a=l?`${n}/${l}`:n;return{...e,tempTitle:l,children:(null==(t=e.children)?void 0:t.length)?Pe(null==e?void 0:e.children,a):[]}})):[]}async function $e(){var e,l;const t=null!=(l=null==(e=null==V?void 0:V.wordbook)?void 0:e.filter_key)?l:"keyword";if(oe.value=!!le.value.trim(),se.value)ie.value=await V.queryTreeSearch(le.value);else{const e=function(){const e={[K.SEARCH_ORG_STAFF]:ve.value,[K.SEARCH_ORG]:V.searchInner},l=Object.keys(e).find((l=>e[l]));return null!=l?l:""}();ie.value=P(e,me.temp,le.value,t)}ae.value=ie.value.length&&le.value?$(ie.value):[]}function Re(e,l){var t,n;switch(null!=(n=null==(t=null==V?void 0:V.treeSetting)?void 0:t.checkStrategy)?n:"child"){case"child":!function(e,l){for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&(!n.children||n.isLeaf)&&(l&&!ne.value.includes(n.key)&&ne.value.push(n.key),!l)){const e=ne.value.findIndex((e=>e===n.key));ne.value.splice(e,1)}n.children&&Re(n.children,l)}}(e,l);break;case"parent":!function(e,l){ne.value=[];for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&!n.tempTitle&&(l&&!ne.value.includes(n.key)&&ne.value.push(n.key),!l)){const e=ne.value.findIndex((e=>e===n.key));ne.value.splice(e,1)}}}(e,l)}}function Ae(e){Re(ie.value,e)}function Be(e){var l;for(let t=0,n=e.length;t<n;t++){const n=e[t],a=re.value.map((e=>e.key));ne.value.includes(n.key)&&!a.includes(n.key)&&ue.value.push({key:n.key,name:n.title,parentName:n.tempTitle,innerItemsNum:n.innerItemsNum,innerLeafs:n.innerLeafs,originItem:n}),(null==(l=n.children)?void 0:l.length)&&Be(n.children)}}function Ke(e){if(V.showSelectType){const l=he.value;ne.value=ge[l]=e}else ne.value=e}function Ue(){Object.keys(ge).forEach((e=>{ge[e]=be[e]=[]})),ne.value=[]}function qe(e){ne.value=e}function He(){le.value="",setTimeout((()=>{$e()}))}return i((()=>V.data),(e=>{!function(){if(Te(),ie.value=me.temp,V.defaultList.length>0)if(se.value)V.defaultList.forEach((e=>ne.value.push(e.key))),ue.value=R(V.defaultList),re.value=R(V.defaultList);else{if(V.showSelectType){const e=he.value;return V.defaultList.forEach((e=>{e.itemType===A.PERSON&&(ge.main.push(e[Se.value]),be.main.push(e)),e.itemType===A.DEPT&&(ge.dept.push(e[Se.value]),be.dept.push(e)),e.itemType===A.ROLE&&(ge.role.push(e[V.roleFields.key]),be.role.push(e))})),void(ne.value=ge[e])}V.defaultList.forEach((e=>ne.value.push(e))),Be(me.temp)}}()}),{immediate:!0}),i((()=>ne),(e=>{if(V.showSelectType){const l=he.value;be[l]=re.value.filter((l=>e.value.includes(l.key))),Le(me[l],l),V.showSelectType?te.value=de.value.every((e=>ne.value.findIndex((l=>l===e))>-1)):te.value=de.value.every((e=>ue.value.findIndex((l=>l.key===e))>-1));const t=ke.value.map((e=>e.key));return ee("check",t),void ee("checkWithLevel",ke.value)}ue.value=re.value.filter((l=>e.value.includes(l.key))),Be(se.value?ie.value:me.temp);const l=ue.value.filter((l=>e.value.includes(l.key)));ee("check",e.value),ee("checkWithLevel",l)}),{deep:!0}),i((()=>le.value),(e=>{e||He()})),M({getCheckWithLevel:function(){var e;if(V.showSelectType)return null!=(e=ke.value)?e:[];const l=ne.value,t=ue.value.filter((e=>l.includes(e.key)));return null!=t?t:[]}}),(l,t)=>(u(),r(o(S),{cols:2,class:"c-select-person"},{default:c((()=>[d(o(T),null,{default:c((()=>[d(o(C),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:c((()=>[d(o(x),{style:{"margin-bottom":"12px"}},{default:c((()=>[s(" clearable "),d(o(L),{class:"search-input",value:le.value,"onUpdate:value":t[0]||(t[0]=e=>le.value=e),placeholder:e.searchPlaceholder,onKeyup:p($e,["enter"])},{suffix:c((()=>[le.value?(u(),r(o(j),{key:0,class:"search-clear",component:o(I),size:"16",onClick:He},null,8,["component"])):s("v-if",!0)])),_:1},8,["value","placeholder","onKeyup"]),d(o(F),{type:"primary",onClick:$e},{default:c((()=>[v(h(e.searchButtonText),1)])),_:1})])),_:1}),e.showSelectType?(u(),y("div",W,[(u(),y(f,null,k(Y,(e=>d(o(O),{round:"",checkable:"",checked:he.value===e.key,key:e.key,"onUpdate:checked":l=>function(e){he.value=e.key,ie.value=me.temp=me[e.key],ne.value=ge[e.key],de.value=_e[e.key]}(e)},{default:c((()=>[v(h(e.label),1)])),_:2},1032,["checked","onUpdate:checked"]))),64))])):s("v-if",!0),e.multiple&&!oe.value?m((u(),r(o(D),{key:1,checked:te.value,"onUpdate:checked":[t[1]||(t[1]=e=>te.value=e),Ae]},{default:c((()=>[v(" 全选 ")])),_:1},8,["checked"])),[[g,e.forceShowSelectAll||de.value.length<1e3]]):s("v-if",!0),s(" 支持选人 "),e.searchInner&&e.multiple&&oe.value&&"parent"===o(pe)?(u(),r(U,{key:2,treeData:ie.value,checkedKeys:ne.value,onNotifyCheck:qe},null,8,["treeData","checkedKeys"])):o(ve)&&oe.value&&"parent"===o(pe)?(u(),y(f,{key:3},[s(" 同时兼容选人和选部门 "),s(" v-else-if=\"isSearchFilter && multiple && isSearch && checkStrategyResult === 'parent'\" "),d(q,{treeData:ie.value,checkedKeys:ne.value,searchFilter:o(ye),isMultiple:e.multiple,onNotifyCheck:qe,onNotifyClear:He},null,8,["treeData","checkedKeys","searchFilter","isMultiple"])],2112)):(u(),y("div",G,[0===ie.value.length?(u(),r(o(E),{key:0,description:"暂无数据"})):(u(),r(o(N),b({key:1,"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":ne.value,"expanded-keys":ae.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>ae.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":ne.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>ne.value=e),data:ie.value,"check-strategy":"child","render-label":Ee},e.treeSetting,{"onUpdate:checkedKeys":Ke,onLoad:Oe}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"]))]))])),_:1})])),_:1}),d(o(T),null,{default:c((()=>[d(o(C),{vertical:"",style:{"padding-left":"12px"}},{default:c((()=>[d(o(C),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:c((()=>[e.showCount?(u(),y("span",z,"已选择:"+h(o(ke).length),1)):s("v-if",!0),e.showClear?(u(),y("span",{key:1,class:"c-select-person__clear-btn",onClick:Ue},"清空")):s("v-if",!0)])),_:1}),_("div",J,[(u(!0),y(f,null,k(o(ke),(t=>(u(),y("span",{class:"c-select-person__tag-item",key:t.key},[s(" 标签插槽 "),w(l.$slots,"tag",{tag:t},(()=>[v(h(t.name)+" "+h(t.parentName?`(${t.parentName})`:"")+" "+h(t.innerItemsNum?`(${t.innerItemsNum}人)`:"")+" "+h(e.showSelectType&&Z[t.itemType]?`(${Z[t.itemType]})`:""),1)])),d(o(j),{class:"tag-close",component:o(I),onClick:e=>function(e){if(V.showSelectType){const l=e.itemType===A.PERSON?"main":e.itemType;return ge[l]=ge[l].filter((l=>l!==e.key)),be[l]=re.value.filter((e=>ge[l].includes(e.key))),Le(me[l],l),void(he.value==l&&(ne.value=ge[l]))}ne.value=ne.value.filter((l=>l!==e.key))}(t)},null,8,["component","onClick"])])))),128))])])),_:3})])),_:3})])),_:3}))}});export{Q as default};
@@ -1 +1 @@
1
- import{defineComponent as e,inject as t,ref as l,reactive as a,computed as n,watch as o,openBlock as u,createBlock as i,unref as c,withCtx as r,createVNode as s,createCommentVNode as d,withKeys as p,createTextVNode as v,toDisplayString as h,createElementVNode as y,createElementBlock as f,Fragment as k,renderList as b,withDirectives as m,vShow as _,mergeProps as g,renderSlot as w}from"vue";import{NGrid as x,NGi as T,NSpace as j,NInputGroup as C,NInput as P,NIcon as S,NButton as K,NTag as L,NCheckbox as O,NEmpty as D,NTree as $}from"naive-ui";import{CloseCircleSharp as A}from"@vicons/ionicons5";import{searchFilterTree as B,getExpandedKeys as F}from"./utils/index.js";import{cloneDeep as U}from"lodash-es";import{SearchTypeConfig as I}from"./types/enums.js";import{InjectionSelectPersonEmits as R}from"./constants/index.js";const q={class:"select-type-tags"},E={class:"tree-content"},N={key:0},G={class:"c-select-person__scroll",style:{height:"342px"}};var H=e({__name:"SelectPersonType",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},searchInner:{type:Boolean,default:!1},searchFilter:{type:Object,default:()=>({})},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])},switchTypeProps:{type:Array,default:()=>[]},switchTypeData:{type:Object,default:()=>({})},tagProps:{type:Object,default:()=>({})},forceShowSelectAll:{type:Boolean}},setup(e,{expose:H}){const W=e,z=t(R),J=l(""),M=l(!1),Q=l([]),V=l([]),X=l([]),Y=l(!1),Z=l([]),ee=l(W.switchTypeProps[0].tabKey),te=l({}),le=l([]),ae=a({}),ne=n((()=>(null==W?void 0:W.searchFilter)&&Object.keys(null==W?void 0:W.searchFilter).length>0)),oe=n((()=>{const e=ee.value,t=W.switchTypeProps.find((t=>t.tabKey==e));return t&&(t.wordbookChild.user_id_obj||t.wordbook.parent_id_obj)||Date.now()}));function ue(e,t){le.value.map((e=>e.key)).forEach((e=>{Q.value.includes(e)||(le.value=le.value.filter((t=>t.key!=e)))})),ie(e)}function ie(e,t){var l;const a=le.value.map((e=>e.key));for(let t=0,n=e.length;t<n;t++){const n=e[t];Q.value.includes(n.key)&&!a.includes(n.key)&&le.value.push({...n,key:n[oe.value]}),(null==(l=n.children)?void 0:l.length)&&ie(n.children)}}function ce(){if(te.value=U(function(e){const t=Object.keys(W.switchTypeData);for(let l=0,a=t.length;l<a;l++)he(t[l],e[t[l]],null,(e=>{ae[t[l]]||(ae[t[l]]=[]),ae[t[l]].push(e.key)}));return e}(W.switchTypeData)),X.value=te.value[ee.value],Z.value=ae[ee.value],W.defaultList.length>0){let e=[];W.defaultList.forEach((t=>{e.push(t)})),Q.value=e}}function re(e,t){var l,a;switch(null!=(a=null==(l=null==W?void 0:W.treeSetting)?void 0:l.checkStrategy)?a:"child"){case"child":!function(e,t){e.disabled||e.children||!e.key||t&&t(e)}(e,t);break;case"parent":!function(e,t){e.disabled||e.tempTitle||!e.key||t&&t(e)}(e,t)}}async function se(e){if(W.queryLoadChildData){const t=await W.queryLoadChildData(e);return t.children&&(t.children=t.children.map((e=>({...e,tempTitle:t.tempTitle?`${t.title}/${t.tempTitle}`:t.title})))),t}return e}function de(e){var t;(null==(t=e.children)?void 0:t.every((e=>e.disabled)))&&(e.disabled=!0)}function pe({option:e}){var t;const l=null!=(t=e.title_expand_strs)?t:"";return s("p",{class:"user_item"},[s("span",{title:e.title},[e.title,v(" "),e.countText?`${e.countText}人`:""]),s("span",{class:"user_item_expand",title:l},[l?`(${l})`:""])])}function ve(e,t){return t[e.wordbookChild.user_name_obj]||t[e.wordbook.parent_name_obj]||t.orgName||t.title||""}function he(e,t,l,a){var n,o,u,i,c;for(let r=0,s=t.length;r<s;r++){const s=t[r],d=W.switchTypeProps.find((t=>t.tabKey==e));if(d){let t=(l?(null==(n=d.wordbookChild)?void 0:n.user_expand_keys)||[]:(null==(o=d.wordbook)?void 0:o.user_expand_keys)||[]).reduce(((e,t)=>e+(s[t]?`${s[t]},`:"")),"");s.title_expand_strs=t.slice(0,-1),s.parentNode=l,s.title=ve(d,s),s.label=ve(d,s),s.tempTitle=l&&l.tempTitle?`${s.title}/${l.tempTitle}}`:s.title,s.countText=s[d.wordbookChild.user_count_obj]||s[d.wordbook.user_count_obj]||"",s.key||(s.key=s[d.wordbookChild.user_id_obj]||s[d.wordbook.parent_id_obj]||Date.now());const r=(null==(u=null==d?void 0:d.wordbook)?void 0:u.children)||"children";if(null==(i=s[r])?void 0:i.length){const t=ye(s[r],[]);s.innerItemsNum=t.length,s.innerLeafs=t,s.children=he(e,s[r],s,a),de(s)}else 0===(null==(c=s[r])?void 0:c.length)&&Reflect.deleteProperty(s,"children");re(s,a)}}return t}function ye(e,t){var l;for(let a=0,n=e.length;a<n;a++){const n=e[a];(null==(l=n.children)?void 0:l.length)?ye(n.children,t):!n.disabled&&t.push(n)}return t}async function fe(){var e,t;const l=W.switchTypeProps.find((e=>e.tabKey==ee.value));if(l){const a=null!=(t=null==(e=null==l?void 0:l.wordbook)?void 0:e.filter_key)?t:"keyword";Y.value=!!J.value.trim();const n=function(){const e={[I.SEARCH_ORG_STAFF]:ne.value,[I.SEARCH_ORG]:W.searchInner},t=Object.keys(e).find((t=>e[t]));return null!=t?t:""}();X.value=B(n,te.value[ee.value],J.value,a),V.value=X.value.length&&J.value?F(X.value):[]}}function ke(e,t){var l,a;switch(null!=(a=null==(l=null==W?void 0:W.treeSetting)?void 0:l.checkStrategy)?a:"child"){case"child":!function(e,t){for(let l=0,a=e.length;l<a;l++){const a=e[l];if(!a.disabled&&(!a.children||a.isLeaf)&&(t&&!Q.value.includes(a.key)&&Q.value.push(a.key),!t)){const e=Q.value.findIndex((e=>e===a.key));Q.value.splice(e,1)}a.children&&ke(a.children,t)}}(e,t);break;case"parent":!function(e,t){Q.value=[];for(let l=0,a=e.length;l<a;l++){const a=e[l];if(!a.disabled&&!a.tempTitle&&(t&&!Q.value.includes(a.key)&&Q.value.push(a.key),!t)){const e=Q.value.findIndex((e=>e===a.key));Q.value.splice(e,1)}}}(e,t)}}function be(e){ke(X.value,e)}function me(e){Q.value=e}function _e(){M.value=Z.value.every((e=>Q.value.findIndex((t=>t===e))>-1))}function ge(){Q.value=le.value=[]}function we(){J.value="",setTimeout((()=>{fe()}))}return o((()=>W.switchTypeData),(e=>{ce()}),{immediate:!0}),o((()=>Q),(e=>{ue(te.value[ee.value],ee.value),_e();const t=le.value.map((e=>e.key));z("check",t),z("checkWithLevel",le.value)}),{immediate:!0,deep:!0}),o((()=>J.value),(e=>{e||we()})),H({getCheckWithLevel:function(){var e;return null!=(e=le.value)?e:[]}}),(t,l)=>(u(),i(c(x),{cols:2,class:"c-select-person"},{default:r((()=>[s(c(T),null,{default:r((()=>[s(c(j),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:r((()=>[s(c(C),{style:{"margin-bottom":"12px"}},{default:r((()=>[d(" clearable "),s(c(P),{class:"search-input",value:J.value,"onUpdate:value":l[0]||(l[0]=e=>J.value=e),placeholder:e.searchPlaceholder,onKeyup:p(fe,["enter"])},{suffix:r((()=>[J.value?(u(),i(c(S),{key:0,class:"search-clear",component:c(A),size:"16",onClick:we},null,8,["component"])):d("v-if",!0)])),_:1},8,["value","placeholder","onKeyup"]),s(c(K),{type:"primary",onClick:fe},{default:r((()=>[v(h(e.searchButtonText),1)])),_:1})])),_:1}),d(" tab类型切换 "),y("div",q,[(u(!0),f(k,null,b(e.switchTypeProps,(e=>(u(),i(c(L),{round:"",checkable:"",checked:ee.value===e.tabKey,key:e.tabKey,"onUpdate:checked":t=>function(e){ee.value=e.tabKey,X.value=te.value[e.tabKey],Z.value=ae[e.tabKey],_e()}(e)},{default:r((()=>[v(h(e.tabName),1)])),_:2},1032,["checked","onUpdate:checked"])))),128))]),e.multiple&&!Y.value?m((u(),i(c(O),{key:0,checked:M.value,"onUpdate:checked":[l[1]||(l[1]=e=>M.value=e),be]},{default:r((()=>[v(" 全选 ")])),_:1},8,["checked"])),[[_,e.forceShowSelectAll||Z.value.length<1e3]]):d("v-if",!0),y("div",E,[0===X.value.length?(u(),i(c(D),{key:0,description:"暂无数据"})):(u(),i(c($),g({key:1,"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":Q.value,"expanded-keys":V.value,"onUpdate:expanded-keys":l[2]||(l[2]=e=>V.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":Q.value,"onUpdate:selected-keys":l[3]||(l[3]=e=>Q.value=e),data:X.value,"check-strategy":"child","render-label":pe},e.treeSetting,{"onUpdate:checkedKeys":me,onLoad:se}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"]))])])),_:1})])),_:1}),s(c(T),null,{default:r((()=>[s(c(j),{vertical:"",style:{"padding-left":"12px"}},{default:r((()=>[s(c(j),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:r((()=>[e.showCount?(u(),f("span",N,"已选择:"+h(le.value.length),1)):d("v-if",!0),e.showClear?(u(),f("span",{key:1,class:"c-select-person__clear-btn",onClick:ge},"清空")):d("v-if",!0)])),_:1}),y("div",G,[(u(!0),f(k,null,b(le.value,(l=>(u(),f("span",{class:"c-select-person__tag-item",key:l.key},[d(" 标签插槽 "),w(t.$slots,"tag",{tag:l},(()=>{var t,a;return[v(h((null==(t=e.tagProps)?void 0:t.title)&&l[e.tagProps.title]?l[e.tagProps.title]:l.title)+" ",1),y("span",null,h((null==(a=e.tagProps)?void 0:a.dept_origin)&&l[e.tagProps.dept_origin]?`(${l[e.tagProps.dept_origin]})`:""),1)]})),s(c(S),{class:"tag-close",component:c(A),onClick:e=>function(e){Q.value=Q.value.filter((t=>t!==e.key)),ue(te.value[ee.value],ee.value)}(l)},null,8,["component","onClick"])])))),128))])])),_:3})])),_:3})])),_:3}))}});export{H as default};
1
+ import{defineComponent as e,inject as l,ref as t,reactive as a,computed as n,watch as o,openBlock as u,createBlock as i,unref as c,withCtx as r,createVNode as s,createCommentVNode as d,withKeys as p,createTextVNode as v,toDisplayString as h,createElementVNode as y,createElementBlock as f,Fragment as k,renderList as b,withDirectives as m,vShow as _,mergeProps as g,renderSlot as w}from"vue";import{NGrid as x,NGi as T,NSpace as C,NInputGroup as j,NInput as P,NIcon as S,NButton as K,NTag as L,NCheckbox as O,NEmpty as D,NTree as $}from"naive-ui";import{CloseCircleSharp as A}from"@vicons/ionicons5";import{searchFilterTree as B,getExpandedKeys as F}from"./utils/index.js";import{cloneDeep as U}from"lodash-es";import{SearchTypeConfig as I}from"./types/enums.js";import{InjectionSelectPersonEmits as R}from"./constants/index.js";var q;const E={class:"select-type-tags"},N={class:"tree-content"},G={key:0},H={class:"c-select-person__scroll",style:{height:"342px"}};var W=e({__name:"SelectPersonType",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:(null==(q=window.getLanguageByCode)?void 0:q.call(window,"10010.1.36"))||"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},searchInner:{type:Boolean,default:!1},searchFilter:{type:Object,default:()=>({})},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])},switchTypeProps:{type:Array,default:()=>[]},switchTypeData:{type:Object,default:()=>({})},tagProps:{type:Object,default:()=>({})},forceShowSelectAll:{type:Boolean}},setup(e,{expose:q}){const W=e,z=l(R),J=t(""),M=t(!1),Q=t([]),V=t([]),X=t([]),Y=t(!1),Z=t([]),ee=t(W.switchTypeProps[0].tabKey),le=t({}),te=t([]),ae=a({}),ne=n((()=>(null==W?void 0:W.searchFilter)&&Object.keys(null==W?void 0:W.searchFilter).length>0)),oe=n((()=>{const e=ee.value,l=W.switchTypeProps.find((l=>l.tabKey==e));return l&&(l.wordbookChild.user_id_obj||l.wordbook.parent_id_obj)||Date.now()}));function ue(e,l){te.value.map((e=>e.key)).forEach((e=>{Q.value.includes(e)||(te.value=te.value.filter((l=>l.key!=e)))})),ie(e)}function ie(e,l){var t;const a=te.value.map((e=>e.key));for(let l=0,n=e.length;l<n;l++){const n=e[l];Q.value.includes(n.key)&&!a.includes(n.key)&&te.value.push({...n,key:n[oe.value]}),(null==(t=n.children)?void 0:t.length)&&ie(n.children)}}function ce(){if(le.value=U(function(e){const l=Object.keys(W.switchTypeData);for(let t=0,a=l.length;t<a;t++)he(l[t],e[l[t]],null,(e=>{ae[l[t]]||(ae[l[t]]=[]),ae[l[t]].push(e.key)}));return e}(W.switchTypeData)),X.value=le.value[ee.value],Z.value=ae[ee.value],W.defaultList.length>0){let e=[];W.defaultList.forEach((l=>{e.push(l)})),Q.value=e}}function re(e,l){var t,a;switch(null!=(a=null==(t=null==W?void 0:W.treeSetting)?void 0:t.checkStrategy)?a:"child"){case"child":!function(e,l){e.disabled||e.children||!e.key||l&&l(e)}(e,l);break;case"parent":!function(e,l){e.disabled||e.tempTitle||!e.key||l&&l(e)}(e,l)}}async function se(e){if(W.queryLoadChildData){const l=await W.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.title}/${l.tempTitle}`:l.title})))),l}return e}function de(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function pe({option:e}){var l;const t=null!=(l=e.title_expand_strs)?l:"";return s("p",{class:"user_item"},[s("span",{title:e.title},[e.title,v(" "),e.countText?`${e.countText}人`:""]),s("span",{class:"user_item_expand",title:t},[t?`(${t})`:""])])}function ve(e,l){return l[e.wordbookChild.user_name_obj]||l[e.wordbook.parent_name_obj]||l.orgName||l.title||""}function he(e,l,t,a){var n,o,u,i,c;for(let r=0,s=l.length;r<s;r++){const s=l[r],d=W.switchTypeProps.find((l=>l.tabKey==e));if(d){let l=(t?(null==(n=d.wordbookChild)?void 0:n.user_expand_keys)||[]:(null==(o=d.wordbook)?void 0:o.user_expand_keys)||[]).reduce(((e,l)=>e+(s[l]?`${s[l]},`:"")),"");s.title_expand_strs=l.slice(0,-1),s.parentNode=t,s.title=ve(d,s),s.label=ve(d,s),s.tempTitle=t&&t.tempTitle?`${s.title}/${t.tempTitle}}`:s.title,s.countText=s[d.wordbookChild.user_count_obj]||s[d.wordbook.user_count_obj]||"",s.key||(s.key=s[d.wordbookChild.user_id_obj]||s[d.wordbook.parent_id_obj]||Date.now());const r=(null==(u=null==d?void 0:d.wordbook)?void 0:u.children)||"children";if(null==(i=s[r])?void 0:i.length){const l=ye(s[r],[]);s.innerItemsNum=l.length,s.innerLeafs=l,s.children=he(e,s[r],s,a),de(s)}else 0===(null==(c=s[r])?void 0:c.length)&&Reflect.deleteProperty(s,"children");re(s,a)}}return l}function ye(e,l){var t;for(let a=0,n=e.length;a<n;a++){const n=e[a];(null==(t=n.children)?void 0:t.length)?ye(n.children,l):!n.disabled&&l.push(n)}return l}async function fe(){var e,l;const t=W.switchTypeProps.find((e=>e.tabKey==ee.value));if(t){const a=null!=(l=null==(e=null==t?void 0:t.wordbook)?void 0:e.filter_key)?l:"keyword";Y.value=!!J.value.trim();const n=function(){const e={[I.SEARCH_ORG_STAFF]:ne.value,[I.SEARCH_ORG]:W.searchInner},l=Object.keys(e).find((l=>e[l]));return null!=l?l:""}();X.value=B(n,le.value[ee.value],J.value,a),V.value=X.value.length&&J.value?F(X.value):[]}}function ke(e,l){var t,a;switch(null!=(a=null==(t=null==W?void 0:W.treeSetting)?void 0:t.checkStrategy)?a:"child"){case"child":!function(e,l){for(let t=0,a=e.length;t<a;t++){const a=e[t];if(!a.disabled&&(!a.children||a.isLeaf)&&(l&&!Q.value.includes(a.key)&&Q.value.push(a.key),!l)){const e=Q.value.findIndex((e=>e===a.key));Q.value.splice(e,1)}a.children&&ke(a.children,l)}}(e,l);break;case"parent":!function(e,l){Q.value=[];for(let t=0,a=e.length;t<a;t++){const a=e[t];if(!a.disabled&&!a.tempTitle&&(l&&!Q.value.includes(a.key)&&Q.value.push(a.key),!l)){const e=Q.value.findIndex((e=>e===a.key));Q.value.splice(e,1)}}}(e,l)}}function be(e){ke(X.value,e)}function me(e){Q.value=e}function _e(){M.value=Z.value.every((e=>Q.value.findIndex((l=>l===e))>-1))}function ge(){Q.value=te.value=[]}function we(){J.value="",setTimeout((()=>{fe()}))}return o((()=>W.switchTypeData),(e=>{ce()}),{immediate:!0}),o((()=>Q),(e=>{ue(le.value[ee.value],ee.value),_e();const l=te.value.map((e=>e.key));z("check",l),z("checkWithLevel",te.value)}),{immediate:!0,deep:!0}),o((()=>J.value),(e=>{e||we()})),q({getCheckWithLevel:function(){var e;return null!=(e=te.value)?e:[]}}),(l,t)=>(u(),i(c(x),{cols:2,class:"c-select-person"},{default:r((()=>[s(c(T),null,{default:r((()=>[s(c(C),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:r((()=>[s(c(j),{style:{"margin-bottom":"12px"}},{default:r((()=>[d(" clearable "),s(c(P),{class:"search-input",value:J.value,"onUpdate:value":t[0]||(t[0]=e=>J.value=e),placeholder:e.searchPlaceholder,onKeyup:p(fe,["enter"])},{suffix:r((()=>[J.value?(u(),i(c(S),{key:0,class:"search-clear",component:c(A),size:"16",onClick:we},null,8,["component"])):d("v-if",!0)])),_:1},8,["value","placeholder","onKeyup"]),s(c(K),{type:"primary",onClick:fe},{default:r((()=>[v(h(e.searchButtonText),1)])),_:1})])),_:1}),d(" tab类型切换 "),y("div",E,[(u(!0),f(k,null,b(e.switchTypeProps,(e=>(u(),i(c(L),{round:"",checkable:"",checked:ee.value===e.tabKey,key:e.tabKey,"onUpdate:checked":l=>function(e){ee.value=e.tabKey,X.value=le.value[e.tabKey],Z.value=ae[e.tabKey],_e()}(e)},{default:r((()=>[v(h(e.tabName),1)])),_:2},1032,["checked","onUpdate:checked"])))),128))]),e.multiple&&!Y.value?m((u(),i(c(O),{key:0,checked:M.value,"onUpdate:checked":[t[1]||(t[1]=e=>M.value=e),be]},{default:r((()=>[v(" 全选 ")])),_:1},8,["checked"])),[[_,e.forceShowSelectAll||Z.value.length<1e3]]):d("v-if",!0),y("div",N,[0===X.value.length?(u(),i(c(D),{key:0,description:"暂无数据"})):(u(),i(c($),g({key:1,"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":Q.value,"expanded-keys":V.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>V.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":Q.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>Q.value=e),data:X.value,"check-strategy":"child","render-label":pe},e.treeSetting,{"onUpdate:checkedKeys":me,onLoad:se}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"]))])])),_:1})])),_:1}),s(c(T),null,{default:r((()=>[s(c(C),{vertical:"",style:{"padding-left":"12px"}},{default:r((()=>[s(c(C),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:r((()=>[e.showCount?(u(),f("span",G,"已选择:"+h(te.value.length),1)):d("v-if",!0),e.showClear?(u(),f("span",{key:1,class:"c-select-person__clear-btn",onClick:ge},"清空")):d("v-if",!0)])),_:1}),y("div",H,[(u(!0),f(k,null,b(te.value,(t=>(u(),f("span",{class:"c-select-person__tag-item",key:t.key},[d(" 标签插槽 "),w(l.$slots,"tag",{tag:t},(()=>{var l,a;return[v(h((null==(l=e.tagProps)?void 0:l.title)&&t[e.tagProps.title]?t[e.tagProps.title]:t.title)+" ",1),y("span",null,h((null==(a=e.tagProps)?void 0:a.dept_origin)&&t[e.tagProps.dept_origin]?`(${t[e.tagProps.dept_origin]})`:""),1)]})),s(c(S),{class:"tag-close",component:c(A),onClick:e=>function(e){Q.value=Q.value.filter((l=>l!==e.key)),ue(le.value[ee.value],ee.value)}(t)},null,8,["component","onClick"])])))),128))])])),_:3})])),_:3})])),_:3}))}});export{W as default};
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,ref as a,computed as l,provide as r,openBlock as o,createBlock as u,resolveDynamicComponent as p,unref as d,mergeProps as n,withCtx as c,createCommentVNode as s,renderSlot as i,normalizeProps as y,guardReactiveProps as f}from"vue";import{InjectionSelectPersonEmits as h}from"./constants/index.js";import m from"./SelectPersonType.vue.js";import v from"./SelectPerson.vue.js";var b=e({__name:"index",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},searchInner:{type:Boolean,default:!1},searchFilter:{type:Object,default:()=>({})},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])},showSelectType:{type:Boolean,default:!1},roleData:{type:Array,default:()=>[]},roleFields:{type:Object,default:()=>({label:"name",key:"id",children:"children"})},switchTypeProps:{type:Array,default:()=>[]},switchTypeData:{type:Object,default:()=>({})},tagProps:{type:Object,default:()=>({})},forceShowSelectAll:{type:Boolean}},emits:["check","checkWithLevel"],setup(e,{expose:b,emit:j}){const g=e,w=t(),S=a(),k=l((()=>{var e;return(null==(e=g.switchTypeProps)?void 0:e.length)>0?m:v})),O=l((()=>Object.assign({},g,w)));r(h,(function(e,...t){j(e,...t)}));return b({getCheckWithLevel:()=>{var e;return null==(e=S.value)?void 0:e.getCheckWithLevel()}}),(e,t)=>(o(),u(p(d(k)),n({ref_key:"selectPersonRef",ref:S},d(O)),{tag:c((t=>[s(" 标签插槽 "),i(e.$slots,"tag",y(f(t)))])),_:3},16))}});export{b as default};
1
+ import{defineComponent as e,useAttrs as t,ref as l,computed as a,provide as o,openBlock as r,createBlock as d,resolveDynamicComponent as n,unref as u,mergeProps as p,withCtx as c,createCommentVNode as i,renderSlot as s,normalizeProps as y,guardReactiveProps as f}from"vue";import{InjectionSelectPersonEmits as h}from"./constants/index.js";import v from"./SelectPersonType.vue.js";import m from"./SelectPerson.vue.js";var g,w=e({__name:"index",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:(null==(g=window.getLanguageByCode)?void 0:g.call(window,"10010.1.36"))||"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},searchInner:{type:Boolean,default:!1},searchFilter:{type:Object,default:()=>({})},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])},showSelectType:{type:Boolean,default:!1},roleData:{type:Array,default:()=>[]},roleFields:{type:Object,default:()=>({label:"name",key:"id",children:"children"})},switchTypeProps:{type:Array,default:()=>[]},switchTypeData:{type:Object,default:()=>({})},tagProps:{type:Object,default:()=>({})},forceShowSelectAll:{type:Boolean}},emits:["check","checkWithLevel"],setup(e,{expose:g,emit:w}){const b=e,j=t(),S=l(),k=a((()=>{var e;return(null==(e=b.switchTypeProps)?void 0:e.length)>0?v:m})),B=a((()=>Object.assign({},b,j)));o(h,(function(e,...t){w(e,...t)}));return g({getCheckWithLevel:()=>{var e;return null==(e=S.value)?void 0:e.getCheckWithLevel()}}),(e,t)=>(r(),d(n(u(k)),p({ref_key:"selectPersonRef",ref:S},u(B)),{tag:c((t=>[i(" 标签插槽 "),s(e.$slots,"tag",y(f(t)))])),_:3},16))}});export{w as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,inject as t,computed as a,watch as i,openBlock as o,createBlock as n,unref as s,normalizeClass as d,withCtx as r,createVNode as u,normalizeStyle as c,createElementVNode as m,createTextVNode as h,renderSlot as p,isRef as f,toDisplayString as v,h as g}from"vue";import{useMessage as b,NModal as x,NCard as w,NButton as L,NCheckbox as y,NSelect as F,NCheckboxGroup as k,NPopover as I,NPopconfirm as A,NIcon as N}from"naive-ui";import{Trash as C}from"@vicons/ionicons5";import{InjectionExportApiConfig as _}from"../constants/index.js";import P from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import S from"../hooks/useAsyncData.js";import{dragFieldCheckList as z}from"../tool.js";import{cloneDeep as E}from"lodash-es";const j={class:"svg-wrap"},H={class:"flex_right"},O=m("div",{class:"tip"},"提示:支持拖动调整字段顺序,字段导出顺序为从左到右,从上到下。",-1),$={class:"flex_between"},T=["title"];var U=e({__name:"ExportModal",props:{visible:{type:Boolean,default:!1},tableListId:{type:String,default:""},curProgram:{type:Object,default:()=>({})},programOptions:{type:Array,default:()=>[]},downLoadFieldList:{type:Array,default:()=>[]},showAllFieldList:{type:Array,default:()=>[]}},emits:["cancelModal","updateCurProgram","updateFieldCheckList","updateShowAllFieldList"],setup(e,{emit:U}){const K=e,M="default",D="860px",B="496px",V={class:"select-export-popover"},q=b(),{deleteTableListExportScheme:G,exportTableListScheme:J}=S(),Q=l(!1),R=l(D),W=l({maxHeight:B,height:B}),X=l(!1),Y=l(!0),Z=l([]),ee=t(_),le=a((()=>K.curProgram.schemeId));function te(){U("updateShowAllFieldList",K.showAllFieldList)}function ae({option:e}){return g("span",e.schemeName)}function ie(e){const l=[g(I,{trigger:"hover",duration:0},{default:()=>e.schemeName,trigger:()=>g("span",{class:"content"},e.schemeName)})],t=[g(A,{placement:"top-start",positiveText:"确认",negativeText:"取消",onPositiveClick:()=>function(e){const{schemeId:l}=K.curProgram;if(l===e.schemeId)return q.warning("当前正在使用该方案,请先切换其他方案再删除");!async function(e){if(!K.tableListId)return q.warning("请传入列表id");try{await G({id:K.tableListId,schemeId:e},ee)&&q.success("删除成功")}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}(e.schemeId)}(e)},{trigger:()=>g(N,{onclick:oe},{default:()=>g(C)}),default:()=>"确定删除该导出方案吗?"})],a=e.schemeId===M?[l]:[l,t];return g("div",{class:"flex-between"},a)}function oe(e){e.stopPropagation()}function ne(e){U("updateCurProgram",e)}function se(){!async function(){if(!K.tableListId)return q.warning("请传入列表id");if(Z.value.length<1)return q.warning("请至少勾选一个字段");try{const{schemeId:e}=K.curProgram,l=K.programOptions.find((l=>l.schemeId===e)),t={fieldKeys:z(K.showAllFieldList,Z.value),lastUsedSchemeName:l?l.schemeName:"",schemeId:l?l.schemeId:"",schemeName:l?l.schemeName:"",tableListId:K.tableListId};await J(t,ee)&&(q.success("导出成功"),re())}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}()}function de(e){var l,t,a;Y.value=!1,Z.value=e?(null==(l=K.showAllFieldList)?void 0:l.map((e=>e.columnName)))||[]:(null==(a=null==(t=K.showAllFieldList)?void 0:t.filter((e=>e.fixedExport)))?void 0:a.map((e=>e.columnName)))||[]}function re(){U("cancelModal"),R.value=D,W.value={height:B,maxHeight:B},Q.value=!1}function ue(){Q.value=!Q.value;let e=document.body.clientHeight;R.value===D?(R.value="100%",W.value.maxHeight=`${e}px`,W.value.height=`${e}px`):(R.value=D,W.value.maxHeight=B,W.value.height=B)}return i((()=>Z.value),(e=>{K.showAllFieldList.length>0&&(Y.value=e.length>0&&e.length<K.showAllFieldList.length,X.value=e.length===K.showAllFieldList.length,U("updateFieldCheckList",e))}),{immediate:!0}),i((()=>K.curProgram),(e=>{e&&function(e){const l=K.programOptions.find((l=>l.schemeId===e));if(l){let t=[];const a=K.downLoadFieldList.filter((e=>e.fixedExport)).map((e=>e.columnName)),i=l.fieldKeys.filter((e=>!a.includes(e)));if(Z.value=[...i,...a],e===M){const e=E(K.downLoadFieldList);return void U("updateShowAllFieldList",e)}Z.value.forEach((e=>{const l=K.downLoadFieldList.find((l=>l.columnName===e));l&&t.push(l)}));const o=K.downLoadFieldList.filter((e=>!Z.value.includes(e.columnName))),n=[...t,...o];U("updateShowAllFieldList",n)}}(e.schemeId)}),{immediate:!0}),(l,t)=>(o(),n(s(x),{class:d(["table-export-field-modal",{"modal-screen":Q.value}]),show:e.visible,maskClosable:!1,width:R.value,bodyStyle:W.value,closable:!1,centered:"",onPositiveClick:se,onNegativeClick:re},{default:r((()=>[u(s(w),{style:c({width:R.value,...W.value}),title:"选择导出字段",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":r((()=>[m("div",j,[m("i",{onClick:ue,class:d(["iconfont-table-export-field",Q.value?"icon-table-export-field-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-export-field-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),m("i",{onClick:re,class:"iconfont-table-export-field icon-table-export-field-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:r((()=>[m("div",H,[u(s(L),{onClick:re},{default:r((()=>[h("取消")])),_:1}),p(l.$slots,"add"),u(s(L),{type:"info",onClick:se},{default:r((()=>[h("导出")])),_:1})])])),default:r((()=>[O,m("header",$,[u(s(y),{checked:X.value,"onUpdate:checked":[t[0]||(t[0]=e=>X.value=e),de],indeterminate:Y.value},{default:r((()=>[h(" 全选 ")])),_:1},8,["checked","indeterminate"]),u(s(F),{style:{width:"200px"},value:s(le),"onUpdate:value":[t[1]||(t[1]=e=>f(le)?le.value=e:null),ne],filterable:"","label-field":"schemeName","value-field":"schemeId","show-checkmark":!1,"render-label":ie,"render-tag":ae,"menu-props":V,options:e.programOptions},null,8,["value","options"])]),u(s(k),{value:Z.value,"onUpdate:value":t[2]||(t[2]=e=>Z.value=e)},{default:r((()=>[u(s(P),{class:"draggable-checkbox-list",list:e.showAllFieldList,animation:"300",itemKey:"columnName",onEnd:te},{item:r((({element:e})=>{var l;return[u(s(y),{disabled:e.fixedExport,class:d(Z.value.includes(e.columnName)?"":"checkbox-disabled"),value:e.columnName,label:null!=(l=e.alias)?l:e.title},{default:r((()=>{var l,t;return[m("span",{title:null!=(l=e.alias)?l:e.title},v(null!=(t=e.alias)?t:e.title),9,T)]})),_:2},1032,["disabled","class","value","label"])]})),_:1},8,["list"])])),_:1},8,["value"])])),_:3},8,["style"])])),_:3},8,["class","show","width","bodyStyle"]))}});export{U as default};
1
+ import{defineComponent as e,ref as l,inject as t,computed as a,watch as i,openBlock as o,createBlock as n,unref as s,normalizeClass as d,withCtx as r,createVNode as u,normalizeStyle as c,createElementVNode as m,createTextVNode as h,renderSlot as p,isRef as f,toDisplayString as v,h as g}from"vue";import{useMessage as b,NModal as w,NCard as x,NButton as L,NCheckbox as y,NSelect as F,NCheckboxGroup as k,NPopover as I,NPopconfirm as A,NIcon as N}from"naive-ui";import{Trash as C}from"@vicons/ionicons5";import{InjectionExportApiConfig as _}from"../constants/index.js";import P from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import S from"../hooks/useAsyncData.js";import{dragFieldCheckList as z}from"../tool.js";import{cloneDeep as E}from"lodash-es";const j={class:"svg-wrap"},H={class:"flex_right"},O=m("div",{class:"tip"},"提示:支持拖动调整字段顺序,字段导出顺序为从左到右,从上到下。",-1),$={class:"flex_between"},T=["title"];var U=e({__name:"ExportModal",props:{visible:{type:Boolean,default:!1},tableListId:{type:String,default:""},curProgram:{type:Object,default:()=>({})},programOptions:{type:Array,default:()=>[]},downLoadFieldList:{type:Array,default:()=>[]},showAllFieldList:{type:Array,default:()=>[]}},emits:["cancelModal","updateCurProgram","updateFieldCheckList","updateShowAllFieldList"],setup(e,{emit:U}){const B=e,K="default",M="860px",D="496px",V={class:"select-export-popover"},q=b(),{deleteTableListExportScheme:G,exportTableListScheme:J}=S(),Q=l(!1),R=l(M),W=l({maxHeight:D,height:D}),X=l(!1),Y=l(!0),Z=l([]),ee=t(_),le=a((()=>B.curProgram.schemeId));function te(){U("updateShowAllFieldList",B.showAllFieldList)}function ae({option:e}){return g("span",e.schemeName)}function ie(e){var l;const t=[g(I,{trigger:"hover",duration:0},{default:()=>e.schemeName,trigger:()=>g("span",{class:"content"},e.schemeName)})],a=[g(A,{placement:"top-start",positiveText:"确认",negativeText:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.28"))||"取消",onPositiveClick:()=>function(e){const{schemeId:l}=B.curProgram;if(l===e.schemeId)return q.warning("当前正在使用该方案,请先切换其他方案再删除");!async function(e){if(!B.tableListId)return q.warning("请传入列表id");try{await G({id:B.tableListId,schemeId:e},ee)&&q.success("删除成功")}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}(e.schemeId)}(e)},{trigger:()=>g(N,{onclick:oe},{default:()=>g(C)}),default:()=>"确定删除该导出方案吗?"})],i=e.schemeId===K?[t]:[t,a];return g("div",{class:"flex-between"},i)}function oe(e){e.stopPropagation()}function ne(e){U("updateCurProgram",e)}function se(){!async function(){if(!B.tableListId)return q.warning("请传入列表id");if(Z.value.length<1)return q.warning("请至少勾选一个字段");try{const{schemeId:e}=B.curProgram,l=B.programOptions.find((l=>l.schemeId===e)),t={fieldKeys:z(B.showAllFieldList,Z.value),lastUsedSchemeName:l?l.schemeName:"",schemeId:l?l.schemeId:"",schemeName:l?l.schemeName:"",tableListId:B.tableListId};await J(t,ee)&&(q.success("导出成功"),re())}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}()}function de(e){var l,t,a;Y.value=!1,Z.value=e?(null==(l=B.showAllFieldList)?void 0:l.map((e=>e.columnName)))||[]:(null==(a=null==(t=B.showAllFieldList)?void 0:t.filter((e=>e.fixedExport)))?void 0:a.map((e=>e.columnName)))||[]}function re(){U("cancelModal"),R.value=M,W.value={height:D,maxHeight:D},Q.value=!1}function ue(){Q.value=!Q.value;let e=document.body.clientHeight;R.value===M?(R.value="100%",W.value.maxHeight=`${e}px`,W.value.height=`${e}px`):(R.value=M,W.value.maxHeight=D,W.value.height=D)}return i((()=>Z.value),(e=>{B.showAllFieldList.length>0&&(Y.value=e.length>0&&e.length<B.showAllFieldList.length,X.value=e.length===B.showAllFieldList.length,U("updateFieldCheckList",e))}),{immediate:!0}),i((()=>B.curProgram),(e=>{e&&function(e){const l=B.programOptions.find((l=>l.schemeId===e));if(l){let t=[];const a=B.downLoadFieldList.filter((e=>e.fixedExport)).map((e=>e.columnName)),i=l.fieldKeys.filter((e=>!a.includes(e)));if(Z.value=[...i,...a],e===K){const e=E(B.downLoadFieldList);return void U("updateShowAllFieldList",e)}Z.value.forEach((e=>{const l=B.downLoadFieldList.find((l=>l.columnName===e));l&&t.push(l)}));const o=B.downLoadFieldList.filter((e=>!Z.value.includes(e.columnName))),n=[...t,...o];U("updateShowAllFieldList",n)}}(e.schemeId)}),{immediate:!0}),(l,t)=>(o(),n(s(w),{class:d(["table-export-field-modal",{"modal-screen":Q.value}]),show:e.visible,maskClosable:!1,width:R.value,bodyStyle:W.value,closable:!1,centered:"",onPositiveClick:se,onNegativeClick:re},{default:r((()=>[u(s(x),{style:c({width:R.value,...W.value}),title:"选择导出字段",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":r((()=>[m("div",j,[m("i",{onClick:ue,class:d(["iconfont-table-export-field",Q.value?"icon-table-export-field-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-export-field-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),m("i",{onClick:re,class:"iconfont-table-export-field icon-table-export-field-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:r((()=>[m("div",H,[u(s(L),{onClick:re},{default:r((()=>{var e;return[h((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.28"))||"取消")]})),_:1}),p(l.$slots,"add"),u(s(L),{type:"info",onClick:se},{default:r((()=>[h("导出")])),_:1})])])),default:r((()=>[O,m("header",$,[u(s(y),{checked:X.value,"onUpdate:checked":[t[0]||(t[0]=e=>X.value=e),de],indeterminate:Y.value},{default:r((()=>[h(" 全选 ")])),_:1},8,["checked","indeterminate"]),u(s(F),{style:{width:"200px"},value:s(le),"onUpdate:value":[t[1]||(t[1]=e=>f(le)?le.value=e:null),ne],filterable:"","label-field":"schemeName","value-field":"schemeId","show-checkmark":!1,"render-label":ie,"render-tag":ae,"menu-props":V,options:e.programOptions},null,8,["value","options"])]),u(s(k),{value:Z.value,"onUpdate:value":t[2]||(t[2]=e=>Z.value=e)},{default:r((()=>[u(s(P),{class:"draggable-checkbox-list",list:e.showAllFieldList,animation:"300",itemKey:"columnName",onEnd:te},{item:r((({element:e})=>{var l;return[u(s(y),{disabled:e.fixedExport,class:d(Z.value.includes(e.columnName)?"":"checkbox-disabled"),value:e.columnName,label:null!=(l=e.alias)?l:e.title},{default:r((()=>{var l,t;return[m("span",{title:null!=(l=e.alias)?l:e.title},v(null!=(t=e.alias)?t:e.title),9,T)]})),_:2},1032,["disabled","class","value","label"])]})),_:1},8,["list"])])),_:1},8,["value"])])),_:3},8,["style"])])),_:3},8,["class","show","width","bodyStyle"]))}});export{U as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as a,reactive as t,inject as l,watch as o,openBlock as r,createBlock as i,unref as s,withCtx as c,createVNode as u,createElementVNode as m,createTextVNode as d,createElementBlock as n,Fragment as p,renderList as v,toDisplayString as f}from"vue";import{useMessage as h,NModal as j,NCard as g,NIcon as b,NButton as N,NRadioGroup as y,NRadio as P,NForm as _,NFormItem as x,NInput as k}from"naive-ui";import{CloseOutline as w}from"@vicons/ionicons5";import{InjectionExportApiConfig as I}from"../constants/index.js";import S from"../hooks/useAsyncData.js";import{dragFieldCheckList as C}from"../tool.js";import{cloneDeep as L}from"lodash-es";const A={class:"svg-wrap"},M={class:"flex_right"},O={class:"save-project-content"};var U=e({__name:"SaveProjectModal",props:{visible:{type:Boolean,default:!1},tableListId:{type:String,default:""},programOptions:{type:Array,default:()=>[]},curProgram:{type:Object,default:()=>({})},showAllFieldList:{type:Array,default:()=>[]}},emits:["cancelSaveModal"],setup(e,{emit:U}){const z=e,F=h(),{saveTableListExportScheme:K}=S(),q={projectName:{required:!0,message:"请输入方案名称",trigger:["input","blur"]}},B=[{value:"updateProject",label:"更新方案"},{value:"addProject",label:"新增方案"}],D=a(null),E=t({projectName:""}),R=a(),T=a([]),$=l(I);function G(e){R.value=e}function H(){var e;null==(e=D.value)||e.validate((async e=>{if(e)return;if(function(){const e=E.projectName.trim();let a=[];if("addProject"===R.value&&(a=z.programOptions.map((e=>e.schemeName))),"updateProject"===R.value){const{schemeName:e}=z.curProgram;a=z.programOptions.filter((a=>a.schemeName!==e)).map((e=>e.schemeName))}return!!a.includes(e)&&(F.warning(`已存在${e}的方案名称`),!0)}())return;const a=function(){const e=E.projectName.trim(),{fieldKeys:a,schemeId:t}=z.curProgram;let l={fieldKeys:C(z.showAllFieldList,a),lastUsedSchemeName:e,schemeId:"",schemeName:e,tableListId:z.tableListId};return"updateProject"===R.value&&(l.schemeId=t),l}();await K(a,$)&&(F.success("保存并导出成功"),U("cancelSaveModal"))}))}function J(){U("cancelSaveModal")}return o((()=>z.curProgram),(async e=>{if("default"===e.schemeId)T.value=B.filter((e=>"addProject"===e.value)),R.value="addProject",E.projectName="";else T.value=L(B),R.value="updateProject",E.projectName=e.schemeName}),{immediate:!0,deep:!0}),(a,t)=>(r(),i(s(j),{class:"table-export-field-modal",show:e.visible,maskClosable:!1,"positive-text":"确认","negative-text":"取消",onPositiveClick:H,onNegativeClick:J},{default:c((()=>[u(s(g),{title:"导出并存为方案",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":c((()=>[m("div",A,[u(s(b),{component:s(w),size:"24",onClick:J},null,8,["component"])])])),footer:c((()=>[m("div",M,[u(s(N),{onClick:J},{default:c((()=>[d("取消")])),_:1}),u(s(N),{type:"info",onClick:H},{default:c((()=>[d("确认")])),_:1})])])),default:c((()=>[m("div",O,[u(s(y),{value:R.value,"onUpdate:value":[t[0]||(t[0]=e=>R.value=e),G],name:"radiogroup"},{default:c((()=>[(r(!0),n(p,null,v(T.value,(e=>(r(),i(s(P),{key:e.value,value:e.value},{default:c((()=>[d(f(e.label),1)])),_:2},1032,["value"])))),128))])),_:1},8,["value"]),u(s(_),{ref_key:"formRef",ref:D,"label-placement":"left",rules:q,model:E},{default:c((()=>[u(s(x),{label:"方案名称",path:"projectName"},{default:c((()=>[u(s(k),{value:E.projectName,"onUpdate:value":t[1]||(t[1]=e=>E.projectName=e),placeholder:"请输入方案名称",clearable:"",maxlength:"100"},null,8,["value"])])),_:1})])),_:1},8,["model"])])])),_:1})])),_:1},8,["show"]))}});export{U as default};
1
+ import{defineComponent as e,ref as a,reactive as t,inject as l,watch as o,openBlock as r,createBlock as i,unref as u,withCtx as c,createVNode as s,createElementVNode as n,createTextVNode as d,createElementBlock as m,Fragment as p,renderList as v,toDisplayString as f}from"vue";import{useMessage as g,NModal as h,NCard as j,NIcon as y,NButton as b,NRadioGroup as N,NRadio as w,NForm as P,NFormItem as _,NInput as x}from"naive-ui";import{CloseOutline as k}from"@vicons/ionicons5";import{InjectionExportApiConfig as C}from"../constants/index.js";import L from"../hooks/useAsyncData.js";import{dragFieldCheckList as I}from"../tool.js";import{cloneDeep as S}from"lodash-es";const A={class:"svg-wrap"},M={class:"flex_right"},O={class:"save-project-content"};var B=e({__name:"SaveProjectModal",props:{visible:{type:Boolean,default:!1},tableListId:{type:String,default:""},programOptions:{type:Array,default:()=>[]},curProgram:{type:Object,default:()=>({})},showAllFieldList:{type:Array,default:()=>[]}},emits:["cancelSaveModal"],setup(e,{emit:B}){const U=e,z=g(),{saveTableListExportScheme:F}=L(),K={projectName:{required:!0,message:"请输入方案名称",trigger:["input","blur"]}},q=[{value:"updateProject",label:"更新方案"},{value:"addProject",label:"新增方案"}],D=a(null),E=t({projectName:""}),R=a(),T=a([]),$=l(C);function G(e){R.value=e}function H(){var e;null==(e=D.value)||e.validate((async e=>{if(e)return;if(function(){const e=E.projectName.trim();let a=[];if("addProject"===R.value&&(a=U.programOptions.map((e=>e.schemeName))),"updateProject"===R.value){const{schemeName:e}=U.curProgram;a=U.programOptions.filter((a=>a.schemeName!==e)).map((e=>e.schemeName))}return!!a.includes(e)&&(z.warning(`已存在${e}的方案名称`),!0)}())return;const a=function(){const e=E.projectName.trim(),{fieldKeys:a,schemeId:t}=U.curProgram;let l={fieldKeys:I(U.showAllFieldList,a),lastUsedSchemeName:e,schemeId:"",schemeName:e,tableListId:U.tableListId};return"updateProject"===R.value&&(l.schemeId=t),l}();await F(a,$)&&(z.success("保存并导出成功"),B("cancelSaveModal"))}))}function J(){B("cancelSaveModal")}return o((()=>U.curProgram),(async e=>{if("default"===e.schemeId)T.value=q.filter((e=>"addProject"===e.value)),R.value="addProject",E.projectName="";else T.value=S(q),R.value="updateProject",E.projectName=e.schemeName}),{immediate:!0,deep:!0}),(a,t)=>{var l;return r(),i(u(h),{class:"table-export-field-modal",show:e.visible,maskClosable:!1,"positive-text":"确认","negative-text":(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.28"))||"取消",onPositiveClick:H,onNegativeClick:J},{default:c((()=>[s(u(j),{title:"导出并存为方案",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":c((()=>[n("div",A,[s(u(y),{component:u(k),size:"24",onClick:J},null,8,["component"])])])),footer:c((()=>[n("div",M,[s(u(b),{onClick:J},{default:c((()=>{var e;return[d((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.28"))||"取消")]})),_:1}),s(u(b),{type:"info",onClick:H},{default:c((()=>[d("确认")])),_:1})])])),default:c((()=>[n("div",O,[s(u(N),{value:R.value,"onUpdate:value":[t[0]||(t[0]=e=>R.value=e),G],name:"radiogroup"},{default:c((()=>[(r(!0),m(p,null,v(T.value,(e=>(r(),i(u(w),{key:e.value,value:e.value},{default:c((()=>[d(f(e.label),1)])),_:2},1032,["value"])))),128))])),_:1},8,["value"]),s(u(P),{ref_key:"formRef",ref:D,"label-placement":"left",rules:K,model:E},{default:c((()=>[s(u(_),{label:"方案名称",path:"projectName"},{default:c((()=>[s(u(x),{value:E.projectName,"onUpdate:value":t[1]||(t[1]=e=>E.projectName=e),placeholder:"请输入方案名称",clearable:"",maxlength:"100"},null,8,["value"])])),_:1})])),_:1},8,["model"])])])),_:1})])),_:1},8,["show"])}}});export{B as default};
@@ -1 +1 @@
1
- import{WidgetTypeEnums as l}from"../../../types/enums.js";const e=[{label:"为空",value:"NULL"},{label:"不为空",value:"NOT_NULL"},{label:"等于",value:"IN"},{label:"今天",value:"TODAY"},{label:"明天",value:"TOMORROW"},{label:"昨天",value:"YESTERDAY"},{label:"本周",value:"THIS_WEEK"},{label:"下周",value:"NEXT_WEEK"},{label:"上周",value:"UP_WEEK"},{label:"本月",value:"THIS_MONTH"},{label:"下月",value:"NEXT_MONTH"},{label:"上月",value:"UP_MONTH"},{label:"本季度",value:"THIS_SEASON"},{label:"下季度",value:"NEXT_SEASON"},{label:"上季度",value:"UP_SEASON"},{label:"本年",value:"THIS_YEAR"},{label:"下年",value:"NEXT_YEAR"},{label:"上年",value:"UP_YEAR"},{label:"大于",value:"BIG"},{label:"小于",value:"LESS"},{label:"大于等于",value:"BIGEQ"},{label:"小于等于",value:"LESSEQ"}],a=[{type:"DATE",options:e},{type:"DATETIME",options:e},{type:"TEXT",options:[{label:"为空",value:"NULL"},{label:"不为空",value:"NOT_NULL"},{label:"包含",value:"CL"},{label:"不包含",value:"NC"},{label:"等于",value:"EQ"},{label:"不等于",value:"NEQ"}]},{type:"NUMBER",options:[{label:"为空",value:"NULL"},{label:"不为空",value:"NOT_NULL"},{label:"等于",value:"EQ"},{label:"大于",value:"BIG"},{label:"小于",value:"LESS"}]}],E={TEXT:l.INPUT,SELECT:l.INPUT,NUMBER:l.INPUT_NUMBER,DATE:l.DATE,DATETIME:l.DATE_TIME};export{a as filterConditionTypeOptions,E as typeMappingOptions};
1
+ import{WidgetTypeEnums as l}from"../../../types/enums.js";var e,a,o,n,d,w,i,u,g,v,L,t,E,B,y,C,T,b,c,N,S,_,U,A,I,O,p,M,R,s,D,H;const P=[{label:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.338"))||"为空",value:"NULL"},{label:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.339"))||"不为空",value:"NOT_NULL"},{label:(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.317"))||"等于",value:"IN"},{label:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.134"))||"今天",value:"TODAY"},{label:(null==(d=window.getLanguageByCode)?void 0:d.call(window,"10010.1.300"))||"明天",value:"TOMORROW"},{label:(null==(w=window.getLanguageByCode)?void 0:w.call(window,"10010.1.132"))||"昨天",value:"YESTERDAY"},{label:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.47"))||"本周",value:"THIS_WEEK"},{label:(null==(u=window.getLanguageByCode)?void 0:u.call(window,"10010.1.323"))||"下周",value:"NEXT_WEEK"},{label:(null==(g=window.getLanguageByCode)?void 0:g.call(window,"10010.1.324"))||"上周",value:"UP_WEEK"},{label:(null==(v=window.getLanguageByCode)?void 0:v.call(window,"10010.1.48"))||"本月",value:"THIS_MONTH"},{label:(null==(L=window.getLanguageByCode)?void 0:L.call(window,"10010.1.325"))||"下月",value:"NEXT_MONTH"},{label:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.326"))||"上月",value:"UP_MONTH"},{label:(null==(E=window.getLanguageByCode)?void 0:E.call(window,"10010.1.327"))||"本季度",value:"THIS_SEASON"},{label:(null==(B=window.getLanguageByCode)?void 0:B.call(window,"10010.1.328"))||"下季度",value:"NEXT_SEASON"},{label:(null==(y=window.getLanguageByCode)?void 0:y.call(window,"10010.1.329"))||"上季度",value:"UP_SEASON"},{label:(null==(C=window.getLanguageByCode)?void 0:C.call(window,"10010.1.330"))||"本年",value:"THIS_YEAR"},{label:(null==(T=window.getLanguageByCode)?void 0:T.call(window,"10010.1.331"))||"下年",value:"NEXT_YEAR"},{label:"上年",value:"UP_YEAR"},{label:(null==(b=window.getLanguageByCode)?void 0:b.call(window,"10010.1.319"))||"大于",value:"BIG"},{label:(null==(c=window.getLanguageByCode)?void 0:c.call(window,"10010.1.320"))||"小于",value:"LESS"},{label:(null==(N=window.getLanguageByCode)?void 0:N.call(window,"10010.1.321"))||"大于等于",value:"BIGEQ"},{label:(null==(S=window.getLanguageByCode)?void 0:S.call(window,"10010.1.322"))||"小于等于",value:"LESSEQ"}],X=[{type:"DATE",options:P},{type:"DATETIME",options:P},{type:"TEXT",options:[{label:(null==(_=window.getLanguageByCode)?void 0:_.call(window,"10010.1.338"))||"为空",value:"NULL"},{label:(null==(U=window.getLanguageByCode)?void 0:U.call(window,"10010.1.339"))||"不为空",value:"NOT_NULL"},{label:(null==(A=window.getLanguageByCode)?void 0:A.call(window,"10010.1.340"))||"包含",value:"CL"},{label:(null==(I=window.getLanguageByCode)?void 0:I.call(window,"10010.1.341"))||"不包含",value:"NC"},{label:(null==(O=window.getLanguageByCode)?void 0:O.call(window,"10010.1.317"))||"等于",value:"EQ"},{label:(null==(p=window.getLanguageByCode)?void 0:p.call(window,"10010.1.318"))||"不等于",value:"NEQ"}]},{type:"NUMBER",options:[{label:(null==(M=window.getLanguageByCode)?void 0:M.call(window,"10010.1.338"))||"为空",value:"NULL"},{label:(null==(R=window.getLanguageByCode)?void 0:R.call(window,"10010.1.339"))||"不为空",value:"NOT_NULL"},{label:(null==(s=window.getLanguageByCode)?void 0:s.call(window,"10010.1.317"))||"等于",value:"EQ"},{label:(null==(D=window.getLanguageByCode)?void 0:D.call(window,"10010.1.319"))||"大于",value:"BIG"},{label:(null==(H=window.getLanguageByCode)?void 0:H.call(window,"10010.1.320"))||"小于",value:"LESS"}]}],Y={TEXT:l.INPUT,SELECT:l.INPUT,NUMBER:l.INPUT_NUMBER,DATE:l.DATE,DATETIME:l.DATE_TIME};export{X as filterConditionTypeOptions,Y as typeMappingOptions};
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as l,reactive as a,ref as i,provide as t,toRef as n,openBlock as o,createElementBlock as s,createVNode as d,unref as r,withCtx as c,createElementVNode as p,createCommentVNode as u,Fragment as f,renderList as m,normalizeClass as v,toDisplayString as y,createBlock as C,withDirectives as g,createTextVNode as h,vShow as b}from"vue";import{useMessage as k,NSpin as A,NInput as I,NIcon as L,NButton as _,NSelect as w,NTooltip as N}from"naive-ui";import{CloseOutline as x,AddOutline as S,AddCircleSharp as B}from"@vicons/ionicons5";import D from"./ValueCfg.vue.js";import{DataTypeEnums as U}from"../../types/enums.js";import{useDisplayCategory as E}from"../classify-filter/hooks/useDisplayCategory.js";import{useBiConditions as V}from"./hooks/useBiConditions.js";import{InjectionClassifyFilterList as j}from"../../constants/index.js";const O={class:"searchConditionByApi_wrapper"},F={class:"class-filter-content"},z={key:0,class:"item-name"},Q=p("span",{class:"label"},"筛选分类名称:",-1),R={key:1,class:"quickSearch-content"},q=p("span",{class:"label"},"父类名称:",-1),T=["onClick"],G=["onDblclick"],P={class:"s-content"},J={key:2,class:"item-name"},K=p("span",{class:"label"}," 过滤条件: ",-1),M=p("span",null,"添加",-1),H={class:"select-item-list"},W={class:"index-span"},X=["onClick"],Y={class:"filter-expression"},Z=p("span",null,"筛选器逻辑编辑,不设置默认为AND",-1),$=p("span",null,"例子 (1 AND 2) OR 3",-1);var ee=e({__name:"index",props:{actionList_prop:{type:Object,default:()=>({})},conditionList:{type:Array,default:()=>[]},tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},showItemName:{type:Boolean,default:!0},hideAddBtn:{type:Boolean,default:!1}},emits:["saveAdd","cancelSaveAdd"],setup(e,{expose:ee,emit:le}){const ae=e,ie=k(),te={class:"classify-fieldkey-popover"},ne=["IN","BIG","LESS","BIGEQ","LESSEQ"],oe=["CL","NC","EQ","NEQ"],se=["EQ","BIG","LESS"],de=l(),re=a({className:"",displayCategory:"",filterConditions:[]}),ce=i(!1),pe=i(),ue=i(),fe=i(ae.actionList_prop.sqlExpression||"");t(j,n(re,"filterConditions"));const{State:me,isEnableAddDisplayCategory:ve,editDisplayCategory:ye,handleDisplayCategorySelect:Ce,handleDisplayCategoryRemove:ge,handleDisplayCategoryAdd:he,handlerBlur:be,initDisplayCategories:ke}=E(n(re,"displayCategory"),{conditionList:ae.conditionList},ie),{State:Ae,paramOptions:Ie,addFilterCondition:Le,delFilterCondition:_e,updateKey:we,updateCondition:Ne,getParamCfg:xe,initFilterConditions:Se,getRawFilterConditions:Be}=V(n(re,"filterConditions"),ae.searchFieldList,U.API);function De(e){return[...ne,...oe,...se].includes(e)}function Ue(){he((()=>{setTimeout((()=>{ue.value&&ue.value.focus()}),100)}))}function Ee(){re.className="",re.displayCategory="",re.filterConditions=[]}async function Ve(){var e;try{if(Ee(),ce.value=!0,ke(de.displayCategoryList,ae.actionList_prop.displayCategory||void 0),ae.actionList_prop){re.className=ae.actionList_prop.name,await Se(ae.tableId,null!=(e=ae.actionList_prop.conObj)?e:[]);re.filterConditions.length<1&&Ie.value&&Ie.value.length>0&&Le()}}finally{ce.value=!1}}return Ve(),ee({handleInitConditions:Ve,saveAdd:function(){new Promise((e=>{re.className||!ae.showItemName?0!==re.filterConditions.length?re.filterConditions.some((({fieldId:e,fieldType:l,value:a,values:i,con:t})=>!e||!t||De(t)&&!a&&!i.length))?ie.warning("请补充完整条件内容"):e(!0):ie.warning("请至少添加一个条件"):ie.warning("请输入分类名称")})).then((()=>{let e;var l;"edit"===ae.actionList_prop.from&&(l=ae.actionList_prop.sid,e=null==ae?void 0:ae.conditionList.find((e=>e.sid===l)));const a={displayCategory:re.displayCategory,name:re.className||"",conObj:Be(),sqlExpression:fe.value},i={id:e?e.sid:"",tableId:ae.tableId,setting:JSON.stringify(a)};le("saveAdd",i,!1)}))},cancelSaveAdd:function(){Ee(),le("cancelSaveAdd")},addAction:Le,checkActionList:function(){return re.filterConditions.every((e=>!e.field_key))}}),(l,a)=>(o(),s("div",O,[d(r(A),{show:ce.value},{default:c((()=>[p("div",F,[e.showItemName?(o(),s("div",z,[Q,d(r(I),{value:re.className,"onUpdate:value":a[0]||(a[0]=e=>re.className=e),placeholder:"请输入分类名称",style:{width:"250px"},maxlength:"10"},null,8,["value"])])):u("v-if",!0),e.showItemName?(o(),s("div",R,[q,(o(!0),s(f,null,m(r(me).displayCategories,((e,l)=>(o(),s("div",{class:"parent-name",key:l,onClick:l=>function(e){Ce(e)}(e)},[e.disabled?(o(),s("div",{key:0,class:v(["edit-tag",{"edit-tag-select":e.value===re.displayCategory&&e.disabled}]),onDblclick:l=>function(e){e.disabled=!1,setTimeout((()=>{pe.value.length>0&&pe.value[0].focus()}),100)}(e)},[p("div",P,y(e.value),1),d(r(L),{component:r(x),class:"anticon-close",size:"20",onClick:a=>r(ge)(l,e)},null,8,["component","onClick"])],42,G)):(o(),C(r(I),{key:1,ref_for:!0,ref_key:"parentInputRef",ref:pe,class:"parent-input",style:{width:"100px"},disabled:e.disabled,onBlur:()=>e.disabled=!0,value:e.value,"onUpdate:value":l=>e.value=l,maxlength:20},null,8,["disabled","onBlur","value","onUpdate:value"]))],8,T)))),128)),r(ve)?(o(),s(f,{key:0},[g(d(r(_),{class:"ant-btn",icon:"plus",dashed:"",onClick:Ue},{default:c((()=>[d(r(L),{component:r(S),size:"20"},null,8,["component"]),h(" "+y("添加父类"))])),_:1},512),[[b,!r(me).showAdd]]),g(d(r(I),{ref_key:"parentInputAddRef",ref:ue,class:"parent-input",value:r(me).addDisplayCategory,"onUpdate:value":a[1]||(a[1]=e=>r(me).addDisplayCategory=e),valueModifiers:{trim:!0},style:{width:"100px"},onBlur:r(be),maxlength:20},null,8,["value","onBlur"]),[[b,r(me).showAdd]])],64)):u("v-if",!0)])):u("v-if",!0),e.hideAddBtn?u("v-if",!0):(o(),s("div",J,[K,p("span",{class:"addAction",onClick:a[2]||(a[2]=(...e)=>r(Le)&&r(Le)(...e)),style:{cursor:"pointer"}},[d(r(L),{component:r(B),class:"blue",size:"18"},null,8,["component"]),M])])),p("ul",H,[(o(!0),s(f,null,m(re.filterConditions,((e,l)=>(o(),s("li",{key:l},[p("span",W,y(l+1),1),u(" 选择 field_key "),d(r(w),{class:"form-item",placeholder:"请选择",value:e.fieldId,"menu-props":te,to:"body",filterable:"",options:r(Ie),"onUpdate:value":e=>r(we)(l,e)},null,8,["value","options","onUpdate:value"]),u(" 选择 关系 "),e.fieldId?(o(),C(r(w),{key:0,class:"form-item",placeholder:"请选择",value:e.con,to:"body",filterable:"",options:e.biTypeOptions,"onUpdate:value":e=>r(Ne)(l,e)},null,8,["value","options","onUpdate:value"])):u("v-if",!0),u(" 自定义 "),e.fieldId&&e.con&&De(e.con)?(o(),C(D,{key:1,modelValue:e.value,"onUpdate:modelValue":l=>e.value=l,modelValues:e.values,"onUpdate:modelValues":l=>e.values=l,"param-cfg":r(xe)(e.fieldId)},null,8,["modelValue","onUpdate:modelValue","modelValues","onUpdate:modelValues","param-cfg"])):u("v-if",!0),d(r(N),{title:"删除",trigger:"hover"},{trigger:c((()=>[p("i",{onClick:e=>r(_e)(l),class:"iconfont-table-filter delete-item-icon icon-table-filter-menzhenyishengzhananniuqingchu"},null,8,X)])),default:c((()=>[h(" 删除 ")])),_:2},1024)])))),128))]),p("div",Y,[Z,$,d(r(I),{class:"textarea",value:fe.value,"onUpdate:value":a[3]||(a[3]=e=>fe.value=e),type:"textarea",placeholder:"请输入表达式"},null,8,["value"])])])])),_:1},8,["show"])]))}});export{ee as default};
1
+ import{createElementVNode as e,defineComponent as l,useAttrs as a,reactive as i,ref as n,provide as t,toRef as o,openBlock as s,createElementBlock as d,createVNode as r,unref as u,withCtx as c,createCommentVNode as p,Fragment as v,renderList as f,normalizeClass as y,toDisplayString as m,createBlock as g,withDirectives as C,createTextVNode as h,vShow as w}from"vue";import{useMessage as b,NSpin as k,NInput as L,NIcon as A,NButton as I,NSelect as B,NTooltip as _}from"naive-ui";import{CloseOutline as N,AddOutline as x,AddCircleSharp as S}from"@vicons/ionicons5";import D from"./ValueCfg.vue.js";import{DataTypeEnums as U}from"../../types/enums.js";import{useDisplayCategory as E}from"../classify-filter/hooks/useDisplayCategory.js";import{useBiConditions as V}from"./hooks/useBiConditions.js";import{InjectionClassifyFilterList as j}from"../../constants/index.js";var O,F;const z={class:"searchConditionByApi_wrapper"},Q={class:"class-filter-content"},R={key:0,class:"item-name"},q=e("span",{class:"label"},"筛选分类名称:",-1),T={key:1,class:"quickSearch-content"},G=e("span",{class:"label"},"父类名称:",-1),P=["onClick"],J=["onDblclick"],K={class:"s-content"},M={key:2,class:"item-name"},H=e("span",{class:"label"}," 过滤条件: ",-1),W=e("span",null,(null==(O=window.getLanguageByCode)?void 0:O.call(window,"10010.1.86"))||"添加",-1),X={class:"select-item-list"},Y={class:"index-span"},Z=["onClick"],$={class:"filter-expression"},ee=e("span",null,(null==(F=window.getLanguageByCode)?void 0:F.call(window,"10010.1.272"))||"筛选器逻辑编辑,不设置默认为AND",-1),le=e("span",null,"例子 (1 AND 2) OR 3",-1);var ae=l({__name:"index",props:{actionList_prop:{type:Object,default:()=>({})},conditionList:{type:Array,default:()=>[]},tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},showItemName:{type:Boolean,default:!0},hideAddBtn:{type:Boolean,default:!1}},emits:["saveAdd","cancelSaveAdd"],setup(l,{expose:O,emit:F}){const ae=l,ie=b(),ne={class:"classify-fieldkey-popover"},te=["IN","BIG","LESS","BIGEQ","LESSEQ"],oe=["CL","NC","EQ","NEQ"],se=["EQ","BIG","LESS"],de=a(),re=i({className:"",displayCategory:"",filterConditions:[]}),ue=n(!1),ce=n(),pe=n(),ve=n(ae.actionList_prop.sqlExpression||"");t(j,o(re,"filterConditions"));const{State:fe,isEnableAddDisplayCategory:ye,editDisplayCategory:me,handleDisplayCategorySelect:ge,handleDisplayCategoryRemove:Ce,handleDisplayCategoryAdd:he,handlerBlur:we,initDisplayCategories:be}=E(o(re,"displayCategory"),{conditionList:ae.conditionList},ie),{State:ke,paramOptions:Le,addFilterCondition:Ae,delFilterCondition:Ie,updateKey:Be,updateCondition:_e,getParamCfg:Ne,initFilterConditions:xe,getRawFilterConditions:Se}=V(o(re,"filterConditions"),ae.searchFieldList,U.API);function De(e){return[...te,...oe,...se].includes(e)}function Ue(){he((()=>{setTimeout((()=>{pe.value&&pe.value.focus()}),100)}))}function Ee(){re.className="",re.displayCategory="",re.filterConditions=[]}async function Ve(){var e;try{if(Ee(),ue.value=!0,be(de.displayCategoryList,ae.actionList_prop.displayCategory||void 0),ae.actionList_prop){re.className=ae.actionList_prop.name,await xe(ae.tableId,null!=(e=ae.actionList_prop.conObj)?e:[]);re.filterConditions.length<1&&Le.value&&Le.value.length>0&&Ae()}}finally{ue.value=!1}}return Ve(),O({handleInitConditions:Ve,saveAdd:function(){new Promise((e=>{re.className||!ae.showItemName?0!==re.filterConditions.length?re.filterConditions.some((({fieldId:e,fieldType:l,value:a,values:i,con:n})=>!e||!n||De(n)&&!a&&!i.length))?ie.warning("请补充完整条件内容"):e(!0):ie.warning("请至少添加一个条件"):ie.warning("请输入分类名称")})).then((()=>{let e;var l;"edit"===ae.actionList_prop.from&&(l=ae.actionList_prop.sid,e=null==ae?void 0:ae.conditionList.find((e=>e.sid===l)));const a={displayCategory:re.displayCategory,name:re.className||"",conObj:Se(),sqlExpression:ve.value},i={id:e?e.sid:"",tableId:ae.tableId,setting:JSON.stringify(a)};F("saveAdd",i,!1)}))},cancelSaveAdd:function(){Ee(),F("cancelSaveAdd")},addAction:Ae,checkActionList:function(){return re.filterConditions.every((e=>!e.field_key))}}),(a,i)=>(s(),d("div",z,[r(u(k),{show:ue.value},{default:c((()=>[e("div",Q,[l.showItemName?(s(),d("div",R,[q,r(u(L),{value:re.className,"onUpdate:value":i[0]||(i[0]=e=>re.className=e),placeholder:"请输入分类名称",style:{width:"250px"},maxlength:"10"},null,8,["value"])])):p("v-if",!0),l.showItemName?(s(),d("div",T,[G,(s(!0),d(v,null,f(u(fe).displayCategories,((l,a)=>(s(),d("div",{class:"parent-name",key:a,onClick:e=>function(e){ge(e)}(l)},[l.disabled?(s(),d("div",{key:0,class:y(["edit-tag",{"edit-tag-select":l.value===re.displayCategory&&l.disabled}]),onDblclick:e=>function(e){e.disabled=!1,setTimeout((()=>{ce.value.length>0&&ce.value[0].focus()}),100)}(l)},[e("div",K,m(l.value),1),r(u(A),{component:u(N),class:"anticon-close",size:"20",onClick:e=>u(Ce)(a,l)},null,8,["component","onClick"])],42,J)):(s(),g(u(L),{key:1,ref_for:!0,ref_key:"parentInputRef",ref:ce,class:"parent-input",style:{width:"100px"},disabled:l.disabled,onBlur:()=>l.disabled=!0,value:l.value,"onUpdate:value":e=>l.value=e,maxlength:20},null,8,["disabled","onBlur","value","onUpdate:value"]))],8,P)))),128)),u(ye)?(s(),d(v,{key:0},[C(r(u(I),{class:"ant-btn",icon:"plus",dashed:"",onClick:Ue},{default:c((()=>[r(u(A),{component:u(x),size:"20"},null,8,["component"]),h(" "+m("添加父类"))])),_:1},512),[[w,!u(fe).showAdd]]),C(r(u(L),{ref_key:"parentInputAddRef",ref:pe,class:"parent-input",value:u(fe).addDisplayCategory,"onUpdate:value":i[1]||(i[1]=e=>u(fe).addDisplayCategory=e),valueModifiers:{trim:!0},style:{width:"100px"},onBlur:u(we),maxlength:20},null,8,["value","onBlur"]),[[w,u(fe).showAdd]])],64)):p("v-if",!0)])):p("v-if",!0),l.hideAddBtn?p("v-if",!0):(s(),d("div",M,[H,e("span",{class:"addAction",onClick:i[2]||(i[2]=(...e)=>u(Ae)&&u(Ae)(...e)),style:{cursor:"pointer"}},[r(u(A),{component:u(S),class:"blue",size:"18"},null,8,["component"]),W])])),e("ul",X,[(s(!0),d(v,null,f(re.filterConditions,((l,a)=>{var i,n,t;return s(),d("li",{key:a},[e("span",Y,m(a+1),1),p(" 选择 field_key "),r(u(B),{class:"form-item",placeholder:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.147"))||"请选择",value:l.fieldId,"menu-props":ne,to:"body",filterable:"",options:u(Le),"onUpdate:value":e=>u(Be)(a,e)},null,8,["value","options","onUpdate:value"]),p(" 选择 关系 "),l.fieldId?(s(),g(u(B),{key:0,class:"form-item",placeholder:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.147"))||"请选择",value:l.con,to:"body",filterable:"",options:l.biTypeOptions,"onUpdate:value":e=>u(_e)(a,e)},null,8,["value","options","onUpdate:value"])):p("v-if",!0),p(" 自定义 "),l.fieldId&&l.con&&De(l.con)?(s(),g(D,{key:1,modelValue:l.value,"onUpdate:modelValue":e=>l.value=e,modelValues:l.values,"onUpdate:modelValues":e=>l.values=e,"param-cfg":u(Ne)(l.fieldId)},null,8,["modelValue","onUpdate:modelValue","modelValues","onUpdate:modelValues","param-cfg"])):p("v-if",!0),r(u(_),{title:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.215"))||"删除",trigger:"hover"},{trigger:c((()=>[e("i",{onClick:e=>u(Ie)(a),class:"iconfont-table-filter delete-item-icon icon-table-filter-menzhenyishengzhananniuqingchu"},null,8,Z)])),default:c((()=>[h(" 删除 ")])),_:2},1024)])})),128))]),e("div",$,[ee,le,r(u(L),{class:"textarea",value:ve.value,"onUpdate:value":i[3]||(i[3]=e=>ve.value=e),type:"textarea",placeholder:"请输入表达式"},null,8,["value"])])])])),_:1},8,["show"])]))}});export{ae as default};