st-comp 0.0.154 → 0.0.155
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/User.cjs +1 -1
- package/es/User.js +4 -4
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +333 -333
- package/es/style.css +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +1 -1
- package/lib/{index-a646e69f.js → index-1e2ed5f3.js} +5 -5
- package/lib/{python-5d221c15.js → python-258cd090.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/VarietySearch/components/CommonIndicator/index.vue +14 -4
package/lib/bundle.js
CHANGED
package/lib/bundle.umd.cjs
CHANGED
|
@@ -819,7 +819,7 @@ ${e.toString()}`}}class xw{constructor(e=new h9,t=!1,i,r=F6t){var o;this._servic
|
|
|
819
819
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
820
820
|
*-----------------------------------------------------------------------------*/yce({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Promise.resolve().then(()=>owt)});const hvt=h.defineComponent({__name:"index",props:{defaultValue:{type:String,default:""},language:{type:String,default:"python"},theme:{type:String,default:"vs-dark"}},emits:["change"],setup(n,{expose:e,emit:t}){let i;const r=t,o=n,s=h.ref(null);return h.onMounted(()=>{i=mce.create(s.value,{value:o.defaultValue,language:o.language,theme:o.theme}),i.onDidChangeModelContent(a=>{r("change",i.getValue())})}),h.onUnmounted(()=>{i&&i.dispose()}),e({getInstance:()=>i,setValue:a=>{i.setValue(a)},getValue:()=>i.getValue(),setReadOnly:(a=!0)=>{i.updateOptions({readOnly:a})},resize:()=>{i.layout()}}),(a,l)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"editorContainer",ref:s,style:{width:"100%",height:"100%"}},null,512))}}),fvt={install(n){n.component("st-monacoEditor",hvt)}},cxt="",pvt=h.defineComponent({__name:"index",props:{pageData:{type:Object,default:()=>({pageNum:1,pageSize:10})},total:{type:Number,default:0},pageSizes:{type:Array,default:()=>[10,20,30,50]},background:{type:Boolean,default:!0},layout:{type:String,default:"total, sizes, prev, pager, next, jumper"}},emits:["update:pageData","change"],setup(n,{emit:e}){const t=e,i=n,r=h.computed({get(){return i.pageData.pageNum},set(a){t("update:pageData",{...i.pageData,pageNum:a})}}),o=h.computed({get(){return i.pageData.pageSize},set(a){t("update:pageData",{...i.pageData,pageSize:a})}}),s=()=>{t("change",i.pageData)};return(a,l)=>{const c=A6e,u=K8;return h.openBlock(),h.createBlock(u,{locale:h.unref(Mb)},{default:h.withCtx(()=>[h.withDirectives(h.createVNode(c,h.mergeProps({class:"st-pagination",currentPage:r.value,"onUpdate:currentPage":l[0]||(l[0]=d=>r.value=d),"page-size":o.value,"onUpdate:pageSize":l[1]||(l[1]=d=>o.value=d),total:n.total,background:n.background,"page-sizes":n.pageSizes,layout:n.layout},a.$attrs,{onSizeChange:s,onCurrentChange:s}),null,16,["currentPage","page-size","total","background","page-sizes","layout"]),[[h.vShow,n.total]])]),_:1},8,["locale"])}}}),uxt="",gvt=fi(pvt,[["__scopeId","data-v-61b7745b"]]),mvt={install(n){n.component("st-pagination",gvt)}},dxt="",bvt={key:0,class:"rule-box"},_vt={key:0,class:"level-box"},vvt={class:"level-color"},yvt={class:"level-text"},wce=fi({__name:"index",props:{value:{type:String,default:""},isFocus:{type:Boolean,default:!1},textColor:{type:[String,null],default:null}},setup(n,{expose:e}){const t=n,i=[{text:"不能包含空格",validator:l=>!/\s/.test(l)},{text:"长度为8-18个字符",validator:l=>l.length>=8&&l.length<=18},{text:"必须包含字母、数字、符号中至少2种",validator:l=>{const c=/[a-zA-Z]/.test(l),u=/\d/.test(l),d=/[^a-zA-Z0-9]/.test(l);return[c,u,d].filter(Boolean).length>=2}},{text:"请勿输入连续、重复6位以上字母或数字, 0123456, 1111111",validator:l=>{if(/([a-zA-Z0-9])\1{6,}/.test(l)||/(?:0123456|1234567|2345678|3456789|9876543|8765432|7654321|6543210)/.test(l))return!1;const d=l.toLowerCase(),f=p=>{if(!/^[a-z]+$/.test(p))return!1;for(let g=1;g<p.length;g++)if(p.charCodeAt(g)!==p.charCodeAt(g-1)+1)return!1;return!0};for(let p=0;p<=d.length-7;p++){const g=d.substr(p,7);if(f(g))return!1}return!0}}],r=h.computed(()=>!i.map(c=>c.validator(t.value)).includes(!1)),o=h.computed(()=>{const l=t.value;if(!l)return 0;let c=0;return l.length>=8&&c++,l.length>=12&&c++,/\d/.test(l)&&c++,/[a-z]/.test(l)&&c++,/[A-Z]/.test(l)&&c++,/[^a-zA-Z0-9]/.test(l)&&c++,c<=2?1:c<=4?2:3}),s=h.computed(()=>{switch(o.value){case 1:return"lv1";case 2:return"lv2";case 3:return"lv3";default:return""}}),a=h.computed(()=>{switch(o.value){case 1:return"弱";case 2:return"中";case 3:return"强";default:return""}});return e({pwdValidators:i,levelValue:o,ruleFormPassword:[{required:!0,trigger:"blur",message:"密码不能为空"},...i.map(l=>({trigger:"blur",validator:(c,u,d)=>{l.validator(u)?d():d(l.text)}}))]}),(l,c)=>{const u=Jn;return h.openBlock(),h.createElementBlock("div",{class:"password-prompt",style:h.normalizeStyle({color:n.textColor??"var(--el-color-info)"})},[h.createVNode(h.Transition,{name:"slide-down"},{default:h.withCtx(()=>[n.isFocus?(h.openBlock(),h.createElementBlock("div",bvt,[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList(i,(d,f)=>h.createElementVNode("div",{class:"rule-item",key:f},[h.withDirectives(h.createVNode(u,null,{default:h.withCtx(()=>[h.createVNode(h.unref(wP))]),_:2},1536),[[h.vShow,d.validator(n.value)]]),h.createElementVNode("span",null,h.toDisplayString(d.text),1)])),64))])):h.createCommentVNode("",!0)]),_:1}),!n.isFocus&&r.value?(h.openBlock(),h.createElementBlock("div",_vt,[h.createElementVNode("div",vvt,[h.createElementVNode("div",{class:h.normalizeClass(["levelValue-block",[o.value>=1?s.value:""]])},null,2),h.createElementVNode("div",{class:h.normalizeClass(["levelValue-block",[o.value>=2?s.value:""]])},null,2),h.createElementVNode("div",{class:h.normalizeClass(["levelValue-block",[o.value>=3?s.value:""]])},null,2)]),h.createElementVNode("div",yvt,"密码强度: "+h.toDisplayString(a.value),1)])):h.createCommentVNode("",!0)],4)}}},[["__scopeId","data-v-ff60a416"]]),wvt={install(n){n.component("st-passwordPrompt",wce)}},Cvt=h.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]},config:{type:Object,default:()=>({})},style:{type:Object,default:()=>[]}},setup(n){const{add:e,multiply:t,divide:i,round:r}=Q1,o={colorList:["#FAF277","#FFC467","#FFA872","#FB962E","#FF772C","#FF577C","#F679D7","#9B4A9B","#9169D7","#9192D0","#655AC7","#4084DE","#0074DA","#0098DF","#00BBE9","#00D2DE","#73E2E6","#00CBB1","#00B488","#48D09A","#93D984","#C9EC7C","#D4E300","#E2BA2B","#A18300","#BC6F3F","#A84E12","#7C462E","#713532","#962B23"],legendColor:"#000",inactiveColor:"#ccc"},s={tooltipFormatter:null};let a,l;const c=n,u=h.ref(),d=h.computed(()=>({...o,...c.style})),f=h.computed(()=>({...s,...c.config}));h.watch(()=>[c.data,c.style],()=>{p()},{deep:!0}),h.onMounted(()=>{a=ds.init(u.value),p();let g=!0;l=new ResizeObserver(()=>{if(g){g=null;return}a.resize()}),l.observe(u.value)}),h.onUnmounted(()=>{a.dispose(),l.disconnect(),l=null});const p=()=>{const g=c.data.reduce((m,_)=>e(m,_.value),0);a.setOption({color:d.value.colorList,tooltip:{trigger:"item",confine:!0,formatter:f.value.tooltipFormatter},legend:{orient:"vertical",right:0,bottom:0,itemWidth:28,itemHeight:18,textStyle:{fontSize:12,color:d.value.legendColor},inactiveColor:d.value.inactiveColor,formatter:m=>{const _=c.data.find(b=>b.name===m);return`${m}
|
|
821
821
|
${_.label||_.value}(${typeof _.percent=="number"?_.percent:r(t(i(_.value,g),100))}%)`}},series:[{type:"pie",width:"150%",height:"150%",center:[`${100/3}%`,`${100/3}%`],radius:"50%",data:c.data.map(m=>({...m,itemStyle:{color:m.color}})),label:{show:!0,position:"inside",formatter:m=>{var b;const _=((b=m==null?void 0:m.data)==null?void 0:b.label)||m.value;return _===0?"":_},fontSize:14,color:"#000"},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]})};return(g,m)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"chartRef",ref:u,class:"chart"},null,512))}}),fxt="",Svt=fi(Cvt,[["__scopeId","data-v-964eca86"]]),xvt={install(n){n.component("st-pie",Svt)}},pxt="",Cce=h.defineComponent({__name:"index",props:{option:{type:Object,required:!0},scope:{type:Object,required:!0},showMargin:{type:Boolean,default:()=>!1}},setup(n){const e=n,t=h.computed(()=>{const{option:i,scope:r}=e;return typeof i.show=="function"?i.show(r.row,r.$index):i.show!==!1});return(i,r)=>{const o=va,s=LB;return t.value?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[n.option.needCheck?(h.openBlock(),h.createBlock(s,{key:0,title:n.option.needCheck.title,onConfirm:r[0]||(r[0]=a=>n.option.onClick(n.scope.row,n.scope.$index))},{reference:h.withCtx(()=>[h.createVNode(o,{type:n.option.type,disabled:typeof n.option.disabled=="function"?n.option.disabled(n.scope.row,n.scope.$index):n.option.disabled,style:h.normalizeStyle({marginTop:n.showMargin?"10px":0})},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(typeof n.option.text=="function"?n.option.text(n.scope.row,n.scope.$index):n.option.text),1)]),_:1},8,["type","disabled","style"])]),_:1},8,["title"])):(h.openBlock(),h.createBlock(o,{key:1,type:n.option.type,disabled:typeof n.option.disabled=="function"?n.option.disabled(n.scope.row,n.scope.$index):n.option.disabled,style:h.normalizeStyle({marginTop:n.showMargin?"10px":0}),onClick:r[1]||(r[1]=a=>n.option.onClick(n.scope.row,n.scope.$index))},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(typeof n.option.text=="function"?n.option.text(n.scope.row,n.scope.$index):n.option.text),1)]),_:1},8,["type","disabled","style"]))],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[],64))}}}),Dvt=h.defineComponent({__name:"index",props:{option:{type:Object,required:!0},scope:{type:Object,required:!0}},setup(n){return(e,t)=>(h.openBlock(),h.createElementBlock("div",{style:h.normalizeStyle(typeof n.option.style=="function"?n.option.style(n.scope.row[n.option.prop],n.scope.row):n.option.style)},h.toDisplayString(typeof n.option.formatter=="function"?n.option.formatter(n.scope.row[n.option.prop],n.scope.row):n.scope.row[n.option.prop]),5))}}),Nvt=h.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]},column:{type:Array,default:()=>[]},loading:{type:Boolean,default:()=>!1},emptyText:{type:String,default:()=>""}},emits:["sortChange"],setup(n,{emit:e}){const t=e,i=n,r=h.computed(()=>i.column.filter(a=>a.show!==!1)),o=a=>{t("sortChange",a)},s=(a,l)=>a.filter(c=>typeof c.show=="function"&&c.show(l.row,l.$index)===!1?!1:c.show!==!1);return(a,l)=>{const c=Jn,u=U6e,d=ex,f=JS,p=K8,g=y_e;return h.openBlock(),h.createBlock(p,{locale:h.unref(Mb)},{default:h.withCtx(()=>[h.withDirectives((h.openBlock(),h.createBlock(f,{data:n.data,"empty-text":n.emptyText,stripe:"",style:{width:"100%"},onSortChange:o},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.value,m=>(h.openBlock(),h.createBlock(d,{key:m.prop,prop:m.prop,label:m.label,sortable:m.sortable,width:m.width,"min-width":m.minWidth},h.createSlots({_:2},[m.type==="formatter"?{name:"default",fn:h.withCtx(_=>[h.createVNode(Dvt,{option:m,scope:_},null,8,["option","scope"])]),key:"0"}:m.type==="slot"?{name:"default",fn:h.withCtx(_=>[h.renderSlot(a.$slots,m.slot,{row:_.row})]),key:"1"}:m.type==="btns"?{name:"default",fn:h.withCtx(_=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(m.btns,(b,w)=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:`${b.text}-${w}`},[b.children?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[s(b.children,_).length?(h.openBlock(),h.createBlock(u,{key:0,placement:"bottom",trigger:"hover","popper-style":{minWidth:"0px",width:null}},{reference:h.withCtx(()=>[h.createVNode(c,{style:{marginLeft:"10px",verticalAlign:"-5px",cursor:"pointer"},size:"20"},{default:h.withCtx(()=>[h.createVNode(h.unref(TC))]),_:1})]),default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s(b.children,_),(v,y)=>(h.openBlock(),h.createElementBlock("div",{key:`${v.text}-${y}`},[h.createVNode(Cce,{option:v,scope:_,showMargin:y!==0},null,8,["option","scope","showMargin"])]))),128))]),_:2},1024)):h.createCommentVNode("",!0)],64)):(h.openBlock(),h.createBlock(Cce,{key:1,option:b,scope:_},null,8,["option","scope"]))],64))),128))]),key:"2"}:void 0]),1032,["prop","label","sortable","width","min-width"]))),128))]),_:1},8,["data","empty-text"])),[[g,n.loading]])]),_:1},8,["locale"])}}}),Evt={install(n){n.component("st-table",Nvt)}},Lvt=h.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]},config:{type:Object,default:()=>({})}},setup(n,{expose:e}){const t={tooltipFormatter:null,visibleMin:300};let i,r;const o=n,s=h.ref(),a=h.computed(()=>({...t,...o.config}));h.watch(()=>[o.data],()=>{l()},{deep:!0}),h.onMounted(()=>{i=ds.init(s.value),l();let c=!0;r=new ResizeObserver(()=>{if(c){c=null;return}i.resize()}),r.observe(s.value)}),h.onUnmounted(()=>{i.dispose(),r.disconnect(),r=null});const l=()=>{i.setOption({tooltip:{confine:!0,formatter:a.value.tooltipFormatter},series:[{type:"treemap",width:"100%",height:"100%",visibleMin:a.value.visibleMin,breadcrumb:{show:!1},label:{show:!0,formatter:"{b}"},upperLabel:{show:!0,height:30},itemStyle:{borderColor:"#fff"},levels:[{itemStyle:{borderColor:"#777",borderWidth:0,gapWidth:0},upperLabel:{show:!1}},{itemStyle:{borderColor:"#000",borderWidth:2,gapWidth:1},upperLabel:{padding:[8,0,0,0],formatter:c=>`{title|${c.data.name} ${c.data.labelValue}} ${c.data.percent===null?"":`{${c.data.percent>=0?c.data.percent===0?"defaultPercent":"redPercent":"greenPercent"}|${c.data.percent}%}`}`,rich:{title:{color:"#fff",fontSize:14},defaultPercent:{color:"#fff",fontSize:14},redPercent:{color:"red",fontSize:14},greenPercent:{color:"green",fontSize:14}}}},{colorSaturation:[.35,.5],itemStyle:{borderWidth:0,gapWidth:1,borderColorSaturation:.6},label:{align:"center",verticalAlign:"middle",fontSize:20,formatter:c=>`${c.data.name}
|
|
822
|
-
${c.data.colorValue}`}}],data:o.data.map(c=>({...c,itemStyle:{color:c.color},children:c.children.map(u=>({...u,itemStyle:{color:u.color}}))}))}]},!0)};return e({reset:()=>{l()}}),(c,u)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"chartRef",ref:s,class:"chart"},null,512))}}),gxt="",kvt=fi(Lvt,[["__scopeId","data-v-ab677899"]]),Tvt={install(n){n.component("st-treeMap",kvt)}},mxt="",bxt="",_xt="",vxt="",yxt="",Avt={class:"user"},Mvt={key:0},Ivt={class:"user-msg"},Rvt={class:"dialog-footer"},Ovt=fi({__name:"index",props:{config:{type:Object,default:()=>({})}},emits:["loginout"],setup(n,{emit:e}){const t=h.inject("stConfig"),i=W3(),r=h.ref(null),o=e,s=n,a=h.ref(null),l=h.ref(!1),c=h.ref({oldPassword:"",newPassword:"",confirmPassword:""}),u=h.ref({oldPassword:[{required:!0,message:"请输入原密码",trigger:"blur"}],newPassword:[],confirmPassword:[{required:!0,message:"请输入确认密码",trigger:"blur"},{validator:(b,w,v)=>{w===""?v(new Error("请输入确认密码")):w!==c.value.newPassword?v(new Error("两次输入密码不一致!")):v()},trigger:"blur"}]}),d=h.ref(!1),f=()=>{const{loginUrl:b}=s.config||{};TQe(b)},p=()=>{const{loginoutToLogin:b,loginoutUrl:w}=s.config||{};ZN(b,w),o("loginout")},g=()=>{a.value.validate(async(b,w)=>{b&&(await t.request.post("/invest/sys/user/password",{password:c.value.oldPassword,newPassword:c.value.newPassword,newPassword2:c.value.confirmPassword}),kr.success("修改成功!"),l.value=!1)})},m=()=>{u.value.newPassword.length===0&&h.nextTick(()=>{var b;u.value.newPassword=(b=r.value)==null?void 0:b.ruleFormPassword})},_=()=>{c.value={oldPassword:"",newPassword:"",confirmPassword:""},a.value.resetFields()};return(b,w)=>{const v=Jn,y=v9e,C=y9e,S=_9e,x=l0,N=yS,D=vS,k=va,E=h0;return h.openBlock(),h.createElementBlock("div",Avt,[h.unref(i)?(h.openBlock(),h.createElementBlock("div",Mvt,[h.createVNode(S,{placement:"bottom"},{dropdown:h.withCtx(()=>[h.createVNode(C,null,{default:h.withCtx(()=>[h.createVNode(y,{onClick:w[0]||(w[0]=L=>l.value=!0)},{default:h.withCtx(()=>[h.createTextVNode("修改密码")]),_:1}),h.createVNode(y,{onClick:p},{default:h.withCtx(()=>[h.createTextVNode("退出登录")]),_:1})]),_:1})]),default:h.withCtx(()=>{var L;return[h.createElementVNode("div",Ivt,[h.createVNode(v,{class:"user-msg-icon"},{default:h.withCtx(()=>[h.createVNode(h.unref(c4e))]),_:1}),h.createElementVNode("span",null,h.toDisplayString((L=h.unref(i))==null?void 0:L.username),1),h.createVNode(v,{class:"user-msg-arrow"},{default:h.withCtx(()=>[h.createVNode(h.unref(Mf))]),_:1})])]}),_:1})])):(h.openBlock(),h.createElementBlock("div",{key:1,class:"user-login",onClick:f},[h.createTextVNode(" 前往登录 "),h.createVNode(v,{class:"user-login-icon"},{default:h.withCtx(()=>[h.createVNode(h.unref(n4e))]),_:1})])),h.createVNode(E,{modelValue:l.value,"onUpdate:modelValue":w[7]||(w[7]=L=>l.value=L),title:"修改密码",width:"500","z-index":200,onOpened:m,onClosed:_},{footer:h.withCtx(()=>[h.createElementVNode("div",Rvt,[h.createVNode(k,{onClick:w[6]||(w[6]=L=>l.value=!1)},{default:h.withCtx(()=>[h.createTextVNode("取消")]),_:1}),h.createVNode(k,{type:"primary",onClick:g},{default:h.withCtx(()=>[h.createTextVNode(" 修改 ")]),_:1})])]),default:h.withCtx(()=>[h.createVNode(D,{ref_key:"changePasswordFormRef",ref:a,model:c.value,rules:u.value,"validate-on-rule-change":!1,onSubmit:h.withModifiers(g,["prevent"]),onKeyup:h.withKeys(g,["enter","native"]),"label-width":"auto"},{default:h.withCtx(()=>[h.createVNode(N,{label:"原密码",prop:"oldPassword"},{default:h.withCtx(()=>[h.createVNode(x,{modelValue:c.value.oldPassword,"onUpdate:modelValue":w[1]||(w[1]=L=>c.value.oldPassword=L),type:"password","show-password":!0},null,8,["modelValue"])]),_:1}),h.createVNode(N,{label:"新密码",prop:"newPassword"},{default:h.withCtx(()=>[h.createVNode(x,{modelValue:c.value.newPassword,"onUpdate:modelValue":w[2]||(w[2]=L=>c.value.newPassword=L),type:"password","show-password":!0,onFocus:w[3]||(w[3]=()=>{a.value.clearValidate(["newPassword"]),d.value=!0}),onBlur:w[4]||(w[4]=L=>d.value=!1)},null,8,["modelValue"]),h.createVNode(wce,{ref_key:"PasswordPromptRef",ref:r,value:c.value.newPassword,isFocus:d.value},null,8,["value","isFocus"])]),_:1}),h.createVNode(N,{label:"确认密码",prop:"confirmPassword"},{default:h.withCtx(()=>[h.createVNode(x,{modelValue:c.value.confirmPassword,"onUpdate:modelValue":w[5]||(w[5]=L=>c.value.confirmPassword=L),type:"password","show-password":!0},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-8b90a07a"]]),Pvt={install(n){n.component("st-user",Ovt)}},Cxt="",Sxt="",Sce={varietyMarket:{show:!0,options:[]},commonOption:{show:!0,options:[]},marketIds:{show:!0,options:[]},customTag:{show:!0,options:[]},jcTranslate:{show:!0,jcOptions:[{label:"恒指",value:"HZCFJC"},{label:"恒生科技",value:"HSKJJC"},{label:"上证50",value:"SZ50CFJC"},{label:"沪深300",value:"HS300CFJC"},{label:"中证500",value:"ZZ500CFJC"},{label:"中证1000",value:"ZZ1000JC"}]},factorScreen:{show:!0,sqlShow:!1,cycleShow:!0,cycleDefault:null,cycleOptions:[],factorOptions:[],factorDescriptions:[]},commonIndicator:{show:!0,options:[{key:"marketCapital",label:"总市值",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,10],unit:["亿","亿"],text:"≤10亿"},{range:[null,25],unit:["亿","亿"],text:"≤25亿"},{range:[null,50],unit:["亿","亿"],text:"≤50亿"},{range:[20,50],unit:["亿","亿"],text:"20亿~50亿"},{range:[100,null],unit:["亿","亿"],text:"≥100亿"},{range:[200,null],unit:["亿","亿"],text:"≥200亿"},{range:[500,null],unit:["亿","亿"],text:"≥500亿"},{range:[1e3,null],unit:["亿","亿"],text:"≥1000亿"}],defaultUnit:["亿","亿"],unitOptions:["元","千万","亿"]},{key:"floatMarketCapital",label:"流通市值",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,5],unit:["亿","亿"],text:"≤5亿"},{range:[null,20],unit:["亿","亿"],text:"≤20亿"},{range:[null,50],unit:["亿","亿"],text:"≤50亿"},{range:[null,100],unit:["亿","亿"],text:"≤100亿"},{range:[100,null],unit:["亿","亿"],text:"≥100亿"},{range:[200,null],unit:["亿","亿"],text:"≥200亿"},{range:[500,null],unit:["亿","亿"],text:"≥500亿"},{range:[1e3,null],unit:["亿","亿"],text:"≥1000亿"}],defaultUnit:["亿","亿"],unitOptions:["元","千万","亿"]},{key:"totalShares",label:"总股本",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,5],unit:["亿","亿"],text:"≤5亿"},{range:[null,10],unit:["亿","亿"],text:"≤10亿"},{range:[null,75],unit:["亿","亿"],text:"≤75亿"},{range:[10,75],unit:["亿","亿"],text:"10亿~75亿"},{range:[100,null],unit:["亿","亿"],text:"≥100亿"}],defaultUnit:["亿","亿"],unitOptions:["元","千万","亿"]},{key:"freeFloatShares",label:"流通股本",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,5],unit:["千万","千万"],text:"≤5千万"},{range:[5,3],unit:["千万","亿"],text:"5千万~3亿"},{range:[null,5],unit:["亿","亿"],text:"≤5亿"},{range:[null,10],unit:["亿","亿"],text:"≤10亿"},{range:[8,30],unit:["亿","亿"],text:"8亿~30亿"},{range:[30,null],unit:["亿","亿"],text:"≥30亿"}],defaultUnit:["亿","亿"],unitOptions:["元","千万","亿"]},{key:"turnoverRate",label:"换手率(实)",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,1],unit:["%","%"],text:"≤1%"},{range:[1,5],unit:["%","%"],text:"1%~5%"},{range:[5,10],unit:["%","%"],text:"5%~10%"},{range:[10,null],unit:["%","%"],text:"≥10%"}],defaultUnit:["%","%"],unitOptions:["%"]},{key:"peTtm",label:"市盈率",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,0],unit:[],text:"亏损"},{range:[0,null],unit:[],text:"≥0"},{range:[0,20],unit:[],text:"0~20"},{range:[20,40],unit:[],text:"20~40"},{range:[40,100],unit:[],text:"40~100"},{range:[100,null],unit:[],text:"≥100"}],defaultUnit:[],unitOptions:[]},{key:"eps",label:"每股净收益",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,0],unit:["元","元"],text:"≤0"},{range:[0,null],unit:["元","元"],text:"≥0"},{range:[.2,null],unit:["元","元"],text:"≥0.2元"},{range:[.5,null],unit:["元","元"],text:"≥0.5元"},{range:[1,null],unit:["元","元"],text:"≥1元"},{range:[2,null],unit:["元","元"],text:"≥2元"}],defaultUnit:["元","元"],unitOptions:["元"]},{key:"st",label:"是否ST",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},type:"custom"},{key:"pb",label:"市净率",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[0,null],unit:[],text:"≥0"},{range:[0,1],unit:[],text:"0~1"},{range:[1,2],unit:[],text:"1~2"},{range:[0,3],unit:[],text:"0~3"},{range:[3,null],unit:[],text:"≥3"}],defaultUnit:[],unitOptions:[]},{key:"mnShr",label:"成交额",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[0,1],unit:["亿","亿"],text:"0~1亿"},{range:[0,5],unit:["亿","亿"],text:"0~5亿"},{range:[0,10],unit:["亿","亿"],text:"0~10亿"},{range:[10,null],unit:["亿","亿"],text:"≥10亿"},{range:[50,null],unit:["亿","亿"],text:"≥50亿"},{range:[100,null],unit:["亿","亿"],text:"≥100亿"}],defaultUnit:["亿","亿"],unitOptions:["元","千万","亿"],showRankType:!0,defaultRadioType:"1",defaultRankRange:[0,25]},{key:"perVolumn",label:"成交量",type:"custom",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]}},{key:"roe",label:"净资产收益率roe",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,0],unit:["%","%"],text:"<0"},{range:[0,null],unit:["%","%"],text:">0"},{range:[10,null],unit:["%","%"],text:">10%"},{range:[15,null],unit:["%","%"],text:">15%"},{range:[20,null],unit:["%","%"],text:">20%"},{range:[30,null],unit:["%","%"],text:">30%"}],defaultUnit:["%","%"],unitOptions:["%"]},{key:"tFeaturelncomes",label:"净利润",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},type:"custom"},{key:"dividendYield",label:"股息率",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,1],unit:["%","%"],text:"≤1%"},{range:[1,5],unit:["%","%"],text:"1%~5%"},{range:[5,10],unit:["%","%"],text:"5%~10%"},{range:[10,null],unit:["%","%"],text:"≥10%"}],defaultUnit:["%","%"],unitOptions:["%"]},{key:"priceLevels",label:"股价分位",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},type:"custom"},{key:"peTtmLevels",label:"市盈率分位",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},type:"custom"},{key:"mainFlow",label:"主力净流入资金",type:"custom",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]}},{key:"expireDays",label:"过期天数",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:["天","天"],unitOptions:["天"]},{key:"virtualRealDegree",label:"虚实度",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:["%","%"],unitOptions:["%"]},{key:"yearProfitRate",label:"年化收益率",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:["%","%"],unitOptions:["%"]},{key:"impliedVolatility",label:"隐含波动率",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:["%","%"],unitOptions:["%"]},{key:"levelMultiplier",label:"杠杆率",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:[],unitOptions:[]},{key:"turnover",label:"成交额(期权)",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:["万","万"],unitOptions:["万"],showRankType:!0,defaultRadioType:"1",defaultRankRange:[0,25]},{key:"volume",label:"成交量(期权)",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:[],unitOptions:[],showRankType:!0,defaultRadioType:"1",defaultRankRange:[0,25]},{key:"openInterest",label:"持仓量",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:[],unitOptions:[],showRankType:!0,defaultRadioType:"1",defaultRankRange:[0,25]},{key:"optionsCpType",label:"认沽认购",parent:{varietyMarketIds:[8],commonOptionIds:[11]},type:"custom"},{key:"optionGear",label:"期权档位",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:[],unitOptions:[]}]}},Fvt=(n,e,t)=>{!e[0]&&e[0]!==0&&!e[1]&&e[1]!==0?t(new Error("至少填写一个分数")):t()},xce=n=>{const e=/(条件(\d+))/g;return n.match(e)||[]},Bvt={__name:"FactorDescription",props:h.mergeModels({data:{type:Array,default:[]}},{visible:{default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(n){const e=h.useModel(n,"visible");return(t,i)=>{const r=ex,o=JS,s=h0;return h.openBlock(),h.createBlock(s,{modelValue:e.value,"onUpdate:modelValue":i[0]||(i[0]=a=>e.value=a),title:"因子使用说明",width:"1000","align-center":"","destroy-on-close":""},{default:h.withCtx(()=>[h.createVNode(o,{data:n.data,border:"",height:"500"},{default:h.withCtx(()=>[h.createVNode(r,{prop:"factorName",label:"因子名称",width:"200"}),h.createVNode(r,{prop:"factorDesc",label:"因子说明"}),h.createVNode(r,{prop:"factorScoreDefine",label:"分值定义"})]),_:1},8,["data"])]),_:1},8,["modelValue"])}}},xxt="",Dce=n=>(h.pushScopeId("data-v-3592dee9"),n=n(),h.popScopeId(),n),Vvt={class:"factor-screen"},zvt={class:"custom-header"},Hvt=["id"],Wvt={class:"form-row"},$vt={class:"index"},jvt={style:{display:"flex","align-items":"center",width:"100%",height:"24px"}},Uvt=Dce(()=>h.createElementVNode("span",null,"~",-1)),qvt=Dce(()=>h.createElementVNode("span",null,"&&代表and,||代表or",-1)),Kvt={class:"dialog-footer"},Gvt=fi({__name:"index",props:h.mergeModels({config:{type:Object,default:{sqlShow:!1,cycleShow:!0,cycleDefault:null,cycleOptions:[],factorOptions:[],factorDescriptions:[]}}},{data:{default:{list:[],sqlEnable:0,sqlValue:null}},dataModifiers:{}}),emits:["update:data"],setup(n){const e=n,t=h.useModel(n,"data"),i=h.ref(!1),r=h.ref(!1),o=h.ref(null),s=h.ref({list:[{cycle:e.config.cycleDefault??null,factor:null,score:[null,null]}],sqlEnable:0,sqlValue:null}),a=()=>{const{list:g,sqlEnable:m,sqlValue:_}=t.value;s.value={list:JSON.parse(JSON.stringify(g)),sqlEnable:m,sqlValue:_},s.value.list.length||u(),i.value=!0},l=()=>{o.value.validate(g=>{const{list:m,sqlEnable:_,sqlValue:b}=s.value;if(g){if(_){if(!b)return kr.error("SQL语句不能为空");const w=xce(b),v=m.map((C,S)=>`条件${S+1}`),y=w.filter(C=>!v.includes(C));if(y.length)return kr.error(`请检查SQL语句, 不存在[${y}]`)}t.value={list:JSON.parse(JSON.stringify(m)),sqlEnable:_,sqlValue:b},i.value=!1}})},c=g=>{s.value.list.splice(g,1)},u=g=>{switch(g){case"compare":{s.value.list.push({key:"compare",cycle:e.config.cycleDefault??null,factor:null,compareType:">",cycle2:e.config.cycleDefault??null,factor2:null});break}default:{s.value.list.push({cycle:e.config.cycleDefault??null,factor:null,score:[null,null]});break}}},d=()=>{o.value.validate(g=>{if(g)if(s.value.sqlValue){const m=xce(s.value.sqlValue);s.value.sqlValue=s.value.list.reduce((_,b,w)=>(m.includes(`条件${w+1}`)||(_+=`&& 条件${w+1} `),_),s.value.sqlValue)}else s.value.sqlValue=s.value.list.reduce((m,_,b)=>(b===0?m+=`条件${b+1} `:m+=`&& 条件${b+1} `,m),"")})},f=g=>{switch(g.key){case"compare":{const{cycle:m,factor:_,compareType:b,cycle2:w,factor2:v}=g;let y="";return y+=` ${e.config.cycleOptions.find(({value:C})=>C===m).label}`,y+=` ${e.config.factorOptions.find(({value:C})=>C===_).label}`,y+=` ${b}`,y+=` ${e.config.cycleOptions.find(({value:C})=>C===w).label}`,y+=` ${e.config.factorOptions.find(({value:C})=>C===v).label}`,y}default:{const{cycle:m,factor:_,score:b}=g;let w="";return w+=` ${e.config.cycleOptions.find(({value:v})=>v===m).label}`,w+=` ${e.config.factorOptions.find(({value:v})=>v===_).label}`,w+=` ${b[0]||b[0]===0?`${b[0]}分`:"∞"}`,w+=" ~",w+=` ${b[1]||b[1]===0?`${b[1]}分`:"∞"}`,w}}},p=(g,m)=>{switch(g){case"sqlTag":{t.value={list:[],sqlEnable:0,sqlValue:null};break}case"factorTag":{t.value.list.splice(m,1);break}}};return(g,m)=>{var B;const _=HV,b=q8,w=va,v=Jn,y=P1,C=g0,S=p0,x=yS,N=t6,D=rS,k=oS,E=l0,L=vS,R=h0;return h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createElementVNode("div",Vvt,[h.createElementVNode("div",null,[t.value.sqlEnable&&t.value.sqlValue?(h.openBlock(),h.createBlock(b,{key:0,closable:"",type:"info",title:t.value.sqlValue,onClose:m[0]||(m[0]=M=>p("sqlTag"))},{default:h.withCtx(()=>[h.createVNode(_,{type:"info",truncated:"",style:{"max-width":"500px"}},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(t.value.sqlValue),1)]),_:1})]),_:1},8,["title"])):h.createCommentVNode("",!0),!t.value.sqlEnable&&t.value.list.length?(h.openBlock(!0),h.createElementBlock(h.Fragment,{key:1},h.renderList(t.value.list,(M,I)=>(h.openBlock(),h.createBlock(b,{closable:"",type:"info",onClose:A=>p("factorTag",I)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(f(M)),1)]),_:2},1032,["onClose"]))),256)):h.createCommentVNode("",!0),h.createVNode(w,{class:"screen-btn",type:"primary",plain:"",size:"small",icon:h.unref(L8),onClick:a},{default:h.withCtx(()=>[h.createTextVNode(" 添加因子 ")]),_:1},8,["icon"])]),h.createVNode(R,{modelValue:i.value,"onUpdate:modelValue":m[5]||(m[5]=M=>i.value=M),width:"680","align-center":"","destroy-on-close":""},{header:h.withCtx(({titleId:M,titleClass:I})=>[h.createElementVNode("div",zvt,[h.createElementVNode("span",{id:M,class:h.normalizeClass(I)}," 因子筛选 ",10,Hvt),h.createVNode(y,{effect:"dark",content:"点击查看: 因子使用说明",placement:"right"},{default:h.withCtx(()=>[h.createVNode(v,{onClick:m[1]||(m[1]=A=>r.value=!0)},{default:h.withCtx(()=>[h.createVNode(h.unref(sg))]),_:1})]),_:1})])]),footer:h.withCtx(()=>[h.createElementVNode("div",Kvt,[h.createVNode(w,{type:"primary",onClick:l},{default:h.withCtx(()=>[h.createTextVNode("确定")]),_:1})])]),default:h.withCtx(()=>[h.createVNode(L,{ref_key:"dialogFormRef",ref:o,model:s.value},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value.list,(M,I)=>(h.openBlock(),h.createElementBlock("div",Wvt,[h.createElementVNode("span",$vt,h.toDisplayString(`条件${I+1}`),1),M.key==="compare"?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[n.config.cycleShow?(h.openBlock(),h.createBlock(x,{key:0,prop:"list."+I+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:M.cycle,"onUpdate:modelValue":A=>M.cycle=A,placeholder:"选择周期",size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.cycleOptions,({label:A,value:V})=>(h.openBlock(),h.createBlock(C,{label:A,value:V,key:V},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):h.createCommentVNode("",!0),h.createVNode(x,{prop:"list."+I+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:M.factor,"onUpdate:modelValue":A=>M.factor=A,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:h.withCtx(()=>{var A;return[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList((A=n.config.factorOptions)==null?void 0:A.filter(V=>[4].includes(V.type)),({label:V,value:F})=>(h.openBlock(),h.createBlock(C,{label:V,value:F,key:F},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),h.createVNode(x,{style:{width:"52px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:M.compareType,"onUpdate:modelValue":A=>M.compareType=A,size:"small"},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList([">",">=","<","<="],A=>h.createVNode(C,{label:A,value:A,key:A},null,8,["label","value"])),64))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024),n.config.cycleShow?(h.openBlock(),h.createBlock(x,{key:1,prop:"list."+I+".cycle2",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:M.cycle2,"onUpdate:modelValue":A=>M.cycle2=A,placeholder:"选择周期",size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.cycleOptions,({label:A,value:V})=>(h.openBlock(),h.createBlock(C,{label:A,value:V,key:V},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):h.createCommentVNode("",!0),h.createVNode(x,{prop:"list."+I+".factor2",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:M.factor2,"onUpdate:modelValue":A=>M.factor2=A,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:h.withCtx(()=>{var A;return[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList((A=n.config.factorOptions)==null?void 0:A.filter(V=>[4].includes(V.type)),({label:V,value:F})=>(h.openBlock(),h.createBlock(C,{label:V,value:F,key:F},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[n.config.cycleShow?(h.openBlock(),h.createBlock(x,{key:0,prop:"list."+I+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:M.cycle,"onUpdate:modelValue":A=>M.cycle=A,placeholder:"选择周期",size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.cycleOptions,({label:A,value:V})=>(h.openBlock(),h.createBlock(C,{label:A,value:V,key:V},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):h.createCommentVNode("",!0),h.createVNode(x,{prop:"list."+I+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"194px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:M.factor,"onUpdate:modelValue":A=>M.factor=A,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:h.withCtx(()=>{var A;return[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList((A=n.config.factorOptions)==null?void 0:A.filter(V=>[1,3].includes(V.type)),({label:V,value:F})=>(h.openBlock(),h.createBlock(C,{label:V,value:F,key:F},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),h.createVNode(x,{prop:"list."+I+".score",rules:{validator:h.unref(Fvt),trigger:"blur"},style:{width:"200px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createElementVNode("div",jvt,[h.createVNode(N,{modelValue:M.score[0],"onUpdate:modelValue":A=>M.score[0]=A,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"]),Uvt,h.createVNode(N,{modelValue:M.score[1],"onUpdate:modelValue":A=>M.score[1]=A,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"])])]),_:2},1032,["prop","rules"])],64)),h.createVNode(v,{onClick:A=>c(I)},{default:h.withCtx(()=>[h.createVNode(h.unref(LC))]),_:2},1032,["onClick"])]))),256)),h.createVNode(w,{type:"primary",plain:"",size:"small",icon:h.unref(L8),onClick:u,style:{"margin-bottom":"10px"}},{default:h.withCtx(()=>[h.createTextVNode("添加因子")]),_:1},8,["icon"]),h.createVNode(w,{type:"primary",plain:"",size:"small",icon:h.unref(L8),onClick:m[2]||(m[2]=M=>u("compare")),style:{"margin-bottom":"10px"}},{default:h.withCtx(()=>[h.createTextVNode("添加因子对比")]),_:1},8,["icon"]),n.config.sqlShow?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createVNode(x,{label:"SQL功能: "},{default:h.withCtx(()=>[h.createVNode(k,{modelValue:s.value.sqlEnable,"onUpdate:modelValue":m[3]||(m[3]=M=>s.value.sqlEnable=M)},{default:h.withCtx(()=>[h.createVNode(D,{label:"关闭",value:0}),h.createVNode(D,{label:"启用",value:1})]),_:1},8,["modelValue"]),s.value.sqlEnable?(h.openBlock(),h.createBlock(w,{key:0,type:"primary",size:"small",onClick:d,style:{"margin-left":"auto"}},{default:h.withCtx(()=>[h.createTextVNode("生成SQL")]),_:1})):h.createCommentVNode("",!0)]),_:1}),s.value.sqlEnable?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createVNode(E,{modelValue:s.value.sqlValue,"onUpdate:modelValue":m[4]||(m[4]=M=>s.value.sqlValue=M),autosize:{minRows:4},type:"textarea",style:{"margin-bottom":"10px"}},null,8,["modelValue"]),qvt],64)):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["modelValue"])]),h.createVNode(Bvt,{visible:r.value,"onUpdate:visible":m[6]||(m[6]=M=>r.value=M),data:(B=n.config.factorDescriptions)==null?void 0:B.filter(M=>[1,3].includes(M.type))},null,8,["visible","data"])],64)}}},[["__scopeId","data-v-3592dee9"]]),Nxt="",Ext="",Yw=n=>(h.pushScopeId("data-v-b6076567"),n=n(),h.popScopeId(),n),Yvt={key:0,class:"common-indicator"},Zvt={class:"indicator"},Qvt=Yw(()=>h.createElementVNode("div",{class:"title"},[h.createElementVNode("span",null,"常用指标: "),h.createElementVNode("span",null,"不限")],-1)),Xvt={class:"options"},Jvt=["onClick"],eyt={class:"tags"},tyt=["onClick"],nyt={style:{"font-size":"18px"}},iyt={key:0,class:"out-box"},ryt=Yw(()=>h.createElementVNode("span",null,"自定义: ",-1)),oyt={key:0,class:"convenient-option-box"},syt={class:"out-box"},ayt=Yw(()=>h.createElementVNode("span",null,"自定义: ",-1)),lyt={key:0},cyt={key:0},uyt={key:0},dyt={key:1},hyt={class:"tFeaturelncomes-option-box"},fyt={class:"tFeaturelncomes-out-box"},pyt=Yw(()=>h.createElementVNode("span",null,"自定义: ",-1)),gyt={key:2},myt={key:3},byt={key:4},_yt={key:5},vyt={key:6},yyt={style:{display:"flex","align-items":"center"}},wyt={class:"dialog-footer"},Cyt=fi({__name:"index",props:h.mergeModels({config:{type:Object,default:()=>{}},varietyMarket:{type:Number,default:()=>null},commonOption:{type:Array,default:()=>[]}},{data:{default:[]},dataModifiers:{}}),emits:["update:data"],setup(n){const e=[{label:"近2周",value:"1"},{label:"近1个月",value:"2"},{label:"近3个月",value:"3"},{label:"近6个月",value:"4"},{label:"近1年",value:"5"}],t=h.useModel(n,"data"),i=n,r=h.ref(!1),o=h.computed(()=>{var _;return(_=i.data.find(b=>b.radioType==="1"))==null?void 0:_.key}),s=h.computed(()=>{let _=[];return i.varietyMarket===null&&!i.commonOption.length?_=i.config.options:(_=i.config.options,i.varietyMarket&&(_=_.filter(({parent:b})=>b.varietyMarketIds.includes(i.varietyMarket))),i.commonOption.length&&(_=_.filter(({parent:b})=>{const{commonOptionIds:w}=b;return[...new Set([...w,...i.commonOption])].length!==[...w,...i.commonOption].length}))),_}),a=h.ref({}),l=h.ref({}),c=_=>{a.value=_;const b={key:_.key,type:_.type,label:_.label};switch(_.key){case"st":{l.value={...b,st:null};break}case"tFeaturelncomes":{l.value={...b,rule:1,withFewYears:null,yearsCount:null,netProfit:null};break}case"priceLevels":{l.value={...b,priceLevels:null};break}case"peTtmLevels":{l.value={...b,peTtmLevels:null};break}case"optionsCpType":{l.value={...b,optionsCpType:null};break}case"perVolumn":{l.value={...b,radio:null,levels:[]};break}case"mainFlow":{l.value={...b,mainFlowRadioType:"0",rankRange:[null,null]};break}default:l.value={...b,range:[null,null],unit:_.defaultUnit.length?[..._.defaultUnit]:[null,null],radioType:o.value&&o.value!==_.key?"0":_.defaultRadioType,rankRange:_.defaultRankRange||[null,null]}}r.value=!0},u=()=>{var b;switch(l.value.key){case"st":{const{label:w,st:v}=l.value;if(v===null)return kr.warning("格式错误: 请至少选择一个值");l.value.tagText=`${w}: ${v?"是":"否"}`;break}case"tFeaturelncomes":{const{label:w,rule:v,withFewYears:y,yearsCount:C,netProfit:S}=l.value;if(["",null].includes(y)||["",null].includes(C)||["",null].includes(S))return kr.warning("格式错误: 请填写完整");l.value.tagText=`${w}: ${y}年内${C}年以上盈利${v===1?"超":"跌"}过${S}亿`;break}case"priceLevels":{const{label:w,priceLevels:v}=l.value;if(!v||v.length===0)return kr.warning("格式错误: 请至少选择一个值");l.value.tagText=`${w}: 已选${v}分位`;break}case"peTtmLevels":{const{label:w,peTtmLevels:v}=l.value;if(!v||v.length===0)return kr.warning("格式错误: 请至少选择一个值");l.value.tagText=`${w}: 已选${v}分位`;break}case"optionsCpType":{const{label:w,optionsCpType:v}=l.value;if(v===null)return kr.warning("格式错误: 请至少选择一个值");l.value.tagText=`${w}: ${v===1?"看涨":"看跌"}`;break}case"perVolumn":{const{label:w,radio:v,levels:y}=l.value;if(!v)return kr.warning("格式错误: 请选择时间");if(!(y!=null&&y.length))return kr.warning("格式错误: 请选择分位");l.value.tagText=`${w}: ${(b=e.find(C=>C.value===v))==null?void 0:b.label}${y.map(C=>`${C}分位`).join("、")}`;break}case"mainFlow":{const{label:w,mainFlowRadioType:v,radio:y,rankRange:C}=l.value,S=x=>{if(x===""||x===null||x===void 0)return!1;const N=Number(x);return!isNaN(N)};if(!y)return kr.warning("格式错误: 请选择时间");if(!S(C[0])||!S(C[1]))return kr.warning(`格式错误: 请填写${v==="0"?"涨幅范围":"排名范围"}`);l.value.tagText=`${w}: ${y}日${v==="0"?"涨幅范围":"排名范围"}: ${C[0]}${v==="0"?"%":""} ~ ${C[1]}${v==="0"?"%":""}`;break}default:{const{label:w,unit:v,radioType:y}=l.value,C=y==="1"?l.value.rankRange:l.value.range;if(["",null].includes(C[0])&&["",null].includes(C[1]))return kr.warning("格式错误: 请至少填写一个值");if(y==="1"){const N=Number(C[0]),D=Number(C[1]);if(isNaN(N)||isNaN(D))return kr.warning("格式错误: 请填写数字");if(N<0||D<0)return kr.warning("格式错误: 请填写大于0的数字");if(N>D)return kr.warning("格式错误: 请填写正确的排名范围")}const S=y==="1"?"":v[0]??"",x=y==="1"?"":v[1]??"";!["",null].includes(C[0])&&!["",null].includes(C[1])?l.value.tagText=`${w}${y==="1"?"排名":""}: ${C[0]}${S} ~ ${C[1]}${x}`:["",null].includes(C[0])?l.value.tagText=`${w}${y==="1"?"排名":""}: ≤${C[1]}${x}`:l.value.tagText=`${w}${y==="1"?"排名":""}: ≥${C[0]}${S}`}}const _=t.value.findIndex(({key:w})=>w===l.value.key);_===-1?t.value.push(l.value):t.value.splice(_,1,l.value),r.value=!1},d=_=>{a.value=s.value.find(({key:b})=>b===_.key),l.value=JSON.parse(JSON.stringify(_)),r.value=!0},f=_=>{t.value.splice(_,1)},p=_=>{l.value.range=[..._.range],l.value.unit=[..._.unit]},g=_=>{switch(_){case"≤0":Object.assign(l.value,{rule:2,withFewYears:1,yearsCount:1,netProfit:0});break;case"≥0":Object.assign(l.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:0});break;case"五年内有四年以上盈利超过5千万":Object.assign(l.value,{rule:1,withFewYears:5,yearsCount:4,netProfit:.5});break;case"≥10亿":Object.assign(l.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:10});break;case"≥20亿":Object.assign(l.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:20});break}};h.watch(()=>s.value,()=>{t.value.length&&(t.value=t.value.filter(({key:_})=>s.value.find(b=>b.key===_)))});const m=()=>{l.value.radio=null,l.value.rankRange=[null,null]};return(_,b)=>{const w=q8,v=Qme,y=oS,C=l0,S=va,x=g0,N=p0,D=rS,k=t6,E=h0;return n.config.show&&s.value.length?(h.openBlock(),h.createElementBlock("div",Yvt,[h.createElementVNode("div",Zvt,[Qvt,h.createElementVNode("div",Xvt,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value,L=>(h.openBlock(),h.createElementBlock("span",{key:L.key,onClick:R=>c(L)},h.toDisplayString(L.label),9,Jvt))),128))])]),h.createElementVNode("div",eyt,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.value,(L,R)=>(h.openBlock(),h.createBlock(w,{closable:"",type:"info",onClose:B=>f(R)},{default:h.withCtx(()=>[h.createElementVNode("span",null,h.toDisplayString(L.tagText),1),h.createElementVNode("span",{class:"edit",onClick:B=>d(L)},"编辑",8,tyt)]),_:2},1032,["onClose"]))),256))]),h.createVNode(E,{modelValue:r.value,"onUpdate:modelValue":b[25]||(b[25]=L=>r.value=L),title:a.value.label,width:"600","align-center":"","destroy-on-close":""},h.createSlots({footer:h.withCtx(()=>[h.createElementVNode("div",wyt,[h.createVNode(S,{type:"primary",onClick:u},{default:h.withCtx(()=>[h.createTextVNode("确定")]),_:1})])]),default:h.withCtx(()=>{var L;return[a.value.type===void 0&&l.value.radioType==="1"?(h.openBlock(),h.createElementBlock("div",iyt,[ryt,h.createVNode(C,{modelValue:l.value.rankRange[0],"onUpdate:modelValue":b[2]||(b[2]=R=>l.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),h.createTextVNode(" ~ "),h.createVNode(C,{modelValue:l.value.rankRange[1],"onUpdate:modelValue":b[3]||(b[3]=R=>l.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])):a.value.type===void 0?(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[(L=a.value.convenientOptions)!=null&&L.length?(h.openBlock(),h.createElementBlock("div",oyt,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(a.value.convenientOptions,R=>(h.openBlock(),h.createBlock(S,{key:R.text,onClick:B=>p(R)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.text),1)]),_:2},1032,["onClick"]))),128))])):h.createCommentVNode("",!0),h.createElementVNode("div",syt,[ayt,h.createVNode(C,{modelValue:l.value.range[0],"onUpdate:modelValue":b[5]||(b[5]=R=>l.value.range[0]=R),style:{flex:"1"}},h.createSlots({_:2},[a.value.unitOptions.length?{name:"append",fn:h.withCtx(()=>[a.value.unitOptions.length===1?(h.openBlock(),h.createElementBlock("span",lyt,h.toDisplayString(l.value.unit[0]),1)):(h.openBlock(),h.createBlock(N,{key:1,modelValue:l.value.unit[0],"onUpdate:modelValue":b[4]||(b[4]=R=>l.value.unit[0]=R),style:{width:"72px"}},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(a.value.unitOptions,R=>(h.openBlock(),h.createBlock(x,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"]),h.createTextVNode(" ~ "),h.createVNode(C,{modelValue:l.value.range[1],"onUpdate:modelValue":b[7]||(b[7]=R=>l.value.range[1]=R),style:{flex:"1"}},h.createSlots({_:2},[a.value.unitOptions.length?{name:"append",fn:h.withCtx(()=>[a.value.unitOptions.length===1?(h.openBlock(),h.createElementBlock("span",cyt,h.toDisplayString(l.value.unit[1]),1)):(h.openBlock(),h.createBlock(N,{key:1,modelValue:l.value.unit[1],"onUpdate:modelValue":b[6]||(b[6]=R=>l.value.unit[1]=R),style:{width:"72px"}},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(a.value.unitOptions,R=>(h.openBlock(),h.createBlock(x,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"])])],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:2},[a.value.key==="st"?(h.openBlock(),h.createElementBlock("div",uyt,[h.createVNode(y,{modelValue:l.value.st,"onUpdate:modelValue":b[8]||(b[8]=R=>l.value.st=R)},{default:h.withCtx(()=>[h.createVNode(D,{label:"是",value:1}),h.createVNode(D,{label:"否",value:0})]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),a.value.key==="tFeaturelncomes"?(h.openBlock(),h.createElementBlock("div",dyt,[h.createElementVNode("div",hyt,[h.createVNode(S,{onClick:b[9]||(b[9]=R=>g("≤0"))},{default:h.withCtx(()=>[h.createTextVNode("≤0")]),_:1}),h.createVNode(S,{onClick:b[10]||(b[10]=R=>g("≥0"))},{default:h.withCtx(()=>[h.createTextVNode("≥0")]),_:1}),h.createVNode(S,{onClick:b[11]||(b[11]=R=>g("五年内有四年以上盈利超过5千万"))},{default:h.withCtx(()=>[h.createTextVNode("五年内有四年以上盈利超过5千万")]),_:1}),h.createVNode(S,{onClick:b[12]||(b[12]=R=>g("≥10亿"))},{default:h.withCtx(()=>[h.createTextVNode("≥10亿")]),_:1}),h.createVNode(S,{onClick:b[13]||(b[13]=R=>g("≥20亿"))},{default:h.withCtx(()=>[h.createTextVNode("≥20亿")]),_:1})]),h.createElementVNode("div",fyt,[pyt,h.createElementVNode("div",null,[h.createVNode(k,{modelValue:l.value.withFewYears,"onUpdate:modelValue":b[14]||(b[14]=R=>l.value.withFewYears=R),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 年内 "),h.createVNode(k,{modelValue:l.value.yearsCount,"onUpdate:modelValue":b[15]||(b[15]=R=>l.value.yearsCount=R),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 年以上盈利"+h.toDisplayString(l.value.rule===1?"超":"跌")+"过 ",1),h.createVNode(k,{modelValue:l.value.netProfit,"onUpdate:modelValue":b[16]||(b[16]=R=>l.value.netProfit=R),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 亿 ")])])])):h.createCommentVNode("",!0),a.value.key==="priceLevels"?(h.openBlock(),h.createElementBlock("div",gyt,[h.createVNode(N,{modelValue:l.value.priceLevels,"onUpdate:modelValue":b[17]||(b[17]=R=>l.value.priceLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList([1,2,3,4,5],R=>h.createVNode(x,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),a.value.key==="peTtmLevels"?(h.openBlock(),h.createElementBlock("div",myt,[h.createVNode(N,{modelValue:l.value.peTtmLevels,"onUpdate:modelValue":b[18]||(b[18]=R=>l.value.peTtmLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList([1,2,3,4,5,6,7,8,9,10],R=>h.createVNode(x,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),a.value.key==="optionsCpType"?(h.openBlock(),h.createElementBlock("div",byt,[h.createVNode(y,{modelValue:l.value.optionsCpType,"onUpdate:modelValue":b[19]||(b[19]=R=>l.value.optionsCpType=R)},{default:h.withCtx(()=>[h.createVNode(D,{label:"看涨",value:1}),h.createVNode(D,{label:"看跌",value:2})]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),a.value.key==="perVolumn"?(h.openBlock(),h.createElementBlock("div",_yt,[h.createVNode(y,{modelValue:l.value.radio,"onUpdate:modelValue":b[20]||(b[20]=R=>l.value.radio=R)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList(e,R=>h.createVNode(D,{key:R.value,value:R.value},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"]),h.createVNode(N,{modelValue:l.value.levels,"onUpdate:modelValue":b[21]||(b[21]=R=>l.value.levels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList([1,2,3,4,5],R=>h.createVNode(x,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),a.value.key==="mainFlow"?(h.openBlock(),h.createElementBlock("div",vyt,[h.createVNode(y,{modelValue:l.value.radio,"onUpdate:modelValue":b[22]||(b[22]=R=>l.value.radio=R)},{default:h.withCtx(()=>[h.createVNode(D,{value:"3"},{default:h.withCtx(()=>[h.createTextVNode("3日")]),_:1}),h.createVNode(D,{value:"5"},{default:h.withCtx(()=>[h.createTextVNode("5日")]),_:1}),h.createVNode(D,{value:"10"},{default:h.withCtx(()=>[h.createTextVNode("10日")]),_:1}),h.createVNode(D,{value:"20"},{default:h.withCtx(()=>[h.createTextVNode("20日")]),_:1})]),_:1},8,["modelValue"]),h.createElementVNode("div",yyt,[h.createElementVNode("span",null,h.toDisplayString(l.value.mainFlowRadioType==="0"?"涨幅范围":"排名范围")+": ",1),h.createVNode(C,{modelValue:l.value.rankRange[0],"onUpdate:modelValue":b[23]||(b[23]=R=>l.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),h.createTextVNode(" ~ "),h.createVNode(C,{modelValue:l.value.rankRange[1],"onUpdate:modelValue":b[24]||(b[24]=R=>l.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])])):h.createCommentVNode("",!0)],64))]}),_:2},[a.value.showRankType?{name:"header",fn:h.withCtx(()=>[h.createElementVNode("span",nyt,h.toDisplayString(a.value.label),1),h.createVNode(y,{modelValue:l.value.radioType,"onUpdate:modelValue":b[0]||(b[0]=L=>l.value.radioType=L),style:{"vertical-align":"4px","margin-left":"12px"}},{default:h.withCtx(()=>[h.createVNode(v,{label:"数值",value:"0"}),h.createVNode(v,{disabled:o.value&&o.value!==a.value.key,label:"排名",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"0"}:a.value.key==="mainFlow"?{name:"header",fn:h.withCtx(()=>[h.createElementVNode("span",{style:{"font-size":"18px"}},h.toDisplayString(a.value.label),1),h.createVNode(y,{modelValue:l.value.mainFlowRadioType,"onUpdate:modelValue":b[1]||(b[1]=L=>l.value.mainFlowRadioType=L),style:{"vertical-align":"4px","margin-left":"12px"},onChange:m},{default:h.withCtx(()=>[h.createVNode(v,{label:"涨幅范围",value:"0"}),h.createVNode(v,{label:"排名范围",value:"1"})]),_:1},8,["modelValue"])]),key:"1"}:void 0]),1032,["modelValue","title"])])):h.createCommentVNode("",!0)}}},[["__scopeId","data-v-b6076567"]]),kxt="",Fp=n=>(h.pushScopeId("data-v-bdbe35cf"),n=n(),h.popScopeId(),n),Syt={class:"variety-search"},xyt={key:0,class:"variety-search-row"},Dyt={class:"title"},Nyt=Fp(()=>h.createElementVNode("span",null,"品种市场: ",-1)),Eyt={key:1,class:"variety-search-row"},Lyt={class:"title"},kyt=Fp(()=>h.createElementVNode("span",null,"常用选项: ",-1)),Tyt={key:2,class:"variety-search-row"},Ayt={class:"title"},Myt=Fp(()=>h.createElementVNode("span",null,"上市板块: ",-1)),Iyt={key:3,class:"variety-search-row"},Ryt={class:"title"},Oyt=Fp(()=>h.createElementVNode("span",null,"自定标签: ",-1)),Pyt={key:4,class:"variety-search-row"},Fyt={class:"title"},Byt=Fp(()=>h.createElementVNode("span",null,"价差转换: ",-1)),Vyt={key:5,class:"variety-search-row"},zyt={class:"title"},Hyt=Fp(()=>h.createElementVNode("span",null,"因子筛选: ",-1)),Wyt=fi({__name:"index",props:h.mergeModels({config:{type:Object,default:{}}},{searchData:{},searchDataModifiers:{}}),emits:["update:searchData"],setup(n,{expose:e}){const t=n,i=h.useModel(n,"searchData");i.value=Object.assign(i.value,{varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null},commonIndicator:[]});const r=h.computed(()=>{const d={};return Object.keys(Sce).forEach(f=>{const p=Sce[f],g=t.config[f]??{},m={...p,...g};d[f]=m}),d}),o=h.computed(()=>r.value.varietyMarket.options),s=h.computed(()=>{const{varietyMarket:d}=i.value;return d?o.value.find(({value:p})=>p===d).memo.reduce((p,g)=>{const m=r.value.commonOption.options.find(_=>_.value===g);return m&&p.push(m),p},[]):r.value.commonOption.options}),a=h.computed(()=>{const{varietyMarket:d}=i.value;return d?r.value.marketIds.options.filter(f=>f.varietyMarketIds.includes(d)):r.value.marketIds.options}),l=h.computed(()=>r.value.customTag.options),c=h.computed(()=>r.value.jcTranslate.jcOptions),u=d=>{switch(d){case"commonOption":{i.value[d]=[];break}case"marketIds":{i.value[d]=[];break}case"customTag":{i.value[d]=[];break}case"jcTranslate":{i.value[d]={type:null,jcList:[]};break}case"factorScreen":{i.value[d]={list:[],sqlEnable:0,sqlValue:null};break}case"commonIndicator":{i.value[d]=[];break}default:{i.value[d]=null;break}}};return h.watch(()=>s.value,d=>{var f;(f=i.value.commonOption)!=null&&f.length&&(i.value.commonOption=i.value.commonOption.filter(p=>d.find(({value:g})=>g===p)))}),h.watch(()=>a.value,d=>{var f;(f=i.value.marketIds)!=null&&f.length&&(i.value.marketIds=i.value.marketIds.filter(p=>d.find(({value:g})=>g===p)))}),e({formatData:d=>{var p,g,m,_,b,w;console.log("%c[品种池搜索聚合组件]: 正在生成接口传参...","color: tomato");const f={};if(d.varietyMarket&&(f.exchangeId=String(d.varietyMarket)),(p=d.commonOption)!=null&&p.length&&(f.optionId=d.commonOption.join(",")),(g=d.marketIds)!=null&&g.length&&(f.marketIds=d.marketIds),(m=d.customTag)!=null&&m.length&&(f.tagIds=d.customTag),(_=r.value.jcTranslate)!=null&&_.show){const{jcTranslate:v}=d,{type:y,jcList:C}=v;switch(y){case 1:{f.translateType=1,f.jcType=C.join(",");break}case 2:f.translateType=2}}if((b=r.value.factorScreen)!=null&&b.show){const{factorScreen:v}=d;if((w=v==null?void 0:v.list)!=null&&w.length&&(f.tbFeatureFactorScores=v.list.map(y=>{switch(y.key){case"compare":return{freqId:y.cycle,factorId:y.factor,compareType:y.compareType,freqId2:y.cycle2,factorId2:y.factor2};default:return{freqId:y.cycle,factorId:y.factor,startScore:y.score[0],endScore:y.score[1]}}})),v.sqlEnable){const y=v.list.reduce((S,x,N)=>{var k,E;const D=`条件${N+1}`;switch(x.key){case"compare":{let L="";(k=r.value.factorScreen)!=null&&k.cycleShow?L=`freq_id = ${x.cycle} and factor_id = ${x.factor} ${x.compareType} freq_id = ${x.cycle2} and factor_id = ${x.factor2}`:L=`factor_id = ${x.factor} ${x.compareType} factor_id = ${x.factor2}`,S.set(D,`(${L})`);break}default:{let L=`factor_id = ${x.factor} and `;(E=r.value.factorScreen)!=null&&E.cycleShow&&(L=`freq_id = ${x.cycle} and factor_id = ${x.factor} and `),(x.score[0]||x.score[0]===0)&&(x.score[1]||x.score[1]===0)?L+=`score >= ${x.score[0]} and score <= ${x.score[1]}`:x.score[0]||x.score[0]===0?L+=`score >= ${x.score[0]}`:(x.score[1]||x.score[1]===0)&&(L+=`score <= ${x.score[1]}`),S.set(D,`(${L})`)}}return S},new Map([]));let C=v.sqlValue;for(const[S,x]of y){const N=new RegExp(S,"g");C=C.replace(N,x)}f.sql=C,f.sqlExpression=v.sqlValue}f.enableSql=v.sqlEnable===1?2:1}{const v=["expireDays","virtualRealDegree","yearProfitRate","impliedVolatility","levelMultiplier","turnover","volume","openInterest","optionsCpType","optionGear"],y=d.commonIndicator.reduce((E,L)=>{const{key:R,type:B,range:M,unit:I,radioType:A,mainFlowRadioType:V,radio:F,rankRange:U}=L;if(A==="1")f.sortBy={column:L.key,start:U[0]||null,end:U[1]||null};else if(R==="dividendYield"){let[J,K]=M;["",null].includes(J)||(J=J/100),["",null].includes(K)||(K=K/100),E.push({column:L.key,start:J,end:K})}else if(R==="mainFlow"){let[J,K]=U,z=V==="0"?`netInfow${F}d`:`last${F}DayMianFlowRank`;E.push({column:z,start:J,end:K})}else if(B===void 0&&!v.includes(R)){let[J,K]=M;if(!["",null].includes(J))switch(I[0]){case"亿":J=J*1e8;break;case"千万":J=J*1e7;break;default:J=J;break}if(!["",null].includes(K))switch(I[1]){case"亿":K=K*1e8;break;case"千万":K=K*1e7;break;default:K=K;break}E.push({column:L.key,start:J,end:K})}return E},[]);y.length&&(f.query=y);const C=d.commonIndicator.find(({key:E})=>E==="st");C&&(f.st=C.st);const S=d.commonIndicator.find(({key:E})=>E==="tFeaturelncomes");S&&(f.netProfitQueryDto={...S,netProfit:S.netProfit*1e8});const x=d.commonIndicator.find(({key:E})=>E==="priceLevels");x&&(f.priceLevels=x.priceLevels);const N=d.commonIndicator.find(({key:E})=>E==="peTtmLevels");N&&(f.peTtmLevels=N.peTtmLevels);const D={};d.commonIndicator.forEach(E=>{const{key:L}=E;switch(L){case"expireDays":["",null].includes(E.range[0])||(D.minExpireDays=E.range[0]),["",null].includes(E.range[1])||(D.maxExpireDays=E.range[1]);break;case"virtualRealDegree":["",null].includes(E.range[0])||(D.minVirtualRealDegree=E.range[0]/100),["",null].includes(E.range[1])||(D.maxVirtualRealDegree=E.range[1]/100);break;case"yearProfitRate":["",null].includes(E.range[0])||(D.minYearProfitRate=E.range[0]/100),["",null].includes(E.range[1])||(D.maxYearProfitRate=E.range[1]/100);break;case"impliedVolatility":["",null].includes(E.range[0])||(D.minImpliedVolatility=E.range[0]/100),["",null].includes(E.range[1])||(D.maxImpliedVolatility=E.range[1]/100);break;case"levelMultiplier":["",null].includes(E.range[0])||(D.minLevelMultiplier=E.range[0]),["",null].includes(E.range[1])||(D.maxLevelMultiplier=E.range[1]);break;case"turnover":["",null].includes(E.range[0])||(D.minTurnover=E.range[0]*1e4),["",null].includes(E.range[1])||(D.maxTurnover=E.range[1]*1e4);break;case"volume":["",null].includes(E.range[0])||(D.minVolume=E.range[0]),["",null].includes(E.range[1])||(D.maxVolume=E.range[1]);break;case"openInterest":["",null].includes(E.range[0])||(D.minOpenInterest=E.range[0]),["",null].includes(E.range[1])||(D.maxOpenInterest=E.range[1]);break;case"optionsCpType":D.optionsCpType=E.optionsCpType;break;case"optionGear":["",null].includes(E.range[0])||(D.minOptionGear=E.range[0]),["",null].includes(E.range[1])||(D.maxOptionGear=E.range[1]);break}});const k=d.commonIndicator.find(({key:E})=>E==="perVolumn");k&&(f.perVolumn={type:k.radio,value:k.levels}),Object.keys(D).length&&(f.searchOptionDto={...f.searchOptionDto,...D})}return console.log("%c[品种池搜索聚合组件]: 接口传参数据生成完毕","color: green",f),f},reset:()=>{i.value={varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null},commonIndicator:[]}}}),(d,f)=>{var v,y,C,S,x,N;const p=rS,g=oS,m=ld,_=BF,b=g0,w=p0;return h.openBlock(),h.createElementBlock("div",Syt,[(v=r.value.varietyMarket)!=null&&v.show?(h.openBlock(),h.createElementBlock("div",xyt,[h.createElementVNode("div",Dyt,[Nyt,h.createElementVNode("span",{onClick:f[0]||(f[0]=D=>u("varietyMarket"))},"不限")]),h.createVNode(g,{modelValue:i.value.varietyMarket,"onUpdate:modelValue":f[1]||(f[1]=D=>i.value.varietyMarket=D),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value,({label:D,value:k})=>(h.openBlock(),h.createBlock(p,{label:D,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),(y=r.value.commonOption)!=null&&y.show&&s.value.length?(h.openBlock(),h.createElementBlock("div",Eyt,[h.createElementVNode("div",Lyt,[kyt,h.createElementVNode("span",{onClick:f[2]||(f[2]=D=>u("commonOption"))},"不限")]),h.createVNode(_,{modelValue:i.value.commonOption,"onUpdate:modelValue":f[3]||(f[3]=D=>i.value.commonOption=D),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value,({label:D,value:k})=>(h.openBlock(),h.createBlock(m,{label:D,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),(C=r.value.marketIds)!=null&&C.show&&a.value.length?(h.openBlock(),h.createElementBlock("div",Tyt,[h.createElementVNode("div",Ayt,[Myt,h.createElementVNode("span",{onClick:f[4]||(f[4]=D=>u("marketIds"))},"不限")]),h.createVNode(_,{modelValue:i.value.marketIds,"onUpdate:modelValue":f[5]||(f[5]=D=>i.value.marketIds=D),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(a.value,({label:D,value:k})=>(h.openBlock(),h.createBlock(m,{label:D,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),(S=r.value.customTag)!=null&&S.show&&l.value.length?(h.openBlock(),h.createElementBlock("div",Iyt,[h.createElementVNode("div",Ryt,[Oyt,h.createElementVNode("span",{onClick:f[6]||(f[6]=D=>u("customTag"))},"不限")]),h.createVNode(_,{modelValue:i.value.customTag,"onUpdate:modelValue":f[7]||(f[7]=D=>i.value.customTag=D),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(l.value,({label:D,value:k})=>(h.openBlock(),h.createBlock(m,{label:D,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),(x=r.value.jcTranslate)!=null&&x.show?(h.openBlock(),h.createElementBlock("div",Pyt,[h.createElementVNode("div",Fyt,[Byt,h.createElementVNode("span",{onClick:f[8]||(f[8]=D=>u("jcTranslate"))},"不限")]),h.createVNode(g,{modelValue:i.value.jcTranslate.type,"onUpdate:modelValue":f[9]||(f[9]=D=>i.value.jcTranslate.type=D),size:"small"},{default:h.withCtx(()=>[h.createVNode(p,{value:2},{default:h.withCtx(()=>[h.createTextVNode("价差转品种")]),_:1}),h.createVNode(p,{value:1},{default:h.withCtx(()=>[h.createTextVNode("品种转价差")]),_:1})]),_:1},8,["modelValue"]),h.withDirectives(h.createVNode(w,{modelValue:i.value.jcTranslate.jcList,"onUpdate:modelValue":f[10]||(f[10]=D=>i.value.jcTranslate.jcList=D),size:"small",multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"请选择价差品种",style:{width:"140px"}},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(c.value,D=>(h.openBlock(),h.createBlock(b,{key:D.value,label:D.label,value:D.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),[[h.vShow,i.value.jcTranslate.type===1]])])):h.createCommentVNode("",!0),(N=r.value.factorScreen)!=null&&N.show?(h.openBlock(),h.createElementBlock("div",Vyt,[h.createElementVNode("div",zyt,[Hyt,h.createElementVNode("span",{onClick:f[11]||(f[11]=D=>u("factorScreen"))},"不限")]),h.createVNode(Gvt,{data:i.value.factorScreen,"onUpdate:data":f[12]||(f[12]=D=>i.value.factorScreen=D),config:r.value.factorScreen},null,8,["data","config"])])):h.createCommentVNode("",!0),h.createVNode(Cyt,{data:i.value.commonIndicator,"onUpdate:data":f[13]||(f[13]=D=>i.value.commonIndicator=D),varietyMarket:i.value.varietyMarket,commonOption:i.value.commonOption,config:r.value.commonIndicator},null,8,["data","varietyMarket","commonOption","config"])])}}},[["__scopeId","data-v-bdbe35cf"]]),$yt={install(n){n.component("st-varietySearch",Wyt)}},Axt="",Mxt="",Ixt="",jyt={key:0,class:"footer-box"},Uyt={__name:"index",props:h.mergeModels({tableData:{type:Array,default:[]},tableColumn:{type:Array,default:[]},tableLoading:{type:[String,null],default:null},config:{type:Object}},{tableActiveData:{default:()=>[]},tableActiveDataModifiers:{}}),emits:h.mergeModels(["touchBottom"],["update:tableActiveData"]),setup(n,{emit:e}){const t=e,i=n,r=h.computed(()=>({headerHeight:50,rowHeight:50,tableActiveNum:9,tableActiveKey:"id",pageUpDownEnabled:!0,...i.config})),o=h.ref(null),s=h.ref(0);let a=0,l=!1,c=null;const u=h.useModel(n,"tableActiveData"),d=h.computed(()=>u.value.map(b=>b[r.value.tableActiveKey])),f=({rowData:b,rowIndex:w})=>{const{tableActiveNum:v,tableActiveKey:y}=r.value;if(d.value.includes(b[y]))return;const C=Math.floor(w/v)*v,S=C+v;u.value=i.tableData.slice(C,S)},p=({code:b})=>{const{tableData:w}=i,{tableActiveNum:v,tableActiveKey:y,pageUpDownEnabled:C}=r.value;if(!w.length||!C)return;const S=w.findIndex(k=>k[y]===d.value.at(0)),x=w.findIndex(k=>k[y]===d.value.at(-1));let N=null,D=null;switch(b){case"PageUp":if(S===0)return;N=S-v>0?S-v:0,D=N+v-1,u.value=w.slice(N,D+1),m(N,"PageUp");break;case"PageDown":if(x===w.length-1)return;N=S+v,D=N+v-1,u.value=w.slice(N,D+1),m(D,"PageDown");break}},g=b=>{l||(a===b.scrollLeft&&b.yAxisScrollDir==="backward"&&(s.value=0),a=b.scrollLeft)},m=(b,w)=>{b!==null&&(clearTimeout(c),l=!0,w==="PageUp"?s.value=0:b>=i.tableData.length-1&&(s.value=30,t("touchBottom")),h.nextTick(()=>{o.value.scrollToRow(b),o.value.scrollToLeft(a),c=setTimeout(()=>{l=!1},500)}))},_=({rowData:b})=>{if(!u.value.length)return;let w="";const{tableActiveKey:v}=r.value;return b[v]===d.value[0]&&(w+=" virtual-table-active-start"),d.value.includes(b[v])&&(w+=" virtual-table-active-row"),b[v]===d.value[d.value.length-1]&&(w+=" virtual-table-active-end"),w};return h.onMounted(()=>{window.addEventListener("keydown",p)}),h.watch(()=>i.tableLoading,b=>{b||(s.value=0)}),h.onUnmounted(()=>{window.removeEventListener("keydown",p)}),(b,w)=>{const v=Z8,y=va,C=k5e,S=i_e,x=r_e;return h.openBlock(),h.createBlock(x,null,{default:h.withCtx(({height:N,width:D})=>[h.createVNode(S,{ref_key:"tableRef",ref:o,id:"virtualTable",fixed:"",data:n.tableData,columns:n.tableColumn,width:D,height:N,"header-height":r.value.headerHeight,"row-height":r.value.rowHeight,"row-class":_,"row-event-handlers":{onClick:f},"footer-height":s.value,"scrollbar-always-on":"",onScroll:g,onEndReached:w[0]||(w[0]=k=>m(n.tableData.length-1,"PageDown"))},{empty:h.withCtx(()=>[h.createVNode(v,{description:"暂无数据",style:{height:"100%"}})]),footer:h.withCtx(()=>[s.value?(h.openBlock(),h.createElementBlock("div",jyt,[n.tableLoading==="more"?(h.openBlock(),h.createBlock(C,{key:0},{default:h.withCtx(()=>[h.createVNode(y,{type:"primary",text:"",loading:""},{default:h.withCtx(()=>[h.createTextVNode("正在加载更多数据")]),_:1})]),_:1})):n.tableLoading==="all"?(h.openBlock(),h.createBlock(C,{key:1},{default:h.withCtx(()=>[h.createTextVNode(" 已无更多数据 ")]),_:1})):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0)]),_:2},1032,["data","columns","width","height","header-height","row-height","row-event-handlers","footer-height"])]),_:1})}}},Rxt="",qyt=fi(Uyt,[["__scopeId","data-v-7e702a8a"]]),Kyt={install(n){n.component("st-virtualTable",qyt)}},Gyt={install(n){q_e.install(n),IQe.install(n),FQe.install(n),lXe.install(n),dXe.install(n),qrt.install(n),wot.install(n),Oot.install(n),$ot.install(n),Kot.install(n),fvt.install(n),mvt.install(n),wvt.install(n),xvt.install(n),Evt.install(n),Tvt.install(n),Pvt.install(n),$yt.install(n),Kyt.install(n)}};/*!-----------------------------------------------------------------------------
|
|
822
|
+
${c.data.colorValue}`}}],data:o.data.map(c=>({...c,itemStyle:{color:c.color},children:c.children.map(u=>({...u,itemStyle:{color:u.color}}))}))}]},!0)};return e({reset:()=>{l()}}),(c,u)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"chartRef",ref:s,class:"chart"},null,512))}}),gxt="",kvt=fi(Lvt,[["__scopeId","data-v-ab677899"]]),Tvt={install(n){n.component("st-treeMap",kvt)}},mxt="",bxt="",_xt="",vxt="",yxt="",Avt={class:"user"},Mvt={key:0},Ivt={class:"user-msg"},Rvt={class:"dialog-footer"},Ovt=fi({__name:"index",props:{config:{type:Object,default:()=>({})}},emits:["loginout"],setup(n,{emit:e}){const t=h.inject("stConfig"),i=W3(),r=h.ref(null),o=e,s=n,a=h.ref(null),l=h.ref(!1),c=h.ref({oldPassword:"",newPassword:"",confirmPassword:""}),u=h.ref({oldPassword:[{required:!0,message:"请输入原密码",trigger:"blur"}],newPassword:[],confirmPassword:[{required:!0,message:"请输入确认密码",trigger:"blur"},{validator:(b,w,v)=>{w===""?v(new Error("请输入确认密码")):w!==c.value.newPassword?v(new Error("两次输入密码不一致!")):v()},trigger:"blur"}]}),d=h.ref(!1),f=()=>{const{loginUrl:b}=s.config||{};TQe(b)},p=()=>{const{loginoutToLogin:b,loginoutUrl:w}=s.config||{};ZN(b,w),o("loginout")},g=()=>{a.value.validate(async(b,w)=>{b&&(await t.request.post("/invest/sys/user/password",{password:c.value.oldPassword,newPassword:c.value.newPassword,newPassword2:c.value.confirmPassword}),kr.success("修改成功!"),l.value=!1)})},m=()=>{u.value.newPassword.length===0&&h.nextTick(()=>{var b;u.value.newPassword=(b=r.value)==null?void 0:b.ruleFormPassword})},_=()=>{c.value={oldPassword:"",newPassword:"",confirmPassword:""},a.value.resetFields()};return(b,w)=>{const v=Jn,y=v9e,C=y9e,S=_9e,x=l0,N=yS,D=vS,k=va,E=h0;return h.openBlock(),h.createElementBlock("div",Avt,[h.unref(i)?(h.openBlock(),h.createElementBlock("div",Mvt,[h.createVNode(S,{placement:"bottom"},{dropdown:h.withCtx(()=>[h.createVNode(C,null,{default:h.withCtx(()=>[h.createVNode(y,{onClick:w[0]||(w[0]=L=>l.value=!0)},{default:h.withCtx(()=>[h.createTextVNode("修改密码")]),_:1}),h.createVNode(y,{onClick:p},{default:h.withCtx(()=>[h.createTextVNode("退出登录")]),_:1})]),_:1})]),default:h.withCtx(()=>{var L;return[h.createElementVNode("div",Ivt,[h.createVNode(v,{class:"user-msg-icon"},{default:h.withCtx(()=>[h.createVNode(h.unref(c4e))]),_:1}),h.createElementVNode("span",null,h.toDisplayString((L=h.unref(i))==null?void 0:L.username),1),h.createVNode(v,{class:"user-msg-arrow"},{default:h.withCtx(()=>[h.createVNode(h.unref(Mf))]),_:1})])]}),_:1})])):(h.openBlock(),h.createElementBlock("div",{key:1,class:"user-login",onClick:f},[h.createTextVNode(" 前往登录 "),h.createVNode(v,{class:"user-login-icon"},{default:h.withCtx(()=>[h.createVNode(h.unref(n4e))]),_:1})])),h.createVNode(E,{modelValue:l.value,"onUpdate:modelValue":w[7]||(w[7]=L=>l.value=L),title:"修改密码",width:"500","z-index":200,onOpened:m,onClosed:_},{footer:h.withCtx(()=>[h.createElementVNode("div",Rvt,[h.createVNode(k,{onClick:w[6]||(w[6]=L=>l.value=!1)},{default:h.withCtx(()=>[h.createTextVNode("取消")]),_:1}),h.createVNode(k,{type:"primary",onClick:g},{default:h.withCtx(()=>[h.createTextVNode(" 修改 ")]),_:1})])]),default:h.withCtx(()=>[h.createVNode(D,{ref_key:"changePasswordFormRef",ref:a,model:c.value,rules:u.value,"validate-on-rule-change":!1,onSubmit:h.withModifiers(g,["prevent"]),onKeyup:h.withKeys(g,["enter","native"]),"label-width":"auto"},{default:h.withCtx(()=>[h.createVNode(N,{label:"原密码",prop:"oldPassword"},{default:h.withCtx(()=>[h.createVNode(x,{modelValue:c.value.oldPassword,"onUpdate:modelValue":w[1]||(w[1]=L=>c.value.oldPassword=L),type:"password","show-password":!0},null,8,["modelValue"])]),_:1}),h.createVNode(N,{label:"新密码",prop:"newPassword"},{default:h.withCtx(()=>[h.createVNode(x,{modelValue:c.value.newPassword,"onUpdate:modelValue":w[2]||(w[2]=L=>c.value.newPassword=L),type:"password","show-password":!0,onFocus:w[3]||(w[3]=()=>{a.value.clearValidate(["newPassword"]),d.value=!0}),onBlur:w[4]||(w[4]=L=>d.value=!1)},null,8,["modelValue"]),h.createVNode(wce,{ref_key:"PasswordPromptRef",ref:r,value:c.value.newPassword,isFocus:d.value},null,8,["value","isFocus"])]),_:1}),h.createVNode(N,{label:"确认密码",prop:"confirmPassword"},{default:h.withCtx(()=>[h.createVNode(x,{modelValue:c.value.confirmPassword,"onUpdate:modelValue":w[5]||(w[5]=L=>c.value.confirmPassword=L),type:"password","show-password":!0},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-8b90a07a"]]),Pvt={install(n){n.component("st-user",Ovt)}},Cxt="",Sxt="",Sce={varietyMarket:{show:!0,options:[]},commonOption:{show:!0,options:[]},marketIds:{show:!0,options:[]},customTag:{show:!0,options:[]},jcTranslate:{show:!0,jcOptions:[{label:"恒指",value:"HZCFJC"},{label:"恒生科技",value:"HSKJJC"},{label:"上证50",value:"SZ50CFJC"},{label:"沪深300",value:"HS300CFJC"},{label:"中证500",value:"ZZ500CFJC"},{label:"中证1000",value:"ZZ1000JC"}]},factorScreen:{show:!0,sqlShow:!1,cycleShow:!0,cycleDefault:null,cycleOptions:[],factorOptions:[],factorDescriptions:[]},commonIndicator:{show:!0,options:[{key:"marketCapital",label:"总市值",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,10],unit:["亿","亿"],text:"≤10亿"},{range:[null,25],unit:["亿","亿"],text:"≤25亿"},{range:[null,50],unit:["亿","亿"],text:"≤50亿"},{range:[20,50],unit:["亿","亿"],text:"20亿~50亿"},{range:[100,null],unit:["亿","亿"],text:"≥100亿"},{range:[200,null],unit:["亿","亿"],text:"≥200亿"},{range:[500,null],unit:["亿","亿"],text:"≥500亿"},{range:[1e3,null],unit:["亿","亿"],text:"≥1000亿"}],defaultUnit:["亿","亿"],unitOptions:["元","千万","亿"]},{key:"floatMarketCapital",label:"流通市值",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,5],unit:["亿","亿"],text:"≤5亿"},{range:[null,20],unit:["亿","亿"],text:"≤20亿"},{range:[null,50],unit:["亿","亿"],text:"≤50亿"},{range:[null,100],unit:["亿","亿"],text:"≤100亿"},{range:[100,null],unit:["亿","亿"],text:"≥100亿"},{range:[200,null],unit:["亿","亿"],text:"≥200亿"},{range:[500,null],unit:["亿","亿"],text:"≥500亿"},{range:[1e3,null],unit:["亿","亿"],text:"≥1000亿"}],defaultUnit:["亿","亿"],unitOptions:["元","千万","亿"]},{key:"totalShares",label:"总股本",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,5],unit:["亿","亿"],text:"≤5亿"},{range:[null,10],unit:["亿","亿"],text:"≤10亿"},{range:[null,75],unit:["亿","亿"],text:"≤75亿"},{range:[10,75],unit:["亿","亿"],text:"10亿~75亿"},{range:[100,null],unit:["亿","亿"],text:"≥100亿"}],defaultUnit:["亿","亿"],unitOptions:["元","千万","亿"]},{key:"freeFloatShares",label:"流通股本",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,5],unit:["千万","千万"],text:"≤5千万"},{range:[5,3],unit:["千万","亿"],text:"5千万~3亿"},{range:[null,5],unit:["亿","亿"],text:"≤5亿"},{range:[null,10],unit:["亿","亿"],text:"≤10亿"},{range:[8,30],unit:["亿","亿"],text:"8亿~30亿"},{range:[30,null],unit:["亿","亿"],text:"≥30亿"}],defaultUnit:["亿","亿"],unitOptions:["元","千万","亿"]},{key:"turnoverRate",label:"换手率(实)",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,1],unit:["%","%"],text:"≤1%"},{range:[1,5],unit:["%","%"],text:"1%~5%"},{range:[5,10],unit:["%","%"],text:"5%~10%"},{range:[10,null],unit:["%","%"],text:"≥10%"}],defaultUnit:["%","%"],unitOptions:["%"]},{key:"peTtm",label:"市盈率",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,0],unit:[],text:"亏损"},{range:[0,null],unit:[],text:"≥0"},{range:[0,20],unit:[],text:"0~20"},{range:[20,40],unit:[],text:"20~40"},{range:[40,100],unit:[],text:"40~100"},{range:[100,null],unit:[],text:"≥100"}],defaultUnit:[],unitOptions:[]},{key:"eps",label:"每股净收益",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,0],unit:["元","元"],text:"≤0"},{range:[0,null],unit:["元","元"],text:"≥0"},{range:[.2,null],unit:["元","元"],text:"≥0.2元"},{range:[.5,null],unit:["元","元"],text:"≥0.5元"},{range:[1,null],unit:["元","元"],text:"≥1元"},{range:[2,null],unit:["元","元"],text:"≥2元"}],defaultUnit:["元","元"],unitOptions:["元"]},{key:"st",label:"是否ST",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},type:"custom"},{key:"pb",label:"市净率",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[0,null],unit:[],text:"≥0"},{range:[0,1],unit:[],text:"0~1"},{range:[1,2],unit:[],text:"1~2"},{range:[0,3],unit:[],text:"0~3"},{range:[3,null],unit:[],text:"≥3"}],defaultUnit:[],unitOptions:[]},{key:"mnShr",label:"成交额",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[0,1],unit:["亿","亿"],text:"0~1亿"},{range:[0,5],unit:["亿","亿"],text:"0~5亿"},{range:[0,10],unit:["亿","亿"],text:"0~10亿"},{range:[10,null],unit:["亿","亿"],text:"≥10亿"},{range:[50,null],unit:["亿","亿"],text:"≥50亿"},{range:[100,null],unit:["亿","亿"],text:"≥100亿"}],defaultUnit:["亿","亿"],unitOptions:["元","千万","亿"],showRankType:!0,defaultRadioType:"1",defaultRankRange:[0,25]},{key:"perVolumn",label:"成交量",type:"custom",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]}},{key:"roe",label:"净资产收益率roe",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,0],unit:["%","%"],text:"<0"},{range:[0,null],unit:["%","%"],text:">0"},{range:[10,null],unit:["%","%"],text:">10%"},{range:[15,null],unit:["%","%"],text:">15%"},{range:[20,null],unit:["%","%"],text:">20%"},{range:[30,null],unit:["%","%"],text:">30%"}],defaultUnit:["%","%"],unitOptions:["%"]},{key:"tFeaturelncomes",label:"净利润",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},type:"custom"},{key:"dividendYield",label:"股息率",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},convenientOptions:[{range:[null,1],unit:["%","%"],text:"≤1%"},{range:[1,5],unit:["%","%"],text:"1%~5%"},{range:[5,10],unit:["%","%"],text:"5%~10%"},{range:[10,null],unit:["%","%"],text:"≥10%"}],defaultUnit:["%","%"],unitOptions:["%"]},{key:"priceLevels",label:"股价分位",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},type:"custom"},{key:"peTtmLevels",label:"市盈率分位",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]},type:"custom"},{key:"mainFlow",label:"主力净流入资金",type:"custom",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15,16]}},{key:"expireDays",label:"过期天数",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:["天","天"],unitOptions:["天"]},{key:"virtualRealDegree",label:"虚实度",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:["%","%"],unitOptions:["%"]},{key:"yearProfitRate",label:"年化收益率",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:["%","%"],unitOptions:["%"]},{key:"impliedVolatility",label:"隐含波动率",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:["%","%"],unitOptions:["%"]},{key:"levelMultiplier",label:"杠杆率",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:[],unitOptions:[]},{key:"turnover",label:"成交额(期权)",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:["万","万"],unitOptions:["万"],showRankType:!0,defaultRadioType:"1",defaultRankRange:[0,25]},{key:"volume",label:"成交量(期权)",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:[],unitOptions:[],showRankType:!0,defaultRadioType:"1",defaultRankRange:[0,25]},{key:"openInterest",label:"持仓量",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:[],unitOptions:[],showRankType:!0,defaultRadioType:"1",defaultRankRange:[0,25]},{key:"optionsCpType",label:"认沽认购",parent:{varietyMarketIds:[8],commonOptionIds:[11]},type:"custom"},{key:"optionGear",label:"期权档位",parent:{varietyMarketIds:[8],commonOptionIds:[11]},convenientOptions:[],defaultUnit:[],unitOptions:[]}]}},Fvt=(n,e,t)=>{!e[0]&&e[0]!==0&&!e[1]&&e[1]!==0?t(new Error("至少填写一个分数")):t()},xce=n=>{const e=/(条件(\d+))/g;return n.match(e)||[]},Bvt={__name:"FactorDescription",props:h.mergeModels({data:{type:Array,default:[]}},{visible:{default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(n){const e=h.useModel(n,"visible");return(t,i)=>{const r=ex,o=JS,s=h0;return h.openBlock(),h.createBlock(s,{modelValue:e.value,"onUpdate:modelValue":i[0]||(i[0]=a=>e.value=a),title:"因子使用说明",width:"1000","align-center":"","destroy-on-close":""},{default:h.withCtx(()=>[h.createVNode(o,{data:n.data,border:"",height:"500"},{default:h.withCtx(()=>[h.createVNode(r,{prop:"factorName",label:"因子名称",width:"200"}),h.createVNode(r,{prop:"factorDesc",label:"因子说明"}),h.createVNode(r,{prop:"factorScoreDefine",label:"分值定义"})]),_:1},8,["data"])]),_:1},8,["modelValue"])}}},xxt="",Dce=n=>(h.pushScopeId("data-v-3592dee9"),n=n(),h.popScopeId(),n),Vvt={class:"factor-screen"},zvt={class:"custom-header"},Hvt=["id"],Wvt={class:"form-row"},$vt={class:"index"},jvt={style:{display:"flex","align-items":"center",width:"100%",height:"24px"}},Uvt=Dce(()=>h.createElementVNode("span",null,"~",-1)),qvt=Dce(()=>h.createElementVNode("span",null,"&&代表and,||代表or",-1)),Kvt={class:"dialog-footer"},Gvt=fi({__name:"index",props:h.mergeModels({config:{type:Object,default:{sqlShow:!1,cycleShow:!0,cycleDefault:null,cycleOptions:[],factorOptions:[],factorDescriptions:[]}}},{data:{default:{list:[],sqlEnable:0,sqlValue:null}},dataModifiers:{}}),emits:["update:data"],setup(n){const e=n,t=h.useModel(n,"data"),i=h.ref(!1),r=h.ref(!1),o=h.ref(null),s=h.ref({list:[{cycle:e.config.cycleDefault??null,factor:null,score:[null,null]}],sqlEnable:0,sqlValue:null}),a=()=>{const{list:g,sqlEnable:m,sqlValue:_}=t.value;s.value={list:JSON.parse(JSON.stringify(g)),sqlEnable:m,sqlValue:_},s.value.list.length||u(),i.value=!0},l=()=>{o.value.validate(g=>{const{list:m,sqlEnable:_,sqlValue:b}=s.value;if(g){if(_){if(!b)return kr.error("SQL语句不能为空");const w=xce(b),v=m.map((C,S)=>`条件${S+1}`),y=w.filter(C=>!v.includes(C));if(y.length)return kr.error(`请检查SQL语句, 不存在[${y}]`)}t.value={list:JSON.parse(JSON.stringify(m)),sqlEnable:_,sqlValue:b},i.value=!1}})},c=g=>{s.value.list.splice(g,1)},u=g=>{switch(g){case"compare":{s.value.list.push({key:"compare",cycle:e.config.cycleDefault??null,factor:null,compareType:">",cycle2:e.config.cycleDefault??null,factor2:null});break}default:{s.value.list.push({cycle:e.config.cycleDefault??null,factor:null,score:[null,null]});break}}},d=()=>{o.value.validate(g=>{if(g)if(s.value.sqlValue){const m=xce(s.value.sqlValue);s.value.sqlValue=s.value.list.reduce((_,b,w)=>(m.includes(`条件${w+1}`)||(_+=`&& 条件${w+1} `),_),s.value.sqlValue)}else s.value.sqlValue=s.value.list.reduce((m,_,b)=>(b===0?m+=`条件${b+1} `:m+=`&& 条件${b+1} `,m),"")})},f=g=>{switch(g.key){case"compare":{const{cycle:m,factor:_,compareType:b,cycle2:w,factor2:v}=g;let y="";return y+=` ${e.config.cycleOptions.find(({value:C})=>C===m).label}`,y+=` ${e.config.factorOptions.find(({value:C})=>C===_).label}`,y+=` ${b}`,y+=` ${e.config.cycleOptions.find(({value:C})=>C===w).label}`,y+=` ${e.config.factorOptions.find(({value:C})=>C===v).label}`,y}default:{const{cycle:m,factor:_,score:b}=g;let w="";return w+=` ${e.config.cycleOptions.find(({value:v})=>v===m).label}`,w+=` ${e.config.factorOptions.find(({value:v})=>v===_).label}`,w+=` ${b[0]||b[0]===0?`${b[0]}分`:"∞"}`,w+=" ~",w+=` ${b[1]||b[1]===0?`${b[1]}分`:"∞"}`,w}}},p=(g,m)=>{switch(g){case"sqlTag":{t.value={list:[],sqlEnable:0,sqlValue:null};break}case"factorTag":{t.value.list.splice(m,1);break}}};return(g,m)=>{var B;const _=HV,b=q8,w=va,v=Jn,y=P1,C=g0,S=p0,x=yS,N=t6,D=rS,k=oS,E=l0,L=vS,R=h0;return h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createElementVNode("div",Vvt,[h.createElementVNode("div",null,[t.value.sqlEnable&&t.value.sqlValue?(h.openBlock(),h.createBlock(b,{key:0,closable:"",type:"info",title:t.value.sqlValue,onClose:m[0]||(m[0]=M=>p("sqlTag"))},{default:h.withCtx(()=>[h.createVNode(_,{type:"info",truncated:"",style:{"max-width":"500px"}},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(t.value.sqlValue),1)]),_:1})]),_:1},8,["title"])):h.createCommentVNode("",!0),!t.value.sqlEnable&&t.value.list.length?(h.openBlock(!0),h.createElementBlock(h.Fragment,{key:1},h.renderList(t.value.list,(M,I)=>(h.openBlock(),h.createBlock(b,{closable:"",type:"info",onClose:A=>p("factorTag",I)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(f(M)),1)]),_:2},1032,["onClose"]))),256)):h.createCommentVNode("",!0),h.createVNode(w,{class:"screen-btn",type:"primary",plain:"",size:"small",icon:h.unref(L8),onClick:a},{default:h.withCtx(()=>[h.createTextVNode(" 添加因子 ")]),_:1},8,["icon"])]),h.createVNode(R,{modelValue:i.value,"onUpdate:modelValue":m[5]||(m[5]=M=>i.value=M),width:"680","align-center":"","destroy-on-close":""},{header:h.withCtx(({titleId:M,titleClass:I})=>[h.createElementVNode("div",zvt,[h.createElementVNode("span",{id:M,class:h.normalizeClass(I)}," 因子筛选 ",10,Hvt),h.createVNode(y,{effect:"dark",content:"点击查看: 因子使用说明",placement:"right"},{default:h.withCtx(()=>[h.createVNode(v,{onClick:m[1]||(m[1]=A=>r.value=!0)},{default:h.withCtx(()=>[h.createVNode(h.unref(sg))]),_:1})]),_:1})])]),footer:h.withCtx(()=>[h.createElementVNode("div",Kvt,[h.createVNode(w,{type:"primary",onClick:l},{default:h.withCtx(()=>[h.createTextVNode("确定")]),_:1})])]),default:h.withCtx(()=>[h.createVNode(L,{ref_key:"dialogFormRef",ref:o,model:s.value},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value.list,(M,I)=>(h.openBlock(),h.createElementBlock("div",Wvt,[h.createElementVNode("span",$vt,h.toDisplayString(`条件${I+1}`),1),M.key==="compare"?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[n.config.cycleShow?(h.openBlock(),h.createBlock(x,{key:0,prop:"list."+I+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:M.cycle,"onUpdate:modelValue":A=>M.cycle=A,placeholder:"选择周期",size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.cycleOptions,({label:A,value:V})=>(h.openBlock(),h.createBlock(C,{label:A,value:V,key:V},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):h.createCommentVNode("",!0),h.createVNode(x,{prop:"list."+I+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:M.factor,"onUpdate:modelValue":A=>M.factor=A,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:h.withCtx(()=>{var A;return[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList((A=n.config.factorOptions)==null?void 0:A.filter(V=>[4].includes(V.type)),({label:V,value:F})=>(h.openBlock(),h.createBlock(C,{label:V,value:F,key:F},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),h.createVNode(x,{style:{width:"52px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:M.compareType,"onUpdate:modelValue":A=>M.compareType=A,size:"small"},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList([">",">=","<","<="],A=>h.createVNode(C,{label:A,value:A,key:A},null,8,["label","value"])),64))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024),n.config.cycleShow?(h.openBlock(),h.createBlock(x,{key:1,prop:"list."+I+".cycle2",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:M.cycle2,"onUpdate:modelValue":A=>M.cycle2=A,placeholder:"选择周期",size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.cycleOptions,({label:A,value:V})=>(h.openBlock(),h.createBlock(C,{label:A,value:V,key:V},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):h.createCommentVNode("",!0),h.createVNode(x,{prop:"list."+I+".factor2",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"132px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:M.factor2,"onUpdate:modelValue":A=>M.factor2=A,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:h.withCtx(()=>{var A;return[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList((A=n.config.factorOptions)==null?void 0:A.filter(V=>[4].includes(V.type)),({label:V,value:F})=>(h.openBlock(),h.createBlock(C,{label:V,value:F,key:F},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[n.config.cycleShow?(h.openBlock(),h.createBlock(x,{key:0,prop:"list."+I+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:M.cycle,"onUpdate:modelValue":A=>M.cycle=A,placeholder:"选择周期",size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.cycleOptions,({label:A,value:V})=>(h.openBlock(),h.createBlock(C,{label:A,value:V,key:V},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):h.createCommentVNode("",!0),h.createVNode(x,{prop:"list."+I+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"194px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:M.factor,"onUpdate:modelValue":A=>M.factor=A,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:h.withCtx(()=>{var A;return[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList((A=n.config.factorOptions)==null?void 0:A.filter(V=>[1,3].includes(V.type)),({label:V,value:F})=>(h.openBlock(),h.createBlock(C,{label:V,value:F,key:F},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),h.createVNode(x,{prop:"list."+I+".score",rules:{validator:h.unref(Fvt),trigger:"blur"},style:{width:"200px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createElementVNode("div",jvt,[h.createVNode(N,{modelValue:M.score[0],"onUpdate:modelValue":A=>M.score[0]=A,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"]),Uvt,h.createVNode(N,{modelValue:M.score[1],"onUpdate:modelValue":A=>M.score[1]=A,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"])])]),_:2},1032,["prop","rules"])],64)),h.createVNode(v,{onClick:A=>c(I)},{default:h.withCtx(()=>[h.createVNode(h.unref(LC))]),_:2},1032,["onClick"])]))),256)),h.createVNode(w,{type:"primary",plain:"",size:"small",icon:h.unref(L8),onClick:u,style:{"margin-bottom":"10px"}},{default:h.withCtx(()=>[h.createTextVNode("添加因子")]),_:1},8,["icon"]),h.createVNode(w,{type:"primary",plain:"",size:"small",icon:h.unref(L8),onClick:m[2]||(m[2]=M=>u("compare")),style:{"margin-bottom":"10px"}},{default:h.withCtx(()=>[h.createTextVNode("添加因子对比")]),_:1},8,["icon"]),n.config.sqlShow?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createVNode(x,{label:"SQL功能: "},{default:h.withCtx(()=>[h.createVNode(k,{modelValue:s.value.sqlEnable,"onUpdate:modelValue":m[3]||(m[3]=M=>s.value.sqlEnable=M)},{default:h.withCtx(()=>[h.createVNode(D,{label:"关闭",value:0}),h.createVNode(D,{label:"启用",value:1})]),_:1},8,["modelValue"]),s.value.sqlEnable?(h.openBlock(),h.createBlock(w,{key:0,type:"primary",size:"small",onClick:d,style:{"margin-left":"auto"}},{default:h.withCtx(()=>[h.createTextVNode("生成SQL")]),_:1})):h.createCommentVNode("",!0)]),_:1}),s.value.sqlEnable?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createVNode(E,{modelValue:s.value.sqlValue,"onUpdate:modelValue":m[4]||(m[4]=M=>s.value.sqlValue=M),autosize:{minRows:4},type:"textarea",style:{"margin-bottom":"10px"}},null,8,["modelValue"]),qvt],64)):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["modelValue"])]),h.createVNode(Bvt,{visible:r.value,"onUpdate:visible":m[6]||(m[6]=M=>r.value=M),data:(B=n.config.factorDescriptions)==null?void 0:B.filter(M=>[1,3].includes(M.type))},null,8,["visible","data"])],64)}}},[["__scopeId","data-v-3592dee9"]]),Nxt="",Ext="",Yw=n=>(h.pushScopeId("data-v-781330f8"),n=n(),h.popScopeId(),n),Yvt={key:0,class:"common-indicator"},Zvt={class:"indicator"},Qvt=Yw(()=>h.createElementVNode("div",{class:"title"},[h.createElementVNode("span",null,"常用指标: "),h.createElementVNode("span",null,"不限")],-1)),Xvt={class:"options"},Jvt=["onClick"],eyt={class:"tags"},tyt=["onClick"],nyt={style:{"font-size":"18px"}},iyt={key:0,class:"out-box"},ryt=Yw(()=>h.createElementVNode("span",null,"自定义: ",-1)),oyt={key:0,class:"convenient-option-box"},syt={class:"out-box"},ayt=Yw(()=>h.createElementVNode("span",null,"自定义: ",-1)),lyt={key:0},cyt={key:0},uyt={key:0},dyt={key:1},hyt={class:"tFeaturelncomes-option-box"},fyt={class:"tFeaturelncomes-out-box"},pyt=Yw(()=>h.createElementVNode("span",null,"自定义: ",-1)),gyt={key:2},myt={key:3},byt={key:4},_yt={key:5},vyt={key:6},yyt={style:{display:"flex","align-items":"center"}},wyt={class:"dialog-footer"},Cyt=fi({__name:"index",props:h.mergeModels({config:{type:Object,default:()=>{}},varietyMarket:{type:Number,default:()=>null},commonOption:{type:Array,default:()=>[]}},{data:{default:[]},dataModifiers:{}}),emits:["update:data"],setup(n){const e=[{label:"近2周",value:"1"},{label:"近1个月",value:"2"},{label:"近3个月",value:"3"},{label:"近6个月",value:"4"},{label:"近1年",value:"5"}],t=h.useModel(n,"data"),i=n,r=h.ref(!1),o=h.computed(()=>{var _;return(_=i.data.find(b=>b.radioType==="1"))==null?void 0:_.key}),s=h.computed(()=>{let _=[];return i.varietyMarket===null&&!i.commonOption.length?_=i.config.options:(_=i.config.options,i.varietyMarket&&(_=_.filter(({parent:b})=>b.varietyMarketIds.includes(i.varietyMarket))),i.commonOption.length&&(_=_.filter(({parent:b})=>{const{commonOptionIds:w}=b;return[...new Set([...w,...i.commonOption])].length!==[...w,...i.commonOption].length}))),_}),a=h.ref({}),l=h.ref({}),c=_=>{a.value=_;const b={key:_.key,type:_.type,label:_.label};switch(_.key){case"st":{l.value={...b,st:null};break}case"tFeaturelncomes":{l.value={...b,rule:1,withFewYears:null,yearsCount:null,netProfit:null};break}case"priceLevels":{l.value={...b,priceLevels:null};break}case"peTtmLevels":{l.value={...b,peTtmLevels:null};break}case"optionsCpType":{l.value={...b,optionsCpType:null};break}case"perVolumn":{l.value={...b,radio:null,levels:[]};break}case"mainFlow":{l.value={...b,mainFlowRadioType:"0",rankRange:[null,null]};break}default:l.value={...b,range:[null,null],unit:_.defaultUnit.length?[..._.defaultUnit]:[null,null],radioType:o.value&&o.value!==_.key?"0":_.defaultRadioType,rankRange:_.defaultRankRange||[null,null]}}r.value=!0},u=()=>{var b;switch(l.value.key){case"st":{const{label:w,st:v}=l.value;if(v===null)return kr.warning("格式错误: 请至少选择一个值");l.value.tagText=`${w}: ${v?"是":"否"}`;break}case"tFeaturelncomes":{const{label:w,rule:v,withFewYears:y,yearsCount:C,netProfit:S}=l.value;if(["",null].includes(y)||["",null].includes(C)||["",null].includes(S))return kr.warning("格式错误: 请填写完整");l.value.tagText=`${w}: ${y}年内${C}年以上盈利${v===1?"超":"跌"}过${S}亿`;break}case"priceLevels":{const{label:w,priceLevels:v}=l.value;if(!v||v.length===0)return kr.warning("格式错误: 请至少选择一个值");l.value.tagText=`${w}: 已选${v}分位`;break}case"peTtmLevels":{const{label:w,peTtmLevels:v}=l.value;if(!v||v.length===0)return kr.warning("格式错误: 请至少选择一个值");l.value.tagText=`${w}: 已选${v}分位`;break}case"optionsCpType":{const{label:w,optionsCpType:v}=l.value;if(v===null)return kr.warning("格式错误: 请至少选择一个值");l.value.tagText=`${w}: ${v===1?"看涨":"看跌"}`;break}case"perVolumn":{const{label:w,radio:v,levels:y}=l.value;if(!v)return kr.warning("格式错误: 请选择时间");if(!(y!=null&&y.length))return kr.warning("格式错误: 请选择分位");l.value.tagText=`${w}: ${(b=e.find(C=>C.value===v))==null?void 0:b.label}${y.map(C=>`${C}分位`).join("、")}`;break}case"mainFlow":{const{label:w,mainFlowRadioType:v,radio:y,rankRange:C}=l.value,S=x=>{if(x===""||x===null||x===void 0)return!1;const N=Number(x);return!isNaN(N)};if(!y)return kr.warning("格式错误: 请选择时间");if(!S(C[0])&&!S(C[1]))return kr.warning(`格式错误: 请填写${v==="0"?"涨幅范围":"排名范围"}`);!["",null].includes(C[0])&&!["",null].includes(C[1])?l.value.tagText=`${w}: ${y}日${v==="0"?"涨幅范围":"排名范围"}: ${C[0]}${v==="0"?"%":""} ~ ${C[1]}${v==="0"?"%":""}`:["",null].includes(C[0])?l.value.tagText=`${w}: ${y}日${v==="0"?"涨幅范围":"排名范围"}: ≤${C[1]}${v==="0"?"%":""}`:l.value.tagText=`${w}: ${y}日${v==="0"?"涨幅范围":"排名范围"}: ≥${C[0]}${v==="0"?"%":""}`;break}default:{const{label:w,unit:v,radioType:y}=l.value,C=y==="1"?l.value.rankRange:l.value.range;if(["",null].includes(C[0])&&["",null].includes(C[1]))return kr.warning("格式错误: 请至少填写一个值");if(y==="1"){const N=Number(C[0]),D=Number(C[1]);if(isNaN(N)||isNaN(D))return kr.warning("格式错误: 请填写数字");if(N<0||D<0)return kr.warning("格式错误: 请填写大于0的数字");if(N>D)return kr.warning("格式错误: 请填写正确的排名范围")}const S=y==="1"?"":v[0]??"",x=y==="1"?"":v[1]??"";!["",null].includes(C[0])&&!["",null].includes(C[1])?l.value.tagText=`${w}${y==="1"?"排名":""}: ${C[0]}${S} ~ ${C[1]}${x}`:["",null].includes(C[0])?l.value.tagText=`${w}${y==="1"?"排名":""}: ≤${C[1]}${x}`:l.value.tagText=`${w}${y==="1"?"排名":""}: ≥${C[0]}${S}`}}const _=t.value.findIndex(({key:w})=>w===l.value.key);_===-1?t.value.push(l.value):t.value.splice(_,1,l.value),r.value=!1},d=_=>{a.value=s.value.find(({key:b})=>b===_.key),l.value=JSON.parse(JSON.stringify(_)),r.value=!0},f=_=>{t.value.splice(_,1)},p=_=>{l.value.range=[..._.range],l.value.unit=[..._.unit]},g=_=>{switch(_){case"≤0":Object.assign(l.value,{rule:2,withFewYears:1,yearsCount:1,netProfit:0});break;case"≥0":Object.assign(l.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:0});break;case"五年内有四年以上盈利超过5千万":Object.assign(l.value,{rule:1,withFewYears:5,yearsCount:4,netProfit:.5});break;case"≥10亿":Object.assign(l.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:10});break;case"≥20亿":Object.assign(l.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:20});break}};h.watch(()=>s.value,()=>{t.value.length&&(t.value=t.value.filter(({key:_})=>s.value.find(b=>b.key===_)))});const m=()=>{l.value.radio=null,l.value.rankRange=[null,null]};return(_,b)=>{const w=q8,v=Qme,y=oS,C=l0,S=va,x=g0,N=p0,D=rS,k=t6,E=h0;return n.config.show&&s.value.length?(h.openBlock(),h.createElementBlock("div",Yvt,[h.createElementVNode("div",Zvt,[Qvt,h.createElementVNode("div",Xvt,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value,L=>(h.openBlock(),h.createElementBlock("span",{key:L.key,onClick:R=>c(L)},h.toDisplayString(L.label),9,Jvt))),128))])]),h.createElementVNode("div",eyt,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.value,(L,R)=>(h.openBlock(),h.createBlock(w,{closable:"",type:"info",onClose:B=>f(R)},{default:h.withCtx(()=>[h.createElementVNode("span",null,h.toDisplayString(L.tagText),1),h.createElementVNode("span",{class:"edit",onClick:B=>d(L)},"编辑",8,tyt)]),_:2},1032,["onClose"]))),256))]),h.createVNode(E,{modelValue:r.value,"onUpdate:modelValue":b[25]||(b[25]=L=>r.value=L),title:a.value.label,width:"600","align-center":"","destroy-on-close":""},h.createSlots({footer:h.withCtx(()=>[h.createElementVNode("div",wyt,[h.createVNode(S,{type:"primary",onClick:u},{default:h.withCtx(()=>[h.createTextVNode("确定")]),_:1})])]),default:h.withCtx(()=>{var L;return[a.value.type===void 0&&l.value.radioType==="1"?(h.openBlock(),h.createElementBlock("div",iyt,[ryt,h.createVNode(C,{modelValue:l.value.rankRange[0],"onUpdate:modelValue":b[2]||(b[2]=R=>l.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),h.createTextVNode(" ~ "),h.createVNode(C,{modelValue:l.value.rankRange[1],"onUpdate:modelValue":b[3]||(b[3]=R=>l.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])):a.value.type===void 0?(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[(L=a.value.convenientOptions)!=null&&L.length?(h.openBlock(),h.createElementBlock("div",oyt,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(a.value.convenientOptions,R=>(h.openBlock(),h.createBlock(S,{key:R.text,onClick:B=>p(R)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.text),1)]),_:2},1032,["onClick"]))),128))])):h.createCommentVNode("",!0),h.createElementVNode("div",syt,[ayt,h.createVNode(C,{modelValue:l.value.range[0],"onUpdate:modelValue":b[5]||(b[5]=R=>l.value.range[0]=R),style:{flex:"1"}},h.createSlots({_:2},[a.value.unitOptions.length?{name:"append",fn:h.withCtx(()=>[a.value.unitOptions.length===1?(h.openBlock(),h.createElementBlock("span",lyt,h.toDisplayString(l.value.unit[0]),1)):(h.openBlock(),h.createBlock(N,{key:1,modelValue:l.value.unit[0],"onUpdate:modelValue":b[4]||(b[4]=R=>l.value.unit[0]=R),style:{width:"72px"}},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(a.value.unitOptions,R=>(h.openBlock(),h.createBlock(x,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"]),h.createTextVNode(" ~ "),h.createVNode(C,{modelValue:l.value.range[1],"onUpdate:modelValue":b[7]||(b[7]=R=>l.value.range[1]=R),style:{flex:"1"}},h.createSlots({_:2},[a.value.unitOptions.length?{name:"append",fn:h.withCtx(()=>[a.value.unitOptions.length===1?(h.openBlock(),h.createElementBlock("span",cyt,h.toDisplayString(l.value.unit[1]),1)):(h.openBlock(),h.createBlock(N,{key:1,modelValue:l.value.unit[1],"onUpdate:modelValue":b[6]||(b[6]=R=>l.value.unit[1]=R),style:{width:"72px"}},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(a.value.unitOptions,R=>(h.openBlock(),h.createBlock(x,{label:R,value:R},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"])])],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:2},[a.value.key==="st"?(h.openBlock(),h.createElementBlock("div",uyt,[h.createVNode(y,{modelValue:l.value.st,"onUpdate:modelValue":b[8]||(b[8]=R=>l.value.st=R)},{default:h.withCtx(()=>[h.createVNode(D,{label:"是",value:1}),h.createVNode(D,{label:"否",value:0})]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),a.value.key==="tFeaturelncomes"?(h.openBlock(),h.createElementBlock("div",dyt,[h.createElementVNode("div",hyt,[h.createVNode(S,{onClick:b[9]||(b[9]=R=>g("≤0"))},{default:h.withCtx(()=>[h.createTextVNode("≤0")]),_:1}),h.createVNode(S,{onClick:b[10]||(b[10]=R=>g("≥0"))},{default:h.withCtx(()=>[h.createTextVNode("≥0")]),_:1}),h.createVNode(S,{onClick:b[11]||(b[11]=R=>g("五年内有四年以上盈利超过5千万"))},{default:h.withCtx(()=>[h.createTextVNode("五年内有四年以上盈利超过5千万")]),_:1}),h.createVNode(S,{onClick:b[12]||(b[12]=R=>g("≥10亿"))},{default:h.withCtx(()=>[h.createTextVNode("≥10亿")]),_:1}),h.createVNode(S,{onClick:b[13]||(b[13]=R=>g("≥20亿"))},{default:h.withCtx(()=>[h.createTextVNode("≥20亿")]),_:1})]),h.createElementVNode("div",fyt,[pyt,h.createElementVNode("div",null,[h.createVNode(k,{modelValue:l.value.withFewYears,"onUpdate:modelValue":b[14]||(b[14]=R=>l.value.withFewYears=R),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 年内 "),h.createVNode(k,{modelValue:l.value.yearsCount,"onUpdate:modelValue":b[15]||(b[15]=R=>l.value.yearsCount=R),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 年以上盈利"+h.toDisplayString(l.value.rule===1?"超":"跌")+"过 ",1),h.createVNode(k,{modelValue:l.value.netProfit,"onUpdate:modelValue":b[16]||(b[16]=R=>l.value.netProfit=R),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 亿 ")])])])):h.createCommentVNode("",!0),a.value.key==="priceLevels"?(h.openBlock(),h.createElementBlock("div",gyt,[h.createVNode(N,{modelValue:l.value.priceLevels,"onUpdate:modelValue":b[17]||(b[17]=R=>l.value.priceLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList([1,2,3,4,5],R=>h.createVNode(x,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),a.value.key==="peTtmLevels"?(h.openBlock(),h.createElementBlock("div",myt,[h.createVNode(N,{modelValue:l.value.peTtmLevels,"onUpdate:modelValue":b[18]||(b[18]=R=>l.value.peTtmLevels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList([1,2,3,4,5,6,7,8,9,10],R=>h.createVNode(x,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),a.value.key==="optionsCpType"?(h.openBlock(),h.createElementBlock("div",byt,[h.createVNode(y,{modelValue:l.value.optionsCpType,"onUpdate:modelValue":b[19]||(b[19]=R=>l.value.optionsCpType=R)},{default:h.withCtx(()=>[h.createVNode(D,{label:"看涨",value:1}),h.createVNode(D,{label:"看跌",value:2})]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),a.value.key==="perVolumn"?(h.openBlock(),h.createElementBlock("div",_yt,[h.createVNode(y,{modelValue:l.value.radio,"onUpdate:modelValue":b[20]||(b[20]=R=>l.value.radio=R)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList(e,R=>h.createVNode(D,{key:R.value,value:R.value},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"]),h.createVNode(N,{modelValue:l.value.levels,"onUpdate:modelValue":b[21]||(b[21]=R=>l.value.levels=R),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList([1,2,3,4,5],R=>h.createVNode(x,{key:R,label:`${R}分位`,value:R},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),a.value.key==="mainFlow"?(h.openBlock(),h.createElementBlock("div",vyt,[h.createVNode(y,{modelValue:l.value.radio,"onUpdate:modelValue":b[22]||(b[22]=R=>l.value.radio=R)},{default:h.withCtx(()=>[h.createVNode(D,{value:"3"},{default:h.withCtx(()=>[h.createTextVNode("3日")]),_:1}),h.createVNode(D,{value:"5"},{default:h.withCtx(()=>[h.createTextVNode("5日")]),_:1}),h.createVNode(D,{value:"10"},{default:h.withCtx(()=>[h.createTextVNode("10日")]),_:1}),h.createVNode(D,{value:"20"},{default:h.withCtx(()=>[h.createTextVNode("20日")]),_:1})]),_:1},8,["modelValue"]),h.createElementVNode("div",yyt,[h.createElementVNode("span",null,h.toDisplayString(l.value.mainFlowRadioType==="0"?"涨幅范围":"排名范围")+": ",1),h.createVNode(C,{modelValue:l.value.rankRange[0],"onUpdate:modelValue":b[23]||(b[23]=R=>l.value.rankRange[0]=R),style:{flex:"1"}},null,8,["modelValue"]),h.createTextVNode(" ~ "),h.createVNode(C,{modelValue:l.value.rankRange[1],"onUpdate:modelValue":b[24]||(b[24]=R=>l.value.rankRange[1]=R),style:{flex:"1"}},null,8,["modelValue"])])])):h.createCommentVNode("",!0)],64))]}),_:2},[a.value.showRankType?{name:"header",fn:h.withCtx(()=>[h.createElementVNode("span",nyt,h.toDisplayString(a.value.label),1),h.createVNode(y,{modelValue:l.value.radioType,"onUpdate:modelValue":b[0]||(b[0]=L=>l.value.radioType=L),style:{"vertical-align":"4px","margin-left":"12px"}},{default:h.withCtx(()=>[h.createVNode(v,{label:"数值",value:"0"}),h.createVNode(v,{disabled:o.value&&o.value!==a.value.key,label:"排名",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"0"}:a.value.key==="mainFlow"?{name:"header",fn:h.withCtx(()=>[h.createElementVNode("span",{style:{"font-size":"18px"}},h.toDisplayString(a.value.label),1),h.createVNode(y,{modelValue:l.value.mainFlowRadioType,"onUpdate:modelValue":b[1]||(b[1]=L=>l.value.mainFlowRadioType=L),style:{"vertical-align":"4px","margin-left":"12px"},onChange:m},{default:h.withCtx(()=>[h.createVNode(v,{label:"涨幅范围",value:"0"}),h.createVNode(v,{label:"排名范围",value:"1"})]),_:1},8,["modelValue"])]),key:"1"}:void 0]),1032,["modelValue","title"])])):h.createCommentVNode("",!0)}}},[["__scopeId","data-v-781330f8"]]),kxt="",Fp=n=>(h.pushScopeId("data-v-bdbe35cf"),n=n(),h.popScopeId(),n),Syt={class:"variety-search"},xyt={key:0,class:"variety-search-row"},Dyt={class:"title"},Nyt=Fp(()=>h.createElementVNode("span",null,"品种市场: ",-1)),Eyt={key:1,class:"variety-search-row"},Lyt={class:"title"},kyt=Fp(()=>h.createElementVNode("span",null,"常用选项: ",-1)),Tyt={key:2,class:"variety-search-row"},Ayt={class:"title"},Myt=Fp(()=>h.createElementVNode("span",null,"上市板块: ",-1)),Iyt={key:3,class:"variety-search-row"},Ryt={class:"title"},Oyt=Fp(()=>h.createElementVNode("span",null,"自定标签: ",-1)),Pyt={key:4,class:"variety-search-row"},Fyt={class:"title"},Byt=Fp(()=>h.createElementVNode("span",null,"价差转换: ",-1)),Vyt={key:5,class:"variety-search-row"},zyt={class:"title"},Hyt=Fp(()=>h.createElementVNode("span",null,"因子筛选: ",-1)),Wyt=fi({__name:"index",props:h.mergeModels({config:{type:Object,default:{}}},{searchData:{},searchDataModifiers:{}}),emits:["update:searchData"],setup(n,{expose:e}){const t=n,i=h.useModel(n,"searchData");i.value=Object.assign(i.value,{varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null},commonIndicator:[]});const r=h.computed(()=>{const d={};return Object.keys(Sce).forEach(f=>{const p=Sce[f],g=t.config[f]??{},m={...p,...g};d[f]=m}),d}),o=h.computed(()=>r.value.varietyMarket.options),s=h.computed(()=>{const{varietyMarket:d}=i.value;return d?o.value.find(({value:p})=>p===d).memo.reduce((p,g)=>{const m=r.value.commonOption.options.find(_=>_.value===g);return m&&p.push(m),p},[]):r.value.commonOption.options}),a=h.computed(()=>{const{varietyMarket:d}=i.value;return d?r.value.marketIds.options.filter(f=>f.varietyMarketIds.includes(d)):r.value.marketIds.options}),l=h.computed(()=>r.value.customTag.options),c=h.computed(()=>r.value.jcTranslate.jcOptions),u=d=>{switch(d){case"commonOption":{i.value[d]=[];break}case"marketIds":{i.value[d]=[];break}case"customTag":{i.value[d]=[];break}case"jcTranslate":{i.value[d]={type:null,jcList:[]};break}case"factorScreen":{i.value[d]={list:[],sqlEnable:0,sqlValue:null};break}case"commonIndicator":{i.value[d]=[];break}default:{i.value[d]=null;break}}};return h.watch(()=>s.value,d=>{var f;(f=i.value.commonOption)!=null&&f.length&&(i.value.commonOption=i.value.commonOption.filter(p=>d.find(({value:g})=>g===p)))}),h.watch(()=>a.value,d=>{var f;(f=i.value.marketIds)!=null&&f.length&&(i.value.marketIds=i.value.marketIds.filter(p=>d.find(({value:g})=>g===p)))}),e({formatData:d=>{var p,g,m,_,b,w;console.log("%c[品种池搜索聚合组件]: 正在生成接口传参...","color: tomato");const f={};if(d.varietyMarket&&(f.exchangeId=String(d.varietyMarket)),(p=d.commonOption)!=null&&p.length&&(f.optionId=d.commonOption.join(",")),(g=d.marketIds)!=null&&g.length&&(f.marketIds=d.marketIds),(m=d.customTag)!=null&&m.length&&(f.tagIds=d.customTag),(_=r.value.jcTranslate)!=null&&_.show){const{jcTranslate:v}=d,{type:y,jcList:C}=v;switch(y){case 1:{f.translateType=1,f.jcType=C.join(",");break}case 2:f.translateType=2}}if((b=r.value.factorScreen)!=null&&b.show){const{factorScreen:v}=d;if((w=v==null?void 0:v.list)!=null&&w.length&&(f.tbFeatureFactorScores=v.list.map(y=>{switch(y.key){case"compare":return{freqId:y.cycle,factorId:y.factor,compareType:y.compareType,freqId2:y.cycle2,factorId2:y.factor2};default:return{freqId:y.cycle,factorId:y.factor,startScore:y.score[0],endScore:y.score[1]}}})),v.sqlEnable){const y=v.list.reduce((S,x,N)=>{var k,E;const D=`条件${N+1}`;switch(x.key){case"compare":{let L="";(k=r.value.factorScreen)!=null&&k.cycleShow?L=`freq_id = ${x.cycle} and factor_id = ${x.factor} ${x.compareType} freq_id = ${x.cycle2} and factor_id = ${x.factor2}`:L=`factor_id = ${x.factor} ${x.compareType} factor_id = ${x.factor2}`,S.set(D,`(${L})`);break}default:{let L=`factor_id = ${x.factor} and `;(E=r.value.factorScreen)!=null&&E.cycleShow&&(L=`freq_id = ${x.cycle} and factor_id = ${x.factor} and `),(x.score[0]||x.score[0]===0)&&(x.score[1]||x.score[1]===0)?L+=`score >= ${x.score[0]} and score <= ${x.score[1]}`:x.score[0]||x.score[0]===0?L+=`score >= ${x.score[0]}`:(x.score[1]||x.score[1]===0)&&(L+=`score <= ${x.score[1]}`),S.set(D,`(${L})`)}}return S},new Map([]));let C=v.sqlValue;for(const[S,x]of y){const N=new RegExp(S,"g");C=C.replace(N,x)}f.sql=C,f.sqlExpression=v.sqlValue}f.enableSql=v.sqlEnable===1?2:1}{const v=["expireDays","virtualRealDegree","yearProfitRate","impliedVolatility","levelMultiplier","turnover","volume","openInterest","optionsCpType","optionGear"],y=d.commonIndicator.reduce((E,L)=>{const{key:R,type:B,range:M,unit:I,radioType:A,mainFlowRadioType:V,radio:F,rankRange:U}=L;if(A==="1")f.sortBy={column:L.key,start:U[0]||null,end:U[1]||null};else if(R==="dividendYield"){let[J,K]=M;["",null].includes(J)||(J=J/100),["",null].includes(K)||(K=K/100),E.push({column:L.key,start:J,end:K})}else if(R==="mainFlow"){let[J,K]=U,z=V==="0"?`netInfow${F}d`:`last${F}DayMianFlowRank`;E.push({column:z,start:J,end:K})}else if(B===void 0&&!v.includes(R)){let[J,K]=M;if(!["",null].includes(J))switch(I[0]){case"亿":J=J*1e8;break;case"千万":J=J*1e7;break;default:J=J;break}if(!["",null].includes(K))switch(I[1]){case"亿":K=K*1e8;break;case"千万":K=K*1e7;break;default:K=K;break}E.push({column:L.key,start:J,end:K})}return E},[]);y.length&&(f.query=y);const C=d.commonIndicator.find(({key:E})=>E==="st");C&&(f.st=C.st);const S=d.commonIndicator.find(({key:E})=>E==="tFeaturelncomes");S&&(f.netProfitQueryDto={...S,netProfit:S.netProfit*1e8});const x=d.commonIndicator.find(({key:E})=>E==="priceLevels");x&&(f.priceLevels=x.priceLevels);const N=d.commonIndicator.find(({key:E})=>E==="peTtmLevels");N&&(f.peTtmLevels=N.peTtmLevels);const D={};d.commonIndicator.forEach(E=>{const{key:L}=E;switch(L){case"expireDays":["",null].includes(E.range[0])||(D.minExpireDays=E.range[0]),["",null].includes(E.range[1])||(D.maxExpireDays=E.range[1]);break;case"virtualRealDegree":["",null].includes(E.range[0])||(D.minVirtualRealDegree=E.range[0]/100),["",null].includes(E.range[1])||(D.maxVirtualRealDegree=E.range[1]/100);break;case"yearProfitRate":["",null].includes(E.range[0])||(D.minYearProfitRate=E.range[0]/100),["",null].includes(E.range[1])||(D.maxYearProfitRate=E.range[1]/100);break;case"impliedVolatility":["",null].includes(E.range[0])||(D.minImpliedVolatility=E.range[0]/100),["",null].includes(E.range[1])||(D.maxImpliedVolatility=E.range[1]/100);break;case"levelMultiplier":["",null].includes(E.range[0])||(D.minLevelMultiplier=E.range[0]),["",null].includes(E.range[1])||(D.maxLevelMultiplier=E.range[1]);break;case"turnover":["",null].includes(E.range[0])||(D.minTurnover=E.range[0]*1e4),["",null].includes(E.range[1])||(D.maxTurnover=E.range[1]*1e4);break;case"volume":["",null].includes(E.range[0])||(D.minVolume=E.range[0]),["",null].includes(E.range[1])||(D.maxVolume=E.range[1]);break;case"openInterest":["",null].includes(E.range[0])||(D.minOpenInterest=E.range[0]),["",null].includes(E.range[1])||(D.maxOpenInterest=E.range[1]);break;case"optionsCpType":D.optionsCpType=E.optionsCpType;break;case"optionGear":["",null].includes(E.range[0])||(D.minOptionGear=E.range[0]),["",null].includes(E.range[1])||(D.maxOptionGear=E.range[1]);break}});const k=d.commonIndicator.find(({key:E})=>E==="perVolumn");k&&(f.perVolumn={type:k.radio,value:k.levels}),Object.keys(D).length&&(f.searchOptionDto={...f.searchOptionDto,...D})}return console.log("%c[品种池搜索聚合组件]: 接口传参数据生成完毕","color: green",f),f},reset:()=>{i.value={varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null},commonIndicator:[]}}}),(d,f)=>{var v,y,C,S,x,N;const p=rS,g=oS,m=ld,_=BF,b=g0,w=p0;return h.openBlock(),h.createElementBlock("div",Syt,[(v=r.value.varietyMarket)!=null&&v.show?(h.openBlock(),h.createElementBlock("div",xyt,[h.createElementVNode("div",Dyt,[Nyt,h.createElementVNode("span",{onClick:f[0]||(f[0]=D=>u("varietyMarket"))},"不限")]),h.createVNode(g,{modelValue:i.value.varietyMarket,"onUpdate:modelValue":f[1]||(f[1]=D=>i.value.varietyMarket=D),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value,({label:D,value:k})=>(h.openBlock(),h.createBlock(p,{label:D,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),(y=r.value.commonOption)!=null&&y.show&&s.value.length?(h.openBlock(),h.createElementBlock("div",Eyt,[h.createElementVNode("div",Lyt,[kyt,h.createElementVNode("span",{onClick:f[2]||(f[2]=D=>u("commonOption"))},"不限")]),h.createVNode(_,{modelValue:i.value.commonOption,"onUpdate:modelValue":f[3]||(f[3]=D=>i.value.commonOption=D),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value,({label:D,value:k})=>(h.openBlock(),h.createBlock(m,{label:D,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),(C=r.value.marketIds)!=null&&C.show&&a.value.length?(h.openBlock(),h.createElementBlock("div",Tyt,[h.createElementVNode("div",Ayt,[Myt,h.createElementVNode("span",{onClick:f[4]||(f[4]=D=>u("marketIds"))},"不限")]),h.createVNode(_,{modelValue:i.value.marketIds,"onUpdate:modelValue":f[5]||(f[5]=D=>i.value.marketIds=D),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(a.value,({label:D,value:k})=>(h.openBlock(),h.createBlock(m,{label:D,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),(S=r.value.customTag)!=null&&S.show&&l.value.length?(h.openBlock(),h.createElementBlock("div",Iyt,[h.createElementVNode("div",Ryt,[Oyt,h.createElementVNode("span",{onClick:f[6]||(f[6]=D=>u("customTag"))},"不限")]),h.createVNode(_,{modelValue:i.value.customTag,"onUpdate:modelValue":f[7]||(f[7]=D=>i.value.customTag=D),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(l.value,({label:D,value:k})=>(h.openBlock(),h.createBlock(m,{label:D,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),(x=r.value.jcTranslate)!=null&&x.show?(h.openBlock(),h.createElementBlock("div",Pyt,[h.createElementVNode("div",Fyt,[Byt,h.createElementVNode("span",{onClick:f[8]||(f[8]=D=>u("jcTranslate"))},"不限")]),h.createVNode(g,{modelValue:i.value.jcTranslate.type,"onUpdate:modelValue":f[9]||(f[9]=D=>i.value.jcTranslate.type=D),size:"small"},{default:h.withCtx(()=>[h.createVNode(p,{value:2},{default:h.withCtx(()=>[h.createTextVNode("价差转品种")]),_:1}),h.createVNode(p,{value:1},{default:h.withCtx(()=>[h.createTextVNode("品种转价差")]),_:1})]),_:1},8,["modelValue"]),h.withDirectives(h.createVNode(w,{modelValue:i.value.jcTranslate.jcList,"onUpdate:modelValue":f[10]||(f[10]=D=>i.value.jcTranslate.jcList=D),size:"small",multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"请选择价差品种",style:{width:"140px"}},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(c.value,D=>(h.openBlock(),h.createBlock(b,{key:D.value,label:D.label,value:D.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),[[h.vShow,i.value.jcTranslate.type===1]])])):h.createCommentVNode("",!0),(N=r.value.factorScreen)!=null&&N.show?(h.openBlock(),h.createElementBlock("div",Vyt,[h.createElementVNode("div",zyt,[Hyt,h.createElementVNode("span",{onClick:f[11]||(f[11]=D=>u("factorScreen"))},"不限")]),h.createVNode(Gvt,{data:i.value.factorScreen,"onUpdate:data":f[12]||(f[12]=D=>i.value.factorScreen=D),config:r.value.factorScreen},null,8,["data","config"])])):h.createCommentVNode("",!0),h.createVNode(Cyt,{data:i.value.commonIndicator,"onUpdate:data":f[13]||(f[13]=D=>i.value.commonIndicator=D),varietyMarket:i.value.varietyMarket,commonOption:i.value.commonOption,config:r.value.commonIndicator},null,8,["data","varietyMarket","commonOption","config"])])}}},[["__scopeId","data-v-bdbe35cf"]]),$yt={install(n){n.component("st-varietySearch",Wyt)}},Axt="",Mxt="",Ixt="",jyt={key:0,class:"footer-box"},Uyt={__name:"index",props:h.mergeModels({tableData:{type:Array,default:[]},tableColumn:{type:Array,default:[]},tableLoading:{type:[String,null],default:null},config:{type:Object}},{tableActiveData:{default:()=>[]},tableActiveDataModifiers:{}}),emits:h.mergeModels(["touchBottom"],["update:tableActiveData"]),setup(n,{emit:e}){const t=e,i=n,r=h.computed(()=>({headerHeight:50,rowHeight:50,tableActiveNum:9,tableActiveKey:"id",pageUpDownEnabled:!0,...i.config})),o=h.ref(null),s=h.ref(0);let a=0,l=!1,c=null;const u=h.useModel(n,"tableActiveData"),d=h.computed(()=>u.value.map(b=>b[r.value.tableActiveKey])),f=({rowData:b,rowIndex:w})=>{const{tableActiveNum:v,tableActiveKey:y}=r.value;if(d.value.includes(b[y]))return;const C=Math.floor(w/v)*v,S=C+v;u.value=i.tableData.slice(C,S)},p=({code:b})=>{const{tableData:w}=i,{tableActiveNum:v,tableActiveKey:y,pageUpDownEnabled:C}=r.value;if(!w.length||!C)return;const S=w.findIndex(k=>k[y]===d.value.at(0)),x=w.findIndex(k=>k[y]===d.value.at(-1));let N=null,D=null;switch(b){case"PageUp":if(S===0)return;N=S-v>0?S-v:0,D=N+v-1,u.value=w.slice(N,D+1),m(N,"PageUp");break;case"PageDown":if(x===w.length-1)return;N=S+v,D=N+v-1,u.value=w.slice(N,D+1),m(D,"PageDown");break}},g=b=>{l||(a===b.scrollLeft&&b.yAxisScrollDir==="backward"&&(s.value=0),a=b.scrollLeft)},m=(b,w)=>{b!==null&&(clearTimeout(c),l=!0,w==="PageUp"?s.value=0:b>=i.tableData.length-1&&(s.value=30,t("touchBottom")),h.nextTick(()=>{o.value.scrollToRow(b),o.value.scrollToLeft(a),c=setTimeout(()=>{l=!1},500)}))},_=({rowData:b})=>{if(!u.value.length)return;let w="";const{tableActiveKey:v}=r.value;return b[v]===d.value[0]&&(w+=" virtual-table-active-start"),d.value.includes(b[v])&&(w+=" virtual-table-active-row"),b[v]===d.value[d.value.length-1]&&(w+=" virtual-table-active-end"),w};return h.onMounted(()=>{window.addEventListener("keydown",p)}),h.watch(()=>i.tableLoading,b=>{b||(s.value=0)}),h.onUnmounted(()=>{window.removeEventListener("keydown",p)}),(b,w)=>{const v=Z8,y=va,C=k5e,S=i_e,x=r_e;return h.openBlock(),h.createBlock(x,null,{default:h.withCtx(({height:N,width:D})=>[h.createVNode(S,{ref_key:"tableRef",ref:o,id:"virtualTable",fixed:"",data:n.tableData,columns:n.tableColumn,width:D,height:N,"header-height":r.value.headerHeight,"row-height":r.value.rowHeight,"row-class":_,"row-event-handlers":{onClick:f},"footer-height":s.value,"scrollbar-always-on":"",onScroll:g,onEndReached:w[0]||(w[0]=k=>m(n.tableData.length-1,"PageDown"))},{empty:h.withCtx(()=>[h.createVNode(v,{description:"暂无数据",style:{height:"100%"}})]),footer:h.withCtx(()=>[s.value?(h.openBlock(),h.createElementBlock("div",jyt,[n.tableLoading==="more"?(h.openBlock(),h.createBlock(C,{key:0},{default:h.withCtx(()=>[h.createVNode(y,{type:"primary",text:"",loading:""},{default:h.withCtx(()=>[h.createTextVNode("正在加载更多数据")]),_:1})]),_:1})):n.tableLoading==="all"?(h.openBlock(),h.createBlock(C,{key:1},{default:h.withCtx(()=>[h.createTextVNode(" 已无更多数据 ")]),_:1})):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0)]),_:2},1032,["data","columns","width","height","header-height","row-height","row-event-handlers","footer-height"])]),_:1})}}},Rxt="",qyt=fi(Uyt,[["__scopeId","data-v-7e702a8a"]]),Kyt={install(n){n.component("st-virtualTable",qyt)}},Gyt={install(n){q_e.install(n),IQe.install(n),FQe.install(n),lXe.install(n),dXe.install(n),qrt.install(n),wot.install(n),Oot.install(n),$ot.install(n),Kot.install(n),fvt.install(n),mvt.install(n),wvt.install(n),xvt.install(n),Evt.install(n),Tvt.install(n),Pvt.install(n),$yt.install(n),Kyt.install(n)}};/*!-----------------------------------------------------------------------------
|
|
823
823
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
824
824
|
* Version: 0.47.0(69991d66135e4a1fc1cf0b1ac4ad25d429866a0d)
|
|
825
825
|
* Released under the MIT license
|
|
@@ -243186,7 +243186,7 @@ kce({
|
|
|
243186
243186
|
extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"],
|
|
243187
243187
|
aliases: ["Python", "py"],
|
|
243188
243188
|
firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
|
|
243189
|
-
loader: () => import("./python-
|
|
243189
|
+
loader: () => import("./python-258cd090.js")
|
|
243190
243190
|
});
|
|
243191
243191
|
/*!-----------------------------------------------------------------------------
|
|
243192
243192
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -245364,7 +245364,7 @@ const Ice = (n) => (G9("data-v-3592dee9"), n = n(), Y9(), n), Jwt = { class: "fa
|
|
|
245364
245364
|
};
|
|
245365
245365
|
}
|
|
245366
245366
|
}, uCt = /* @__PURE__ */ $i(lCt, [["__scopeId", "data-v-3592dee9"]]);
|
|
245367
|
-
const UC = (n) => (G9("data-v-
|
|
245367
|
+
const UC = (n) => (G9("data-v-781330f8"), n = n(), Y9(), n), cCt = {
|
|
245368
245368
|
key: 0,
|
|
245369
245369
|
class: "common-indicator"
|
|
245370
245370
|
}, dCt = { class: "indicator" }, hCt = /* @__PURE__ */ UC(() => /* @__PURE__ */ Ee("div", { class: "title" }, [
|
|
@@ -245529,9 +245529,9 @@ const UC = (n) => (G9("data-v-b6076567"), n = n(), Y9(), n), cCt = {
|
|
|
245529
245529
|
};
|
|
245530
245530
|
if (!_)
|
|
245531
245531
|
return so.warning("格式错误: 请选择时间");
|
|
245532
|
-
if (!C(w[0])
|
|
245532
|
+
if (!C(w[0]) && !C(w[1]))
|
|
245533
245533
|
return so.warning(`格式错误: 请填写${b === "0" ? "涨幅范围" : "排名范围"}`);
|
|
245534
|
-
l.value.tagText = `${y}: ${_}日${b === "0" ? "涨幅范围" : "排名范围"}: ${w[0]}${b === "0" ? "%" : ""} ~ ${w[1]}${b === "0" ? "%" : ""}`;
|
|
245534
|
+
!["", null].includes(w[0]) && !["", null].includes(w[1]) ? l.value.tagText = `${y}: ${_}日${b === "0" ? "涨幅范围" : "排名范围"}: ${w[0]}${b === "0" ? "%" : ""} ~ ${w[1]}${b === "0" ? "%" : ""}` : ["", null].includes(w[0]) ? l.value.tagText = `${y}: ${_}日${b === "0" ? "涨幅范围" : "排名范围"}: ≤${w[1]}${b === "0" ? "%" : ""}` : l.value.tagText = `${y}: ${_}日${b === "0" ? "涨幅范围" : "排名范围"}: ≥${w[0]}${b === "0" ? "%" : ""}`;
|
|
245535
245535
|
break;
|
|
245536
245536
|
}
|
|
245537
245537
|
default: {
|
|
@@ -246030,7 +246030,7 @@ const UC = (n) => (G9("data-v-b6076567"), n = n(), Y9(), n), cCt = {
|
|
|
246030
246030
|
])) : Qe("", !0);
|
|
246031
246031
|
};
|
|
246032
246032
|
}
|
|
246033
|
-
}, BCt = /* @__PURE__ */ $i(FCt, [["__scopeId", "data-v-
|
|
246033
|
+
}, BCt = /* @__PURE__ */ $i(FCt, [["__scopeId", "data-v-781330f8"]]);
|
|
246034
246034
|
const kp = (n) => (G9("data-v-bdbe35cf"), n = n(), Y9(), n), VCt = { class: "variety-search" }, zCt = {
|
|
246035
246035
|
key: 0,
|
|
246036
246036
|
class: "variety-search-row"
|