cnhis-design-vue 3.1.41-release.1 → 3.1.41-release.3
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/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/form-config/index.d.ts +7 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +7 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +3 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +4 -0
- package/es/components/form-render/index.d.ts +3 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +3 -0
- package/es/components/form-render/src/FormRender.vue.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +3 -0
- package/es/components/form-render/src/components/renderer/date.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/formItem.d.ts +7 -0
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +3 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/constants/index.d.ts +2 -0
- package/es/components/form-render/src/constants/index.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/form-render/src/hooks/useFormGraph.d.ts +6 -0
- package/es/components/form-render/src/hooks/useFormGraph.js +1 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +3 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/src/InfoHeader.vue.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue.d.ts +3 -0
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +4 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +4 -0
- package/es/components/table-filter/index.d.ts +418 -251
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.d.ts +46 -260
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +1 -1
- package/es/components/table-filter/src/classification/Classification-com.vue.d.ts +388 -4
- package/es/components/table-filter/src/classification/Classification-com.vue.js +1 -1
- package/es/components/table-filter/src/classification/search-class-name.vue.d.ts +19 -0
- package/es/components/table-filter/src/classification/search-class-name.vue.js +1 -1
- package/es/components/table-filter/src/classification/search-professional-model.vue.d.ts +356 -3
- package/es/components/table-filter/src/classification/search-professional-model.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.d.ts +1 -1
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +27 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
- package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.d.ts +28 -1
- package/es/components/table-filter/src/components/search-modal/set-classification.vue.d.ts +28 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useMixins.d.ts +2 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.d.ts +3 -4
- package/es/components/table-filter/style/index.css +1 -1
- package/es/env.d.ts +24 -24
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +64 -65
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,ref as n,nextTick as i,onMounted as o,watch as a,onBeforeUnmount as l,onDeactivated as r,onActivated as s,openBlock as c,createElementBlock as d,normalizeClass as f,normalizeStyle as u,createElementVNode as p,createCommentVNode as h,renderSlot as v,Fragment as m,createVNode as y,unref as g,withCtx as _,mergeProps as I,toDisplayString as w,renderList as b,createBlock as k,resolveDynamicComponent as x,createTextVNode as S,h as $}from"vue";import{isString as z,isArray as H}from"lodash-es";import{NPopover as W,NImage as F,NTag as j,NEllipsis as C,NScrollbar as L,NDescriptions as P,NDescriptionsItem as M}from"naive-ui";import{useThrottleFn as A,useEventListener as q}from"@vueuse/core";import R from"../../../shared/components/SlotRender/SlotRender.js";import N from"./InfoEllipsis.vue.js";import B from"./HiddenContent.vue.js";import E from"../../../_virtual/plugin-vue_export-helper.js";const O={class:"c-info-header__operation"},U={key:0,class:"c-info-header__divider"},D={class:"c-info-header__patient"},G={class:"c-info-header__patientHeader"},J={key:0,class:"c-info-header__patientHeader--name"},K={key:1,class:"c-info-header__patientHeader--sex"},Q={key:2,class:"c-info-header__patientHeader--age"},T=p("section",{style:{height:"10px"}},null,-1),V=p("section",{style:{height:"12px"}},null,-1),X={class:"c-info-header__setting"},Y=["onClick"];var Z=E(e({__name:"InfoHeader",props:{compact:{type:Boolean,required:!0},separator:{type:String,default:":"},patientInfo:{type:Object,default:()=>({})},infoList:{type:Array,required:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},minColumnWidth:{type:[String,Number],default:180},rowHeight:{type:[String,Number],default:32},settingIcons:{type:Array,default:()=>["patientInfo","fieldSet","compact"]}},emits:["openPatientInfo","fieldSet","update:compact"],setup(e,{expose:E,emit:Z}){const ee=e;const te={patientInfo:{event:function(){Z("openPatientInfo")},render:()=>[$("i",{class:"iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaobianji"})]},fieldSet:{event:function(){Z("fieldSet")},render:()=>[$("i",{class:"iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaoshezhi"})]},compact:{event:async function(){Z("update:compact",!ee.compact),await i(),await ue()},render:()=>[$("i",{class:"iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia"})]}},ne=t((()=>ee.settingIcons.map((e=>(z(e)?te[e]:e)||{}))));function ie({type:e="warning"}){return{color:{warning:"#fcc200",info:"rgba(45, 122, 255, 0.1)"}[e],textColor:{warning:"#fff",info:"#2563F4"}[e]}}const oe=t((()=>ee.patientInfo&&H(ee.patientInfo.tagList)?ee.patientInfo.tagList.filter((e=>e.render||z(e.content)&&e.content)):[]));function ae({bold:e=!0,contentStyle:t={}}={}){return{fontWeight:e?700:500,...t}}function le(e,{bold:t=!0,contentStyle:n={}}={}){const i=fe.value[e]+"px";return{width:i,maxWidth:i,fontWeight:t?700:500,...n}}function re(e){return["电话","身份证"].some((t=>{var n,i;return null==(i=null==(n=e[ee.labelField])?void 0:n.includes)?void 0:i.call(n,t)}))}const se=n(),ce=n(3),de=n(0),fe=n([]),ue=A((async function(){await i();const e=se.value;if(!e)return;const{clientWidth:t}=e;ce.value=Math.floor(t/+ee.minColumnWidth),de.value=Math.floor(t/ce.value),await i();const n=e.querySelectorAll(".n-descriptions-table-content__label");n&&(fe.value=Array.from(n).map((e=>de.value-e.clientWidth-8)))}),200,!0,!1);let pe;function he(){clearInterval(pe)}function ve(){he(),pe=setInterval(ue,700)}return o(ue),a([()=>ee.minColumnWidth,()=>ee.infoList],ue,{flush:"post",deep:!0}),E({update:ue}),q(window,"resize",ue),l(he),r(he),s(ve),o(ve),(t,n)=>(c(),d("div",{class:f(["c-info-header",{"is-compact":e.compact}]),style:u({"--row-height":e.rowHeight,"--column-width":de.value})},[p("section",O,[h(" 操作区插槽 "),v(t.$slots,"operation")]),t.$slots.operation?(c(),d("div",U)):h("v-if",!0),p("section",D,[h(" 患者信息区插槽 "),v(t.$slots,"patientModule"),h(" 头像区插槽 "),v(t.$slots,"avatarModule",{},(()=>[t.$slots.avatarModule?h("v-if",!0):(c(),d(m,{key:0},[h(" 头像插槽 "),v(t.$slots,"avatar",{},(()=>[y(g(W),null,{trigger:_((()=>[y(g(F),I({style:{"border-radius":"50%"},width:40,height:40,"preview-disabled":"",src:e.patientInfo.avatar},e.patientInfo.avatarProps),null,16,["src"])])),default:_((()=>[y(g(F),I({width:200,"preview-disabled":"",src:e.patientInfo.avatarPreview||e.patientInfo.avatar},e.patientInfo.avatarPreviewProps),null,16,["src"])])),_:1})])),p("section",null,[p("header",G,[e.patientInfo.name?(c(),d("div",J,w(e.patientInfo.name),1)):h("v-if",!0),e.patientInfo.sex?(c(),d("div",K,"/ "+w(e.patientInfo.sex),1)):h("v-if",!0),e.patientInfo.age?(c(),d("div",Q," / "+w(e.patientInfo.age)+w(e.patientInfo.ageUnit||"岁"),1)):h("v-if",!0),h(" tag区插槽 "),v(t.$slots,"tags",{tagList:g(oe)},(()=>[(c(!0),d(m,null,b(e.patientInfo.tagList||[],(e=>(c(),k(g(j),I({key:e.content,size:"medium",bordered:!1,color:ie(e)},e),{default:_((()=>[e.render?(c(),k(x(e.render),{key:0})):(c(),k(g(C),{key:1,style:{"max-width":"96px"}},{default:_((()=>[S(w(e.content),1)])),_:2},1024))])),_:2},1040,["color"])))),128))]))]),h(" 头像信息区插槽 "),v(t.$slots,"avatarInfo")])],64))]))]),p("section",{class:"c-info-header__info",ref_key:"infoRef",ref:se},[y(g(L),{class:"c-info-header__infoWrapper",style:u({"--row-num":e.compact?1:2})},{default:_((()=>[h(" 描述信息区插槽 "),v(t.$slots,"info",{},(()=>[T,y(g(P),{"label-align":"right",style:{width:"100%"},"label-placement":"left",separator:":",column:ce.value},{default:_((()=>[(c(!0),d(m,null,b(e.infoList,((n,i)=>(c(),k(g(M),{key:n[e.labelField],label:n[e.labelField]},{default:_((()=>[n.slot?(c(),k(g(R),{key:0,renderer:n.slot,"root-slots":t.$slots,item:n,style:u(ae(n)),width:fe.value[i]},null,8,["renderer","root-slots","item","style","width"])):re(n)?(c(),k(B,{key:1,content:n[e.valueField],tip:n.tip,"content-style":ae(n),width:fe.value[i]},null,8,["content","tip","content-style","width"])):(c(),k(N,{key:2,"content-style":le(i,n),content:n[e.valueField],tip:n.tip},null,8,["content-style","content","tip"]))])),_:2},1032,["label"])))),128))])),_:1},8,["column"]),V]))])),_:3},8,["style"])],512),p("section",X,[h(" 设置区插槽 "),v(t.$slots,"setting"),t.$slots.setting?h("v-if",!0):(c(!0),d(m,{key:0},b(g(ne),(e=>(c(),d("div",{key:e,class:"c-info-header__settingIcon",onClick:e.event},[(c(),k(x(e.render)))],8,Y)))),128))])],6))}}),[["__file","InfoHeader.vue"]]);export{Z as default};
|
|
1
|
+
import{defineComponent as e,computed as t,ref as n,nextTick as i,onMounted as o,watch as a,onBeforeUnmount as l,onDeactivated as r,onActivated as s,openBlock as c,createElementBlock as d,normalizeClass as f,normalizeStyle as u,createElementVNode as p,createCommentVNode as h,renderSlot as v,Fragment as m,createVNode as y,unref as g,withCtx as _,mergeProps as I,toDisplayString as w,renderList as b,createBlock as k,resolveDynamicComponent as x,createTextVNode as S,h as $}from"vue";import{isString as z,isArray as H}from"lodash-es";import{NPopover as W,NImage as F,NTag as j,NEllipsis as C,NScrollbar as L,NDescriptions as P,NDescriptionsItem as M}from"naive-ui";import{useThrottleFn as A,useEventListener as q}from"@vueuse/core";import R from"../../../shared/components/SlotRender/SlotRender.js";import N from"./InfoEllipsis.vue.js";import B from"./HiddenContent.vue.js";import E from"../../../_virtual/plugin-vue_export-helper.js";const O={class:"c-info-header__operation"},U={key:0,class:"c-info-header__divider"},D={class:"c-info-header__patient"},G={class:"c-info-header__patientHeader"},J={key:0,class:"c-info-header__patientHeader--name"},K={key:1,class:"c-info-header__patientHeader--sex"},Q={key:2,class:"c-info-header__patientHeader--age"},T=p("section",{style:{height:"10px"}},null,-1),V=p("section",{style:{height:"12px"}},null,-1),X={class:"c-info-header__setting"},Y=["onClick"];var Z=E(e({__name:"InfoHeader",props:{compact:{type:Boolean,required:!0},separator:{type:String,default:":"},patientInfo:{type:Object,default:()=>({})},infoList:{type:Array,required:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},minColumnWidth:{type:[String,Number],default:180},rowHeight:{type:[String,Number],default:32},settingIcons:{type:Array,default:()=>["patientInfo","fieldSet","compact"]}},emits:["openPatientInfo","fieldSet","update:compact"],setup(e,{expose:E,emit:Z}){const ee=e;const te={patientInfo:{event:function(){Z("openPatientInfo")},render:()=>[$("i",{class:"iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaobianji"})]},fieldSet:{event:function(){Z("fieldSet")},render:()=>[$("i",{class:"iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaoshezhi"})]},compact:{event:async function(){Z("update:compact",!ee.compact),await i(),await ue()},render:()=>[$("i",{class:"iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia"})]}},ne=t((()=>ee.settingIcons.map((e=>(z(e)?te[e]:e)||{}))));function ie({type:e="warning"}){return{color:{warning:"#fcc200",info:"rgba(45, 122, 255, 0.1)"}[e],textColor:{warning:"#fff",info:"#2563F4"}[e]}}const oe=t((()=>ee.patientInfo&&H(ee.patientInfo.tagList)?ee.patientInfo.tagList.filter((e=>e.render||z(e.content)&&e.content)):[]));function ae({bold:e=!0,contentStyle:t={}}={}){return{fontWeight:e?700:500,...t}}function le(e,{bold:t=!0,contentStyle:n={}}={}){const i=fe.value[e]+"px";return{width:i,maxWidth:i,fontWeight:t?700:500,...n}}function re(e){return["电话","身份证"].some((t=>{var n,i;return null==(i=null==(n=e[ee.labelField])?void 0:n.includes)?void 0:i.call(n,t)}))}const se=n(),ce=n(3),de=n(0),fe=n([]),ue=A((async function(){await i();const e=se.value;if(!e)return;const{clientWidth:t}=e;ce.value=Math.floor(t/+ee.minColumnWidth),de.value=Math.floor(t/ce.value),await i();const n=e.querySelectorAll(".n-descriptions-table-content__label");n&&(fe.value=Array.from(n).map((e=>de.value-e.clientWidth-8)))}),200,!0,!1);let pe;function he(){clearInterval(pe)}function ve(){he(),pe=setInterval(ue,700)}return o(ue),a([()=>ee.minColumnWidth,()=>ee.infoList],ue,{flush:"post",deep:!0}),E({update:ue}),q(window,"resize",ue),l(he),r(he),s(ve),o(ve),(t,n)=>(c(),d("div",{class:f(["c-info-header",{"is-compact":e.compact}]),style:u({"--row-height":e.rowHeight,"--column-width":de.value})},[p("section",O,[h(" 操作区插槽 "),v(t.$slots,"operation")]),t.$slots.operation?(c(),d("div",U)):h("v-if",!0),p("section",D,[h(" 患者信息区插槽 "),v(t.$slots,"patientModule"),h(" 头像区插槽 "),v(t.$slots,"avatarModule",{},(()=>[t.$slots.avatarModule?h("v-if",!0):(c(),d(m,{key:0},[h(" 头像插槽 "),v(t.$slots,"avatar",{},(()=>[y(g(W),null,{trigger:_((()=>[y(g(F),I({style:{"border-radius":"50%"},width:40,height:40,"preview-disabled":"",src:e.patientInfo.avatar},e.patientInfo.avatarProps),null,16,["src"])])),default:_((()=>[y(g(F),I({width:200,"preview-disabled":"",src:e.patientInfo.avatarPreview||e.patientInfo.avatar},e.patientInfo.avatarPreviewProps),null,16,["src"])])),_:1})])),p("section",null,[p("header",G,[e.patientInfo.name?(c(),d("div",J,w(e.patientInfo.name),1)):h("v-if",!0),e.patientInfo.sex?(c(),d("div",K,"/ "+w(e.patientInfo.sex),1)):h("v-if",!0),null!=e.patientInfo.age?(c(),d("div",Q," / "+w(e.patientInfo.age)+w(e.patientInfo.ageUnit||"岁"),1)):h("v-if",!0),h(" tag区插槽 "),v(t.$slots,"tags",{tagList:g(oe)},(()=>[(c(!0),d(m,null,b(e.patientInfo.tagList||[],(e=>(c(),k(g(j),I({key:e.content,size:"medium",bordered:!1,color:ie(e)},e),{default:_((()=>[e.render?(c(),k(x(e.render),{key:0})):(c(),k(g(C),{key:1,style:{"max-width":"96px"}},{default:_((()=>[S(w(e.content),1)])),_:2},1024))])),_:2},1040,["color"])))),128))]))]),h(" 头像信息区插槽 "),v(t.$slots,"avatarInfo")])],64))]))]),p("section",{class:"c-info-header__info",ref_key:"infoRef",ref:se},[y(g(L),{class:"c-info-header__infoWrapper",style:u({"--row-num":e.compact?1:2})},{default:_((()=>[h(" 描述信息区插槽 "),v(t.$slots,"info",{},(()=>[T,y(g(P),{"label-align":"right",style:{width:"100%"},"label-placement":"left",separator:":",column:ce.value},{default:_((()=>[(c(!0),d(m,null,b(e.infoList,((n,i)=>(c(),k(g(M),{key:n[e.labelField],label:n[e.labelField]},{default:_((()=>[n.slot?(c(),k(g(R),{key:0,renderer:n.slot,"root-slots":t.$slots,item:n,style:u(ae(n)),width:fe.value[i]},null,8,["renderer","root-slots","item","style","width"])):re(n)?(c(),k(B,{key:1,content:n[e.valueField],tip:n.tip,"content-style":ae(n),width:fe.value[i]},null,8,["content","tip","content-style","width"])):(c(),k(N,{key:2,"content-style":le(i,n),content:n[e.valueField],tip:n.tip},null,8,["content-style","content","tip"]))])),_:2},1032,["label"])))),128))])),_:1},8,["column"]),V]))])),_:3},8,["style"])],512),p("section",X,[h(" 设置区插槽 "),v(t.$slots,"setting"),t.$slots.setting?h("v-if",!0):(c(!0),d(m,{key:0},b(g(ne),(e=>(c(),d("div",{key:e,class:"c-info-header__settingIcon",onClick:e.event},[(c(),k(x(e.render)))],8,Y)))),128))])],6))}}),[["__file","InfoHeader.vue"]]);export{Z as default};
|
|
@@ -499,6 +499,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
499
499
|
getTotalLen: () => void;
|
|
500
500
|
countdown: (startTime: any) => void;
|
|
501
501
|
clearTimer: () => void;
|
|
502
|
+
/**
|
|
503
|
+
* wacth
|
|
504
|
+
*/
|
|
502
505
|
init: () => void;
|
|
503
506
|
checkType: (val: any) => string;
|
|
504
507
|
diffAnswered: (form: any) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as o,ref as a,watch as t,nextTick as i,openBlock as n,createElementBlock as s,normalizeClass as l,unref as r,createCommentVNode as u,Fragment as c,createBlock as v,mergeProps as m,createElementVNode as p,normalizeStyle as d,createVNode as f,withCtx as g,renderList as y,toDisplayString as k,createTextVNode as h,resolveDynamicComponent as C,h as w}from"vue";import b from"./hooks/use-noData.js";import{getScaleViewState as S}from"./hooks/scaleview-state.js";import E from"./hooks/scaleview-props.js";import{ScaleViewComputed as _}from"./hooks/scaleview-computed.js";import{ScaleViewInit as A}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{handleQueryParams as T,isCollection as D,isEvaluation as O}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import x from"./components/NoData.vue.js";import I from"../../../shared/components/SvgIcon/SvgIcon.vue.js";import P from"./components/EvaluateCountdown.vue.js";import N from"./components/EvaluatePage.vue.js";import q from"./components/AnswerParse.vue.js";import M from"./components/ScaleScore.js";import{useDialog as B,useMessage as R,NForm as K,NFormItem as V,NButton as F}from"naive-ui";import H from"../../../_virtual/plugin-vue_export-helper.js";const W=["innerHTML"],U={key:0,class:"required-text"},J={key:1,class:"evalute-label"},X=["onClick"],G={key:1,class:"footer"};var Q=H(e({__name:"ScaleView",props:E,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:E,emit:H}){const Q=e,{ScaleViewState:$}=S(),z=o($),Y=B(),Z=R(),ee=a(null),oe=a(null),{noDataState:ae,setNoData:te,resetNodata:ie}=b(),ne=T(),{showEvatip:se,isFormBoldOpen:le,scaleStyle:re,handlePageClass:ue,isShowItem:ce,handleShowQuestionNumber:ve,hasScore:me,isPreviewScale:pe,showEvaluateEntry:de,showEvaluateCoundownPage:fe,showSaveBtn:ge,showEvaluateLabel:ye,showAnswerParse:ke,propsConfig:he,evaluatePageProps:Ce,evaluateCountdownProps:we,skipCover:be,showEvent:Se,formKey:Ee}=_(Q,z,{query:ne}),{initForm:_e}=A(Q,z,H,{query:ne}),{submitMethod:Ae}=j(Q,z,H,{query:ne}),{nextLogicEvent:je,handleDynamicDataRelation:Te}=L(Q,z);(()=>{let{id:e}=ne;e&&(z.shareId=e)})();const De=e=>{try{ie(),_e(e)}catch(e){console.log(e,"--error"),z.spinning=!1,z.hasFrontAddress=!1,te(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};t((()=>Q.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&De(e):e.guage_id&&De(e)}),{immediate:!0}),t((()=>Q.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;z.form={},z.formArray=[];const o=JSON.parse(JSON.stringify(e));i((()=>{_e(o)}))}),{immediate:!0});const Oe=e=>{z.showEvaluateSettingWrap=!1,z.showEvaluateCountdown=!!e,H("startWriteScale")},Le=()=>{console.log("----closeEvaluateCountdown"),z.showEvaluateCountdown=!1,pe.value||(z.banSubmit=!0,Ae(),Y.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>{}}))},xe=e=>{Y.warning({title:"提示",content:()=>w("div",{class:"evatip-container"},[w("span","答案解析:"),w("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},Ie=(e,o,a)=>{console.log(e,"--val");let{choiceObj:t,isSetObj:i}=a||{};switch(o.type.includes("SELECT")||(z.form[o.val_key]=e),o.type){case"SELECT":case"EVALUATE_SELECT":let{value:a,list:n=[]}=e;z.form[o.val_key]=a,je(e,o,z.formArray),Te(n,o,z.formArray);break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&(z.choiceComObj[o.val_key]=t),je(e,o,z.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":je(e,o,z.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":z.submitForm[o.val_key]=e}},Pe=(e,o)=>{console.log(o),z.form[o.val_key]=e},Ne=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const o=e||[],a=[],t=[];return o.forEach((e=>{t.push(e),a.push(e.labelName)})),z.labelSelectedList=o,{labelStr:a.join(","),labels:t}},qe=()=>{var e;if(!z.formArray.find((e=>O(e.type))))return void Me("确认要提交吗?");let{evaluateResultSetting:o}=z.config;if(!o||!Object.keys(o).length&&!de.value)return void Me("确认要结束测评吗?");if("formIframe"==Q.openType&&de.value)return void H("submitNoRequest");let a="确定要提前结束测评吗?";if(fe.value&&(null==(e=ee.value)?void 0:e.getCountdownObj)){const e=ee.value.getCountdownObj(),{setAnswered:o,totalLen:t}=e;o<t?a="存在未作答的题目,确定要提前结束测评吗?":!(null==z?void 0:z.showEvaluateCountdown)&&(a="确认要结束测评吗?")}Me(a)},Me=e=>{Y.warning({title:"温馨提示",content:()=>w("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:()=>{Be()},onNegativeClick(){}})},Be=()=>{var e;null==(e=oe.value)||e.validate((e=>{var o;if(e){console.log(e);let a=(null==(o=e[0])?void 0:o[0])||{},t=a.field,i=a.message,n=z.formArray.find((e=>e.databaseTitle===t));return n&&(t=n.title),Z.error(t+i),!1}Ae()}))},Re=()=>{H("onCloseSetting")};return E({getScaleData:()=>({...z}),onSubmit:qe,cancel:Re}),(e,o)=>(n(),s("div",{class:l(["c-scale",{"c-scale-nobtn":r(ge)}])},[u(' <template v-if="state.spinning">\
|
|
1
|
+
import{defineComponent as e,reactive as o,ref as a,watch as t,nextTick as i,openBlock as n,createElementBlock as s,normalizeClass as l,unref as r,createCommentVNode as u,Fragment as c,createBlock as v,mergeProps as m,createElementVNode as p,normalizeStyle as d,createVNode as f,withCtx as g,renderList as y,toDisplayString as k,createTextVNode as h,resolveDynamicComponent as C,h as w}from"vue";import b from"./hooks/use-noData.js";import{getScaleViewState as S}from"./hooks/scaleview-state.js";import E from"./hooks/scaleview-props.js";import{ScaleViewComputed as _}from"./hooks/scaleview-computed.js";import{ScaleViewInit as A}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{handleQueryParams as T,isCollection as D,isEvaluation as O}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import x from"./components/NoData.vue.js";import I from"../../../shared/components/SvgIcon/SvgIcon.vue.js";import P from"./components/EvaluateCountdown.vue.js";import N from"./components/EvaluatePage.vue.js";import q from"./components/AnswerParse.vue.js";import M from"./components/ScaleScore.js";import{useDialog as B,useMessage as R,NForm as K,NFormItem as V,NButton as F}from"naive-ui";import H from"../../../_virtual/plugin-vue_export-helper.js";const W=["innerHTML"],U={key:0,class:"required-text"},J={key:1,class:"evalute-label"},X=["onClick"],G={key:1,class:"footer"};var Q=H(e({__name:"ScaleView",props:E,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:E,emit:H}){const Q=e,{ScaleViewState:$}=S(),z=o($),Y=B(),Z=R(),ee=a(null),oe=a(null),{noDataState:ae,setNoData:te,resetNodata:ie}=b(),ne=T(),{showEvatip:se,isFormBoldOpen:le,scaleStyle:re,handlePageClass:ue,isShowItem:ce,handleShowQuestionNumber:ve,hasScore:me,isPreviewScale:pe,showEvaluateEntry:de,showEvaluateCoundownPage:fe,showSaveBtn:ge,showEvaluateLabel:ye,showAnswerParse:ke,propsConfig:he,evaluatePageProps:Ce,evaluateCountdownProps:we,skipCover:be,showEvent:Se,formKey:Ee}=_(Q,z,{query:ne}),{initForm:_e}=A(Q,z,H,{query:ne}),{submitMethod:Ae}=j(Q,z,H,{query:ne}),{nextLogicEvent:je,handleDynamicDataRelation:Te}=L(Q,z);(()=>{let{id:e}=ne;e&&(z.shareId=e)})();const De=e=>{try{ie(),_e(e)}catch(e){console.log(e,"--error"),z.spinning=!1,z.hasFrontAddress=!1,te(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};t((()=>Q.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&De(e):e.guage_id&&De(e)}),{immediate:!0}),t((()=>Q.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;z.form={},z.formArray=[];const o=JSON.parse(JSON.stringify(e));i((()=>{_e(o)}))}),{immediate:!0});const Oe=e=>{z.showEvaluateSettingWrap=!1,z.showEvaluateCountdown=!!e,H("startWriteScale")},Le=()=>{console.log("----closeEvaluateCountdown"),z.showEvaluateCountdown=!1,pe.value||(z.banSubmit=!0,Ae(),Y.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>{}}))},xe=e=>{Y.warning({title:"提示",content:()=>w("div",{class:"evatip-container"},[w("span","答案解析:"),w("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},Ie=(e,o,a)=>{console.log(e,"--val");let{choiceObj:t,isSetObj:i}=a||{};switch(o.type.includes("SELECT")||(z.form[o.val_key]=e),o.type){case"SELECT":case"EVALUATE_SELECT":let{value:a,list:n=[]}=e;z.form[o.val_key]=a,je(e,o,z.formArray),Te(n,o,z.formArray);break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&(z.choiceComObj[o.val_key]=t),je(e,o,z.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":je(e,o,z.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":z.submitForm[o.val_key]=e}},Pe=(e,o)=>{console.log(o),z.form[o.val_key]=e},Ne=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const o=e||[],a=[],t=[];return o.forEach((e=>{t.push(e),a.push(e.labelName)})),z.labelSelectedList=o,{labelStr:a.join(","),labels:t}},qe=()=>{var e;if(!z.formArray.find((e=>O(e.type))))return void Me("确认要提交吗?");let{evaluateResultSetting:o}=z.config;if(!o||!Object.keys(o).length&&!de.value)return void Me("确认要结束测评吗?");if("formIframe"==Q.openType&&de.value)return void H("submitNoRequest");let a="确定要提前结束测评吗?";if(fe.value&&(null==(e=ee.value)?void 0:e.getCountdownObj)){const e=ee.value.getCountdownObj(),{setAnswered:o,totalLen:t}=e;o<t?a="存在未作答的题目,确定要提前结束测评吗?":!(null==z?void 0:z.showEvaluateCountdown)&&(a="确认要结束测评吗?")}Me(a)},Me=e=>{Y.warning({title:"温馨提示",content:()=>w("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:()=>{Be()},onNegativeClick(){}})},Be=()=>{var e;null==(e=oe.value)||e.validate((e=>{var o;if(e){console.log(e);let a=(null==(o=e[0])?void 0:o[0])||{},t=a.field,i=a.message,n=z.formArray.find((e=>e.databaseTitle===t));return n&&(t=n.title),Z.error(t+i),!1}Ae()}))},Re=()=>{H("onCloseSetting")};return E({getScaleData:()=>({...z}),onSubmit:qe,cancel:Re}),(e,o)=>(n(),s("div",{class:l(["c-scale",{"c-scale-nobtn":r(ge)}])},[u(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),z.spinning||z.hasFrontAddress?u("v-if",!0):(n(),s(c,{key:0},[r(ae).noData?(n(),v(x,{key:0,noDataImg:r(ae).noDataImg,noDataTip:r(ae).noDataTip},null,8,["noDataImg","noDataTip"])):(n(),s(c,{key:1},[r(de)&&!r(be)?(n(),v(N,m({key:0},r(Ce),{onWriteGuage:Oe}),null,16)):(n(),s(c,{key:1},[r(fe)?(n(),v(P,m({key:0,ref_key:"countdownDom",ref:ee},r(we),{onCloseEvaluateCountdown:Le}),null,16)):u("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(ue),"scale-container-hasfooter":r(ge)}]),style:d(r(re))},[r(me)?(n(),v(r(M),{key:0,config:z.config,maxScore:z.maxScore},null,8,["config","maxScore"])):u("v-if",!0),f(r(K),{ref_key:"formRef",ref:oe,model:z.form,rules:z.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(n(!0),s(c,null,y(z.formArray,((e,o)=>(n(),s(c,{key:(e.id||e.seq)+o},[r(ce)(e)?(n(),v(r(V),{key:0,path:e.val_key,"show-label":!r(D)(e.type)},{label:g((()=>[p("span",{class:l({"scale-label-required":r(le)(e)}),innerHTML:r(ve)(e)},null,10,W),r(le)(e)?(n(),s("span",U,"(必填)")):u("v-if",!0),r(ye)(e)?(n(),s("span",J,k(r(ye)(e)),1)):u("v-if",!0),r(se)(e)?(n(),s("span",{key:2,class:"evalute-tip",onClick:o=>(async e=>{var o;if(z.evatipMap[e.id])return void xe(z.evatipMap[e.id]);let a="getSubjectAnswer";const t=(null==(o=Q.scaleApiConfig)?void 0:o[a])||null;if(!t||"function"!=typeof t)return void Z.error(`${a} Is not a function`);let i=await t(e.id);i&&(z.evatipMap[e.id]||(z.evatipMap[e.id]=i,xe(i)))})(e)},[f(r(I),{"icon-class":"a-xitongtubiaotishi"}),h(" 查看提示 ")],8,X)):u("v-if",!0)])),default:g((()=>[(n(),v(C(e.renderCom),m(r(he)(e,o),{key:(e.id||e.seq)+o,onScaleChange:Ie,onOnChange:o=>((e,o)=>{z.form[o.val_key]=Ne(e)})(o,e),onVodFileList:Pe}),null,16,["onOnChange"])),r(ke)(e)?(n(),v(q,{key:0,item:e},null,8,["item"])):u("v-if",!0)])),_:2},1032,["path","show-label"])):u("v-if",!0)],64)))),128))])),_:1},8,["model","rules"])],6),r(ge)?(n(),s("div",G,[u(" 分享的链接 隐藏取消按钮 "),"guage"!==Q.sourceType?(n(),v(r(F),{key:0,onClick:Re},{default:g((()=>[h("取消")])),_:1})):u("v-if",!0),Q.isLock?u("v-if",!0):(n(),v(r(F),{key:1,onClick:qe,disabled:z.banSubmit,type:"primary"},{default:g((()=>[h("保存")])),_:1},8,["disabled"]))])):u("v-if",!0)],64))],64))],64))],2))}}),[["__file","ScaleView.vue"]]);export{Q as default};
|
|
@@ -83,6 +83,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
83
83
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
84
84
|
} | undefined;
|
|
85
85
|
regular_error_tip?: string | undefined;
|
|
86
|
+
message?: string | undefined;
|
|
86
87
|
} | undefined;
|
|
87
88
|
option?: {
|
|
88
89
|
text: string;
|
|
@@ -2003,6 +2004,9 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2003
2004
|
}[]>;
|
|
2004
2005
|
onScroll: (scrollEvent: Event) => void;
|
|
2005
2006
|
triggerAutoHidden: (field: import("@formily/core").GeneralField) => Promise<void>;
|
|
2007
|
+
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
2008
|
+
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
2009
|
+
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
2006
2010
|
formModel: import("@formily/core").Form<{
|
|
2007
2011
|
[x: string]: any;
|
|
2008
2012
|
}>;
|
|
@@ -85,6 +85,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
85
85
|
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
86
86
|
} | undefined;
|
|
87
87
|
regular_error_tip?: string | undefined;
|
|
88
|
+
message?: string | undefined;
|
|
88
89
|
} | undefined;
|
|
89
90
|
option?: {
|
|
90
91
|
text: string;
|
|
@@ -2005,6 +2006,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2005
2006
|
}[]>;
|
|
2006
2007
|
onScroll: (scrollEvent: Event) => void;
|
|
2007
2008
|
triggerAutoHidden: (field: import("../../../../es/components/form-render").GeneralField) => Promise<void>;
|
|
2009
|
+
observeFormGraph: Record<string, import("../../../../es/components/form-render").GeneralField>;
|
|
2010
|
+
setGraph: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
2011
|
+
removeGraph: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
2008
2012
|
formModel: import("../../../../es/components/form-render").Form<{
|
|
2009
2013
|
[x: string]: any;
|
|
2010
2014
|
}>;
|