st-comp 0.0.139 → 0.0.140
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +76 -69
- package/es/style.css +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +1 -1
- package/lib/{index-0bb1da59.js → index-3f4eb3e2.js} +11 -4
- package/lib/{python-b6bbad6e.js → python-a856b259.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/FactorWarning/index.vue +11 -1
package/es/FactorWarning.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("./base-ec05f348.cjs"),Q=require("./zh-cn-ab9a583d.cjs"),H=require("./el-overlay-891dcc40.cjs");require("./el-tag-3b03d13e.cjs");require("./el-tooltip-0ea8fbf8.cjs");const oe=require("./el-popper-f62316cd.cjs"),j=require("./el-table-column-dd8b62aa.cjs"),ee=require("./el-scrollbar-d1c3e7f7.cjs"),ce=require("./el-popover-8735b1fa.cjs"),le=require("./el-button-196807af.cjs"),J=require("./el-form-item-7d32befa.cjs"),ne=require("./el-input-6c6f5bda.cjs"),ue=require("./el-input-number-0524d787.cjs"),e=require("vue"),w=require("./use-form-common-props-1b84d8f4.cjs"),de=require("./index-a96158ae.cjs"),me=require("./_plugin-vue_export-helper-f246444f.cjs"),G=require("./index-e1e83173.cjs"),fe=require("./index-8a0b1c53.cjs"),X=require("./event-61f49698.cjs"),pe=require("./index-80a2b137.cjs");require("./config-provider-7cdfca4d.cjs");require("./vnode-7fbc61e1.cjs");require("./refs-d00b710b.cjs");require("./scroll-41224831.cjs");require("./debounce-b2ff12bd.cjs");require("./raf-8fc301fd.cjs");require("./index-eea0bcb3.cjs");require("./castArray-a45823fe.cjs");require("./typescript-b63f8e83.cjs");const ve=t=>["",...w.componentSizes].includes(t),ge=c.buildProps({direction:{type:c.definePropType(String),default:"horizontal"},options:{type:c.definePropType(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},block:Boolean,size:w.useSizeProp,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...oe.useAriaProps(["ariaLabel"])}),Ce={[X.UPDATE_MODEL_EVENT]:t=>c.isString(t)||c.isNumber(t)||c.isBoolean(t),[X.CHANGE_EVENT]:t=>c.isString(t)||c.isNumber(t)||c.isBoolean(t)},he=e.defineComponent({name:"ElSegmented"}),ye=e.defineComponent({...he,props:ge,emits:Ce,setup(t,{emit:d}){const n=t,i=c.useNamespace("segmented"),p=c.useId(),m=w.useFormSize(),g=w.useFormDisabled(),{formItem:b}=w.useFormItem(),{inputId:s,isLabeledByFormItem:a}=w.useFormItemInputId(n,{formItemContext:b}),S=e.ref(null),f=ee.useActiveElement(),u=e.reactive({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),D=r=>{const y=M(r);d(X.UPDATE_MODEL_EVENT,y),d(X.CHANGE_EVENT,y)},M=r=>c.isObject(r)?r.value:r,_=r=>c.isObject(r)?r.label:r,x=r=>!!(g.value||c.isObject(r)&&r.disabled),I=r=>n.modelValue===M(r),F=r=>n.options.find(y=>M(y)===r),q=r=>[i.e("item"),i.is("selected",I(r)),i.is("disabled",x(r))],C=()=>{if(!S.value)return;const r=S.value.querySelector(".is-selected"),y=S.value.querySelector(".is-selected input");if(!r||!y){u.width=0,u.height=0,u.translateX=0,u.translateY=0,u.focusVisible=!1;return}const V=r.getBoundingClientRect();u.isInit=!0,n.direction==="vertical"?(u.height=V.height,u.translateY=r.offsetTop):(u.width=V.width,u.translateX=r.offsetLeft);try{u.focusVisible=y.matches(":focus-visible")}catch{}},l=e.computed(()=>[i.b(),i.m(m.value),i.is("block",n.block)]),E=e.computed(()=>({width:n.direction==="vertical"?"100%":`${u.width}px`,height:n.direction==="vertical"?`${u.height}px`:"100%",transform:n.direction==="vertical"?`translateY(${u.translateY}px)`:`translateX(${u.translateX}px)`,display:u.isInit?"block":"none"})),h=e.computed(()=>[i.e("item-selected"),i.is("disabled",x(F(n.modelValue))),i.is("focus-visible",u.focusVisible)]),k=e.computed(()=>n.name||p.value);return ee.useResizeObserver(S,C),e.watch(f,C),e.watch(()=>n.modelValue,()=>{var r;C(),n.validateEvent&&((r=b==null?void 0:b.validate)==null||r.call(b,"change").catch(y=>c.debugWarn(y)))},{flush:"post"}),(r,y)=>r.options.length?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(s),ref_key:"segmentedRef",ref:S,class:e.normalizeClass(e.unref(l)),role:"radiogroup","aria-label":e.unref(a)?void 0:r.ariaLabel||"segmented","aria-labelledby":e.unref(a)?e.unref(b).labelId:void 0},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(i).e("group"),e.unref(i).m(n.direction)])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(E)),class:e.normalizeClass(e.unref(h))},null,6),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.options,(V,O)=>(e.openBlock(),e.createElementBlock("label",{key:O,class:e.normalizeClass(q(V))},[e.createElementVNode("input",{class:e.normalizeClass(e.unref(i).e("item-input")),type:"radio",name:e.unref(k),disabled:x(V),checked:I(V),onChange:P=>D(V)},null,42,["name","disabled","checked","onChange"]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(i).e("item-label"))},[e.renderSlot(r.$slots,"default",{item:V},()=>[e.createTextVNode(e.toDisplayString(_(V)),1)])],2)],2))),128))],2)],10,["id","aria-label","aria-labelledby"])):e.createCommentVNode("v-if",!0)}});var be=c._export_sfc(ye,[["__file","segmented.vue"]]);const ke=c.withInstall(be),Z="_trap-focus-children",$=[],te=t=>{var d;if($.length===0)return;const n=$[$.length-1][Z];if(n.length>0&&t.code===G.EVENT_CODE.tab){if(n.length===1){t.preventDefault(),document.activeElement!==n[0]&&n[0].focus();return}const i=t.shiftKey,p=t.target===n[0],m=t.target===n[n.length-1];if(p&&i&&(t.preventDefault(),n[n.length-1].focus()),m&&!i&&(t.preventDefault(),n[0].focus()),process.env.NODE_ENV==="test"){const g=n.indexOf(t.target);g!==-1&&((d=n[i?g-1:g+1])==null||d.focus())}}},Ve={beforeMount(t){t[Z]=G.obtainAllFocusableElements(t),$.push(t),$.length<=1&&document.addEventListener("keydown",te)},updated(t){e.nextTick(()=>{t[Z]=G.obtainAllFocusableElements(t)})},unmounted(){$.shift(),$.length===0&&document.removeEventListener("keydown",te)}},we=e.defineComponent({name:"ElMessageBox",directives:{TrapFocus:Ve},components:{ElButton:le.ElButton,ElFocusTrap:G.ElFocusTrap,ElInput:ne.ElInput,ElOverlay:H.ElOverlay,ElIcon:w.ElIcon,...w.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:ve},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(t,{emit:d}){const{locale:n,zIndex:i,ns:p,size:m}=fe.useGlobalComponentSettings("message-box",e.computed(()=>t.buttonSize)),{t:g}=n,{nextZIndex:b}=i,s=e.ref(!1),a=e.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:e.markRaw(w.loading_default),cancelButtonLoadingIcon:e.markRaw(w.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:b()}),S=e.computed(()=>{const v=a.type;return{[p.bm("icon",v)]:v&&w.TypeComponentsMap[v]}}),f=c.useId(),u=c.useId(),D=e.computed(()=>{const v=a.type;return a.icon||v&&w.TypeComponentsMap[v]||""}),M=e.computed(()=>!!a.message),_=e.ref(),x=e.ref(),I=e.ref(),F=e.ref(),q=e.ref(),C=e.computed(()=>a.confirmButtonClass);e.watch(()=>a.inputValue,async v=>{await e.nextTick(),t.boxType==="prompt"&&v!==null&&O()},{immediate:!0}),e.watch(()=>s.value,v=>{var B,N;v&&(t.boxType!=="prompt"&&(a.autofocus?I.value=(N=(B=q.value)==null?void 0:B.$el)!=null?N:_.value:I.value=_.value),a.zIndex=b()),t.boxType==="prompt"&&(v?e.nextTick().then(()=>{var U;F.value&&F.value.$el&&(a.autofocus?I.value=(U=P())!=null?U:_.value:I.value=_.value)}):(a.editorErrorMessage="",a.validateError=!1))});const l=e.computed(()=>t.draggable),E=e.computed(()=>t.overflow);H.useDraggable(_,x,l,E),e.onMounted(async()=>{await e.nextTick(),t.closeOnHashChange&&window.addEventListener("hashchange",h)}),e.onBeforeUnmount(()=>{t.closeOnHashChange&&window.removeEventListener("hashchange",h)});function h(){s.value&&(s.value=!1,e.nextTick(()=>{a.action&&d("action",a.action)}))}const k=()=>{t.closeOnClickModal&&V(a.distinguishCancelAndClose?"close":"cancel")},r=H.useSameTarget(k),y=v=>{if(a.inputType!=="textarea")return v.preventDefault(),V("confirm")},V=v=>{var B;t.boxType==="prompt"&&v==="confirm"&&!O()||(a.action=v,a.beforeClose?(B=a.beforeClose)==null||B.call(a,v,a,h):h())},O=()=>{if(t.boxType==="prompt"){const v=a.inputPattern;if(v&&!v.test(a.inputValue||""))return a.editorErrorMessage=a.inputErrorMessage||g("el.messagebox.error"),a.validateError=!0,!1;const B=a.inputValidator;if(c.isFunction(B)){const N=B(a.inputValue);if(N===!1)return a.editorErrorMessage=a.inputErrorMessage||g("el.messagebox.error"),a.validateError=!0,!1;if(c.isString(N))return a.editorErrorMessage=N,a.validateError=!0,!1}}return a.editorErrorMessage="",a.validateError=!1,!0},P=()=>{var v,B;const N=(v=F.value)==null?void 0:v.$refs;return(B=N==null?void 0:N.input)!=null?B:N==null?void 0:N.textarea},R=()=>{V("close")},L=()=>{t.closeOnPressEscape&&R()};return t.lockScroll&&H.useLockscreen(s),{...e.toRefs(a),ns:p,overlayEvent:r,visible:s,hasMessage:M,typeClass:S,contentId:f,inputId:u,btnSize:m,iconComponent:D,confirmButtonClasses:C,rootRef:_,focusStartRef:I,headerRef:x,inputRef:F,confirmRef:q,doClose:h,handleClose:R,onCloseRequested:L,handleWrapperClick:k,handleInputEnter:y,handleAction:V,t:g}}});function Ne(t,d,n,i,p,m){const g=e.resolveComponent("el-icon"),b=e.resolveComponent("close"),s=e.resolveComponent("el-input"),a=e.resolveComponent("el-button"),S=e.resolveComponent("el-focus-trap"),f=e.resolveComponent("el-overlay");return e.openBlock(),e.createBlock(e.Transition,{name:"fade-in-linear",onAfterLeave:u=>t.$emit("vanish"),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(f,{"z-index":t.zIndex,"overlay-class":[t.ns.is("message-box"),t.modalClass],mask:t.modal},{default:e.withCtx(()=>[e.createElementVNode("div",{role:"dialog","aria-label":t.title,"aria-modal":"true","aria-describedby":t.showInput?void 0:t.contentId,class:e.normalizeClass(`${t.ns.namespace.value}-overlay-message-box`),onClick:t.overlayEvent.onClick,onMousedown:t.overlayEvent.onMousedown,onMouseup:t.overlayEvent.onMouseup},[e.createVNode(S,{loop:"",trapped:t.visible,"focus-trap-el":t.rootRef,"focus-start-el":t.focusStartRef,onReleaseRequested:t.onCloseRequested},{default:e.withCtx(()=>[e.createElementVNode("div",{ref:"rootRef",class:e.normalizeClass([t.ns.b(),t.customClass,t.ns.is("draggable",t.draggable),{[t.ns.m("center")]:t.center}]),style:e.normalizeStyle(t.customStyle),tabindex:"-1",onClick:e.withModifiers(()=>{},["stop"])},[t.title!==null&&t.title!==void 0?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"headerRef",class:e.normalizeClass([t.ns.e("header"),{"show-close":t.showClose}])},[e.createElementVNode("div",{class:e.normalizeClass(t.ns.e("title"))},[t.iconComponent&&t.center?(e.openBlock(),e.createBlock(g,{key:0,class:e.normalizeClass([t.ns.e("status"),t.typeClass])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconComponent)))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.createElementVNode("span",null,e.toDisplayString(t.title),1)],2),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(t.ns.e("headerbtn")),"aria-label":t.t("el.messagebox.close"),onClick:u=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),onKeydown:e.withKeys(e.withModifiers(u=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[e.createVNode(g,{class:e.normalizeClass(t.ns.e("close"))},{default:e.withCtx(()=>[e.createVNode(b)]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):e.createCommentVNode("v-if",!0)],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{id:t.contentId,class:e.normalizeClass(t.ns.e("content"))},[e.createElementVNode("div",{class:e.normalizeClass(t.ns.e("container"))},[t.iconComponent&&!t.center&&t.hasMessage?(e.openBlock(),e.createBlock(g,{key:0,class:e.normalizeClass([t.ns.e("status"),t.typeClass])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconComponent)))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),t.hasMessage?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(t.ns.e("message"))},[e.renderSlot(t.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.showInput?"label":"p"),{key:1,for:t.showInput?t.inputId:void 0,innerHTML:t.message},null,8,["for","innerHTML"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.showInput?"label":"p"),{key:0,for:t.showInput?t.inputId:void 0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.dangerouslyUseHTMLString?"":t.message),1)]),_:1},8,["for"]))])],2)):e.createCommentVNode("v-if",!0)],2),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(t.ns.e("input"))},[e.createVNode(s,{id:t.inputId,ref:"inputRef",modelValue:t.inputValue,"onUpdate:modelValue":u=>t.inputValue=u,type:t.inputType,placeholder:t.inputPlaceholder,"aria-invalid":t.validateError,class:e.normalizeClass({invalid:t.validateError}),onKeydown:e.withKeys(t.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),e.createElementVNode("div",{class:e.normalizeClass(t.ns.e("errormsg")),style:e.normalizeStyle({visibility:t.editorErrorMessage?"visible":"hidden"})},e.toDisplayString(t.editorErrorMessage),7)],2),[[e.vShow,t.showInput]])],10,["id"]),e.createElementVNode("div",{class:e.normalizeClass(t.ns.e("btns"))},[t.showCancelButton?(e.openBlock(),e.createBlock(a,{key:0,loading:t.cancelButtonLoading,"loading-icon":t.cancelButtonLoadingIcon,class:e.normalizeClass([t.cancelButtonClass]),round:t.roundButton,size:t.btnSize,onClick:u=>t.handleAction("cancel"),onKeydown:e.withKeys(e.withModifiers(u=>t.handleAction("cancel"),["prevent"]),["enter"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelButtonText||t.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):e.createCommentVNode("v-if",!0),e.withDirectives(e.createVNode(a,{ref:"confirmRef",type:"primary",loading:t.confirmButtonLoading,"loading-icon":t.confirmButtonLoadingIcon,class:e.normalizeClass([t.confirmButtonClasses]),round:t.roundButton,disabled:t.confirmButtonDisabled,size:t.btnSize,onClick:u=>t.handleAction("confirm"),onKeydown:e.withKeys(e.withModifiers(u=>t.handleAction("confirm"),["prevent"]),["enter"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.confirmButtonText||t.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[e.vShow,t.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[e.vShow,t.visible]])]),_:3},8,["onAfterLeave"])}var Ee=c._export_sfc(we,[["render",Ne],["__file","index.vue"]]);const K=new Map,Be=t=>{let d=document.body;return t.appendTo&&(c.isString(t.appendTo)&&(d=document.querySelector(t.appendTo)),c.isElement(t.appendTo)&&(d=t.appendTo),c.isElement(d)||(c.debugWarn("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),d=document.body)),d},Te=(t,d,n=null)=>{const i=e.createVNode(Ee,t,c.isFunction(t.message)||e.isVNode(t.message)?{default:c.isFunction(t.message)?t.message:()=>t.message}:null);return i.appContext=n,e.render(i,d),Be(t).appendChild(d.firstElementChild),i.component},Se=()=>document.createElement("div"),_e=(t,d)=>{const n=Se();t.onVanish=()=>{e.render(null,n),K.delete(p)},t.onAction=m=>{const g=K.get(p);let b;t.showInput?b={value:p.inputValue,action:m}:b=m,t.callback?t.callback(b,i.proxy):m==="cancel"||m==="close"?t.distinguishCancelAndClose&&m!=="cancel"?g.reject("close"):g.reject("cancel"):g.resolve(b)};const i=Te(t,n,d),p=i.proxy;for(const m in t)c.hasOwn(t,m)&&!c.hasOwn(p.$props,m)&&(p[m]=t[m]);return p.visible=!0,p};function A(t,d=null){if(!c.isClient)return Promise.reject();let n;return c.isString(t)||e.isVNode(t)?t={message:t}:n=t.callback,new Promise((i,p)=>{const m=_e(t,d??A._context);K.set(m,{options:t,callback:n,resolve:i,reject:p})})}const xe=["alert","confirm","prompt"],Ie={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};xe.forEach(t=>{A[t]=Le(t)});function Le(t){return(d,n,i,p)=>{let m="";return c.isObject(n)?(i=n,m=""):c.isUndefined(n)?m="":m=n,A(Object.assign({title:m,message:d,type:"",...Ie[t]},i,{boxType:t}),p)}}A.close=()=>{K.forEach((t,d)=>{d.doClose()}),K.clear()};A._context=null;const z=A;z.install=t=>{z._context=t._context,t.config.globalProperties.$msgbox=z,t.config.globalProperties.$messageBox=z,t.config.globalProperties.$alert=z.alert,t.config.globalProperties.$confirm=z.confirm,t.config.globalProperties.$prompt=z.prompt};const Me=z;const Fe={ruleFormPrice:!0,ruleFormMark:!0,tableStatus:!0,tableCreateTime:!0,tableMark:!0,tableEnable:!0};const W=t=>(e.pushScopeId("data-v-fea2a84d"),t=t(),e.popScopeId(),t),ze={class:"st-factorWarning"},De={class:"custom-header"},Oe=W(()=>e.createElementVNode("span",{style:{"margin-right":"4px"}},"因子预警",-1)),$e={class:"factor-name"},qe=["onClick"],Ae={class:"factor-name"},Pe=["onClick"],Re={style:{display:"flex","align-items":"start"}},Ue={key:0,style:{flex:"1"}},He=W(()=>e.createElementVNode("span",{style:{margin:"0 5px"}},"~",-1)),Ke={key:0,style:{color:"#f56c6c"}},je={key:1,style:{color:"#67c23a"}},Ge={key:0},Xe={key:1},We={key:2},Ye={class:"shortcut-title"},Je=W(()=>e.createElementVNode("span",null,"我的配置",-1)),Ze={class:"shortcut-config"},Qe={key:1,class:"empty"},et={class:"shortcut-title"},tt=W(()=>e.createElementVNode("span",null,"新增配置",-1)),ot={class:"custom-footer"},lt={__name:"index",props:e.mergeModels({title:{type:[String,null],default:null},moreFactorOptions:{type:Array,default:()=>[]},emptyFactorOptions:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},shortcutData:{type:Array,default:()=>[]},showConfig:{type:Object,default:()=>({})},allowOperation:{type:Boolean,default:!0}},{visible:{default:!1},visibleModifiers:{}}),emits:e.mergeModels(["add","delete","enabled","closed","shortcutAdd","shortcutDelete"],["update:visible"]),setup(t,{emit:d}){const n=e.ref("ruleForm"),i=e.useModel(t,"visible"),p=d,m=t,g=Object.assign(Fe,m.showConfig),b=e.ref(null),s=e.ref({factorType:1,factorSelectedList:[],totalCount:1,minPrice:null,maxPrice:null,mark:null}),a=e.ref({factorType:[{required:!0,message:"请选择交易类型",trigger:"blur"}],factorSelectedList:[{required:!0,message:"请选择预警因子",trigger:"blur"}],totalCount:[{required:!0,message:"请填写预警次数",trigger:"blur"}]}),S=e.ref(null),f=e.ref({shortcutName:null,factorType:1,factorSelectedList:[],totalCount:1}),u=e.ref({factorType:[{required:!0,message:"请选择交易类型",trigger:"blur"}],factorSelectedList:[{required:!0,message:"请选择预警因子",trigger:"blur"}],totalCount:[{required:!0,message:"请填写预警次数",trigger:"blur"}],shortcutName:[{required:!0,message:"请填写配置名称",trigger:"blur"}]}),D=()=>{s.value={factorType:1,factorSelectedList:[],totalCount:1,minPrice:null,maxPrice:null,mark:null},f.value={shortcutName:null,factorType:1,factorSelectedList:[],totalCount:1}},M=async C=>{Object.assign(s.value,{factorSelectedList:[C],totalCount:3});const l={factorSelectedList:s.value.factorSelectedList.map(E=>({factorName:E,...s.value}))};x(b.value,l)},_=async C=>{const l=JSON.parse(C.data);Object.assign(s.value,{factorType:l.factorType,factorSelectedList:l.factorSelectedList,totalCount:l.totalCount});const E={factorSelectedList:s.value.factorSelectedList.map(h=>{let k=l.totalCount;const r=m.tableData.find(({factorExtendName:y})=>y===h);if(r){const y=r.totalCount-r.currentCount;y===0?k=l.totalCount:k=Math.min(l.totalCount,10-y>=0?10-y:0)}return{factorName:h,...s.value,totalCount:k}})};x(b.value,E)},x=de.G(async(C,l)=>{C&&await C.validate(E=>{if(!E)return!1;const h=l??{factorSelectedList:s.value.factorSelectedList.map(k=>({factorName:k,...s.value}))};p("add",h),l?D():i.value=!1})},200),I=async C=>{C&&await C.validate(l=>{if(!l)return!1;const E={shortcutName:f.value.shortcutName,data:JSON.stringify(f.value)};p("shortcutAdd",E),D()})},F=C=>{f.value=JSON.parse(C.data)},q=C=>{Me.confirm(`是否确认删除配置: ${C.shortcutName} ?`,"删除提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>p("shortcutDelete",C))};return e.watch(()=>i.value,C=>{C&&(n.value=m.allowOperation?"ruleForm":"table",D())},{immediate:!0}),(C,l)=>{const E=ke,h=le.ElButton,k=J.ElFormItem,r=j.ElCheckbox,y=j.ElCheckboxGroup,V=ue.ElInputNumber,O=J.ElText,P=ne.ElInput,R=J.ElForm,L=j.ElTableColumn,v=ce.ElPopconfirm,B=j.ElTable,N=w.ElIcon,U=oe.ElTooltip,ae=pe.ElTag,re=H.ElDialog,se=Q.ElConfigProvider;return e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(se,{locale:e.unref(Q.zhCn)},{default:e.withCtx(()=>[e.createVNode(re,{modelValue:i.value,"onUpdate:modelValue":l[17]||(l[17]=o=>i.value=o),width:"1020","align-center":"","destroy-on-close":"",onClosed:l[18]||(l[18]=o=>p("closed"))},{header:e.withCtx(({close:o,titleId:T,titleClass:Y})=>[e.createElementVNode("div",De,[e.createElementVNode("div",{class:e.normalizeClass(Y)},[Oe,e.createElementVNode("span",null,e.toDisplayString(t.title),1)],2),e.createVNode(E,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=ie=>n.value=ie),options:[{label:"添加",value:"ruleForm",disabled:!t.allowOperation},{label:"管理",value:"table",disabled:!1},{label:"快捷配置",value:"shortcut",disabled:!t.allowOperation}]},null,8,["modelValue","options"])])]),footer:e.withCtx(()=>[e.createElementVNode("div",ot,[e.createVNode(h,{onClick:l[14]||(l[14]=o=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1}),n.value==="ruleForm"?(e.openBlock(),e.createBlock(h,{key:0,type:"primary",onClick:l[15]||(l[15]=o=>e.unref(x)(b.value))},{default:e.withCtx(()=>[e.createTextVNode(" 确认 ")]),_:1})):e.createCommentVNode("",!0),n.value==="shortcut"?(e.openBlock(),e.createBlock(h,{key:1,type:"primary",onClick:l[16]||(l[16]=o=>I(S.value))},{default:e.withCtx(()=>[e.createTextVNode(" 保存配置 ")]),_:1})):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[n.value==="ruleForm"?(e.openBlock(),e.createBlock(R,{key:0,ref_key:"ruleFormRef",ref:b,model:s.value,rules:a.value,"label-width":"90px"},{default:e.withCtx(()=>[e.createVNode(k,{label:"交易类型:",prop:"factorType"},{default:e.withCtx(()=>[e.createVNode(h,{type:"danger",plain:s.value.factorType!==1,onClick:l[1]||(l[1]=()=>{s.value.factorType===-1&&(s.value.factorSelectedList=[]),s.value.factorType=1})},{default:e.withCtx(()=>[e.createTextVNode(" 多 ")]),_:1},8,["plain"]),e.createVNode(h,{type:"success",plain:s.value.factorType!==-1,onClick:l[2]||(l[2]=()=>{s.value.factorType===1&&(s.value.factorSelectedList=[]),s.value.factorType=-1})},{default:e.withCtx(()=>[e.createTextVNode(" 空 ")]),_:1},8,["plain"])]),_:1}),e.createVNode(k,{label:"预警因子:",prop:"factorSelectedList"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:s.value.factorSelectedList,"onUpdate:modelValue":l[3]||(l[3]=o=>s.value.factorSelectedList=o)},{default:e.withCtx(()=>[s.value.factorType===1?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.moreFactorOptions,(o,T)=>(e.openBlock(),e.createElementBlock("div",{class:"factor-checkbox",key:T},[e.createVNode(r,{label:o.factorTypeName,value:o.factorTypeName},{default:e.withCtx(()=>[e.createElementVNode("span",$e,e.toDisplayString(o.factorTypeName),1)]),_:2},1032,["label","value"]),e.createElementVNode("span",{class:"tag-button",onClick:Y=>M(o.factorTypeName)},"3次 +",8,qe)]))),128)):e.createCommentVNode("",!0),s.value.factorType===-1?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.emptyFactorOptions,(o,T)=>(e.openBlock(),e.createElementBlock("div",{class:"factor-checkbox",key:T},[e.createVNode(r,{label:o.factorTypeName,value:o.factorTypeName},{default:e.withCtx(()=>[e.createElementVNode("span",Ae,e.toDisplayString(o.factorTypeName),1)]),_:2},1032,["label","value"]),e.createElementVNode("span",{class:"tag-button",onClick:Y=>M(o.factorTypeName)},"3次 +",8,Pe)]))),128)):e.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1}),e.createVNode(k,{label:"预警次数:",prop:"totalCount"},{default:e.withCtx(()=>[e.createElementVNode("div",Re,[e.createVNode(V,{modelValue:s.value.totalCount,"onUpdate:modelValue":l[4]||(l[4]=o=>s.value.totalCount=o),min:1,"controls-position":"right",style:{"margin-right":"20px"}},null,8,["modelValue"]),t.shortcutData.length?(e.openBlock(),e.createElementBlock("div",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.shortcutData,o=>(e.openBlock(),e.createBlock(h,{key:o.id,onClick:T=>_(o),style:{margin:"0 12px 4px 0"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.shortcutName),1)]),_:2},1032,["onClick"]))),128))])):(e.openBlock(),e.createBlock(O,{key:1,type:"primary",style:{cursor:"pointer"},onClick:l[5]||(l[5]=()=>n.value="shortcut")},{default:e.withCtx(()=>[e.createTextVNode(" 暂无快捷配置, 是否点击前往自定义配置? ")]),_:1}))])]),_:1}),e.unref(g).ruleFormPrice?(e.openBlock(),e.createBlock(k,{key:0,label:"价格范围:"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:s.value.minPrice,"onUpdate:modelValue":l[6]||(l[6]=o=>s.value.minPrice=o),min:-999,placeholder:"请输入",max:999,"controls-position":"right"},null,8,["modelValue"]),He,e.createVNode(V,{modelValue:s.value.maxPrice,"onUpdate:modelValue":l[7]||(l[7]=o=>s.value.maxPrice=o),placeholder:"请输入",min:-999,max:999,"controls-position":"right"},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(g).ruleFormMark?(e.openBlock(),e.createBlock(k,{key:1,label:"备注:"},{default:e.withCtx(()=>[e.createVNode(P,{modelValue:s.value.mark,"onUpdate:modelValue":l[8]||(l[8]=o=>s.value.mark=o),type:"textarea",placeholder:"请输入关键字",rows:2,style:{width:"380px"}},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])):e.createCommentVNode("",!0),n.value==="table"?(e.openBlock(),e.createBlock(B,{key:1,data:t.tableData,size:"small"},{default:e.withCtx(()=>[e.createVNode(L,{label:"预警周期",width:"70"},{default:e.withCtx(o=>[e.createTextVNode(e.toDisplayString(o.row.freqName||"-"),1)]),_:1}),e.createVNode(L,{label:"交易类型",width:"70"},{default:e.withCtx(o=>[o.row.factorExtendValue==1?(e.openBlock(),e.createElementBlock("span",Ke,"多")):(e.openBlock(),e.createElementBlock("span",je,"空"))]),_:1}),e.createVNode(L,{label:"预警因子"},{default:e.withCtx(o=>[e.createTextVNode(e.toDisplayString(o.row.factorExtendName||"-"),1)]),_:1}),e.createVNode(L,{label:"预警次数",width:"70"},{default:e.withCtx(o=>[e.createTextVNode(e.toDisplayString(`${o.row.currentCount} / ${o.row.totalCount}`),1)]),_:1}),e.unref(g).tableStatus?(e.openBlock(),e.createBlock(L,{key:0,label:"状态",width:"70"},{default:e.withCtx(o=>[e.createElementVNode("div",null,[o.row.enable===1?(e.openBlock(),e.createElementBlock("span",Ge,"未触发")):o.row.enable===2?(e.openBlock(),e.createElementBlock("span",Xe,"已触发")):(e.openBlock(),e.createElementBlock("span",We,"-"))])]),_:1})):e.createCommentVNode("",!0),e.unref(g).tableCreateTime?(e.openBlock(),e.createBlock(L,{key:1,label:"设置时间",width:"136"},{default:e.withCtx(o=>[e.createTextVNode(e.toDisplayString(o.row.createdTime||"-"),1)]),_:1})):e.createCommentVNode("",!0),e.unref(g).tableMark?(e.openBlock(),e.createBlock(L,{key:2,label:"备注",width:"70"},{default:e.withCtx(o=>[e.createTextVNode(e.toDisplayString(o.row.mark||"-"),1)]),_:1})):e.createCommentVNode("",!0),t.allowOperation?(e.openBlock(),e.createBlock(L,{key:3,label:"操作",width:"140"},{default:e.withCtx(o=>[e.unref(g).tableEnable?(e.openBlock(),e.createBlock(h,{key:0,disabled:o.row.currentCount!==o.row.totalCount,size:"small",onClick:T=>p("enabled",o.row)},{default:e.withCtx(()=>[e.createTextVNode(" 启用 ")]),_:2},1032,["disabled","onClick"])):e.createCommentVNode("",!0),e.createVNode(v,{title:"确定删除?",onConfirm:T=>p("delete",o.row)},{reference:e.withCtx(()=>[e.createVNode(h,{size:"small"},{default:e.withCtx(()=>[e.createTextVNode("删除")]),_:1})]),_:2},1032,["onConfirm"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["data"])):e.createCommentVNode("",!0),n.value==="shortcut"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",Ye,[Je,e.createVNode(U,{effect:"dark",content:"如有配置数据, 可点击查看该配置的具体信息",placement:"right-start"},{default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.info_filled_default))]),_:1})]),_:1})]),e.createElementVNode("div",Ze,[t.shortcutData.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.shortcutData,o=>(e.openBlock(),e.createBlock(ae,{key:o.id,type:"primary",closable:"",onClick:T=>F(o),onClose:T=>q(o)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.shortcutName),1)]),_:2},1032,["onClick","onClose"]))),128)):(e.openBlock(),e.createElementBlock("span",Qe,"暂无数据"))]),e.createElementVNode("div",et,[tt,e.createVNode(U,{effect:"dark",content:"同名配置将会进行覆盖",placement:"right-start"},{default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.info_filled_default))]),_:1})]),_:1})]),e.createVNode(R,{ref_key:"shortcut_ruleFormRef",ref:S,model:f.value,rules:u.value,"label-width":"90px"},{default:e.withCtx(()=>[e.createVNode(k,{label:"配置名称:",prop:"shortcutName"},{default:e.withCtx(()=>[e.createVNode(P,{modelValue:f.value.shortcutName,"onUpdate:modelValue":l[9]||(l[9]=o=>f.value.shortcutName=o),maxlength:"6","show-word-limit":"",style:{width:"160px"}},null,8,["modelValue"])]),_:1}),e.createVNode(k,{label:"交易类型:",prop:"factorType"},{default:e.withCtx(()=>[e.createVNode(h,{type:"danger",plain:f.value.factorType!==1,onClick:l[10]||(l[10]=()=>{f.value.factorType===-1&&(f.value.factorSelectedList=[]),f.value.factorType=1})},{default:e.withCtx(()=>[e.createTextVNode(" 多 ")]),_:1},8,["plain"]),e.createVNode(h,{type:"success",plain:f.value.factorType!==-1,onClick:l[11]||(l[11]=()=>{f.value.factorType===1&&(f.value.factorSelectedList=[]),f.value.factorType=-1})},{default:e.withCtx(()=>[e.createTextVNode(" 空 ")]),_:1},8,["plain"])]),_:1}),e.createVNode(k,{label:"预警因子:",prop:"factorSelectedList"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:f.value.factorSelectedList,"onUpdate:modelValue":l[12]||(l[12]=o=>f.value.factorSelectedList=o)},{default:e.withCtx(()=>[f.value.factorType===1?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.moreFactorOptions,(o,T)=>(e.openBlock(),e.createBlock(r,{key:T,label:o.factorTypeName,value:o.factorTypeName,style:{width:"200px"}},null,8,["label","value"]))),128)):e.createCommentVNode("",!0),f.value.factorType===-1?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.emptyFactorOptions,(o,T)=>(e.openBlock(),e.createBlock(r,{key:T,label:o.factorTypeName,value:o.factorTypeName,style:{width:"200px"}},null,8,["label","value"]))),128)):e.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1}),e.createVNode(k,{label:"预警次数:",prop:"totalCount"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:f.value.totalCount,"onUpdate:modelValue":l[13]||(l[13]=o=>f.value.totalCount=o),min:1,max:10,"controls-position":"right",style:{"margin-right":"20px"}},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])],64)):e.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1},8,["locale"])])}}},nt=me._export_sfc(lt,[["__scopeId","data-v-fea2a84d"]]),at={install(t){t.component("st-factorWarning",nt)}};module.exports=at;
|
|
1
|
+
"use strict";const c=require("./base-ec05f348.cjs"),Q=require("./zh-cn-ab9a583d.cjs"),H=require("./el-overlay-891dcc40.cjs");require("./el-tag-3b03d13e.cjs");require("./el-tooltip-0ea8fbf8.cjs");const oe=require("./el-popper-f62316cd.cjs"),j=require("./el-table-column-dd8b62aa.cjs"),ee=require("./el-scrollbar-d1c3e7f7.cjs"),ce=require("./el-popover-8735b1fa.cjs"),le=require("./el-button-196807af.cjs"),J=require("./el-form-item-7d32befa.cjs"),ne=require("./el-input-6c6f5bda.cjs"),ue=require("./el-input-number-0524d787.cjs"),e=require("vue"),w=require("./use-form-common-props-1b84d8f4.cjs"),de=require("./index-a96158ae.cjs"),me=require("./_plugin-vue_export-helper-f246444f.cjs"),G=require("./index-e1e83173.cjs"),fe=require("./index-8a0b1c53.cjs"),X=require("./event-61f49698.cjs"),pe=require("./index-80a2b137.cjs");require("./config-provider-7cdfca4d.cjs");require("./vnode-7fbc61e1.cjs");require("./refs-d00b710b.cjs");require("./scroll-41224831.cjs");require("./debounce-b2ff12bd.cjs");require("./raf-8fc301fd.cjs");require("./index-eea0bcb3.cjs");require("./castArray-a45823fe.cjs");require("./typescript-b63f8e83.cjs");const ve=t=>["",...w.componentSizes].includes(t),ge=c.buildProps({direction:{type:c.definePropType(String),default:"horizontal"},options:{type:c.definePropType(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},block:Boolean,size:w.useSizeProp,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...oe.useAriaProps(["ariaLabel"])}),Ce={[X.UPDATE_MODEL_EVENT]:t=>c.isString(t)||c.isNumber(t)||c.isBoolean(t),[X.CHANGE_EVENT]:t=>c.isString(t)||c.isNumber(t)||c.isBoolean(t)},he=e.defineComponent({name:"ElSegmented"}),ye=e.defineComponent({...he,props:ge,emits:Ce,setup(t,{emit:d}){const n=t,i=c.useNamespace("segmented"),p=c.useId(),m=w.useFormSize(),g=w.useFormDisabled(),{formItem:b}=w.useFormItem(),{inputId:s,isLabeledByFormItem:a}=w.useFormItemInputId(n,{formItemContext:b}),S=e.ref(null),f=ee.useActiveElement(),u=e.reactive({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),D=r=>{const y=z(r);d(X.UPDATE_MODEL_EVENT,y),d(X.CHANGE_EVENT,y)},z=r=>c.isObject(r)?r.value:r,_=r=>c.isObject(r)?r.label:r,x=r=>!!(g.value||c.isObject(r)&&r.disabled),I=r=>n.modelValue===z(r),M=r=>n.options.find(y=>z(y)===r),q=r=>[i.e("item"),i.is("selected",I(r)),i.is("disabled",x(r))],C=()=>{if(!S.value)return;const r=S.value.querySelector(".is-selected"),y=S.value.querySelector(".is-selected input");if(!r||!y){u.width=0,u.height=0,u.translateX=0,u.translateY=0,u.focusVisible=!1;return}const V=r.getBoundingClientRect();u.isInit=!0,n.direction==="vertical"?(u.height=V.height,u.translateY=r.offsetTop):(u.width=V.width,u.translateX=r.offsetLeft);try{u.focusVisible=y.matches(":focus-visible")}catch{}},l=e.computed(()=>[i.b(),i.m(m.value),i.is("block",n.block)]),E=e.computed(()=>({width:n.direction==="vertical"?"100%":`${u.width}px`,height:n.direction==="vertical"?`${u.height}px`:"100%",transform:n.direction==="vertical"?`translateY(${u.translateY}px)`:`translateX(${u.translateX}px)`,display:u.isInit?"block":"none"})),h=e.computed(()=>[i.e("item-selected"),i.is("disabled",x(M(n.modelValue))),i.is("focus-visible",u.focusVisible)]),k=e.computed(()=>n.name||p.value);return ee.useResizeObserver(S,C),e.watch(f,C),e.watch(()=>n.modelValue,()=>{var r;C(),n.validateEvent&&((r=b==null?void 0:b.validate)==null||r.call(b,"change").catch(y=>c.debugWarn(y)))},{flush:"post"}),(r,y)=>r.options.length?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(s),ref_key:"segmentedRef",ref:S,class:e.normalizeClass(e.unref(l)),role:"radiogroup","aria-label":e.unref(a)?void 0:r.ariaLabel||"segmented","aria-labelledby":e.unref(a)?e.unref(b).labelId:void 0},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(i).e("group"),e.unref(i).m(n.direction)])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(E)),class:e.normalizeClass(e.unref(h))},null,6),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.options,(V,O)=>(e.openBlock(),e.createElementBlock("label",{key:O,class:e.normalizeClass(q(V))},[e.createElementVNode("input",{class:e.normalizeClass(e.unref(i).e("item-input")),type:"radio",name:e.unref(k),disabled:x(V),checked:I(V),onChange:P=>D(V)},null,42,["name","disabled","checked","onChange"]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(i).e("item-label"))},[e.renderSlot(r.$slots,"default",{item:V},()=>[e.createTextVNode(e.toDisplayString(_(V)),1)])],2)],2))),128))],2)],10,["id","aria-label","aria-labelledby"])):e.createCommentVNode("v-if",!0)}});var be=c._export_sfc(ye,[["__file","segmented.vue"]]);const ke=c.withInstall(be),Z="_trap-focus-children",$=[],te=t=>{var d;if($.length===0)return;const n=$[$.length-1][Z];if(n.length>0&&t.code===G.EVENT_CODE.tab){if(n.length===1){t.preventDefault(),document.activeElement!==n[0]&&n[0].focus();return}const i=t.shiftKey,p=t.target===n[0],m=t.target===n[n.length-1];if(p&&i&&(t.preventDefault(),n[n.length-1].focus()),m&&!i&&(t.preventDefault(),n[0].focus()),process.env.NODE_ENV==="test"){const g=n.indexOf(t.target);g!==-1&&((d=n[i?g-1:g+1])==null||d.focus())}}},Ve={beforeMount(t){t[Z]=G.obtainAllFocusableElements(t),$.push(t),$.length<=1&&document.addEventListener("keydown",te)},updated(t){e.nextTick(()=>{t[Z]=G.obtainAllFocusableElements(t)})},unmounted(){$.shift(),$.length===0&&document.removeEventListener("keydown",te)}},we=e.defineComponent({name:"ElMessageBox",directives:{TrapFocus:Ve},components:{ElButton:le.ElButton,ElFocusTrap:G.ElFocusTrap,ElInput:ne.ElInput,ElOverlay:H.ElOverlay,ElIcon:w.ElIcon,...w.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:ve},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(t,{emit:d}){const{locale:n,zIndex:i,ns:p,size:m}=fe.useGlobalComponentSettings("message-box",e.computed(()=>t.buttonSize)),{t:g}=n,{nextZIndex:b}=i,s=e.ref(!1),a=e.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:e.markRaw(w.loading_default),cancelButtonLoadingIcon:e.markRaw(w.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:b()}),S=e.computed(()=>{const v=a.type;return{[p.bm("icon",v)]:v&&w.TypeComponentsMap[v]}}),f=c.useId(),u=c.useId(),D=e.computed(()=>{const v=a.type;return a.icon||v&&w.TypeComponentsMap[v]||""}),z=e.computed(()=>!!a.message),_=e.ref(),x=e.ref(),I=e.ref(),M=e.ref(),q=e.ref(),C=e.computed(()=>a.confirmButtonClass);e.watch(()=>a.inputValue,async v=>{await e.nextTick(),t.boxType==="prompt"&&v!==null&&O()},{immediate:!0}),e.watch(()=>s.value,v=>{var B,N;v&&(t.boxType!=="prompt"&&(a.autofocus?I.value=(N=(B=q.value)==null?void 0:B.$el)!=null?N:_.value:I.value=_.value),a.zIndex=b()),t.boxType==="prompt"&&(v?e.nextTick().then(()=>{var U;M.value&&M.value.$el&&(a.autofocus?I.value=(U=P())!=null?U:_.value:I.value=_.value)}):(a.editorErrorMessage="",a.validateError=!1))});const l=e.computed(()=>t.draggable),E=e.computed(()=>t.overflow);H.useDraggable(_,x,l,E),e.onMounted(async()=>{await e.nextTick(),t.closeOnHashChange&&window.addEventListener("hashchange",h)}),e.onBeforeUnmount(()=>{t.closeOnHashChange&&window.removeEventListener("hashchange",h)});function h(){s.value&&(s.value=!1,e.nextTick(()=>{a.action&&d("action",a.action)}))}const k=()=>{t.closeOnClickModal&&V(a.distinguishCancelAndClose?"close":"cancel")},r=H.useSameTarget(k),y=v=>{if(a.inputType!=="textarea")return v.preventDefault(),V("confirm")},V=v=>{var B;t.boxType==="prompt"&&v==="confirm"&&!O()||(a.action=v,a.beforeClose?(B=a.beforeClose)==null||B.call(a,v,a,h):h())},O=()=>{if(t.boxType==="prompt"){const v=a.inputPattern;if(v&&!v.test(a.inputValue||""))return a.editorErrorMessage=a.inputErrorMessage||g("el.messagebox.error"),a.validateError=!0,!1;const B=a.inputValidator;if(c.isFunction(B)){const N=B(a.inputValue);if(N===!1)return a.editorErrorMessage=a.inputErrorMessage||g("el.messagebox.error"),a.validateError=!0,!1;if(c.isString(N))return a.editorErrorMessage=N,a.validateError=!0,!1}}return a.editorErrorMessage="",a.validateError=!1,!0},P=()=>{var v,B;const N=(v=M.value)==null?void 0:v.$refs;return(B=N==null?void 0:N.input)!=null?B:N==null?void 0:N.textarea},R=()=>{V("close")},L=()=>{t.closeOnPressEscape&&R()};return t.lockScroll&&H.useLockscreen(s),{...e.toRefs(a),ns:p,overlayEvent:r,visible:s,hasMessage:z,typeClass:S,contentId:f,inputId:u,btnSize:m,iconComponent:D,confirmButtonClasses:C,rootRef:_,focusStartRef:I,headerRef:x,inputRef:M,confirmRef:q,doClose:h,handleClose:R,onCloseRequested:L,handleWrapperClick:k,handleInputEnter:y,handleAction:V,t:g}}});function Ne(t,d,n,i,p,m){const g=e.resolveComponent("el-icon"),b=e.resolveComponent("close"),s=e.resolveComponent("el-input"),a=e.resolveComponent("el-button"),S=e.resolveComponent("el-focus-trap"),f=e.resolveComponent("el-overlay");return e.openBlock(),e.createBlock(e.Transition,{name:"fade-in-linear",onAfterLeave:u=>t.$emit("vanish"),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(f,{"z-index":t.zIndex,"overlay-class":[t.ns.is("message-box"),t.modalClass],mask:t.modal},{default:e.withCtx(()=>[e.createElementVNode("div",{role:"dialog","aria-label":t.title,"aria-modal":"true","aria-describedby":t.showInput?void 0:t.contentId,class:e.normalizeClass(`${t.ns.namespace.value}-overlay-message-box`),onClick:t.overlayEvent.onClick,onMousedown:t.overlayEvent.onMousedown,onMouseup:t.overlayEvent.onMouseup},[e.createVNode(S,{loop:"",trapped:t.visible,"focus-trap-el":t.rootRef,"focus-start-el":t.focusStartRef,onReleaseRequested:t.onCloseRequested},{default:e.withCtx(()=>[e.createElementVNode("div",{ref:"rootRef",class:e.normalizeClass([t.ns.b(),t.customClass,t.ns.is("draggable",t.draggable),{[t.ns.m("center")]:t.center}]),style:e.normalizeStyle(t.customStyle),tabindex:"-1",onClick:e.withModifiers(()=>{},["stop"])},[t.title!==null&&t.title!==void 0?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"headerRef",class:e.normalizeClass([t.ns.e("header"),{"show-close":t.showClose}])},[e.createElementVNode("div",{class:e.normalizeClass(t.ns.e("title"))},[t.iconComponent&&t.center?(e.openBlock(),e.createBlock(g,{key:0,class:e.normalizeClass([t.ns.e("status"),t.typeClass])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconComponent)))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.createElementVNode("span",null,e.toDisplayString(t.title),1)],2),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(t.ns.e("headerbtn")),"aria-label":t.t("el.messagebox.close"),onClick:u=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),onKeydown:e.withKeys(e.withModifiers(u=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[e.createVNode(g,{class:e.normalizeClass(t.ns.e("close"))},{default:e.withCtx(()=>[e.createVNode(b)]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):e.createCommentVNode("v-if",!0)],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{id:t.contentId,class:e.normalizeClass(t.ns.e("content"))},[e.createElementVNode("div",{class:e.normalizeClass(t.ns.e("container"))},[t.iconComponent&&!t.center&&t.hasMessage?(e.openBlock(),e.createBlock(g,{key:0,class:e.normalizeClass([t.ns.e("status"),t.typeClass])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconComponent)))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),t.hasMessage?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(t.ns.e("message"))},[e.renderSlot(t.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.showInput?"label":"p"),{key:1,for:t.showInput?t.inputId:void 0,innerHTML:t.message},null,8,["for","innerHTML"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.showInput?"label":"p"),{key:0,for:t.showInput?t.inputId:void 0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.dangerouslyUseHTMLString?"":t.message),1)]),_:1},8,["for"]))])],2)):e.createCommentVNode("v-if",!0)],2),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(t.ns.e("input"))},[e.createVNode(s,{id:t.inputId,ref:"inputRef",modelValue:t.inputValue,"onUpdate:modelValue":u=>t.inputValue=u,type:t.inputType,placeholder:t.inputPlaceholder,"aria-invalid":t.validateError,class:e.normalizeClass({invalid:t.validateError}),onKeydown:e.withKeys(t.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),e.createElementVNode("div",{class:e.normalizeClass(t.ns.e("errormsg")),style:e.normalizeStyle({visibility:t.editorErrorMessage?"visible":"hidden"})},e.toDisplayString(t.editorErrorMessage),7)],2),[[e.vShow,t.showInput]])],10,["id"]),e.createElementVNode("div",{class:e.normalizeClass(t.ns.e("btns"))},[t.showCancelButton?(e.openBlock(),e.createBlock(a,{key:0,loading:t.cancelButtonLoading,"loading-icon":t.cancelButtonLoadingIcon,class:e.normalizeClass([t.cancelButtonClass]),round:t.roundButton,size:t.btnSize,onClick:u=>t.handleAction("cancel"),onKeydown:e.withKeys(e.withModifiers(u=>t.handleAction("cancel"),["prevent"]),["enter"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelButtonText||t.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):e.createCommentVNode("v-if",!0),e.withDirectives(e.createVNode(a,{ref:"confirmRef",type:"primary",loading:t.confirmButtonLoading,"loading-icon":t.confirmButtonLoadingIcon,class:e.normalizeClass([t.confirmButtonClasses]),round:t.roundButton,disabled:t.confirmButtonDisabled,size:t.btnSize,onClick:u=>t.handleAction("confirm"),onKeydown:e.withKeys(e.withModifiers(u=>t.handleAction("confirm"),["prevent"]),["enter"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.confirmButtonText||t.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[e.vShow,t.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[e.vShow,t.visible]])]),_:3},8,["onAfterLeave"])}var Ee=c._export_sfc(we,[["render",Ne],["__file","index.vue"]]);const K=new Map,Be=t=>{let d=document.body;return t.appendTo&&(c.isString(t.appendTo)&&(d=document.querySelector(t.appendTo)),c.isElement(t.appendTo)&&(d=t.appendTo),c.isElement(d)||(c.debugWarn("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),d=document.body)),d},Te=(t,d,n=null)=>{const i=e.createVNode(Ee,t,c.isFunction(t.message)||e.isVNode(t.message)?{default:c.isFunction(t.message)?t.message:()=>t.message}:null);return i.appContext=n,e.render(i,d),Be(t).appendChild(d.firstElementChild),i.component},Se=()=>document.createElement("div"),_e=(t,d)=>{const n=Se();t.onVanish=()=>{e.render(null,n),K.delete(p)},t.onAction=m=>{const g=K.get(p);let b;t.showInput?b={value:p.inputValue,action:m}:b=m,t.callback?t.callback(b,i.proxy):m==="cancel"||m==="close"?t.distinguishCancelAndClose&&m!=="cancel"?g.reject("close"):g.reject("cancel"):g.resolve(b)};const i=Te(t,n,d),p=i.proxy;for(const m in t)c.hasOwn(t,m)&&!c.hasOwn(p.$props,m)&&(p[m]=t[m]);return p.visible=!0,p};function A(t,d=null){if(!c.isClient)return Promise.reject();let n;return c.isString(t)||e.isVNode(t)?t={message:t}:n=t.callback,new Promise((i,p)=>{const m=_e(t,d??A._context);K.set(m,{options:t,callback:n,resolve:i,reject:p})})}const xe=["alert","confirm","prompt"],Ie={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};xe.forEach(t=>{A[t]=Le(t)});function Le(t){return(d,n,i,p)=>{let m="";return c.isObject(n)?(i=n,m=""):c.isUndefined(n)?m="":m=n,A(Object.assign({title:m,message:d,type:"",...Ie[t]},i,{boxType:t}),p)}}A.close=()=>{K.forEach((t,d)=>{d.doClose()}),K.clear()};A._context=null;const F=A;F.install=t=>{F._context=t._context,t.config.globalProperties.$msgbox=F,t.config.globalProperties.$messageBox=F,t.config.globalProperties.$alert=F.alert,t.config.globalProperties.$confirm=F.confirm,t.config.globalProperties.$prompt=F.prompt};const ze=F;const Me={ruleFormPrice:!0,ruleFormMark:!0,tableStatus:!0,tableCreateTime:!0,tableMark:!0,tableEnable:!0};const W=t=>(e.pushScopeId("data-v-8488c0aa"),t=t(),e.popScopeId(),t),Fe={class:"st-factorWarning"},De={class:"custom-header"},Oe=W(()=>e.createElementVNode("span",{style:{"margin-right":"4px"}},"因子预警",-1)),$e={class:"factor-name"},qe=["onClick"],Ae={class:"factor-name"},Pe=["onClick"],Re={style:{display:"flex","align-items":"start"}},Ue={key:0,style:{flex:"1"}},He=W(()=>e.createElementVNode("span",{style:{margin:"0 5px"}},"~",-1)),Ke={key:0,style:{color:"#f56c6c"}},je={key:1,style:{color:"#67c23a"}},Ge={key:0},Xe={key:1},We={key:2},Ye={class:"shortcut-title"},Je=W(()=>e.createElementVNode("span",null,"我的配置",-1)),Ze={class:"shortcut-config"},Qe={key:1,class:"empty"},et={class:"shortcut-title"},tt=W(()=>e.createElementVNode("span",null,"新增配置",-1)),ot={class:"custom-footer"},lt={__name:"index",props:e.mergeModels({title:{type:[String,null],default:null},moreFactorOptions:{type:Array,default:()=>[]},emptyFactorOptions:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},shortcutData:{type:Array,default:()=>[]},showConfig:{type:Object,default:()=>({})},allowOperation:{type:Boolean,default:!0}},{visible:{default:!1},visibleModifiers:{}}),emits:e.mergeModels(["add","delete","enabled","closed","shortcutAdd","shortcutDelete"],["update:visible"]),setup(t,{emit:d}){const n=e.ref("ruleForm"),i=e.useModel(t,"visible"),p=d,m=t,g=Object.assign(Me,m.showConfig),b=e.ref(null),s=e.ref({factorType:1,factorSelectedList:[],totalCount:1,minPrice:null,maxPrice:null,mark:null}),a=e.ref({factorType:[{required:!0,message:"请选择交易类型",trigger:"blur"}],factorSelectedList:[{required:!0,message:"请选择预警因子",trigger:"blur"}],totalCount:[{required:!0,message:"请填写预警次数",trigger:"blur"}]}),S=e.ref(null),f=e.ref({shortcutName:null,factorType:1,factorSelectedList:[],totalCount:1}),u=e.ref({factorType:[{required:!0,message:"请选择交易类型",trigger:"blur"}],factorSelectedList:[{required:!0,message:"请选择预警因子",trigger:"blur"}],totalCount:[{required:!0,message:"请填写预警次数",trigger:"blur"}],shortcutName:[{required:!0,message:"请填写配置名称",trigger:"blur"}]}),D=()=>{s.value={factorType:1,factorSelectedList:[],totalCount:1,minPrice:null,maxPrice:null,mark:null},f.value={shortcutName:null,factorType:1,factorSelectedList:[],totalCount:1}},z=async C=>{Object.assign(s.value,{factorSelectedList:[C],totalCount:3});const l={factorSelectedList:s.value.factorSelectedList.map(E=>({factorName:E,...s.value}))};x(b.value,l)},_=async C=>{const l=JSON.parse(C.data);Object.assign(s.value,{factorType:l.factorType,factorSelectedList:l.factorSelectedList,totalCount:l.totalCount});const E={factorSelectedList:s.value.factorSelectedList.map(h=>{let k=l.totalCount;const r=m.tableData.find(({factorExtendName:y})=>y===h);if(r){const y=r.totalCount-r.currentCount;y===0?k=l.totalCount:k=Math.min(l.totalCount,10-y>=0?10-y:0)}return{factorName:h,...s.value,totalCount:k}})};x(b.value,E)},x=de.G(async(C,l)=>{C&&await C.validate(E=>{if(!E)return!1;const h=l??{factorSelectedList:s.value.factorSelectedList.map(k=>({factorName:k,...s.value}))};p("add",h),l?D():i.value=!1})},200),I=async C=>{C&&await C.validate(l=>{if(!l)return!1;const E={shortcutName:f.value.shortcutName,data:JSON.stringify(f.value)};p("shortcutAdd",E),D()})},M=C=>{f.value=JSON.parse(C.data)},q=C=>{ze.confirm(`是否确认删除配置: ${C.shortcutName} ?`,"删除提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>p("shortcutDelete",C))};return e.watch(()=>i.value,C=>{C&&(n.value=m.allowOperation?"ruleForm":"table",D())},{immediate:!0}),(C,l)=>{const E=ke,h=le.ElButton,k=J.ElFormItem,r=j.ElCheckbox,y=j.ElCheckboxGroup,V=ue.ElInputNumber,O=J.ElText,P=ne.ElInput,R=J.ElForm,L=j.ElTableColumn,v=ce.ElPopconfirm,B=j.ElTable,N=w.ElIcon,U=oe.ElTooltip,ae=pe.ElTag,re=H.ElDialog,se=Q.ElConfigProvider;return e.openBlock(),e.createElementBlock("div",Fe,[e.createVNode(se,{locale:e.unref(Q.zhCn)},{default:e.withCtx(()=>[e.createVNode(re,{modelValue:i.value,"onUpdate:modelValue":l[17]||(l[17]=o=>i.value=o),width:"1020","align-center":"","destroy-on-close":"",onClosed:l[18]||(l[18]=o=>p("closed"))},{header:e.withCtx(({close:o,titleId:T,titleClass:Y})=>[e.createElementVNode("div",De,[e.createElementVNode("div",{class:e.normalizeClass(Y)},[Oe,e.createElementVNode("span",null,e.toDisplayString(t.title),1)],2),e.createVNode(E,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=ie=>n.value=ie),size:"default",options:[{label:"添加",value:"ruleForm",disabled:!t.allowOperation},{label:"管理",value:"table",disabled:!1},{label:"快捷配置",value:"shortcut",disabled:!t.allowOperation}]},null,8,["modelValue","options"])])]),footer:e.withCtx(()=>[e.createElementVNode("div",ot,[e.createVNode(h,{size:"default",onClick:l[14]||(l[14]=o=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1}),n.value==="ruleForm"?(e.openBlock(),e.createBlock(h,{key:0,size:"default",type:"primary",onClick:l[15]||(l[15]=o=>e.unref(x)(b.value))},{default:e.withCtx(()=>[e.createTextVNode(" 确认 ")]),_:1})):e.createCommentVNode("",!0),n.value==="shortcut"?(e.openBlock(),e.createBlock(h,{key:1,size:"default",type:"primary",onClick:l[16]||(l[16]=o=>I(S.value))},{default:e.withCtx(()=>[e.createTextVNode(" 保存配置 ")]),_:1})):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[n.value==="ruleForm"?(e.openBlock(),e.createBlock(R,{key:0,ref_key:"ruleFormRef",ref:b,model:s.value,rules:a.value,size:"default","label-width":"90px"},{default:e.withCtx(()=>[e.createVNode(k,{label:"交易类型:",prop:"factorType"},{default:e.withCtx(()=>[e.createVNode(h,{type:"danger",plain:s.value.factorType!==1,onClick:l[1]||(l[1]=()=>{s.value.factorType===-1&&(s.value.factorSelectedList=[]),s.value.factorType=1})},{default:e.withCtx(()=>[e.createTextVNode(" 多 ")]),_:1},8,["plain"]),e.createVNode(h,{type:"success",plain:s.value.factorType!==-1,onClick:l[2]||(l[2]=()=>{s.value.factorType===1&&(s.value.factorSelectedList=[]),s.value.factorType=-1})},{default:e.withCtx(()=>[e.createTextVNode(" 空 ")]),_:1},8,["plain"])]),_:1}),e.createVNode(k,{label:"预警因子:",prop:"factorSelectedList"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:s.value.factorSelectedList,"onUpdate:modelValue":l[3]||(l[3]=o=>s.value.factorSelectedList=o)},{default:e.withCtx(()=>[s.value.factorType===1?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.moreFactorOptions,(o,T)=>(e.openBlock(),e.createElementBlock("div",{class:"factor-checkbox",key:T},[e.createVNode(r,{label:o.factorTypeName,value:o.factorTypeName},{default:e.withCtx(()=>[e.createElementVNode("span",$e,e.toDisplayString(o.factorTypeName),1)]),_:2},1032,["label","value"]),e.createElementVNode("span",{class:"tag-button",onClick:Y=>z(o.factorTypeName)},"3次 +",8,qe)]))),128)):e.createCommentVNode("",!0),s.value.factorType===-1?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.emptyFactorOptions,(o,T)=>(e.openBlock(),e.createElementBlock("div",{class:"factor-checkbox",key:T},[e.createVNode(r,{label:o.factorTypeName,value:o.factorTypeName},{default:e.withCtx(()=>[e.createElementVNode("span",Ae,e.toDisplayString(o.factorTypeName),1)]),_:2},1032,["label","value"]),e.createElementVNode("span",{class:"tag-button",onClick:Y=>z(o.factorTypeName)},"3次 +",8,Pe)]))),128)):e.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1}),e.createVNode(k,{label:"预警次数:",prop:"totalCount"},{default:e.withCtx(()=>[e.createElementVNode("div",Re,[e.createVNode(V,{modelValue:s.value.totalCount,"onUpdate:modelValue":l[4]||(l[4]=o=>s.value.totalCount=o),min:1,"controls-position":"right",style:{"margin-right":"20px"}},null,8,["modelValue"]),t.shortcutData.length?(e.openBlock(),e.createElementBlock("div",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.shortcutData,o=>(e.openBlock(),e.createBlock(h,{key:o.id,onClick:T=>_(o),style:{margin:"0 12px 4px 0"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.shortcutName),1)]),_:2},1032,["onClick"]))),128))])):(e.openBlock(),e.createBlock(O,{key:1,type:"primary",style:{cursor:"pointer"},onClick:l[5]||(l[5]=()=>n.value="shortcut")},{default:e.withCtx(()=>[e.createTextVNode(" 暂无快捷配置, 是否点击前往自定义配置? ")]),_:1}))])]),_:1}),e.unref(g).ruleFormPrice?(e.openBlock(),e.createBlock(k,{key:0,label:"价格范围:"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:s.value.minPrice,"onUpdate:modelValue":l[6]||(l[6]=o=>s.value.minPrice=o),min:-999,placeholder:"请输入",max:999,"controls-position":"right"},null,8,["modelValue"]),He,e.createVNode(V,{modelValue:s.value.maxPrice,"onUpdate:modelValue":l[7]||(l[7]=o=>s.value.maxPrice=o),placeholder:"请输入",min:-999,max:999,"controls-position":"right"},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(g).ruleFormMark?(e.openBlock(),e.createBlock(k,{key:1,label:"备注:"},{default:e.withCtx(()=>[e.createVNode(P,{modelValue:s.value.mark,"onUpdate:modelValue":l[8]||(l[8]=o=>s.value.mark=o),type:"textarea",placeholder:"请输入关键字",rows:2,style:{width:"380px"}},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])):e.createCommentVNode("",!0),n.value==="table"?(e.openBlock(),e.createBlock(B,{key:1,data:t.tableData,size:"small"},{default:e.withCtx(()=>[e.createVNode(L,{label:"预警周期",width:"70"},{default:e.withCtx(o=>[e.createTextVNode(e.toDisplayString(o.row.freqName||"-"),1)]),_:1}),e.createVNode(L,{label:"交易类型",width:"70"},{default:e.withCtx(o=>[o.row.factorExtendValue==1?(e.openBlock(),e.createElementBlock("span",Ke,"多")):(e.openBlock(),e.createElementBlock("span",je,"空"))]),_:1}),e.createVNode(L,{label:"预警因子"},{default:e.withCtx(o=>[e.createTextVNode(e.toDisplayString(o.row.factorExtendName||"-"),1)]),_:1}),e.createVNode(L,{label:"预警次数",width:"70"},{default:e.withCtx(o=>[e.createTextVNode(e.toDisplayString(`${o.row.currentCount} / ${o.row.totalCount}`),1)]),_:1}),e.unref(g).tableStatus?(e.openBlock(),e.createBlock(L,{key:0,label:"状态",width:"70"},{default:e.withCtx(o=>[e.createElementVNode("div",null,[o.row.enable===1?(e.openBlock(),e.createElementBlock("span",Ge,"未触发")):o.row.enable===2?(e.openBlock(),e.createElementBlock("span",Xe,"已触发")):(e.openBlock(),e.createElementBlock("span",We,"-"))])]),_:1})):e.createCommentVNode("",!0),e.unref(g).tableCreateTime?(e.openBlock(),e.createBlock(L,{key:1,label:"设置时间",width:"136"},{default:e.withCtx(o=>[e.createTextVNode(e.toDisplayString(o.row.createdTime||"-"),1)]),_:1})):e.createCommentVNode("",!0),e.unref(g).tableMark?(e.openBlock(),e.createBlock(L,{key:2,label:"备注",width:"70"},{default:e.withCtx(o=>[e.createTextVNode(e.toDisplayString(o.row.mark||"-"),1)]),_:1})):e.createCommentVNode("",!0),t.allowOperation?(e.openBlock(),e.createBlock(L,{key:3,label:"操作",width:"140"},{default:e.withCtx(o=>[e.unref(g).tableEnable?(e.openBlock(),e.createBlock(h,{key:0,disabled:o.row.currentCount!==o.row.totalCount,size:"small",onClick:T=>p("enabled",o.row)},{default:e.withCtx(()=>[e.createTextVNode(" 启用 ")]),_:2},1032,["disabled","onClick"])):e.createCommentVNode("",!0),e.createVNode(v,{title:"确定删除?",onConfirm:T=>p("delete",o.row)},{reference:e.withCtx(()=>[e.createVNode(h,{size:"small"},{default:e.withCtx(()=>[e.createTextVNode("删除")]),_:1})]),_:2},1032,["onConfirm"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["data"])):e.createCommentVNode("",!0),n.value==="shortcut"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",Ye,[Je,e.createVNode(U,{effect:"dark",content:"如有配置数据, 可点击查看该配置的具体信息",placement:"right-start"},{default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.info_filled_default))]),_:1})]),_:1})]),e.createElementVNode("div",Ze,[t.shortcutData.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.shortcutData,o=>(e.openBlock(),e.createBlock(ae,{key:o.id,type:"primary",size:"default",closable:"",onClick:T=>M(o),onClose:T=>q(o)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.shortcutName),1)]),_:2},1032,["onClick","onClose"]))),128)):(e.openBlock(),e.createElementBlock("span",Qe,"暂无数据"))]),e.createElementVNode("div",et,[tt,e.createVNode(U,{effect:"dark",content:"同名配置将会进行覆盖",placement:"right-start"},{default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.info_filled_default))]),_:1})]),_:1})]),e.createVNode(R,{ref_key:"shortcut_ruleFormRef",ref:S,model:f.value,rules:u.value,"label-width":"90px",size:"default"},{default:e.withCtx(()=>[e.createVNode(k,{label:"配置名称:",prop:"shortcutName"},{default:e.withCtx(()=>[e.createVNode(P,{modelValue:f.value.shortcutName,"onUpdate:modelValue":l[9]||(l[9]=o=>f.value.shortcutName=o),maxlength:"6","show-word-limit":"",style:{width:"160px"}},null,8,["modelValue"])]),_:1}),e.createVNode(k,{label:"交易类型:",prop:"factorType"},{default:e.withCtx(()=>[e.createVNode(h,{type:"danger",plain:f.value.factorType!==1,onClick:l[10]||(l[10]=()=>{f.value.factorType===-1&&(f.value.factorSelectedList=[]),f.value.factorType=1})},{default:e.withCtx(()=>[e.createTextVNode(" 多 ")]),_:1},8,["plain"]),e.createVNode(h,{type:"success",plain:f.value.factorType!==-1,onClick:l[11]||(l[11]=()=>{f.value.factorType===1&&(f.value.factorSelectedList=[]),f.value.factorType=-1})},{default:e.withCtx(()=>[e.createTextVNode(" 空 ")]),_:1},8,["plain"])]),_:1}),e.createVNode(k,{label:"预警因子:",prop:"factorSelectedList"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:f.value.factorSelectedList,"onUpdate:modelValue":l[12]||(l[12]=o=>f.value.factorSelectedList=o)},{default:e.withCtx(()=>[f.value.factorType===1?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.moreFactorOptions,(o,T)=>(e.openBlock(),e.createBlock(r,{key:T,label:o.factorTypeName,value:o.factorTypeName,style:{width:"200px"}},null,8,["label","value"]))),128)):e.createCommentVNode("",!0),f.value.factorType===-1?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.emptyFactorOptions,(o,T)=>(e.openBlock(),e.createBlock(r,{key:T,label:o.factorTypeName,value:o.factorTypeName,style:{width:"200px"}},null,8,["label","value"]))),128)):e.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1}),e.createVNode(k,{label:"预警次数:",prop:"totalCount"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:f.value.totalCount,"onUpdate:modelValue":l[13]||(l[13]=o=>f.value.totalCount=o),min:1,max:10,"controls-position":"right",style:{"margin-right":"20px"}},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])],64)):e.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1},8,["locale"])])}}},nt=me._export_sfc(lt,[["__scopeId","data-v-8488c0aa"]]),at={install(t){t.component("st-factorWarning",nt)}};module.exports=at;
|
package/es/FactorWarning.js
CHANGED
|
@@ -11,14 +11,14 @@ import { E as Oe } from "./el-button-24f79286.js";
|
|
|
11
11
|
import { E as pt, a as vt, b as gt } from "./el-form-item-afc3dcf2.js";
|
|
12
12
|
import { E as Fe } from "./el-input-ee7db655.js";
|
|
13
13
|
import { E as yt } from "./el-input-number-63c21037.js";
|
|
14
|
-
import { defineComponent as he, ref as N, reactive as
|
|
15
|
-
import { c as Tt, u as _t, a as Bt, b as Vt, d as It, e as Lt, E as
|
|
14
|
+
import { defineComponent as he, ref as N, reactive as ze, computed as P, watch as ne, openBlock as n, createElementBlock as w, unref as T, normalizeClass as h, createElementVNode as f, normalizeStyle as ye, Fragment as j, renderList as Y, renderSlot as Ae, createTextVNode as B, toDisplayString as M, createCommentVNode as S, nextTick as oe, markRaw as Te, onMounted as bt, onBeforeUnmount as ht, toRefs as Ct, resolveComponent as Q, createBlock as C, Transition as kt, withCtx as o, withDirectives as me, createVNode as s, withModifiers as re, resolveDynamicComponent as ie, withKeys as ue, vShow as pe, isVNode as Pe, render as Re, mergeModels as _e, useModel as Et, pushScopeId as wt, popScopeId as St } from "vue";
|
|
15
|
+
import { c as Tt, u as _t, a as Bt, b as Vt, d as It, e as Lt, E as De, T as Mt, l as Be, f as Ve, i as Ie } from "./use-form-common-props-9c0363ac.js";
|
|
16
16
|
import { G as $t } from "./index-8542fe24.js";
|
|
17
17
|
import { _ as Nt } from "./_plugin-vue_export-helper-dad06003.js";
|
|
18
18
|
import { o as Le, E as Ot, a as Ft } from "./index-fa07a823.js";
|
|
19
|
-
import { u as
|
|
19
|
+
import { u as zt } from "./index-68ee64fa.js";
|
|
20
20
|
import { U as Ue, C as qe } from "./event-09e37cc8.js";
|
|
21
|
-
import { E as
|
|
21
|
+
import { E as At } from "./index-a1ecf26c.js";
|
|
22
22
|
import "./config-provider-83904b4d.js";
|
|
23
23
|
import "./vnode-cfcdab70.js";
|
|
24
24
|
import "./refs-46cf8186.js";
|
|
@@ -28,7 +28,7 @@ import "./raf-377cf8f5.js";
|
|
|
28
28
|
import "./index-657047bb.js";
|
|
29
29
|
import "./castArray-7d3fc921.js";
|
|
30
30
|
import "./typescript-7ae59c4c.js";
|
|
31
|
-
const
|
|
31
|
+
const Pt = (e) => ["", ...Tt].includes(e), Rt = Ge({
|
|
32
32
|
direction: {
|
|
33
33
|
type: Ce(String),
|
|
34
34
|
default: "horizontal"
|
|
@@ -51,19 +51,19 @@ const Rt = (e) => ["", ...Tt].includes(e), Dt = Ge({
|
|
|
51
51
|
id: String,
|
|
52
52
|
name: String,
|
|
53
53
|
...nt(["ariaLabel"])
|
|
54
|
-
}),
|
|
54
|
+
}), Dt = {
|
|
55
55
|
[Ue]: (e) => ae(e) || ke(e) || Ee(e),
|
|
56
56
|
[qe]: (e) => ae(e) || ke(e) || Ee(e)
|
|
57
57
|
}, Ut = he({
|
|
58
58
|
name: "ElSegmented"
|
|
59
59
|
}), qt = /* @__PURE__ */ he({
|
|
60
60
|
...Ut,
|
|
61
|
-
props:
|
|
62
|
-
emits:
|
|
61
|
+
props: Rt,
|
|
62
|
+
emits: Dt,
|
|
63
63
|
setup(e, { emit: m }) {
|
|
64
64
|
const a = e, d = We("segmented"), g = ve(), p = Bt(), b = Vt(), { formItem: V } = It(), { inputId: u, isLabeledByFormItem: r } = Lt(a, {
|
|
65
65
|
formItemContext: V
|
|
66
|
-
}),
|
|
66
|
+
}), A = N(null), v = ct(), c = ze({
|
|
67
67
|
isInit: !1,
|
|
68
68
|
width: 0,
|
|
69
69
|
height: 0,
|
|
@@ -73,14 +73,14 @@ const Rt = (e) => ["", ...Tt].includes(e), Dt = Ge({
|
|
|
73
73
|
}), G = (i) => {
|
|
74
74
|
const _ = H(i);
|
|
75
75
|
m(Ue, _), m(qe, _);
|
|
76
|
-
}, H = (i) => de(i) ? i.value : i,
|
|
76
|
+
}, H = (i) => de(i) ? i.value : i, R = (i) => de(i) ? i.label : i, D = (i) => !!(b.value || de(i) && i.disabled), U = (i) => a.modelValue === H(i), K = (i) => a.options.find((_) => H(_) === i), Z = (i) => [
|
|
77
77
|
d.e("item"),
|
|
78
78
|
d.is("selected", U(i)),
|
|
79
|
-
d.is("disabled",
|
|
79
|
+
d.is("disabled", D(i))
|
|
80
80
|
], k = () => {
|
|
81
|
-
if (!
|
|
81
|
+
if (!A.value)
|
|
82
82
|
return;
|
|
83
|
-
const i =
|
|
83
|
+
const i = A.value.querySelector(".is-selected"), _ = A.value.querySelector(".is-selected input");
|
|
84
84
|
if (!i || !_) {
|
|
85
85
|
c.width = 0, c.height = 0, c.translateX = 0, c.translateY = 0, c.focusVisible = !1;
|
|
86
86
|
return;
|
|
@@ -91,21 +91,21 @@ const Rt = (e) => ["", ...Tt].includes(e), Dt = Ge({
|
|
|
91
91
|
c.focusVisible = _.matches(":focus-visible");
|
|
92
92
|
} catch {
|
|
93
93
|
}
|
|
94
|
-
}, l =
|
|
94
|
+
}, l = P(() => [
|
|
95
95
|
d.b(),
|
|
96
96
|
d.m(p.value),
|
|
97
97
|
d.is("block", a.block)
|
|
98
|
-
]), O =
|
|
98
|
+
]), O = P(() => ({
|
|
99
99
|
width: a.direction === "vertical" ? "100%" : `${c.width}px`,
|
|
100
100
|
height: a.direction === "vertical" ? `${c.height}px` : "100%",
|
|
101
101
|
transform: a.direction === "vertical" ? `translateY(${c.translateY}px)` : `translateX(${c.translateX}px)`,
|
|
102
102
|
display: c.isInit ? "block" : "none"
|
|
103
|
-
})), E =
|
|
103
|
+
})), E = P(() => [
|
|
104
104
|
d.e("item-selected"),
|
|
105
|
-
d.is("disabled",
|
|
105
|
+
d.is("disabled", D(K(a.modelValue))),
|
|
106
106
|
d.is("focus-visible", c.focusVisible)
|
|
107
|
-
]), I =
|
|
108
|
-
return ft(
|
|
107
|
+
]), I = P(() => a.name || g.value);
|
|
108
|
+
return ft(A, k), ne(v, k), ne(() => a.modelValue, () => {
|
|
109
109
|
var i;
|
|
110
110
|
k(), a.validateEvent && ((i = V == null ? void 0 : V.validate) == null || i.call(V, "change").catch((_) => $e(_)));
|
|
111
111
|
}, {
|
|
@@ -114,7 +114,7 @@ const Rt = (e) => ["", ...Tt].includes(e), Dt = Ge({
|
|
|
114
114
|
key: 0,
|
|
115
115
|
id: T(u),
|
|
116
116
|
ref_key: "segmentedRef",
|
|
117
|
-
ref:
|
|
117
|
+
ref: A,
|
|
118
118
|
class: h(T(l)),
|
|
119
119
|
role: "radiogroup",
|
|
120
120
|
"aria-label": T(r) ? void 0 : i.ariaLabel || "segmented",
|
|
@@ -135,15 +135,15 @@ const Rt = (e) => ["", ...Tt].includes(e), Dt = Ge({
|
|
|
135
135
|
class: h(T(d).e("item-input")),
|
|
136
136
|
type: "radio",
|
|
137
137
|
name: T(I),
|
|
138
|
-
disabled:
|
|
138
|
+
disabled: D(L),
|
|
139
139
|
checked: U(L),
|
|
140
140
|
onChange: (ee) => G(L)
|
|
141
141
|
}, null, 42, ["name", "disabled", "checked", "onChange"]),
|
|
142
142
|
f("div", {
|
|
143
143
|
class: h(T(d).e("item-label"))
|
|
144
144
|
}, [
|
|
145
|
-
|
|
146
|
-
B(M(
|
|
145
|
+
Ae(i.$slots, "default", { item: L }, () => [
|
|
146
|
+
B(M(R(L)), 1)
|
|
147
147
|
])
|
|
148
148
|
], 2)
|
|
149
149
|
], 2))), 128))
|
|
@@ -190,14 +190,14 @@ const Kt = Ye(Ht), be = "_trap-focus-children", J = [], Me = (e) => {
|
|
|
190
190
|
ElFocusTrap: Ft,
|
|
191
191
|
ElInput: Fe,
|
|
192
192
|
ElOverlay: et,
|
|
193
|
-
ElIcon:
|
|
193
|
+
ElIcon: De,
|
|
194
194
|
...Mt
|
|
195
195
|
},
|
|
196
196
|
inheritAttrs: !1,
|
|
197
197
|
props: {
|
|
198
198
|
buttonSize: {
|
|
199
199
|
type: String,
|
|
200
|
-
validator:
|
|
200
|
+
validator: Pt
|
|
201
201
|
},
|
|
202
202
|
modal: {
|
|
203
203
|
type: Boolean,
|
|
@@ -246,7 +246,7 @@ const Kt = Ye(Ht), be = "_trap-focus-children", J = [], Me = (e) => {
|
|
|
246
246
|
zIndex: d,
|
|
247
247
|
ns: g,
|
|
248
248
|
size: p
|
|
249
|
-
} =
|
|
249
|
+
} = zt("message-box", P(() => e.buttonSize)), { t: b } = a, { nextZIndex: V } = d, u = N(!1), r = ze({
|
|
250
250
|
autofocus: !0,
|
|
251
251
|
beforeClose: null,
|
|
252
252
|
callback: null,
|
|
@@ -282,24 +282,24 @@ const Kt = Ye(Ht), be = "_trap-focus-children", J = [], Me = (e) => {
|
|
|
282
282
|
editorErrorMessage: "",
|
|
283
283
|
validateError: !1,
|
|
284
284
|
zIndex: V()
|
|
285
|
-
}),
|
|
285
|
+
}), A = P(() => {
|
|
286
286
|
const y = r.type;
|
|
287
287
|
return { [g.bm("icon", y)]: y && Ve[y] };
|
|
288
|
-
}), v = ve(), c = ve(), G =
|
|
288
|
+
}), v = ve(), c = ve(), G = P(() => {
|
|
289
289
|
const y = r.type;
|
|
290
290
|
return r.icon || y && Ve[y] || "";
|
|
291
|
-
}), H =
|
|
291
|
+
}), H = P(() => !!r.message), R = N(), D = N(), U = N(), K = N(), Z = N(), k = P(() => r.confirmButtonClass);
|
|
292
292
|
ne(() => r.inputValue, async (y) => {
|
|
293
293
|
await oe(), e.boxType === "prompt" && y !== null && W();
|
|
294
294
|
}, { immediate: !0 }), ne(() => u.value, (y) => {
|
|
295
295
|
var F, $;
|
|
296
|
-
y && (e.boxType !== "prompt" && (r.autofocus ? U.value = ($ = (F = Z.value) == null ? void 0 : F.$el) != null ? $ :
|
|
296
|
+
y && (e.boxType !== "prompt" && (r.autofocus ? U.value = ($ = (F = Z.value) == null ? void 0 : F.$el) != null ? $ : R.value : U.value = R.value), r.zIndex = V()), e.boxType === "prompt" && (y ? oe().then(() => {
|
|
297
297
|
var le;
|
|
298
|
-
K.value && K.value.$el && (r.autofocus ? U.value = (le = ee()) != null ? le :
|
|
298
|
+
K.value && K.value.$el && (r.autofocus ? U.value = (le = ee()) != null ? le : R.value : U.value = R.value);
|
|
299
299
|
}) : (r.editorErrorMessage = "", r.validateError = !1));
|
|
300
300
|
});
|
|
301
|
-
const l =
|
|
302
|
-
tt(
|
|
301
|
+
const l = P(() => e.draggable), O = P(() => e.overflow);
|
|
302
|
+
tt(R, D, l, O), bt(async () => {
|
|
303
303
|
await oe(), e.closeOnHashChange && window.addEventListener("hashchange", E);
|
|
304
304
|
}), ht(() => {
|
|
305
305
|
e.closeOnHashChange && window.removeEventListener("hashchange", E);
|
|
@@ -347,15 +347,15 @@ const Kt = Ye(Ht), be = "_trap-focus-children", J = [], Me = (e) => {
|
|
|
347
347
|
overlayEvent: i,
|
|
348
348
|
visible: u,
|
|
349
349
|
hasMessage: H,
|
|
350
|
-
typeClass:
|
|
350
|
+
typeClass: A,
|
|
351
351
|
contentId: v,
|
|
352
352
|
inputId: c,
|
|
353
353
|
btnSize: p,
|
|
354
354
|
iconComponent: G,
|
|
355
355
|
confirmButtonClasses: k,
|
|
356
|
-
rootRef:
|
|
356
|
+
rootRef: R,
|
|
357
357
|
focusStartRef: U,
|
|
358
|
-
headerRef:
|
|
358
|
+
headerRef: D,
|
|
359
359
|
inputRef: K,
|
|
360
360
|
confirmRef: Z,
|
|
361
361
|
doClose: E,
|
|
@@ -369,7 +369,7 @@ const Kt = Ye(Ht), be = "_trap-focus-children", J = [], Me = (e) => {
|
|
|
369
369
|
}
|
|
370
370
|
});
|
|
371
371
|
function Gt(e, m, a, d, g, p) {
|
|
372
|
-
const b = Q("el-icon"), V = Q("close"), u = Q("el-input"), r = Q("el-button"),
|
|
372
|
+
const b = Q("el-icon"), V = Q("close"), u = Q("el-input"), r = Q("el-button"), A = Q("el-focus-trap"), v = Q("el-overlay");
|
|
373
373
|
return n(), C(kt, {
|
|
374
374
|
name: "fade-in-linear",
|
|
375
375
|
onAfterLeave: (c) => e.$emit("vanish"),
|
|
@@ -392,7 +392,7 @@ function Gt(e, m, a, d, g, p) {
|
|
|
392
392
|
onMousedown: e.overlayEvent.onMousedown,
|
|
393
393
|
onMouseup: e.overlayEvent.onMouseup
|
|
394
394
|
}, [
|
|
395
|
-
s(
|
|
395
|
+
s(A, {
|
|
396
396
|
loop: "",
|
|
397
397
|
trapped: e.visible,
|
|
398
398
|
"focus-trap-el": e.rootRef,
|
|
@@ -470,7 +470,7 @@ function Gt(e, m, a, d, g, p) {
|
|
|
470
470
|
key: 1,
|
|
471
471
|
class: h(e.ns.e("message"))
|
|
472
472
|
}, [
|
|
473
|
-
|
|
473
|
+
Ae(e.$slots, "default", {}, () => [
|
|
474
474
|
e.dangerouslyUseHTMLString ? (n(), C(ie(e.showInput ? "label" : "p"), {
|
|
475
475
|
key: 1,
|
|
476
476
|
for: e.showInput ? e.inputId : void 0,
|
|
@@ -568,14 +568,14 @@ const se = /* @__PURE__ */ new Map(), Yt = (e) => {
|
|
|
568
568
|
let m = document.body;
|
|
569
569
|
return e.appendTo && (ae(e.appendTo) && (m = document.querySelector(e.appendTo)), Se(e.appendTo) && (m = e.appendTo), Se(m) || ($e("ElMessageBox", "the appendTo option is not an HTMLElement. Falling back to document.body."), m = document.body)), m;
|
|
570
570
|
}, Jt = (e, m, a = null) => {
|
|
571
|
-
const d = s(Wt, e, ge(e.message) ||
|
|
571
|
+
const d = s(Wt, e, ge(e.message) || Pe(e.message) ? {
|
|
572
572
|
default: ge(e.message) ? e.message : () => e.message
|
|
573
573
|
} : null);
|
|
574
|
-
return d.appContext = a,
|
|
574
|
+
return d.appContext = a, Re(d, m), Yt(e).appendChild(m.firstElementChild), d.component;
|
|
575
575
|
}, Zt = () => document.createElement("div"), Qt = (e, m) => {
|
|
576
576
|
const a = Zt();
|
|
577
577
|
e.onVanish = () => {
|
|
578
|
-
|
|
578
|
+
Re(null, a), se.delete(g);
|
|
579
579
|
}, e.onAction = (p) => {
|
|
580
580
|
const b = se.get(g);
|
|
581
581
|
let V;
|
|
@@ -590,7 +590,7 @@ function x(e, m = null) {
|
|
|
590
590
|
if (!Je)
|
|
591
591
|
return Promise.reject();
|
|
592
592
|
let a;
|
|
593
|
-
return ae(e) ||
|
|
593
|
+
return ae(e) || Pe(e) ? e = {
|
|
594
594
|
message: e
|
|
595
595
|
} : a = e.callback, new Promise((d, g) => {
|
|
596
596
|
const p = Qt(e, m ?? x._context);
|
|
@@ -650,7 +650,7 @@ const ol = {
|
|
|
650
650
|
tableEnable: !0
|
|
651
651
|
// 启用按钮
|
|
652
652
|
};
|
|
653
|
-
const ce = (e) => (wt("data-v-
|
|
653
|
+
const ce = (e) => (wt("data-v-8488c0aa"), e = e(), St(), e), al = { class: "st-factorWarning" }, nl = { class: "custom-header" }, sl = /* @__PURE__ */ ce(() => /* @__PURE__ */ f("span", { style: { "margin-right": "4px" } }, "因子预警", -1)), rl = { class: "factor-name" }, il = ["onClick"], ul = { class: "factor-name" }, dl = ["onClick"], cl = { style: { display: "flex", "align-items": "start" } }, fl = {
|
|
654
654
|
key: 0,
|
|
655
655
|
style: { flex: "1" }
|
|
656
656
|
}, ml = /* @__PURE__ */ ce(() => /* @__PURE__ */ f("span", { style: { margin: "0 5px" } }, "~", -1)), pl = {
|
|
@@ -695,7 +695,7 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
695
695
|
factorType: [{ required: !0, message: "请选择交易类型", trigger: "blur" }],
|
|
696
696
|
factorSelectedList: [{ required: !0, message: "请选择预警因子", trigger: "blur" }],
|
|
697
697
|
totalCount: [{ required: !0, message: "请填写预警次数", trigger: "blur" }]
|
|
698
|
-
}),
|
|
698
|
+
}), A = N(null), v = N({
|
|
699
699
|
shortcutName: null,
|
|
700
700
|
factorType: 1,
|
|
701
701
|
factorSelectedList: [],
|
|
@@ -730,8 +730,8 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
730
730
|
...u.value
|
|
731
731
|
}))
|
|
732
732
|
};
|
|
733
|
-
|
|
734
|
-
},
|
|
733
|
+
D(V.value, l);
|
|
734
|
+
}, R = async (k) => {
|
|
735
735
|
const l = JSON.parse(k.data);
|
|
736
736
|
Object.assign(u.value, {
|
|
737
737
|
factorType: l.factorType,
|
|
@@ -754,8 +754,8 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
754
754
|
};
|
|
755
755
|
})
|
|
756
756
|
};
|
|
757
|
-
|
|
758
|
-
},
|
|
757
|
+
D(V.value, O);
|
|
758
|
+
}, D = $t(async (k, l) => {
|
|
759
759
|
k && await k.validate((O) => {
|
|
760
760
|
if (!O)
|
|
761
761
|
return !1;
|
|
@@ -795,7 +795,7 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
795
795
|
immediate: !0
|
|
796
796
|
}
|
|
797
797
|
), (k, l) => {
|
|
798
|
-
const O = Kt, E = Oe, I = pt, i = rt, _ = it, L = yt, W = vt, ee = Fe, te = gt, q = ut, y = mt, F = dt, $ =
|
|
798
|
+
const O = Kt, E = Oe, I = pt, i = rt, _ = it, L = yt, W = vt, ee = Fe, te = gt, q = ut, y = mt, F = dt, $ = De, le = st, He = At, Ke = at, je = xe;
|
|
799
799
|
return n(), w("div", al, [
|
|
800
800
|
s(je, { locale: T(Qe) }, {
|
|
801
801
|
default: o(() => [
|
|
@@ -807,7 +807,7 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
807
807
|
"destroy-on-close": "",
|
|
808
808
|
onClosed: l[18] || (l[18] = (t) => g("closed"))
|
|
809
809
|
}, {
|
|
810
|
-
header: o(({ close: t, titleId:
|
|
810
|
+
header: o(({ close: t, titleId: z, titleClass: fe }) => [
|
|
811
811
|
f("div", nl, [
|
|
812
812
|
f("div", {
|
|
813
813
|
class: h(fe)
|
|
@@ -818,6 +818,7 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
818
818
|
s(O, {
|
|
819
819
|
modelValue: a.value,
|
|
820
820
|
"onUpdate:modelValue": l[0] || (l[0] = (Xe) => a.value = Xe),
|
|
821
|
+
size: "default",
|
|
821
822
|
options: [
|
|
822
823
|
{ label: "添加", value: "ruleForm", disabled: !e.allowOperation },
|
|
823
824
|
{ label: "管理", value: "table", disabled: !1 },
|
|
@@ -829,6 +830,7 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
829
830
|
footer: o(() => [
|
|
830
831
|
f("div", Tl, [
|
|
831
832
|
s(E, {
|
|
833
|
+
size: "default",
|
|
832
834
|
onClick: l[14] || (l[14] = (t) => d.value = !1)
|
|
833
835
|
}, {
|
|
834
836
|
default: o(() => [
|
|
@@ -838,8 +840,9 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
838
840
|
}),
|
|
839
841
|
a.value === "ruleForm" ? (n(), C(E, {
|
|
840
842
|
key: 0,
|
|
843
|
+
size: "default",
|
|
841
844
|
type: "primary",
|
|
842
|
-
onClick: l[15] || (l[15] = (t) => T(
|
|
845
|
+
onClick: l[15] || (l[15] = (t) => T(D)(V.value))
|
|
843
846
|
}, {
|
|
844
847
|
default: o(() => [
|
|
845
848
|
B(" 确认 ")
|
|
@@ -848,8 +851,9 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
848
851
|
})) : S("", !0),
|
|
849
852
|
a.value === "shortcut" ? (n(), C(E, {
|
|
850
853
|
key: 1,
|
|
854
|
+
size: "default",
|
|
851
855
|
type: "primary",
|
|
852
|
-
onClick: l[16] || (l[16] = (t) => U(
|
|
856
|
+
onClick: l[16] || (l[16] = (t) => U(A.value))
|
|
853
857
|
}, {
|
|
854
858
|
default: o(() => [
|
|
855
859
|
B(" 保存配置 ")
|
|
@@ -865,6 +869,7 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
865
869
|
ref: V,
|
|
866
870
|
model: u.value,
|
|
867
871
|
rules: r.value,
|
|
872
|
+
size: "default",
|
|
868
873
|
"label-width": "90px"
|
|
869
874
|
}, {
|
|
870
875
|
default: o(() => [
|
|
@@ -910,9 +915,9 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
910
915
|
"onUpdate:modelValue": l[3] || (l[3] = (t) => u.value.factorSelectedList = t)
|
|
911
916
|
}, {
|
|
912
917
|
default: o(() => [
|
|
913
|
-
u.value.factorType === 1 ? (n(!0), w(j, { key: 0 }, Y(e.moreFactorOptions, (t,
|
|
918
|
+
u.value.factorType === 1 ? (n(!0), w(j, { key: 0 }, Y(e.moreFactorOptions, (t, z) => (n(), w("div", {
|
|
914
919
|
class: "factor-checkbox",
|
|
915
|
-
key:
|
|
920
|
+
key: z
|
|
916
921
|
}, [
|
|
917
922
|
s(i, {
|
|
918
923
|
label: t.factorTypeName,
|
|
@@ -928,9 +933,9 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
928
933
|
onClick: (fe) => H(t.factorTypeName)
|
|
929
934
|
}, "3次 +", 8, il)
|
|
930
935
|
]))), 128)) : S("", !0),
|
|
931
|
-
u.value.factorType === -1 ? (n(!0), w(j, { key: 1 }, Y(e.emptyFactorOptions, (t,
|
|
936
|
+
u.value.factorType === -1 ? (n(!0), w(j, { key: 1 }, Y(e.emptyFactorOptions, (t, z) => (n(), w("div", {
|
|
932
937
|
class: "factor-checkbox",
|
|
933
|
-
key:
|
|
938
|
+
key: z
|
|
934
939
|
}, [
|
|
935
940
|
s(i, {
|
|
936
941
|
label: t.factorTypeName,
|
|
@@ -968,7 +973,7 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
968
973
|
e.shortcutData.length ? (n(), w("div", fl, [
|
|
969
974
|
(n(!0), w(j, null, Y(e.shortcutData, (t) => (n(), C(E, {
|
|
970
975
|
key: t.id,
|
|
971
|
-
onClick: (
|
|
976
|
+
onClick: (z) => R(t),
|
|
972
977
|
style: { margin: "0 12px 4px 0" }
|
|
973
978
|
}, {
|
|
974
979
|
default: o(() => [
|
|
@@ -1116,7 +1121,7 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
1116
1121
|
key: 0,
|
|
1117
1122
|
disabled: t.row.currentCount !== t.row.totalCount,
|
|
1118
1123
|
size: "small",
|
|
1119
|
-
onClick: (
|
|
1124
|
+
onClick: (z) => g("enabled", t.row)
|
|
1120
1125
|
}, {
|
|
1121
1126
|
default: o(() => [
|
|
1122
1127
|
B(" 启用 ")
|
|
@@ -1125,7 +1130,7 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
1125
1130
|
}, 1032, ["disabled", "onClick"])) : S("", !0),
|
|
1126
1131
|
s(y, {
|
|
1127
1132
|
title: "确定删除?",
|
|
1128
|
-
onConfirm: (
|
|
1133
|
+
onConfirm: (z) => g("delete", t.row)
|
|
1129
1134
|
}, {
|
|
1130
1135
|
reference: o(() => [
|
|
1131
1136
|
s(E, { size: "small" }, {
|
|
@@ -1166,9 +1171,10 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
1166
1171
|
e.shortcutData.length ? (n(!0), w(j, { key: 0 }, Y(e.shortcutData, (t) => (n(), C(He, {
|
|
1167
1172
|
key: t.id,
|
|
1168
1173
|
type: "primary",
|
|
1174
|
+
size: "default",
|
|
1169
1175
|
closable: "",
|
|
1170
|
-
onClick: (
|
|
1171
|
-
onClose: (
|
|
1176
|
+
onClick: (z) => K(t),
|
|
1177
|
+
onClose: (z) => Z(t)
|
|
1172
1178
|
}, {
|
|
1173
1179
|
default: o(() => [
|
|
1174
1180
|
B(M(t.shortcutName), 1)
|
|
@@ -1196,10 +1202,11 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
1196
1202
|
]),
|
|
1197
1203
|
s(te, {
|
|
1198
1204
|
ref_key: "shortcut_ruleFormRef",
|
|
1199
|
-
ref:
|
|
1205
|
+
ref: A,
|
|
1200
1206
|
model: v.value,
|
|
1201
1207
|
rules: c.value,
|
|
1202
|
-
"label-width": "90px"
|
|
1208
|
+
"label-width": "90px",
|
|
1209
|
+
size: "default"
|
|
1203
1210
|
}, {
|
|
1204
1211
|
default: o(() => [
|
|
1205
1212
|
s(I, {
|
|
@@ -1259,14 +1266,14 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
1259
1266
|
"onUpdate:modelValue": l[12] || (l[12] = (t) => v.value.factorSelectedList = t)
|
|
1260
1267
|
}, {
|
|
1261
1268
|
default: o(() => [
|
|
1262
|
-
v.value.factorType === 1 ? (n(!0), w(j, { key: 0 }, Y(e.moreFactorOptions, (t,
|
|
1263
|
-
key:
|
|
1269
|
+
v.value.factorType === 1 ? (n(!0), w(j, { key: 0 }, Y(e.moreFactorOptions, (t, z) => (n(), C(i, {
|
|
1270
|
+
key: z,
|
|
1264
1271
|
label: t.factorTypeName,
|
|
1265
1272
|
value: t.factorTypeName,
|
|
1266
1273
|
style: { width: "200px" }
|
|
1267
1274
|
}, null, 8, ["label", "value"]))), 128)) : S("", !0),
|
|
1268
|
-
v.value.factorType === -1 ? (n(!0), w(j, { key: 1 }, Y(e.emptyFactorOptions, (t,
|
|
1269
|
-
key:
|
|
1275
|
+
v.value.factorType === -1 ? (n(!0), w(j, { key: 1 }, Y(e.emptyFactorOptions, (t, z) => (n(), C(i, {
|
|
1276
|
+
key: z,
|
|
1270
1277
|
label: t.factorTypeName,
|
|
1271
1278
|
value: t.factorTypeName,
|
|
1272
1279
|
style: { width: "200px" }
|
|
@@ -1306,7 +1313,7 @@ const ce = (e) => (wt("data-v-fea2a84d"), e = e(), St(), e), al = { class: "st-f
|
|
|
1306
1313
|
]);
|
|
1307
1314
|
};
|
|
1308
1315
|
}
|
|
1309
|
-
}, Bl = /* @__PURE__ */ Nt(_l, [["__scopeId", "data-v-
|
|
1316
|
+
}, Bl = /* @__PURE__ */ Nt(_l, [["__scopeId", "data-v-8488c0aa"]]), ao = {
|
|
1310
1317
|
install(e) {
|
|
1311
1318
|
e.component("st-factorWarning", Bl);
|
|
1312
1319
|
}
|