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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  2. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  3. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  4. package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
  5. package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +1 -1
  6. package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
  7. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  8. package/es/components/big-table/src/components/edit-form/edit-date.js +1 -1
  9. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  10. package/es/components/big-table/src/components/edit-form/edit-time.js +1 -1
  11. package/es/components/big-table/src/components/input-button.vue2.js +1 -1
  12. package/es/components/big-table/src/hooks/useTableParse.js +1 -1
  13. package/es/components/button-print/index.d.ts +4 -0
  14. package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -0
  15. package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -1
  16. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +4 -0
  17. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  18. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  19. package/es/components/classification/src/components/set-classification/index.vue2.js +1 -1
  20. package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
  21. package/es/components/classification/src/index.vue2.js +1 -1
  22. package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +1 -1
  23. package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -1
  24. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  25. package/es/components/expand-field/src/index.vue2.js +1 -1
  26. package/es/components/expand-field/src/utils/constant.js +1 -1
  27. package/es/components/fabric-chart/index.d.ts +19 -2
  28. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +19 -2
  29. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  30. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
  31. package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +13 -0
  32. package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -1
  33. package/es/components/fabric-chart/src/components/useStyle.js +1 -1
  34. package/es/components/fabric-chart/src/constants/index.js +1 -1
  35. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  36. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.d.ts +1 -0
  37. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  38. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
  39. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  40. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +1 -0
  41. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  42. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
  43. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -1
  44. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
  45. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  47. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  48. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +1 -0
  49. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  50. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +7 -1
  51. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  52. package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
  53. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  54. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  55. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  56. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.d.ts +1 -0
  57. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  58. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  59. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
  60. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  61. package/es/components/fabric-chart/src/interface.d.ts +2 -0
  62. package/es/components/fabric-chart/src/utils/index.d.ts +1 -0
  63. package/es/components/fabric-chart/src/utils/index.js +1 -1
  64. package/es/components/field-set/src/FieldColor.vue.d.ts +3 -3
  65. package/es/components/field-set/src/FieldColor.vue2.js +1 -1
  66. package/es/components/field-set/src/FieldFilter.vue.d.ts +5 -4
  67. package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
  68. package/es/components/field-set/src/FieldSet.vue.d.ts +2 -2
  69. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  70. package/es/components/field-set/src/Index.vue2.js +1 -1
  71. package/es/components/field-set/src/TableStyle.vue2.js +1 -1
  72. package/es/components/field-set/src/components/condition.vue2.js +1 -1
  73. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
  74. package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -1
  75. package/es/components/field-set/src/components/edit-filter.vue2.js +1 -1
  76. package/es/components/field-set/src/components/table-row.vue.d.ts +2 -2
  77. package/es/components/field-set/src/components/table-row.vue2.js +1 -1
  78. package/es/components/field-set/src/constants/filter.d.ts +21 -12
  79. package/es/components/field-set/src/constants/filter.js +1 -1
  80. package/es/components/field-set/src/constants/index.js +1 -1
  81. package/es/components/field-set/src/types/index.d.ts +1 -1
  82. package/es/components/form-config/index.d.ts +7 -5
  83. package/es/components/form-config/index.js +1 -1
  84. package/es/components/form-config/src/FormConfig.vue.d.ts +7 -5
  85. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  86. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +2 -0
  87. package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -1
  88. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +2 -2
  89. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
  90. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
  91. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -1
  92. package/es/components/form-config/src/constants/index.d.ts +1 -11
  93. package/es/components/form-config/src/constants/index.js +1 -1
  94. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  95. package/es/components/form-config/src/hooks/useLocale.d.ts +52 -0
  96. package/es/components/form-config/src/hooks/useLocale.js +1 -0
  97. package/es/components/form-render/index.js +1 -1
  98. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
  99. package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -1
  100. package/es/components/form-render/src/components/renderer/combination/tableCombination.js +1 -1
  101. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  102. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  103. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  104. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  105. package/es/components/form-render/src/hooks/usePresetScope.d.ts +1 -1
  106. package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
  107. package/es/components/form-render/src/utils/index.d.ts +1 -0
  108. package/es/components/form-render/src/utils/index.js +1 -1
  109. package/es/components/iho-chat/index.d.ts +612 -52
  110. package/es/components/iho-chat/src/Index.vue.d.ts +615 -59
  111. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  112. package/es/components/iho-chat/src/api/index.d.ts +1 -0
  113. package/es/components/iho-chat/src/api/index.js +1 -1
  114. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +32 -1
  115. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  116. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +52 -3
  117. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  118. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +52 -2
  119. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  120. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +221 -11
  121. package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
  122. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +82 -6
  123. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  124. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +19 -1
  125. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  126. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +20 -2
  127. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  128. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +71 -4
  129. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  130. package/es/components/iho-chat/src/components/ContextMenu.d.ts +11 -2
  131. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  132. package/es/components/iho-chat/src/components/MessageTemplate.vue.d.ts +1 -1
  133. package/es/components/iho-chat/src/components/MessageTemplate.vue2.js +1 -1
  134. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +51 -2
  135. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
  136. package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +19 -1
  137. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  138. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +66 -1
  139. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  140. package/es/components/iho-chat/src/components/Video.vue.d.ts +19 -1
  141. package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
  142. package/es/components/iho-chat/src/constants/index.d.ts +13 -3
  143. package/es/components/iho-chat/src/constants/index.js +1 -1
  144. package/es/components/iho-chat/src/hooks/index.d.ts +2 -2
  145. package/es/components/iho-chat/src/hooks/index.js +1 -1
  146. package/es/components/iho-chat/src/hooks/useData.d.ts +94 -0
  147. package/es/components/iho-chat/src/hooks/useData.js +1 -0
  148. package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
  149. package/es/components/iho-chat/src/hooks/useVideo.d.ts +19 -1
  150. package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
  151. package/es/components/iho-chat/src/hooks/useWebSocket.d.ts +3 -0
  152. package/es/components/iho-chat/src/hooks/useWebSocket.js +1 -0
  153. package/es/components/iho-chat/src/types/index.d.ts +0 -6
  154. package/es/components/iho-chat/src/types/index.js +1 -1
  155. package/es/components/iho-chat/src/utils/index.d.ts +1 -0
  156. package/es/components/iho-chat/src/utils/index.js +1 -1
  157. package/es/components/iho-chat/style/index.css +1 -1
  158. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  159. package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/dynamicFilter.vue2.js +1 -1
  160. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  161. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  162. package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +1 -1
  163. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  164. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  165. package/es/components/iho-table/src/utils/index.js +1 -1
  166. package/es/components/index.css +1 -1
  167. package/es/components/index.js +1 -1
  168. package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -1
  169. package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
  170. package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -1
  171. package/es/components/map/src/Map.vue2.js +1 -1
  172. package/es/components/picture-clipper/src/PictureClipper.vue2.js +1 -1
  173. package/es/components/quick-search/src/index.vue2.js +1 -1
  174. package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -1
  175. package/es/components/scale-view/index.d.ts +31 -0
  176. package/es/components/scale-view/src/ScaleView.vue.d.ts +13 -0
  177. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  178. package/es/components/scale-view/src/components/composables/choose-common.js +1 -1
  179. package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -1
  180. package/es/components/scale-view/src/components/formitem/r-checkbox.d.ts +9 -0
  181. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
  182. package/es/components/scale-view/src/components/formitem/r-input.d.ts +9 -0
  183. package/es/components/scale-view/src/components/formitem/r-input.js +1 -1
  184. package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
  185. package/es/components/scale-view/src/components/formitem/r-radio.d.ts +9 -0
  186. package/es/components/scale-view/src/components/formitem/r-radio.js +1 -1
  187. package/es/components/scale-view/src/components/formitem/r-select.js +1 -1
  188. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
  189. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
  190. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  191. package/es/components/scale-view/src/hooks/scaleview-methods.js +1 -1
  192. package/es/components/scale-view/src/hooks/scaleview-props.d.ts +4 -0
  193. package/es/components/scale-view/src/hooks/scaleview-props.js +1 -1
  194. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  195. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
  196. package/es/components/scale-view/src/hooks/use-component.d.ts +72 -0
  197. package/es/components/scale-view/style/index.css +1 -1
  198. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  199. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  200. package/es/components/select-label/src/components/label-classify.vue2.js +1 -1
  201. package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -1
  202. package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
  203. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  204. package/es/components/select-person/src/SelectPersonType.vue2.js +1 -1
  205. package/es/components/select-person/src/index.vue2.js +1 -1
  206. package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
  207. package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +1 -1
  208. package/es/components/table-filter/src/components/bi-filter/helpers/options.js +1 -1
  209. package/es/components/table-filter/src/components/bi-filter/index.vue2.js +1 -1
  210. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
  211. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
  212. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -1
  213. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
  214. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +4 -7
  215. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
  216. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +4 -7
  217. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1 -1
  218. package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +1 -1
  219. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +4 -7
  220. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  221. package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +1 -1
  222. package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -1
  223. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -1
  224. package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -1
  225. package/es/shared/package.json.js +1 -1
  226. package/es/shared/types/index.d.ts +3 -0
  227. package/es/shared/utils/index.d.ts +1 -0
  228. package/es/shared/utils/index.js +1 -1
  229. package/package.json +2 -2
  230. package/es/components/iho-chat/src/hooks/useSession.d.ts +0 -12
  231. package/es/components/iho-chat/src/hooks/useSession.js +0 -1
  232. package/es/components/iho-chat/src/hooks/useState.d.ts +0 -18
  233. package/es/components/iho-chat/src/hooks/useState.js +0 -1
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,ref as l,watch as a,createVNode as o}from"vue";import{NInput as u}from"naive-ui";var i=e({name:"RInput",components:{NInput:u},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,{emit:i}){var n,m,r,s,v,d;const p=null==(n=e.item)?void 0:n.valueType,c=(null==(m=e.item)?void 0:m.type)||"INPUT",f="INPUT"==c||"EVALUATE_INPUT"==c,y=(null==(s=null==(r=e.item)?void 0:r.setting)?void 0:s.inputRow)||1,b=null==(d=null==(v=e.item)?void 0:v.setting)?void 0:d.defaultPlaceHolder,g=t((()=>y&&"auto"!=y?{minRows:y||1,maxRows:y||1}:{minRows:1})),k=e=>{if(!f)return;const t=e.key;e.returnValue="e"!==t&&"E"!==t&&"+"!==t&&"-"!==t},w=l(e.form[e.item.val_key]);a((()=>e.form[e.item.val_key]),(e=>{w.value=e}),{immediate:!0});const I=t=>{w.value=f&&t&&"number"===p?t.replace(/[^\d.]/gi,""):t,i("scaleChange",w.value,e.item)};return()=>(()=>{const t=f?"textarea":p||"text";return o(u,{value:w.value,clearable:!0,type:t,autosize:g.value,placeholder:b,disabled:e.isLock,onKeydown:k,"onUpdate:value":I},null)})()}});export{i as default};
1
+ import{defineComponent as e,toRefs as t,computed as a,ref as n,watch as l,createVNode as i}from"vue";import{NInput as u}from"naive-ui";var o=e({name:"RInput",components:{NInput:u},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1},isGeneratePrintPdf:{type:[Boolean,Object],default:!1}},emits:["scaleChange"],setup(e,{emit:o}){var r,p,s,m,d,v;const c=null==(r=e.item)?void 0:r.valueType,f=(null==(p=e.item)?void 0:p.type)||"INPUT",y="INPUT"==f||"EVALUATE_INPUT"==f,P=(null==(m=null==(s=e.item)?void 0:s.setting)?void 0:m.inputRow)||1,b=null==(v=null==(d=e.item)?void 0:d.setting)?void 0:v.defaultPlaceHolder,{isGeneratePrintPdf:k}=t(e),g=a((()=>P&&"auto"!=P?{minRows:P||1,maxRows:P||1}:{minRows:1})),w=e=>{if(!y)return;const t=e.key;e.returnValue="e"!==t&&"E"!==t&&"+"!==t&&"-"!==t},I=n(e.form[e.item.val_key]);l((()=>e.form[e.item.val_key]),(e=>{I.value=e}),{immediate:!0});const R=t=>{I.value=y&&t&&"number"===c?t.replace(/[^\d.]/gi,""):t,o("scaleChange",I.value,e.item)},T=()=>{const t=y?"textarea":c||"text";return k.value?(()=>{const t=I.value,a=t||"请输入";return i("div",{class:["input-print-span",{"input-print-span-disabled":e.isLock,"input-print-span-empty":!t}]},[a])})():i(u,{value:I.value,clearable:!0,type:t,autosize:g.value,placeholder:b,disabled:e.isLock,onKeydown:w,"onUpdate:value":R},null)};return()=>T()}});export{o as default};
@@ -1 +1 @@
1
- import{defineComponent as o,reactive as e,createVNode as t,resolveComponent as a}from"vue";import{NModal as i,NInput as n,NIcon as p}from"naive-ui";import"xe-utils";import"moment";import s from"../../../../../shared/utils/vexutilsExpand.js";import{AlertCircleOutline as l}from"@vicons/ionicons5";import m from"../../../../map/index.js";var c=o({name:"RMap",components:{NModal:i,NInput:n,NIcon:p,CMap:m},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1},locationProp:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"}},emits:["scaleChange"],setup(o,i){const n=o.form[o.item.val_key],p=e({mapVisible:!1,mapLocation:""}),c=o=>{if(s.isJSON(o)){const e=JSON.parse(o);return e.address||e.name}return""};p.mapLocation=c(n);const r=e=>{const{locationProp:t,isInit:a}=e;p.mapLocation=c(t),i.emit("scaleChange",t,o.item),p.mapVisible=!1},u=()=>{o.isLock||(p.mapVisible=!0)};return()=>t("div",{class:{"c-map-container":!o.isLock}},[t(a("n-input"),{value:p.mapLocation,readonly:!0,class:"map-input","on-click":u,placeholder:"请选择"},{prefix:()=>t(a("n-icon"),{size:"18",component:l},null)}),t(a("n-modal"),{class:"c-scale-map-modal",show:p.mapVisible,"onUpdate:show":o=>p.mapVisible=o,preset:"card",style:{width:"800px",height:"80vh"}},{default:()=>[t(m,{locationProp:o.locationProp,ak:o.ak,onSelectLocation:r},null)]})])}});export{c as default};
1
+ import{defineComponent as o,reactive as e,createVNode as a,resolveComponent as t}from"vue";import{NModal as i,NInput as n,NIcon as p}from"naive-ui";import"xe-utils";import"moment";import l from"../../../../../shared/utils/vexutilsExpand.js";import{AlertCircleOutline as s}from"@vicons/ionicons5";import r from"../../../../map/index.js";var m=o({name:"RMap",components:{NModal:i,NInput:n,NIcon:p,CMap:r},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1},locationProp:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"}},emits:["scaleChange"],setup(o,i){const n=o.form[o.item.val_key],p=e({mapVisible:!1,mapLocation:""}),m=o=>{if(l.isJSON(o)){const e=JSON.parse(o);return e.address||e.name}return""};p.mapLocation=m(n);const c=e=>{const{locationProp:a,isInit:t}=e;p.mapLocation=m(a),i.emit("scaleChange",a,o.item),p.mapVisible=!1},d=()=>{o.isLock||(p.mapVisible=!0)};return()=>{return a("div",{class:{"c-map-container":!o.isLock}},[a(t("n-input"),{value:p.mapLocation,readonly:!0,class:"map-input","on-click":d,placeholder:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.147"))||"请选择"},{prefix:()=>a(t("n-icon"),{size:"18",component:s},null)}),a(t("n-modal"),{class:"c-scale-map-modal",show:p.mapVisible,"onUpdate:show":o=>p.mapVisible=o,preset:"card",style:{width:"800px",height:"80vh"}},{default:()=>[a(r,{locationProp:o.locationProp,ak:o.ak,onSelectLocation:c},null)]})]);var e}}});export{m as default};
@@ -15,6 +15,10 @@ declare const _default: import("vue").DefineComponent<{
15
15
  type: BooleanConstructor;
16
16
  default: boolean;
17
17
  };
