cnhis-design-vue 3.1.48-beta.0 → 3.1.48-beta.10
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/base-search/style/index.css +1 -1
- package/es/components/card-reader-sdk/src/cardReaderSDK.d.ts +24 -3
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/card-reader-sdk/src/types/index.d.ts +21 -15
- package/es/components/classification/index.d.ts +3 -0
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +3 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +3 -0
- package/es/components/classification/src/index.vue.d.ts +3 -0
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.d.ts +2 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/components/renderer/combination.js +1 -1
- package/es/components/form-render/src/components/renderer/complex.js +1 -1
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/components/renderer/switch.js +1 -1
- package/es/components/form-render/src/components/renderer/textarea.js +1 -1
- package/es/components/form-render/src/hooks/useAnchor.js +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
- package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
- package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
- package/es/components/form-render/src/utils/index.d.ts +0 -1
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/iho-table/src/plugins/bindEventSettingPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/bindEventSettingPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.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 +9 -0
- 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/widgets/colorRendererPlugin.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/labelRendererPlugin.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +2 -1
- package/es/components/iho-table/src/utils/index.d.ts +1 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +13 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +13 -0
- package/es/components/info-header/src/InfoHeader.vue2.js +1 -1
- package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -1
- package/es/components/info-header/style/index.css +1 -1
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/scale-view/index.d.ts +68 -18
- package/es/components/scale-view/src/ScaleView.vue.d.ts +68 -18
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +53 -0
- package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +1 -1
- package/es/components/scale-view/src/components/EvaluatePage.vue.d.ts +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-radio.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +5 -0
- 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-methods.d.ts +8 -0
- package/es/components/scale-view/src/hooks/scaleview-methods.js +1 -0
- package/es/components/scale-view/src/hooks/scaleview-props.d.ts +102 -0
- package/es/components/scale-view/src/hooks/scaleview-props.js +1 -0
- package/es/components/scale-view/src/hooks/scaleview-state.d.ts +1 -0
- package/es/components/scale-view/src/hooks/scaleview-state.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.d.ts +4 -0
- package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
- package/es/components/scale-view/src/utils/judge-types.d.ts +8 -0
- package/es/components/scale-view/src/utils/judge-types.js +1 -1
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +3 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.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/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/hooks/useDateTime.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/index.d.ts +1 -0
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/index.d.ts +1 -0
- package/es/shared/utils/index.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/components/iho-table/src/plugins/fieldConnectionPlugin/index.d.ts +0 -1
- package/es/components/iho-table/src/plugins/fieldConnectionPlugin/index.js +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
- package/es/shared/utils/tapableLess.d.ts +0 -28
- package/es/shared/utils/tapableLess.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as
|
|
1
|
+
import{defineComponent as e,reactive as o,ref as a,watch as t,nextTick as s,openBlock as n,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as u,createBlock as c,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as k,createTextVNode as y,resolveDynamicComponent as w}from"vue";import S from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as C}from"./hooks/scaleview-state.js";import{ScaleViewComputed as D}from"./hooks/scaleview-computed.js";import{ScaleViewInit as E}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as _}from"./hooks/scaleview-methods.js";import{handleQueryParams as x,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import F from"../../../shared/utils/vexutilsExpand.js";import L from"./components/NoData.vue.js";import N from"./components/EvaluateCountdown.vue.js";import R from"./components/EvaluatePage.vue.js";import T from"./components/AnswerParse.vue.js";import A from"./components/ScaleScore.js";import{NForm as M,NFormItem as O,NButton as I}from"naive-ui";const J=["innerHTML"],V={key:0,class:"required-text"},G={key:1,class:"evalute-label"},W=["onClick"],B=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),H={key:1,class:"footer"};var Q=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:Q}){const z=e,{ScaleViewState:K}=C(),U=o(K),X=a(null),Y=a(null),{noDataState:Z,setNoData:$,resetNodata:ee}=S(),oe=x(),{showEvatip:ae,isFormBoldOpen:te,scaleStyle:se,handlePageClass:ne,isShowItem:ie,handleShowQuestionNumber:le,hasScore:re,isPreviewScale:me,showEvaluateEntry:ue,showEvaluateCoundownPage:ce,showSaveBtn:de,showEvaluateLabel:pe,showAnswerParse:ve,propsConfig:fe,evaluatePageProps:ge,evaluateCountdownProps:he,isEvaluetaResSituation:ke,disableEdit:ye}=D(z,U,{query:oe}),{initForm:we}=E(z,U,Q,{query:oe}),{submitMethod:Se,onSubmitData:be,onSubmitForm:Ce,handleScoreJson:De}=j(z,U,Q,{query:oe,formRef:Y,countdownDom:X}),{nextLogicEvent:Ee,handleDynamicDataRelation:je}=q(z,U),{scaleChange:_e,labelChange:xe,vodFileList:Pe,writeGuage:qe,closeEvaluateCountdown:Fe,showEvaTipModal:Le}=_(z,U,Q,{nextLogicEvent:Ee,handleDynamicDataRelation:je,isPreviewScale:me,submitMethod:Se,isEvaluetaResSituation:ke,handleScoreJson:De,disableEdit:ye});(()=>{let{id:e}=oe;e&&(U.shareId=e)})();const Ne=e=>{try{ee(),we(e)}catch(e){console.log(e,"--error"),U.spinning=!1,U.hasFrontAddress=!1,$(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};t((()=>z.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Ne(e):e.guage_id&&Ne(e)}),{immediate:!0}),t((()=>z.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;U.form={},U.formArray=[];const o=JSON.parse(JSON.stringify(e));s((()=>{we(o)}))}),{immediate:!0});const Re=F.debounce(be,300),Te=()=>{Q("onCloseSetting")};return b({getScaleData:()=>({...U}),onSubmitForm:Ce,cancel:Te}),(e,o)=>(n(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(de)}])},[m(' <template v-if="state.spinning">\r\n <n-spin :show="state.spinning" description="加载中"></n-spin>\r\n </template> '),U.spinning||U.hasFrontAddress?m("v-if",!0):(n(),i(u,{key:0},[r(Z).noData?(n(),c(L,{key:0,noDataImg:r(Z).noDataImg,noDataTip:r(Z).noDataTip},null,8,["noDataImg","noDataTip"])):(n(),i(u,{key:1},[r(ue)?(n(),c(R,d({key:0},r(ge),{onWriteGuage:r(qe)}),null,16,["onWriteGuage"])):(n(),i(u,{key:1},[r(ce)?(n(),c(N,d({key:0,ref_key:"countdownDom",ref:X},r(he),{onCloseEvaluateCountdown:r(Fe)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(ne),"scale-container-hasfooter":r(de)}]),style:v(r(se))},[r(re)?(n(),c(r(A),{key:0,config:U.config,maxScore:U.maxScore},null,8,["config","maxScore"])):m("v-if",!0),f(r(M),{ref_key:"formRef",ref:Y,model:U.form,rules:U.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(n(!0),i(u,null,h(U.formArray,((e,o)=>(n(),i(u,{key:(e.id||e.seq)+o},[r(ie)(e)?(n(),c(r(O),{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(te)(e)}),innerHTML:r(le)(e)},null,10,J),r(te)(e)?(n(),i("span",V,"(必填)")):m("v-if",!0),r(pe)(e)?(n(),i("span",G,k(r(pe)(e)),1)):m("v-if",!0),r(ae)(e)?(n(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Le)(e)},[B,y(" 查看提示 ")],8,W)):m("v-if",!0)])),default:g((()=>[(n(),c(w(e.renderCom),d(r(fe)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(_e),onOnChange:o=>r(xe)(o,e),onVodFileList:r(Pe)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(ve)(e)?(n(),c(T,{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"])],6),r(de)?(n(),i("div",H,[m(" 分享的链接 隐藏取消按钮 "),"guage"!==z.sourceType?(n(),c(r(I),{key:0,onClick:Te},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),z.isLock?m("v-if",!0):(n(),c(r(I),{key:1,onClick:r(Re),disabled:U.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"]))])):m("v-if",!0)],64))],64))],64))],2))}});export{Q as default};
|
|
@@ -22,10 +22,27 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
22
22
|
type: BooleanConstructor;
|
|
23
23
|
default: boolean;
|
|
24
24
|
};
|
|
25
|
+
isEvaluetaResSituation: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
evaResultObj: {
|
|
30
|
+
type: ObjectConstructor;
|
|
31
|
+
default: () => {};
|
|
32
|
+
};
|
|
33
|
+
skipCover: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
25
37
|
}, {
|
|
26
38
|
state: {
|
|
27
39
|
source: string;
|
|
28
40
|
setAnswered: number;
|
|
41
|
+
unfold: boolean;
|
|
42
|
+
answeredScore: number;
|
|
43
|
+
totalScore: number;
|
|
44
|
+
answeredRes: string;
|
|
45
|
+
answeredColor: string;
|
|
29
46
|
};
|
|
30
47
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
31
48
|
formArray: {
|
|
@@ -51,9 +68,25 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
51
68
|
type: BooleanConstructor;
|
|
52
69
|
default: boolean;
|
|
53
70
|
};
|
|
71
|
+
isEvaluetaResSituation: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
evaResultObj: {
|
|
76
|
+
type: ObjectConstructor;
|
|
77
|
+
default: () => {};
|
|
78
|
+
};
|
|
79
|
+
skipCover: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
54
83
|
}>> & {
|
|
55
84
|
onCloseEvaluateCountdown?: ((...args: any[]) => any) | undefined;
|
|
56
85
|
}>>;
|
|
86
|
+
calcShowEvaluateCountdown: import("vue").ComputedRef<boolean>;
|
|
87
|
+
toggleIcon: import("vue").ComputedRef<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
88
|
+
hasEva: import("vue").ComputedRef<unknown>;
|
|
89
|
+
showResSituationDetail: import("vue").ComputedRef<boolean>;
|
|
57
90
|
emit: (event: "closeEvaluateCountdown", ...args: any[]) => void;
|
|
58
91
|
evaluateState: {
|
|
59
92
|
totalLen: number;
|
|
@@ -68,13 +101,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
68
101
|
getTotalLen: () => void;
|
|
69
102
|
countdown: (startTime: any) => void;
|
|
70
103
|
clearTimer: () => void;
|
|
104
|
+
handleTotalScore: () => number | undefined;
|
|
105
|
+
resetAnsweredRes: () => void;
|
|
106
|
+
answeredResCalc: (val: any) => void;
|
|
71
107
|
init: () => void;
|
|
72
108
|
checkType: (val: any) => string;
|
|
109
|
+
toggleFold: () => void;
|
|
73
110
|
diffAnswered: (form: any) => void;
|
|
74
111
|
getCountdownObj: () => {
|
|
75
112
|
setAnswered: number;
|
|
76
113
|
totalLen: number;
|
|
77
114
|
};
|
|
115
|
+
NIcon: any;
|
|
78
116
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "closeEvaluateCountdown"[], "closeEvaluateCountdown", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
79
117
|
formArray: {
|
|
80
118
|
type: ArrayConstructor;
|
|
@@ -99,14 +137,29 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
99
137
|
type: BooleanConstructor;
|
|
100
138
|
default: boolean;
|
|
101
139
|
};
|
|
140
|
+
isEvaluetaResSituation: {
|
|
141
|
+
type: BooleanConstructor;
|
|
142
|
+
default: boolean;
|
|
143
|
+
};
|
|
144
|
+
evaResultObj: {
|
|
145
|
+
type: ObjectConstructor;
|
|
146
|
+
default: () => {};
|
|
147
|
+
};
|
|
148
|
+
skipCover: {
|
|
149
|
+
type: BooleanConstructor;
|
|
150
|
+
default: boolean;
|
|
151
|
+
};
|
|
102
152
|
}>> & {
|
|
103
153
|
onCloseEvaluateCountdown?: ((...args: any[]) => any) | undefined;
|
|
104
154
|
}, {
|
|
155
|
+
skipCover: boolean;
|
|
156
|
+
isEvaluetaResSituation: boolean;
|
|
105
157
|
formArray: unknown[];
|
|
106
158
|
evaluateResultConfig: Record<string, any>;
|
|
107
159
|
evaluateResultSetting: Record<string, any>;
|
|
108
160
|
form: Record<string, any>;
|
|
109
161
|
currentTime: number;
|
|
110
162
|
showEvaluateCountdown: boolean;
|
|
163
|
+
evaResultObj: Record<string, any>;
|
|
111
164
|
}>;
|
|
112
165
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as t,
|
|
1
|
+
import{defineComponent as e,reactive as t,computed as a,onMounted as o,watch as n,openBlock as l,createElementBlock as s,normalizeClass as r,unref as u,createBlock as i,createCommentVNode as d,createElementVNode as c,toDisplayString as v,createTextVNode as f,Fragment as w,normalizeStyle as m}from"vue";import{NIcon as p}from"naive-ui";import{ChevronUpSharp as y,ChevronDownSharp as b}from"@vicons/ionicons5";import"xe-utils";import S from"moment";import C from"../../../../shared/utils/vexutilsExpand.js";import{useEvaluate as R}from"../hooks/use-evaluate.js";const g=c("i",{class:"scale-view-iconfont icon-scale-view-shijian"},null,-1),j={class:"answered-wrap"},E={class:"answered-num"},h={class:"answered-blod"},A={class:"answered-blue"},O={class:"answered-blod"},k={class:"answered-blue"},T={key:0};var x=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},isEvaluetaResSituation:{type:Boolean,default:!1},evaResultObj:{type:Object,default:()=>({})},skipCover:{type:Boolean,default:!1}},emits:["closeEvaluateCountdown"],setup(e,{expose:x,emit:L}){const _=e,B=t({source:"countdown",setAnswered:0,unfold:!0,answeredScore:0,totalScore:0,answeredRes:"",answeredColor:"#212121"}),U=a((()=>_.showEvaluateCountdown&&!_.skipCover)),V=a((()=>B.unfold?y:b)),D=a((()=>_.formArray.find((e=>e.type.includes("EVALUATE_"))))),N=a((()=>!!D.value&&(_.isEvaluetaResSituation&&B.unfold))),{evaluateState:W,evaluateStartTime:q,showCountdown:z,getTotalLen:F,countdown:G,clearTimer:H}=R(_,B,{emit:L}),I=e=>{if(!D.value||!_.isEvaluetaResSituation)return;let{evaluateResultColor:t,evaluateResult:a,totalScore:o}=e;if(B.answeredScore=o||0,!a)return B.answeredRes="",void(B.answeredColor="#212121");t&&"string"==typeof t&&t.startsWith("#")||(t="#212121"),B.answeredRes=a,B.answeredColor=t},J=()=>{D.value&&(()=>{let e=0,t=_.formArray.filter((e=>e.type.includes("EVALUATE_")));if(!t.length)return B.totalScore=e,e;t.forEach((t=>{var a;const o=t.scoreConfigs?+(null==(a=t.scoreConfigs)?void 0:a.maxScore):0;e=C.add(e,o)})),B.totalScore=e})(),F();let{evaluateTime:e}=_.evaluateResultSetting;if(!z.value||!e||!U.value)return;let t=(q.value?S(q.value):S()).add(e,"minutes");H(),G(t)},K=()=>{B.unfold=!B.unfold};o((()=>{J()})),n((()=>_.form),(e=>{(e||Object.keys(e).length)&&(e=>{var t;let a=null==(t=_.formArray)?void 0:t.filter((e=>!W.filterArr.includes(e.type)));if(!a||!a.length)return;let o={};a.forEach((t=>{const a=t.databaseTitle||t.title;o[a]=e[a]}));let n=0;for(let e in o){let t=o[e],a=(l=t,Object.prototype.toString.call(l));"[object Object]"==a?t&&Object.keys(t).length&&n++:"[object Array]"==a?t&&t.length&&n++:"[object Number]"==a?(t||0===t)&&n++:t&&n++}var l;B.setAnswered=n})(e)}),{immediate:!0,deep:!0}),n((()=>_.evaResultObj),(e=>{(e||Object.keys(e).length)&&I(e)}),{immediate:!0,deep:!0});return x({getCountdownObj:()=>({setAnswered:B.setAnswered,totalLen:W.totalLen})}),(e,t)=>(l(),s("div",{class:r(["c-evaluateCountdown",{"evaluateCountdown-hasTime":u(U),"evaluateCountdown-EvaluetaResSituation":_.isEvaluetaResSituation}])},[_.isEvaluetaResSituation?(l(),i(u(p),{key:0,class:"evaluate-toggle-icon",component:u(V),onClick:K},null,8,["component"])):d("v-if",!0),u(U)?(l(),s("div",{key:1,class:r(["countdown",{"countdown-red":u(W).countdownRed}])},[c("span",null,v(u(W).countdownStr),1),g],2)):d("v-if",!0),c("div",j,[c("div",E,[f(" 作答数量:"),c("span",h,v(B.setAnswered),1),f("/"),c("span",A,v(u(W).totalLen),1)]),u(N)?(l(),s(w,{key:0},[c("div",null,[f("作答分数:"),c("span",O,v(B.answeredScore),1),f("/"),c("span",k,v(B.totalScore),1)]),B.answeredRes?(l(),s("div",T,[f("作答结果:"),c("span",{style:m({color:B.answeredColor})},v(B.answeredRes),5)])):d("v-if",!0)],64)):d("v-if",!0)])],2))}});export{x as default};
|
|
@@ -76,7 +76,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
76
76
|
handleEvaluateParams: () => void;
|
|
77
77
|
writeGuage: () => void;
|
|
78
78
|
NButton: any;
|
|
79
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("closeEvaluateCountdown" | "writeGuage")[], "
|
|
79
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("closeEvaluateCountdown" | "writeGuage")[], "writeGuage" | "closeEvaluateCountdown", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
80
80
|
formArray: {
|
|
81
81
|
type: ArrayConstructor;
|
|
82
82
|
default: () => never[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as o,watch as t,createVNode as i,resolveComponent as l,isVNode as s}from"vue";import{NCheckboxGroup as c,NCheckbox as n,NInput as r,NIcon as u}from"naive-ui";import{api as a}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:c,NCheckbox:n,NInput:r,NIcon:u},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1},inputLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,n){var r,d;const x=o({curCheckboxValue:[],othersText:"",curOptions:[],optionsPreSuffixObj:{}}),{choiceColor:
|
|
1
|
+
import{defineComponent as e,reactive as o,watch as t,createVNode as i,resolveComponent as l,isVNode as s}from"vue";import{NCheckboxGroup as c,NCheckbox as n,NInput as r,NIcon as u}from"naive-ui";import{api as a}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:c,NCheckbox:n,NInput:r,NIcon:u},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1},inputLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,n){var r,d;const x=o({curCheckboxValue:[],othersText:"",curOptions:[],optionsPreSuffixObj:{}}),{choiceColor:b,showImgWrap:m,handleDefPreSuffix:v,choiceUseKey:k,isCheckboxItem:C,showPreSuffix:O,handleOptions:y,stopClick:g}=f(e,x),S=(null==(d=null==(r=e.item)?void 0:r.setting)?void 0:d.chooseStyleSetting)||1,V=o=>{const t={othersText:x.othersText,optionsPreSuffixObj:x.optionsPreSuffixObj};o&&!x.curCheckboxValue.includes("other")&&x.curCheckboxValue.push("other");const i=JSON.parse(JSON.stringify(x.curCheckboxValue));n.emit("scaleChange",i,e.item,{choiceObj:t,isSetObj:C.value})},j=o=>{var t,i;let l=o.options||[];const s=e.form[e.item.val_key],c=null==(t=null==o?void 0:o.setting)?void 0:t.defaultValue;"EVALUATE_CHECKBOX_BLOCK"===e.item.type&&(l=(null==(i=o.scoreConfigs)?void 0:i.scoreRules)||[]);let n=[];n=c&&h.isJSON(c)?JSON.parse(c):s,e.inputLock?((e,o,t)=>{var i;if(x.curOptions=y(t),!t.length||!o||!o.length)return;const l=[];let s,c=0;const n=o.length;for(;c<n;c++){if(s=o[c],"其他"===s){x.othersText=s,x.curCheckboxValue=["other"],!l.includes("other")&&l.push("other");continue}const e=t.findIndex((e=>e.value===s));if(e<0){x.othersText=s,!l.includes("other")&&l.push("other");continue}const n=null==(i=t[e])?void 0:i.key;l.indexOf(n)<0&&l.push(n)}x.curCheckboxValue=l,V()})(0,o.dbValue||n,l):((e,o,t)=>{var i;if(x.curOptions=y(t),!t.length||!o||!o.length)return;if("EVALUATE_CHECKBOX_BLOCK"===e.type)return x.curCheckboxValue=o,void V();const l=[],s=o.length;let c,n=0;const r=t.some((e=>e.importability||"other"===e.key));for(;n<s;n++){if(c=o[n],"其他"===c){x.othersText=c,x.curCheckboxValue=["other"],!l.includes("other")&&l.push("other");continue}const e=t.findIndex((e=>e.value===c));if(e>0){const o=null==(i=t[e])?void 0:i.key;!l.includes(o)&&l.push(o)}else t.map((e=>{const o=v(e,n,c,!0,r);o&&!l.includes(o)&&l.push(o)}))}x.curCheckboxValue=l,V()})(o,o.dbValue||n,l)};t((()=>e.item),(e=>{e&&Object.keys(e).length&&j(e)}),{immediate:!0});const L=h.debounce(V,300),T=h.debounce((o=>{const t={othersText:x.othersText,optionsPreSuffixObj:x.optionsPreSuffixObj};x.curCheckboxValue.includes(o.key)||x.curCheckboxValue.push(o.key);const i=JSON.parse(JSON.stringify(x.curCheckboxValue));n.emit("scaleChange",i,e.item,{choiceObj:t,isSetObj:C.value})}),300),w=e=>i("span",{class:"scale-choice-img-wrap"},[i("img",{class:"show-picture",src:e.imageUrl},null),i("div",{class:"scale-preview-wrap"},[i(u,{size:"24",color:"#fff",component:p,onClick:o=>((e,o)=>{e.preventDefault(),e.stopPropagation();const t=x.curOptions.map((e=>e.imageUrl)).filter(Boolean);if(!t.length)return;const i=t.findIndex((e=>e===o));a({images:t,options:{toolbar:!0,initialViewIndex:i<0?0:i}})})(o,e.imageUrl)},null)])]),N=o=>i("div",{class:"presuffix-wrap"},[o.prefix&&i("span",{class:"prefix-span",style:{color:b.value(o)}},[o.prefix]),i(l("n-input"),{value:x.optionsPreSuffixObj[o.key],"onUpdate:value":e=>x.optionsPreSuffixObj[o.key]=e,disabled:e.isLock||e.inputLock,style:{color:b.value(o)},placeholder:"请输入",bordered:!1,onInput:()=>T(o),onClick:g},null),o.suffix&&i("span",{class:"suffix-span",style:{color:b.value(o)}},[o.suffix])]),P=e=>i("span",{style:{color:b.value(e)},class:"other-span"},[e.label]),I=o=>i("div",{class:"choose-other",onClick:g},[i(l("n-input"),{value:x.othersText,"onUpdate:value":[e=>x.othersText=e,()=>L(!0)],disabled:e.isLock||e.inputLock,style:{color:b.value(o)},placeholder:"请输入",bordered:!1},null)]),U=e=>C.value&&O.value(e),B=k.value;return()=>{let o;return i(c,{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=>i("div",{class:"c-choice-radio-div"},[i(l("n-checkbox"),{key:e.value,value:e[B]},{default:()=>[m.value(e)&&w(e),U(e)&&N(e),!U(e)&&P(e),e.importability&&I(e)]})]))))||"[object Object]"===Object.prototype.toString.call(t)&&!s(t)?o:{default:()=>[o]});var t}}});export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,reactive as a,createVNode as r,resolveComponent as u,createTextVNode as l}from"vue";import{NTimePicker as n,NDatePicker as i}from"naive-ui";import"xe-utils";import
|
|
1
|
+
import{defineComponent as e,computed as t,reactive as a,createVNode as r,resolveComponent as u,createTextVNode as l}from"vue";import{NTimePicker as n,NDatePicker as i}from"naive-ui";import"xe-utils";import o from"moment";import s from"../../../../../shared/utils/vexutilsExpand.js";import{formatMap as d}from"../../utils/judge-types.js";var m=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,m,c,p,f;const v=null==(i=e.item)?void 0:i.type,g=null==(c=null==(m=e.item)?void 0:m.setting)?void 0:c.startToStop,b="DATE"===v?"date":null==(f=null==(p=e.item)?void 0:p.setting)?void 0:f.dateType,D=t((()=>d[b])),V=t((()=>"datehour"===b?"datetime":b)),N=t((()=>"datehour"===b?"HH:mm":"HH:mm:ss")),k=a({rangeValue:[null,null],dateValue:null}),w=t((()=>"datetime"==b||"datehour"==b?"datetimerange":"daterange")),y=e=>["time","hour"].includes(e),H=e=>{const t=k.rangeValue[1];if(!t)return!1;return e>Number(new Date(t).getHours())},h=(e,t)=>{if(null===t)return!1;const a=k.rangeValue[1];if(!a)return!1;const r=Number(new Date(a).getHours()),u=Number(new Date(a).getMinutes());return!(t<r)&&e>u},S=(e,t,a)=>{if(null===a||null===t)return!1;const r=k.rangeValue[1];if(!r)return!1;const u=Number(new Date(r).getHours()),l=Number(new Date(r).getMinutes()),n=Number(new Date(r).getSeconds());return!(a<u)&&(!(t<l)&&e>=n)},M=e=>{const t=k.rangeValue[0];if(!t)return!1;return e<Number(new Date(t).getHours())},O=(e,t)=>{if(null===t)return!1;const a=k.rangeValue[0];if(!a)return!1;const r=Number(new Date(a).getHours()),u=Number(new Date(a).getMinutes());return!(t>r)&&e<u},U=(e,t,a)=>{if(null===a||null===t)return!1;const r=k.rangeValue[0];if(!r)return!1;const u=Number(new Date(r).getHours()),l=Number(new Date(r).getMinutes()),n=Number(new Date(r).getSeconds());return!(a>u)&&(!(t>l)&&e<=n)},L=(t,a,r)=>{const u="start"===r?1:0;let l=k.rangeValue[u];l&&(l=o(l).format(D.value)),"start"!==r?n.emit("scaleChange",[l||"",a],e.item):n.emit("scaleChange",[a,l||""],e.item)},T=(t,a)=>{n.emit("scaleChange",a,e.item)};return(e=>{if(s.isJSON(e)&&(e=JSON.parse(e)),!e||s.isEmpty(e))return;const t=JSON.parse(JSON.stringify(e));if("TIME"===v||y(b)){if(1!=g)return void(k.dateValue=e);if(!Array.isArray(t)||!t.length)return;const a=t[0]?o(t[0],D.value).valueOf():"",r=t[1]?o(t[1],D.value).valueOf():"",u=a&&s.isValidDate(new Date(a))?a:null,l=r&&s.isValidDate(new Date(r))?r:null;k.rangeValue=[u,l]}else k.dateValue=e})(e.form[e.item.val_key]),()=>"TIME"===v||y(b)?1==g?r("div",{class:"c-time-range"},[r(u("n-time-picker"),{value:k.rangeValue[0],"onUpdate:value":[e=>k.rangeValue[0]=e,(e,t)=>L(0,t,"start")],clearable:!0,disabled:e.isLock,format:D.value,isHourDisabled:H,isMinuteDisabled:h,isSecondDisabled:S},null),l(" - "),r(u("n-time-picker"),{value:k.rangeValue[1],"onUpdate:value":[e=>k.rangeValue[1]=e,(e,t)=>L(0,t,"end")],clearable:!0,disabled:e.isLock,format:D.value,isHourDisabled:M,isMinuteDisabled:O,isSecondDisabled:U},null)]):r(u("n-time-picker"),{"formatted-value":k.dateValue,"onUpdate:formatted-value":e=>k.dateValue=e,clearable:!0,disabled:e.isLock,"onUpdate:value":T,format:D.value},null):["date","datetime","datehour"].includes(b)&&1==g?r(u("n-date-picker"),{"formatted-value":k.dateValue,"onUpdate:formatted-value":e=>k.dateValue=e,type:w.value,clearable:!0,disabled:e.isLock,format:D.value,"time-picker-props":{format:N.value},"onUpdate:value":T},null):r(u("n-date-picker"),{"formatted-value":k.dateValue,"onUpdate:formatted-value":e=>k.dateValue=e,type:V.value,clearable:!0,disabled:e.isLock,format:D.value,"time-picker-props":{format:N.value},"onUpdate:value":T},null)}});export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as o,watch as t,createVNode as i,resolveComponent as l,isVNode as
|
|
1
|
+
import{defineComponent as e,reactive as o,watch as t,createVNode as i,resolveComponent as l,isVNode as s}from"vue";import{NRadioGroup as r,NRadio as a,NInput as u,NIcon as n}from"naive-ui";import{api as c}from"v-viewer";import{SearchOutline as p}from"@vicons/ionicons5";import f from"../composables/choose-common.js";import"xe-utils";import"moment";import v from"../../../../../shared/utils/vexutilsExpand.js";var d=e({name:"RRadio",components:{NRadioGroup:r,NRadio:a,NInput:u,NIcon:n},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1},inputLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,a){var u,d;const m=o({curvalue:"",othersText:"",curOptions:[],optionsPreSuffixObj:{}}),{choiceColor:h,showImgWrap:x,handleDefPreSuffix:b,choiceUseKey:O,isRadioItem:j,showPreSuffix:y,handleOptions:g,stopClick:k}=f(e,m),S=(null==(d=null==(u=e.item)?void 0:u.setting)?void 0:d.chooseStyleSetting)||1,P=o=>{var t;let i=o.options||[];const l=e.form[e.item.val_key];"EVALUATE_RADIO_BLOCK"===e.item.type&&(i=(null==(t=o.scoreConfigs)?void 0:t.scoreRules)||[]);((e,o,t)=>{if(m.curOptions=g(t),!t.length||!o)return;if("EVALUATE_RADIO_BLOCK"===e.type)return m.curvalue=o,void C();const i=t.find((e=>e.value===o));if(i)return m.curvalue=i.key,void C();t.find(((e,t)=>{const i=b(e,t,o);return i&&(m.curvalue=i),!!i||!1}))||(m.othersText=o,m.curvalue="other"),C()})(o,o.dbValue||o.setting.defaultValue||l,i)},C=()=>{const o={othersText:m.othersText,optionsPreSuffixObj:m.optionsPreSuffixObj};a.emit("scaleChange",m.curvalue,e.item,{choiceObj:o,isSetObj:j.value})};t((()=>e.item),(e=>{e&&Object.keys(e).length&&P(e)}),{immediate:!0});const L=v.debounce(((o,t)=>{m.optionsPreSuffixObj[t.key]=o,m.curvalue=t.key;const i={othersText:m.othersText,optionsPreSuffixObj:m.optionsPreSuffixObj};console.log(m.optionsPreSuffixObj),a.emit("scaleChange",m.curvalue,e.item,{choiceObj:i,isSetObj:j.value})}),300),T=v.debounce((()=>{const o={othersText:m.othersText,optionsPreSuffixObj:m.optionsPreSuffixObj};m.curvalue="other",a.emit("scaleChange","other",e.item,{choiceObj:o,isSetObj:j.value})}),300),w=e=>i("span",{class:"scale-choice-img-wrap"},[i("img",{class:"show-picture",src:e.imageUrl},null),i("div",{class:"scale-preview-wrap"},[i(n,{size:"24",color:"#fff",component:p,onClick:o=>((e,o)=>{e.preventDefault(),e.stopPropagation();const t=m.curOptions.map((e=>e.imageUrl)).filter(Boolean);if(!t.length)return;const i=t.findIndex((e=>e===o));c({images:t,options:{toolbar:!0,initialViewIndex:i<0?0:i}})})(o,e.imageUrl)},null)])]),U=o=>i("div",{class:"presuffix-wrap"},[o.prefix&&i("span",{class:"prefix-span",style:{color:h.value(o)}},[o.prefix]),i(l("n-input"),{value:m.optionsPreSuffixObj[o.key],"onUpdate:value":e=>m.optionsPreSuffixObj[o.key]=e,disabled:e.isLock||e.inputLock,style:{color:h.value(o)},placeholder:"请输入",bordered:!1,"on-update:value":e=>L(e,o),onClick:k},null),o.suffix&&i("span",{class:"suffix-span",style:{color:h.value(o)}},[o.suffix])]),I=e=>i("span",{style:{color:h.value(e)},class:"other-span"},[e.label]),R=o=>i("div",{class:"choose-other",onClick:k},[i(l("n-input"),{value:m.othersText,"onUpdate:value":[e=>m.othersText=e,T],disabled:e.isLock||e.inputLock,style:{color:h.value(o)},placeholder:"请输入",bordered:!1},null)]),A=e=>j.value&&y.value(e),B=O.value;return()=>{let o;return i(r,{value:m.curvalue,"onUpdate:value":[e=>m.curvalue=e,C],class:["c-choice-wrap","choice-wrap-"+S],disabled:e.isLock},"function"==typeof(t=o=m.curOptions.map((o=>i("div",{class:"c-choice-radio-div"},[i(l("n-radio"),{key:o.value,value:o[B],onClick:t=>((o,t)=>{if(e.isLock)return;o.preventDefault(),o.stopPropagation();const i=t[B];m.curvalue=m.curvalue===i?"":i,C()})(t,o)},{default:()=>[x.value(o)&&w(o),A(o)&&U(o),!A(o)&&I(o),o.importability&&R(o)]})]))))||"[object Object]"===Object.prototype.toString.call(t)&&!s(t)?o:{default:()=>[o]});var t}}});export{d as default};
|
|
@@ -30,6 +30,7 @@ export declare const ScaleViewComputed: (props: any, state: any, config: any) =>
|
|
|
30
30
|
evaluateResultSetting: any;
|
|
31
31
|
isFinished: any;
|
|
32
32
|
maxScore: any;
|
|
33
|
+
skipCover: any;
|
|
33
34
|
}>;
|
|
34
35
|
evaluateCountdownProps: import("vue").ComputedRef<{
|
|
35
36
|
formArray: any;
|
|
@@ -39,7 +40,11 @@ export declare const ScaleViewComputed: (props: any, state: any, config: any) =>
|
|
|
39
40
|
isFinished: any;
|
|
40
41
|
currentTime: any;
|
|
41
42
|
showEvaluateCountdown: any;
|
|
43
|
+
isEvaluetaResSituation: any;
|
|
44
|
+
evaResultObj: any;
|
|
42
45
|
}>;
|
|
43
46
|
skipCover: import("vue").ComputedRef<any>;
|
|
44
47
|
scaleEdit: import("vue").ComputedRef<boolean>;
|
|
48
|
+
isEvaluetaResSituation: import("vue").ComputedRef<any>;
|
|
49
|
+
disableEdit: import("vue").ComputedRef<any>;
|
|
45
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{computed as e}from"vue";import{isEvaluation as t}from"../utils/judge-types.js";import"xe-utils";import a from"moment";import
|
|
1
|
+
import{computed as e}from"vue";import{isEvaluation as t}from"../utils/judge-types.js";import"xe-utils";import a from"moment";import i from"../../../../shared/utils/vexutilsExpand.js";import{componentMapStr as n}from"./use-component.js";const o=(o,l,s)=>{const{query:r}=s,u=(new Date).getTime(),v=e((()=>1==(null==r?void 0:r.formBoldOpen))),c=e((()=>e=>{var a;return!!t(e.type)&&(1==(null==r?void 0:r.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!!i.isValidDate(e)&&e})),g=e((()=>{const{evaluetaResSituation:e}=d.value||{};return e})),h=e((()=>{const{evaluateZeroTip:e}=d.value||{};return e})),C=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})),S=e((()=>{const e=f.value;if(!e)return!1;const t=a(e).valueOf();return u<t})),E=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})),w=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})`}})),O=e((()=>!("customList"==o.type&&!o.noBtn)&&!(!o.noBtn&&!o.hideBtn))),y=e((()=>e=>Q(e))),L=e((()=>e=>{var a;const{type:i}=e||{},n=!1===(null==(a=l.config)?void 0:a.autoQuestionNumber)?e.showTitle:`${e.softcode}、${e.showTitle}`;if(!t(i))return n;const o=Z(e);return o||h.value?`${n} <span style="color:#2d7aff;" class="score-i">${o}</span>`:n})),b=e((()=>{const{config:e}=l;return!(!e||!Object.keys(e).length)&&"totalScore"in e})),R=e((()=>{var e;return(null==(e=o.ids)?void 0:e.guage_id)&&o.noBtn})),A=e((()=>{const e=o.params||{};if(!("skipCover"in e))return!1;return e.skipCover&&!S.value&&!C.value})),k=e((()=>R.value||l.isFinished||o.noBtn||o.hideBtn)),B=e((()=>l.showEvaluatePage&&l.showEvaluateSettingWrap&&!k.value&&!A.value)),T=e((()=>!b.value&&!B.value&&l.showEvaluateCountdownWrap&&!k.value)),_=e((()=>{const{evaluateResultSetting:e={}}=l.config;return(Object.values(e).filter((e=>{if(e)return!0}))||[]).length})),U=e((()=>l.paramsEvaluate&&Object.keys(l.paramsEvaluate).length)),j=e((()=>{const e=window.location.search||window.location.hash;if(!e)return;const t=["evaname","evadesc","evast","evadur","evaan","evasit","evaztip"].find((t=>e.includes(t)));return l.paramsEvaluate||t})),F=e((()=>{var e;return 1==r.isEdit||1==(null==(e=o.params)?void 0:e.isEdit)})),P=e((()=>1==l.isFinished&&F.value)),D=e((()=>_.value||j.value?!o.noBtn&&!o.hideBtn&&(!l.isFinished||F.value):!o.noBtn&&!o.hideBtn)),x=e((()=>_.value||j.value?!!o.hideBtn||!!o.isLock||l.isFinished&&!F.value:!!o.hideBtn||!!o.isLock)),V=e((()=>e=>({EVALUATE_RADIO_BLOCK:"单选",EVALUATE_CHECKBOX_BLOCK:"多选"}[e.type]))),N=e((()=>e=>{var t;if(P.value)return!1;const{evaluateAnswer:n,checkAnswerMode:o,evaluateStartTime:s,evaluateTime:r}=(null==(t=l.config)?void 0:t.evaluateResultSetting)||{},u=(null==e?void 0:e.scoreConfigs)||0,v=n&&l.isFinished&&["EVALUATE_RADIO_BLOCK","EVALUATE_CHECKBOX_BLOCK","EVALUATE_SELECT","EVALUATE_INPUT"].includes(e.type)&&u;if(!s||!r||o&&1==o)return v;if(!i.isValidDate(new Date(s)))return v;const c=a(s).add(r,"minutes").diff(a(),"seconds",!0);return v&&c<=0})),$=e((()=>"customList"===o.type?"保存":"提交")),K=e((()=>({getSelectOptions:o.getSelectOptions,getSearchOptions:o.getSearchOptions,openType:o.openType}))),I=e((()=>({getCascadeOptions:o.getCascadeOptions}))),M=e((()=>({uploadPictureUrl:o.uploadPictureUrl,uploadFileUrl:o.uploadFileUrl}))),q=e((()=>({ak:o.ak}))),J=e((()=>({source:"guage",getChunkUploadConfig:o.getChunkUploadConfig}))),z=e((()=>({selectedList:l.labelSelectedList,getLabelList:o.getLabelList,deleteLabel:o.deleteLabel,saveLabelItem:o.saveLabelItem,sourceType:o.sourceType}))),X={RSelectCom:K.value,RCascaderCom:I.value,RUploadCom:M.value,RMapCom:q.value,RVodChunkUploadCom:J.value,CSelectLabelCom:z.value},H=e((()=>(e,t)=>{var a;const i=n[e.type],o=X[i]||{},s={form:l.form,item:e,index:t,isLock:x.value,...o};return"RVodChunkUploadCom"===i&&Object.assign(s,{formData:e,limitNum:(null==(a=e.setting)?void 0:a.limitPic)||1,defFileList:l.form[e.val_key]}),"RMapCom"===i&&Object.assign(s,{locationProp:l.form[e.val_key]}),"CSelectLabelCom"===i&&(delete s.form,delete s.index),s})),Q=(e,t)=>{if(e.hide)return!1;const{form:a={},formArray:n=[]}=l;let o={};if(t){let t=e.setting;if(e.setting&&i.isJSON(e.setting)&&(t=JSON.parse(e.setting)),o=i.isString(t.callbackCondition)?JSON.parse(t.callbackCondition):t.callbackCondition,!o||!o.condition||!o.condition.length)return!0}else o=i.isString(e.relationLogic)?JSON.parse(e.relationLogic):e.relationLogic;if(!o||!Object.keys(o).length)return!0;const{relation_logic_is:s,condition:r,relation_logic:u}=o;if(s){const t=r.map((e=>{const t=n.filter((t=>t.seq==e.subject_seq))[0],o=W(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},W=e=>e.databaseTitle||e.title,Z=e=>{const{maxScore:t=0}=e.scoreConfigs||{};if(t||h.value)return`(${t}分)`},G=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,skipCover:A.value}})),Y=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,isEvaluetaResSituation:g.value,evaResultObj:l.evaResultObj}}));return{showEvatip:c,isFormBoldOpen:E,scaleStyle:w,handlePageClass:O,isShowItem:y,handleShowQuestionNumber:L,hasScore:b,isPreviewScale:R,showEvaluateEntry:B,showEvaluateCoundownPage:T,hasEvaluateResultSetting:_,hasparamsEvaluate:U,hasDefault:j,showSaveBtn:D,componentDisable:x,showEvaluateLabel:V,showAnswerParse:N,tipMsg:$,propsConfig:H,showEvent:Q,formKey:W,evaluatePageProps:G,evaluateCountdownProps:Y,skipCover:A,scaleEdit:P,isEvaluetaResSituation:g,disableEdit:k}};export{o as ScaleViewComputed};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{handleQueryParams as e,getQueryVariable as t}from"../utils/judge-types.js";import
|
|
1
|
+
import{handleQueryParams as e,getQueryVariable as t,formatMap as a}from"../utils/judge-types.js";import i from"./use-noData.js";import"xe-utils";import n from"moment";import s from"../../../../shared/utils/vexutilsExpand.js";import{componentMap as l}from"./use-component.js";import{useEvent as r}from"./use-event.js";import{ScaleViewComputed as o}from"./scaleview-computed.js";import{ScaleViewValidate as u}from"./scaleview-validate.js";import{useDialog as v}from"naive-ui";const c=(c,f,d,p)=>{const m=n(),g=v(),{setNoData:S}=i(),{hasEvaluateResultSetting:E,hasparamsEvaluate:y,hasDefault:C,formKey:O}=o(c,f,p),{formatRules:A}=u(c,f,p),{nextLogicEvent:R}=r(c,f),h=e=>{const t=null==e?void 0:e.evaluateStartTime;t&&!s.isValidDate(new Date(t))&&s.isValidDate(new Date(Number(t)))&&(e.evaluateStartTime=Number(t))},L=()=>{var t;if(!E.value)return!!C.value&&("evaluateResultSetting"in f.config||(f.config.evaluateResultSetting={}),(t=>{let a=e();if(y.value&&(a=f.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){const e="true"===a.evaan||1==a.evaan;t.evaluateAnswer=e}if(a.evasit&&(t.evaluetaResSituation=!!a.evasit),a.evaztip){const e=1==a.evaan;t.evaluateZeroTip=e}h(t)})(f.config.evaluateResultSetting),f.showEvaluatePage=!0,void(f.showEvaluateCountdownWrap=!0));const{evaluateResultSetting:a={}}=f.config;if(!a||!Object.keys(a).length)return;f.showEvaluateCountdownWrap=!0;const{evaluateStartTime:i}=a,{evaluateName:n}=(null==(t=f.originConfig)?void 0:t.evaluateResultSetting)||{};if(i)return!(!s.isValidDate(new Date(i))&&!n)&&void(f.showEvaluatePage=!0);f.showEvaluatePage=!0},T=(e,t)=>{const a=e.find((e=>t===e.value));return a?a.key:t},N=(e,t)=>{if(["RADIO_BLOCK","CHECKBOX_BLOCK"].includes(t)&&e&&(e&&s.isJSON(e)&&(e=JSON.parse(e)),e.length))return!0},b=t=>{var a,i;if(!t||!t.length)return;const n=e();if((null==c?void 0:c.noBtn)||(null==n?void 0:n.noBtn))return;const l=t.find((e=>"FRONT_ADDRESS"===e.type));if(!l||!Object.keys(l).length)return;let r;if(l.setting&&s.isJSON(l.setting)&&(r=JSON.parse(l.setting)),!r||!Object.keys(r).length)return;if(1==(null==n?void 0:n.redirect)||1==(null==(a=c.params)?void 0:a.redirect)||3==n.isEdit||3==(null==(i=c.params)?void 0:i.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)}`}},D=e=>{const t=["evaname","evadesc","evast","evadur","evaan","evasit","evaztip"],a={};for(const i in e){const n=e[i];t.includes(i)&&n&&(a[i]=n)}return a},w=t=>{if(!t||!Object.keys(t).length)return;let a=e()||{};y.value&&(a=f.paramsEvaluate);const i={evaluateName:"evaname",evaluateExplain:"evadesc",evaluateStartTime:"evast",evaluateTime:"evadur",evaluateAnswer:"evaan",evaluetaResSituation:"evasit",evaluateZeroTip:"evaztip"},n=["evaluateAnswer","evaluetaResSituation","evaluateZeroTip"];for(const e in t){const s=t[e];if(s&&"evaluateAnswer"!=e&&"string"==typeof s&&s.includes("${")&&"string"==typeof s){const i=s.replace(/\$\{([^}]+)\}/g,((e,t)=>{let i;return t.startsWith("form.")&&(i=a[t.split(".")[1]]),i||""}));t[e]=i}else{let s=a[i[e]];n.includes(e)&&(s="true"===s||1==s),a[i[e]]&&(t[e]=s)}}if(C.value){const e={evaname:"evaluateName",evadesc:"evaluateExplain",evast:"evaluateStartTime",evadur:"evaluateTime",evaan:"evaluateAnswer",evasit:"evaluetaResSituation",evaztip:"evaluateZeroTip"},i=["evaan","evasit","evaztip"];["evaname","evadesc","evast","evadur","evaan","evasit","evaztip"].forEach((n=>{const s=e[n];if(!t[s]){let e=a[n];i.includes(n)&&(e="true"===e||1==e),a[n]&&(t[s]=e)}}))}h(t)},k=e=>{let t=1;return e.map((a=>{const i=O(a);(i||"").replace(/\n/g,""),a.showTitle=a.title,a.val_key=i,a.renderCom=l[a.type],a.isShow=!0,Object.keys(a).forEach((e=>{s.isJSON(a[e])&&"LOCATION"!=a.type&&(a[e]=JSON.parse(a[e]))}));var n;return["LINEBAR","TITLE","PROMPT","IMGCARD","RICH_TEXT"].indexOf(a.type)<0&&!a.hide&&(a.softcode=t++),("SELECT"==(n=a.type)||"RADIO_BLOCK"==n||"CHECKBOX_BLOCK"==n||"SEARCH_CASCADE"==n||"EVALUATE_RADIO_BLOCK"==n||"EVALUATE_CHECKBOX_BLOCK"==n||"EVALUATE_SELECT"==n)&&(((e,t)=>{N(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?R(a.dbValue,a,e):a.setting.defaultValue&&R(a.setting.defaultValue,a,e))),a})).map((t=>(((e,t)=>{const a=s.isString(t.relationLogic)?JSON.parse(t.relationLogic):t.relationLogic,{condition:i}=a||{};i&&i.length&&(i.forEach((t=>{const a=e.find((e=>e.seq==t.subject_seq));if(!a)return;if(!N(a.options,a.type))return;let i=t.value;Array.isArray(i)?(i=i.map((e=>T(a.options,e))),t.value=i):t.value=T(a.options,i)})),t.relationLogic=a)})(e,t),(e=>{const{nextLogic:t,options:a,type:i}=e||{};if(!t||!N(a,i))return;const{condition:n}=t||{};n&&n.length&&n.forEach((e=>{let t=e.value;Array.isArray(t)?(t=t.map((e=>T(a,e))),e.value=t):e.value=T(a,t)}))})(t),"CHECKBOX_BLOCK"===t.type&&t.dbValue&&!Array.isArray(t.dbValue)&&"customList"===c.type&&(t.dbValue=t.dbValue.split(",").filter((e=>!!e))),t)))},_=e=>{const i={};let n;return e.forEach((e=>{var l,r,o,u;const v=e.val_key,{type:d}=e;let p;if(e.dbValue)p=e.dbValue;else{const{defValType:i,dateType:n}=e.setting||{};if(3==i){const a=null==(r=null==(l=e.setting)?void 0:l.outDefaultValue)?void 0:r.urlKey;if(a){const i=a.split(",");if(i.length>1){const e=i.map((e=>{const a=t(e,f,c.params);return a?decodeURIComponent(a):null})).filter(Boolean);e.length&&(p=e)}else{let a=t(i[0],f,c.params);a&&(a=decodeURIComponent(a),p="CHECKBOX_BLOCK"==e.type?a.split():a)}}}if("DATETIME"===d&&4==i){const e=(null==(o=a[n])?void 0:o.replace("-dd","-DD"))||"yyyy-MM-DD HH:mm:ss";p=m.format(e)}}switch(d){case"LOCATION":i[v]=p||"";break;case"SEARCH_CASCADE":case"UPFILE":case"UPPICTURE":i[v]=p||[];break;case"ADDRESS":i[v]=p||"",f.defaultAddress=p||{};break;case"LABEL":i[v]=p||{},s.isObject(p)?f.labelSelectedList=(null==p?void 0:p.labels)||[]:Array.isArray(p)?f.labelSelectedList=p:f.labelSelectedList=[];break;case"TITLE":i[v]=e.title;break;case"IMGCARD":i[v]=(null==(u=e.setting)?void 0:u.imgUrl)||"";break;case"CHECKBOX_BLOCK":p&&!Array.isArray(p)&&"customList"===c.type?i[v]=p.split(",").filter((e=>!!e)):(n=p||e.setting.defaultValue,s.isJSON(n)&&(n=JSON.parse(n)),i[v]=n);break;default:n=p||e.setting.defaultValue,s.isJSON(n)&&(n=JSON.parse(n)),i[v]=n}})),i};return{initForm:e=>{var t;let{list:a=[],map:i={},isFinished:n=!1}=e;const l=b(a);if(l)return void(window.location.href=l);if(i.maxScore&&(f.maxScore=i.maxScore),f.isFinished=n,e.isNotFilled)return f.spinning=!1,f.hasFrontAddress=!1,void S(!0,"未查询到量表填写记录");if(e.isLackCustomer&&g.info({title:"已设置填写次数限制",content:"请在包含用户信息的环境中打开此量表",maskClosable:!1,onPositiveClick(){d("onCloseSetting")}}),f.config=i,"evaluateResultConfig"in i&&s.isJSON(i.evaluateResultConfig)&&(f.config.evaluateResultConfig=JSON.parse(i.evaluateResultConfig)),"evaluateResultSetting"in i&&s.isJSON(i.evaluateResultSetting)&&(f.config.evaluateResultSetting=JSON.parse(i.evaluateResultSetting),(null==(t=f.config)?void 0:t.randomId)&&f.config.evaluateResultSetting&&(f.config.evaluateResultSetting.evaluateName=f.config.name,f.config.evaluateResultSetting.evaluateExplain=f.config.remark)),f.originConfig=JSON.parse(JSON.stringify(f.config)),c.params&&Object.keys(c.params).length){const e=D(c.params);e&&Object.keys(e).length&&(f.paramsEvaluate=e)}w(f.config.evaluateResultSetting),L(),f.defaultFormArray=JSON.parse(JSON.stringify(a));const r=f.filterArr;a=a.filter((e=>!r.includes(e.type))),f.formArray=k(a||[]),f.form=_(f.formArray),f.rules=A(f.formArray),f.fontSize=e.fontSize,f.spinning=!1,f.hasFrontAddress=!1}}};export{c as ScaleViewInit};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const ScaleViewMethods: (props: any, state: any, emit: any, config: any) => {
|
|
2
|
+
scaleChange: (val: any, item: any, config?: any) => void;
|
|
3
|
+
labelChange: (labelList: any, item: any) => void;
|
|
4
|
+
vodFileList: (list: any, item: any) => void;
|
|
5
|
+
writeGuage: (showCountdown: boolean) => void;
|
|
6
|
+
closeEvaluateCountdown: () => void;
|
|
7
|
+
showEvaTipModal: (item: any) => Promise<void>;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e}from"vue";import{useDialog as a,useMessage as t}from"naive-ui";const i=(i,o,n,s)=>{const l=a(),r=t(),{nextLogicEvent:c,handleDynamicDataRelation:u,isPreviewScale:v,submitMethod:E,isEvaluetaResSituation:p,handleScoreJson:d,disableEdit:f}=s,C=a=>{l.warning({title:"提示",content:()=>e("div",{class:"evatip-container"},[e("span","答案解析:"),e("p",a)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})};return{scaleChange:(e,a,t)=>{const{choiceObj:n,isSetObj:s}=t||{};switch(a.type.includes("SELECT")||(o.form[a.val_key]=e),a.type){case"SELECT":case"EVALUATE_SELECT":{const{value:t,list:i=[]}=e;o.form[a.val_key]=t,c(e,a,o.formArray),u(i,a,o.formArray)}break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":s&&(o.choiceComObj[a.val_key]=n),c(e,a,o.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":c(e,a,o.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":o.submitForm[a.val_key]=e}!f.value&&p.value&&a.type.includes("EVALUATE_")&&(async()=>{var e;const a=null==(e=i.scaleApiConfig)?void 0:e.getEvaluateResult;if(!a||"function"!=typeof a)return void r.error("getEvaluateResult Is not a function");const{guageId:t}=o.config;if(!t)return;const n=d(),s={gaugeId:t,scoreJson:JSON.stringify(n)},l=await a(s);if(!l)return;const c={...l};delete c.itemScoreMap,o.evaResultObj=c})()},labelChange:(e,a)=>{o.form[a.val_key]=(e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const a=e||[],t=[],i=[];return a.forEach((e=>{i.push(e),t.push(e.labelName)})),o.labelSelectedList=a,{labelStr:t.join(","),labels:i}})(e)},vodFileList:(e,a)=>{o.form[a.val_key]=e},writeGuage:e=>{o.showEvaluateSettingWrap=!1,o.showEvaluateCountdown=!!e,n("startWriteScale")},closeEvaluateCountdown:()=>{o.showEvaluateCountdown=!1,v.value||(o.banSubmit=!0,E(),l.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>({})}))},showEvaTipModal:async e=>{var a;if(o.evatipMap[e.id])return void C(o.evatipMap[e.id]);const t="getSubjectAnswer",n=(null==(a=i.scaleApiConfig)?void 0:a[t])||null;if(!n||"function"!=typeof n)return void r.error(`${t} Is not a function`);const s=await n(e.id);s&&(o.evatipMap[e.id]||(o.evatipMap[e.id]=s,C(s)))}}};export{i as ScaleViewMethods};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export declare const ScaleViewProps: {
|
|
2
|
+
guageData: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
default: () => {};
|
|
5
|
+
};
|
|
6
|
+
styleSetting: {
|
|
7
|
+
type: ObjectConstructor;
|
|
8
|
+
default: () => {};
|
|
9
|
+
};
|
|
10
|
+
ids: {
|
|
11
|
+
type: ObjectConstructor;
|
|
12
|
+
default: () => {
|
|
13
|
+
guage_id: string;
|
|
14
|
+
db_id: undefined;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
params: {
|
|
18
|
+
default: () => {};
|
|
19
|
+
type: ObjectConstructor;
|
|
20
|
+
};
|
|
21
|
+
noBtn: {
|
|
22
|
+
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
hideBtn: {
|
|
26
|
+
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
isLock: {
|
|
30
|
+
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
type: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
openType: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
scaleApiConfig: {
|
|
42
|
+
type: ObjectConstructor;
|
|
43
|
+
default: () => {};
|
|
44
|
+
};
|
|
45
|
+
getSelectOptions: {
|
|
46
|
+
type: FunctionConstructor;
|
|
47
|
+
default: () => Promise<never[]>;
|
|
48
|
+
};
|
|
49
|
+
getSearchOptions: {
|
|
50
|
+
type: FunctionConstructor;
|
|
51
|
+
default: () => Promise<never[]>;
|
|
52
|
+
};
|
|
53
|
+
getCascadeOptions: {
|
|
54
|
+
type: FunctionConstructor;
|
|
55
|
+
default: () => Promise<never[]>;
|
|
56
|
+
};
|
|
57
|
+
getLabelList: {
|
|
58
|
+
type: FunctionConstructor;
|
|
59
|
+
default: () => Promise<never[]>;
|
|
60
|
+
};
|
|
61
|
+
deleteLabel: {
|
|
62
|
+
type: FunctionConstructor;
|
|
63
|
+
default: () => Promise<{
|
|
64
|
+
status: boolean;
|
|
65
|
+
}>;
|
|
66
|
+
};
|
|
67
|
+
saveLabelItem: {
|
|
68
|
+
type: FunctionConstructor;
|
|
69
|
+
default: () => Promise<{
|
|
70
|
+
status: boolean;
|
|
71
|
+
}>;
|
|
72
|
+
};
|
|
73
|
+
uploadPictureUrl: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
default: string;
|
|
76
|
+
};
|
|
77
|
+
uploadFileUrl: {
|
|
78
|
+
type: StringConstructor;
|
|
79
|
+
default: string;
|
|
80
|
+
};
|
|
81
|
+
ak: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
default: string;
|
|
84
|
+
};
|
|
85
|
+
sourceType: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
getChunkUploadConfig: {
|
|
90
|
+
type: FunctionConstructor;
|
|
91
|
+
default: () => Promise<{}>;
|
|
92
|
+
};
|
|
93
|
+
fontSizeObj: {
|
|
94
|
+
type: ObjectConstructor;
|
|
95
|
+
default: () => {
|
|
96
|
+
large: number;
|
|
97
|
+
medium: number;
|
|
98
|
+
small: number;
|
|
99
|
+
extrasmall: number;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
@@ -0,0 +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})}};export{e as ScaleViewProps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import a from"moment";const
|
|
1
|
+
import a from"moment";const e=()=>({ScaleViewState:{other:"",form:{},submitForm:{},rules:{},config:{},formArray:[],mapVisible:!1,mapLocation:"",labelSelectedList:[],defaultFormArray:[],fontSize:"",filterArr:["SUCCESS_TIP","CALLBACK_INTERFACE","SPREAD_PARAMS","REDIRECT","FRONT_ADDRESS","RETURN_PATH"],spinning:!1,indicator:"",totalScore:void 0,shareId:"",currentTime:a(),showEvaluatePage:!1,showEvaluateSettingWrap:!0,showEvaluateCountdownWrap:!1,showEvaluateCountdown:!1,banSubmit:!1,isFinished:!1,maxScore:0,originConfig:{},paramsEvaluate:null,hasFrontAddress:!0,choiceComObj:{},evatipMap:{},evaResultObj:{}}});export{e as getScaleViewState};
|
|
@@ -4,4 +4,8 @@ export declare const ScaleViewSubmit: (props: any, state: any, emit: any, config
|
|
|
4
4
|
hasCallbackItem: any;
|
|
5
5
|
isCallback: boolean;
|
|
6
6
|
};
|
|
7
|
+
confirmSubmit: (message: any) => void;
|
|
8
|
+
onSubmitForm: () => Promise<unknown>;
|
|
9
|
+
onSubmitData: () => void;
|
|
10
|
+
handleScoreJson: () => {};
|
|
7
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h as t}from"vue";import{isSortItem as e,isOnlyOptions as i,isEvaluation as o,getQueryVariable as n}from"../utils/judge-types.js";import"xe-utils";import s from"moment";import r from"../../../../shared/utils/vexutilsExpand.js";import{ScaleViewComputed as a}from"./scaleview-computed.js";import{useDialog as l,useMessage as u}from"naive-ui";const f=(f,d,m,p)=>{const c=l(),v=u(),{formRef:g,countdownDom:y}=p,{showEvent:C,formKey:h,showEvaluateEntry:b,scaleEdit:O,showEvaluateCoundownPage:A,skipCover:S}=a(f,d,p),T=()=>{const t=d.defaultFormArray.find((t=>"SPREAD_PARAMS"===t.type));if(t){r.isJSON(t.setting)&&(t.setting=JSON.parse(t.setting));const e=h(t);d.submitForm[e]=t.setting.spreadParams.domains.map((t=>{const e={};return"1"==t.valueType?e[t.name]=t.value:"2"==t.valueType&&(e[t.name]=n(t.value,d,f.params)),e}))}const e=d.defaultFormArray.find((t=>"CHECKBOX_BLOCK"==t.type));e&&Array.isArray(d.form[e.title])&&"customList"===f.type&&(d.form[e.title]=d.form[e.title].join(","));const i=x();let o;if("customList"===f.type)o={definedListId:f.ids.guage_id,dbId:f.ids.db_id,scoreJson:JSON.stringify(i)};else{const{guageId:t,randomId:e}=d.config;o=Object.assign(f.params,{guageId:t,scoreJson:JSON.stringify(i),randomId:e})}d.shareId&&(o.shareId=d.shareId);const s=d.defaultFormArray.find((t=>"SUCCESS_TIP"===t.type));if(s){const t=r.isJSON(s.setting)?JSON.parse(s.setting):s.setting;o.tipSetting=JSON.stringify({tipMode:t.tipMode,tipType:t.tipType,tipText:t.tipText,tipApi:t.tipApi})}const a=d.defaultFormArray.find((t=>"CALLBACK_INTERFACE"===t.type));let l=!1;a&&(l=C(a,!0));return{params:o,hasCallbackItem:a,isCallback:l}},E=(t,e)=>{if(!e.length)return e;const{type:o,options:n,scoreConfigs:s}=t;let r=n;if("EVALUATE_CHECKBOX_BLOCK"===o&&(r=(null==s?void 0:s.scoreRules)||[]),!r.length)return e;const a=i(o)?"key":"value",l=[];return r.forEach((t=>{const i=t[a];e.includes(i)&&l.push(i)})),l},x=()=>{const t=Object.assign({},d.form,d.submitForm),o={};if(!Object.keys(t).length)return{};for(const n in t){const r=d.formArray.find((t=>h(t)==n));if(n&&r){let a=n,l=t[n]?t[n]:null;if(r&&r.databaseTitle&&(a=r.databaseTitle),"customList"==f.type&&r&&r.setting&&1!=r.setting.startToStop&&t[n]&&"DATETIME"==r.type&&(r.setting&&"time"==r.setting.dateType&&t[n]&&(t[n]=s().format("YYYY-MM-DD ")+t[n]),r.setting&&"date"==r.setting.dateType&&t[n]&&(t[n]=s(t[n]).format("YYYY-MM-DD ")+s().format("HH:mm:ss"))),e(r)&&l&&(l=E(r,l),l=(null==l?void 0:l.length)?l:null),i(r.type)&&l){const{options:t}=r,e=r.val_key,i=d.choiceComObj[e];if("RADIO_BLOCK"===r.type&&l&&(l=I(l,t,i)),"CHECKBOX_BLOCK"===r.type&&(null==l?void 0:l.length)){l=w(l,t,i)}}o[a]=l}else o[n]=t[n]}return o},w=(t,e,i)=>{const o=[];let n,s=0;for(;s<t.length;s++){n=t[s];const r=e.find(((t,e)=>e+1===n));if(r&&!r.prefix&&!r.suffix){o.push(r.value);continue}const a=I(n,e,i);o.push(a)}return o},I=(t,e,i)=>{const{othersText:o,optionsPreSuffixObj:n={}}=i||{};if("other"===t)return o||"其他";const s=e.find(((e,i)=>i+1===t));if(!s)return;if(!s.prefix&&!s.suffix)return s.value;let r=n[t]||"";return s.prefix?r=s.prefix+r:r+=s.suffix,r},j=()=>new Promise((t=>{var e;null==(e=g.value)||e.validate((e=>{var i;if(e){console.log(e);const o=(null==(i=e[0])?void 0:i[0])||{};let n=o.field;const s=o.message,r=d.formArray.find((t=>t.databaseTitle===n));return r&&(n=r.title),v.error(n+s),t(!1),!1}{const e=T();t(e)}}))})),L=e=>{c.warning({title:"温馨提示",content:()=>t("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:async()=>{const t=await j();m("onSubmit",t)},onNegativeClick(){}})};return{submitMethod:T,confirmSubmit:L,onSubmitForm:j,onSubmitData:()=>{var t;if(!d.formArray.find((t=>o(t.type))))return void L("确认要提交吗?");const{evaluateResultSetting:e}=d.config;if(!e||!Object.keys(e).length&&!b.value||O.value)return void L("确认要结束测评吗?");if("formIframe"==f.openType&&b.value)return void m("submitNoRequest");let i="确定要提前结束测评吗?";if(A.value&&(null==(t=y.value)?void 0:t.getCountdownObj)){const t=y.value.getCountdownObj(),{setAnswered:e,totalLen:o}=t;e<o?i="存在未作答的题目,确定要提前结束测评吗?":!(null==d?void 0:d.showEvaluateCountdown)&&(i="确认要结束测评吗?")}S.value&&!(null==d?void 0:d.showEvaluateCountdown)&&(i="确认要结束测评吗?"),L(i)},handleScoreJson:x}};export{f as ScaleViewSubmit};
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
export declare const isOnlyOptions: (e: string) => boolean;
|
|
2
|
+
export declare const isSortItem: (item: any) => boolean;
|
|
2
3
|
export declare const isCollection: (e: string) => boolean;
|
|
3
4
|
export declare const isEvaluation: (e: string) => boolean;
|
|
4
5
|
export declare const handleQueryParams: () => {};
|
|
5
6
|
export declare const getQueryVariable: (variable: any, state: any, params: any) => any;
|
|
7
|
+
export declare const formatMap: {
|
|
8
|
+
datetime: string;
|
|
9
|
+
date: string;
|
|
10
|
+
time: string;
|
|
11
|
+
hour: string;
|
|
12
|
+
datehour: string;
|
|
13
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=e=>["RADIO_BLOCK","CHECKBOX_BLOCK"].includes(e),
|
|
1
|
+
const e=e=>["RADIO_BLOCK","CHECKBOX_BLOCK"].includes(e),t=e=>{const{type:t,targetSource:o}=e;return!!["CHECKBOX_BLOCK","EVALUATE_CHECKBOX_BLOCK"].includes(t)||"SELECT"===t&&!(null==o?void 0:o.target_id)},o=e=>["TITLE","LINEBAR","PROMPT","IMGCARD","RICH_TEXT"].includes(e),n=e=>["EVALUATE_RADIO_BLOCK","EVALUATE_CHECKBOX_BLOCK","EVALUATE_SELECT","EVALUATE_INPUT"].includes(e),r=()=>{var e,t;const o={};let n=(null==(e=window.location.search.split("?"))?void 0:e[1])||(null==(t=window.location.hash.split("?"))?void 0:t[1]);if(!n)return{};n=n.replace(/\+/g,"%20");for(const[e,t]of new URLSearchParams(n).entries())o[e]=decodeURIComponent(t);return o},d=(e,t,o)=>{let n={};return n="layout"==t.source?o:r()||{},n&&n[e]||!1},E={datetime:"yyyy-MM-dd HH:mm:ss",date:"yyyy-MM-dd",time:"HH:mm:ss",hour:"HH:mm",datehour:"yyyy-MM-dd HH:mm"};export{E as formatMap,d as getQueryVariable,r as handleQueryParams,o as isCollection,n as isEvaluation,e as isOnlyOptions,t as isSortItem};
|