cnhis-design-vue 3.2.15-beta.2 → 3.2.15-beta.8

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 (187) hide show
  1. package/README.md +87 -87
  2. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  3. package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
  4. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  5. package/es/components/branch-notice/index.d.ts +393 -6
  6. package/es/components/branch-notice/src/BranchNotice.vue.d.ts +369 -6
  7. package/es/components/branch-notice/src/BranchNotice.vue2.js +1 -1
  8. package/es/components/branch-notice/src/canstants.d.ts +2 -1
  9. package/es/components/branch-notice/src/canstants.js +1 -1
  10. package/es/components/branch-notice/src/components/NoticeItem.vue.d.ts +168 -44
  11. package/es/components/branch-notice/src/components/NoticeItem.vue.js +1 -0
  12. package/es/components/branch-notice/src/components/NoticeItem.vue2.js +1 -0
  13. package/es/components/branch-notice/src/components/NoticeItemAside.vue.d.ts +74 -5
  14. package/es/components/branch-notice/src/components/NoticeItemAside.vue.js +1 -0
  15. package/es/components/branch-notice/src/components/NoticeItemAside.vue2.js +1 -0
  16. package/es/components/branch-notice/src/components/NoticeOperationList.vue.js +1 -0
  17. package/es/components/branch-notice/src/components/NoticeOperationList.vue2.js +1 -0
  18. package/es/components/branch-notice/src/drawLine.js +1 -1
  19. package/es/components/branch-notice/src/hooks/useTheme.d.ts +1 -0
  20. package/es/components/branch-notice/src/hooks/useTheme.js +1 -0
  21. package/es/components/branch-notice/src/types.d.ts +22 -4
  22. package/es/components/branch-notice/style/index.css +1 -1
  23. package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -1
  24. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  25. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  26. package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
  27. package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
  28. package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +1 -1
  29. package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -1
  30. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  31. package/es/components/expand-field/src/index.vue2.js +1 -1
  32. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  33. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  34. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  35. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
  36. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  37. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  38. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
  39. package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
  40. package/es/components/fabric-chart/src/hooks/index.js +1 -1
  41. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -1
  42. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
  43. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  44. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  45. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  47. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  48. package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
  49. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  50. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  51. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  52. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  53. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  54. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
  55. package/es/components/fabric-chart/src/hooks/{temperature/useShadow.d.ts → useShadow.d.ts} +2 -2
  56. package/es/components/fabric-chart/src/hooks/useShadow.js +1 -0
  57. package/es/components/fabric-chart/src/utils/index.d.ts +1 -0
  58. package/es/components/fabric-chart/src/utils/index.js +1 -1
  59. package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
  60. package/es/components/field-set/src/FieldColor.vue2.js +1 -1
  61. package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
  62. package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
  63. package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
  64. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  65. package/es/components/field-set/src/TableStyle.vue2.js +1 -1
  66. package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -1
  67. package/es/components/field-set/src/components/edit-filter.vue2.js +1 -1
  68. package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
  69. package/es/components/field-set/src/constants/filter.js +1 -1
  70. package/es/components/field-set/src/constants/index.js +1 -1
  71. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
  72. package/es/components/form-config/src/hooks/useLocale.js +1 -1
  73. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  74. package/es/components/form-render/src/components/renderer/combination/combination.js +1 -1
  75. package/es/components/form-render/src/components/renderer/complex.js +1 -1
  76. package/es/components/form-render/src/components/renderer/date.js +1 -1
  77. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  78. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  79. package/es/components/form-render/src/components/renderer/select.js +1 -1
  80. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  81. package/es/components/form-render/src/components/renderer/text.js +1 -1
  82. package/es/components/form-render/src/components/renderer/textarea.js +1 -1
  83. package/es/components/form-render/src/hooks/useAnchor.js +1 -1
  84. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
  85. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  86. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
  87. package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
  88. package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
  89. package/es/components/form-render/src/utils/index.js +1 -1
  90. package/es/components/iho-chat/index.d.ts +261 -27
  91. package/es/components/iho-chat/src/Index.vue.d.ts +261 -27
  92. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  93. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +1 -0
  94. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  95. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +2 -0
  96. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  97. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +2 -0
  98. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +11 -2
  99. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +4 -1
  100. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  101. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +1 -0
  102. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +34 -34
  103. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  104. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +4 -1
  105. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  106. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +2 -0
  107. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
  108. package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +2 -1
  109. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  110. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +203 -4
  111. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  112. package/es/components/iho-chat/src/components/Video.vue.d.ts +1 -0
  113. package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
  114. package/es/components/iho-chat/src/components/userItemRender.d.ts +18 -0
  115. package/es/components/iho-chat/src/components/userItemRender.js +1 -0
  116. package/es/components/iho-chat/src/hooks/useData.d.ts +4 -2
  117. package/es/components/iho-chat/src/hooks/useData.js +1 -1
  118. package/es/components/iho-chat/src/hooks/useVideo.d.ts +1 -0
  119. package/es/components/iho-chat/src/hooks/useWebSocket.js +1 -1
  120. package/es/components/iho-chat/src/types/index.d.ts +2 -0
  121. package/es/components/iho-chat/src/utils/index.js +1 -1
  122. package/es/components/iho-chat/style/index.css +1 -1
  123. package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/dynamicFilter.vue2.js +1 -1
  124. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  125. package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +1 -1
  126. package/es/components/index.css +1 -1
  127. package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -1
  128. package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -1
  129. package/es/components/map/src/Map.vue2.js +1 -1
  130. package/es/components/quick-search/src/index.vue2.js +1 -1
  131. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  132. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
  133. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
  134. package/es/components/scale-view/src/hooks/scaleview-methods.js +1 -1
  135. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  136. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  137. package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
  138. package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
  139. package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +1 -1
  140. package/es/components/table-filter/src/components/bi-filter/helpers/options.js +1 -1
  141. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1 -1
  142. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  143. package/es/components/template-render/src/components/index.d.ts +23 -23
  144. package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +1 -1
  145. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -1
  146. package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -1
  147. package/es/env.d.ts +25 -25
  148. package/es/shared/assets/img/ai__avatar.png.js +1 -1
  149. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  150. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  151. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  152. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  153. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  154. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  155. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  156. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  157. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  158. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  159. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  160. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  161. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  162. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  163. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  164. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  165. package/es/shared/assets/img/failure.png.js +1 -1
  166. package/es/shared/assets/img/logo.png.js +1 -1
  167. package/es/shared/assets/img/no-permission.png.js +1 -1
  168. package/es/shared/assets/img/nodata.png.js +1 -1
  169. package/es/shared/assets/img/notfound.png.js +1 -1
  170. package/es/shared/assets/img/qr.png.js +1 -1
  171. package/es/shared/assets/img/success.png.js +1 -1
  172. package/es/shared/assets/img/table_style_2.png.js +1 -1
  173. package/es/shared/assets/img/video.png.js +1 -1
  174. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  175. package/es/shared/assets/img/xb_big.png.js +1 -1
  176. package/es/shared/assets/img/xb_small.png.js +1 -1
  177. package/es/shared/hooks/useLevelSearchCascader.js +1 -1
  178. package/es/shared/package.json.js +1 -1
  179. package/package.json +2 -2
  180. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  181. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  182. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  183. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  184. package/es/components/fabric-chart/src/hooks/temperature/useShadow.js +0 -1
  185. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  186. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  187. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -1 +1 @@