18
+ isGeneratePrintPdf: {
19
+ type: (BooleanConstructor | ObjectConstructor)[];
20
+ default: boolean;
21
+ };
18
22
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
19
23
  form: {
20
24
  type: ObjectConstructor;
@@ -32,11 +36,16 @@ declare const _default: import("vue").DefineComponent<{
32
36
  type: BooleanConstructor;
33
37
  default: boolean;
34
38
  };
39
+ isGeneratePrintPdf: {
40
+ type: (BooleanConstructor | ObjectConstructor)[];
41
+ default: boolean;
42
+ };
35
43
  }>> & {
36
44
  onScaleChange?: ((...args: any[]) => any) | undefined;
37
45
  }, {
38
46
  item: Record<string, any>;
39
47
  isLock: boolean;
48
+ isGeneratePrintPdf: boolean | Record<string, any>;
40
49
  form: Record<string, any>;
41
50
  inputLock: boolean;
42
51
  }>;
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as o,watch as t,createVNode as i,resolveComponent as l,isVNode as s}from"vue";import{NRadioGroup as r,NRadio as a,NInput as u,NIcon as n}from"naive-ui";import{api as c}from"v-viewer";import{SearchOutline as p}from"@vicons/ionicons5";import f from"../composables/choose-common.js";import"xe-utils";import"moment";import v from"../../../../../shared/utils/vexutilsExpand.js";var d=e({name:"RRadio",components:{NRadioGroup:r,NRadio:a,NInput:u,NIcon:n},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1},inputLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,a){var u,d;const m=o({curvalue:"",othersText:"",curOptions:[],optionsPreSuffixObj:{}}),{choiceColor:h,showImgWrap:x,handleDefPreSuffix:b,choiceUseKey:O,isRadioItem:j,showPreSuffix:y,handleOptions:g,stopClick:k}=f(e,m),S=(null==(d=null==(u=e.item)?void 0:u.setting)?void 0:d.chooseStyleSetting)||1,P=o=>{var t;let i=o.options||[];const l=e.form[e.item.val_key];"EVALUATE_RADIO_BLOCK"===e.item.type&&(i=(null==(t=o.scoreConfigs)?void 0:t.scoreRules)||[]);((e,o,t)=>{if(m.curOptions=g(t),!t.length||!o)return;if("EVALUATE_RADIO_BLOCK"===e.type)return m.curvalue=o,void C();const i=t.find((e=>e.value===o));if(i)return m.curvalue=i.key,void C();t.find(((e,t)=>{const i=b(e,t,o);return i&&(m.curvalue=i),!!i||!1}))||(m.othersText=o,m.curvalue="other"),C()})(o,o.dbValue||o.setting.defaultValue||l,i)},C=()=>{const o={othersText:m.othersText,optionsPreSuffixObj:m.optionsPreSuffixObj};a.emit("scaleChange",m.curvalue,e.item,{choiceObj:o,isSetObj:j.value})};t((()=>e.item),(e=>{e&&Object.keys(e).length&&P(e)}),{immediate:!0});const L=v.debounce(((o,t)=>{m.optionsPreSuffixObj[t.key]=o,m.curvalue=t.key;const i={othersText:m.othersText,optionsPreSuffixObj:m.optionsPreSuffixObj};console.log(m.optionsPreSuffixObj),a.emit("scaleChange",m.curvalue,e.item,{choiceObj:i,isSetObj:j.value})}),300),T=v.debounce((()=>{const o={othersText:m.othersText,optionsPreSuffixObj:m.optionsPreSuffixObj};m.curvalue="other",a.emit("scaleChange","other",e.item,{choiceObj:o,isSetObj:j.value})}),300),w=e=>i("span",{class:"scale-choice-img-wrap"},[i("img",{class:"show-picture",src:e.imageUrl},null),i("div",{class:"scale-preview-wrap"},[i(n,{size:"24",color:"#fff",component:p,onClick:o=>((e,o)=>{e.preventDefault(),e.stopPropagation();const t=m.curOptions.map((e=>e.imageUrl)).filter(Boolean);if(!t.length)return;const i=t.findIndex((e=>e===o));c({images:t,options:{toolbar:!0,initialViewIndex:i<0?0:i}})})(o,e.imageUrl)},null)])]),U=o=>i("div",{class:"presuffix-wrap"},[o.prefix&&i("span",{class:"prefix-span",style:{color:h.value(o)}},[o.prefix]),i(l("n-input"),{value:m.optionsPreSuffixObj[o.key],"onUpdate:value":e=>m.optionsPreSuffixObj[o.key]=e,disabled:e.isLock||e.inputLock,style:{color:h.value(o)},placeholder:"请输入",bordered:!1,"on-update:value":e=>L(e,o),onClick:k},null),o.suffix&&i("span",{class:"suffix-span",style:{color:h.value(o)}},[o.suffix])]),I=e=>i("span",{style:{color:h.value(e)},class:"other-span"},[e.label]),R=o=>i("div",{class:"choose-other",onClick:k},[i(l("n-input"),{value:m.othersText,"onUpdate:value":[e=>m.othersText=e,T],disabled:e.isLock||e.inputLock,style:{color:h.value(o)},placeholder:"请输入",bordered:!1},null)]),A=e=>j.value&&y.value(e),B=O.value;return()=>{let o;return i(r,{value:m.curvalue,"onUpdate:value":[e=>m.curvalue=e,C],class:["c-choice-wrap","choice-wrap-"+S],disabled:e.isLock},"function"==typeof(t=o=m.curOptions.map((o=>i("div",{class:"c-choice-radio-div"},[i(l("n-radio"),{key:o.value,value:o[B],onClick:t=>((o,t)=>{if(e.isLock)return;o.preventDefault(),o.stopPropagation();const i=t[B];m.curvalue=m.curvalue===i?"":i,C()})(t,o)},{default:()=>[x.value(o)&&w(o),A(o)&&U(o),!A(o)&&I(o),o.importability&&R(o)]})]))))||"[object Object]"===Object.prototype.toString.call(t)&&!s(t)?o:{default:()=>[o]});var t}}});export{d as default};
1
+ import{defineComponent as e,reactive as t,toRefs as o,computed as i,watch as a,createVNode as r,resolveComponent as s,isVNode as l}from"vue";import{NRadioGroup as n,NRadio as u,NInput as c,NIcon as p}from"naive-ui";import{api as f}from"v-viewer";import{SearchOutline as v}from"@vicons/ionicons5";import d from"../composables/choose-common.js";import"xe-utils";import"moment";import m from"../../../../../shared/utils/vexutilsExpand.js";var h=e({name:"RRadio",components:{NRadioGroup:n,NRadio:u,NInput:c,NIcon:p},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1},inputLock:{type:Boolean,default:!1},isGeneratePrintPdf:{type:[Boolean,Object],default:!1}},emits:["scaleChange"],setup(e,u){var c,h;const x=t({curvalue:"",othersText:"",curOptions:[],optionsPreSuffixObj:{}}),{isGeneratePrintPdf:b}=o(e),O=i((()=>e.isLock||e.inputLock)),{choiceColor:y,showImgWrap:j,handleDefPreSuffix:g,choiceUseKey:k,isRadioItem:P,showPreSuffix:S,handleOptions:T,stopClick:w}=d(e,x),C=(null==(h=null==(c=e.item)?void 0:c.setting)?void 0:h.chooseStyleSetting)||1,L=t=>{var o;let i=t.options||[];const a=e.form[e.item.val_key];"EVALUATE_RADIO_BLOCK"===e.item.type&&(i=(null==(o=t.scoreConfigs)?void 0:o.scoreRules)||[]);((e,t,o)=>{if(x.curOptions=T(o),!o.length||!t)return;if("EVALUATE_RADIO_BLOCK"===e.type)return x.curvalue=t,void U();const i=o.find((e=>e.value===t));if(i)return x.curvalue=i.key,void U();o.find(((e,o)=>{const i=g(e,o,t);return i&&(x.curvalue=i),!!i||!1}))||(x.othersText=t,x.curvalue="other"),U()})(t,t.dbValue||t.setting.defaultValue||a,i)},U=()=>{const t={othersText:x.othersText,optionsPreSuffixObj:x.optionsPreSuffixObj};u.emit("scaleChange",x.curvalue,e.item,{choiceObj:t,isSetObj:P.value})};a((()=>e.item),(e=>{e&&Object.keys(e).length&&L(e)}),{immediate:!0});const I=m.debounce(((t,o)=>{x.curvalue=o.key;const i={othersText:x.othersText,optionsPreSuffixObj:x.optionsPreSuffixObj};u.emit("scaleChange",x.curvalue,e.item,{choiceObj:i,isSetObj:P.value})}),200),R=m.debounce((()=>{const t={othersText:x.othersText,optionsPreSuffixObj:x.optionsPreSuffixObj};x.curvalue="other",u.emit("scaleChange","other",e.item,{choiceObj:t,isSetObj:P.value})}),200),A=e=>{x.othersText=e,R()},B=e=>r("span",{class:"scale-choice-img-wrap"},[r("img",{class:"show-picture",src:e.imageUrl},null),r("div",{class:"scale-preview-wrap"},[r(p,{size:"24",color:"#fff",component:v,onClick:t=>((e,t)=>{e.preventDefault(),e.stopPropagation();const o=x.curOptions.map((e=>e.imageUrl)).filter(Boolean);if(!o.length)return;const i=o.findIndex((e=>e===t));f({images:o,options:{toolbar:!0,initialViewIndex:i<0?0:i}})})(t,e.imageUrl)},null)])]),D=e=>{const t=e?x.optionsPreSuffixObj[e.key]:x.othersText,o=t||"请输入";return r("span",{class:["print-span",{"print-span-disabled":O.value,"print-span-empty":!t}]},[o])},E=e=>r("div",{class:"presuffix-wrap"},[e.prefix&&r("span",{class:"prefix-span",style:{color:y.value(e)}},[e.prefix]),b.value?D(e):r(s("n-input"),{value:x.optionsPreSuffixObj[e.key],"onUpdate:value":t=>x.optionsPreSuffixObj[e.key]=t,disabled:O.value,style:{color:y.value(e)},placeholder:"请输入",bordered:!1,"on-update:value":t=>((e,t)=>{x.optionsPreSuffixObj[t.key]=e,I(e,t)})(t,e),onClick:w,type:"textarea",autosize:!0,rows:1},null),e.suffix&&r("span",{class:"suffix-span",style:{color:y.value(e)}},[e.suffix])]),V=e=>r("span",{style:{color:y.value(e)},class:"other-span"},[e.label]),_=e=>r("div",{class:"choose-other",onClick:w},[r(s("n-input"),{value:x.othersText,"onUpdate:value":[e=>x.othersText=e,A],disabled:O.value,style:{color:y.value(e)},placeholder:"请输入",bordered:!1,type:"textarea",autosize:!0,rows:1},null)]),N=e=>P.value&&S.value(e),z=k.value;return()=>{let t;return r(n,{value:x.curvalue,"onUpdate:value":[e=>x.curvalue=e,U],class:["c-choice-wrap","choice-wrap-"+C],disabled:e.isLock},"function"==typeof(o=t=x.curOptions.map((t=>r("div",{class:"c-choice-radio-div"},[r(s("n-radio"),{key:t.value,value:t[z],onClick:o=>((t,o)=>{if(e.isLock)return;t.preventDefault(),t.stopPropagation();const i=o[z];x.curvalue=x.curvalue===i?"":i,U()})(o,t),class:{"c-radio-textarea":t.importability||N(t)}},{default:()=>[j.value(t)&&B(t),N(t)&&E(t),!N(t)&&V(t),t.importability&&(b.value?D():_(t))]})]))))||"[object Object]"===Object.prototype.toString.call(o)&&!l(o)?t:{default:()=>[t]});var o}}});export{h as default};
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as t,computed as l,watch as a,createVNode as i,resolveComponent as o}from"vue";import{NSelect as n,NEmpty as u}from"naive-ui";import r from"../LoadingCom.vue.js";var s=e({name:"RSelect",components:{NSelect:n,NEmpty:u,LoadingCom:r},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},openType:{type:String,default:""}},emits:["scaleChange"],setup(e,n){const s=t({choiceValue:[],selectParams:{tableType:"TABLE_LIST",pageSize:20,page:1},cloneItem:{},columnName:"",showField:"",curOptions:[],fieldList:[],buttonList:[],fetching:!1,searchKeyword:""});e.openType;const c=l((()=>e.form[e.item.val_key])),v=l((()=>{var t,l;return!!(null==(l=null==(t=e.item)?void 0:t.setting)?void 0:l.isMultiple)})),p=l((()=>{const{targetSource:t={},options:l=[],optionType:a}=e.item||{};return!(!t.target_id||!l.length&&3!=a)})),m=l((()=>{const{targetSource:t={}}=e.item||{};return!!t.target_id&&!p.value})),d=l((()=>{var t;const{target_id:l,values:a}=(null==(t=e.item)?void 0:t.targetSource)||{};return l&&a?p.value?a||"value":a:"value"})),g=l((()=>{var t;const{target_id:l,showField:a}=(null==(t=e.item)?void 0:t.targetSource)||{};return l&&a?p.value?a||"label":a:"label"})),h=async()=>{const{targetSource:t,type:l,options:a=[],optionType:i=1}=s.cloneItem;if(s.showField="label",null==t?void 0:t.target_id)if(p.value)s.curOptions=(e=>e&&e.length?e.map((e=>("cascadeData"in e&&Object.assign(e,{...e.cascadeData}),d.value in e||(e[d.value]=e.value||e.label),g.value in e||(e[g.value]=e.label),e))):[])(a);else try{s.fetching=!0,s.curOptions=await e.getSelectOptions(s.cloneItem),s.fetching=!1,s.columnName=null==t?void 0:t.values,s.showField=(null==t?void 0:t.showField)||(null==t?void 0:t.values)}catch(e){s.fetching=!1}},f=async t=>{if(m.value){s.searchKeyword=t;try{s.curOptions=await e.getSearchOptions({values:s.columnName,showField:s.showField,keyword:t},s.cloneItem)}catch(e){console.log(e)}}},y=async e=>{var t;if(!e||!m.value)return;if(!c.value&&s.searchKeyword)return void f();if(!c.value||!(null==(t=s.curOptions)?void 0:t.length))return;s.curOptions.find((e=>e[d.value]===c.value))||f(c.value)},O=t=>{const l={value:"",list:[]};let a;return t&&Array.isArray(t)?(l.value=t,t.length?(t.forEach((e=>{a=S(e),a&&l.list.push(a)})),void n.emit("scaleChange",l,e.item,l)):(l.list=[],void n.emit("scaleChange",l,e.item,l))):(l.value=t,a=S(t),a&&l.list.push(a),void n.emit("scaleChange",l,e.item,l))},S=e=>s.curOptions.find((t=>t.value===e));return a((()=>e.item),(e=>{e&&Object.keys(e).length&&(e=>{var t;s.cloneItem=JSON.parse(JSON.stringify(e));let l=s.cloneItem.options||[];"EVALUATE_SELECT"===e.type&&(l=(null==(t=s.cloneItem.scoreConfigs)?void 0:t.scoreRules)||[]),s.curOptions=l,h()})(e)}),{immediate:!0}),()=>i(o("n-select"),{value:e.form[e.item.val_key],"onUpdate:value":[t=>e.form[e.item.val_key]=t,O],filterable:!0,clearable:!0,placeholder:"请选择","value-field":d.value,"label-field":g.value,multiple:v.value,disabled:e.isLock,loading:s.fetching,options:s.curOptions,remote:m.value,onSearch:f,"onUpdate:show":y},{empty:()=>s.fetching?i(r,null,null):i(u,null,null)})}});export{s as default};
1
+ import{defineComponent as e,reactive as t,computed as l,watch as a,createVNode as i,resolveComponent as o}from"vue";import{NSelect as n,NEmpty as u}from"naive-ui";import r from"../LoadingCom.vue.js";var s=e({name:"RSelect",components:{NSelect:n,NEmpty:u,LoadingCom:r},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},openType:{type:String,default:""}},emits:["scaleChange"],setup(e,n){const s=t({choiceValue:[],selectParams:{tableType:"TABLE_LIST",pageSize:20,page:1},cloneItem:{},columnName:"",showField:"",curOptions:[],fieldList:[],buttonList:[],fetching:!1,searchKeyword:""});e.openType;const c=l((()=>e.form[e.item.val_key])),v=l((()=>{var t,l;return!!(null==(l=null==(t=e.item)?void 0:t.setting)?void 0:l.isMultiple)})),d=l((()=>{const{targetSource:t={},options:l=[],optionType:a}=e.item||{};return!(!t.target_id||!l.length&&3!=a)})),p=l((()=>{const{targetSource:t={}}=e.item||{};return!!t.target_id&&!d.value})),m=l((()=>{var t;const{target_id:l,values:a}=(null==(t=e.item)?void 0:t.targetSource)||{};return l&&a?d.value?a||"value":a:"value"})),g=l((()=>{var t;const{target_id:l,showField:a}=(null==(t=e.item)?void 0:t.targetSource)||{};return l&&a?d.value?a||"label":a:"label"})),h=async()=>{const{targetSource:t,type:l,options:a=[],optionType:i=1}=s.cloneItem;if(s.showField="label",null==t?void 0:t.target_id)if(d.value)s.curOptions=(e=>e&&e.length?e.map((e=>("cascadeData"in e&&Object.assign(e,{...e.cascadeData}),m.value in e||(e[m.value]=e.value||e.label),g.value in e||(e[g.value]=e.label),e))):[])(a);else try{s.fetching=!0,s.curOptions=await e.getSelectOptions(s.cloneItem),s.fetching=!1,s.columnName=null==t?void 0:t.values,s.showField=(null==t?void 0:t.showField)||(null==t?void 0:t.values)}catch(e){s.fetching=!1}},f=async t=>{if(p.value){s.searchKeyword=t;try{s.curOptions=await e.getSearchOptions({values:s.columnName,showField:s.showField,keyword:t},s.cloneItem)}catch(e){console.log(e)}}},y=async e=>{var t;if(!e||!p.value)return;if(!c.value&&s.searchKeyword)return void f();if(!c.value||!(null==(t=s.curOptions)?void 0:t.length))return;s.curOptions.find((e=>e[m.value]===c.value))||f(c.value)},O=t=>{const l={value:"",list:[]};let a;return t&&Array.isArray(t)?(l.value=t,t.length?(t.forEach((e=>{a=w(e),a&&l.list.push(a)})),void n.emit("scaleChange",l,e.item,l)):(l.list=[],void n.emit("scaleChange",l,e.item,l))):(l.value=t,a=w(t),a&&l.list.push(a),void n.emit("scaleChange",l,e.item,l))},w=e=>s.curOptions.find((t=>t.value===e));return a((()=>e.item),(e=>{e&&Object.keys(e).length&&(e=>{var t;s.cloneItem=JSON.parse(JSON.stringify(e));let l=s.cloneItem.options||[];"EVALUATE_SELECT"===e.type&&(l=(null==(t=s.cloneItem.scoreConfigs)?void 0:t.scoreRules)||[]),s.curOptions=l,h()})(e)}),{immediate:!0}),()=>{var t;return i(o("n-select"),{value:e.form[e.item.val_key],"onUpdate:value":[t=>e.form[e.item.val_key]=t,O],filterable:!0,clearable:!0,placeholder:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.147"))||"请选择","value-field":m.value,"label-field":g.value,multiple:v.value,disabled:e.isLock,loading:s.fetching,options:s.curOptions,remote:p.value,onSearch:f,"onUpdate:show":y},{empty:()=>s.fetching?i(r,null,null):i(u,null,null)})}}});export{s as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,computed as i,createVNode as t,createTextVNode as a,resolveComponent as n,Fragment as o}from"vue";import{NButton as s,NIcon as c,NSpace as r,useDialog as m}from"naive-ui";import u from"./standard-modal.js";import p from"./sign-com.js";import{EyeOutline as v,TrashOutline as d}from"@vicons/ionicons5";import{api as g}from"v-viewer";var f=e({name:"RSign",components:{NButton:s,NIcon:c,NSpace:r,StandardModal:u,SignCom:p},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,s){const r=l(null),u=l(!1),p=l([]),f=m(),k=i((()=>{var l,i;return(null==(i=null==(l=e.item)?void 0:l.setting)?void 0:i.limitPic)||1})),C=i((()=>p.value.length<k.value&&!e.isLock));(()=>{const l=e.form[e.item.val_key];l&&Array.isArray(l)&&l.length&&(p.value=l)})();const h=()=>{u.value=!1},y=()=>{r.value.reset()},b=()=>{r.value.generate().then((l=>{console.log(l),p.value.push(l),s.emit("scaleChange",p.value,e.item),h()})).catch((e=>{console.log(e)}))},w=()=>{e.isLock||(u.value=!0)},x=()=>t("div",{class:"sigan-content-wrap"},[p.value.map(((l,i)=>t("div",{class:"sign-item"},[t("img",{src:l.url},null),t("div",null,[t(c,{component:v,onClick:()=>(e=>{const l=p.value.map((e=>e.url)).filter(Boolean);l.length&&g({images:l,options:{toolbar:!0,initialViewIndex:e}})})(i)},null),!e.isLock&&t(c,{component:d,onClick:()=>(l=>{e.isLock||f.warning({title:"提示",content:"确认要删除签名吗?",positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:()=>{p.value.splice(l,1),s.emit("scaleChange",p.value,e.item)},onNegativeClick(){}})})(i)},null)])]))),C.value&&t("div",{class:"add-sign-wrap",onClick:w},[t("i",{class:"scale-view-iconfont icon-scale-view-qianming"},null),t("span",null,[a("添加签名")])])]),L=()=>t(n("standard-modal"),{class:"r-sign-modal",visible:u.value,title:e.item.title,modalWidth:"652px",modalHeight:"476px",handleOk:b,cancel:h},{default:()=>t(n("sign-com"),{ref:r,isCrop:!0},null),action:()=>t(o,null,[t(n("n-space"),null,{default:()=>[t(n("n-button"),{size:"small",onClick:h},{default:()=>[a("取消")]}),t(n("n-button"),{size:"small",onClick:y,type:"primary"},{default:()=>[a("重签")]}),t(n("n-button"),{size:"small",onClick:b,type:"primary"},{default:()=>[a("确认")]})]})])});return()=>t("div",{class:"c-sign-wrap"},[x(),L()])}});export{f as default};
1
+ import{defineComponent as e,ref as l,computed as i,createVNode as n,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 m from"./standard-modal.js";import d from"./sign-com.js";import{EyeOutline as v,TrashOutline as p}from"@vicons/ionicons5";import{api as g}from"v-viewer";var f=e({name:"RSign",components:{NButton:s,NIcon:c,NSpace:u,StandardModal:m,SignCom:d},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,s){const u=l(null),m=l(!1),d=l([]),f=r(),w=i((()=>{var l,i;return(null==(i=null==(l=e.item)?void 0:l.setting)?void 0:i.limitPic)||1})),C=i((()=>d.value.length<w.value&&!e.isLock));(()=>{const l=e.form[e.item.val_key];l&&Array.isArray(l)&&l.length&&(d.value=l)})();const k=()=>{m.value=!1},y=()=>{u.value.reset()},h=()=>{u.value.generate().then((l=>{console.log(l),d.value.push(l),s.emit("scaleChange",d.value,e.item),k()})).catch((e=>{console.log(e)}))},b=()=>{e.isLock||(m.value=!0)},L=()=>n("div",{class:"sigan-content-wrap"},[d.value.map(((l,i)=>n("div",{class:"sign-item"},[n("img",{src:l.url},null),n("div",null,[n(c,{component:v,onClick:()=>(e=>{const l=d.value.map((e=>e.url)).filter(Boolean);l.length&&g({images:l,options:{toolbar:!0,initialViewIndex:e}})})(i)},null),!e.isLock&&n(c,{component:p,onClick:()=>(l=>{var i,n;e.isLock||f.warning({title:"提示",content:"确认要删除签名吗?",positiveText:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.27"))||"确定",negativeText:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.28"))||"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:()=>{d.value.splice(l,1),s.emit("scaleChange",d.value,e.item)},onNegativeClick(){}})})(i)},null)])]))),C.value&&n("div",{class:"add-sign-wrap",onClick:b},[n("i",{class:"scale-view-iconfont icon-scale-view-qianming"},null),n("span",null,[a("添加签名")])])]),B=()=>n(o("standard-modal"),{class:"r-sign-modal",visible:m.value,title:e.item.title,modalWidth:"652px",modalHeight:"476px",handleOk:h,cancel:k},{default:()=>n(o("sign-com"),{ref:u,isCrop:!0},null),action:()=>n(t,null,[n(o("n-space"),null,{default:()=>[n(o("n-button"),{size:"small",onClick:k},{default:()=>{var e;return[a((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.28"))||"取消")]}}),n(o("n-button"),{size:"small",onClick:y,type:"primary"},{default:()=>[a("重签")]}),n(o("n-button"),{size:"small",onClick:h,type:"primary"},{default:()=>[a("确认")]})]})])});return()=>n("div",{class:"c-sign-wrap"},[L(),B()])}});export{f as default};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as i,reactive as t,ref as l,createVNode as a,resolveComponent as n}from"vue";import{NModal as o,NButton as s,NTooltip as d}from"naive-ui";var c=e({name:"StandardModal",components:{NModal:o,NButton:s,NTooltip:d},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 s=i((()=>e.modalWidth||"50vw")),d=i((()=>e.modalHeight||"50vh")),c=t({modalWidth:s.value,modalHeight:d.value,maxHeight:"620px",isChangeWindow:!1}),u=l(!1),h=()=>{e.handleOk()},v=()=>{e.cancel(),o.emit("update:visible",!1)},g=()=>{const i=null==e?void 0:e.title,t=typeof i;return a("div",{class:"n-dialog__title-content"},["string"===t?a("div",null,[i]):null,"function"===t?a("div",null,[i()]):null,a("div",{class:"svg-wrap"},[e.changeSize?a("i",{onClick:()=>(document.body.clientHeight,void Object.assign(c,{isChangeWindow:!c.isChangeWindow,modalWidth:c.modalWidth===s.value?"100vw":s.value,modalHeight:c.modalHeight===d.value?"100vh":d.value})),class:u.value?"scale-view-iconfont icon-scale-view-menzhenyishengzhanxitongtubiaozuixiaohua2":"scale-view-iconfont icon-scale-view-menzhenyishengzhanxitongtubiaozuidahua"},null):null,e.closable?a("i",{class:"scale-view-iconfont icon-scale-view-menzhenyishengzhanxitongtubiaoguanbi",onClick:()=>v()},null):null])])};return()=>(()=>{const i={...o.slots};return i.header||(i.header=g),a(n("n-modal"),{class:"c-scale-modal-container",show:e.visible,"mask-closable":!1,"show-icon":!1,closable:!1,style:{width:c.modalWidth,height:c.modalHeight},preset:"dialog","positive-text":"确认","negative-text":"取消","on-positive-click":h,"on-negative-click":v,positiveButtonProps:{type:"primary"}},{...i})})()}});export{c as default};
1
+ import{defineComponent as e,computed as i,reactive as l,ref as t,createVNode as a,resolveComponent as n}from"vue";import{NModal as o,NButton as d,NTooltip as s}from"naive-ui";var c=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")),c=l({modalWidth:d.value,modalHeight:s.value,maxHeight:"620px",isChangeWindow:!1}),u=t(!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 a("div",{class:"n-dialog__title-content"},["string"===l?a("div",null,[i]):null,"function"===l?a("div",null,[i()]):null,a("div",{class:"svg-wrap"},[e.changeSize?a("i",{onClick:()=>(document.body.clientHeight,void Object.assign(c,{isChangeWindow:!c.isChangeWindow,modalWidth:c.modalWidth===d.value?"100vw":d.value,modalHeight:c.modalHeight===s.value?"100vh":s.value})),class:u.value?"scale-view-iconfont icon-scale-view-menzhenyishengzhanxitongtubiaozuixiaohua2":"scale-view-iconfont icon-scale-view-menzhenyishengzhanxitongtubiaozuidahua"},null):null,e.closable?a("i",{class:"scale-view-iconfont icon-scale-view-menzhenyishengzhanxitongtubiaoguanbi",onClick:()=>v()},null):null])])};return()=>(()=>{var i;const l={...o.slots};return l.header||(l.header=g),a(n("n-modal"),{class:"c-scale-modal-container",show:e.visible,"mask-closable":!1,"show-icon":!1,closable:!1,style:{width:c.modalWidth,height:c.modalHeight},preset:"dialog","positive-text":"确认","negative-text":(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.28"))||"取消","on-positive-click":h,"on-negative-click":v,positiveButtonProps:{type:"primary"}},{...l})})()}});export{c as default};
@@ -1 +1 @@
1
- import{computed as e}from"vue";import{isEvaluation as t}from"../utils/judge-types.js";import"xe-utils";import a from"moment";import i from"../../../../shared/utils/vexutilsExpand.js";import{componentMapStr as n}from"./use-component.js";const o=(o,l,r)=>{const{query:s,scaleViewDom:u}=r,v=(new Date).getTime(),c=e((()=>{var e,t;return null==(t=null==(e=l.originConfig)?void 0:e.otherSetting)?void 0:t.desLocation})),d=e((()=>{var e,t;return null==(t=null==(e=l.originConfig)?void 0:e.otherSetting)?void 0:t.desContent})),m=e((()=>"start"===c.value&&!!d.value)),p=e((()=>"end"===c.value&&!!d.value)),g=e((()=>{var e;return s.importId||(null==(e=o.params)?void 0:e.importId)})),f=e((()=>1==(null==s?void 0:s.formBoldOpen))),h=e((()=>e=>{var a;return!g.value&&(!!t(e.type)&&(1==(null==s?void 0:s.evatip)||1==(null==(a=o.params)?void 0:a.evatip)))})),S=e((()=>{var e;return(null==(e=l.config)?void 0:e.evaluateResultSetting)||{}})),C=e((()=>{const{evaluateTime:e}=S.value;return+e})),E=e((()=>{var e;return null==(e=S.value)?void 0:e.evaluateStartTime})),O=e((()=>{const e=new Date(E.value);return!!i.isValidDate(e)&&e})),w=e((()=>{const{evaluetaResSituation:e}=S.value||{};return e})),L=e((()=>{const{evaluateZeroTip:e}=S.value||{};return e})),y=e((()=>{if(!E.value||!C.value)return!1;if(!O.value)return!1;const e=a(E.value).add(C.value,"minutes").valueOf();return v>=e})),b=e((()=>{const e=O.value;if(!e)return!1;const t=a(e).valueOf();return v<t})),B=e((()=>e=>{const t=e.required;return o.styleSetting&&Object.keys(o.styleSetting).length&&"formBoldOpen"in o.styleSetting?t&&o.styleSetting.formBoldOpen:t&&f.value})),R=e((()=>{let e=l.fontSize;if(!e||"S"===e)return;e={L:"large",M:"medium",XS:"extrasmall"}[e];const t=e&&(null==o?void 0:o.fontSizeObj[e])||1,a=Math.floor(100/t*1e4)/1e4;return{width:`${a}%`,height:`${a}%`,transform:`scale(${t})`}})),T=e((()=>!("customList"==o.type&&!o.noBtn)&&!(!o.noBtn&&!o.hideBtn))),k=e((()=>e=>ne(e))),A=e((()=>e=>{var a;const{type:i}=e||{},n=!1===(null==(a=l.config)?void 0:a.autoQuestionNumber)?e.showTitle:`${e.softcode}、${e.showTitle}`;if(!t(i))return n;const o=le(e);return o||L.value?`${n}&nbsp;<span style="color:#2d7aff;" class="score-i">${o}</span>`:n})),j=e((()=>{const{config:e}=l;return!g.value&&(!(!e||!Object.keys(e).length)&&"totalScore"in e)})),_=e((()=>{var e;return(null==(e=o.ids)?void 0:e.guage_id)&&o.noBtn})),U=e((()=>{const e=o.params||{};if(!("skipCover"in e))return!1;return e.skipCover&&!b.value&&!y.value})),F=e((()=>_.value||l.isFinished&&!g.value||o.noBtn||o.hideBtn)),D=e((()=>l.showEvaluatePage&&l.showEvaluateSettingWrap&&!F.value&&!U.value)),P=e((()=>!j.value&&!D.value&&l.showEvaluateCountdownWrap&&!F.value)),V=e((()=>{const{evaluateResultSetting:e={}}=l.config;return(Object.values(e).filter((e=>{if(e)return!0}))||[]).length})),x=e((()=>l.paramsEvaluate&&Object.keys(l.paramsEvaluate).length)),$=e((()=>{const e=window.location.search||window.location.hash;if(!e)return;const t=["evaname","evadesc","evast","evadur","evaan","evasit","evaztip"].find((t=>e.includes(t)));return l.paramsEvaluate||t})),I=e((()=>{var e;return 1==s.isEdit||1==(null==(e=o.params)?void 0:e.isEdit)||g.value})),N=e((()=>1==l.isFinished&&I.value)),K=e((()=>V.value||$.value?!o.noBtn&&!o.hideBtn&&(!l.isFinished||I.value):!o.noBtn&&!o.hideBtn)),M=e((()=>K.value&&"guage"!==o.sourceType)),q=e((()=>K.value&&!o.isLock)),J=e((()=>o.hasExtendBtn?!o.printingHideBtn:M.value||q.value)),z=e((()=>V.value||$.value?!!o.hideBtn||!!o.isLock||l.isFinished&&!I.value:!!o.hideBtn||!!o.isLock)),H=e((()=>e=>({EVALUATE_RADIO_BLOCK:"单选",EVALUATE_CHECKBOX_BLOCK:"多选"}[e.type]))),X=e((()=>e=>{var t;if(N.value)return!1;const{evaluateAnswer:n,checkAnswerMode:o,evaluateStartTime:r,evaluateTime:s}=(null==(t=l.config)?void 0:t.evaluateResultSetting)||{},u=(null==e?void 0:e.scoreConfigs)||0,v=n&&l.isFinished&&["EVALUATE_RADIO_BLOCK","EVALUATE_CHECKBOX_BLOCK","EVALUATE_SELECT","EVALUATE_INPUT"].includes(e.type)&&u;if(!r||!s||o&&1==o)return v;if(!i.isValidDate(new Date(r)))return v;const c=a(r).add(s,"minutes").diff(a(),"seconds",!0);return v&&c<=0})),Q=e((()=>"customList"===o.type?"保存":"提交")),W=e((()=>({getSelectOptions:o.getSelectOptions,getSearchOptions:o.getSearchOptions,openType:o.openType}))),Z=e((()=>({getCascadeOptions:o.getCascadeOptions}))),G=e((()=>({uploadPictureUrl:o.uploadPictureUrl,uploadFileUrl:o.uploadFileUrl}))),Y=e((()=>({ak:o.ak}))),ee=e((()=>({source:"guage",getChunkUploadConfig:o.getChunkUploadConfig}))),te=e((()=>({selectedList:l.labelSelectedList,selectedListObj:l.labelSelectedListObj,getLabelList:o.getLabelList,deleteLabel:o.deleteLabel,saveLabelItem:o.saveLabelItem,sourceType:o.sourceType}))),ae={RSelectCom:W.value,RCascaderCom:Z.value,RUploadCom:G.value,RMapCom:Y.value,RVodChunkUploadCom:ee.value},ie=e((()=>(e,t)=>{var a;const i=n[e.type],o=ae[i]||{},r={form:l.form,item:e,index:t,isLock:z.value,...o};return"RVodChunkUploadCom"===i&&Object.assign(r,{formData:e,limitNum:(null==(a=e.setting)?void 0:a.limitPic)||1,defFileList:l.form[e.val_key]}),"RMapCom"===i&&Object.assign(r,{locationProp:l.form[e.val_key]}),"CSelectLabelCom"===i&&(Object.assign(r,{...te.value}),delete r.form,delete r.index),r})),ne=(e,t)=>{if(e.hide)return!1;const{form:a={},formArray:n=[]}=l;let o={};if(t){let t=e.setting;if(e.setting&&i.isJSON(e.setting)&&(t=JSON.parse(e.setting)),o=i.isString(t.callbackCondition)?JSON.parse(t.callbackCondition):t.callbackCondition,!o||!o.condition||!o.condition.length)return!0}else o=i.isString(e.relationLogic)?JSON.parse(e.relationLogic):e.relationLogic;if(!o||!Object.keys(o).length)return!0;const{relation_logic_is:r,condition:s,relation_logic:u}=o;if(r){const t=s.map((e=>{const t=n.filter((t=>t.seq==e.subject_seq))[0],o=oe(t);return i.isArray(a[o])?a[o].some((t=>e.value.includes(t))):e.value.includes(a[o])}));e.isShow="OR"==u?t.some((e=>e)):"AND"==u?t.every((e=>e)):t[0]}return e.isShow},oe=e=>e.databaseTitle||e.title,le=e=>{const{maxScore:t=0,minScore:a=0,scoreType:i}=e.scoreConfigs||{};return"eachOptionScore"===i&&a<0?`(${a}-${t}分)`:t||L.value?`(${t}分)`:void 0},re=e((()=>{var e;return{formArray:l.formArray,evaluateResultConfig:(null==(e=l.config)?void 0:e.evaluateResultConfig)||{},evaluateResultSetting:S.value,isFinished:l.isFinished,maxScore:l.maxScore,skipCover:U.value}})),se=e((()=>{var e;return{formArray:l.formArray,evaluateResultConfig:(null==(e=l.config)?void 0:e.evaluateResultConfig)||{},evaluateResultSetting:S.value,form:l.form,isFinished:l.isFinished,currentTime:l.currentTime,showEvaluateCountdown:l.showEvaluateCountdown,isEvaluetaResSituation:w.value,evaResultObj:l.evaResultObj,scaleViewDom:u.value}}));return{showEvatip:h,isFormBoldOpen:B,scaleStyle:R,handlePageClass:T,isShowItem:k,handleShowQuestionNumber:A,hasScore:j,isPreviewScale:_,showEvaluateEntry:D,showEvaluateCoundownPage:P,hasEvaluateResultSetting:V,hasparamsEvaluate:x,hasDefault:$,showScaleFooter:J,isCancelBtn:M,isSaveBtn:q,componentDisable:z,showEvaluateLabel:H,showAnswerParse:X,tipMsg:Q,propsConfig:ie,showEvent:ne,formKey:oe,evaluatePageProps:re,evaluateCountdownProps:se,skipCover:U,scaleEdit:N,isEvaluetaResSituation:w,disableEdit:F,isImportScale:g,desStart:m,desEnd:p,desContent:d}};export{o as ScaleViewComputed};
1
+ import{computed as e,toRef as t}from"vue";import{isEvaluation as a}from"../utils/judge-types.js";import"xe-utils";import n from"moment";import i from"../../../../shared/utils/vexutilsExpand.js";import{componentMapStr as o}from"./use-component.js";const l=(l,r,s)=>{const{query:u,scaleViewDom:v}=s,d=(new Date).getTime(),c=e((()=>{var e,t;return null==(t=null==(e=r.originConfig)?void 0:e.otherSetting)?void 0:t.desLocation})),m=e((()=>{var e,t;return null==(t=null==(e=r.originConfig)?void 0:e.otherSetting)?void 0:t.desContent})),g=e((()=>"start"===c.value&&!!m.value)),p=e((()=>"end"===c.value&&!!m.value)),f=e((()=>{var e;return u.importId||(null==(e=l.params)?void 0:e.importId)})),h=e((()=>1==(null==u?void 0:u.formBoldOpen))),C=e((()=>e=>{var t;return!f.value&&(!!a(e.type)&&(1==(null==u?void 0:u.evatip)||1==(null==(t=l.params)?void 0:t.evatip)))})),S=e((()=>{var e;return(null==(e=r.config)?void 0:e.evaluateResultSetting)||{}})),w=e((()=>{const{evaluateTime:e}=S.value;return+e})),E=e((()=>{var e;return null==(e=S.value)?void 0:e.evaluateStartTime})),L=e((()=>{const e=new Date(E.value);return!!i.isValidDate(e)&&e})),y=e((()=>{const{evaluetaResSituation:e}=S.value||{};return e})),O=e((()=>{const{evaluateZeroTip:e}=S.value||{};return e})),b=e((()=>{if(!E.value||!w.value)return!1;if(!L.value)return!1;const e=n(E.value).add(w.value,"minutes").valueOf();return d>=e})),B=e((()=>{const e=L.value;if(!e)return!1;const t=n(e).valueOf();return d<t})),R=e((()=>e=>{const t=e.required;return l.styleSetting&&Object.keys(l.styleSetting).length&&"formBoldOpen"in l.styleSetting?t&&l.styleSetting.formBoldOpen:t&&h.value})),k=e((()=>{let e=r.fontSize;if(!e||"S"===e)return;e={L:"large",M:"medium",XS:"extrasmall"}[e];const t=e&&(null==l?void 0:l.fontSizeObj[e])||1,a=Math.floor(100/t*1e4)/1e4;return{width:`${a}%`,height:`${a}%`,transform:`scale(${t})`}})),T=e((()=>!("customList"==l.type&&!l.noBtn)&&!(!l.noBtn&&!l.hideBtn))),A=e((()=>e=>re(e))),P=e((()=>e=>{var t;const{type:n}=e||{},i=!1===(null==(t=r.config)?void 0:t.autoQuestionNumber)?e.showTitle:`${e.softcode}、${e.showTitle}`;if(!a(n))return i;const o=ue(e);return o||O.value?`${i}&nbsp;<span style="color:#2d7aff;" class="score-i">${o}</span>`:i})),j=e((()=>{const{config:e}=r;return!f.value&&(!(!e||!Object.keys(e).length)&&"totalScore"in e)})),_=e((()=>{var e;return(null==(e=l.ids)?void 0:e.guage_id)&&l.noBtn})),U=e((()=>{const e=l.params||{};if(!("skipCover"in e))return!1;return e.skipCover&&!B.value&&!b.value})),F=e((()=>_.value||r.isFinished&&!f.value||l.noBtn||l.hideBtn)),D=e((()=>r.showEvaluatePage&&r.showEvaluateSettingWrap&&!F.value&&!U.value)),x=e((()=>!j.value&&!D.value&&r.showEvaluateCountdownWrap&&!F.value)),V=e((()=>{const{evaluateResultSetting:e={}}=r.config;return(Object.values(e).filter((e=>{if(e)return!0}))||[]).length})),I=e((()=>r.paramsEvaluate&&Object.keys(r.paramsEvaluate).length)),$=e((()=>{const e=window.location.search||window.location.hash;if(!e)return;const t=["evaname","evadesc","evast","evadur","evaan","evasit","evaztip"].find((t=>e.includes(t)));return r.paramsEvaluate||t})),N=e((()=>{var e;return 1==u.isEdit||1==(null==(e=l.params)?void 0:e.isEdit)||f.value})),K=e((()=>1==r.isFinished&&N.value)),M=e((()=>V.value||$.value?!l.noBtn&&!l.hideBtn&&(!r.isFinished||N.value):!l.noBtn&&!l.hideBtn)),q=e((()=>M.value&&"guage"!==l.sourceType)),G=e((()=>M.value&&!l.isLock)),J=e((()=>l.hasExtendBtn?!l.printingHideBtn:q.value||G.value)),z=e((()=>V.value||$.value?!!l.hideBtn||!!l.isLock||r.isFinished&&!N.value:!!l.hideBtn||!!l.isLock)),H=e((()=>e=>{var t,a;return{EVALUATE_RADIO_BLOCK:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.298"))||"单选",EVALUATE_CHECKBOX_BLOCK:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.100"))||"多选"}[e.type]})),X=e((()=>e=>{var t;if(K.value)return!1;const{evaluateAnswer:a,checkAnswerMode:o,evaluateStartTime:l,evaluateTime:s}=(null==(t=r.config)?void 0:t.evaluateResultSetting)||{},u=(null==e?void 0:e.scoreConfigs)||0,v=a&&r.isFinished&&["EVALUATE_RADIO_BLOCK","EVALUATE_CHECKBOX_BLOCK","EVALUATE_SELECT","EVALUATE_INPUT"].includes(e.type)&&u;if(!l||!s||o&&1==o)return v;if(!i.isValidDate(new Date(l)))return v;const d=n(l).add(s,"minutes").diff(n(),"seconds",!0);return v&&d<=0})),Q=e((()=>{var e;return"customList"===l.type?(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.244"))||"保存":"提交"})),W=e((()=>({getSelectOptions:l.getSelectOptions,getSearchOptions:l.getSearchOptions,openType:l.openType}))),Z=e((()=>({getCascadeOptions:l.getCascadeOptions}))),Y=e((()=>({uploadPictureUrl:l.uploadPictureUrl,uploadFileUrl:l.uploadFileUrl}))),ee=e((()=>({ak:l.ak}))),te=e((()=>({source:"guage",getChunkUploadConfig:l.getChunkUploadConfig}))),ae=e((()=>({selectedList:r.labelSelectedList,selectedListObj:r.labelSelectedListObj,getLabelList:l.getLabelList,deleteLabel:l.deleteLabel,saveLabelItem:l.saveLabelItem,sourceType:l.sourceType}))),ne=e((()=>({isGeneratePrintPdf:t(l,"isGeneratePrintPdf")}))),ie=e((()=>({isGeneratePrintPdf:t(l,"isGeneratePrintPdf")}))),oe={RSelectCom:W.value,RCascaderCom:Z.value,RUploadCom:Y.value,RMapCom:ee.value,RVodChunkUploadCom:te.value,RInputCom:ne.value,RRadioCom:ie.value,RCheckboxCom:ie.value},le=e((()=>(e,t)=>{var a;const n=o[e.type],i=oe[n]||{},l={form:r.form,item:e,index:t,isLock:z.value,...i};return"RVodChunkUploadCom"===n&&Object.assign(l,{formData:e,limitNum:(null==(a=e.setting)?void 0:a.limitPic)||1,defFileList:r.form[e.val_key]}),"RMapCom"===n&&Object.assign(l,{locationProp:r.form[e.val_key]}),"CSelectLabelCom"===n&&(Object.assign(l,{...ae.value}),delete l.form,delete l.index),l})),re=(e,t)=>{if(e.hide)return!1;const{form:a={},formArray:n=[]}=r;let o={};if(t){let t=e.setting;if(e.setting&&i.isJSON(e.setting)&&(t=JSON.parse(e.setting)),o=i.isString(t.callbackCondition)?JSON.parse(t.callbackCondition):t.callbackCondition,!o||!o.condition||!o.condition.length)return!0}else o=i.isString(e.relationLogic)?JSON.parse(e.relationLogic):e.relationLogic;if(!o||!Object.keys(o).length)return!0;const{relation_logic_is:l,condition:s,relation_logic:u}=o;if(l){const t=s.map((e=>{const t=n.filter((t=>t.seq==e.subject_seq))[0],o=se(t);return i.isArray(a[o])?a[o].some((t=>e.value.includes(t))):e.value.includes(a[o])}));e.isShow="OR"==u?t.some((e=>e)):"AND"==u?t.every((e=>e)):t[0]}return e.isShow},se=e=>e.databaseTitle||e.title,ue=e=>{const{maxScore:t=0,minScore:a=0,scoreType:n}=e.scoreConfigs||{};return"eachOptionScore"===n&&a<0?`(${a}-${t}分)`:t||O.value?`(${t}分)`:void 0},ve=e((()=>{var e;return{formArray:r.formArray,evaluateResultConfig:(null==(e=r.config)?void 0:e.evaluateResultConfig)||{},evaluateResultSetting:S.value,isFinished:r.isFinished,maxScore:r.maxScore,skipCover:U.value}})),de=e((()=>{var e;return{formArray:r.formArray,evaluateResultConfig:(null==(e=r.config)?void 0:e.evaluateResultConfig)||{},evaluateResultSetting:S.value,form:r.form,isFinished:r.isFinished,currentTime:r.currentTime,showEvaluateCountdown:r.showEvaluateCountdown,isEvaluetaResSituation:y.value,evaResultObj:r.evaResultObj,scaleViewDom:v.value}}));return{showEvatip:C,isFormBoldOpen:R,scaleStyle:k,handlePageClass:T,isShowItem:A,handleShowQuestionNumber:P,hasScore:j,isPreviewScale:_,showEvaluateEntry:D,showEvaluateCoundownPage:x,hasEvaluateResultSetting:V,hasparamsEvaluate:I,hasDefault:$,showScaleFooter:J,isCancelBtn:q,isSaveBtn:G,componentDisable:z,showEvaluateLabel:H,showAnswerParse:X,tipMsg:Q,propsConfig:le,showEvent:re,formKey:se,evaluatePageProps:ve,evaluateCountdownProps:de,skipCover:U,scaleEdit:K,isEvaluetaResSituation:y,disableEdit:F,isImportScale:f,desStart:g,desEnd:p,desContent:m}};export{l as ScaleViewComputed};
@@ -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:E,isEvaluetaResSituation:d,handleScoreJson:p,disableEdit:f}=l,C=a=>{s.warning({title:"提示",content:()=>e("div",{class:"evatip-container"},[e("span","答案解析:"),e("p",a)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",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}!f.value&&d.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:()=>{o.showEvaluateCountdown=!1,v.value||(o.banSubmit=!0,E(),s.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>({})}))},showEvaTipModal:async e=>{var a;if(o.evatipMap[e.id])return void C(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,C(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};
@@ -107,4 +107,8 @@ export declare const ScaleViewProps: {
107
107
  type: BooleanConstructor;
108
108
  default: boolean;
109
109
  };
110
+ isGeneratePrintPdf: {
111
+ type: BooleanConstructor;
112
+ default: boolean;
113
+ };
110
114
  };
@@ -1 +1 @@
1
- const e={guageData:{type:Object,default:()=>({})},styleSetting:{type:Object,default:()=>({})},ids:{type:Object,default:()=>({guage_id:"",db_id:void 0})},params:{default:()=>({}),type:Object},noBtn:{type:[Boolean,String,Number],default:!1},hideBtn:{type:[Boolean,String,Number],default:!1},isLock:{type:[Boolean,String,Number],default:!1},type:{type:String,default:""},openType:{type:String,default:""},scaleApiConfig:{type:Object,default:()=>({})},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},getCascadeOptions:{type:Function,default:()=>Promise.resolve([])},getLabelList:{type:Function,default:()=>Promise.resolve([])},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},uploadPictureUrl:{type:String,default:""},uploadFileUrl:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"},sourceType:{type:String,default:""},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})},fontSizeObj:{type:Object,default:()=>({large:1.25,medium:1.1,small:1,extrasmall:.9})},hasExtendBtn:{type:Boolean,default:!1},printingHideBtn:{type:Boolean,default:!1}};export{e as ScaleViewProps};
1
+ const e={guageData:{type:Object,default:()=>({})},styleSetting:{type:Object,default:()=>({})},ids:{type:Object,default:()=>({guage_id:"",db_id:void 0})},params:{default:()=>({}),type:Object},noBtn:{type:[Boolean,String,Number],default:!1},hideBtn:{type:[Boolean,String,Number],default:!1},isLock:{type:[Boolean,String,Number],default:!1},type:{type:String,default:""},openType:{type:String,default:""},scaleApiConfig:{type:Object,default:()=>({})},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},getCascadeOptions:{type:Function,default:()=>Promise.resolve([])},getLabelList:{type:Function,default:()=>Promise.resolve([])},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},uploadPictureUrl:{type:String,default:""},uploadFileUrl:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"},sourceType:{type:String,default:""},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})},fontSizeObj:{type:Object,default:()=>({large:1.25,medium:1.1,small:1,extrasmall:.9})},hasExtendBtn:{type:Boolean,default:!1},printingHideBtn:{type:Boolean,default:!1},isGeneratePrintPdf:{type:Boolean,default:!1}};export{e as ScaleViewProps};
@@ -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:A,skipCover:S,hasScore:T}=a(f,d,p),E=()=>{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=I();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}},x=(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},I=()=>{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=x(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=j(l,t,i)),"CHECKBOX_BLOCK"===r.type&&(null==l?void 0:l.length)){l=w(l,t,i)}}o[a]=l}else o[n]=t[n]}return o},w=(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=j(n,e,i);o.push(a)}return o},j=(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},L=()=>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=E();t(e)}}))})),_=e=>{c.warning({title:"温馨提示",content:()=>t("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:async()=>{const t=await L();m("onSubmit",t)},onNegativeClick(){}})};return{submitMethod:E,confirmSubmit:_,onSubmitForm:L,onSubmitData:()=>{var t;if(!d.formArray.find((t=>o(t.type))))return void _("确认要提交吗?");const{evaluateResultSetting:e}=d.config;if(!e||!Object.keys(e).length&&!b.value||O.value)return void _("确认要结束测评吗?");if("formIframe"==f.openType&&b.value)return void m("submitNoRequest");let i="确定要提前结束测评吗?";if(A.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&&!S.value)&&(i="确认要结束测评吗?")}}S.value&&T.value&&(i="确认要结束测评吗?"),_(i)},handleScoreJson:I}};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"xe-utils";import"moment";import e from"../../../../shared/utils/vexutilsExpand.js";import{ScaleViewComputed as r}from"./scaleview-computed.js";const t=(t,i,n)=>{const{formKey:s}=r(t,i,n),o=(e,r)=>{let{address:t}=r||{};return!!t||new Error("必填")},l=(e,r)=>{if(!r||!Object.keys(r).length)return new Error("必填");let{labelStr:t,labels:i=[]}=r;return!(!t||!i.length)||new Error("必填")},a=(e,r)=>{let t=(i=r,Object.prototype.toString.call(i));var i;if("[object Object]"==t){if(r&&Object.keys(r).length)return!0}else if("[object Array]"==t){if(r&&r.length)return!0}else if("[object Number]"==t){if(r||0===r)return!0}else if(r)return!0;return new Error("必填")},u=["LABEL","ADDRESS"];return{formatRules:r=>{const n={};return r.forEach((r=>{let c=r.val_key;if(n[c]=[],r.required&&!u.includes(r.type)&&n[c].push({required:r.required,message:"必填",trigger:"change",validator:a}),"MOBILE"==r.type&&r.validation)n[c].push({pattern:/^1[3456789]\d{9}$/,message:"格式错误",trigger:"blur"});else if("ID_CARD"==r.type&&r.validation)n[c].push({pattern:/^\d{6}(((19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9]|x|X))|(\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}))$/,message:"格式错误",trigger:"blur"});else if("ADDRESS"==r.type&&r.required)(r=>{let t={addressType:"province-city-district-address"};return t=e.isJSON(r.setting)?JSON.parse(r.setting):r.setting,t.addressType.includes("address")})(r)&&n[c].push({validator:o,trigger:"change"});else if("LABEL"==r.type&&r.required)n[c].push({validator:l,trigger:"change"});else if("DATETIME"==r.type&&"customList"==t.type){let t=(r=>{let t=r.setting;return e.isJSON(t)&&(t=JSON.parse(t)),t.dateMaxType})(r);if(!t)return;let i={1:"checkDateMaxCur",2:"checkDateMaxSet",3:"checkDateMaxOther"};n[c].push({validator:(e,n)=>i[t](e,n,r),trigger:"change"})}else"RADIO_BLOCK"===r.type?(i.choiceComObj[s(r)]={},n[c].push({validator:(e,t)=>((e,r,t)=>{if(!r)return!0;let{options:n}=t;if(!n.length||"other"===r)return!0;const o=s(t);let{optionsPreSuffixObj:l={}}=i.choiceComObj[o]||{},a=n.find(((e,t)=>t+1===r));if(!a||a.importability)return!0;if((a.prefix||a.suffix)&&!l[r])return new Error("请完善选项");return!0})(0,t,r),trigger:["change","blur"]})):"CHECKBOX_BLOCK"===r.type&&(i.choiceComObj[s(r)]={},n[c].push({validator:(e,t)=>((e,r,t)=>{if(!r||!r.length)return!0;let{options:n}=t;if(!n.length)return!0;let o,l=0,a=r.length;const u=s(t);let{optionsPreSuffixObj:c={}}=i.choiceComObj[u]||{};for(;l<a;l++){if(o=r[l],"other"===o)continue;let e=n.find(((e,r)=>r+1===o));if(e&&!e.importability&&(e.prefix||e.suffix)&&!c[o])return new Error("请完善选项")}return!0})(0,t,r),trigger:["change","blur"]}))})),n}}};export{t as ScaleViewValidate};
1
+ import"xe-utils";import"moment";import e from"../../../../shared/utils/vexutilsExpand.js";import{ScaleViewComputed as r}from"./scaleview-computed.js";const t=(t,i,n)=>{const{formKey:o}=r(t,i,n),l=(e,r)=>{var t;let{address:i}=r||{};return!!i||new Error((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.248"))||"必填")},a=(e,r)=>{var t,i;if(!r||!Object.keys(r).length)return new Error((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.248"))||"必填");let{labelStr:n,labels:o=[]}=r;return!(!n||!o.length)||new Error((null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.248"))||"必填")},s=(e,r)=>{var t;let i=(n=r,Object.prototype.toString.call(n));var n;if("[object Object]"==i){if(r&&Object.keys(r).length)return!0}else if("[object Array]"==i){if(r&&r.length)return!0}else if("[object Number]"==i){if(r||0===r)return!0}else if(r)return!0;return new Error((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.248"))||"必填")},u=["LABEL","ADDRESS"];return{formatRules:r=>{const n={};return r.forEach((r=>{var d;let g=r.val_key;if(n[g]=[],r.required&&!u.includes(r.type)&&n[g].push({required:r.required,message:(null==(d=window.getLanguageByCode)?void 0:d.call(window,"10010.1.248"))||"必填",trigger:"change",validator:s}),"MOBILE"==r.type&&r.validation)n[g].push({pattern:/^1[3456789]\d{9}$/,message:"格式错误",trigger:"blur"});else if("ID_CARD"==r.type&&r.validation)n[g].push({pattern:/^\d{6}(((19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9]|x|X))|(\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}))$/,message:"格式错误",trigger:"blur"});else if("ADDRESS"==r.type&&r.required)(r=>{let t={addressType:"province-city-district-address"};return t=e.isJSON(r.setting)?JSON.parse(r.setting):r.setting,t.addressType.includes("address")})(r)&&n[g].push({validator:l,trigger:"change"});else if("LABEL"==r.type&&r.required)n[g].push({validator:a,trigger:"change"});else if("DATETIME"==r.type&&"customList"==t.type){let t=(r=>{let t=r.setting;return e.isJSON(t)&&(t=JSON.parse(t)),t.dateMaxType})(r);if(!t)return;let i={1:"checkDateMaxCur",2:"checkDateMaxSet",3:"checkDateMaxOther"};n[g].push({validator:(e,n)=>i[t](e,n,r),trigger:"change"})}else"RADIO_BLOCK"===r.type?(i.choiceComObj[o(r)]={},n[g].push({validator:(e,t)=>((e,r,t)=>{if(!r)return!0;let{options:n}=t;if(!n.length||"other"===r)return!0;const l=o(t);let{optionsPreSuffixObj:a={}}=i.choiceComObj[l]||{},s=n.find(((e,t)=>t+1===r));if(!s||s.importability)return!0;if((s.prefix||s.suffix)&&!a[r])return new Error("请完善选项");return!0})(0,t,r),trigger:["change","blur"]})):"CHECKBOX_BLOCK"===r.type&&(i.choiceComObj[o(r)]={},n[g].push({validator:(e,t)=>((e,r,t)=>{if(!r||!r.length)return!0;let{options:n}=t;if(!n.length)return!0;let l,a=0,s=r.length;const u=o(t);let{optionsPreSuffixObj:d={}}=i.choiceComObj[u]||{};for(;a<s;a++){if(l=r[a],"other"===l)continue;let e=n.find(((e,r)=>r+1===l));if(e&&!e.importability&&(e.prefix||e.suffix)&&!d[l])return new Error("请完善选项")}return!0})(0,t,r),trigger:["change","blur"]}))})),n}}};export{t as ScaleViewValidate};
@@ -78,6 +78,10 @@ export declare const componentMap: {
78
78
  type: BooleanConstructor;
79
79
  default: boolean;
80
80
  };
