cnhis-design-vue 3.2.14-beta.21 → 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.
- package/README.md +87 -87
- package/es/components/button-print/index.d.ts +4 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +4 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/fabric-chart/index.d.ts +19 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +19 -2
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
- package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +13 -0
- package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -1
- package/es/components/fabric-chart/src/components/useStyle.js +1 -1
- package/es/components/fabric-chart/src/constants/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +7 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +2 -0
- package/es/components/field-set/src/FieldColor.vue.d.ts +2 -2
- package/es/components/field-set/src/FieldFilter.vue.d.ts +2 -2
- package/es/components/field-set/src/FieldSet.vue.d.ts +2 -2
- package/es/components/field-set/src/components/table-row.vue.d.ts +2 -2
- package/es/components/iho-chat/index.d.ts +20 -4
- package/es/components/iho-chat/src/Index.vue.d.ts +20 -4
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/src/components/MessageTemplate.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/MessageTemplate.vue2.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
- package/es/components/iho-chat/src/constants/index.d.ts +2 -1
- package/es/components/iho-chat/src/constants/index.js +1 -1
- package/es/components/iho-chat/src/hooks/useData.d.ts +3 -3
- package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
- package/es/components/iho-chat/src/hooks/useWebSocket.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/scale-view/index.d.ts +31 -0
- package/es/components/scale-view/src/ScaleView.vue.d.ts +13 -0
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/composables/choose-common.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-checkbox.d.ts +9 -0
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-input.d.ts +9 -0
- package/es/components/scale-view/src/components/formitem/r-input.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-radio.d.ts +9 -0
- package/es/components/scale-view/src/components/formitem/r-radio.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-props.d.ts +4 -0
- package/es/components/scale-view/src/hooks/scaleview-props.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +72 -0
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/template-render/src/components/index.d.ts +23 -23
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/ai__avatar.png.js +1 -1
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/logo.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -109,6 +109,10 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
|
|
109
109
|
type: BooleanConstructor;
|
110
110
|
default: boolean;
|
111
111
|
};
|
112
|
+
isGeneratePrintPdf: {
|
113
|
+
type: BooleanConstructor;
|
114
|
+
default: boolean;
|
115
|
+
};
|
112
116
|
}, {
|
113
117
|
ScaleViewState: {
|
114
118
|
other: string;
|
@@ -252,6 +256,10 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
|
|
252
256
|
type: BooleanConstructor;
|
253
257
|
default: boolean;
|
254
258
|
};
|
259
|
+
isGeneratePrintPdf: {
|
260
|
+
type: BooleanConstructor;
|
261
|
+
default: boolean;
|
262
|
+
};
|
255
263
|
}>> & {
|
256
264
|
onOnCloseSetting?: ((...args: any[]) => any) | undefined;
|
257
265
|
onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
|
@@ -866,6 +874,10 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
|
|
866
874
|
type: BooleanConstructor;
|
867
875
|
default: boolean;
|
868
876
|
};
|
877
|
+
isGeneratePrintPdf: {
|
878
|
+
type: BooleanConstructor;
|
879
|
+
default: boolean;
|
880
|
+
};
|
869
881
|
}>> & {
|
870
882
|
onOnCloseSetting?: ((...args: any[]) => any) | undefined;
|
871
883
|
onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
|
@@ -896,6 +908,7 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
|
|
896
908
|
fontSizeObj: Record<string, any>;
|
897
909
|
hasExtendBtn: boolean;
|
898
910
|
printingHideBtn: boolean;
|
911
|
+
isGeneratePrintPdf: boolean;
|
899
912
|
}>>;
|
900
913
|
declare const CRadio: SFCWithInstall<import("vue").DefineComponent<{
|
901
914
|
form: {
|
@@ -914,6 +927,10 @@ declare const CRadio: SFCWithInstall<import("vue").DefineComponent<{
|
|
914
927
|
type: BooleanConstructor;
|
915
928
|
default: boolean;
|
916
929
|
};
|
930
|
+
isGeneratePrintPdf: {
|
931
|
+
type: (BooleanConstructor | ObjectConstructor)[];
|
932
|
+
default: boolean;
|
933
|
+
};
|
917
934
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
918
935
|
form: {
|
919
936
|
type: ObjectConstructor;
|
@@ -931,11 +948,16 @@ declare const CRadio: SFCWithInstall<import("vue").DefineComponent<{
|
|
931
948
|
type: BooleanConstructor;
|
932
949
|
default: boolean;
|
933
950
|
};
|
951
|
+
isGeneratePrintPdf: {
|
952
|
+
type: (BooleanConstructor | ObjectConstructor)[];
|
953
|
+
default: boolean;
|
954
|
+
};
|
934
955
|
}>> & {
|
935
956
|
onScaleChange?: ((...args: any[]) => any) | undefined;
|
936
957
|
}, {
|
937
958
|
item: Record<string, any>;
|
938
959
|
isLock: boolean;
|
960
|
+
isGeneratePrintPdf: boolean | Record<string, any>;
|
939
961
|
form: Record<string, any>;
|
940
962
|
inputLock: boolean;
|
941
963
|
}>>;
|
@@ -956,6 +978,10 @@ declare const CCheckbox: SFCWithInstall<import("vue").DefineComponent<{
|
|
956
978
|
type: BooleanConstructor;
|
957
979
|
default: boolean;
|
958
980
|
};
|
981
|
+
isGeneratePrintPdf: {
|
982
|
+
type: (BooleanConstructor | ObjectConstructor)[];
|
983
|
+
default: boolean;
|
984
|
+
};
|
959
985
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
960
986
|
form: {
|
961
987
|
type: ObjectConstructor;
|
@@ -973,11 +999,16 @@ declare const CCheckbox: SFCWithInstall<import("vue").DefineComponent<{
|
|
973
999
|
type: BooleanConstructor;
|
974
1000
|
default: boolean;
|
975
1001
|
};
|
1002
|
+
isGeneratePrintPdf: {
|
1003
|
+
type: (BooleanConstructor | ObjectConstructor)[];
|
1004
|
+
default: boolean;
|
1005
|
+
};
|
976
1006
|
}>> & {
|
977
1007
|
onScaleChange?: ((...args: any[]) => any) | undefined;
|
978
1008
|
}, {
|
979
1009
|
item: Record<string, any>;
|
980
1010
|
isLock: boolean;
|
1011
|
+
isGeneratePrintPdf: boolean | Record<string, any>;
|
981
1012
|
form: Record<string, any>;
|
982
1013
|
inputLock: boolean;
|
983
1014
|
}>>;
|
@@ -107,6 +107,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
107
107
|
type: BooleanConstructor;
|
108
108
|
default: boolean;
|
109
109
|
};
|
110
|
+
isGeneratePrintPdf: {
|
111
|
+
type: BooleanConstructor;
|
112
|
+
default: boolean;
|
113
|
+
};
|
110
114
|
}, {
|
111
115
|
ScaleViewState: {
|
112
116
|
other: string;
|
@@ -250,6 +254,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
250
254
|
type: BooleanConstructor;
|
251
255
|
default: boolean;
|
252
256
|
};
|
257
|
+
isGeneratePrintPdf: {
|
258
|
+
type: BooleanConstructor;
|
259
|
+
default: boolean;
|
260
|
+
};
|
253
261
|
}>> & {
|
254
262
|
onOnCloseSetting?: ((...args: any[]) => any) | undefined;
|
255
263
|
onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
|
@@ -864,6 +872,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
864
872
|
type: BooleanConstructor;
|
865
873
|
default: boolean;
|
866
874
|
};
|
875
|
+
isGeneratePrintPdf: {
|
876
|
+
type: BooleanConstructor;
|
877
|
+
default: boolean;
|
878
|
+
};
|
867
879
|
}>> & {
|
868
880
|
onOnCloseSetting?: ((...args: any[]) => any) | undefined;
|
869
881
|
onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
|
@@ -894,5 +906,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
894
906
|
fontSizeObj: Record<string, any>;
|
895
907
|
hasExtendBtn: boolean;
|
896
908
|
printingHideBtn: boolean;
|
909
|
+
isGeneratePrintPdf: boolean;
|
897
910
|
}>;
|
898
911
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,reactive as o,ref as t,watch as a,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as c,createBlock as u,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as w,createTextVNode as y,resolveDynamicComponent as k,renderSlot as S}from"vue";import C from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as D}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as j}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as _}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as x}from"./hooks/scaleview-methods.js";import{handleQueryParams as F,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import L from"../../../shared/utils/vexutilsExpand.js";import N from"./components/NoData.vue.js";import R from"./components/EvaluateCountdown.vue.js";import A from"./components/EvaluatePage.vue.js";import M from"./components/AnswerParse.vue.js";import O from"./components/ScaleScore.js";import T from"./components/DescribeContent.vue.js";import{NForm as V,NFormItem as B,NButton as I}from"naive-ui";const J=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},H=["onClick"],Q=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),$={key:1,class:"footer"};var z=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:z}){const K=e,{ScaleViewState:U}=D(),X=o(U),Y=t(null),Z=t(null),ee=t(null),{noDataState:oe,setNoData:te,resetNodata:ae}=C(),ne=F(),{showEvatip:se,isFormBoldOpen:ie,scaleStyle:le,handlePageClass:re,isShowItem:me,handleShowQuestionNumber:ce,hasScore:ue,isPreviewScale:de,showEvaluateEntry:pe,showEvaluateCoundownPage:ve,showScaleFooter:fe,isCancelBtn:ge,isSaveBtn:he,showEvaluateLabel:we,showAnswerParse:ye,propsConfig:ke,evaluatePageProps:Se,evaluateCountdownProps:Ce,isEvaluetaResSituation:be,disableEdit:De,desStart:Ee,desEnd:je,desContent:_e}=E(K,X,{query:ne,scaleViewDom:Y}),{initForm:xe}=j(K,X,z,{query:ne}),{submitMethod:Fe,onSubmitData:Pe,onSubmitForm:qe,handleScoreJson:Le}=_(K,X,z,{query:ne,formRef:ee,countdownDom:Z}),{nextLogicEvent:Ne,handleDynamicDataRelation:Re}=q(K,X),{scaleChange:Ae,labelChange:Me,vodFileList:Oe,writeGuage:Te,closeEvaluateCountdown:Ve,showEvaTipModal:Be}=x(K,X,z,{nextLogicEvent:Ne,handleDynamicDataRelation:Re,isPreviewScale:de,submitMethod:Fe,isEvaluetaResSituation:be,handleScoreJson:Le,disableEdit:De});(()=>{let{id:e}=ne;e&&(X.shareId=e)})();const Ie=e=>{try{ae(),xe(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,te(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};a((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Ie(e):e.guage_id&&Ie(e)}),{immediate:!0}),a((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{xe(o)}))}),{immediate:!0});const Je=L.debounce(Pe,300),Ge=()=>{z("onCloseSetting")};return b({getScaleData:()=>({...X}),onSubmitForm:qe,cancel:Ge}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(fe)}]),ref_key:"scaleViewDom",ref:Y},[m(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(c,{key:0},[r(oe).noData?(s(),u(N,{key:0,noDataImg:r(oe).noDataImg,noDataTip:r(oe).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(c,{key:1},[r(pe)?(s(),u(A,d({key:0},r(Se),{onWriteGuage:r(Te)}),null,16,["onWriteGuage"])):(s(),i(c,{key:1},[r(ve)?(s(),u(R,d({key:0,ref_key:"countdownDom",ref:Z},r(Ce),{onCloseEvaluateCountdown:r(Ve)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(re),"scale-container-hasfooter":r(fe)}]),style:v(r(le))},[r(ue)?(s(),u(r(O),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(Ee)?(s(),u(T,{key:1,content:r(_e)},null,8,["content"])):m("v-if",!0),f(r(V),{ref_key:"formRef",ref:ee,model:X.form,rules:X.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(s(!0),i(c,null,h(X.formArray,((e,o)=>(s(),i(c,{key:(e.id||e.seq)+o},[r(me)(e)?(s(),u(r(B),{key:0,path:e.val_key,"show-label":!r(P)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(ie)(e)}),innerHTML:r(ce)(e)},null,10,J),r(ie)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(we)(e)?(s(),i("span",W,w(r(we)(e)),1)):m("v-if",!0),r(se)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Be)(e)},[Q,y(" 查看提示 ")],8,H)):m("v-if",!0)])),default:g((()=>[(s(),u(k(e.renderCom),d(r(ke)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Ae),onOnChange:o=>r(Me)(o,e),onVodFileList:r(Oe)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(ye)(e)?(s(),u(M,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"]),r(je)?(s(),u(T,{key:2,content:r(_e)},null,8,["content"])):m("v-if",!0)],6),r(fe)?(s(),i("div",$,[m(" 分享的链接 隐藏取消按钮 "),r(ge)?(s(),u(r(I),{key:0,onClick:Ge},{default:g((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.28"))||"取消")]})),_:1})):m("v-if",!0),r(he)?(s(),u(r(I),{key:1,onClick:r(Je),disabled:X.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"])):m("v-if",!0),S(e.$slots,"extendBtn")])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};
|
1
|
+
import{defineComponent as e,reactive as o,ref as t,watch as a,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as c,createBlock as u,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as w,createTextVNode as y,resolveDynamicComponent as k,renderSlot as S}from"vue";import C from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as D}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as j}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as _}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as x}from"./hooks/scaleview-methods.js";import{handleQueryParams as F,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import L from"../../../shared/utils/vexutilsExpand.js";import N from"./components/NoData.vue.js";import R from"./components/EvaluateCountdown.vue.js";import A from"./components/EvaluatePage.vue.js";import M from"./components/AnswerParse.vue.js";import O from"./components/ScaleScore.js";import T from"./components/DescribeContent.vue.js";import{NForm as V,NFormItem as B,NButton as I}from"naive-ui";const J=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},H=["onClick"],Q=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),$={key:1,class:"footer"};var z=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:z}){const K=e,{ScaleViewState:U}=D(),X=o(U),Y=t(null),Z=t(null),ee=t(null),{noDataState:oe,setNoData:te,resetNodata:ae}=C(),ne=F(),{showEvatip:se,isFormBoldOpen:ie,scaleStyle:le,handlePageClass:re,isShowItem:me,handleShowQuestionNumber:ce,hasScore:ue,isPreviewScale:de,showEvaluateEntry:pe,showEvaluateCoundownPage:ve,showScaleFooter:fe,isCancelBtn:ge,isSaveBtn:he,showEvaluateLabel:we,showAnswerParse:ye,propsConfig:ke,evaluatePageProps:Se,evaluateCountdownProps:Ce,isEvaluetaResSituation:be,disableEdit:De,desStart:Ee,desEnd:je,desContent:_e}=E(K,X,{query:ne,scaleViewDom:Y}),{initForm:xe}=j(K,X,z,{query:ne}),{submitMethod:Fe,onSubmitData:Pe,onSubmitForm:qe,handleScoreJson:Le}=_(K,X,z,{query:ne,formRef:ee,countdownDom:Z}),{nextLogicEvent:Ne,handleDynamicDataRelation:Re}=q(K,X),{scaleChange:Ae,labelChange:Me,vodFileList:Oe,writeGuage:Te,closeEvaluateCountdown:Ve,showEvaTipModal:Be}=x(K,X,z,{nextLogicEvent:Ne,handleDynamicDataRelation:Re,isPreviewScale:de,submitMethod:Fe,isEvaluetaResSituation:be,handleScoreJson:Le,disableEdit:De});(()=>{let{id:e}=ne;e&&(X.shareId=e)})();const Ie=e=>{try{ae(),xe(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,te(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};a((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Ie(e):e.guage_id&&Ie(e)}),{immediate:!0}),a((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{xe(o)}))}),{immediate:!0});const Je=L.debounce(Pe,300),Ge=()=>{z("onCloseSetting")};return b({getScaleData:()=>({...X}),onSubmitForm:qe,cancel:Ge}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(fe)}]),ref_key:"scaleViewDom",ref:Y},[m(' <template v-if="state.spinning">\r\n <n-spin :show="state.spinning" description="加载中"></n-spin>\r\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(c,{key:0},[r(oe).noData?(s(),u(N,{key:0,noDataImg:r(oe).noDataImg,noDataTip:r(oe).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(c,{key:1},[r(pe)?(s(),u(A,d({key:0},r(Se),{onWriteGuage:r(Te)}),null,16,["onWriteGuage"])):(s(),i(c,{key:1},[r(ve)?(s(),u(R,d({key:0,ref_key:"countdownDom",ref:Z},r(Ce),{onCloseEvaluateCountdown:r(Ve)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(re),"scale-container-hasfooter":r(fe)}]),style:v(r(le))},[r(ue)?(s(),u(r(O),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(Ee)?(s(),u(T,{key:1,content:r(_e)},null,8,["content"])):m("v-if",!0),f(r(V),{ref_key:"formRef",ref:ee,model:X.form,rules:X.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(s(!0),i(c,null,h(X.formArray,((e,o)=>(s(),i(c,{key:(e.id||e.seq)+o},[r(me)(e)?(s(),u(r(B),{key:0,path:e.val_key,"show-label":!r(P)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(ie)(e)}),innerHTML:r(ce)(e)},null,10,J),r(ie)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(we)(e)?(s(),i("span",W,w(r(we)(e)),1)):m("v-if",!0),r(se)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Be)(e)},[Q,y(" 查看提示 ")],8,H)):m("v-if",!0)])),default:g((()=>[(s(),u(k(e.renderCom),d(r(ke)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Ae),onOnChange:o=>r(Me)(o,e),onVodFileList:r(Oe)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(ye)(e)?(s(),u(M,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"]),r(je)?(s(),u(T,{key:2,content:r(_e)},null,8,["content"])):m("v-if",!0)],6),r(fe)?(s(),i("div",$,[m(" 分享的链接 隐藏取消按钮 "),r(ge)?(s(),u(r(I),{key:0,onClick:Ge},{default:g((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.28"))||"取消")]})),_:1})):m("v-if",!0),r(he)?(s(),u(r(I),{key:1,onClick:r(Je),disabled:X.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"])):m("v-if",!0),S(e.$slots,"extendBtn")])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{computed as e}from"vue";function i(i,f){return{choiceUseKey:e((()=>"RADIO_BLOCK"===i.item.type||"CHECKBOX_BLOCK"===i.item.type?"key":"value")),choiceColor:e((()=>e=>`${e.color||"rgba(0, 0, 0, 0.65)"}`)),showImgWrap:e((()=>e=>!e.prefix&&!e.suffix&&e.imageUrl)),isRadioItem:e((()=>"RADIO_BLOCK"===i.item.type)),isCheckboxItem:e((()=>"CHECKBOX_BLOCK"===i.item.type)),showPreSuffix:e((()=>e=>e.prefix||e.suffix)),handleDefPreSuffix:(e,i,t,r,o)=>{if(e.prefix||e.suffix){if(e.value===t)return!1;if(e.prefix&&0===t.indexOf(e.prefix)){const i=t.substring(e.prefix.length);return f.optionsPreSuffixObj[e.key]=i,e.key}if(e.suffix){const i=t.lastIndexOf(e.suffix);if(e.suffix.length,t.length===i+e.suffix.length){const i=t.lastIndexOf(e.suffix),r=t.substring(0,i);return f.optionsPreSuffixObj[e.key]=r,e.key}}}return t===e.value?e.key:r&&o?(f.othersText=t,"other"):void 0},handleOptions:e=>e.map(((e,i)=>e.prefix||e.suffix?(f.optionsPreSuffixObj[e.key]=void 0,e):e.label?e:null)).filter(Boolean)||[],stopClick:e=>{e.preventDefault(),e.stopPropagation()}}}export{i as default};
|
1
|
+
import{computed as e}from"vue";function i(i,f){return{choiceUseKey:e((()=>"RADIO_BLOCK"===i.item.type||"CHECKBOX_BLOCK"===i.item.type?"key":"value")),choiceColor:e((()=>e=>`${e.color||"rgba(0, 0, 0, 0.65)"}`)),showImgWrap:e((()=>e=>!e.prefix&&!e.suffix&&e.imageUrl)),isRadioItem:e((()=>"RADIO_BLOCK"===i.item.type)),isCheckboxItem:e((()=>"CHECKBOX_BLOCK"===i.item.type)),showPreSuffix:e((()=>e=>e.prefix||e.suffix)),handleDefPreSuffix:(e,i,t,r,o)=>{var n;if(e.prefix||e.suffix){if(e.value===t)return!1;if(e.prefix&&0===(null==(n=null==t?void 0:t.indexOf)?void 0:n.call(t,e.prefix))){const i=t.substring(e.prefix.length);return f.optionsPreSuffixObj[e.key]=i,e.key}if(e.suffix){const i=t.lastIndexOf(e.suffix);if(e.suffix.length,t.length===i+e.suffix.length){const i=t.lastIndexOf(e.suffix),r=t.substring(0,i);return f.optionsPreSuffixObj[e.key]=r,e.key}}}return t===e.value?e.key:r&&o?(f.othersText=t,"other"):void 0},handleOptions:e=>e.map(((e,i)=>e.prefix||e.suffix?(f.optionsPreSuffixObj[e.key]=void 0,e):e.label?e:null)).filter(Boolean)||[],stopClick:e=>{e.preventDefault(),e.stopPropagation()}}}export{i 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,
|
1
|
+
import{defineComponent as e,reactive as o,toRefs as t,computed as i,watch as s,createVNode as l,resolveComponent as r,isVNode as n}from"vue";import{NCheckboxGroup as a,NCheckbox as c,NInput as u,NIcon as p}from"naive-ui";import{api as h}from"v-viewer";import{SearchOutline as f}from"@vicons/ionicons5";import"xe-utils";import"moment";import d from"../../../../../shared/utils/vexutilsExpand.js";import x from"../composables/choose-common.js";var b=e({name:"RCheckbox",components:{NCheckboxGroup:a,NCheckbox:c,NInput:u,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,c){var u,b;const v=o({curCheckboxValue:[],othersText:"",curOptions:[],optionsPreSuffixObj:{}}),{isGeneratePrintPdf:m}=t(e),k=i((()=>e.isLock||e.inputLock)),{choiceColor:y,showImgWrap:O,handleDefPreSuffix:C,choiceUseKey:g,isCheckboxItem:j,showPreSuffix:S,handleOptions:V,stopClick:P}=x(e,v),T=(null==(b=null==(u=e.item)?void 0:u.setting)?void 0:b.chooseStyleSetting)||1,w=o=>{const t={othersText:v.othersText,optionsPreSuffixObj:v.optionsPreSuffixObj};o&&!v.curCheckboxValue.includes("other")&&v.curCheckboxValue.push("other");const i=JSON.parse(JSON.stringify(v.curCheckboxValue));c.emit("scaleChange",i,e.item,{choiceObj:t,isSetObj:j.value})},L=o=>{var t,i;let s=o.options||[];const l=e.form[e.item.val_key],r=null==(t=null==o?void 0:o.setting)?void 0:t.defaultValue;"EVALUATE_CHECKBOX_BLOCK"===e.item.type&&(s=(null==(i=o.scoreConfigs)?void 0:i.scoreRules)||[]);let n=[];n=r&&d.isJSON(r)?JSON.parse(r):l,e.inputLock?((e,o,t)=>{var i;if(v.curOptions=V(t),!t.length||!o||!o.length)return;const s=[];let l,r=0;const n=o.length;for(;r<n;r++){if(l=o[r],"其他"===l){v.othersText=l,v.curCheckboxValue=["other"],!s.includes("other")&&s.push("other");continue}const e=t.findIndex((e=>e.value===l));if(e<0){v.othersText=l,!s.includes("other")&&s.push("other");continue}const n=null==(i=t[e])?void 0:i.key;s.indexOf(n)<0&&s.push(n)}v.curCheckboxValue=s,w()})(0,o.dbValue||n,s):((e,o,t)=>{var i;if(v.curOptions=V(t),!t.length||!o||!o.length)return;if("EVALUATE_CHECKBOX_BLOCK"===e.type)return v.curCheckboxValue=o,void w();const s=[],l=o.length;let r,n=0;const a=t.some((e=>e.importability||"other"===e.key));for(;n<l;n++){if(r=o[n],"其他"===r){v.othersText=r,v.curCheckboxValue=["other"],!s.includes("other")&&s.push("other");continue}const e=t.findIndex((e=>e.value===r));if(e>0){const o=null==(i=t[e])?void 0:i.key;!s.includes(o)&&s.push(o)}else t.map((e=>{const o=C(e,n,r,!0,a);o&&!s.includes(o)&&s.push(o)}))}v.curCheckboxValue=s,w()})(o,o.dbValue||n,s)};s((()=>e.item),(e=>{e&&Object.keys(e).length&&L(e)}),{immediate:!0});const N=d.debounce(w,200),I=d.debounce((o=>{const t={othersText:v.othersText,optionsPreSuffixObj:v.optionsPreSuffixObj};v.curCheckboxValue.includes(o.key)||v.curCheckboxValue.push(o.key);const i=JSON.parse(JSON.stringify(v.curCheckboxValue));c.emit("scaleChange",i,e.item,{choiceObj:t,isSetObj:j.value})}),200),U=e=>{v.othersText=e,N(!0)},B=e=>l("span",{class:"scale-choice-img-wrap"},[l("img",{class:"show-picture",src:e.imageUrl},null),l("div",{class:"scale-preview-wrap"},[l(p,{size:"24",color:"#fff",component:f,onClick:o=>((e,o)=>{e.preventDefault(),e.stopPropagation();const t=v.curOptions.map((e=>e.imageUrl)).filter(Boolean);if(!t.length)return;const i=t.findIndex((e=>e===o));h({images:t,options:{toolbar:!0,initialViewIndex:i<0?0:i}})})(o,e.imageUrl)},null)])]),E=e=>{const o=e?v.optionsPreSuffixObj[e.key]:v.othersText,t=o||"请输入";return l("span",{class:["print-span",{"print-span-disabled":k.value,"print-span-empty":!o}]},[t])},J=e=>l("div",{class:"presuffix-wrap"},[e.prefix&&l("span",{class:"prefix-span",style:{color:y.value(e)}},[e.prefix]),m.value?E(e):l(r("n-input"),{value:v.optionsPreSuffixObj[e.key],"onUpdate:value":o=>v.optionsPreSuffixObj[e.key]=o,disabled:k.value,style:{color:y.value(e)},placeholder:"请输入",bordered:!1,onInput:o=>((e,o)=>{v.optionsPreSuffixObj[o.key]=e,I(o)})(o,e),onClick:P,type:"textarea",autosize:!0,rows:1},null),e.suffix&&l("span",{class:"suffix-span",style:{color:y.value(e)}},[e.suffix])]),K=e=>l("span",{style:{color:y.value(e)},class:"other-span"},[e.label]),_=e=>l("div",{class:"choose-other",onClick:P},[l(r("n-input"),{value:v.othersText,"onUpdate:value":[e=>v.othersText=e,U],disabled:k.value,style:{color:y.value(e)},placeholder:"请输入",bordered:!1,type:"textarea",autosize:!0,rows:1},null)]),A=e=>j.value&&S.value(e),z=g.value;return()=>{let o;return l(a,{value:v.curCheckboxValue,"onUpdate:value":[e=>v.curCheckboxValue=e,()=>w(!1)],class:["c-choice-wrap","choice-wrap-"+T],disabled:e.isLock},"function"==typeof(t=o=v.curOptions.map((e=>l("div",{class:"c-choice-radio-div"},[l(r("n-checkbox"),{key:e.value,value:e[z],class:{"c-radio-textarea":e.importability||A(e)}},{default:()=>[O.value(e)&&B(e),A(e)&&J(e),!A(e)&&K(e),e.importability&&(m.value?E():_(e))]})]))))||"[object Object]"===Object.prototype.toString.call(t)&&!n(t)?o:{default:()=>[o]});var t}}});export{b as default};
|
@@ -11,6 +11,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
11
11
|
type: BooleanConstructor;
|
12
12
|
default: boolean;
|
13
13
|
};
|
14
|
+
isGeneratePrintPdf: {
|
15
|
+
type: (BooleanConstructor | ObjectConstructor)[];
|
16
|
+
default: boolean;
|
17
|
+
};
|
14
18
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
15
19
|
form: {
|
16
20
|
type: ObjectConstructor;
|
@@ -24,11 +28,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
24
28
|
type: BooleanConstructor;
|
25
29
|
default: boolean;
|
26
30
|
};
|
31
|
+
isGeneratePrintPdf: {
|
32
|
+
type: (BooleanConstructor | ObjectConstructor)[];
|
33
|
+
default: boolean;
|
34
|
+
};
|
27
35
|
}>> & {
|
28
36
|
onScaleChange?: ((...args: any[]) => any) | undefined;
|
29
37
|
}, {
|
30
38
|
item: Record<string, any>;
|
31
39
|
isLock: boolean;
|
40
|
+
isGeneratePrintPdf: boolean | Record<string, any>;
|
32
41
|
form: Record<string, any>;
|
33
42
|
}>;
|
34
43
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,
|
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};
|
@@ -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
|
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{computed as e}from"vue";import{isEvaluation as
|
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} <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
|
-
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};
|