1
- import{defineComponent as e,computed as a,ref as n,watch as t,nextTick as l,openBlock as i,createElementBlock as o,renderSlot as d,createVNode as r,unref as u,withCtx as s,mergeProps as w,createElementVNode as g,normalizeClass as p,createBlock as f,resolveDynamicComponent as c,createCommentVNode as v,createTextVNode as y,Fragment as m,renderList as _,toDisplayString as x,h as I}from"vue";import{isArray as C,isString as L,isNumber as h,isFunction as B,isObject as b,pick as k}from"lodash-es";import{NPopover as P,NImage as E,NDivider as U,NSpace as H,NButton as z,NTag as T,NEllipsis as j}from"naive-ui";import F from"../../../../form-render/index.js";const N={class:"c-info-header__patient"},R={class:"c-info-header__patientHeader"},$={key:0,class:"c-info-header__patientHeader--name"},S={key:1,class:"c-info-header__patientHeader--sex"},V={key:2,class:"c-info-header__patientHeader--age"};var D=e({__name:"index",props:{patientInfo:{default:()=>({})},patientEditable:{type:Boolean}},setup(e){const D=e,M=a((()=>D.patientInfo&&C(D.patientInfo.tagList)?D.patientInfo.tagList.filter((e=>e.render||L(e.content)&&e.content)):[])),O={warning:"#fcc200",info:"rgba(45, 122, 255, 0.1)"},W={warning:"#fff",info:"#2563F4"};function q({type:e="warning"}){return{color:O[e],textColor:W[e]}}function A(e){return()=>L(e)||h(e)?e:B(e)?e():b(e)?I(e):null}const G=n(!1),J=a((()=>{var e,a,n,t,l,i,o,d,r,u,s,w,g,p,f,c;return D.patientEditable?[{val_key:"name",is_null:"0",is_empty:"0",alias:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.116"))||"姓名",html_type:"INPUT",...D.patientInfo.nameProps},{val_key:"sex",alias:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.122"))||"性别",html_type:"SELECT",is_null:"0",option:[{text:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.205"))||"未知",value:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.205"))||"未知"},{text:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.203"))||"男",value:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.203"))||"男"},{text:(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.204"))||"女",value:(null==(d=window.getLanguageByCode)?void 0:d.call(window,"10010.1.204"))||"女"}],...D.patientInfo.sexProps},{val_key:"age",alias:"年龄",html_type:"INPUT_NUMBER",is_null:"0",is_empty:"0",decoratorProps:{style:{flex:2}},...D.patientInfo.ageProps,suffixConfig:{alias:"年龄单位",is_null:"0",val_key:"ageUnit",html_type:"SELECT",decoratorProps:{style:{flex:1}},option:[{value:(null==(r=window.getLanguageByCode)?void 0:r.call(window,"10010.1.144"))||"天",text:(null==(u=window.getLanguageByCode)?void 0:u.call(window,"10010.1.144"))||"天"},{value:(null==(s=window.getLanguageByCode)?void 0:s.call(window,"10010.1.347"))||"月",text:(null==(w=window.getLanguageByCode)?void 0:w.call(window,"10010.1.347"))||"月"},{value:"岁",text:"岁"},{value:(null==(g=window.getLanguageByCode)?void 0:g.call(window,"10010.1.350"))||"小时",text:(null==(p=window.getLanguageByCode)?void 0:p.call(window,"10010.1.350"))||"小时"},{value:"分",text:"分"},{value:(null==(f=window.getLanguageByCode)?void 0:f.call(window,"10010.1.346"))||"周",text:(null==(c=window.getLanguageByCode)?void 0:c.call(window,"10010.1.346"))||"周"}],...D.patientInfo.ageUnitProps}}]:[]})),K=n();async function Q(){K.value&&(await K.value.validate(),Object.assign(D.patientInfo,k(K.value.getFormValues(),["name","sex","age","ageUnit"])),G.value=!1)}return t(G,(async e=>{await l(),e&&K.value&&K.value.setFormValues(D.patientInfo||{})})),(a,n)=>(i(),o("section",N,[d(a.$slots,"avatar",{},(()=>[r(u(P),null,{trigger:s((()=>[r(u(E),w({style:{"border-radius":"50%"},width:36,height:36,"preview-disabled":"",src:e.patientInfo.avatar},e.patientInfo.avatarProps),null,16,["src"])])),default:s((()=>[r(u(E),w({width:200,"preview-disabled":"",src:e.patientInfo.avatarPreview||e.patientInfo.avatar},e.patientInfo.avatarPreviewProps),null,16,["src"])])),_:1})])),g("section",null,[g("header",R,[r(u(P),{disabled:!e.patientEditable,trigger:"manual",placement:"bottom",show:G.value},{trigger:s((()=>{var a;return[g("section",{class:p(["c-info-header__patientHeaderWrapper",{"in-edit":G.value}]),onDblclick:n[0]||(n[0]=a=>e.patientEditable&&(G.value=!0))},[e.patientInfo.name?(i(),o("div",$,[(i(),f(c(A(e.patientInfo.name))))])):v("v-if",!0),e.patientInfo.sex?(i(),o("div",S,[y(" / "),(i(),f(c(A(e.patientInfo.sex))))])):v("v-if",!0),null!=e.patientInfo.age?(i(),o("div",V,[y(" / "),(i(),f(c(A(e.patientInfo.age)))),(i(),f(c(A(null!=(a=e.patientInfo.ageUnit)?a:"岁"))))])):v("v-if",!0)],34)]})),default:s((()=>[r(u(F),{column:"6",size:"small","label-placement":"left",style:{width:"200px",margin:"4px 0 -8px 0"},"field-list":u(J),ref_key:"formRenderRef",ref:K},null,8,["field-list"]),r(u(U),{style:{margin:"8px -14px",width:"calc(100% + 28px)"}}),r(u(H),{justify:"end"},{default:s((()=>[r(u(z),{size:"small",onClick:n[1]||(n[1]=e=>G.value=!1)},{default:s((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.32"))||"取消")]})),_:1}),r(u(z),{size:"small",type:"info",onClick:Q},{default:s((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.428"))||"确认")]})),_:1})])),_:1})])),_:1},8,["disabled","show"]),d(a.$slots,"tags",{tagList:u(M)},(()=>[(i(!0),o(m,null,_(e.patientInfo.tagList||[],(e=>(i(),f(u(T),w({key:e.content,size:"medium",bordered:!1,color:q(e)},e),{default:s((()=>[e.render?(i(),f(c(e.render),{key:0})):(i(),f(u(j),{key:1,style:{"max-width":"96px"}},{default:s((()=>[y(x(e.content),1)])),_:2},1024))])),_:2},1040,["color"])))),128))]))]),d(a.$slots,"avatarInfo")])]))}});export{D as default};
1
+ import{defineComponent as e,computed as a,ref as n,watch as t,nextTick as l,openBlock as i,createElementBlock as o,renderSlot as d,createVNode as r,unref as u,withCtx as s,mergeProps as w,createElementVNode as g,normalizeClass as p,createBlock as f,resolveDynamicComponent as c,createCommentVNode as v,createTextVNode as y,Fragment as m,renderList as _,toDisplayString as x,h as I}from"vue";import{isArray as C,isString as L,isNumber as h,isFunction as B,isObject as b,pick as k}from"lodash-es";import{NPopover as P,NImage as E,NDivider as U,NSpace as H,NButton as z,NTag as T,NEllipsis as j}from"naive-ui";import F from"../../../../form-render/index.js";const N={class:"c-info-header__patient"},R={class:"c-info-header__patientHeader"},$={key:0,class:"c-info-header__patientHeader--name"},S={key:1,class:"c-info-header__patientHeader--sex"},V={key:2,class:"c-info-header__patientHeader--age"};var D=e({__name:"index",props:{patientInfo:{default:()=>({})},patientEditable:{type:Boolean}},setup(e){const D=e,M=a((()=>D.patientInfo&&C(D.patientInfo.tagList)?D.patientInfo.tagList.filter((e=>e.render||L(e.content)&&e.content)):[])),O={warning:"#fcc200",info:"rgba(45, 122, 255, 0.1)"},W={warning:"#fff",info:"#2563F4"};function q({type:e="warning"}){return{color:O[e],textColor:W[e]}}function A(e){return()=>L(e)||h(e)?e:B(e)?e():b(e)?I(e):null}const G=n(!1),J=a((()=>{var e,a,n,t,l,i,o,d,r,u,s,w,g,p,f,c;return D.patientEditable?[{val_key:"name",is_null:"0",is_empty:"0",alias:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.116"))||"姓名",html_type:"INPUT",...D.patientInfo.nameProps},{val_key:"sex",alias:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.122"))||"性别",html_type:"SELECT",is_null:"0",option:[{text:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.205"))||"未知",value:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.205"))||"未知"},{text:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.203"))||"男",value:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.203"))||"男"},{text:(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.204"))||"女",value:(null==(d=window.getLanguageByCode)?void 0:d.call(window,"10010.1.204"))||"女"}],...D.patientInfo.sexProps},{val_key:"age",alias:"年龄",html_type:"INPUT_NUMBER",is_null:"0",is_empty:"0",decoratorProps:{style:{flex:2}},...D.patientInfo.ageProps,suffixConfig:{alias:"年龄单位",is_null:"0",val_key:"ageUnit",html_type:"SELECT",decoratorProps:{style:{flex:1}},option:[{value:(null==(r=window.getLanguageByCode)?void 0:r.call(window,"10010.1.144"))||"天",text:(null==(u=window.getLanguageByCode)?void 0:u.call(window,"10010.1.144"))||"天"},{value:(null==(s=window.getLanguageByCode)?void 0:s.call(window,"10010.1.347"))||"月",text:(null==(w=window.getLanguageByCode)?void 0:w.call(window,"10010.1.347"))||"月"},{value:"岁",text:"岁"},{value:(null==(g=window.getLanguageByCode)?void 0:g.call(window,"10010.1.350"))||"小时",text:(null==(p=window.getLanguageByCode)?void 0:p.call(window,"10010.1.350"))||"小时"},{value:"分",text:"分"},{value:(null==(f=window.getLanguageByCode)?void 0:f.call(window,"10010.1.346"))||"周",text:(null==(c=window.getLanguageByCode)?void 0:c.call(window,"10010.1.346"))||"周"}],...D.patientInfo.ageUnitProps}}]:[]})),K=n();async function Q(){K.value&&(await K.value.validate(),Object.assign(D.patientInfo,k(K.value.getFormValues(),["name","sex","age","ageUnit"])),G.value=!1)}return t(G,(async e=>{await l(),e&&K.value&&K.value.setFormValues(D.patientInfo||{})})),(a,n)=>(i(),o("section",N,[d(a.$slots,"avatar",{},(()=>[r(u(P),null,{trigger:s((()=>[r(u(E),w({style:{"border-radius":"50%"},width:36,height:36,"preview-disabled":"",src:e.patientInfo.avatar},e.patientInfo.avatarProps),null,16,["src"])])),default:s((()=>[r(u(E),w({width:200,"preview-disabled":"",src:e.patientInfo.avatarPreview||e.patientInfo.avatar},e.patientInfo.avatarPreviewProps),null,16,["src"])])),_:1})])),g("section",null,[g("header",R,[r(u(P),{disabled:!e.patientEditable,trigger:"manual",placement:"bottom",show:G.value},{trigger:s((()=>{var a;return[g("section",{class:p(["c-info-header__patientHeaderWrapper",{"in-edit":G.value}]),onDblclick:n[0]||(n[0]=a=>e.patientEditable&&(G.value=!0))},[e.patientInfo.name?(i(),o("div",$,[(i(),f(c(A(e.patientInfo.name))))])):v("v-if",!0),e.patientInfo.sex?(i(),o("div",S,[y(" / "),(i(),f(c(A(e.patientInfo.sex))))])):v("v-if",!0),null!=e.patientInfo.age?(i(),o("div",V,[y(" / "),(i(),f(c(A(e.patientInfo.age)))),(i(),f(c(A(null!=(a=e.patientInfo.ageUnit)?a:"岁"))))])):v("v-if",!0)],34)]})),default:s((()=>[r(u(F),{column:"6",size:"small","label-placement":"left",style:{width:"200px",margin:"4px 0 -8px 0"},"field-list":u(J),ref_key:"formRenderRef",ref:K},null,8,["field-list"]),r(u(U),{style:{margin:"8px -14px",width:"calc(100% + 28px)"}}),r(u(H),{justify:"end"},{default:s((()=>[r(u(z),{size:"small",onClick:n[1]||(n[1]=e=>G.value=!1)},{default:s((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.28"))||"取消")]})),_:1}),r(u(z),{size:"small",type:"info",onClick:Q},{default:s((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.428"))||"确认")]})),_:1})])),_:1})])),_:1},8,["disabled","show"]),d(a.$slots,"tags",{tagList:u(M)},(()=>[(i(!0),o(m,null,_(e.patientInfo.tagList||[],(e=>(i(),f(u(T),w({key:e.content,size:"medium",bordered:!1,color:q(e)},e),{default:s((()=>[e.render?(i(),f(c(e.render),{key:0})):(i(),f(u(j),{key:1,style:{"max-width":"96px"}},{default:s((()=>[y(x(e.content),1)])),_:2},1024))])),_:2},1040,["color"])))),128))]))]),d(a.$slots,"avatarInfo")])]))}});export{D as default};
@@ -1 +1 @@
1
- import{defineComponent,computed,ref,watch,openBlock,createElementBlock,normalizeClass,normalizeStyle,unref,createElementVNode,createVNode,withCtx,Fragment,renderList,toDisplayString,createBlock,createCommentVNode,nextTick}from"vue";import{NSpace,NIcon}from"naive-ui";import{ArrowUndoSharp}from"@vicons/ionicons5";import InputNumber from"./InputNumber.vue.js";import{useDraggable}from"@vueuse/core";import{getNumber}from"../utils/index.js";const _hoisted_1={class:"keys"},_hoisted_2=["onClick"],_hoisted_3=["onClick"],_hoisted_4={class:"btns"},_hoisted_5=["onClick"],_hoisted_6={class:"inputs"},_hoisted_7={class:"inputs-right"},_hoisted_8=createElementVNode("hr",null,null,-1);var _sfc_main=defineComponent({__name:"NumberPanel",props:{defaultValue:{type:Number},value:{type:Number},mode:{type:String},positionInitialValue:{type:Object,default:()=>({x:0,y:0})},moveOffset:{type:Object,default:()=>({x:0,y:0})},drag:{type:Boolean,default:!1}},emits:["change"],setup(__props,{emit:emit}){const props=__props,NUMBERKEYS="1234567890.",DAYS=[3,7,14,30],DOSENUMBERKEYS="123/456*789-0.+",CALCULATIONSYMBOLS=["+","-","*","/"],isNumber=computed((()=>"number"===props.mode)),isDay=computed((()=>"day"===props.mode&&!isNumber.value)),isDose=computed((()=>"dose"===props.mode&&!isNumber.value)),numberKeys=computed((()=>(isDose.value?DOSENUMBERKEYS:NUMBERKEYS).split(""))),days=ref(DAYS),doses=ref([2,3,4,5,6,7,8]),inputValue=ref(""),integerValue=ref(),numeratorValue=ref(),denominatorValue=ref(),inputValueStatus=ref("success"),numeratorValueStatus=ref("success"),denominatorValueStatus=ref("success"),keyboardRef=ref(null),inputRef=ref(null),style=init();function init(){if(props.defaultValue&&(inputValue.value=props.defaultValue.toString()),props.drag){const{x:e,y:t,style:a}=useDraggable(keyboardRef,{initialValue:props.positionInitialValue,onMove:(e,t)=>{var a,u,n,l;e.x+=null!=(u=null==(a=props.moveOffset)?void 0:a.x)?u:0,e.y+=null!=(l=null==(n=props.moveOffset)?void 0:n.y)?l:0}});return a}}async function setFocus(){var e,t,a;const u=null==(a=null==(t=null==(e=inputRef.value)?void 0:e.$childrenRefs)?void 0:t.$refs)?void 0:a.inputElRef;await nextTick(),u.focus()}function keydown(key){switch(key){case"Undo":updateValue(key);break;case"Enter":if(!validator())return void(inputValueStatus.value="error");emit("change",eval(inputValue.value)),setFocus();break;default:"number"==typeof key?(inputValue.value=key.toString(),setInputValueStatus(),setFocus()):updateValue(key)}}function onKeydown(e){["Enter"].includes(e.key)&&keydown("Enter")}async function updateValue(e){var t,a,u;const n=null==(u=null==(a=null==(t=inputRef.value)?void 0:t.$childrenRefs)?void 0:a.$refs)?void 0:u.inputElRef,{selectionStart:l,selectionEnd:o}=n,r=inputValue.value.split("");if("Undo"===e){const e=l===o?1:o-l,t=l===o?l-1:l;inputValue.value&&t>-1&&r.splice(t,e)}else r.splice(l,o-l,e);inputValue.value=r.join(""),await nextTick(),n.focus();const s="Undo"===e?l?o>l?l:l-1:0:l+1;n.setSelectionRange(s,s),setInputValueStatus()}function validator(){if(!inputValue.value)return!1;if(CALCULATIONSYMBOLS.slice(2).includes(inputValue.value[0]))return!1;if(CALCULATIONSYMBOLS.includes(inputValue.value[inputValue.value.length-1]))return!1;const e=[];let t=[];const a=inputValue.value.split("");a.forEach(((u,n)=>{CALCULATIONSYMBOLS.includes(u)?(e.push(t.join("")),t=[]):(t.push(u),n===a.length-1&&e.push(t.join("")))}));return!!e.every(((e,t)=>0===t&&!e||/^\d*(.\d+)?$/.test(e)))}function updateFraction(e){setInputStatus(inputValue,inputValueStatus)&&(inputValue.value=(Math.round(+inputValue.value*(1/e)*100)/100).toString(),setInputValueStatus())}function calculateFraction(){if(!setInputStatus(inputValue,inputValueStatus)||!setInputStatus(numeratorValue,numeratorValueStatus,!0)||!setInputStatus(denominatorValue,denominatorValueStatus,!0))return;const e=getNumber(integerValue.value)+getNumber(numeratorValue.value)/getNumber(denominatorValue.value);inputValue.value=(Math.round(+inputValue.value*e*100)/100).toString(),setInputValueStatus()}function setInputStatus(e,t,a){if((a||e.value&&"."!==e.value)&&(!a||e.value))return!0;t.value="error"}function setInputValueStatus(){inputValueStatus.value=inputValue.value?"success":"error"}return watch((()=>props.value),(e=>inputValue.value=(e||"").toString()),{immediate:!0}),(e,t)=>(openBlock(),createElementBlock("div",{class:normalizeClass(["c-keyboard",{isFixed:__props.drag}]),ref_key:"keyboardRef",ref:keyboardRef,style:normalizeStyle(unref(style)),onKeydown:onKeydown},[createElementVNode("div",{class:normalizeClass(["left",{isDose:unref(isDose)}])},[createVNode(InputNumber,{ref_key:"inputRef",ref:inputRef,modelValue:inputValue.value,"onUpdate:modelValue":t[0]||(t[0]=e=>inputValue.value=e),status:inputValueStatus.value,"onUpdate:status":t[1]||(t[1]=e=>inputValueStatus.value=e)},null,8,["modelValue","status"]),createElementVNode("div",_hoisted_1,[createVNode(unref(NSpace),{class:"margin-offset","wrap-item":!1},{default:withCtx((()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(numberKeys),(e=>(openBlock(),createElementBlock("span",{key:e,class:normalizeClass("0"===e?"is-0":""),onClick:t=>keydown(e)},toDisplayString(e),11,_hoisted_2)))),128))])),_:1}),createVNode(unref(NSpace),{class:"margin-offset","wrap-item":!1},{default:withCtx((()=>{var e;return[createElementVNode("span",{class:"opt",onClick:t[2]||(t[2]=e=>keydown("Undo"))},[createVNode(unref(NIcon),{component:unref(ArrowUndoSharp)},null,8,["component"])]),createElementVNode("span",{class:"opt",onClick:t[3]||(t[3]=e=>keydown("Enter"))},(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.33"))||"确定")]})),_:1})])],2),unref(isDay)?(openBlock(),createBlock(unref(NSpace),{key:0,class:"right-days","wrap-item":!1,justify:"center",vertical:""},{default:withCtx((()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(days.value,(e=>{var t;return openBlock(),createElementBlock("span",{class:"btn",key:e,onClick:t=>keydown(e)},toDisplayString(e)+((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.144"))||"天"),9,_hoisted_3)})),128))])),_:1})):createCommentVNode("v-if",!0),unref(isDose)?(openBlock(),createBlock(unref(NSpace),{key:1,class:"right-dose","wrap-item":!1},{default:withCtx((()=>[createElementVNode("div",_hoisted_4,[(openBlock(!0),createElementBlock(Fragment,null,renderList(doses.value,(e=>(openBlock(),createElementBlock("span",{class:"btn",key:e,onClick:t=>updateFraction(e)},"1/"+toDisplayString(e),9,_hoisted_5)))),128))]),createVNode(unref(NSpace),{justify:"center",vertical:"","wrap-item":!1},{default:withCtx((()=>{var e;return[createElementVNode("div",_hoisted_6,[createVNode(InputNumber,{integer:"",modelValue:integerValue.value,"onUpdate:modelValue":t[4]||(t[4]=e=>integerValue.value=e)},null,8,["modelValue"]),createElementVNode("div",_hoisted_7,[createVNode(InputNumber,{integer:"",modelValue:numeratorValue.value,"onUpdate:modelValue":t[5]||(t[5]=e=>numeratorValue.value=e),status:numeratorValueStatus.value,"onUpdate:status":t[6]||(t[6]=e=>numeratorValueStatus.value=e)},null,8,["modelValue","status"]),_hoisted_8,createVNode(InputNumber,{integer:"",modelValue:denominatorValue.value,"onUpdate:modelValue":t[7]||(t[7]=e=>denominatorValue.value=e),status:denominatorValueStatus.value,"onUpdate:status":t[8]||(t[8]=e=>denominatorValueStatus.value=e)},null,8,["modelValue","status"])])]),createElementVNode("span",{class:"btn",onClick:calculateFraction},(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.145"))||"分子式剂量")]})),_:1})])),_:1})):createCommentVNode("v-if",!0)],38))}});export{_sfc_main as default};
1
+ import{defineComponent,computed,ref,watch,openBlock,createElementBlock,normalizeClass,normalizeStyle,unref,createElementVNode,createVNode,withCtx,Fragment,renderList,toDisplayString,createBlock,createCommentVNode,nextTick}from"vue";import{NSpace,NIcon}from"naive-ui";import{ArrowUndoSharp}from"@vicons/ionicons5";import InputNumber from"./InputNumber.vue.js";import{useDraggable}from"@vueuse/core";import{getNumber}from"../utils/index.js";const _hoisted_1={class:"keys"},_hoisted_2=["onClick"],_hoisted_3=["onClick"],_hoisted_4={class:"btns"},_hoisted_5=["onClick"],_hoisted_6={class:"inputs"},_hoisted_7={class:"inputs-right"},_hoisted_8=createElementVNode("hr",null,null,-1);var _sfc_main=defineComponent({__name:"NumberPanel",props:{defaultValue:{type:Number},value:{type:Number},mode:{type:String},positionInitialValue:{type:Object,default:()=>({x:0,y:0})},moveOffset:{type:Object,default:()=>({x:0,y:0})},drag:{type:Boolean,default:!1}},emits:["change"],setup(__props,{emit:emit}){const props=__props,NUMBERKEYS="1234567890.",DAYS=[3,7,14,30],DOSENUMBERKEYS="123/456*789-0.+",CALCULATIONSYMBOLS=["+","-","*","/"],isNumber=computed((()=>"number"===props.mode)),isDay=computed((()=>"day"===props.mode&&!isNumber.value)),isDose=computed((()=>"dose"===props.mode&&!isNumber.value)),numberKeys=computed((()=>(isDose.value?DOSENUMBERKEYS:NUMBERKEYS).split(""))),days=ref(DAYS),doses=ref([2,3,4,5,6,7,8]),inputValue=ref(""),integerValue=ref(),numeratorValue=ref(),denominatorValue=ref(),inputValueStatus=ref("success"),numeratorValueStatus=ref("success"),denominatorValueStatus=ref("success"),keyboardRef=ref(null),inputRef=ref(null),style=init();function init(){if(props.defaultValue&&(inputValue.value=props.defaultValue.toString()),props.drag){const{x:e,y:t,style:a}=useDraggable(keyboardRef,{initialValue:props.positionInitialValue,onMove:(e,t)=>{var a,u,n,l;e.x+=null!=(u=null==(a=props.moveOffset)?void 0:a.x)?u:0,e.y+=null!=(l=null==(n=props.moveOffset)?void 0:n.y)?l:0}});return a}}async function setFocus(){var e,t,a;const u=null==(a=null==(t=null==(e=inputRef.value)?void 0:e.$childrenRefs)?void 0:t.$refs)?void 0:a.inputElRef;await nextTick(),u.focus()}function keydown(key){switch(key){case"Undo":updateValue(key);break;case"Enter":if(!validator())return void(inputValueStatus.value="error");emit("change",eval(inputValue.value)),setFocus();break;default:"number"==typeof key?(inputValue.value=key.toString(),setInputValueStatus(),setFocus()):updateValue(key)}}function onKeydown(e){["Enter"].includes(e.key)&&keydown("Enter")}async function updateValue(e){var t,a,u;const n=null==(u=null==(a=null==(t=inputRef.value)?void 0:t.$childrenRefs)?void 0:a.$refs)?void 0:u.inputElRef,{selectionStart:l,selectionEnd:o}=n,r=inputValue.value.split("");if("Undo"===e){const e=l===o?1:o-l,t=l===o?l-1:l;inputValue.value&&t>-1&&r.splice(t,e)}else r.splice(l,o-l,e);inputValue.value=r.join(""),await nextTick(),n.focus();const s="Undo"===e?l?o>l?l:l-1:0:l+1;n.setSelectionRange(s,s),setInputValueStatus()}function validator(){if(!inputValue.value)return!1;if(CALCULATIONSYMBOLS.slice(2).includes(inputValue.value[0]))return!1;if(CALCULATIONSYMBOLS.includes(inputValue.value[inputValue.value.length-1]))return!1;const e=[];let t=[];const a=inputValue.value.split("");a.forEach(((u,n)=>{CALCULATIONSYMBOLS.includes(u)?(e.push(t.join("")),t=[]):(t.push(u),n===a.length-1&&e.push(t.join("")))}));return!!e.every(((e,t)=>0===t&&!e||/^\d*(.\d+)?$/.test(e)))}function updateFraction(e){setInputStatus(inputValue,inputValueStatus)&&(inputValue.value=(Math.round(+inputValue.value*(1/e)*100)/100).toString(),setInputValueStatus())}function calculateFraction(){if(!setInputStatus(inputValue,inputValueStatus)||!setInputStatus(numeratorValue,numeratorValueStatus,!0)||!setInputStatus(denominatorValue,denominatorValueStatus,!0))return;const e=getNumber(integerValue.value)+getNumber(numeratorValue.value)/getNumber(denominatorValue.value);inputValue.value=(Math.round(+inputValue.value*e*100)/100).toString(),setInputValueStatus()}function setInputStatus(e,t,a){if((a||e.value&&"."!==e.value)&&(!a||e.value))return!0;t.value="error"}function setInputValueStatus(){inputValueStatus.value=inputValue.value?"success":"error"}return watch((()=>props.value),(e=>inputValue.value=(e||"").toString()),{immediate:!0}),(e,t)=>(openBlock(),createElementBlock("div",{class:normalizeClass(["c-keyboard",{isFixed:__props.drag}]),ref_key:"keyboardRef",ref:keyboardRef,style:normalizeStyle(unref(style)),onKeydown:onKeydown},[createElementVNode("div",{class:normalizeClass(["left",{isDose:unref(isDose)}])},[createVNode(InputNumber,{ref_key:"inputRef",ref:inputRef,modelValue:inputValue.value,"onUpdate:modelValue":t[0]||(t[0]=e=>inputValue.value=e),status:inputValueStatus.value,"onUpdate:status":t[1]||(t[1]=e=>inputValueStatus.value=e)},null,8,["modelValue","status"]),createElementVNode("div",_hoisted_1,[createVNode(unref(NSpace),{class:"margin-offset","wrap-item":!1},{default:withCtx((()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(numberKeys),(e=>(openBlock(),createElementBlock("span",{key:e,class:normalizeClass("0"===e?"is-0":""),onClick:t=>keydown(e)},toDisplayString(e),11,_hoisted_2)))),128))])),_:1}),createVNode(unref(NSpace),{class:"margin-offset","wrap-item":!1},{default:withCtx((()=>{var e;return[createElementVNode("span",{class:"opt",onClick:t[2]||(t[2]=e=>keydown("Undo"))},[createVNode(unref(NIcon),{component:unref(ArrowUndoSharp)},null,8,["component"])]),createElementVNode("span",{class:"opt",onClick:t[3]||(t[3]=e=>keydown("Enter"))},(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.27"))||"确定")]})),_:1})])],2),unref(isDay)?(openBlock(),createBlock(unref(NSpace),{key:0,class:"right-days","wrap-item":!1,justify:"center",vertical:""},{default:withCtx((()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(days.value,(e=>{var t;return openBlock(),createElementBlock("span",{class:"btn",key:e,onClick:t=>keydown(e)},toDisplayString(e)+((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.144"))||"天"),9,_hoisted_3)})),128))])),_:1})):createCommentVNode("v-if",!0),unref(isDose)?(openBlock(),createBlock(unref(NSpace),{key:1,class:"right-dose","wrap-item":!1},{default:withCtx((()=>[createElementVNode("div",_hoisted_4,[(openBlock(!0),createElementBlock(Fragment,null,renderList(doses.value,(e=>(openBlock(),createElementBlock("span",{class:"btn",key:e,onClick:t=>updateFraction(e)},"1/"+toDisplayString(e),9,_hoisted_5)))),128))]),createVNode(unref(NSpace),{justify:"center",vertical:"","wrap-item":!1},{default:withCtx((()=>{var e;return[createElementVNode("div",_hoisted_6,[createVNode(InputNumber,{integer:"",modelValue:integerValue.value,"onUpdate:modelValue":t[4]||(t[4]=e=>integerValue.value=e)},null,8,["modelValue"]),createElementVNode("div",_hoisted_7,[createVNode(InputNumber,{integer:"",modelValue:numeratorValue.value,"onUpdate:modelValue":t[5]||(t[5]=e=>numeratorValue.value=e),status:numeratorValueStatus.value,"onUpdate:status":t[6]||(t[6]=e=>numeratorValueStatus.value=e)},null,8,["modelValue","status"]),_hoisted_8,createVNode(InputNumber,{integer:"",modelValue:denominatorValue.value,"onUpdate:modelValue":t[7]||(t[7]=e=>denominatorValue.value=e),status:denominatorValueStatus.value,"onUpdate:status":t[8]||(t[8]=e=>denominatorValueStatus.value=e)},null,8,["modelValue","status"])])]),createElementVNode("span",{class:"btn",onClick:calculateFraction},(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.145"))||"分子式剂量")]})),_:1})])),_:1})):createCommentVNode("v-if",!0)],38))}});export{_sfc_main as default};
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as a,computed as t,onMounted as n,openBlock as s,createElementBlock as o,createElementVNode as l,createVNode as r,unref as i,withCtx as c,createTextVNode as d,toDisplayString as p,Fragment as m,renderList as u,createCommentVNode as g}from"vue";import{useMessage as v,NInput as q,NButton as L}from"naive-ui";const h={class:"c-map"},y={class:"search-container"},f={class:"map-input-search"},k={class:"input-addon"},w=l("div",{id:"map-core"},null,-1),_={key:0,class:"address-list"},S=["onClick"],P={class:"title"};var C=e({__name:"Map",props:{locationProp:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"}},emits:["selectLocation"],setup(e,{emit:C}){const O=e,T=a({qq:null,searchKey:"",centrePoint:{},location:{lng:"",lat:""},localObj:{},map:null,ac:null,addressList:[],markers:[],timeout:null,searchService:null,geocoder:{}}),M=t((()=>{var e,a;return null==(a=null==(e=T.addressList)?void 0:e[0])?void 0:a.name})),B=t((()=>O.locationProp&&JSON.parse(O.locationProp)||null)),I=v(),E=e=>{if(e&&"geolocation"==e.module){T.location.lng=e.lng,T.location.lat=e.lat;const a=new T.qq.maps.LatLng(e.lat,e.lng);x({latLng:a}),K({lat:e.lat,lng:e.lng})}else console.log("用户不允许获取地理位置"),T.location.lng=113.275,T.location.lat=23.117},K=e=>{const a=T.qq;var t=new a.maps.LatLng(e.lat,e.lng);T.centrePoint=t,T.map.panTo(t);const n=new a.maps.Marker({position:t,map:T.map});T.markers.push(n)},N=e=>{for(var a;a=e.pop();)a.setMap(null)},b=()=>{T.markers&&T.markers.length&&N(T.markers),T.markers=[]},x=(e={})=>{const a=T.qq,t=e.latLng,n=new a.maps.Geocoder;n.setComplete((e=>{if("GEO_INFO"===e.type){var t=new a.maps.LatLngBounds,n=e.detail.nearPois||[];b(),T.addressList=n||[];for(let e=0;e<n.length;e++){const o=n[e];var s=new a.maps.Marker({map:T.map});s.setPosition(o.latLng),s.setTitle(e+1),T.markers.push(s),t.extend(o.latLng)}T.map.fitBounds(t)}var o=e.detail.location||{};K(o)})),n.setError((function(){alert("出错了,请输入正确的经纬度!!!")})),n.getAddress(t)},A=()=>{let e=T.searchKey;e&&(T.markers&&T.markers.length&&N(T.markers),T.searchService.setLocation(""),T.searchService.setPageCapacity(50),T.searchService.search(e))},G=(e,a)=>{const t=T.qq,{name:n,address:s,latLng:o}=e,{lat:l,lng:r}=o,i=new t.maps.Geocoder;i.setComplete((function(e){if("GEO_INFO"===e.type){const{addressComponents:{province:a,city:t,district:o,country:i}}=e.detail,c=JSON.stringify({name:n,address:s,province:a,city:t,district:o,country:i,lat:l,lng:r});C("selectLocation",{locationProp:c,isInit:!1})}})),i.setError((function(){alert("出错了,请输入正确的经纬度!!!")})),i.getAddress(o)},J=e=>{var a={zoom:12,center:new e.maps.LatLng(39.916527,116.397128),mapTypeId:e.maps.MapTypeId.ROADMAP};T.map=new e.maps.Map(document.getElementById("map-core"),a);const{lat:t,lng:n,address:s}=B.value||{};if(t&&n){const a=new e.maps.LatLng(t,n);x({latLng:a})}else s?setTimeout((()=>{A()}),300):new T.qq.maps.Geolocation(O.ak,"qqmap").getLocation(E,(function(e){console.log(e)}),{timeout:9e3});T.qq.maps.event.addDomListener(T.map,"click",(function(e){x({latLng:e.latLng})}))},Y=e=>{T.qq=e,setTimeout((()=>{J(e),(()=>{const e=T.qq;T.searchService=new e.maps.SearchService({complete:function(a){var t,n,s=a.detail.pois||[],o=new e.maps.LatLngBounds;if("CITY_LIST"===a.type)return T.searchService.setLocation(a.detail.cities[0].cityName),void T.searchService.search(T.searchKey);if(T.addressList=s||[],b(),"POI_LIST"===a.type)for(var l=0,r=s.length;l<r;l++){var i=s[l];o.extend(i.latLng),t=l,n=void 0,(n=new e.maps.Marker({map:T.map})).setPosition(s[t].latLng),n.setTitle(l+1),T.markers.push(n)}T.map.fitBounds(o)},error:function(e){console.log(e),"NO_RESULTS"!==e?I.warning("地址检索先输入城市名称"):I.warning("查无结果!")},autoExtend:!0})})()}),0)},j=()=>{(()=>{var e,a;let t=window;if(t.qq)return t.qq._preloader?t.qq._preloader:Promise.resolve(t.qq);{const n=O.ak||(null==(a=null==(e=t._qq)?void 0:e.call(t))?void 0:a.ak);return t.qq={},t.qq._preloader=new Promise((e=>{t._initBaiduMap=function(){e(t.qq),t.document.body.removeChild(a),t.qq._preloader=null,t._initBaiduMap=null};const a=document.createElement("script");window.document.body.appendChild(a),a.src=`https://map.qq.com/api/js?v=2.exp&key=${n}&callback=_initBaiduMap`;const s=document.createElement("script");window.document.body.appendChild(s),s.src="https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js"})),t.qq._preloader}})().then(Y)};return n((()=>{setTimeout((()=>{j()}),200)})),(e,a)=>(s(),o("div",h,[l("div",y,[l("div",f,[r(i(q),{value:T.searchKey,"onUpdate:value":a[0]||(a[0]=e=>T.searchKey=e),placeholder:"请输入地址","enter-button":"检索"},null,8,["value"]),l("span",k,[r(i(L),{type:"primary",size:"small",onClick:A},{default:c((()=>[d("检索")])),_:1})])])]),w,T.addressList&&T.addressList.length?(s(),o("ul",_,[l("li",null,[d(" 地址:"+p(i(M))+" ",1),r(i(L),{type:"primary",size:"small",onClick:a[1]||(a[1]=e=>G(T.addressList[0]))},{default:c((()=>{var e;return[d((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.33"))||"确定")]})),_:1})]),(s(!0),o(m,null,u(T.addressList,((e,a)=>(s(),o("li",{class:"address-item",key:a},[l("div",{onClick:a=>G(e)},[l("div",P,p(e.name),1),l("span",null,p(e.address),1)],8,S)])))),128))])):g("v-if",!0)]))}});export{C as default};
1
+ import{defineComponent as e,reactive as a,computed as t,onMounted as n,openBlock as s,createElementBlock as o,createElementVNode as l,createVNode as r,unref as i,withCtx as c,createTextVNode as d,toDisplayString as p,Fragment as m,renderList as u,createCommentVNode as g}from"vue";import{useMessage as v,NInput as q,NButton as L}from"naive-ui";const h={class:"c-map"},y={class:"search-container"},f={class:"map-input-search"},k={class:"input-addon"},w=l("div",{id:"map-core"},null,-1),_={key:0,class:"address-list"},S=["onClick"],P={class:"title"};var C=e({__name:"Map",props:{locationProp:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"}},emits:["selectLocation"],setup(e,{emit:C}){const O=e,T=a({qq:null,searchKey:"",centrePoint:{},location:{lng:"",lat:""},localObj:{},map:null,ac:null,addressList:[],markers:[],timeout:null,searchService:null,geocoder:{}}),M=t((()=>{var e,a;return null==(a=null==(e=T.addressList)?void 0:e[0])?void 0:a.name})),B=t((()=>O.locationProp&&JSON.parse(O.locationProp)||null)),I=v(),E=e=>{if(e&&"geolocation"==e.module){T.location.lng=e.lng,T.location.lat=e.lat;const a=new T.qq.maps.LatLng(e.lat,e.lng);x({latLng:a}),K({lat:e.lat,lng:e.lng})}else console.log("用户不允许获取地理位置"),T.location.lng=113.275,T.location.lat=23.117},K=e=>{const a=T.qq;var t=new a.maps.LatLng(e.lat,e.lng);T.centrePoint=t,T.map.panTo(t);const n=new a.maps.Marker({position:t,map:T.map});T.markers.push(n)},N=e=>{for(var a;a=e.pop();)a.setMap(null)},b=()=>{T.markers&&T.markers.length&&N(T.markers),T.markers=[]},x=(e={})=>{const a=T.qq,t=e.latLng,n=new a.maps.Geocoder;n.setComplete((e=>{if("GEO_INFO"===e.type){var t=new a.maps.LatLngBounds,n=e.detail.nearPois||[];b(),T.addressList=n||[];for(let e=0;e<n.length;e++){const o=n[e];var s=new a.maps.Marker({map:T.map});s.setPosition(o.latLng),s.setTitle(e+1),T.markers.push(s),t.extend(o.latLng)}T.map.fitBounds(t)}var o=e.detail.location||{};K(o)})),n.setError((function(){alert("出错了,请输入正确的经纬度!!!")})),n.getAddress(t)},A=()=>{let e=T.searchKey;e&&(T.markers&&T.markers.length&&N(T.markers),T.searchService.setLocation(""),T.searchService.setPageCapacity(50),T.searchService.search(e))},G=(e,a)=>{const t=T.qq,{name:n,address:s,latLng:o}=e,{lat:l,lng:r}=o,i=new t.maps.Geocoder;i.setComplete((function(e){if("GEO_INFO"===e.type){const{addressComponents:{province:a,city:t,district:o,country:i}}=e.detail,c=JSON.stringify({name:n,address:s,province:a,city:t,district:o,country:i,lat:l,lng:r});C("selectLocation",{locationProp:c,isInit:!1})}})),i.setError((function(){alert("出错了,请输入正确的经纬度!!!")})),i.getAddress(o)},J=e=>{var a={zoom:12,center:new e.maps.LatLng(39.916527,116.397128),mapTypeId:e.maps.MapTypeId.ROADMAP};T.map=new e.maps.Map(document.getElementById("map-core"),a);const{lat:t,lng:n,address:s}=B.value||{};if(t&&n){const a=new e.maps.LatLng(t,n);x({latLng:a})}else s?setTimeout((()=>{A()}),300):new T.qq.maps.Geolocation(O.ak,"qqmap").getLocation(E,(function(e){console.log(e)}),{timeout:9e3});T.qq.maps.event.addDomListener(T.map,"click",(function(e){x({latLng:e.latLng})}))},Y=e=>{T.qq=e,setTimeout((()=>{J(e),(()=>{const e=T.qq;T.searchService=new e.maps.SearchService({complete:function(a){var t,n,s=a.detail.pois||[],o=new e.maps.LatLngBounds;if("CITY_LIST"===a.type)return T.searchService.setLocation(a.detail.cities[0].cityName),void T.searchService.search(T.searchKey);if(T.addressList=s||[],b(),"POI_LIST"===a.type)for(var l=0,r=s.length;l<r;l++){var i=s[l];o.extend(i.latLng),t=l,n=void 0,(n=new e.maps.Marker({map:T.map})).setPosition(s[t].latLng),n.setTitle(l+1),T.markers.push(n)}T.map.fitBounds(o)},error:function(e){console.log(e),"NO_RESULTS"!==e?I.warning("地址检索先输入城市名称"):I.warning("查无结果!")},autoExtend:!0})})()}),0)},j=()=>{(()=>{var e,a;let t=window;if(t.qq)return t.qq._preloader?t.qq._preloader:Promise.resolve(t.qq);{const n=O.ak||(null==(a=null==(e=t._qq)?void 0:e.call(t))?void 0:a.ak);return t.qq={},t.qq._preloader=new Promise((e=>{t._initBaiduMap=function(){e(t.qq),t.document.body.removeChild(a),t.qq._preloader=null,t._initBaiduMap=null};const a=document.createElement("script");window.document.body.appendChild(a),a.src=`https://map.qq.com/api/js?v=2.exp&key=${n}&callback=_initBaiduMap`;const s=document.createElement("script");window.document.body.appendChild(s),s.src="https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js"})),t.qq._preloader}})().then(Y)};return n((()=>{setTimeout((()=>{j()}),200)})),(e,a)=>(s(),o("div",h,[l("div",y,[l("div",f,[r(i(q),{value:T.searchKey,"onUpdate:value":a[0]||(a[0]=e=>T.searchKey=e),placeholder:"请输入地址","enter-button":"检索"},null,8,["value"]),l("span",k,[r(i(L),{type:"primary",size:"small",onClick:A},{default:c((()=>[d("检索")])),_:1})])])]),w,T.addressList&&T.addressList.length?(s(),o("ul",_,[l("li",null,[d(" 地址:"+p(i(M))+" ",1),r(i(L),{type:"primary",size:"small",onClick:a[1]||(a[1]=e=>G(T.addressList[0]))},{default:c((()=>{var e;return[d((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.27"))||"确定")]})),_:1})]),(s(!0),o(m,null,u(T.addressList,((e,a)=>(s(),o("li",{class:"address-item",key:a},[l("div",{onClick:a=>G(e)},[l("div",P,p(e.name),1),l("span",null,p(e.address),1)],8,S)])))),128))])):g("v-if",!0)]))}});export{C as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,provide as a,computed as t,watch as i,onMounted as n,openBlock as o,createElementBlock as u,createElementVNode as r,Fragment as s,renderList as c,unref as d,normalizeClass as v,createCommentVNode as f,createVNode as m,withCtx as g,createTextVNode as p,toDisplayString as h,createBlock as w,withDirectives as y,vShow as k,isRef as C}from"vue";import{useMessage as b,NPopover as _,NModal as A,NCard as S,NIcon as x,NButton as L,NForm as B,NFormItem as F,NInput as q}from"naive-ui";import{CloseOutline as N,AddOutline as j}from"@vicons/ionicons5";import I from"../../table-filter/src/hooks/useMixins.js";import E from"../../table-filter/src/hooks/useRenderWidget.js";import R from"../../table-filter/src/hooks/useAdvanced.js";import U from"../../table-filter/src/components/render-widget/index.vue.js";import{WidgetTypeEnums as T}from"../../table-filter/src/types/enums.js";import"moment/locale/zh-cn";import{cloneDeep as D}from"lodash-es";import{InjectionFilterApiConfig as O,InjectionFilterSearchConfig as P}from"../../table-filter/src/constants/index.js";const V={class:"quick-search-block quick-search-table"},z={class:"quick-row"},M={class:"quick-item-title"},Q={class:"quick-item-col"},W={class:"svg-wrap"},G={class:"flex_right"},J={class:"class-filter-content"},Y={class:"quickSearch-content"},H=r("span",{class:"label"},"父类名称:",-1),K=["onDblclick","onClick"],X={class:"s-content"};var Z=e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},quickSearchConfig:{type:Array,default:()=>[]},tableId:{type:String,default:""},selectCriticalNum:{type:Number,default:10},filterApiConfig:{type:Object}},emits:["getFilterParam","onFilterSearch","clearQuickSearchConfig"],setup(e,{expose:Z,emit:$}){var ee;const le=e,ae={classname:{required:!0,message:(null==(ee=window.getLanguageByCode)?void 0:ee.call(window,"10010.1.360"))||"请输入分类名称",trigger:["input","blur"]}},te=b(),{handleGetConfigApi:ie,outQuickSearchFn:ne}=I(),{getRenderSearchConObj:oe,resetRenderWidgetValue:ue,isRender:re}=E(),{transformData:se,getCacheDef:ce,transformParams:de}=R(),ve=l(null),fe=l({classname:""});let me=l(!1),ge=l([]),pe=l([]),he=l(!1),we=l("");const ye=l(),ke=l(),Ce=l([]);a(O,le.filterApiConfig),a(P,ge);let be=t((()=>!!pe.value.length&&pe.value.some((e=>e.isAdd)))),_e=t((()=>(e,l="name")=>e.alias||e[l]));function Ae(){return function(e){if(!Array.isArray(e))return[];let l=[];for(let a=0;a<e.length;a++){let t=e[a];const i=oe(t);!l.find((e=>e.field_key===i.field_key))&&i&&l.push(i)}return l.filter((e=>e.value))}(ge.value)||[]}function Se(){var e;null==(e=ve.value)||e.validate((e=>{var l;if(e)return;let a=Ae();a.length||(a=[]);let t=null==(l=pe.value.filter((e=>e.selected))[0])?void 0:l.value;!async function(e){var l;try{if(!await ie(e,"requestSaveTableCondiTion",{},le.filterApiConfig))return;me.value=!1,null==(l=ve.value)||l.restoreValidation(),fe.value.classname="",pe.value=[],qe()}catch(e){console.log(e)}}({tableId:le.tableId||"",setting:JSON.stringify({displayCategory:t,name:fe.value.classname,conObj:a.map((e=>(e.unit&&(e.value=[]),e.widgetType===T.SELECTDYNAMIC&&(e.dynamicBaseList=e.value.map((e=>e.includes("&")?{label:e.split("&")[0],value:e.split("&")[1]}:{label:e,value:e})),e.value=e.value.map((e=>e.includes("&")?e.split("&")[1]:e))),e)))}),conditionList:"[]"})}))}function xe(e){setTimeout((()=>{ke.value&&ke.value.focus()}),100),he.value=!0}function Le(){he.value=!1,we.value&&(pe.value.forEach((e=>e.selected=!1)),pe.value.push({disabled:!0,value:we.value,selected:!0,isAdd:!0}),we.value="")}function Be(e){!function(e){pe.value.splice(e,1)}(e)}function Fe(){me.value=!1}function qe(){Ne(ge.value),$("clearQuickSearchConfig")}function Ne(e){Array.isArray(e)&&(e.forEach((e=>{ue(e)})),ne.handlerInitSearchItem(ge.value))}return i((()=>le.searchFieldList),(e=>{e&&e.length>0&&function(){let e=D(se(le.searchFieldList,{_filterApiConfig:le.filterApiConfig,_selectCriticalNum:le.selectCriticalNum})).filter((e=>1==e.isShowSearch&&1!=e.filterExplicit))||[];ge.value=e||[],ne.handlerInitSearchItem(ge.value)}()}),{immediate:!0,deep:!0}),i((()=>ge),(()=>{const e=Ae()||[],l=de(e);$("getFilterParam",e,l),Ce.value.forEach((e=>e(l)))}),{deep:!0}),n((()=>{const e=le.quickSearchConfig;if(e&&e.length>0)return l=e,void ge.value.forEach((e=>{var a,t;if(re(e)){const i=l.find((l=>l.field_key===e.columnName));i&&(null==(a=i.value)?void 0:a.length)>0&&(e.value=ce(e,i.value),e.unit=null!=(t=i.unit)?t:"")}}));var l;Ne(ge.value)})),Z({openSaveToCalss:function(){var e;let l=Ae();l&&(l.length>0?me.value=!0:te.warning((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.409"))||"请设置搜索条件"))},clearData:qe,onFilterSearch:function(){let e=Ae()||[];const l=de(e);return $("onFilterSearch",e,l,!1),ge.value},getFilterParams:function(){const e=Ae()||[];return de(e)},setFilterParams:function(e){const l=e?Object.keys(e):[];l.length>0&&ge.value.forEach((a=>{var t;if(re(a)&&l.includes(a.columnName)){const l=e[a.columnName];a.value=Array.isArray(l)&&!1===(null==(t=a.widgetCfg)?void 0:t.multiple)?l[0]:l}}))},getOriginalConfig:function(){return le.searchFieldList},onFilterChange:function(e){Ce.value.push(e)}}),(e,l)=>{var a,t;return o(),u("div",null,[r("div",V,[(o(!0),u(s,null,c(d(ge),(e=>(o(),u("div",{class:v(["quick-item",{"quick-block":e._isBlock}]),key:e.sid||e.columnName},[r("div",z,[f(" title "),r("div",M,[m(d(_),{trigger:"hover"},{trigger:g((()=>[p(h(d(_e)(e,"title")),1)])),default:g((()=>[r("span",null,h(d(_e)(e,"title")),1)])),_:2},1024)]),f(" content "),r("div",Q,[f(" 直接渲染组件 "),e.isRender?(o(),w(U,{key:0,cfg:e,modelValue:e.value,"onUpdate:modelValue":l=>e.value=l,unit:e.unit,"onUpdate:unit":l=>e.unit=l},null,8,["cfg","modelValue","onUpdate:modelValue","unit","onUpdate:unit"])):f("v-if",!0)])])],2)))),128))]),f(" 保存到分类的弹窗 "),m(d(A),{show:d(me),maskClosable:!1,"positive-text":(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.428"))||"确认","negative-text":(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.32"))||"取消",onPositiveClick:Se,onNegativeClick:Fe,class:"classification-modal-block"},{default:g((()=>{var e;return[m(d(S),{title:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.407"))||"设置筛选分类",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":g((()=>[r("div",W,[m(d(x),{component:d(N),size:"24",onClick:Fe},null,8,["component"])])])),footer:g((()=>[r("div",G,[m(d(L),{onClick:Fe},{default:g((()=>{var e;return[p((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.32"))||"取消")]})),_:1}),m(d(L),{type:"info",onClick:Se},{default:g((()=>{var e;return[p((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.428"))||"确认")]})),_:1})])])),default:g((()=>[r("div",J,[m(d(B),{ref_key:"formRef",ref:ve,"label-placement":"left",rules:ae,model:fe.value},{default:g((()=>{var e;return[m(d(F),{label:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.408"))||"筛选集名称",path:"classname"},{default:g((()=>{var e;return[m(d(q),{value:fe.value.classname,"onUpdate:value":l[0]||(l[0]=e=>fe.value.classname=e),placeholder:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.360"))||"请输入分类名称",clearable:""},null,8,["value"])]})),_:1})]})),_:1},8,["model"]),r("div",Y,[H,(o(!0),u(s,null,c(d(pe),((e,l)=>(o(),u("div",{class:"parent-name",key:l,onDblclick:l=>function(e){e.disabled=!1,setTimeout((()=>{ye.value.length>0&&ye.value[0].focus()}),100)}(e),onClick:a=>function(e,l){e.disabled&&(pe.value.forEach(((e,a)=>{a!==l&&(e.selected=!1)})),e.selected=!e.selected)}(e,l)},[e.disabled?(o(),u("div",{key:0,class:v(["edit-tag",{"edit-tag-select":e.selected&&e.disabled}])},[r("div",X,h(e.value),1),m(d(x),{component:d(N),class:"anticon-close",size:"20",onClick:e=>Be(l)},null,8,["component","onClick"])],2)):(o(),w(d(q),{key:1,ref_for:!0,ref_key:"parentInputRef",ref:ye,class:"parent-input",style:{width:"100px"},value:e.value,"onUpdate:value":l=>e.value=l,disabled:e.disabled,onBlur:()=>e.disabled=!0,maxlength:20},null,8,["value","onUpdate:value","disabled","onBlur"]))],40,K)))),128)),d(be)?f("v-if",!0):(o(),u(s,{key:0},[y(m(d(L),{dashed:"",icon:"plus",class:"ant-btn",onClick:xe},{default:g((()=>[m(d(x),{component:d(j),size:"20"},null,8,["component"]),p("添加分类 ")])),_:1},512),[[k,!d(he)]]),y(m(d(q),{ref_key:"parentInputAddRef",ref:ke,class:"parent-input",style:{width:"100px"},value:d(we),"onUpdate:value":l[1]||(l[1]=e=>C(we)?we.value=e:we=e),valueModifiers:{trim:!0},onBlur:Le,maxlength:20},null,8,["value"]),[[k,d(he)]])],64))])])])),_:1})]})),_:1},8,["show"])])}}});export{Z as default};
1
+ import{defineComponent as e,ref as l,provide as a,computed as t,watch as i,onMounted as n,openBlock as o,createElementBlock as u,createElementVNode as r,Fragment as s,renderList as c,unref as d,normalizeClass as v,createCommentVNode as f,createVNode as m,withCtx as g,createTextVNode as p,toDisplayString as h,createBlock as w,withDirectives as y,vShow as k,isRef as C}from"vue";import{useMessage as b,NPopover as _,NModal as A,NCard as S,NIcon as x,NButton as L,NForm as B,NFormItem as F,NInput as q}from"naive-ui";import{CloseOutline as N,AddOutline as j}from"@vicons/ionicons5";import I from"../../table-filter/src/hooks/useMixins.js";import E from"../../table-filter/src/hooks/useRenderWidget.js";import R from"../../table-filter/src/hooks/useAdvanced.js";import U from"../../table-filter/src/components/render-widget/index.vue.js";import{WidgetTypeEnums as T}from"../../table-filter/src/types/enums.js";import"moment/locale/zh-cn";import{cloneDeep as D}from"lodash-es";import{InjectionFilterApiConfig as O,InjectionFilterSearchConfig as P}from"../../table-filter/src/constants/index.js";const V={class:"quick-search-block quick-search-table"},z={class:"quick-row"},M={class:"quick-item-title"},Q={class:"quick-item-col"},W={class:"svg-wrap"},G={class:"flex_right"},J={class:"class-filter-content"},Y={class:"quickSearch-content"},H=r("span",{class:"label"},"父类名称:",-1),K=["onDblclick","onClick"],X={class:"s-content"};var Z=e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},quickSearchConfig:{type:Array,default:()=>[]},tableId:{type:String,default:""},selectCriticalNum:{type:Number,default:10},filterApiConfig:{type:Object}},emits:["getFilterParam","onFilterSearch","clearQuickSearchConfig"],setup(e,{expose:Z,emit:$}){var ee;const le=e,ae={classname:{required:!0,message:(null==(ee=window.getLanguageByCode)?void 0:ee.call(window,"10010.1.360"))||"请输入分类名称",trigger:["input","blur"]}},te=b(),{handleGetConfigApi:ie,outQuickSearchFn:ne}=I(),{getRenderSearchConObj:oe,resetRenderWidgetValue:ue,isRender:re}=E(),{transformData:se,getCacheDef:ce,transformParams:de}=R(),ve=l(null),fe=l({classname:""});let me=l(!1),ge=l([]),pe=l([]),he=l(!1),we=l("");const ye=l(),ke=l(),Ce=l([]);a(O,le.filterApiConfig),a(P,ge);let be=t((()=>!!pe.value.length&&pe.value.some((e=>e.isAdd)))),_e=t((()=>(e,l="name")=>e.alias||e[l]));function Ae(){return function(e){if(!Array.isArray(e))return[];let l=[];for(let a=0;a<e.length;a++){let t=e[a];const i=oe(t);!l.find((e=>e.field_key===i.field_key))&&i&&l.push(i)}return l.filter((e=>e.value))}(ge.value)||[]}function Se(){var e;null==(e=ve.value)||e.validate((e=>{var l;if(e)return;let a=Ae();a.length||(a=[]);let t=null==(l=pe.value.filter((e=>e.selected))[0])?void 0:l.value;!async function(e){var l;try{if(!await ie(e,"requestSaveTableCondiTion",{},le.filterApiConfig))return;me.value=!1,null==(l=ve.value)||l.restoreValidation(),fe.value.classname="",pe.value=[],qe()}catch(e){console.log(e)}}({tableId:le.tableId||"",setting:JSON.stringify({displayCategory:t,name:fe.value.classname,conObj:a.map((e=>(e.unit&&(e.value=[]),e.widgetType===T.SELECTDYNAMIC&&(e.dynamicBaseList=e.value.map((e=>e.includes("&")?{label:e.split("&")[0],value:e.split("&")[1]}:{label:e,value:e})),e.value=e.value.map((e=>e.includes("&")?e.split("&")[1]:e))),e)))}),conditionList:"[]"})}))}function xe(e){setTimeout((()=>{ke.value&&ke.value.focus()}),100),he.value=!0}function Le(){he.value=!1,we.value&&(pe.value.forEach((e=>e.selected=!1)),pe.value.push({disabled:!0,value:we.value,selected:!0,isAdd:!0}),we.value="")}function Be(e){!function(e){pe.value.splice(e,1)}(e)}function Fe(){me.value=!1}function qe(){Ne(ge.value),$("clearQuickSearchConfig")}function Ne(e){Array.isArray(e)&&(e.forEach((e=>{ue(e)})),ne.handlerInitSearchItem(ge.value))}return i((()=>le.searchFieldList),(e=>{e&&e.length>0&&function(){let e=D(se(le.searchFieldList,{_filterApiConfig:le.filterApiConfig,_selectCriticalNum:le.selectCriticalNum})).filter((e=>1==e.isShowSearch&&1!=e.filterExplicit))||[];ge.value=e||[],ne.handlerInitSearchItem(ge.value)}()}),{immediate:!0,deep:!0}),i((()=>ge),(()=>{const e=Ae()||[],l=de(e);$("getFilterParam",e,l),Ce.value.forEach((e=>e(l)))}),{deep:!0}),n((()=>{const e=le.quickSearchConfig;if(e&&e.length>0)return l=e,void ge.value.forEach((e=>{var a,t;if(re(e)){const i=l.find((l=>l.field_key===e.columnName));i&&(null==(a=i.value)?void 0:a.length)>0&&(e.value=ce(e,i.value),e.unit=null!=(t=i.unit)?t:"")}}));var l;Ne(ge.value)})),Z({openSaveToCalss:function(){var e;let l=Ae();l&&(l.length>0?me.value=!0:te.warning((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.409"))||"请设置搜索条件"))},clearData:qe,onFilterSearch:function(){let e=Ae()||[];const l=de(e);return $("onFilterSearch",e,l,!1),ge.value},getFilterParams:function(){const e=Ae()||[];return de(e)},setFilterParams:function(e){const l=e?Object.keys(e):[];l.length>0&&ge.value.forEach((a=>{var t;if(re(a)&&l.includes(a.columnName)){const l=e[a.columnName];a.value=Array.isArray(l)&&!1===(null==(t=a.widgetCfg)?void 0:t.multiple)?l[0]:l}}))},getOriginalConfig:function(){return le.searchFieldList},onFilterChange:function(e){Ce.value.push(e)}}),(e,l)=>{var a,t;return o(),u("div",null,[r("div",V,[(o(!0),u(s,null,c(d(ge),(e=>(o(),u("div",{class:v(["quick-item",{"quick-block":e._isBlock}]),key:e.sid||e.columnName},[r("div",z,[f(" title "),r("div",M,[m(d(_),{trigger:"hover"},{trigger:g((()=>[p(h(d(_e)(e,"title")),1)])),default:g((()=>[r("span",null,h(d(_e)(e,"title")),1)])),_:2},1024)]),f(" content "),r("div",Q,[f(" 直接渲染组件 "),e.isRender?(o(),w(U,{key:0,cfg:e,modelValue:e.value,"onUpdate:modelValue":l=>e.value=l,unit:e.unit,"onUpdate:unit":l=>e.unit=l},null,8,["cfg","modelValue","onUpdate:modelValue","unit","onUpdate:unit"])):f("v-if",!0)])])],2)))),128))]),f(" 保存到分类的弹窗 "),m(d(A),{show:d(me),maskClosable:!1,"positive-text":(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.428"))||"确认","negative-text":(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.28"))||"取消",onPositiveClick:Se,onNegativeClick:Fe,class:"classification-modal-block"},{default:g((()=>{var e;return[m(d(S),{title:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.407"))||"设置筛选分类",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":g((()=>[r("div",W,[m(d(x),{component:d(N),size:"24",onClick:Fe},null,8,["component"])])])),footer:g((()=>[r("div",G,[m(d(L),{onClick:Fe},{default:g((()=>{var e;return[p((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.28"))||"取消")]})),_:1}),m(d(L),{type:"info",onClick:Se},{default:g((()=>{var e;return[p((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.428"))||"确认")]})),_:1})])])),default:g((()=>[r("div",J,[m(d(B),{ref_key:"formRef",ref:ve,"label-placement":"left",rules:ae,model:fe.value},{default:g((()=>{var e;return[m(d(F),{label:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.408"))||"筛选集名称",path:"classname"},{default:g((()=>{var e;return[m(d(q),{value:fe.value.classname,"onUpdate:value":l[0]||(l[0]=e=>fe.value.classname=e),placeholder:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.360"))||"请输入分类名称",clearable:""},null,8,["value"])]})),_:1})]})),_:1},8,["model"]),r("div",Y,[H,(o(!0),u(s,null,c(d(pe),((e,l)=>(o(),u("div",{class:"parent-name",key:l,onDblclick:l=>function(e){e.disabled=!1,setTimeout((()=>{ye.value.length>0&&ye.value[0].focus()}),100)}(e),onClick:a=>function(e,l){e.disabled&&(pe.value.forEach(((e,a)=>{a!==l&&(e.selected=!1)})),e.selected=!e.selected)}(e,l)},[e.disabled?(o(),u("div",{key:0,class:v(["edit-tag",{"edit-tag-select":e.selected&&e.disabled}])},[r("div",X,h(e.value),1),m(d(x),{component:d(N),class:"anticon-close",size:"20",onClick:e=>Be(l)},null,8,["component","onClick"])],2)):(o(),w(d(q),{key:1,ref_for:!0,ref_key:"parentInputRef",ref:ye,class:"parent-input",style:{width:"100px"},value:e.value,"onUpdate:value":l=>e.value=l,disabled:e.disabled,onBlur:()=>e.disabled=!0,maxlength:20},null,8,["value","onUpdate:value","disabled","onBlur"]))],40,K)))),128)),d(be)?f("v-if",!0):(o(),u(s,{key:0},[y(m(d(L),{dashed:"",icon:"plus",class:"ant-btn",onClick:xe},{default:g((()=>[m(d(x),{component:d(j),size:"20"},null,8,["component"]),p("添加分类 ")])),_:1},512),[[k,!d(he)]]),y(m(d(q),{ref_key:"parentInputAddRef",ref:ke,class:"parent-input",style:{width:"100px"},value:d(we),"onUpdate:value":l[1]||(l[1]=e=>C(we)?we.value=e:we=e),valueModifiers:{trim:!0},onBlur:Le,maxlength:20},null,8,["value"]),[[k,d(he)]])],64))])])])),_:1})]})),_:1},8,["show"])])}}});export{Z as default};
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as o,ref as a,watch as t,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as u,createBlock as c,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as w,toDisplayString as h,createTextVNode as y,resolveDynamicComponent as k,renderSlot as S}from"vue";import C from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as D}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as j}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as _}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as x}from"./hooks/scaleview-methods.js";import{handleQueryParams as F,isCollection as L}from"./utils/judge-types.js";import{useEvent as P}from"./hooks/use-event.js";import"xe-utils";import"moment";import q from"../../../shared/utils/vexutilsExpand.js";import N from"./components/NoData.vue.js";import R from"./components/EvaluateCountdown.vue.js";import A from"./components/EvaluatePage.vue.js";import B from"./components/AnswerParse.vue.js";import M from"./components/ScaleScore.js";import O from"./components/DescribeContent.vue.js";import{NForm as T,NFormItem as V,NButton as I}from"naive-ui";const J=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},H=["onClick"],Q=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),$={key:1,class:"footer"};var z=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:z}){const K=e,{ScaleViewState:U}=D(),X=o(U),Y=a(null),Z=a(null),ee=a(null),{noDataState:oe,setNoData:ae,resetNodata:te}=C(),ne=F(),{showEvatip:se,isFormBoldOpen:ie,scaleStyle:le,handlePageClass:re,isShowItem:me,handleShowQuestionNumber:ue,hasScore:ce,isPreviewScale:de,showEvaluateEntry:pe,showEvaluateCoundownPage:ve,showScaleFooter:fe,isCancelBtn:ge,isSaveBtn:we,showEvaluateLabel:he,showAnswerParse:ye,propsConfig:ke,evaluatePageProps:Se,evaluateCountdownProps:Ce,isEvaluetaResSituation:be,disableEdit:De,desStart:Ee,desEnd:je,desContent:_e}=E(K,X,{query:ne,scaleViewDom:Y}),{initForm:xe}=j(K,X,z,{query:ne}),{submitMethod:Fe,onSubmitData:Le,onSubmitForm:Pe,handleScoreJson:qe}=_(K,X,z,{query:ne,formRef:ee,countdownDom:Z}),{nextLogicEvent:Ne,handleDynamicDataRelation:Re}=P(K,X),{scaleChange:Ae,labelChange:Be,vodFileList:Me,writeGuage:Oe,closeEvaluateCountdown:Te,showEvaTipModal:Ve}=x(K,X,z,{nextLogicEvent:Ne,handleDynamicDataRelation:Re,isPreviewScale:de,submitMethod:Fe,isEvaluetaResSituation:be,handleScoreJson:qe,disableEdit:De});(()=>{let{id:e}=ne;e&&(X.shareId=e)})();const Ie=e=>{try{te(),xe(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,ae(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};t((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Ie(e):e.guage_id&&Ie(e)}),{immediate:!0}),t((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{xe(o)}))}),{immediate:!0});const Je=q.debounce(Le,300),Ge=()=>{z("onCloseSetting")};return b({getScaleData:()=>({...X}),onSubmitForm:Pe,cancel:Ge}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(fe)}]),ref_key:"scaleViewDom",ref:Y},[m(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(u,{key:0},[r(oe).noData?(s(),c(N,{key:0,noDataImg:r(oe).noDataImg,noDataTip:r(oe).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(u,{key:1},[r(pe)?(s(),c(A,d({key:0},r(Se),{onWriteGuage:r(Oe)}),null,16,["onWriteGuage"])):(s(),i(u,{key:1},[r(ve)?(s(),c(R,d({key:0,ref_key:"countdownDom",ref:Z},r(Ce),{onCloseEvaluateCountdown:r(Te)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(re),"scale-container-hasfooter":r(fe)}]),style:v(r(le))},[r(ce)?(s(),c(r(M),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(Ee)?(s(),c(O,{key:1,content:r(_e)},null,8,["content"])):m("v-if",!0),f(r(T),{ref_key:"formRef",ref:ee,model:X.form,rules:X.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(s(!0),i(u,null,w(X.formArray,((e,o)=>(s(),i(u,{key:(e.id||e.seq)+o},[r(me)(e)?(s(),c(r(V),{key:0,path:e.val_key,"show-label":!r(L)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(ie)(e)}),innerHTML:r(ue)(e)},null,10,J),r(ie)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(he)(e)?(s(),i("span",W,h(r(he)(e)),1)):m("v-if",!0),r(se)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Ve)(e)},[Q,y(" 查看提示 ")],8,H)):m("v-if",!0)])),default:g((()=>[(s(),c(k(e.renderCom),d(r(ke)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Ae),onOnChange:o=>r(Be)(o,e),onVodFileList:r(Me)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(ye)(e)?(s(),c(B,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"]),r(je)?(s(),c(O,{key:2,content:r(_e)},null,8,["content"])):m("v-if",!0)],6),r(fe)?(s(),i("div",$,[m(" 分享的链接 隐藏取消按钮 "),r(ge)?(s(),c(r(I),{key:0,onClick:Ge},{default:g((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.32"))||"取消")]})),_:1})):m("v-if",!0),r(we)?(s(),c(r(I),{key:1,onClick:r(Je),disabled:X.banSubmit,type:"primary"},{default:g((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.244"))||"保存")]})),_:1},8,["onClick","disabled"])):m("v-if",!0),S(e.$slots,"extendBtn")])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};
1
+ import{defineComponent as e,reactive as o,ref as a,watch as t,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as u,createBlock as c,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as w,toDisplayString as h,createTextVNode as y,resolveDynamicComponent as k,renderSlot as S}from"vue";import C from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as D}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as j}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as _}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as x}from"./hooks/scaleview-methods.js";import{handleQueryParams as F,isCollection as L}from"./utils/judge-types.js";import{useEvent as P}from"./hooks/use-event.js";import"xe-utils";import"moment";import q from"../../../shared/utils/vexutilsExpand.js";import N from"./components/NoData.vue.js";import R from"./components/EvaluateCountdown.vue.js";import A from"./components/EvaluatePage.vue.js";import B from"./components/AnswerParse.vue.js";import M from"./components/ScaleScore.js";import O from"./components/DescribeContent.vue.js";import{NForm as T,NFormItem as V,NButton as I}from"naive-ui";const J=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},H=["onClick"],Q=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),$={key:1,class:"footer"};var z=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:z}){const K=e,{ScaleViewState:U}=D(),X=o(U),Y=a(null),Z=a(null),ee=a(null),{noDataState:oe,setNoData:ae,resetNodata:te}=C(),ne=F(),{showEvatip:se,isFormBoldOpen:ie,scaleStyle:le,handlePageClass:re,isShowItem:me,handleShowQuestionNumber:ue,hasScore:ce,isPreviewScale:de,showEvaluateEntry:pe,showEvaluateCoundownPage:ve,showScaleFooter:fe,isCancelBtn:ge,isSaveBtn:we,showEvaluateLabel:he,showAnswerParse:ye,propsConfig:ke,evaluatePageProps:Se,evaluateCountdownProps:Ce,isEvaluetaResSituation:be,disableEdit:De,desStart:Ee,desEnd:je,desContent:_e}=E(K,X,{query:ne,scaleViewDom:Y}),{initForm:xe}=j(K,X,z,{query:ne}),{submitMethod:Fe,onSubmitData:Le,onSubmitForm:Pe,handleScoreJson:qe}=_(K,X,z,{query:ne,formRef:ee,countdownDom:Z}),{nextLogicEvent:Ne,handleDynamicDataRelation:Re}=P(K,X),{scaleChange:Ae,labelChange:Be,vodFileList:Me,writeGuage:Oe,closeEvaluateCountdown:Te,showEvaTipModal:Ve}=x(K,X,z,{nextLogicEvent:Ne,handleDynamicDataRelation:Re,isPreviewScale:de,submitMethod:Fe,isEvaluetaResSituation:be,handleScoreJson:qe,disableEdit:De});(()=>{let{id:e}=ne;e&&(X.shareId=e)})();const Ie=e=>{try{te(),xe(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,ae(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};t((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Ie(e):e.guage_id&&Ie(e)}),{immediate:!0}),t((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{xe(o)}))}),{immediate:!0});const Je=q.debounce(Le,300),Ge=()=>{z("onCloseSetting")};return b({getScaleData:()=>({...X}),onSubmitForm:Pe,cancel:Ge}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(fe)}]),ref_key:"scaleViewDom",ref:Y},[m(' <template v-if="state.spinning">\r\n <n-spin :show="state.spinning" description="加载中"></n-spin>\r\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(u,{key:0},[r(oe).noData?(s(),c(N,{key:0,noDataImg:r(oe).noDataImg,noDataTip:r(oe).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(u,{key:1},[r(pe)?(s(),c(A,d({key:0},r(Se),{onWriteGuage:r(Oe)}),null,16,["onWriteGuage"])):(s(),i(u,{key:1},[r(ve)?(s(),c(R,d({key:0,ref_key:"countdownDom",ref:Z},r(Ce),{onCloseEvaluateCountdown:r(Te)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(re),"scale-container-hasfooter":r(fe)}]),style:v(r(le))},[r(ce)?(s(),c(r(M),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(Ee)?(s(),c(O,{key:1,content:r(_e)},null,8,["content"])):m("v-if",!0),f(r(T),{ref_key:"formRef",ref:ee,model:X.form,rules:X.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(s(!0),i(u,null,w(X.formArray,((e,o)=>(s(),i(u,{key:(e.id||e.seq)+o},[r(me)(e)?(s(),c(r(V),{key:0,path:e.val_key,"show-label":!r(L)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(ie)(e)}),innerHTML:r(ue)(e)},null,10,J),r(ie)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(he)(e)?(s(),i("span",W,h(r(he)(e)),1)):m("v-if",!0),r(se)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Ve)(e)},[Q,y(" 查看提示 ")],8,H)):m("v-if",!0)])),default:g((()=>[(s(),c(k(e.renderCom),d(r(ke)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Ae),onOnChange:o=>r(Be)(o,e),onVodFileList:r(Me)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(ye)(e)?(s(),c(B,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"]),r(je)?(s(),c(O,{key:2,content:r(_e)},null,8,["content"])):m("v-if",!0)],6),r(fe)?(s(),i("div",$,[m(" 分享的链接 隐藏取消按钮 "),r(ge)?(s(),c(r(I),{key:0,onClick:Ge},{default:g((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.28"))||"取消")]})),_:1})):m("v-if",!0),r(we)?(s(),c(r(I),{key:1,onClick:r(Je),disabled:X.banSubmit,type:"primary"},{default:g((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.244"))||"保存")]})),_:1},8,["onClick","disabled"])):m("v-if",!0),S(e.$slots,"extendBtn")])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,computed as n,createVNode as i,createTextVNode as a,resolveComponent as o,Fragment as t}from"vue";import{NButton as s,NIcon as c,NSpace as u,useDialog as r}from"naive-ui";import d from"./standard-modal.js";import m from"./sign-com.js";import{EyeOutline as v,TrashOutline as p}from"@vicons/ionicons5";import{api as g}from"v-viewer";var w=e({name:"RSign",components:{NButton:s,NIcon:c,NSpace:u,StandardModal:d,SignCom:m},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,s){const u=l(null),d=l(!1),m=l([]),w=r(),f=n((()=>{var l,n;return(null==(n=null==(l=e.item)?void 0:l.setting)?void 0:n.limitPic)||1})),C=n((()=>m.value.length<f.value&&!e.isLock));(()=>{const l=e.form[e.item.val_key];l&&Array.isArray(l)&&l.length&&(m.value=l)})();const k=()=>{d.value=!1},y=()=>{u.value.reset()},h=()=>{u.value.generate().then((l=>{console.log(l),m.value.push(l),s.emit("scaleChange",m.value,e.item),k()})).catch((e=>{console.log(e)}))},b=()=>{e.isLock||(d.value=!0)},L=()=>i("div",{class:"sigan-content-wrap"},[m.value.map(((l,n)=>i("div",{class:"sign-item"},[i("img",{src:l.url},null),i("div",null,[i(c,{component:v,onClick:()=>(e=>{const l=m.value.map((e=>e.url)).filter(Boolean);l.length&&g({images:l,options:{toolbar:!0,initialViewIndex:e}})})(n)},null),!e.isLock&&i(c,{component:p,onClick:()=>(l=>{var n,i;e.isLock||w.warning({title:"提示",content:"确认要删除签名吗?",positiveText:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.33"))||"确定",negativeText:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.32"))||"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:()=>{m.value.splice(l,1),s.emit("scaleChange",m.value,e.item)},onNegativeClick(){}})})(n)},null)])]))),C.value&&i("div",{class:"add-sign-wrap",onClick:b},[i("i",{class:"scale-view-iconfont icon-scale-view-qianming"},null),i("span",null,[a("添加签名")])])]),B=()=>i(o("standard-modal"),{class:"r-sign-modal",visible:d.value,title:e.item.title,modalWidth:"652px",modalHeight:"476px",handleOk:h,cancel:k},{default:()=>i(o("sign-com"),{ref:u,isCrop:!0},null),action:()=>i(t,null,[i(o("n-space"),null,{default:()=>[i(o("n-button"),{size:"small",onClick:k},{default:()=>{var e;return[a((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.32"))||"取消")]}}),i(o("n-button"),{size:"small",onClick:y,type:"primary"},{default:()=>[a("重签")]}),i(o("n-button"),{size:"small",onClick:h,type:"primary"},{default:()=>{var e;return[a((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.428"))||"确认")]}})]})])});return()=>i("div",{class:"c-sign-wrap"},[L(),B()])}});export{w as default};
1
+ import{defineComponent as e,ref as l,computed as n,createVNode as i,createTextVNode as a,resolveComponent as o,Fragment as t}from"vue";import{NButton as s,NIcon as c,NSpace as u,useDialog as r}from"naive-ui";import d from"./standard-modal.js";import m from"./sign-com.js";import{EyeOutline as v,TrashOutline as p}from"@vicons/ionicons5";import{api as g}from"v-viewer";var w=e({name:"RSign",components:{NButton:s,NIcon:c,NSpace:u,StandardModal:d,SignCom:m},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,s){const u=l(null),d=l(!1),m=l([]),w=r(),f=n((()=>{var l,n;return(null==(n=null==(l=e.item)?void 0:l.setting)?void 0:n.limitPic)||1})),C=n((()=>m.value.length<f.value&&!e.isLock));(()=>{const l=e.form[e.item.val_key];l&&Array.isArray(l)&&l.length&&(m.value=l)})();const k=()=>{d.value=!1},y=()=>{u.value.reset()},h=()=>{u.value.generate().then((l=>{console.log(l),m.value.push(l),s.emit("scaleChange",m.value,e.item),k()})).catch((e=>{console.log(e)}))},b=()=>{e.isLock||(d.value=!0)},L=()=>i("div",{class:"sigan-content-wrap"},[m.value.map(((l,n)=>i("div",{class:"sign-item"},[i("img",{src:l.url},null),i("div",null,[i(c,{component:v,onClick:()=>(e=>{const l=m.value.map((e=>e.url)).filter(Boolean);l.length&&g({images:l,options:{toolbar:!0,initialViewIndex:e}})})(n)},null),!e.isLock&&i(c,{component:p,onClick:()=>(l=>{var n,i;e.isLock||w.warning({title:"提示",content:"确认要删除签名吗?",positiveText:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.27"))||"确定",negativeText:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.28"))||"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:()=>{m.value.splice(l,1),s.emit("scaleChange",m.value,e.item)},onNegativeClick(){}})})(n)},null)])]))),C.value&&i("div",{class:"add-sign-wrap",onClick:b},[i("i",{class:"scale-view-iconfont icon-scale-view-qianming"},null),i("span",null,[a("添加签名")])])]),B=()=>i(o("standard-modal"),{class:"r-sign-modal",visible:d.value,title:e.item.title,modalWidth:"652px",modalHeight:"476px",handleOk:h,cancel:k},{default:()=>i(o("sign-com"),{ref:u,isCrop:!0},null),action:()=>i(t,null,[i(o("n-space"),null,{default:()=>[i(o("n-button"),{size:"small",onClick:k},{default:()=>{var e;return[a((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.28"))||"取消")]}}),i(o("n-button"),{size:"small",onClick:y,type:"primary"},{default:()=>[a("重签")]}),i(o("n-button"),{size:"small",onClick:h,type:"primary"},{default:()=>{var e;return[a((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.428"))||"确认")]}})]})])});return()=>i("div",{class:"c-sign-wrap"},[L(),B()])}});export{w as default};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as i,reactive as l,ref as n,createVNode as t,resolveComponent as a}from"vue";import{NModal as o,NButton as d,NTooltip as s}from"naive-ui";var u=e({name:"StandardModal",components:{NModal:o,NButton:d,NTooltip:s},props:{title:{type:[Function,String],default:""},changeSize:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},modalWidth:{type:String,default:""},modalHeight:{type:String,default:""},handleOk:{type:Function,default:()=>({})},cancel:{type:Function,default:()=>({})},visible:{type:Boolean,default:!1}},emits:["update:visible","onClose"],setup(e,o){const d=i((()=>e.modalWidth||"50vw")),s=i((()=>e.modalHeight||"50vh")),u=l({modalWidth:d.value,modalHeight:s.value,maxHeight:"620px",isChangeWindow:!1}),c=n(!1),h=()=>{e.handleOk()},v=()=>{e.cancel(),o.emit("update:visible",!1)},g=()=>{const i=null==e?void 0:e.title,l=typeof i;return t("div",{class:"n-dialog__title-content"},["string"===l?t("div",null,[i]):null,"function"===l?t("div",null,[i()]):null,t("div",{class:"svg-wrap"},[e.changeSize?t("i",{onClick:()=>(document.body.clientHeight,void Object.assign(u,{isChangeWindow:!u.isChangeWindow,modalWidth:u.modalWidth===d.value?"100vw":d.value,modalHeight:u.modalHeight===s.value?"100vh":s.value})),class:c.value?"scale-view-iconfont icon-scale-view-menzhenyishengzhanxitongtubiaozuixiaohua2":"scale-view-iconfont icon-scale-view-menzhenyishengzhanxitongtubiaozuidahua"},null):null,e.closable?t("i",{class:"scale-view-iconfont icon-scale-view-menzhenyishengzhanxitongtubiaoguanbi",onClick:()=>v()},null):null])])};return()=>(()=>{var i,l;const n={...o.slots};return n.header||(n.header=g),t(a("n-modal"),{class:"c-scale-modal-container",show:e.visible,"mask-closable":!1,"show-icon":!1,closable:!1,style:{width:u.modalWidth,height:u.modalHeight},preset:"dialog","positive-text":(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.428"))||"确认","negative-text":(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.32"))||"取消","on-positive-click":h,"on-negative-click":v,positiveButtonProps:{type:"primary"}},{...n})})()}});export{u as default};
1
+ import{defineComponent as e,computed as i,reactive as l,ref as n,createVNode as t,resolveComponent as a}from"vue";import{NModal as o,NButton as d,NTooltip as s}from"naive-ui";var u=e({name:"StandardModal",components:{NModal:o,NButton:d,NTooltip:s},props:{title:{type:[Function,String],default:""},changeSize:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},modalWidth:{type:String,default:""},modalHeight:{type:String,default:""},handleOk:{type:Function,default:()=>({})},cancel:{type:Function,default:()=>({})},visible:{type:Boolean,default:!1}},emits:["update:visible","onClose"],setup(e,o){const d=i((()=>e.modalWidth||"50vw")),s=i((()=>e.modalHeight||"50vh")),u=l({modalWidth:d.value,modalHeight:s.value,maxHeight:"620px",isChangeWindow:!1}),c=n(!1),h=()=>{e.handleOk()},v=()=>{e.cancel(),o.emit("update:visible",!1)},g=()=>{const i=null==e?void 0:e.title,l=typeof i;return t("div",{class:"n-dialog__title-content"},["string"===l?t("div",null,[i]):null,"function"===l?t("div",null,[i()]):null,t("div",{class:"svg-wrap"},[e.changeSize?t("i",{onClick:()=>(document.body.clientHeight,void Object.assign(u,{isChangeWindow:!u.isChangeWindow,modalWidth:u.modalWidth===d.value?"100vw":d.value,modalHeight:u.modalHeight===s.value?"100vh":s.value})),class:c.value?"scale-view-iconfont icon-scale-view-menzhenyishengzhanxitongtubiaozuixiaohua2":"scale-view-iconfont icon-scale-view-menzhenyishengzhanxitongtubiaozuidahua"},null):null,e.closable?t("i",{class:"scale-view-iconfont icon-scale-view-menzhenyishengzhanxitongtubiaoguanbi",onClick:()=>v()},null):null])])};return()=>(()=>{var i,l;const n={...o.slots};return n.header||(n.header=g),t(a("n-modal"),{class:"c-scale-modal-container",show:e.visible,"mask-closable":!1,"show-icon":!1,closable:!1,style:{width:u.modalWidth,height:u.modalHeight},preset:"dialog","positive-text":(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.428"))||"确认","negative-text":(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.28"))||"取消","on-positive-click":h,"on-negative-click":v,positiveButtonProps:{type:"primary"}},{...n})})()}});export{u as default};
@@ -1 +1 @@
1
- import{h as e}from"vue";import{useDialog as a,useMessage as t}from"naive-ui";const i=(i,o,n,l)=>{const s=a(),r=t(),{nextLogicEvent:c,handleDynamicDataRelation:u,isPreviewScale:v,submitMethod:d,isEvaluetaResSituation:E,handleScoreJson:p,disableEdit:C}=l,g=a=>{var t;s.warning({title:"提示",content:()=>e("div",{class:"evatip-container"},[e("span","答案解析:"),e("p",a)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.33"))||"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})};return{scaleChange:(e,a,t)=>{const{choiceObj:n,isSetObj:l}=t||{};switch(a.type.includes("SELECT")||(o.form[a.val_key]=e),a.type){case"SELECT":case"EVALUATE_SELECT":{const{value:t,list:i=[]}=e;o.form[a.val_key]=t,c(e,a,o.formArray),u(i,a,o.formArray)}break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":l&&(o.choiceComObj[a.val_key]=n),c(e,a,o.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":c(e,a,o.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":o.submitForm[a.val_key]=e}!C.value&&E.value&&a.type.includes("EVALUATE_")&&(async()=>{var e;const a=null==(e=i.scaleApiConfig)?void 0:e.getEvaluateResult;if(!a||"function"!=typeof a)return void r.error("getEvaluateResult Is not a function");const{guageId:t}=o.config;if(!t)return;const n=p(),l={gaugeId:t,scoreJson:JSON.stringify(n)},s=await a(l);if(!s)return;const c={...s};delete c.itemScoreMap,o.evaResultObj=c})()},labelChange:(e,a)=>{o.form[a.val_key]=((e,a)=>{const t=a.val_key;if(!e||!e.length)return t&&(o.labelSelectedListObj[t]=[]),{labelStr:"",labels:[]};const i=e||[],n=[],l=[];return i.forEach((e=>{l.push(e),n.push(e.labelName)})),o.labelSelectedList=i,t&&(o.labelSelectedListObj[t]=i),{labelStr:n.join(","),labels:l}})(e,a)},vodFileList:(e,a)=>{o.form[a.val_key]=e},writeGuage:e=>{o.showEvaluateSettingWrap=!1,o.showEvaluateCountdown=!!e,n("startWriteScale")},closeEvaluateCountdown:()=>{var e;o.showEvaluateCountdown=!1,v.value||(o.banSubmit=!0,d(),s.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.33"))||"确定",onPositiveClick:()=>({})}))},showEvaTipModal:async e=>{var a;if(o.evatipMap[e.id])return void g(o.evatipMap[e.id]);const t="getSubjectAnswer",n=(null==(a=i.scaleApiConfig)?void 0:a[t])||null;if(!n||"function"!=typeof n)return void r.error(`${t} Is not a function`);const l=await n(e.id);l&&(o.evatipMap[e.id]||(o.evatipMap[e.id]=l,g(l)))}}};export{i as ScaleViewMethods};
1
+ import{h as e}from"vue";import{useDialog as a,useMessage as t}from"naive-ui";const i=(i,o,n,l)=>{const s=a(),r=t(),{nextLogicEvent:c,handleDynamicDataRelation:u,isPreviewScale:v,submitMethod:d,isEvaluetaResSituation:E,handleScoreJson:p,disableEdit:C}=l,g=a=>{var t;s.warning({title:"提示",content:()=>e("div",{class:"evatip-container"},[e("span","答案解析:"),e("p",a)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.27"))||"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})};return{scaleChange:(e,a,t)=>{const{choiceObj:n,isSetObj:l}=t||{};switch(a.type.includes("SELECT")||(o.form[a.val_key]=e),a.type){case"SELECT":case"EVALUATE_SELECT":{const{value:t,list:i=[]}=e;o.form[a.val_key]=t,c(e,a,o.formArray),u(i,a,o.formArray)}break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":l&&(o.choiceComObj[a.val_key]=n),c(e,a,o.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":c(e,a,o.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":o.submitForm[a.val_key]=e}!C.value&&E.value&&a.type.includes("EVALUATE_")&&(async()=>{var e;const a=null==(e=i.scaleApiConfig)?void 0:e.getEvaluateResult;if(!a||"function"!=typeof a)return void r.error("getEvaluateResult Is not a function");const{guageId:t}=o.config;if(!t)return;const n=p(),l={gaugeId:t,scoreJson:JSON.stringify(n)},s=await a(l);if(!s)return;const c={...s};delete c.itemScoreMap,o.evaResultObj=c})()},labelChange:(e,a)=>{o.form[a.val_key]=((e,a)=>{const t=a.val_key;if(!e||!e.length)return t&&(o.labelSelectedListObj[t]=[]),{labelStr:"",labels:[]};const i=e||[],n=[],l=[];return i.forEach((e=>{l.push(e),n.push(e.labelName)})),o.labelSelectedList=i,t&&(o.labelSelectedListObj[t]=i),{labelStr:n.join(","),labels:l}})(e,a)},vodFileList:(e,a)=>{o.form[a.val_key]=e},writeGuage:e=>{o.showEvaluateSettingWrap=!1,o.showEvaluateCountdown=!!e,n("startWriteScale")},closeEvaluateCountdown:()=>{var e;o.showEvaluateCountdown=!1,v.value||(o.banSubmit=!0,d(),s.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.27"))||"确定",onPositiveClick:()=>({})}))},showEvaTipModal:async e=>{var a;if(o.evatipMap[e.id])return void g(o.evatipMap[e.id]);const t="getSubjectAnswer",n=(null==(a=i.scaleApiConfig)?void 0:a[t])||null;if(!n||"function"!=typeof n)return void r.error(`${t} Is not a function`);const l=await n(e.id);l&&(o.evatipMap[e.id]||(o.evatipMap[e.id]=l,g(l)))}}};export{i as ScaleViewMethods};
@@ -1 +1 @@
1
- import{h as t}from"vue";import{isSortItem as e,isOnlyOptions as i,isEvaluation as o,getQueryVariable as n}from"../utils/judge-types.js";import"xe-utils";import s from"moment";import r from"../../../../shared/utils/vexutilsExpand.js";import{ScaleViewComputed as a}from"./scaleview-computed.js";import{useDialog as l,useMessage as u}from"naive-ui";const f=(f,d,m,p)=>{const c=l(),g=u(),{formRef:v,countdownDom:y}=p,{showEvent:C,formKey:h,showEvaluateEntry:b,scaleEdit:O,showEvaluateCoundownPage:w,skipCover:A,hasScore:S}=a(f,d,p),T=()=>{const t=d.defaultFormArray.find((t=>"SPREAD_PARAMS"===t.type));if(t){r.isJSON(t.setting)&&(t.setting=JSON.parse(t.setting));const e=h(t);d.submitForm[e]=t.setting.spreadParams.domains.map((t=>{const e={};return"1"==t.valueType?e[t.name]=t.value:"2"==t.valueType&&(e[t.name]=n(t.value,d,f.params)),e}))}const e=d.defaultFormArray.find((t=>"CHECKBOX_BLOCK"==t.type));e&&Array.isArray(d.form[e.title])&&"customList"===f.type&&(d.form[e.title]=d.form[e.title].join(","));const i=x();let o;if("customList"===f.type)o={definedListId:f.ids.guage_id,dbId:f.ids.db_id,scoreJson:JSON.stringify(i)};else{const{guageId:t,randomId:e}=d.config;o=Object.assign(f.params,{guageId:t,scoreJson:JSON.stringify(i),randomId:e})}d.shareId&&(o.shareId=d.shareId);const s=d.defaultFormArray.find((t=>"SUCCESS_TIP"===t.type));if(s){const t=r.isJSON(s.setting)?JSON.parse(s.setting):s.setting;o.tipSetting=JSON.stringify({tipMode:t.tipMode,tipType:t.tipType,tipText:t.tipText,tipApi:t.tipApi})}const a=d.defaultFormArray.find((t=>"CALLBACK_INTERFACE"===t.type));let l=!1;a&&(l=C(a,!0));return{params:o,hasCallbackItem:a,isCallback:l}},E=(t,e)=>{if(!e.length)return e;const{type:o,options:n,scoreConfigs:s}=t;let r=n;if("EVALUATE_CHECKBOX_BLOCK"===o&&(r=(null==s?void 0:s.scoreRules)||[]),!r.length)return e;const a=i(o)?"key":"value",l=[];return r.forEach((t=>{const i=t[a];e.includes(i)&&l.push(i)})),l},x=()=>{const t=Object.assign({},d.form,d.submitForm),o={};if(!Object.keys(t).length)return{};for(const n in t){const r=d.formArray.find((t=>h(t)==n));if(n&&r){let a=n,l=t[n]?t[n]:null;if(r&&r.databaseTitle&&(a=r.databaseTitle),"customList"==f.type&&r&&r.setting&&1!=r.setting.startToStop&&t[n]&&"DATETIME"==r.type&&(r.setting&&"time"==r.setting.dateType&&t[n]&&(t[n]=s().format("YYYY-MM-DD ")+t[n]),r.setting&&"date"==r.setting.dateType&&t[n]&&(t[n]=s(t[n]).format("YYYY-MM-DD ")+s().format("HH:mm:ss"))),e(r)&&l&&(l=E(r,l),l=(null==l?void 0:l.length)?l:null),i(r.type)&&l){const{options:t}=r,e=r.val_key,i=d.choiceComObj[e];if("RADIO_BLOCK"===r.type&&l&&(l=L(l,t,i)),"CHECKBOX_BLOCK"===r.type&&(null==l?void 0:l.length)){l=I(l,t,i)}}o[a]=l}else o[n]=t[n]}return o},I=(t,e,i)=>{const o=[];let n,s=0;for(;s<t.length;s++){n=t[s];const r=e.find(((t,e)=>e+1===n));if(r&&!r.prefix&&!r.suffix){o.push(r.value);continue}const a=L(n,e,i);o.push(a)}return o},L=(t,e,i)=>{const{othersText:o,optionsPreSuffixObj:n={}}=i||{};if("other"===t)return o||"其他";const s=e.find(((e,i)=>i+1===t));if(!s)return;if(!s.prefix&&!s.suffix)return s.value;let r=n[t]||"";return s.prefix?r=s.prefix+r:r+=s.suffix,r},j=()=>new Promise((t=>{var e;null==(e=v.value)||e.validate((e=>{var i;if(e){console.log(e);const o=(null==(i=e[0])?void 0:i[0])||{};let n=o.field;const s=o.message,r=d.formArray.find((t=>t.databaseTitle===n));return r&&(n=r.title),g.error(n+s),t(!1),!1}{const e=T();t(e)}}))})),B=e=>{var i,o;c.warning({title:"温馨提示",content:()=>t("div",{style:{paddingLeft:"30px"}},e),positiveText:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.33"))||"确定",negativeText:(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.32"))||"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:async()=>{const t=await j();m("onSubmit",t)},onNegativeClick(){}})};return{submitMethod:T,confirmSubmit:B,onSubmitForm:j,onSubmitData:()=>{var t;if(!d.formArray.find((t=>o(t.type))))return void B("确认要提交吗?");const{evaluateResultSetting:e}=d.config;if(!e||!Object.keys(e).length&&!b.value||O.value)return void B("确认要结束测评吗?");if("formIframe"==f.openType&&b.value)return void m("submitNoRequest");let i="确定要提前结束测评吗?";if(w.value&&(null==(t=y.value)?void 0:t.getCountdownObj)){const t=y.value.getCountdownObj(),{setAnswered:e,totalLen:o}=t;if(e<o)i="存在未作答的题目,确定要提前结束测评吗?";else{!(d.showEvaluateCountdown&&!A.value)&&(i="确认要结束测评吗?")}}A.value&&S.value&&(i="确认要结束测评吗?"),B(i)},handleScoreJson:x}};export{f as ScaleViewSubmit};
1
+ import{h as t}from"vue";import{isSortItem as e,isOnlyOptions as i,isEvaluation as o,getQueryVariable as n}from"../utils/judge-types.js";import"xe-utils";import s from"moment";import r from"../../../../shared/utils/vexutilsExpand.js";import{ScaleViewComputed as a}from"./scaleview-computed.js";import{useDialog as l,useMessage as u}from"naive-ui";const f=(f,d,m,p)=>{const c=l(),g=u(),{formRef:v,countdownDom:y}=p,{showEvent:C,formKey:h,showEvaluateEntry:b,scaleEdit:O,showEvaluateCoundownPage:w,skipCover:A,hasScore:S}=a(f,d,p),T=()=>{const t=d.defaultFormArray.find((t=>"SPREAD_PARAMS"===t.type));if(t){r.isJSON(t.setting)&&(t.setting=JSON.parse(t.setting));const e=h(t);d.submitForm[e]=t.setting.spreadParams.domains.map((t=>{const e={};return"1"==t.valueType?e[t.name]=t.value:"2"==t.valueType&&(e[t.name]=n(t.value,d,f.params)),e}))}const e=d.defaultFormArray.find((t=>"CHECKBOX_BLOCK"==t.type));e&&Array.isArray(d.form[e.title])&&"customList"===f.type&&(d.form[e.title]=d.form[e.title].join(","));const i=x();let o;if("customList"===f.type)o={definedListId:f.ids.guage_id,dbId:f.ids.db_id,scoreJson:JSON.stringify(i)};else{const{guageId:t,randomId:e}=d.config;o=Object.assign(f.params,{guageId:t,scoreJson:JSON.stringify(i),randomId:e})}d.shareId&&(o.shareId=d.shareId);const s=d.defaultFormArray.find((t=>"SUCCESS_TIP"===t.type));if(s){const t=r.isJSON(s.setting)?JSON.parse(s.setting):s.setting;o.tipSetting=JSON.stringify({tipMode:t.tipMode,tipType:t.tipType,tipText:t.tipText,tipApi:t.tipApi})}const a=d.defaultFormArray.find((t=>"CALLBACK_INTERFACE"===t.type));let l=!1;a&&(l=C(a,!0));return{params:o,hasCallbackItem:a,isCallback:l}},E=(t,e)=>{if(!e.length)return e;const{type:o,options:n,scoreConfigs:s}=t;let r=n;if("EVALUATE_CHECKBOX_BLOCK"===o&&(r=(null==s?void 0:s.scoreRules)||[]),!r.length)return e;const a=i(o)?"key":"value",l=[];return r.forEach((t=>{const i=t[a];e.includes(i)&&l.push(i)})),l},x=()=>{const t=Object.assign({},d.form,d.submitForm),o={};if(!Object.keys(t).length)return{};for(const n in t){const r=d.formArray.find((t=>h(t)==n));if(n&&r){let a=n,l=t[n]?t[n]:null;if(r&&r.databaseTitle&&(a=r.databaseTitle),"customList"==f.type&&r&&r.setting&&1!=r.setting.startToStop&&t[n]&&"DATETIME"==r.type&&(r.setting&&"time"==r.setting.dateType&&t[n]&&(t[n]=s().format("YYYY-MM-DD ")+t[n]),r.setting&&"date"==r.setting.dateType&&t[n]&&(t[n]=s(t[n]).format("YYYY-MM-DD ")+s().format("HH:mm:ss"))),e(r)&&l&&(l=E(r,l),l=(null==l?void 0:l.length)?l:null),i(r.type)&&l){const{options:t}=r,e=r.val_key,i=d.choiceComObj[e];if("RADIO_BLOCK"===r.type&&l&&(l=L(l,t,i)),"CHECKBOX_BLOCK"===r.type&&(null==l?void 0:l.length)){l=I(l,t,i)}}o[a]=l}else o[n]=t[n]}return o},I=(t,e,i)=>{const o=[];let n,s=0;for(;s<t.length;s++){n=t[s];const r=e.find(((t,e)=>e+1===n));if(r&&!r.prefix&&!r.suffix){o.push(r.value);continue}const a=L(n,e,i);o.push(a)}return o},L=(t,e,i)=>{const{othersText:o,optionsPreSuffixObj:n={}}=i||{};if("other"===t)return o||"其他";const s=e.find(((e,i)=>i+1===t));if(!s)return;if(!s.prefix&&!s.suffix)return s.value;let r=n[t]||"";return s.prefix?r=s.prefix+r:r+=s.suffix,r},j=()=>new Promise((t=>{var e;null==(e=v.value)||e.validate((e=>{var i;if(e){console.log(e);const o=(null==(i=e[0])?void 0:i[0])||{};let n=o.field;const s=o.message,r=d.formArray.find((t=>t.databaseTitle===n));return r&&(n=r.title),g.error(n+s),t(!1),!1}{const e=T();t(e)}}))})),B=e=>{var i,o;c.warning({title:"温馨提示",content:()=>t("div",{style:{paddingLeft:"30px"}},e),positiveText:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.27"))||"确定",negativeText:(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.28"))||"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:async()=>{const t=await j();m("onSubmit",t)},onNegativeClick(){}})};return{submitMethod:T,confirmSubmit:B,onSubmitForm:j,onSubmitData:()=>{var t;if(!d.formArray.find((t=>o(t.type))))return void B("确认要提交吗?");const{evaluateResultSetting:e}=d.config;if(!e||!Object.keys(e).length&&!b.value||O.value)return void B("确认要结束测评吗?");if("formIframe"==f.openType&&b.value)return void m("submitNoRequest");let i="确定要提前结束测评吗?";if(w.value&&(null==(t=y.value)?void 0:t.getCountdownObj)){const t=y.value.getCountdownObj(),{setAnswered:e,totalLen:o}=t;if(e<o)i="存在未作答的题目,确定要提前结束测评吗?";else{!(d.showEvaluateCountdown&&!A.value)&&(i="确认要结束测评吗?")}}A.value&&S.value&&(i="确认要结束测评吗?"),B(i)},handleScoreJson:x}};export{f as ScaleViewSubmit};
@@ -1 +1 @@
1
- import{createElementVNode as e,defineComponent as l,ref as t,reactive as a,computed as i,onMounted as o,watch as s,openBlock as n,createElementBlock as d,Fragment 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 g,vShow as w,createCommentVNode as v,mergeProps as f,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 B from"./LabelFormContent.vue.js";import{handleLabelColor as W}from"../../../shared/utils/vexutils.js";import P from"../../../shared/utils/vexutilsExpand.js";var _,E;const A={class:"c-select-label"},H=e("span",null,(null==(_=window.getLanguageByCode)?void 0:_.call(window,"10010.1.522"))||"常用",-1),z={key:2,class:"outexplicit"},F=e("span",null,(null==(E=window.getLanguageByCode)?void 0:E.call(window,"10010.1.518"))||"选择标签",-1),V={class:"svg-wrap"};var T=l({__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(l,{emit:_}){const E=l,T=t(null),U=a({labelVisible:!1,editLabelItem:{},labelSelectedList:[],labelSelectedEdit:[],inited:!1,isChangeWindow:!1,modalWidth:"763px",modalHeight:"404px",maxHeight:"404px",commonLabelList:[],multipleChoiceConfig:{}});const D=i((()=>{const e=(null==E?void 0:E.item)||{};return(1==e.is_edit||e.isShow)&&!E.isDetail})),$=i((()=>{var e,l;let t=null==(e=E.item)?void 0:e.val_key;if(!t||!E.selectedListObj)return E.selectedList;let a=null==(l=E.selectedListObj)?void 0:l[t];return a||E.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)}_("onChange",[...a]),U.labelSelectedList=a},R=e=>{E.isLock||(E.explicit||"init"===e||(U.labelVisible=!0),Q(E.item))},K=()=>{var e;E.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=>{_("onChange",[...e]),U.labelSelectedList=e,q(U.commonLabelList,e),K()}))},Q=async(e,l)=>{const{rows:t,results:a}=await E.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)),{});E.explicit&&(U.multipleChoiceConfig=t),l.forEach((l=>{var t,i,o,s,n,d,c;"typeList"!==l&&("emptyTypes"!==l?P.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(E.item,!0)},Z=()=>{M()},ee=(e,l)=>{E.explicit&&I((()=>{var t;null==(t=T.value)||t.hanldeSetLabelItem(e,l)}))};return o((()=>{E.explicit?R():(async e=>{const{rows:l,results:t}=await E.getLabelList(e);if(!t)return!1;let a=(t.typeList||[]).reduce(((e,l)=>(e[l.typeId]=l.multipleChoice,e)),{});U.multipleChoiceConfig=a})(E.item)})),s((()=>$.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}),s((()=>{var e;return null==(e=E.item)?void 0:e.label_type}),(e=>{e&&"form"==E.sourceType&&(async e=>{var l;let{data:t={}}=await E.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}),(t,a)=>{var i,o;return n(),d(c,null,[e("div",A,[l.explicit?v("v-if",!0):(n(),r(b(x),{key:0,align:"center"},{default:m((()=>{var t;return[(n(!0),d(c,null,p(U.labelSelectedList,(t=>(n(),r(b(S),{bordered:!1,key:t.labelId,style:u(b(W)(t,!0)),closable:b(D)&&!l.isLock,onClose:e=>(e=>{const l=U.labelSelectedList||[],t=l.findIndex((l=>l.labelId==e.labelId));-1!=t&&l.splice(t,1),_("onChange",[...l]),U.labelSelectedList=l,ee(e.labelId,!1)})(t),size:"small"},{default:m((()=>[L(b(O),{placement:"top-start"},{trigger:m((()=>[e("span",null,y(t.labelName),1)])),default:m((()=>[e("span",null,y(t.labelName),1)])),_:2},1024)])),_:2},1032,["style","closable","onClose"])))),128)),l.explicit||l.isLock?v("v-if",!0):h((n(),d("span",{key:0,class:C(["form-add-icon form-add-icon-label",{disable:l.isLock}]),onClick:R},[L(b(k),{class:"add-icon",component:b(N)},null,8,["component"]),g((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.279"))||"新增")],2)),[[w,b(D)]])]})),_:1})),"form"==l.sourceType&&U.commonLabelList.length&&b(D)&&!l.explicit?(n(),r(b(x),{key:1,align:"center",class:"common-label"},{default:m((()=>[H,(n(!0),d(c,null,p(U.commonLabelList,((l,t)=>(n(),r(b(S),{checkable:"",checked:l.isSelect,"onUpdate:checked":e=>function(e,l){l.isSelect=e,J(e,l)}(e,l),key:t,style:u(b(W)(l)),size:"small"},{default:m((()=>[L(b(O),{placement:"top-start"},{trigger:m((()=>[e("span",null,y(l.labelName),1)])),default:m((()=>[e("span",null,y(l.labelName),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])),_:1})):v("v-if",!0),l.explicit&&b(D)?(n(),d("div",z,[L(B,f(t.$attrs,{ref_key:"labelFormContentRef",ref:T,explicit:l.explicit,labelSelectedList:U.labelSelectedList,isChangeWindow:U.isChangeWindow,labelOptions:U.editLabelItem.labelObj,deleteLabel:l.deleteLabel,saveLabelItem:l.saveLabelItem,onUpdateLabelData:Y,onExplicitOnChange:Z}),null,16,["explicit","labelSelectedList","isChangeWindow","labelOptions","deleteLabel","saveLabelItem"])])):v("v-if",!0)]),v(" 弹窗 "),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":a[0]||(a[0]=e=>U.labelVisible=e),onPositiveClick:M,onNegativeClick:K,onClose:K,"mask-closable":!1,"close-on-esc":!1,"show-icon":!1,"negative-text":(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.32"))||"取消","positive-text":(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.33"))||"确定",style:u({width:U.modalWidth})},{header:m((()=>[F,e("div",V,[e("i",{onClick:G,class:C(["iconfont-select-label",U.isChangeWindow?"icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-select-label-menzhenyishengzhanxitongtubiaozuidahua"])},null,2)])])),default:m((()=>[L(B,f(t.$attrs,{ref_key:"labelFormContentRef",ref:T,labelSelectedList:U.labelSelectedList,isChangeWindow:U.isChangeWindow,labelOptions:U.editLabelItem.labelObj,sourceType:l.sourceType,deleteLabel:l.deleteLabel,saveLabelItem:l.saveLabelItem,onUpdateLabelData:Y}),null,16,["labelSelectedList","isChangeWindow","labelOptions","sourceType","deleteLabel","saveLabelItem"])])),_:1},8,["show","class","style"])],64)}}});export{T as default};
1
+ import{createElementVNode as e,defineComponent as l,ref as t,reactive as a,computed as i,onMounted as o,watch as s,openBlock as n,createElementBlock as d,Fragment 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 g,vShow as w,createCommentVNode as v,mergeProps as f,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 B from"./LabelFormContent.vue.js";import{handleLabelColor as W}from"../../../shared/utils/vexutils.js";import P from"../../../shared/utils/vexutilsExpand.js";var _,E;const A={class:"c-select-label"},H=e("span",null,(null==(_=window.getLanguageByCode)?void 0:_.call(window,"10010.1.522"))||"常用",-1),z={key:2,class:"outexplicit"},F=e("span",null,(null==(E=window.getLanguageByCode)?void 0:E.call(window,"10010.1.518"))||"选择标签",-1),V={class:"svg-wrap"};var T=l({__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(l,{emit:_}){const E=l,T=t(null),U=a({labelVisible:!1,editLabelItem:{},labelSelectedList:[],labelSelectedEdit:[],inited:!1,isChangeWindow:!1,modalWidth:"763px",modalHeight:"404px",maxHeight:"404px",commonLabelList:[],multipleChoiceConfig:{}});const D=i((()=>{const e=(null==E?void 0:E.item)||{};return(1==e.is_edit||e.isShow)&&!E.isDetail})),$=i((()=>{var e,l;let t=null==(e=E.item)?void 0:e.val_key;if(!t||!E.selectedListObj)return E.selectedList;let a=null==(l=E.selectedListObj)?void 0:l[t];return a||E.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)}_("onChange",[...a]),U.labelSelectedList=a},R=e=>{E.isLock||(E.explicit||"init"===e||(U.labelVisible=!0),Q(E.item))},K=()=>{var e;E.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=>{_("onChange",[...e]),U.labelSelectedList=e,q(U.commonLabelList,e),K()}))},Q=async(e,l)=>{const{rows:t,results:a}=await E.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)),{});E.explicit&&(U.multipleChoiceConfig=t),l.forEach((l=>{var t,i,o,s,n,d,c;"typeList"!==l&&("emptyTypes"!==l?P.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(E.item,!0)},Z=()=>{M()},ee=(e,l)=>{E.explicit&&I((()=>{var t;null==(t=T.value)||t.hanldeSetLabelItem(e,l)}))};return o((()=>{E.explicit?R():(async e=>{const{rows:l,results:t}=await E.getLabelList(e);if(!t)return!1;let a=(t.typeList||[]).reduce(((e,l)=>(e[l.typeId]=l.multipleChoice,e)),{});U.multipleChoiceConfig=a})(E.item)})),s((()=>$.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}),s((()=>{var e;return null==(e=E.item)?void 0:e.label_type}),(e=>{e&&"form"==E.sourceType&&(async e=>{var l;let{data:t={}}=await E.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}),(t,a)=>{var i,o;return n(),d(c,null,[e("div",A,[l.explicit?v("v-if",!0):(n(),r(b(x),{key:0,align:"center"},{default:m((()=>{var t;return[(n(!0),d(c,null,p(U.labelSelectedList,(t=>(n(),r(b(S),{bordered:!1,key:t.labelId,style:u(b(W)(t,!0)),closable:b(D)&&!l.isLock,onClose:e=>(e=>{const l=U.labelSelectedList||[],t=l.findIndex((l=>l.labelId==e.labelId));-1!=t&&l.splice(t,1),_("onChange",[...l]),U.labelSelectedList=l,ee(e.labelId,!1)})(t),size:"small"},{default:m((()=>[L(b(O),{placement:"top-start"},{trigger:m((()=>[e("span",null,y(t.labelName),1)])),default:m((()=>[e("span",null,y(t.labelName),1)])),_:2},1024)])),_:2},1032,["style","closable","onClose"])))),128)),l.explicit||l.isLock?v("v-if",!0):h((n(),d("span",{key:0,class:C(["form-add-icon form-add-icon-label",{disable:l.isLock}]),onClick:R},[L(b(k),{class:"add-icon",component:b(N)},null,8,["component"]),g((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.279"))||"新增")],2)),[[w,b(D)]])]})),_:1})),"form"==l.sourceType&&U.commonLabelList.length&&b(D)&&!l.explicit?(n(),r(b(x),{key:1,align:"center",class:"common-label"},{default:m((()=>[H,(n(!0),d(c,null,p(U.commonLabelList,((l,t)=>(n(),r(b(S),{checkable:"",checked:l.isSelect,"onUpdate:checked":e=>function(e,l){l.isSelect=e,J(e,l)}(e,l),key:t,style:u(b(W)(l)),size:"small"},{default:m((()=>[L(b(O),{placement:"top-start"},{trigger:m((()=>[e("span",null,y(l.labelName),1)])),default:m((()=>[e("span",null,y(l.labelName),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])),_:1})):v("v-if",!0),l.explicit&&b(D)?(n(),d("div",z,[L(B,f(t.$attrs,{ref_key:"labelFormContentRef",ref:T,explicit:l.explicit,labelSelectedList:U.labelSelectedList,isChangeWindow:U.isChangeWindow,labelOptions:U.editLabelItem.labelObj,deleteLabel:l.deleteLabel,saveLabelItem:l.saveLabelItem,onUpdateLabelData:Y,onExplicitOnChange:Z}),null,16,["explicit","labelSelectedList","isChangeWindow","labelOptions","deleteLabel","saveLabelItem"])])):v("v-if",!0)]),v(" 弹窗 "),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":a[0]||(a[0]=e=>U.labelVisible=e),onPositiveClick:M,onNegativeClick:K,onClose:K,"mask-closable":!1,"close-on-esc":!1,"show-icon":!1,"negative-text":(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.28"))||"取消","positive-text":(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.27"))||"确定",style:u({width:U.modalWidth})},{header:m((()=>[F,e("div",V,[e("i",{onClick:G,class:C(["iconfont-select-label",U.isChangeWindow?"icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-select-label-menzhenyishengzhanxitongtubiaozuidahua"])},null,2)])])),default:m((()=>[L(B,f(t.$attrs,{ref_key:"labelFormContentRef",ref:T,labelSelectedList:U.labelSelectedList,isChangeWindow:U.isChangeWindow,labelOptions:U.editLabelItem.labelObj,sourceType:l.sourceType,deleteLabel:l.deleteLabel,saveLabelItem:l.saveLabelItem,onUpdateLabelData:Y}),null,16,["labelSelectedList","isChangeWindow","labelOptions","sourceType","deleteLabel","saveLabelItem"])])),_:1},8,["show","class","style"])],64)}}});export{T as default};
@@ -1 +1 @@
1
- import{createElementVNode as e,defineComponent as l,ref as i,reactive as a,watch as o,openBlock as t,createElementBlock as n,Fragment as s,createBlock as d,unref as c,withCtx as r,renderList as g,normalizeStyle as u,createVNode as p,toDisplayString as h,createTextVNode as m,createCommentVNode as w,normalizeClass as x}from"vue";import{NSpace as C,NTag as b,NTooltip as f,NIcon as v,NModal as y}from"naive-ui";import{AddCircleOutline as L}from"@vicons/ionicons5";import{cloneDeep as W}from"lodash-es";import k from"./IhoLabelFormContent.vue.js";var H;const _={class:"c-select-label"},z={key:1,class:"outexplicit"},I=e("span",null,(null==(H=window.getLanguageByCode)?void 0:H.call(window,"10010.1.518"))||"选择标签",-1),B={class:"svg-wrap"};var V=l({__name:"IhoSelectLabel",props:{selectedList:{type:Array,default:()=>[]},categoryList:{type:Array,default:()=>[]},explicit:{type:Boolean,default:!1}},emits:["onChange"],setup(l,{emit:H}){const V=l,A=i(null),F=i(),S=a({labelVisible:!1,isChangeWindow:!1,modalWidth:"763px",modalHeight:"404px",maxHeight:"404px"}),E=()=>{V.explicit||(S.labelVisible=!0)},O=()=>{V.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=A.value)||e.handleLabelForm((e=>{H("onChange",[...e]),F.value=e,O()}))},$=()=>{T()};return o((()=>V.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];F.value=W(l)}}),{immediate:!0,deep:!0}),(i,a)=>{var o,W;return t(),n(s,null,[e("div",_,[l.explicit?w("v-if",!0):(t(),d(c(C),{key:0,align:"center"},{default:r((()=>{var i;return[(t(!0),n(s,null,g(F.value,(l=>{return t(),d(c(b),{bordered:!1,key:`${l.classifyId}-${l.labelCode}`,class:"select-label-active",style:u((i=l,{background:i.backgroundColor,color:(null==i?void 0:i.fontColor)||"#fff",borderColor:i.backgroundColor})),size:"small",closable:"",onClose:e=>(e=>{const l=F.value||[],i=l.findIndex((l=>l.classifyId==e.classifyId&&l.labelCode==e.labelCode));i>-1&&l.splice(i,1),F.value=l,H("onChange",[...l])})(l)},{default:r((()=>[p(c(f),{placement:"top-start",duration:0},{trigger:r((()=>[e("span",null,h(l.labelShowText),1)])),default:r((()=>[e("span",null,h(l.labelShowText),1)])),_:2},1024)])),_:2},1032,["style","onClose"]);var i})),128)),l.explicit?w("v-if",!0):(t(),n("span",{key:0,class:"form-add-icon form-add-icon-label",onClick:E},[p(c(v),{class:"add-icon",component:c(L)},null,8,["component"]),m((null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.279"))||"新增")]))]})),_:1})),l.explicit?(t(),n("div",z,[p(k,{ref_key:"labelFormContentRef",ref:A,categoryList:l.categoryList,selectedList:l.selectedList,isChangeWindow:S.isChangeWindow,explicit:l.explicit,onExplicitOnChange:$},null,8,["categoryList","selectedList","isChangeWindow","explicit"])])):w("v-if",!0)]),w(" 弹窗 "),p(c(y),{preset:"dialog",class:x(["label-form-modal-wrap modal-wrap standard-modal standard-modal-white",{"modal-screen":S.isChangeWindow}]),show:S.labelVisible,"onUpdate:show":a[0]||(a[0]=e=>S.labelVisible=e),onPositiveClick:T,onNegativeClick:O,onClose:O,"mask-closable":!1,"close-on-esc":!1,"show-icon":!1,"negative-text":(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.32"))||"取消","positive-text":(null==(W=window.getLanguageByCode)?void 0:W.call(window,"10010.1.33"))||"确定",style:u({width:S.modalWidth})},{header:r((()=>[I,e("div",B,[e("i",{onClick:R,class:x(["iconfont-select-label",S.isChangeWindow?"icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-select-label-menzhenyishengzhanxitongtubiaozuidahua"])},null,2)])])),default:r((()=>[p(k,{ref_key:"labelFormContentRef",ref:A,categoryList:l.categoryList,selectedList:F.value,isChangeWindow:S.isChangeWindow,explicit:l.explicit,onExplicitOnChange:$},null,8,["categoryList","selectedList","isChangeWindow","explicit"])])),_:1},8,["show","class","style"])],64)}}});export{V as default};
1
+ import{createElementVNode as e,defineComponent as l,ref as i,reactive as a,watch as o,openBlock as t,createElementBlock as n,Fragment as s,createBlock as d,unref as c,withCtx as r,renderList as g,normalizeStyle as u,createVNode as p,toDisplayString as h,createTextVNode as m,createCommentVNode as w,normalizeClass as x}from"vue";import{NSpace as C,NTag as b,NTooltip as f,NIcon as v,NModal as y}from"naive-ui";import{AddCircleOutline as L}from"@vicons/ionicons5";import{cloneDeep as W}from"lodash-es";import k from"./IhoLabelFormContent.vue.js";var H;const _={class:"c-select-label"},z={key:1,class:"outexplicit"},I=e("span",null,(null==(H=window.getLanguageByCode)?void 0:H.call(window,"10010.1.518"))||"选择标签",-1),B={class:"svg-wrap"};var V=l({__name:"IhoSelectLabel",props:{selectedList:{type:Array,default:()=>[]},categoryList:{type:Array,default:()=>[]},explicit:{type:Boolean,default:!1}},emits:["onChange"],setup(l,{emit:H}){const V=l,A=i(null),F=i(),S=a({labelVisible:!1,isChangeWindow:!1,modalWidth:"763px",modalHeight:"404px",maxHeight:"404px"}),E=()=>{V.explicit||(S.labelVisible=!0)},O=()=>{V.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=A.value)||e.handleLabelForm((e=>{H("onChange",[...e]),F.value=e,O()}))},$=()=>{T()};return o((()=>V.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];F.value=W(l)}}),{immediate:!0,deep:!0}),(i,a)=>{var o,W;return t(),n(s,null,[e("div",_,[l.explicit?w("v-if",!0):(t(),d(c(C),{key:0,align:"center"},{default:r((()=>{var i;return[(t(!0),n(s,null,g(F.value,(l=>{return t(),d(c(b),{bordered:!1,key:`${l.classifyId}-${l.labelCode}`,class:"select-label-active",style:u((i=l,{background:i.backgroundColor,color:(null==i?void 0:i.fontColor)||"#fff",borderColor:i.backgroundColor})),size:"small",closable:"",onClose:e=>(e=>{const l=F.value||[],i=l.findIndex((l=>l.classifyId==e.classifyId&&l.labelCode==e.labelCode));i>-1&&l.splice(i,1),F.value=l,H("onChange",[...l])})(l)},{default:r((()=>[p(c(f),{placement:"top-start",duration:0},{trigger:r((()=>[e("span",null,h(l.labelShowText),1)])),default:r((()=>[e("span",null,h(l.labelShowText),1)])),_:2},1024)])),_:2},1032,["style","onClose"]);var i})),128)),l.explicit?w("v-if",!0):(t(),n("span",{key:0,class:"form-add-icon form-add-icon-label",onClick:E},[p(c(v),{class:"add-icon",component:c(L)},null,8,["component"]),m((null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.279"))||"新增")]))]})),_:1})),l.explicit?(t(),n("div",z,[p(k,{ref_key:"labelFormContentRef",ref:A,categoryList:l.categoryList,selectedList:l.selectedList,isChangeWindow:S.isChangeWindow,explicit:l.explicit,onExplicitOnChange:$},null,8,["categoryList","selectedList","isChangeWindow","explicit"])])):w("v-if",!0)]),w(" 弹窗 "),p(c(y),{preset:"dialog",class:x(["label-form-modal-wrap modal-wrap standard-modal standard-modal-white",{"modal-screen":S.isChangeWindow}]),show:S.labelVisible,"onUpdate:show":a[0]||(a[0]=e=>S.labelVisible=e),onPositiveClick:T,onNegativeClick:O,onClose:O,"mask-closable":!1,"close-on-esc":!1,"show-icon":!1,"negative-text":(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.28"))||"取消","positive-text":(null==(W=window.getLanguageByCode)?void 0:W.call(window,"10010.1.27"))||"确定",style:u({width:S.modalWidth})},{header:r((()=>[I,e("div",B,[e("i",{onClick:R,class:x(["iconfont-select-label",S.isChangeWindow?"icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-select-label-menzhenyishengzhanxitongtubiaozuidahua"])},null,2)])])),default:r((()=>[p(k,{ref_key:"labelFormContentRef",ref:A,categoryList:l.categoryList,selectedList:F.value,isChangeWindow:S.isChangeWindow,explicit:l.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,ref as l,inject as a,computed as t,watch as i,openBlock as o,createBlock as n,unref as d,normalizeClass as s,withCtx as u,createVNode as r,normalizeStyle as c,createElementVNode as m,createTextVNode as g,renderSlot as h,isRef as v,toDisplayString as w,h as p}from"vue";import{useMessage as f,NModal as L,NCard as b,NButton as y,NCheckbox as x,NSelect as C,NCheckboxGroup as F,NPopover as k,NPopconfirm as I,NIcon as A}from"naive-ui";import{Trash as N}from"@vicons/ionicons5";import{InjectionExportApiConfig as B}from"../constants/index.js";import _ from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import P from"../hooks/useAsyncData.js";import{dragFieldCheckList as S}from"../tool.js";import{cloneDeep as z}from"lodash-es";const E={class:"svg-wrap"},j={class:"flex_right"},H=m("div",{class:"tip"},"提示:支持拖动调整字段顺序,字段导出顺序为从左到右,从上到下。",-1),O={class:"flex_between"},$=["title"];var T=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:T}){const U=e,K="default",M="860px",D="496px",V={class:"select-export-popover"},q=f(),{deleteTableListExportScheme:G,exportTableListScheme:J}=P(),Q=l(!1),R=l(M),W=l({maxHeight:D,height:D}),X=l(!1),Y=l(!0),Z=l([]),ee=a(B),le=t((()=>U.curProgram.schemeId));function ae(){T("updateShowAllFieldList",U.showAllFieldList)}function te({option:e}){return p("span",e.schemeName)}function ie(e){var l,a;const t=[p(k,{trigger:"hover",duration:0},{default:()=>e.schemeName,trigger:()=>p("span",{class:"content"},e.schemeName)})],i=[p(I,{placement:"top-start",positiveText:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.428"))||"确认",negativeText:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.32"))||"取消",onPositiveClick:()=>function(e){var l;const{schemeId:a}=U.curProgram;if(a===e.schemeId)return q.warning((null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.430"))||"当前正在使用该方案,请先切换其他方案再删除");!async function(e){var l,a;if(!U.tableListId)return q.warning((null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.424"))||"请传入列表id");try{await G({id:U.tableListId,schemeId:e},ee)&&q.success((null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.411"))||"删除成功")}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}(e.schemeId)}(e)},{trigger:()=>p(A,{onclick:oe},{default:()=>p(N)}),default:()=>"确定删除该导出方案吗?"})],o=e.schemeId===K?[t]:[t,i];return p("div",{class:"flex-between"},o)}function oe(e){e.stopPropagation()}function ne(e){T("updateCurProgram",e)}function de(){!async function(){var e,l,a;if(!U.tableListId)return q.warning((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.424"))||"请传入列表id");if(Z.value.length<1)return q.warning((null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.426"))||"请至少勾选一个字段");try{const{schemeId:e}=U.curProgram,l=U.programOptions.find((l=>l.schemeId===e)),t={fieldKeys:S(U.showAllFieldList,Z.value),lastUsedSchemeName:l?l.schemeName:"",schemeId:l?l.schemeId:"",schemeName:l?l.schemeName:"",tableListId:U.tableListId};await J(t,ee)&&(q.success((null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.427"))||"导出成功"),ue())}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}()}function se(e){var l,a,t;Y.value=!1,Z.value=e?(null==(l=U.showAllFieldList)?void 0:l.map((e=>e.columnName)))||[]:(null==(t=null==(a=U.showAllFieldList)?void 0:a.filter((e=>e.fixedExport)))?void 0:t.map((e=>e.columnName)))||[]}function ue(){T("cancelModal"),R.value=M,W.value={height:D,maxHeight:D},Q.value=!1}function re(){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=>{U.showAllFieldList.length>0&&(Y.value=e.length>0&&e.length<U.showAllFieldList.length,X.value=e.length===U.showAllFieldList.length,T("updateFieldCheckList",e))}),{immediate:!0}),i((()=>U.curProgram),(e=>{e&&function(e){const l=U.programOptions.find((l=>l.schemeId===e));if(l){let a=[];const t=U.downLoadFieldList.filter((e=>e.fixedExport)).map((e=>e.columnName)),i=l.fieldKeys.filter((e=>!t.includes(e)));if(Z.value=[...i,...t],e===K){const e=z(U.downLoadFieldList);return void T("updateShowAllFieldList",e)}Z.value.forEach((e=>{const l=U.downLoadFieldList.find((l=>l.columnName===e));l&&a.push(l)}));const o=U.downLoadFieldList.filter((e=>!Z.value.includes(e.columnName))),n=[...a,...o];T("updateShowAllFieldList",n)}}(e.schemeId)}),{immediate:!0}),(l,a)=>(o(),n(d(L),{class:s(["table-export-field-modal",{"modal-screen":Q.value}]),show:e.visible,maskClosable:!1,width:R.value,bodyStyle:W.value,closable:!1,centered:"",onPositiveClick:de,onNegativeClick:ue},{default:u((()=>{var t;return[r(d(b),{style:c({width:R.value,...W.value}),title:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.421"))||"选择导出字段",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":u((()=>[m("div",E,[m("i",{onClick:re,class:s(["iconfont-table-export-field",Q.value?"icon-table-export-field-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-export-field-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),m("i",{onClick:ue,class:"iconfont-table-export-field icon-table-export-field-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:u((()=>[m("div",j,[r(d(y),{onClick:ue},{default:u((()=>{var e;return[g((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.32"))||"取消")]})),_:1}),h(l.$slots,"add"),r(d(y),{type:"info",onClick:de},{default:u((()=>{var e;return[g((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.422"))||"导出")]})),_:1})])])),default:u((()=>[H,m("header",O,[r(d(x),{checked:X.value,"onUpdate:checked":[a[0]||(a[0]=e=>X.value=e),se],indeterminate:Y.value},{default:u((()=>{var e;return[g((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.37"))||"全选")]})),_:1},8,["checked","indeterminate"]),r(d(C),{style:{width:"200px"},value:d(le),"onUpdate:value":[a[1]||(a[1]=e=>v(le)?le.value=e:null),ne],filterable:"","label-field":"schemeName","value-field":"schemeId","show-checkmark":!1,"render-label":ie,"render-tag":te,"menu-props":V,options:e.programOptions},null,8,["value","options"])]),r(d(F),{value:Z.value,"onUpdate:value":a[2]||(a[2]=e=>Z.value=e)},{default:u((()=>[r(d(_),{class:"draggable-checkbox-list",list:e.showAllFieldList,animation:"300",itemKey:"columnName",onEnd:ae},{item:u((({element:e})=>{var l;return[r(d(x),{disabled:e.fixedExport,class:s(Z.value.includes(e.columnName)?"":"checkbox-disabled"),value:e.columnName,label:null!=(l=e.alias)?l:e.title},{default:u((()=>{var l,a;return[m("span",{title:null!=(l=e.alias)?l:e.title},w(null!=(a=e.alias)?a:e.title),9,$)]})),_:2},1032,["disabled","class","value","label"])]})),_:1},8,["list"])])),_:1},8,["value"])])),_:3},8,["style"])]})),_:3},8,["class","show","width","bodyStyle"]))}});export{T as default};
1
+ import{defineComponent as e,ref as l,inject as a,computed as t,watch as i,openBlock as o,createBlock as n,unref as d,normalizeClass as s,withCtx as u,createVNode as r,normalizeStyle as c,createElementVNode as m,createTextVNode as g,renderSlot as h,isRef as v,toDisplayString as w,h as p}from"vue";import{useMessage as f,NModal as L,NCard as b,NButton as y,NCheckbox as x,NSelect as C,NCheckboxGroup as F,NPopover as k,NPopconfirm as I,NIcon as A}from"naive-ui";import{Trash as N}from"@vicons/ionicons5";import{InjectionExportApiConfig as B}from"../constants/index.js";import _ from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import P from"../hooks/useAsyncData.js";import{dragFieldCheckList as S}from"../tool.js";import{cloneDeep as z}from"lodash-es";const E={class:"svg-wrap"},j={class:"flex_right"},H=m("div",{class:"tip"},"提示:支持拖动调整字段顺序,字段导出顺序为从左到右,从上到下。",-1),O={class:"flex_between"},$=["title"];var T=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:T}){const U=e,K="default",M="860px",D="496px",V={class:"select-export-popover"},q=f(),{deleteTableListExportScheme:G,exportTableListScheme:J}=P(),Q=l(!1),R=l(M),W=l({maxHeight:D,height:D}),X=l(!1),Y=l(!0),Z=l([]),ee=a(B),le=t((()=>U.curProgram.schemeId));function ae(){T("updateShowAllFieldList",U.showAllFieldList)}function te({option:e}){return p("span",e.schemeName)}function ie(e){var l,a;const t=[p(k,{trigger:"hover",duration:0},{default:()=>e.schemeName,trigger:()=>p("span",{class:"content"},e.schemeName)})],i=[p(I,{placement:"top-start",positiveText:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.428"))||"确认",negativeText:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.28"))||"取消",onPositiveClick:()=>function(e){var l;const{schemeId:a}=U.curProgram;if(a===e.schemeId)return q.warning((null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.430"))||"当前正在使用该方案,请先切换其他方案再删除");!async function(e){var l,a;if(!U.tableListId)return q.warning((null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.424"))||"请传入列表id");try{await G({id:U.tableListId,schemeId:e},ee)&&q.success((null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.411"))||"删除成功")}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}(e.schemeId)}(e)},{trigger:()=>p(A,{onclick:oe},{default:()=>p(N)}),default:()=>"确定删除该导出方案吗?"})],o=e.schemeId===K?[t]:[t,i];return p("div",{class:"flex-between"},o)}function oe(e){e.stopPropagation()}function ne(e){T("updateCurProgram",e)}function de(){!async function(){var e,l,a;if(!U.tableListId)return q.warning((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.424"))||"请传入列表id");if(Z.value.length<1)return q.warning((null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.426"))||"请至少勾选一个字段");try{const{schemeId:e}=U.curProgram,l=U.programOptions.find((l=>l.schemeId===e)),t={fieldKeys:S(U.showAllFieldList,Z.value),lastUsedSchemeName:l?l.schemeName:"",schemeId:l?l.schemeId:"",schemeName:l?l.schemeName:"",tableListId:U.tableListId};await J(t,ee)&&(q.success((null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.427"))||"导出成功"),ue())}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}()}function se(e){var l,a,t;Y.value=!1,Z.value=e?(null==(l=U.showAllFieldList)?void 0:l.map((e=>e.columnName)))||[]:(null==(t=null==(a=U.showAllFieldList)?void 0:a.filter((e=>e.fixedExport)))?void 0:t.map((e=>e.columnName)))||[]}function ue(){T("cancelModal"),R.value=M,W.value={height:D,maxHeight:D},Q.value=!1}function re(){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=>{U.showAllFieldList.length>0&&(Y.value=e.length>0&&e.length<U.showAllFieldList.length,X.value=e.length===U.showAllFieldList.length,T("updateFieldCheckList",e))}),{immediate:!0}),i((()=>U.curProgram),(e=>{e&&function(e){const l=U.programOptions.find((l=>l.schemeId===e));if(l){let a=[];const t=U.downLoadFieldList.filter((e=>e.fixedExport)).map((e=>e.columnName)),i=l.fieldKeys.filter((e=>!t.includes(e)));if(Z.value=[...i,...t],e===K){const e=z(U.downLoadFieldList);return void T("updateShowAllFieldList",e)}Z.value.forEach((e=>{const l=U.downLoadFieldList.find((l=>l.columnName===e));l&&a.push(l)}));const o=U.downLoadFieldList.filter((e=>!Z.value.includes(e.columnName))),n=[...a,...o];T("updateShowAllFieldList",n)}}(e.schemeId)}),{immediate:!0}),(l,a)=>(o(),n(d(L),{class:s(["table-export-field-modal",{"modal-screen":Q.value}]),show:e.visible,maskClosable:!1,width:R.value,bodyStyle:W.value,closable:!1,centered:"",onPositiveClick:de,onNegativeClick:ue},{default:u((()=>{var t;return[r(d(b),{style:c({width:R.value,...W.value}),title:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.421"))||"选择导出字段",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":u((()=>[m("div",E,[m("i",{onClick:re,class:s(["iconfont-table-export-field",Q.value?"icon-table-export-field-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-export-field-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),m("i",{onClick:ue,class:"iconfont-table-export-field icon-table-export-field-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:u((()=>[m("div",j,[r(d(y),{onClick:ue},{default:u((()=>{var e;return[g((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.28"))||"取消")]})),_:1}),h(l.$slots,"add"),r(d(y),{type:"info",onClick:de},{default:u((()=>{var e;return[g((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.422"))||"导出")]})),_:1})])])),default:u((()=>[H,m("header",O,[r(d(x),{checked:X.value,"onUpdate:checked":[a[0]||(a[0]=e=>X.value=e),se],indeterminate:Y.value},{default:u((()=>{var e;return[g((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.37"))||"全选")]})),_:1},8,["checked","indeterminate"]),r(d(C),{style:{width:"200px"},value:d(le),"onUpdate:value":[a[1]||(a[1]=e=>v(le)?le.value=e:null),ne],filterable:"","label-field":"schemeName","value-field":"schemeId","show-checkmark":!1,"render-label":ie,"render-tag":te,"menu-props":V,options:e.programOptions},null,8,["value","options"])]),r(d(F),{value:Z.value,"onUpdate:value":a[2]||(a[2]=e=>Z.value=e)},{default:u((()=>[r(d(_),{class:"draggable-checkbox-list",list:e.showAllFieldList,animation:"300",itemKey:"columnName",onEnd:ae},{item:u((({element:e})=>{var l;return[r(d(x),{disabled:e.fixedExport,class:s(Z.value.includes(e.columnName)?"":"checkbox-disabled"),value:e.columnName,label:null!=(l=e.alias)?l:e.title},{default:u((()=>{var l,a;return[m("span",{title:null!=(l=e.alias)?l:e.title},w(null!=(a=e.alias)?a:e.title),9,$)]})),_:2},1032,["disabled","class","value","label"])]})),_:1},8,["list"])])),_:1},8,["value"])])),_:3},8,["style"])]})),_:3},8,["class","show","width","bodyStyle"]))}});export{T as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as a,reactive as l,inject as o,watch as t,openBlock as r,createBlock as n,unref as i,withCtx as d,createVNode as u,createElementVNode as c,createTextVNode as s,createElementBlock as m,Fragment as v,renderList as p,toDisplayString as g}from"vue";import{useMessage as w,NModal as f,NCard as y,NIcon as h,NButton as j,NRadioGroup as b,NRadio as C,NForm as L,NFormItem as N,NInput as P}from"naive-ui";import{CloseOutline as B}from"@vicons/ionicons5";import{InjectionExportApiConfig as _}from"../constants/index.js";import x from"../hooks/useAsyncData.js";import{dragFieldCheckList as k}from"../tool.js";import{cloneDeep as I}from"lodash-es";const S={class:"svg-wrap"},A={class:"flex_right"},M={class:"save-project-content"};var O=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:O}){var U,z,F;const K=e,q=w(),{saveTableListExportScheme:D}=x(),E={projectName:{required:!0,message:(null==(U=window.getLanguageByCode)?void 0:U.call(window,"10010.1.433"))||"请输入方案名称",trigger:["input","blur"]}},R=[{value:"updateProject",label:(null==(z=window.getLanguageByCode)?void 0:z.call(window,"10010.1.434"))||"更新方案"},{value:"addProject",label:(null==(F=window.getLanguageByCode)?void 0:F.call(window,"10010.1.435"))||"新增方案"}],T=a(null),$=l({projectName:""}),G=a(),H=a([]),J=o(_);function Q(e){G.value=e}function V(){var e;null==(e=T.value)||e.validate((async e=>{var a;if(e)return;if(function(){const e=$.projectName.trim();let a=[];if("addProject"===G.value&&(a=K.programOptions.map((e=>e.schemeName))),"updateProject"===G.value){const{schemeName:e}=K.curProgram;a=K.programOptions.filter((a=>a.schemeName!==e)).map((e=>e.schemeName))}return!!a.includes(e)&&(q.warning(`已存在${e}的方案名称`),!0)}())return;const l=function(){const e=$.projectName.trim(),{fieldKeys:a,schemeId:l}=K.curProgram;let o={fieldKeys:k(K.showAllFieldList,a),lastUsedSchemeName:e,schemeId:"",schemeName:e,tableListId:K.tableListId};return"updateProject"===G.value&&(o.schemeId=l),o}();await D(l,J)&&(q.success((null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.438"))||"保存并导出成功"),O("cancelSaveModal"))}))}function W(){O("cancelSaveModal")}return t((()=>K.curProgram),(async e=>{if("default"===e.schemeId)H.value=R.filter((e=>"addProject"===e.value)),G.value="addProject",$.projectName="";else H.value=I(R),G.value="updateProject",$.projectName=e.schemeName}),{immediate:!0,deep:!0}),(a,l)=>{var o,t;return r(),n(i(f),{class:"table-export-field-modal",show:e.visible,maskClosable:!1,"positive-text":(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.428"))||"确认","negative-text":(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.32"))||"取消",onPositiveClick:V,onNegativeClick:W},{default:d((()=>{var e;return[u(i(y),{title:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.431"))||"导出并存为方案",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":d((()=>[c("div",S,[u(i(h),{component:i(B),size:"24",onClick:W},null,8,["component"])])])),footer:d((()=>[c("div",A,[u(i(j),{onClick:W},{default:d((()=>{var e;return[s((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.32"))||"取消")]})),_:1}),u(i(j),{type:"info",onClick:V},{default:d((()=>{var e;return[s((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.428"))||"确认")]})),_:1})])])),default:d((()=>[c("div",M,[u(i(b),{value:G.value,"onUpdate:value":[l[0]||(l[0]=e=>G.value=e),Q],name:"radiogroup"},{default:d((()=>[(r(!0),m(v,null,p(H.value,(e=>(r(),n(i(C),{key:e.value,value:e.value},{default:d((()=>[s(g(e.label),1)])),_:2},1032,["value"])))),128))])),_:1},8,["value"]),u(i(L),{ref_key:"formRef",ref:T,"label-placement":"left",rules:E,model:$},{default:d((()=>{var e;return[u(i(N),{label:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.432"))||"方案名称",path:"projectName"},{default:d((()=>{var e;return[u(i(P),{value:$.projectName,"onUpdate:value":l[1]||(l[1]=e=>$.projectName=e),placeholder:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.433"))||"请输入方案名称",clearable:"",maxlength:"100"},null,8,["value"])]})),_:1})]})),_:1},8,["model"])])])),_:1})]})),_:1},8,["show"])}}});export{O as default};
1
+ import{defineComponent as e,ref as a,reactive as l,inject as o,watch as t,openBlock as r,createBlock as n,unref as i,withCtx as d,createVNode as u,createElementVNode as c,createTextVNode as s,createElementBlock as m,Fragment as v,renderList as p,toDisplayString as g}from"vue";import{useMessage as w,NModal as f,NCard as y,NIcon as h,NButton as j,NRadioGroup as b,NRadio as C,NForm as L,NFormItem as N,NInput as P}from"naive-ui";import{CloseOutline as B}from"@vicons/ionicons5";import{InjectionExportApiConfig as _}from"../constants/index.js";import x from"../hooks/useAsyncData.js";import{dragFieldCheckList as k}from"../tool.js";import{cloneDeep as I}from"lodash-es";const S={class:"svg-wrap"},A={class:"flex_right"},M={class:"save-project-content"};var O=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:O}){var U,z,F;const K=e,q=w(),{saveTableListExportScheme:D}=x(),E={projectName:{required:!0,message:(null==(U=window.getLanguageByCode)?void 0:U.call(window,"10010.1.433"))||"请输入方案名称",trigger:["input","blur"]}},R=[{value:"updateProject",label:(null==(z=window.getLanguageByCode)?void 0:z.call(window,"10010.1.434"))||"更新方案"},{value:"addProject",label:(null==(F=window.getLanguageByCode)?void 0:F.call(window,"10010.1.435"))||"新增方案"}],T=a(null),$=l({projectName:""}),G=a(),H=a([]),J=o(_);function Q(e){G.value=e}function V(){var e;null==(e=T.value)||e.validate((async e=>{var a;if(e)return;if(function(){const e=$.projectName.trim();let a=[];if("addProject"===G.value&&(a=K.programOptions.map((e=>e.schemeName))),"updateProject"===G.value){const{schemeName:e}=K.curProgram;a=K.programOptions.filter((a=>a.schemeName!==e)).map((e=>e.schemeName))}return!!a.includes(e)&&(q.warning(`已存在${e}的方案名称`),!0)}())return;const l=function(){const e=$.projectName.trim(),{fieldKeys:a,schemeId:l}=K.curProgram;let o={fieldKeys:k(K.showAllFieldList,a),lastUsedSchemeName:e,schemeId:"",schemeName:e,tableListId:K.tableListId};return"updateProject"===G.value&&(o.schemeId=l),o}();await D(l,J)&&(q.success((null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.438"))||"保存并导出成功"),O("cancelSaveModal"))}))}function W(){O("cancelSaveModal")}return t((()=>K.curProgram),(async e=>{if("default"===e.schemeId)H.value=R.filter((e=>"addProject"===e.value)),G.value="addProject",$.projectName="";else H.value=I(R),G.value="updateProject",$.projectName=e.schemeName}),{immediate:!0,deep:!0}),(a,l)=>{var o,t;return r(),n(i(f),{class:"table-export-field-modal",show:e.visible,maskClosable:!1,"positive-text":(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.428"))||"确认","negative-text":(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.28"))||"取消",onPositiveClick:V,onNegativeClick:W},{default:d((()=>{var e;return[u(i(y),{title:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.431"))||"导出并存为方案",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":d((()=>[c("div",S,[u(i(h),{component:i(B),size:"24",onClick:W},null,8,["component"])])])),footer:d((()=>[c("div",A,[u(i(j),{onClick:W},{default:d((()=>{var e;return[s((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.28"))||"取消")]})),_:1}),u(i(j),{type:"info",onClick:V},{default:d((()=>{var e;return[s((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.428"))||"确认")]})),_:1})])])),default:d((()=>[c("div",M,[u(i(b),{value:G.value,"onUpdate:value":[l[0]||(l[0]=e=>G.value=e),Q],name:"radiogroup"},{default:d((()=>[(r(!0),m(v,null,p(H.value,(e=>(r(),n(i(C),{key:e.value,value:e.value},{default:d((()=>[s(g(e.label),1)])),_:2},1032,["value"])))),128))])),_:1},8,["value"]),u(i(L),{ref_key:"formRef",ref:T,"label-placement":"left",rules:E,model:$},{default:d((()=>{var e;return[u(i(N),{label:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.432"))||"方案名称",path:"projectName"},{default:d((()=>{var e;return[u(i(P),{value:$.projectName,"onUpdate:value":l[1]||(l[1]=e=>$.projectName=e),placeholder:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.433"))||"请输入方案名称",clearable:"",maxlength:"100"},null,8,["value"])]})),_:1})]})),_:1},8,["model"])])])),_:1})]})),_:1},8,["show"])}}});export{O as default};
@@ -1 +1 @@
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,c,T,b,N,S,_,U,A,I,O,p,M,R,s,D,H,P;const X=[{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.135"))||"昨天",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.404"))||"本月",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==(c=window.getLanguageByCode)?void 0:c.call(window,"10010.1.331"))||"下年",value:"NEXT_YEAR"},{label:(null==(T=window.getLanguageByCode)?void 0:T.call(window,"10010.1.358"))||"上年",value:"UP_YEAR"},{label:(null==(b=window.getLanguageByCode)?void 0:b.call(window,"10010.1.319"))||"大于",value:"BIG"},{label:(null==(N=window.getLanguageByCode)?void 0:N.call(window,"10010.1.320"))||"小于",value:"LESS"},{label:(null==(S=window.getLanguageByCode)?void 0:S.call(window,"10010.1.321"))||"大于等于",value:"BIGEQ"},{label:(null==(_=window.getLanguageByCode)?void 0:_.call(window,"10010.1.322"))||"小于等于",value:"LESSEQ"}],Y=[{type:"DATE",options:X},{type:"DATETIME",options:X},{type:"TEXT",options:[{label:(null==(U=window.getLanguageByCode)?void 0:U.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==(I=window.getLanguageByCode)?void 0:I.call(window,"10010.1.340"))||"包含",value:"CL"},{label:(null==(O=window.getLanguageByCode)?void 0:O.call(window,"10010.1.341"))||"不包含",value:"NC"},{label:(null==(p=window.getLanguageByCode)?void 0:p.call(window,"10010.1.317"))||"等于",value:"EQ"},{label:(null==(M=window.getLanguageByCode)?void 0:M.call(window,"10010.1.318"))||"不等于",value:"NEQ"}]},{type:"NUMBER",options:[{label:(null==(R=window.getLanguageByCode)?void 0:R.call(window,"10010.1.338"))||"为空",value:"NULL"},{label:(null==(s=window.getLanguageByCode)?void 0:s.call(window,"10010.1.339"))||"不为空",value:"NOT_NULL"},{label:(null==(D=window.getLanguageByCode)?void 0:D.call(window,"10010.1.317"))||"等于",value:"EQ"},{label:(null==(H=window.getLanguageByCode)?void 0:H.call(window,"10010.1.319"))||"大于",value:"BIG"},{label:(null==(P=window.getLanguageByCode)?void 0:P.call(window,"10010.1.320"))||"小于",value:"LESS"}]}],Q={TEXT:l.INPUT,SELECT:l.INPUT,NUMBER:l.INPUT_NUMBER,DATE:l.DATE,DATETIME:l.DATE_TIME};export{Y as filterConditionTypeOptions,Q 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,c,T,b,N,S,_,U,A,I,O,p,M,R,s,D,H,P;const X=[{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.404"))||"本月",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==(c=window.getLanguageByCode)?void 0:c.call(window,"10010.1.331"))||"下年",value:"NEXT_YEAR"},{label:(null==(T=window.getLanguageByCode)?void 0:T.call(window,"10010.1.358"))||"上年",value:"UP_YEAR"},{label:(null==(b=window.getLanguageByCode)?void 0:b.call(window,"10010.1.319"))||"大于",value:"BIG"},{label:(null==(N=window.getLanguageByCode)?void 0:N.call(window,"10010.1.320"))||"小于",value:"LESS"},{label:(null==(S=window.getLanguageByCode)?void 0:S.call(window,"10010.1.321"))||"大于等于",value:"BIGEQ"},{label:(null==(_=window.getLanguageByCode)?void 0:_.call(window,"10010.1.322"))||"小于等于",value:"LESSEQ"}],Y=[{type:"DATE",options:X},{type:"DATETIME",options:X},{type:"TEXT",options:[{label:(null==(U=window.getLanguageByCode)?void 0:U.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==(I=window.getLanguageByCode)?void 0:I.call(window,"10010.1.340"))||"包含",value:"CL"},{label:(null==(O=window.getLanguageByCode)?void 0:O.call(window,"10010.1.341"))||"不包含",value:"NC"},{label:(null==(p=window.getLanguageByCode)?void 0:p.call(window,"10010.1.317"))||"等于",value:"EQ"},{label:(null==(M=window.getLanguageByCode)?void 0:M.call(window,"10010.1.318"))||"不等于",value:"NEQ"}]},{type:"NUMBER",options:[{label:(null==(R=window.getLanguageByCode)?void 0:R.call(window,"10010.1.338"))||"为空",value:"NULL"},{label:(null==(s=window.getLanguageByCode)?void 0:s.call(window,"10010.1.339"))||"不为空",value:"NOT_NULL"},{label:(null==(D=window.getLanguageByCode)?void 0:D.call(window,"10010.1.317"))||"等于",value:"EQ"},{label:(null==(H=window.getLanguageByCode)?void 0:H.call(window,"10010.1.319"))||"大于",value:"BIG"},{label:(null==(P=window.getLanguageByCode)?void 0:P.call(window,"10010.1.320"))||"小于",value:"LESS"}]}],Q={TEXT:l.INPUT,SELECT:l.INPUT,NUMBER:l.INPUT_NUMBER,DATE:l.DATE,DATETIME:l.DATE_TIME};export{Y as filterConditionTypeOptions,Q as typeMappingOptions};