81
+ isGeneratePrintPdf: {
82
+ type: (BooleanConstructor | ObjectConstructor)[];
83
+ default: boolean;
84
+ };
81
85
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
82
86
  form: {
83
87
  type: ObjectConstructor;
@@ -95,11 +99,16 @@ export declare const componentMap: {
95
99
  type: BooleanConstructor;
96
100
  default: boolean;
97
101
  };
102
+ isGeneratePrintPdf: {
103
+ type: (BooleanConstructor | ObjectConstructor)[];
104
+ default: boolean;
105
+ };
98
106
  }>> & {
99
107
  onScaleChange?: ((...args: any[]) => any) | undefined;
100
108
  }, {
101
109
  item: Record<string, any>;
102
110
  isLock: boolean;
111
+ isGeneratePrintPdf: boolean | Record<string, any>;
103
112
  form: Record<string, any>;
104
113
  inputLock: boolean;
105
114
  }>>;
@@ -120,6 +129,10 @@ export declare const componentMap: {
120
129
  type: BooleanConstructor;
121
130
  default: boolean;
122
131
  };
132
+ isGeneratePrintPdf: {
133
+ type: (BooleanConstructor | ObjectConstructor)[];
134
+ default: boolean;
135
+ };
123
136
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
124
137
  form: {
125
138
  type: ObjectConstructor;
@@ -137,11 +150,16 @@ export declare const componentMap: {
137
150
  type: BooleanConstructor;
138
151
  default: boolean;
139
152
  };
153
+ isGeneratePrintPdf: {
154
+ type: (BooleanConstructor | ObjectConstructor)[];
155
+ default: boolean;
156
+ };
140
157
  }>> & {
141
158
  onScaleChange?: ((...args: any[]) => any) | undefined;
142
159
  }, {
143
160
  item: Record<string, any>;
144
161
  isLock: boolean;
162
+ isGeneratePrintPdf: boolean | Record<string, any>;
145
163
  form: Record<string, any>;
146
164
  inputLock: boolean;
147
165
  }>>;
