cnhis-design-vue 3.1.42-release.3 → 3.1.42-release.5
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.
- package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
- package/es/components/base-search/style/index.css +1 -1
- package/es/components/big-table/src/BigTable.vue2.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-select-table.d.ts +1 -1
- package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
- package/es/components/big-table/src/hooks/useEvent.js +1 -1
- package/es/components/big-table/src/hooks/useFormat.js +1 -1
- package/es/components/big-table/src/hooks/useNestTable.js +1 -1
- package/es/components/big-table/src/hooks/useTableParse.js +1 -1
- package/es/components/big-table/src/utils.d.ts +11 -1
- package/es/components/big-table/src/utils.js +1 -1
- package/es/components/button-print/index.d.ts +32 -7
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +32 -8
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -4
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -4
- package/es/components/classification/index.d.ts +1 -1
- package/es/components/classification/src/index.vue.d.ts +2 -2
- package/es/components/classification/style/index.css +1 -1
- package/es/components/date-picker/src/DatePicker.vue.js +1 -1
- package/es/components/fabric-chart/index.d.ts +2 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
- package/es/components/fabric-chart/src/hooks/useCenter.js +1 -1
- package/es/components/field-set/index.d.ts +26 -81
- package/es/components/field-set/src/FieldSet.vue.d.ts +28 -32
- package/es/components/field-set/src/FieldSet.vue.js +1 -1
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +45 -14
- package/es/components/form-config/src/FormConfig.vue.d.ts +45 -14
- package/es/components/form-config/src/FormConfig.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +15 -2
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +24 -8
- package/es/components/form-render/index.d.ts +15 -2
- package/es/components/form-render/src/FormRender.vue.d.ts +15 -2
- package/es/components/form-render/src/FormRender.vue.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +15 -2
- package/es/components/form-render/src/components/renderer/date.d.ts +4 -0
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.d.ts +18 -0
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +36 -0
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/remoteSearch.d.ts +18 -0
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.d.ts +18 -0
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +32 -5
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
- package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +13 -8
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +6 -4
- package/es/components/form-render/src/types/index.d.ts +1 -1
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +17 -3
- package/es/components/iho-table/src/IhoTable.vue.d.ts +17 -3
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +3 -2
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +19 -19
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +60 -237
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +1 -4
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +4 -16
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -1
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +25 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +22 -5
- package/es/components/iho-table/src/types/pluginType.d.ts +11 -29
- package/es/components/iho-table/src/utils/index.d.ts +5 -3
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/style/iconfont.ttf +0 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/info-header/index.d.ts +31 -4
- package/es/components/info-header/src/InfoHeader.vue.d.ts +31 -4
- package/es/components/info-header/src/InfoHeader.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +15 -2
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +16 -2
- package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
- package/es/components/info-header/style/index.css +1 -1
- package/es/components/keyboard/src/Keyboard.vue.js +1 -1
- package/es/components/map/index.d.ts +2 -14
- package/es/components/map/src/Map.vue.d.ts +1 -14
- package/es/components/map/src/types/index.d.ts +19 -0
- package/es/components/map/src/types/index.js +1 -0
- package/es/components/recommend-search/index.d.ts +13 -128
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +15 -130
- package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
- package/es/components/recommend-search/src/components/BaseSearch.d.ts +84 -0
- package/es/components/recommend-search/src/components/BaseSearch.js +1 -0
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +3 -63
- package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
- package/es/components/recommend-search/src/components/RecommendMenu.vue.d.ts +1 -3
- package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +4 -62
- package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
- package/es/components/recommend-search/src/constant/index.d.ts +3 -0
- package/es/components/recommend-search/src/constant/index.js +1 -1
- package/es/components/scale-view/index.d.ts +13 -158
- package/es/components/scale-view/index.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue.d.ts +12 -158
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/scale-view/src/components/AnswerParse.vue.d.ts +1 -43
- package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +0 -42
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-address.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
- package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +7 -7
- package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
- package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.d.ts +5 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +73 -3
- package/es/components/scale-view/src/hooks/use-evaluate.js +1 -1
- package/es/components/scale-view/src/hooks/use-event.js +1 -1
- package/es/components/scale-view/src/types/index.d.ts +7 -0
- package/es/components/scale-view/src/types/index.js +1 -0
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/scale-view/style/scale-view-iconfont.ttf +0 -0
- package/es/components/search-cascader/index.d.ts +12 -1
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +12 -1
- package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
- package/es/components/search-cascader/src/components/SearchMenu.d.ts +8 -1
- package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
- package/es/components/search-cascader/src/constants/index.d.ts +1 -0
- package/es/components/search-cascader/src/constants/index.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
- package/es/components/select-label/style/index.css +1 -1
- package/es/components/select-person/index.d.ts +15 -7
- package/es/components/select-person/src/SelectPerson.vue.d.ts +9 -5
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +18 -4
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +18 -4
- package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +9 -0
- package/es/components/time-picker/src/TimePicker.vue.js +1 -1
- package/es/components/vod-chunk-upload/index.d.ts +73 -3
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +73 -3
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
- package/es/env.d.ts +1 -0
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
- package/es/shared/hooks/useDateTime.d.ts +1 -1
- package/es/shared/hooks/useDateTime.js +1 -1
- package/es/shared/utils/anime.d.ts +1 -1
- package/es/shared/utils/anime.js +1 -1
- package/es/shared/utils/index.d.ts +3 -14
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/vexutils.d.ts +2 -2
- package/es/shared/utils/vexutils.js +1 -1
- package/es/shared/utils/vexutilsExpand.d.ts +254 -0
- package/es/shared/utils/vexutilsExpand.js +1 -0
- package/package.json +2 -2
- package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +0 -143
- package/es/components/recommend-search/src/components/BaseSearch.vue.js +0 -1
- /package/es/components/base-search/style/{iconfont.ttf → base-search-iconfont.ttf} +0 -0
- /package/es/components/classification/style/{iconfont.ttf → classification-iconfont.ttf} +0 -0
- /package/es/components/info-header/style/{iconfont.ttf → info-header-font.ttf} +0 -0
- /package/es/components/select-label/style/{iconfont.ttf → select-label-iconfont.ttf} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as t,ref as a,watch as o,nextTick as i,openBlock as l,createElementBlock as n,
|
|
1
|
+
import{defineComponent as e,reactive as t,ref as a,watch as o,nextTick as i,openBlock as l,createElementBlock as n,createCommentVNode as s,Fragment as r,unref as u,createBlock as c,mergeProps as p,createElementVNode as d,normalizeClass as m,normalizeStyle as v,createVNode as f,withCtx as g,renderList as y,toDisplayString as b,createTextVNode as k,resolveDynamicComponent as C,h as S}from"vue";import h from"./hooks/use-noData.js";import{getScaleViewState as w}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as _}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as A}from"./hooks/scaleview-submit.js";import{handleQueryParams as O,isCollection as j,isEvaluation as T}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import P from"./components/NoData.vue.js";import D from"./components/EvaluateCountdown.vue.js";import F from"./components/EvaluatePage.vue.js";import B from"./components/AnswerParse.vue.js";import N from"./components/ScaleScore.js";import{useDialog as x,useMessage as I,NForm as q,NFormItem as M,NButton as R}from"naive-ui";import K from"../../../_virtual/plugin-vue_export-helper.js";const V={class:"c-scale-view-block"},H=["innerHTML"],U={key:0,class:"required-text"},W={key:1,class:"evalute-label"},J=["onClick"],Y=d("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),X={key:1,class:"footer"};var G=K(e({__name:"ScaleView",props:{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({})}},emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:K,emit:G}){const Q=e,{ScaleViewState:Z}=w(),$=t(Z),z=x(),ee=I(),te=a(null),ae=a(null),{noDataState:oe,setNoData:ie,resetNodata:le}=h(),ne=O(),{showEvatip:se,isFormBoldOpen:re,scaleStyle:ue,handlePageClass:ce,isShowItem:pe,handleShowQuestionNumber:de,hasScore:me,isPreviewScale:ve,showEvaluateEntry:fe,showEvaluateCoundownPage:ge,showSaveBtn:ye,showEvaluateLabel:be,showAnswerParse:ke,propsConfig:Ce,evaluatePageProps:Se,evaluateCountdownProps:he,skipCover:we,scaleEdit:Ee}=E(Q,$,{query:ne}),{initForm:_e}=_(Q,$,G,{query:ne}),{submitMethod:Ae}=A(Q,$,G,{query:ne}),{nextLogicEvent:Oe,handleDynamicDataRelation:je}=L(Q,$);(()=>{let{id:e}=ne;e&&($.shareId=e)})();const Te=e=>{try{le(),_e(e)}catch(e){console.log(e,"--error"),$.spinning=!1,$.hasFrontAddress=!1,ie(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};o((()=>Q.ids),((e,t)=>{t?e.guage_id&&e.guage_id!=t.guage_id&&Te(e):e.guage_id&&Te(e)}),{immediate:!0}),o((()=>Q.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;$.form={},$.formArray=[];const t=JSON.parse(JSON.stringify(e));i((()=>{_e(t)}))}),{immediate:!0});const Le=e=>{$.showEvaluateSettingWrap=!1,$.showEvaluateCountdown=!!e,G("startWriteScale")},Pe=()=>{console.log("----closeEvaluateCountdown"),$.showEvaluateCountdown=!1,ve.value||($.banSubmit=!0,Ae(),z.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>({})}))},De=e=>{z.warning({title:"提示",content:()=>S("div",{class:"evatip-container"},[S("span","答案解析:"),S("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},Fe=(e,t,a)=>{console.log(e,"--val");let{choiceObj:o,isSetObj:i}=a||{};switch(t.type.includes("SELECT")||($.form[t.val_key]=e),t.type){case"SELECT":case"EVALUATE_SELECT":{let{value:a,list:o=[]}=e;$.form[t.val_key]=a,Oe(e,t,$.formArray),je(o,t,$.formArray)}break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&($.choiceComObj[t.val_key]=o),Oe(e,t,$.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":Oe(e,t,$.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":$.submitForm[t.val_key]=e}},Be=(e,t)=>{console.log(t),$.form[t.val_key]=e},Ne=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const t=e||[],a=[],o=[];return t.forEach((e=>{o.push(e),a.push(e.labelName)})),$.labelSelectedList=t,{labelStr:a.join(","),labels:o}},xe=()=>{var e;if(!$.formArray.find((e=>T(e.type))))return void Ie("确认要提交吗?");let{evaluateResultSetting:t}=$.config;if(!t||!Object.keys(t).length&&!fe.value||Ee.value)return void Ie("确认要结束测评吗?");if("formIframe"==Q.openType&&fe.value)return void G("submitNoRequest");let a="确定要提前结束测评吗?";if(ge.value&&(null==(e=te.value)?void 0:e.getCountdownObj)){const e=te.value.getCountdownObj(),{setAnswered:t,totalLen:o}=e;t<o?a="存在未作答的题目,确定要提前结束测评吗?":!(null==$?void 0:$.showEvaluateCountdown)&&(a="确认要结束测评吗?")}Ie(a)},Ie=e=>{z.warning({title:"温馨提示",content:()=>S("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:async()=>{const e=await qe();G("onSubmit",e)},onNegativeClick(){}})},qe=()=>new Promise(((e,t)=>{var a;null==(a=ae.value)||a.validate((t=>{var a;if(t){console.log(t);let o=(null==(a=t[0])?void 0:a[0])||{},i=o.field,l=o.message,n=$.formArray.find((e=>e.databaseTitle===i));return n&&(i=n.title),ee.error(i+l),e(!1),!1}{const t=Ae();e(t)}}))})),Me=()=>{G("onCloseSetting")};return K({getScaleData:()=>({...$}),onSubmitForm:qe,cancel:Me}),(e,t)=>(l(),n("div",V,[s(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),$.spinning||$.hasFrontAddress?s("v-if",!0):(l(),n(r,{key:0},[u(oe).noData?(l(),c(P,{key:0,noDataImg:u(oe).noDataImg,noDataTip:u(oe).noDataTip},null,8,["noDataImg","noDataTip"])):(l(),n(r,{key:1},[u(fe)&&!u(we)?(l(),c(F,p({key:0},u(Se),{onWriteGuage:Le}),null,16)):(l(),n(r,{key:1},[u(ge)?(l(),c(D,p({key:0,ref_key:"countdownDom",ref:te},u(he),{onCloseEvaluateCountdown:Pe}),null,16)):s("v-if",!0),d("div",{class:m(["scale-container",{"scale-container-nopadding":u(ce),"scale-container-hasfooter":u(ye)}]),style:v(u(ue))},[u(me)?(l(),c(u(N),{key:0,config:$.config,maxScore:$.maxScore},null,8,["config","maxScore"])):s("v-if",!0),f(u(q),{ref_key:"formRef",ref:ae,model:$.form,rules:$.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(l(!0),n(r,null,y($.formArray,((e,t)=>(l(),n(r,{key:(e.id||e.seq)+t},[u(pe)(e)?(l(),c(u(M),{key:0,path:e.val_key,"show-label":!u(j)(e.type),class:"c-scle-form-item"},{label:g((()=>[d("span",{class:m({"scale-label-required":u(re)(e)}),innerHTML:u(de)(e)},null,10,H),u(re)(e)?(l(),n("span",U,"(必填)")):s("v-if",!0),u(be)(e)?(l(),n("span",W,b(u(be)(e)),1)):s("v-if",!0),u(se)(e)?(l(),n("span",{key:2,class:"evalute-tip",onClick:t=>(async e=>{var t;if($.evatipMap[e.id])return void De($.evatipMap[e.id]);let a="getSubjectAnswer";const o=(null==(t=Q.scaleApiConfig)?void 0:t[a])||null;if(!o||"function"!=typeof o)return void ee.error(`${a} Is not a function`);let i=await o(e.id);i&&($.evatipMap[e.id]||($.evatipMap[e.id]=i,De(i)))})(e)},[Y,k(" 查看提示 ")],8,J)):s("v-if",!0)])),default:g((()=>[(l(),c(C(e.renderCom),p(u(Ce)(e,t),{key:(e.id||e.seq)+t,onScaleChange:Fe,onOnChange:t=>((e,t)=>{$.form[t.val_key]=Ne(e)})(t,e),onVodFileList:Be}),null,16,["onOnChange"])),u(ke)(e)?(l(),c(B,{key:0,item:e},null,8,["item"])):s("v-if",!0)])),_:2},1032,["path","show-label"])):s("v-if",!0)],64)))),128))])),_:1},8,["model","rules"])],6),u(ye)?(l(),n("div",X,[s(" 分享的链接 隐藏取消按钮 "),"guage"!==Q.sourceType?(l(),c(u(R),{key:0,onClick:Me},{default:g((()=>[k("取消")])),_:1})):s("v-if",!0),Q.isLock?s("v-if",!0):(l(),c(u(R),{key:1,onClick:xe,disabled:$.banSubmit,type:"primary"},{default:g((()=>[k("保存")])),_:1},8,["disabled"]))])):s("v-if",!0)],64))],64))],64))]))}}),[["__file","ScaleView.vue"]]);export{G as default};
|
|
@@ -12,53 +12,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
}>> & {}>>;
|
|
13
13
|
questionScore: import("vue").ComputedRef<any>;
|
|
14
14
|
answerSuccess: import("vue").ComputedRef<boolean>;
|
|
15
|
-
answerIcon: import("vue").ComputedRef<"
|
|
15
|
+
answerIcon: import("vue").ComputedRef<"icon-scale-view-dui" | "icon-scale-view-cuo">;
|
|
16
16
|
answerResText: import("vue").ComputedRef<"部分正确" | "回答正确" | "回答错误">;
|
|
17
17
|
scoreText: import("vue").ComputedRef<"部分" | "本题">;
|
|
18
18
|
correctAnswer: import("vue").ComputedRef<any>;
|
|
19
19
|
answerKeyText: import("vue").ComputedRef<any>;
|
|
20
|
-
SvgIcon: import("vue").DefineComponent<{
|
|
21
|
-
iconClass: {
|
|
22
|
-
type: StringConstructor;
|
|
23
|
-
required: true;
|
|
24
|
-
default: string;
|
|
25
|
-
};
|
|
26
|
-
title: {
|
|
27
|
-
type: StringConstructor;
|
|
28
|
-
required: false;
|
|
29
|
-
default: string;
|
|
30
|
-
};
|
|
31
|
-
className: {
|
|
32
|
-
type: StringConstructor;
|
|
33
|
-
required: false;
|
|
34
|
-
};
|
|
35
|
-
}, {
|
|
36
|
-
props: {
|
|
37
|
-
iconClass: string;
|
|
38
|
-
title: string;
|
|
39
|
-
className?: string | undefined;
|
|
40
|
-
};
|
|
41
|
-
iconName: import("vue").ComputedRef<string>;
|
|
42
|
-
svgClass: import("vue").ComputedRef<string>;
|
|
43
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
44
|
-
iconClass: {
|
|
45
|
-
type: StringConstructor;
|
|
46
|
-
required: true;
|
|
47
|
-
default: string;
|
|
48
|
-
};
|
|
49
|
-
title: {
|
|
50
|
-
type: StringConstructor;
|
|
51
|
-
required: false;
|
|
52
|
-
default: string;
|
|
53
|
-
};
|
|
54
|
-
className: {
|
|
55
|
-
type: StringConstructor;
|
|
56
|
-
required: false;
|
|
57
|
-
};
|
|
58
|
-
}>>, {
|
|
59
|
-
title: string;
|
|
60
|
-
iconClass: string;
|
|
61
|
-
}>;
|
|
62
20
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
63
21
|
item: {
|
|
64
22
|
type: ObjectConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as r,openBlock as s,createElementBlock as n,normalizeClass as i,unref as
|
|
1
|
+
import{defineComponent as e,computed as r,openBlock as s,createElementBlock as n,normalizeClass as i,unref as a,createElementVNode as l,createTextVNode as t,toDisplayString as o,createCommentVNode as u}from"vue";import c from"../../../../_virtual/plugin-vue_export-helper.js";const v={class:"answer-res-wrap"},p={class:"answer-res"},w={key:0},d={key:0,class:"correct-answer"},m=l("p",null,"正确答案:",-1),f={class:"answer-key"},P=l("p",null,"答案解析:",-1);var _=c(e({__name:"AnswerParse",props:{item:{type:Object,default:()=>({})}},setup(e){const c=e,_=r((()=>{var e;return(null==(e=c.item)?void 0:e.questionScore)||0})),y=r((()=>{var e;return(null==(e=c.item)?void 0:e.questionScore)>0})),q=r((()=>y.value?"icon-scale-view-dui":"icon-scale-view-cuo")),S=r((()=>"questionPartScore"in c.item?"部分正确":y.value?"回答正确":"回答错误")),g=r((()=>"questionPartScore"in c.item?"部分":"本题")),k=r((()=>{var e;let{correctAnswer:r}=(null==(e=c.item)?void 0:e.scoreConfigs)||{};return r})),A=r((()=>{var e;let{answerKey:r}=(null==(e=c.item)?void 0:e.scoreConfigs)||{};return r||"无"}));return(e,r)=>(s(),n("div",{class:i(["c-answerParse",{"answerParse-success":a(y)}])},[l("div",v,[l("div",p,[l("i",{class:i(["scale-view-iconfont",a(q)])},null,2),t(" "+o(a(S)),1)]),a(y)?(s(),n("div",w,o(a(g))+"得分:"+o(a(_))+"分",1)):u("v-if",!0)]),a(k)?(s(),n("div",d,[m,l("span",null,o(a(k)),1)])):u("v-if",!0),l("div",f,[P,l("span",null,o(a(A)),1)])],2))}}),[["__file","AnswerParse.vue"]]);export{_ as default};
|
|
@@ -75,48 +75,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
75
75
|
setAnswered: number;
|
|
76
76
|
totalLen: number;
|
|
77
77
|
};
|
|
78
|
-
SvgIcon: import("vue").DefineComponent<{
|
|
79
|
-
iconClass: {
|
|
80
|
-
type: StringConstructor;
|
|
81
|
-
required: true;
|
|
82
|
-
default: string;
|
|
83
|
-
};
|
|
84
|
-
title: {
|
|
85
|
-
type: StringConstructor;
|
|
86
|
-
required: false;
|
|
87
|
-
default: string;
|
|
88
|
-
};
|
|
89
|
-
className: {
|
|
90
|
-
type: StringConstructor;
|
|
91
|
-
required: false;
|
|
92
|
-
};
|
|
93
|
-
}, {
|
|
94
|
-
props: {
|
|
95
|
-
iconClass: string;
|
|
96
|
-
title: string;
|
|
97
|
-
className?: string | undefined;
|
|
98
|
-
};
|
|
99
|
-
iconName: import("vue").ComputedRef<string>;
|
|
100
|
-
svgClass: import("vue").ComputedRef<string>;
|
|
101
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
102
|
-
iconClass: {
|
|
103
|
-
type: StringConstructor;
|
|
104
|
-
required: true;
|
|
105
|
-
default: string;
|
|
106
|
-
};
|
|
107
|
-
title: {
|
|
108
|
-
type: StringConstructor;
|
|
109
|
-
required: false;
|
|
110
|
-
default: string;
|
|
111
|
-
};
|
|
112
|
-
className: {
|
|
113
|
-
type: StringConstructor;
|
|
114
|
-
required: false;
|
|
115
|
-
};
|
|
116
|
-
}>>, {
|
|
117
|
-
title: string;
|
|
118
|
-
iconClass: string;
|
|
119
|
-
}>;
|
|
120
78
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "closeEvaluateCountdown"[], "closeEvaluateCountdown", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
121
79
|
formArray: {
|
|
122
80
|
type: ArrayConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as t,onMounted as o,watch as
|
|
1
|
+
import{defineComponent as e,reactive as t,onMounted as o,watch as a,openBlock as n,createElementBlock as l,normalizeClass as u,unref as r,createElementVNode as s,toDisplayString as i,createCommentVNode as d,createTextVNode as c}from"vue";import{useEvaluate as v}from"../hooks/use-evaluate.js";import w from"moment";import m from"../../../../_virtual/plugin-vue_export-helper.js";const f=s("i",{class:"scale-view-iconfont icon-scale-view-shijian"},null,-1),p={class:"answered-wrap"};var g=m(e({__name:"EvaluateCountdown",props:{formArray:{type:Array,default:()=>[]},evaluateResultConfig:{type:Object,default:()=>({})},evaluateResultSetting:{type:Object,default:()=>({})},form:{type:Object,default:()=>({})},currentTime:{default:(new Date).getTime()},showEvaluateCountdown:{type:Boolean,default:!1}},emits:["closeEvaluateCountdown"],setup(e,{expose:m,emit:g}){const j=e,y=t({source:"countdown",setAnswered:0}),{evaluateState:b,evaluateStartTime:h,showCountdown:C,getTotalLen:A,countdown:O,clearTimer:T}=v(j,y,{emit:g});o((()=>{(()=>{A();let{evaluateTime:e}=j.evaluateResultSetting;if(!C.value||!e)return;let t=(h.value?w(h.value):w()).add(e,"minutes");T(),O(t)})()})),a((()=>j.form),(e=>{(e||Object.keys(e).length)&&(console.log(e,"触发修改啦啦啦"),(e=>{var t;let o=null==(t=j.formArray)?void 0:t.filter((e=>!b.filterArr.includes(e.type)));if(!o||!o.length)return;let a={};o.forEach((t=>{const o=t.databaseTitle||t.title;a[o]=e[o]})),console.log(a);let n=0;for(let e in a){let t=a[e],o=(l=t,Object.prototype.toString.call(l));"[object Object]"==o?t&&Object.keys(t).length&&n++:"[object Array]"==o?t&&t.length&&n++:"[object Number]"==o?(t||0===t)&&n++:t&&n++}var l;y.setAnswered=n})(e))}),{immediate:!0,deep:!0});return m({getCountdownObj:()=>({setAnswered:y.setAnswered,totalLen:b.totalLen})}),(e,t)=>(n(),l("div",{class:u(["c-evaluateCountdown",{"evaluateCountdown-hasTime":j.showEvaluateCountdown}])},[j.showEvaluateCountdown?(n(),l("div",{key:0,class:u(["countdown",{"countdown-red":r(b).countdownRed}])},[s("span",null,i(r(b).countdownStr),1),f],2)):d("v-if",!0),s("div",p,[c(" 答题情况: "+i(y.setAnswered)+"/ ",1),s("span",null,i(r(b).totalLen),1)])],2))}}),[["__file","EvaluateCountdown.vue"]]);export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as l,computed as a,createVNode as s,resolveComponent as i}from"vue";import{NSelect as t,NInput as r}from"naive-ui";import u from"./address.js";import
|
|
1
|
+
import{defineComponent as e,reactive as l,computed as a,createVNode as s,resolveComponent as i}from"vue";import{NSelect as t,NInput as r}from"naive-ui";import u from"./address.js";import"xe-utils";import"moment";import d from"../../../../../shared/utils/vexutilsExpand.js";var n=e({name:"RAddress",components:{NSelect:t,NInput:r},props:{form:{type:Object,default:()=>{}},item:{type:Object,default:()=>{}},isLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,t){let r=l({provinceValue:-1,cityValue:-1,areaValue:-1,province:[{value:-1,label:"省/自治区/直辖市"}],city:[{value:-1,label:"市"}],area:[{value:-1,label:"区/县"}],addressValue:"",allValue:{}});const n=e.item.setting||{addressType:"province-city-district-address"},c=a((()=>{let e={addressType:"province-city-district-address"};return e=d.isJSON(n)?JSON.parse(n):n,e.addressType})),o=a((()=>c.value.includes("province"))),p=a((()=>c.value.includes("city"))),v=a((()=>c.value.includes("district"))),y=a((()=>c.value.includes("address"))),m=e=>e?Object.keys(e).map((l=>({value:l,label:e[l]}))):[],V=()=>{r.area=[{value:-1,label:"区/县"}],r.areaValue=-1,r.allValue.area={key:-1,label:"区/县"}},b=(l,a,s)=>{r.provinceValue=l,r.city=[{value:-1,label:"市"}],r.cityValue=-1,r.allValue.city={key:-1,label:"市"},V(),-1!=l&&1===r.city.length&&r.city.push(...m(u[l]));let i=r.allValue;i.province={key:l,label:a.label},i.address=r.addressValue,"no"!=s&&t.emit("scaleChange",i,e.item)},f=(l,a,s)=>{r.cityValue=l,V(),-1!=l&&1===r.area.length&&r.area.push(...m(u[l]));let i=r.allValue;i.city={key:l,label:a.label},i.address=r.addressValue,"no"!=s&&t.emit("scaleChange",i,e.item)},h=(l,a,s)=>{r.areaValue=l,r.allValue.area={key:l,label:a.label},"no"!=s&&t.emit("scaleChange",r.allValue,e.item)},k=(l,a)=>{r.addressValue=l,r.allValue.address=l,"no"!=a&&t.emit("scaleChange",r.allValue,e.item)};return(()=>{var l,a,s;r.province.push(...m(u[86]));let i=e.form[e.item.val_key];if(d.isEmpty(i))return;let t=(null==(l=i.province)?void 0:l.key)||-1,n=(null==(a=i.city)?void 0:a.key)||-1,c=(null==(s=i.area)?void 0:s.key)||-1;r.addressValue=i.address,r.allValue=JSON.parse(JSON.stringify(i)),b(t,i.province,"no"),f(n,i.city,"no"),h(c,i.area,"no")})(),()=>s("div",{class:"c-scale-address"},[s("div",{class:"field-row"},[o.value&&s(i("n-select"),{value:r.provinceValue,filterable:!0,placeholder:"请选择",disabled:e.isLock,options:r.province,"onUpdate:value":b},null),p.value&&s(i("n-select"),{value:r.cityValue,filterable:!0,placeholder:"请选择",disabled:e.isLock,options:r.city,"onUpdate:value":f},null),v.value&&s(i("n-select"),{value:r.areaValue,filterable:!0,placeholder:"请选择",disabled:e.isLock,options:r.area,"onUpdate:value":h},null)]),y.value&&s(i("n-input"),{value:r.addressValue,placeholder:"请输入",disabled:e.isLock,"onUpdate:value":k},null)])}});export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as o,watch as t,createVNode as l,resolveComponent as i,isVNode as r}from"vue";import{NCheckboxGroup as
|
|
1
|
+
import{defineComponent as e,reactive as o,watch as t,createVNode as l,resolveComponent as i,isVNode as r}from"vue";import{NCheckboxGroup as s,NCheckbox as u,NInput as a,NIcon as c}from"naive-ui";import{api as n}from"v-viewer";import{SearchOutline as p}from"@vicons/ionicons5";import"xe-utils";import"moment";import h from"../../../../../shared/utils/vexutilsExpand.js";import f from"../composables/choose-common.js";var d=e({name:"RCheckbox",components:{NCheckboxGroup:s,NCheckbox:u,NInput:a,NIcon:c},props:{form:{type:Object,default:()=>{}},item:{type:Object,default:()=>{}},isLock:{type:Boolean,default:!1},inputLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,u){var a,d;const x=o({curCheckboxValue:[],othersText:"",curOptions:[],optionsPreSuffixObj:{}}),{choiceColor:m,showImgWrap:b,handleDefPreSuffix:v,choiceUseKey:k,isCheckboxItem:C,showPreSuffix:O,handleOptions:y,stopClick:g}=f(e,x),S=(null==(d=null==(a=e.item)?void 0:a.setting)?void 0:d.chooseStyleSetting)||1,V=o=>{let t={othersText:x.othersText,optionsPreSuffixObj:x.optionsPreSuffixObj};o&&!x.curCheckboxValue.includes("other")&&x.curCheckboxValue.push("other");let l=JSON.parse(JSON.stringify(x.curCheckboxValue));u.emit("scaleChange",l,e.item,{choiceObj:t,isSetObj:C.value})},j=o=>{var t,l;let i=o.options||[],r=e.form[e.item.val_key],s=null==(t=null==o?void 0:o.setting)?void 0:t.defaultValue;"EVALUATE_CHECKBOX_BLOCK"===e.item.type&&(i=(null==(l=o.scoreConfigs)?void 0:l.scoreRules)||[]);let u=[];u=s&&h.isJSON(s)?JSON.parse(s):r,e.inputLock?((e,o,t)=>{var l;if(x.curOptions=y(t),!t.length||!o||!o.length)return;let i,r=[],s=0,u=o.length;for(;s<u;s++){if(i=o[s],"其他"===i){x.othersText=i,x.curCheckboxValue=["other"],!r.includes("other")&&r.push("other");continue}let e=t.findIndex((e=>e.value===i));if(e<0){x.othersText=i,!r.includes("other")&&r.push("other");continue}let u=null==(l=t[e])?void 0:l.key;r.indexOf(u)<0&&r.push(u)}x.curCheckboxValue=r,V()})(0,o.dbValue||u,i):((e,o,t)=>{var l;if(x.curOptions=y(t),!t.length||!o||!o.length)return;if("EVALUATE_CHECKBOX_BLOCK"===e.type)return x.curCheckboxValue=o,void V();let i,r=[],s=0,u=o.length,a=t.some((e=>e.importability||"other"===e.key));for(;s<u;s++){if(i=o[s],"其他"===i){x.othersText=i,x.curCheckboxValue=["other"],!r.includes("other")&&r.push("other");continue}let e=t.findIndex((e=>e.value===i));if(e>0){let o=null==(l=t[e])?void 0:l.key;!r.includes(o)&&r.push(o)}else t.map((e=>{let o=v(e,s,i,!0,a);o&&!r.includes(o)&&r.push(o)}))}x.curCheckboxValue=r,V()})(o,o.dbValue||u,i)};t((()=>e.item),(e=>{e&&Object.keys(e).length&&j(e)}),{immediate:!0});const L=(e,o)=>l("span",{class:"scale-choice-img-wrap"},[l("img",{class:"show-picture",src:e.imageUrl},null),l("div",{class:"scale-preview-wrap"},[l(c,{size:"24",color:"#fff",component:p,onClick:o=>((e,o)=>{e.preventDefault(),e.stopPropagation();let t=x.curOptions.map((e=>e.imageUrl)).filter(Boolean);if(!t.length)return;let l=t.findIndex((e=>e===o));n({images:t,options:{toolbar:!0,initialViewIndex:l<0?0:l}})})(o,e.imageUrl)},null)])]),T=(o,t)=>l("div",{class:"presuffix-wrap",onClick:g},[o.prefix&&l("span",{class:"prefix-span",style:{color:m.value(o)}},[o.prefix]),l(i("n-input"),{value:x.optionsPreSuffixObj[o.key],"onUpdate:value":e=>x.optionsPreSuffixObj[o.key]=e,disabled:e.isLock||e.inputLock,style:{color:m.value(o)},placeholder:"请输入",bordered:!1,onInput:()=>((o,t)=>{let l={othersText:x.othersText,optionsPreSuffixObj:x.optionsPreSuffixObj};x.curCheckboxValue.includes(o.key)||x.curCheckboxValue.push(o.key);let i=JSON.parse(JSON.stringify(x.curCheckboxValue));u.emit("scaleChange",i,e.item,{choiceObj:l,isSetObj:C.value})})(o)},null),o.suffix&&l("span",{class:"suffix-span",style:{color:m.value(o)}},[o.suffix])]),w=e=>l("span",{style:{color:m.value(e)},class:"other-span"},[e.label]),N=o=>l("div",{class:"choose-other",onClick:g},[l(i("n-input"),{value:x.othersText,"onUpdate:value":[e=>x.othersText=e,()=>V(!0)],disabled:e.isLock||e.inputLock,style:{color:m.value(o)},placeholder:"请输入",bordered:!1},null)]),P=e=>C.value&&O.value(e);let I=k.value;return()=>{let o;return l(s,{value:x.curCheckboxValue,"onUpdate:value":[e=>x.curCheckboxValue=e,()=>V(!1)],class:["c-choice-wrap","choice-wrap-"+S],disabled:e.isLock},"function"==typeof(t=o=x.curOptions.map(((e,o)=>l(i("n-checkbox"),{key:e.value,value:e[I]},{default:()=>[b.value(e)&&L(e),P(e)&&T(e),!P(e)&&w(e),e.importability&&N(e)]}))))||"[object Object]"===Object.prototype.toString.call(t)&&!r(t)?o:{default:()=>[o]});var t}}});export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as t,computed as a,createVNode as l,resolveComponent as r,createTextVNode as u}from"vue";import{NTimePicker as n,NDatePicker as i}from"naive-ui";import s from"
|
|
1
|
+
import{defineComponent as e,reactive as t,computed as a,createVNode as l,resolveComponent as r,createTextVNode as u}from"vue";import{NTimePicker as n,NDatePicker as i}from"naive-ui";import"xe-utils";import s from"moment";import d from"../../../../../shared/utils/vexutilsExpand.js";var o=e({name:"RDatetime",components:{NTimePicker:n,NDatePicker:i},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,n){var i,o,m,g,p;const c=null==(i=e.item)?void 0:i.type,f=null==(m=null==(o=e.item)?void 0:o.setting)?void 0:m.startToStop,b="DATE"===c?"date":null==(p=null==(g=e.item)?void 0:g.setting)?void 0:p.dateType,v="HH:mm:ss",D=t({rangeValue:[null,null],dateValue:null}),V=a((()=>"datetime"==b?"datetimerange":"daterange")),N=e=>{let t=D.rangeValue[1];return!!t&&e>Number(new Date(t).getHours())},w=(e,t)=>{if(null===t)return!1;let a=D.rangeValue[1];if(!a)return!1;let l=Number(new Date(a).getHours()),r=Number(new Date(a).getMinutes());return!(t<l)&&e>r},k=(e,t,a)=>{if(null===a||null===t)return!1;let l=D.rangeValue[1];if(!l)return!1;let r=Number(new Date(l).getHours()),u=Number(new Date(l).getMinutes()),n=Number(new Date(l).getSeconds());return!(a<r)&&(!(t<u)&&e>=n)},y=e=>{let t=D.rangeValue[0];return!!t&&e<Number(new Date(t).getHours())},H=(e,t)=>{if(null===t)return!1;let a=D.rangeValue[0];if(!a)return!1;let l=Number(new Date(a).getHours()),r=Number(new Date(a).getMinutes());return!(t>l)&&e<r},S=(e,t,a)=>{if(null===a||null===t)return!1;let l=D.rangeValue[0];if(!l)return!1;let r=Number(new Date(l).getHours()),u=Number(new Date(l).getMinutes()),n=Number(new Date(l).getSeconds());return!(a>r)&&(!(t>u)&&e<=n)},M=(t,a,l)=>{let r="start"===l?1:0,u=D.rangeValue[r];u&&(u=s(u).format(v)),"start"!==l?n.emit("scaleChange",[u||"",a],e.item):n.emit("scaleChange",[a,u||""],e.item)},O=(t,a)=>{n.emit("scaleChange",a,e.item)};return(e=>{if(console.log(e,"time---val---"),d.isJSON(e)&&(e=JSON.parse(e)),!e||d.isEmpty(e))return;let t=JSON.parse(JSON.stringify(e));if("TIME"!==c&&"time"!=b)D.dateValue=e;else{if(1!=f)return void(D.dateValue=e);if(!Array.isArray(t)||!t.length)return;let a=t[0]?s(t[0],v).valueOf():"",l=t[1]?s(t[1],v).valueOf():"",r=a&&d.isValidDate(new Date(a))?a:null,u=l&&d.isValidDate(new Date(l))?l:null;D.rangeValue=[r,u]}})(e.form[e.item.val_key]),()=>"TIME"===c||"time"==b?1==f?l("div",{class:"c-time-range"},[l(r("n-time-picker"),{value:D.rangeValue[0],"onUpdate:value":[e=>D.rangeValue[0]=e,(e,t)=>M(0,t,"start")],clearable:!0,disabled:e.isLock,isHourDisabled:N,isMinuteDisabled:w,isSecondDisabled:k},null),u(" - "),l(r("n-time-picker"),{value:D.rangeValue[1],"onUpdate:value":[e=>D.rangeValue[1]=e,(e,t)=>M(0,t,"end")],clearable:!0,disabled:e.isLock,isHourDisabled:y,isMinuteDisabled:H,isSecondDisabled:S},null)]):l(r("n-time-picker"),{"formatted-value":D.dateValue,"onUpdate:formatted-value":e=>D.dateValue=e,clearable:!0,disabled:e.isLock,"onUpdate:value":O},null):l(r("n-date-picker"),"date"!==b&&"datetime"!==b||1!=f?{"formatted-value":D.dateValue,"onUpdate:formatted-value":e=>D.dateValue=e,type:b,clearable:!0,disabled:e.isLock,"onUpdate:value":O}:{"formatted-value":D.dateValue,"onUpdate:formatted-value":e=>D.dateValue=e,type:V.value,clearable:!0,disabled:e.isLock,"onUpdate:value":O},null)}});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
|
|
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){let n=o.form[o.item.val_key];const 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},d=()=>{o.isLock||(p.mapVisible=!0)};return()=>t("div",{class:{"c-map-container":!o.isLock}},[t(a("n-input"),{value:p.mapLocation,disabled:!0,class:"map-input","on-click":d,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 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,computed as i,createVNode as
|
|
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};
|
|
@@ -21,17 +21,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
21
21
|
};
|
|
22
22
|
handleOk: {
|
|
23
23
|
type: FunctionConstructor;
|
|
24
|
-
default: () =>
|
|
24
|
+
default: () => {};
|
|
25
25
|
};
|
|
26
26
|
cancel: {
|
|
27
27
|
type: FunctionConstructor;
|
|
28
|
-
default: () =>
|
|
28
|
+
default: () => {};
|
|
29
29
|
};
|
|
30
30
|
visible: {
|
|
31
31
|
type: BooleanConstructor;
|
|
32
32
|
default: boolean;
|
|
33
33
|
};
|
|
34
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
34
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:visible" | "onClose")[], "onClose" | "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
35
|
title: {
|
|
36
36
|
type: (StringConstructor | FunctionConstructor)[];
|
|
37
37
|
default: string;
|
|
@@ -54,25 +54,25 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
54
|
};
|
|
55
55
|
handleOk: {
|
|
56
56
|
type: FunctionConstructor;
|
|
57
|
-
default: () =>
|
|
57
|
+
default: () => {};
|
|
58
58
|
};
|
|
59
59
|
cancel: {
|
|
60
60
|
type: FunctionConstructor;
|
|
61
|
-
default: () =>
|
|
61
|
+
default: () => {};
|
|
62
62
|
};
|
|
63
63
|
visible: {
|
|
64
64
|
type: BooleanConstructor;
|
|
65
65
|
default: boolean;
|
|
66
66
|
};
|
|
67
67
|
}>> & {
|
|
68
|
-
onOnClose?: ((...args: any[]) => any) | undefined;
|
|
69
68
|
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
|
69
|
+
onOnClose?: ((...args: any[]) => any) | undefined;
|
|
70
70
|
}, {
|
|
71
71
|
closable: boolean;
|
|
72
|
+
title: string | Function;
|
|
72
73
|
visible: boolean;
|
|
73
74
|
modalWidth: string;
|
|
74
75
|
modalHeight: string;
|
|
75
|
-
title: string | Function;
|
|
76
76
|
handleOk: Function;
|
|
77
77
|
changeSize: boolean;
|
|
78
78
|
cancel: Function;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as
|
|
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};
|
package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
41
41
|
isAlias?: boolean | undefined;
|
|
42
42
|
};
|
|
43
43
|
isDisabledTooltip: import("vue").Ref<boolean>;
|
|
44
|
-
curContent: import("vue").ComputedRef<string>;
|
|
44
|
+
curContent: import("vue").ComputedRef<string | number>;
|
|
45
45
|
$refName: any;
|
|
46
46
|
onMouseOver: (str: any) => void;
|
|
47
47
|
onMouseOut: () => void;
|
|
@@ -5,7 +5,7 @@ export declare const ScaleViewComputed: (props: any, state: any, config: any) =>
|
|
|
5
5
|
width: string;
|
|
6
6
|
height: string;
|
|
7
7
|
transform: string;
|
|
8
|
-
} |
|
|
8
|
+
} | undefined>;
|
|
9
9
|
handlePageClass: import("vue").ComputedRef<boolean>;
|
|
10
10
|
isShowItem: import("vue").ComputedRef<(item: any) => any>;
|
|
11
11
|
handleShowQuestionNumber: import("vue").ComputedRef<(item: any) => any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{computed as e}from"vue";import{isEvaluation as t}from"../utils/judge-types.js";import a from"
|
|
1
|
+
import{computed as e}from"vue";import{isEvaluation as t}from"../utils/judge-types.js";import"xe-utils";import a from"moment";import n from"../../../../shared/utils/vexutilsExpand.js";import{componentMapStr as i}from"./use-component.js";const o=(o,l,r)=>{const{query:s}=r,u=(new Date).getTime(),v=e((()=>1==(null==s?void 0:s.formBoldOpen))),c=e((()=>e=>{var a;return!!t(e.type)&&(1==(null==s?void 0:s.evatip)||1==(null==(a=o.params)?void 0:a.evatip))})),d=e((()=>{var e;return(null==(e=l.config)?void 0:e.evaluateResultSetting)||{}})),m=e((()=>{const{evaluateTime:e}=d.value;return+e})),p=e((()=>{var e;return null==(e=d.value)?void 0:e.evaluateStartTime})),f=e((()=>{const e=new Date(p.value);return!!n.isValidDate(e)&&e})),g=e((()=>{if(!p.value||!m.value)return!1;if(!f.value)return!1;const e=a(p.value).add(m.value,"minutes").valueOf();return u>=e})),h=e((()=>{const e=f.value;if(!e)return!1;const t=a(e).valueOf();return u<t})),C=e((()=>e=>{const t=e.required;return o.styleSetting&&Object.keys(o.styleSetting).length&&"formBoldOpen"in o.styleSetting?t&&o.styleSetting.formBoldOpen:t&&v.value})),S=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})`}})),E=e((()=>!("customList"==o.type&&!o.noBtn)&&!(!o.noBtn&&!o.hideBtn))),w=e((()=>e=>X(e))),y=e((()=>e=>{var a;const{type:n}=e||{},i=!1===(null==(a=l.config)?void 0:a.autoQuestionNumber)?e.showTitle:`${e.softcode}、${e.showTitle}`;if(!t(n))return i;return`${i} <span style="color:#2d7aff;" class="score-i">${H(e)}</span>`})),L=e((()=>{const{config:e}=l;return!(!e||!Object.keys(e).length)&&"totalScore"in e})),O=e((()=>{var e;return(null==(e=o.ids)?void 0:e.guage_id)&&o.noBtn})),b=e((()=>{const e=o.params||{};if(!("skipCover"in e))return!1;return e.skipCover&&!h.value&&!g.value})),B=e((()=>!O.value&&l.showEvaluatePage&&l.showEvaluateSettingWrap&&!l.isFinished&&!o.noBtn&&!o.hideBtn)),A=e((()=>!O.value&&!B.value&&l.showEvaluateCountdownWrap&&!l.isFinished&&!o.noBtn&&!o.hideBtn)),T=e((()=>{const{evaluateResultSetting:e={}}=l.config;return(Object.values(e).filter((e=>{if(e)return!0}))||[]).length})),k=e((()=>l.paramsEvaluate&&Object.keys(l.paramsEvaluate).length)),R=e((()=>{const e=window.location.search||window.location.hash;if(!e)return;const t=["evaname","evadesc","evast","evadur","evaan"].find((t=>e.includes(t)));return l.paramsEvaluate||t})),_=e((()=>{var e;return 1==s.isEdit||1==(null==(e=o.params)?void 0:e.isEdit)})),U=e((()=>1==l.isFinished&&_.value)),F=e((()=>T.value||R.value?!o.noBtn&&!o.hideBtn&&(!l.isFinished||_.value):!o.noBtn&&!o.hideBtn)),j=e((()=>T.value||R.value?!!o.hideBtn||!!o.isLock||l.isFinished&&!_.value:!!o.hideBtn||!!o.isLock)),P=e((()=>e=>({EVALUATE_RADIO_BLOCK:"单选题",EVALUATE_CHECKBOX_BLOCK:"多选题"}[e.type]))),D=e((()=>e=>{var t;if(U.value)return!1;const{evaluateAnswer:i,checkAnswerMode:o,evaluateStartTime:r,evaluateTime:s}=(null==(t=l.config)?void 0:t.evaluateResultSetting)||{},u=(null==e?void 0:e.scoreConfigs)||0,v=i&&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(!n.isValidDate(new Date(r)))return v;const c=a(r).add(s,"minutes").diff(a(),"seconds",!0);return v&&c<=0})),x=e((()=>"customList"===o.type?"保存":"提交")),V=e((()=>({getSelectOptions:o.getSelectOptions,getSearchOptions:o.getSearchOptions,openType:o.openType}))),N=e((()=>({getCascadeOptions:o.getCascadeOptions}))),$=e((()=>({uploadPictureUrl:o.uploadPictureUrl,uploadFileUrl:o.uploadFileUrl}))),K=e((()=>({ak:o.ak}))),I=e((()=>({source:"guage",getChunkUploadConfig:o.getChunkUploadConfig}))),M=e((()=>({selectedList:l.labelSelectedList,getLabelList:o.getLabelList,deleteLabel:o.deleteLabel,saveLabelItem:o.saveLabelItem,sourceType:o.sourceType}))),q={RSelectCom:V.value,RCascaderCom:N.value,RUploadCom:$.value,RMapCom:K.value,RVodChunkUploadCom:I.value,CSelectLabelCom:M.value},J=e((()=>(e,t)=>{var a;const n=i[e.type],o=q[n]||{},r={form:l.form,item:e,index:t,isLock:j.value,...o};return"RVodChunkUploadCom"===n&&Object.assign(r,{formData:e,limitNum:(null==(a=e.setting)?void 0:a.limitPic)||1,defFileList:l.form[e.val_key]}),"RMapCom"===n&&Object.assign(r,{locationProp:l.form[e.val_key]}),"CSelectLabelCom"===n&&(delete r.form,delete r.index),r})),X=(e,t)=>{if(e.hide)return!1;const{form:a={},formArray:i=[]}=l;let o={};if(t){let t=e.setting;if(e.setting&&n.isJSON(e.setting)&&(t=JSON.parse(e.setting)),o=n.isString(t.callbackCondition)?JSON.parse(t.callbackCondition):t.callbackCondition,!o||!o.condition||!o.condition.length)return!0}else o=n.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=i.filter((t=>t.seq==e.subject_seq))[0],o=z(t);return n.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},z=e=>e.databaseTitle||e.title,H=e=>{const{minScore:t=0,maxScore:a=0,scoreType:n}=e.scoreConfigs||{};return`(${a}分)`},Q=e((()=>{var e;return{formArray:l.formArray,evaluateResultConfig:(null==(e=l.config)?void 0:e.evaluateResultConfig)||{},evaluateResultSetting:d.value,isFinished:l.isFinished,maxScore:l.maxScore}})),W=e((()=>{var e;return{formArray:l.formArray,evaluateResultConfig:(null==(e=l.config)?void 0:e.evaluateResultConfig)||{},evaluateResultSetting:d.value,form:l.form,isFinished:l.isFinished,currentTime:l.currentTime,showEvaluateCountdown:l.showEvaluateCountdown}}));return{showEvatip:c,isFormBoldOpen:C,scaleStyle:S,handlePageClass:E,isShowItem:w,handleShowQuestionNumber:y,hasScore:L,isPreviewScale:O,showEvaluateEntry:B,showEvaluateCoundownPage:A,hasEvaluateResultSetting:T,hasparamsEvaluate:k,hasDefault:R,showSaveBtn:F,componentDisable:j,showEvaluateLabel:P,showAnswerParse:D,tipMsg:x,propsConfig:J,showEvent:X,formKey:z,evaluatePageProps:Q,evaluateCountdownProps:W,skipCover:b,scaleEdit:U}};export{o as ScaleViewComputed};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{handleQueryParams as e,getQueryVariable as t}from"../utils/judge-types.js";import a from"./use-noData.js";import
|
|
1
|
+
import{handleQueryParams as e,getQueryVariable as t}from"../utils/judge-types.js";import a from"./use-noData.js";import"xe-utils";import"moment";import i from"../../../../shared/utils/vexutilsExpand.js";import{componentMap as n}from"./use-component.js";import{useEvent as l}from"./use-event.js";import{ScaleViewComputed as s}from"./scaleview-computed.js";import{ScaleViewValidate as r}from"./scaleview-validate.js";import{useDialog as o}from"naive-ui";const u=(u,v,c,f)=>{const d=o(),{setNoData:m}=a(),{hasEvaluateResultSetting:p,hasparamsEvaluate:g,hasDefault:S,formKey:E}=s(u,v,f),{formatRules:C}=r(u,v,f),{nextLogicEvent:O}=l(u,v),A=e=>{const t=null==e?void 0:e.evaluateStartTime;t&&!i.isValidDate(new Date(t))&&i.isValidDate(new Date(Number(t)))&&(e.evaluateStartTime=Number(t))},y=()=>{var t;if(!p.value)return!!S.value&&("evaluateResultSetting"in v.config||(v.config.evaluateResultSetting={}),(t=>{let a=e();g.value&&(a=v.paramsEvaluate),a.evaname&&(t.evaluateName=a.evaname),a.evadesc&&(t.evaluateExplain=a.evadesc),a.evast&&(t.evaluateStartTime=a.evast),a.evadur&&(t.evaluateTime=a.evadur),a.evaan&&("true"===a.evaan||a.evaan,t.evaluateAnswer=a.evaan),A(t)})(v.config.evaluateResultSetting),v.showEvaluatePage=!0,void(v.showEvaluateCountdownWrap=!0));const{evaluateResultSetting:a={}}=v.config;if(!a||!Object.keys(a).length)return;v.showEvaluateCountdownWrap=!0;const{evaluateStartTime:n}=a,{evaluateName:l}=(null==(t=v.originConfig)?void 0:t.evaluateResultSetting)||{};if(n)return!(!i.isValidDate(new Date(n))&&!l)&&void(v.showEvaluatePage=!0);v.showEvaluatePage=!0},h=(e,t)=>{const a=e.find((e=>t===e.value));return a?a.key:t},R=(e,t)=>{if(["RADIO_BLOCK","CHECKBOX_BLOCK"].includes(t)&&e&&(e&&i.isJSON(e)&&(e=JSON.parse(e)),e.length))return!0},L=t=>{var a,n;if(!t||!t.length)return;const l=e();if((null==u?void 0:u.noBtn)||(null==l?void 0:l.noBtn))return;const s=t.find((e=>"FRONT_ADDRESS"===e.type));if(!s||!Object.keys(s).length)return;let r;if(s.setting&&i.isJSON(s.setting)&&(r=JSON.parse(s.setting)),!r||!Object.keys(r).length)return;if(1==(null==l?void 0:l.redirect)||1==(null==(a=u.params)?void 0:a.redirect)||3==l.isEdit||3==(null==(n=u.params)?void 0:n.isEdit))return;const{frontAddress:o}=r;if(o){const e=window.location.href;let t="?";o.includes("?")&&(t="&");return`${o}${t}redirect_url=${encodeURIComponent(e)}`}},N=e=>{const t=["evaname","evadesc","evast","evadur","evaan"],a={};for(const i in e){const n=e[i];t.includes(i)&&n&&(a[i]=n)}return a},b=t=>{if(!t||!Object.keys(t).length)return;let a=e()||{};g.value&&(a=v.paramsEvaluate);const i={evaluateName:"evaname",evaluateExplain:"evadesc",evaluateStartTime:"evast",evaluateTime:"evadur",evaluateAnswer:"evaan"};for(const e in t){const n=t[e];if(n&&"evaluateAnswer"!=e&&"string"==typeof n&&n.includes("${")){const i=n.replace(/\$\{([^}]+)\}/g,((e,t)=>{let i;return t.startsWith("form.")&&(i=a[t.split(".")[1]]),i||""}));t[e]=i}else{let n=a[i[e]];"evaluateAnswer"==e&&(n="true"===n||1==n),a[i[e]]&&(t[e]=n)}}if(S.value){const e={evaname:"evaluateName",evadesc:"evaluateExplain",evast:"evaluateStartTime",evadur:"evaluateTime",evaan:"evaluateAnswer"};["evaname","evadesc","evast","evadur","evaan"].forEach((i=>{const n=e[i];if(!t[n]){let e=a[i];"evaan"==i&&(e="true"===e||1==e),a[i]&&(t[n]=e)}}))}A(t)},T=e=>{let t=1;return e.map((a=>{const l=E(a);(l||"").replace(/\n/g,""),a.showTitle=a.title,a.val_key=l,a.renderCom=n[a.type],a.isShow=!0,Object.keys(a).forEach((e=>{i.isJSON(a[e])&&"LOCATION"!=a.type&&(a[e]=JSON.parse(a[e]))}));var s;return["LINEBAR","TITLE","PROMPT","IMGCARD","RICH_TEXT"].indexOf(a.type)<0&&!a.hide&&(a.softcode=t++),("SELECT"==(s=a.type)||"RADIO_BLOCK"==s||"CHECKBOX_BLOCK"==s||"SEARCH_CASCADE"==s||"EVALUATE_RADIO_BLOCK"==s||"EVALUATE_CHECKBOX_BLOCK"==s||"EVALUATE_SELECT"==s)&&(((e,t)=>{R(e,t)&&e.forEach(((e,t)=>{"other"!==e.key&&(e.key=t+1),(e.prefix||e.suffix)&&(e.value=e.prefix||e.suffix)}))})(a.options,a.type),"SEARCH_CASCADE"!=a.type&&(a.dbValue?O(a.dbValue,a,e):a.setting.defaultValue&&O(a.setting.defaultValue,a,e))),a})).map((t=>(((e,t)=>{const a=i.isString(t.relationLogic)?JSON.parse(t.relationLogic):t.relationLogic,{condition:n}=a||{};n&&n.length&&(n.forEach((t=>{const a=e.find((e=>e.seq==t.subject_seq));if(!a)return;if(!R(a.options,a.type))return;let i=t.value;Array.isArray(i)?(i=i.map((e=>h(a.options,e))),t.value=i):t.value=h(a.options,i)})),t.relationLogic=a)})(e,t),(e=>{const{nextLogic:t,options:a,type:i}=e||{};if(!t||!R(a,i))return;const{condition:n}=t||{};n&&n.length&&n.forEach((e=>{let t=e.value;Array.isArray(t)?(t=t.map((e=>h(a,e))),e.value=t):e.value=h(a,t)}))})(t),"CHECKBOX_BLOCK"===t.type&&t.dbValue&&!Array.isArray(t.dbValue)&&"customList"===u.type&&(t.dbValue=t.dbValue.split(",").filter((e=>!!e))),t)))},w=e=>{const a={};let n;return e.forEach((e=>{var l,s,r,o;const c=e.val_key,{type:f}=e;let d;if(e.dbValue)d=e.dbValue;else if(3==(null==(l=e.setting)?void 0:l.defValType)){const a=null==(r=null==(s=e.setting)?void 0:s.outDefaultValue)?void 0:r.urlKey;if(a){const i=a.split(",");if(i.length>1){const e=i.map((e=>{const a=t(e,v,u.params);return a?decodeURIComponent(a):null})).filter(Boolean);e.length&&(d=e)}else{let a=t(i[0],v,u.params);a&&(a=decodeURIComponent(a),d="CHECKBOX_BLOCK"==e.type?a.split():a)}}}switch(f){case"LOCATION":a[c]=d||"";break;case"SEARCH_CASCADE":case"UPFILE":case"UPPICTURE":a[c]=d||[];break;case"ADDRESS":a[c]=d||"",v.defaultAddress=d||{};break;case"LABEL":a[c]=d||{},i.isObject(d)?v.labelSelectedList=(null==d?void 0:d.labels)||[]:Array.isArray(d)?v.labelSelectedList=d:v.labelSelectedList=[];break;case"TITLE":a[c]=e.title;break;case"IMGCARD":a[c]=(null==(o=e.setting)?void 0:o.imgUrl)||"";break;case"CHECKBOX_BLOCK":d&&!Array.isArray(d)&&"customList"===u.type?a[c]=d.split(",").filter((e=>!!e)):(n=d||e.setting.defaultValue,i.isJSON(n)&&(n=JSON.parse(n)),a[c]=n);break;default:n=d||e.setting.defaultValue,i.isJSON(n)&&(n=JSON.parse(n)),a[c]=n}})),a};return{initForm:e=>{var t;let{list:a=[],map:n={},isFinished:l=!1}=e;const s=L(a);if(s)return void(window.location.href=s);if(n.maxScore&&(v.maxScore=n.maxScore),v.isFinished=l,e.isNotFilled)return v.spinning=!1,v.hasFrontAddress=!1,void m(!0,"未查询到量表填写记录");if(e.isLackCustomer&&d.info({title:"已设置填写次数限制",content:"请在包含用户信息的环境中打开此量表",maskClosable:!1,onPositiveClick(){c("onCloseSetting")}}),v.config=n,"evaluateResultConfig"in n&&i.isJSON(n.evaluateResultConfig)&&(v.config.evaluateResultConfig=JSON.parse(n.evaluateResultConfig)),"evaluateResultSetting"in n&&i.isJSON(n.evaluateResultSetting)&&(v.config.evaluateResultSetting=JSON.parse(n.evaluateResultSetting),(null==(t=v.config)?void 0:t.randomId)&&v.config.evaluateResultSetting&&(v.config.evaluateResultSetting.evaluateName=v.config.name,v.config.evaluateResultSetting.evaluateExplain=v.config.remark)),v.originConfig=JSON.parse(JSON.stringify(v.config)),u.params&&Object.keys(u.params).length){const e=N(u.params);e&&Object.keys(e).length&&(v.paramsEvaluate=e)}b(v.config.evaluateResultSetting),y(),v.defaultFormArray=JSON.parse(JSON.stringify(a));const r=v.filterArr;a=a.filter((e=>!r.includes(e.type))),v.formArray=T(a||[]),v.form=w(v.formArray),v.rules=C(v.formArray),v.fontSize=e.fontSize,v.spinning=!1,v.hasFrontAddress=!1}}};export{u as ScaleViewInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isOnlyOptions as t,getQueryVariable as e}from"../utils/judge-types.js";import i from"
|
|
1
|
+
import{isOnlyOptions as t,getQueryVariable as e}from"../utils/judge-types.js";import"xe-utils";import i from"moment";import s from"../../../../shared/utils/vexutilsExpand.js";import{ScaleViewComputed as r}from"./scaleview-computed.js";const n=(n,o,a,f)=>{const{showEvent:p,formKey:m}=r(n,o,f),d=()=>{const e=Object.assign({},o.form,o.submitForm),s={};if(!Object.keys(e).length)return{};for(const r in e){const a=o.formArray.find((t=>m(t)==r));if(r&&a){let f;if(a&&a.databaseTitle&&(f=a.databaseTitle),"customList"==n.type&&a&&a.setting&&1!=a.setting.startToStop&&e[r]&&"DATETIME"==a.type&&(a.setting&&"time"==a.setting.dateType&&e[r]&&(e[r]=i().format("YYYY-MM-DD ")+e[r]),a.setting&&"date"==a.setting.dateType&&e[r]&&(e[r]=i(e[r]).format("YYYY-MM-DD ")+i().format("HH:mm:ss"))),s[f||r]=e[r]?e[r]:null,t(a.type)){const{options:t}=a,i=a.val_key,n=o.choiceComObj[i],f=e[r];if("RADIO_BLOCK"===a.type&&f&&(s[i]=l(f,t,n)),"CHECKBOX_BLOCK"===a.type&&(null==f?void 0:f.length)){const e=u(f,t,n);s[i]=e}}}else s[r]=e[r]}return s},u=(t,e,i)=>{const s=[];let r,n=0;for(;n<t.length;n++){r=t[n];const o=e.find(((t,e)=>e+1===r));if(o&&!o.prefix&&!o.suffix){s.push(o.value);continue}const a=l(r,e,i);s.push(a)}return s},l=(t,e,i)=>{const{othersText:s,optionsPreSuffixObj:r={}}=i||{};if("other"===t)return s||"其他";const n=e.find(((e,i)=>i+1===t));if(!n)return;if(!n.prefix&&!n.suffix)return n.value;let o=r[t]||"";return n.prefix?o=n.prefix+o:o+=n.suffix,o};return{submitMethod:()=>{const t=o.defaultFormArray.find((t=>"SPREAD_PARAMS"===t.type));if(t){s.isJSON(t.setting)&&(t.setting=JSON.parse(t.setting));const i=m(t);o.submitForm[i]=t.setting.spreadParams.domains.map((t=>{const i={};return"1"==t.valueType?i[t.name]=t.value:"2"==t.valueType&&(i[t.name]=e(t.value,o,n.params)),i}))}const i=o.defaultFormArray.find((t=>"CHECKBOX_BLOCK"==t.type));i&&Array.isArray(o.form[i.title])&&"customList"===n.type&&(o.form[i.title]=o.form[i.title].join(","));const r=d();let a;if("customList"===n.type)a={definedListId:n.ids.guage_id,dbId:n.ids.db_id,scoreJson:JSON.stringify(r)};else{const{guageId:t,randomId:e}=o.config;a=Object.assign(n.params,{guageId:t,scoreJson:JSON.stringify(r),randomId:e})}o.shareId&&(a.shareId=o.shareId);const f=o.defaultFormArray.find((t=>"SUCCESS_TIP"===t.type));if(f){const t=s.isJSON(f.setting)?JSON.parse(f.setting):f.setting;a.tipSetting=JSON.stringify({tipMode:t.tipMode,tipType:t.tipType,tipText:t.tipText,tipApi:t.tipApi})}const u=o.defaultFormArray.find((t=>"CALLBACK_INTERFACE"===t.type));let l=!1;u&&(l=p(u,!0));return{params:a,hasCallbackItem:u,isCallback:l}}}};export{n as ScaleViewSubmit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
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};
|