@@ -260,6 +278,10 @@ export declare const componentMap: {
260
278
  type: BooleanConstructor;
261
279
  default: boolean;
262
280
  };
281
+ isGeneratePrintPdf: {
282
+ type: (BooleanConstructor | ObjectConstructor)[];
283
+ default: boolean;
284
+ };
263
285
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
264
286
  form: {
265
287
  type: ObjectConstructor;
@@ -273,11 +295,16 @@ export declare const componentMap: {
273
295
  type: BooleanConstructor;
274
296
  default: boolean;
275
297
  };
298
+ isGeneratePrintPdf: {
299
+ type: (BooleanConstructor | ObjectConstructor)[];
300
+ default: boolean;
301
+ };
276
302
  }>> & {
277
303
  onScaleChange?: ((...args: any[]) => any) | undefined;
278
304
  }, {
279
305
  item: Record<string, any>;
280
306
  isLock: boolean;
307
+ isGeneratePrintPdf: boolean | Record<string, any>;
281
308
  form: Record<string, any>;
282
309
  }>>;
283
310
  DATE: import("vue").ShallowRef<import("vue").DefineComponent<{
@@ -392,6 +419,10 @@ export declare const componentMap: {
392
419
  type: BooleanConstructor;
393
420
  default: boolean;
394
421
  };
422
+ isGeneratePrintPdf: {
423
+ type: (BooleanConstructor | ObjectConstructor)[];
424
+ default: boolean;
425
+ };
395
426
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
396
427
  form: {
397
428
  type: ObjectConstructor;
@@ -405,11 +436,16 @@ export declare const componentMap: {
405
436
  type: BooleanConstructor;
406
437
  default: boolean;
407
438
  };
439
+ isGeneratePrintPdf: {
440
+ type: (BooleanConstructor | ObjectConstructor)[];
441
+ default: boolean;
442
+ };
408
443
  }>> & {
409
444
  onScaleChange?: ((...args: any[]) => any) | undefined;
410
445
  }, {
411
446
  item: Record<string, any>;
412
447
  isLock: boolean;
448
+ isGeneratePrintPdf: boolean | Record<string, any>;
413
449
  form: Record<string, any>;
414
450
  }>>;
415
451
  ADDRESS: import("vue").ShallowRef<import("vue").DefineComponent<{
@@ -1791,6 +1827,10 @@ export declare const componentMap: {
1791
1827
  type: BooleanConstructor;
1792
1828
  default: boolean;
1793
1829
  };
1830
+ isGeneratePrintPdf: {
1831
+ type: (BooleanConstructor | ObjectConstructor)[];
1832
+ default: boolean;
1833
+ };
1794
1834
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1795
1835
  form: {
1796
1836
  type: ObjectConstructor;
@@ -1804,11 +1844,16 @@ export declare const componentMap: {
1804
1844
  type: BooleanConstructor;
1805
1845
  default: boolean;
1806
1846
  };
1847
+ isGeneratePrintPdf: {
1848
+ type: (BooleanConstructor | ObjectConstructor)[];
1849
+ default: boolean;
1850
+ };
1807
1851
  }>> & {
1808
1852
  onScaleChange?: ((...args: any[]) => any) | undefined;
1809
1853
  }, {
1810
1854
  item: Record<string, any>;
1811
1855
  isLock: boolean;
1856
+ isGeneratePrintPdf: boolean | Record<string, any>;
1812
1857
  form: Record<string, any>;
1813
1858
  }>>;
1814
1859
  EVALUATE_RADIO_BLOCK: import("vue").ShallowRef<import("vue").DefineComponent<{
@@ -1828,6 +1873,10 @@ export declare const componentMap: {
1828
1873
  type: BooleanConstructor;
1829
1874
  default: boolean;
1830
1875
  };
1876
+ isGeneratePrintPdf: {
1877
+ type: (BooleanConstructor | ObjectConstructor)[];
1878
+ default: boolean;
1879
+ };
1831
1880
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1832
1881
  form: {
1833
1882
  type: ObjectConstructor;
@@ -1845,11 +1894,16 @@ export declare const componentMap: {
1845
1894
  type: BooleanConstructor;
1846
1895
  default: boolean;
1847
1896
  };
1897
+ isGeneratePrintPdf: {
1898
+ type: (BooleanConstructor | ObjectConstructor)[];
1899
+ default: boolean;
1900
+ };
1848
1901
  }>> & {
1849
1902
  onScaleChange?: ((...args: any[]) => any) | undefined;
1850
1903
  }, {
1851
1904
  item: Record<string, any>;
1852
1905
  isLock: boolean;
1906
+ isGeneratePrintPdf: boolean | Record<string, any>;
1853
1907
  form: Record<string, any>;
1854
1908
  inputLock: boolean;
1855
1909
  }>>;
@@ -1870,6 +1924,10 @@ export declare const componentMap: {
1870
1924
  type: BooleanConstructor;
1871
1925
  default: boolean;
1872
1926
  };
1927
+ isGeneratePrintPdf: {
1928
+ type: (BooleanConstructor | ObjectConstructor)[];
1929
+ default: boolean;
1930
+ };
1873
1931
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1874
1932
  form: {
1875
1933
  type: ObjectConstructor;
@@ -1887,11 +1945,16 @@ export declare const componentMap: {
1887
1945
  type: BooleanConstructor;
1888
1946
  default: boolean;
1889
1947
  };
1948
+ isGeneratePrintPdf: {
1949
+ type: (BooleanConstructor | ObjectConstructor)[];
1950
+ default: boolean;
1951
+ };
1890
1952
  }>> & {
1891
1953
  onScaleChange?: ((...args: any[]) => any) | undefined;
1892
1954
  }, {
1893
1955
  item: Record<string, any>;
1894
1956
  isLock: boolean;
1957
+ isGeneratePrintPdf: boolean | Record<string, any>;
1895
1958
  form: Record<string, any>;
1896
1959
  inputLock: boolean;
1897
1960
  }>>;
@@ -1968,6 +2031,10 @@ export declare const componentMap: {
1968
2031
  type: BooleanConstructor;
1969
2032
  default: boolean;
1970
2033
  };
2034
+ isGeneratePrintPdf: {
2035
+ type: (BooleanConstructor | ObjectConstructor)[];
2036
+ default: boolean;
2037
+ };
1971
2038
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1972
2039
  form: {
1973
2040
  type: ObjectConstructor;
@@ -1981,11 +2048,16 @@ export declare const componentMap: {
1981
2048
  type: BooleanConstructor;
1982
2049
  default: boolean;
1983
2050
  };
2051
+ isGeneratePrintPdf: {
2052
+ type: (BooleanConstructor | ObjectConstructor)[];
2053
+ default: boolean;
2054
+ };
1984
2055
  }>> & {
1985
2056
  onScaleChange?: ((...args: any[]) => any) | undefined;
1986
2057
  }, {
1987
2058
  item: Record<string, any>;
1988
2059
  isLock: boolean;
2060
+ isGeneratePrintPdf: boolean | Record<string, any>;
1989
2061
  form: Record<string, any>;
1990
2062
  }>>;
1991
2063
  PROMPT: import("vue").ShallowRef<import("vue").DefineComponent<{