st-comp 0.0.114 → 0.0.115

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/lib/bundle.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as m } from "./index-baf940eb.js";
1
+ import { i as m } from "./index-a981dd97.js";
2
2
  import "vue";
3
3
  import "echarts";
4
4
  export {
@@ -809,7 +809,7 @@ ${e.toString()}`}}class lC{constructor(e=new J5,t=!1,i,r=H9t){var o;this._servic
809
809
  * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
810
810
  *-----------------------------------------------------------------------------*/mbt({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Promise.resolve().then(()=>Q_t)});const bbt=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=B1e.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({setValue:a=>{i.setValue(a)},getValue:()=>i.getValue(),setReadOnly:(a=!0)=>{i.updateOptions({readOnly:a})}}),(a,l)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"editorContainer",ref:s,style:{width:"100%",height:"100%"}},null,512))}}),_bt={install(n){n.component("st-monacoEditor",bbt)}},UCt="",vbt=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 u=Q8e,c=R8;return h.openBlock(),h.createBlock(c,{locale:h.unref(t6)},{default:h.withCtx(()=>[h.withDirectives(h.createVNode(u,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"])}}}),qCt="",ybt=Yi(vbt,[["__scopeId","data-v-61b7745b"]]),Cbt={install(n){n.component("st-pagination",ybt)}},wbt=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}=Z0,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 u=n,c=h.ref(),d=h.computed(()=>({...o,...u.style})),f=h.computed(()=>({...s,...u.config}));h.watch(()=>[u.data,u.style],()=>{p()},{deep:!0}),h.onMounted(()=>{a=Ba.init(c.value),p();let g=!0;l=new ResizeObserver(()=>{if(g){g=null;return}a.resize()}),l.observe(c.value)}),h.onUnmounted(()=>{a.dispose(),l.disconnect(),l=null});const p=()=>{const g=u.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 _=u.data.find(b=>b.name===m);return`${m}
811
811
  ${_.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:u.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:c,class:"chart"},null,512))}}),KCt="",Sbt=Yi(wbt,[["__scopeId","data-v-964eca86"]]),xbt={install(n){n.component("st-pie",Sbt)}},GCt="",W1e=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=M1,s=rB;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))}}}),Dbt=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))}}),Nbt=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(u=>typeof u.show=="function"&&u.show(l.row,l.$index)===!1?!1:u.show!==!1);return(a,l)=>{const u=ci,c=c6e,d=BS,f=FS,p=R8,g=Ibe;return h.openBlock(),h.createBlock(p,{locale:h.unref(t6)},{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(Dbt,{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,C)=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:`${b.text}-${C}`},[b.children?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[s(b.children,_).length?(h.openBlock(),h.createBlock(c,{key:0,placement:"bottom",trigger:"hover","popper-style":{minWidth:"0px",width:null}},{reference:h.withCtx(()=>[h.createVNode(u,{style:{marginLeft:"10px",verticalAlign:"-5px",cursor:"pointer"},size:"20"},{default:h.withCtx(()=>[h.createVNode(h.unref(gw))]),_: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(W1e,{option:v,scope:_,showMargin:y!==0},null,8,["option","scope","showMargin"])]))),128))]),_:2},1024)):h.createCommentVNode("",!0)],64)):(h.openBlock(),h.createBlock(W1e,{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"])}}}),Ebt={install(n){n.component("st-table",Nbt)}},Lbt=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=Ba.init(s.value),l();let u=!0;r=new ResizeObserver(()=>{if(u){u=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:u=>`{title|${u.data.name} ${u.data.labelValue}} ${u.data.percent===null?"":`{${u.data.percent>=0?u.data.percent===0?"defaultPercent":"redPercent":"greenPercent"}|${u.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:u=>`${u.data.name}
812
- ${u.data.colorValue}`}}],data:o.data.map(u=>({...u,itemStyle:{color:u.color},children:u.children.map(c=>({...c,itemStyle:{color:c.color}}))}))}]},!0)};return e({reset:()=>{l()}}),(u,c)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"chartRef",ref:s,class:"chart"},null,512))}}),YCt="",kbt=Yi(Lbt,[["__scopeId","data-v-ab677899"]]),Tbt={install(n){n.component("st-treeMap",kbt)}},QCt="",ZCt="",XCt="",JCt="",Abt={class:"user"},Mbt={key:0},Ibt={class:"user-msg"},Rbt=h.defineComponent({__name:"index",props:{config:{type:Object,default:()=>({})}},emits:["loginout"],setup(n,{emit:e}){const t=KQe(),i=e,r=n,o=()=>{const{loginUrl:a}=r.config||{};GQe(a)},s=()=>{const{loginoutToLogin:a,loginoutUrl:l}=r.config||{};YQe(a,l),i("loginout")};return(a,l)=>{const u=ci,c=P5e,d=F5e,f=O5e;return h.openBlock(),h.createElementBlock("div",Abt,[h.unref(t)?(h.openBlock(),h.createElementBlock("div",Mbt,[h.createVNode(f,{placement:"bottom"},{dropdown:h.withCtx(()=>[h.createVNode(d,null,{default:h.withCtx(()=>[h.createVNode(c,{onClick:s},{default:h.withCtx(()=>[h.createTextVNode("退出登录")]),_:1})]),_:1})]),default:h.withCtx(()=>{var p;return[h.createElementVNode("div",Ibt,[h.createVNode(u,{class:"user-msg-icon"},{default:h.withCtx(()=>[h.createVNode(h.unref(L3e))]),_:1}),h.createElementVNode("span",null,h.toDisplayString((p=h.unref(t))==null?void 0:p.username),1),h.createVNode(u,{class:"user-msg-arrow"},{default:h.withCtx(()=>[h.createVNode(h.unref(wf))]),_:1})])]}),_:1})])):(h.openBlock(),h.createElementBlock("div",{key:1,class:"user-login",onClick:o},[h.createTextVNode(" 前往登录 "),h.createVNode(u,{class:"user-login-icon"},{default:h.withCtx(()=>[h.createVNode(h.unref(C3e))]),_:1})]))])}}}),ewt="",Obt=Yi(Rbt,[["__scopeId","data-v-b83bf27d"]]),Pbt={install(n){n.component("st-user",Obt)}},twt="",$1e={varietyMarket:{show:!0,options:[{label:"ETF",value:2,memo:[]},{label:"A股",value:3,memo:[4,6,12,14,15]},{label:"期货",value:4,memo:[1,2,3,5,7,8,9,10]},{label:"港股",value:5,memo:[4,6,14]},{label:"外盘",value:6,memo:[1,2,3,5,7,8,9,10]},{label:"美股",value:7,memo:[4,6,14]},{label:"期权",value:8,memo:[11]}]},commonOption:{show:!0,options:[{label:"个股",value:14},{label:"期货主连",value:1},{label:"期货主力",value:2},{label:"期货加权",value:3},{label:"常用股票指数",value:4},{label:"期货收益率指数",value:5},{label:"行业板块指数",value:6},{label:"期货次主连",value:7},{label:"期货次主力",value:8},{label:"期货板块收益率指数",value:9},{label:"期货板块加权指数",value:10},{label:"期权",value:11},{label:"价差板块指数",value:12},{label:"概念板块指数",value:15}]},marketIds:{show:!0,options:[]},customTag:{show:!0,options:[]},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]},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]},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]},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]},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]},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]},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]},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]},type:"custom"},{key:"pb",label:"市净率",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15]},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]},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:"roe",label:"净资产收益率roe",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15]},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]},type:"custom"},{key:"dividendYield",label:"股息率",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15]},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]},type:"custom"},{key:"peTtmLevels",label:"市盈率分位",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15]},type:"custom"},{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:[]}]}},nwt="",Fbt=(n,e,t)=>{!e[0]&&e[0]!==0&&!e[1]&&e[1]!==0?t(new Error("至少填写一个分数")):t()},j1e=n=>{const e=/(条件(\d+))/g;return n.match(e)||[]},Bbt={__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=BS,o=FS,s=ng;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"])}}},iwt="",rwt="",owt="",U1e=n=>(h.pushScopeId("data-v-3cac46e2"),n=n(),h.popScopeId(),n),Vbt={class:"factor-screen"},zbt={class:"custom-header"},Hbt=["id"],Wbt={class:"form-row"},$bt={class:"index"},jbt={style:{display:"flex","align-items":"center",width:"100%",height:"24px"}},Ubt=U1e(()=>h.createElementVNode("span",null,"~",-1)),qbt=U1e(()=>h.createElementVNode("span",null,"&&代表and,||代表or",-1)),Kbt={class:"dialog-footer"},Gbt=Yi({__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||c(),i.value=!0},l=()=>{o.value.validate(g=>{const{list:m,sqlEnable:_,sqlValue:b}=s.value;if(g){if(_){if(!b)return Ml.error("SQL语句不能为空");const C=j1e(b),v=m.map((w,S)=>`条件${S+1}`),y=C.filter(w=>!v.includes(w));if(y.length)return Ml.error(`请检查SQL语句, 不存在[${y}]`)}t.value={list:JSON.parse(JSON.stringify(m)),sqlEnable:_,sqlValue:b},i.value=!1}})},u=g=>{s.value.list.splice(g,1)},c=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=j1e(s.value.sqlValue);s.value.sqlValue=s.value.list.reduce((_,b,C)=>(m.includes(`条件${C+1}`)||(_+=`&& 条件${C+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:C,factor2:v}=g;let y="";return y+=` ${e.config.cycleOptions.find(({value:w})=>w===m).label}`,y+=` ${e.config.factorOptions.find(({value:w})=>w===_).label}`,y+=` ${b}`,y+=` ${e.config.cycleOptions.find(({value:w})=>w===C).label}`,y+=` ${e.config.factorOptions.find(({value:w})=>w===v).label}`,y}default:{const{cycle:m,factor:_,score:b}=g;let C="";return C+=` ${e.config.cycleOptions.find(({value:v})=>v===m).label}`,C+=` ${e.config.factorOptions.find(({value:v})=>v===_).label}`,C+=` ${b[0]||b[0]===0?`${b[0]}分`:"∞"}`,C+=" ~",C+=` ${b[1]||b[1]===0?`${b[1]}分`:"∞"}`,C}}},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)=>{const _=Ebe,b=Uw,C=M1,v=ci,y=Pu,w=lg,S=ag,x=GF,D=rS,N=$w,E=I8,k=Kp,L=KF,I=ng;return h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createElementVNode("div",Vbt,[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]=F=>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,(F,R)=>(h.openBlock(),h.createBlock(b,{closable:"",type:"info",onClose:M=>p("factorTag",R)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(f(F)),1)]),_:2},1032,["onClose"]))),256)):h.createCommentVNode("",!0),h.createVNode(C,{class:"screen-btn",type:"primary",plain:"",size:"small",icon:h.unref(b8),onClick:a},{default:h.withCtx(()=>[h.createTextVNode(" 添加因子 ")]),_:1},8,["icon"])]),h.createVNode(I,{modelValue:i.value,"onUpdate:modelValue":m[5]||(m[5]=F=>i.value=F),width:"602","align-center":"","destroy-on-close":""},{header:h.withCtx(({titleId:F,titleClass:R})=>[h.createElementVNode("div",zbt,[h.createElementVNode("span",{id:F,class:h.normalizeClass(R)}," 因子筛选 ",10,Hbt),h.createVNode(y,{effect:"dark",content:"点击查看: 因子使用说明",placement:"right"},{default:h.withCtx(()=>[h.createVNode(v,{onClick:m[1]||(m[1]=M=>r.value=!0)},{default:h.withCtx(()=>[h.createVNode(h.unref(fw))]),_:1})]),_:1})])]),footer:h.withCtx(()=>[h.createElementVNode("div",Kbt,[h.createVNode(C,{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,(F,R)=>(h.openBlock(),h.createElementBlock("div",Wbt,[h.createElementVNode("span",$bt,h.toDisplayString(`条件${R+1}`),1),F.key==="compare"?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[n.config.cycleShow?(h.openBlock(),h.createBlock(x,{key:0,prop:"list."+R+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:F.cycle,"onUpdate:modelValue":M=>F.cycle=M,placeholder:"选择周期",size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.cycleOptions,({label:M,value:A})=>(h.openBlock(),h.createBlock(w,{label:M,value:A,key:A},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):h.createCommentVNode("",!0),h.createVNode(x,{prop:"list."+R+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:F.factor,"onUpdate:modelValue":M=>F.factor=M,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.factorOptions,({label:M,value:A})=>(h.openBlock(),h.createBlock(w,{label:M,value:A,key:A},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:F.compareType,"onUpdate:modelValue":M=>F.compareType=M,size:"small"},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList([">",">=","<","<="],M=>h.createVNode(w,{label:M,value:M,key:M},null,8,["label","value"])),64))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024),n.config.cycleShow?(h.openBlock(),h.createBlock(x,{key:1,prop:"list."+R+".cycle2",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:F.cycle2,"onUpdate:modelValue":M=>F.cycle2=M,placeholder:"选择周期",size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.cycleOptions,({label:M,value:A})=>(h.openBlock(),h.createBlock(w,{label:M,value:A,key:A},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):h.createCommentVNode("",!0),h.createVNode(x,{prop:"list."+R+".factor2",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:F.factor2,"onUpdate:modelValue":M=>F.factor2=M,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.factorOptions,({label:M,value:A})=>(h.openBlock(),h.createBlock(w,{label:M,value:A,key:A},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."+R+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:F.cycle,"onUpdate:modelValue":M=>F.cycle=M,placeholder:"选择周期",size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.cycleOptions,({label:M,value:A})=>(h.openBlock(),h.createBlock(w,{label:M,value:A,key:A},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):h.createCommentVNode("",!0),h.createVNode(x,{prop:"list."+R+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:F.factor,"onUpdate:modelValue":M=>F.factor=M,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.factorOptions,({label:M,value:A})=>(h.openBlock(),h.createBlock(w,{label:M,value:A,key:A},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),h.createVNode(x,{prop:"list."+R+".score",rules:{validator:h.unref(Fbt),trigger:"blur"},style:{width:"200px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createElementVNode("div",jbt,[h.createVNode(D,{modelValue:F.score[0],"onUpdate:modelValue":M=>F.score[0]=M,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"]),Ubt,h.createVNode(D,{modelValue:F.score[1],"onUpdate:modelValue":M=>F.score[1]=M,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"])])]),_:2},1032,["prop","rules"])],64)),h.createVNode(v,{onClick:M=>u(R)},{default:h.withCtx(()=>[h.createVNode(h.unref(dw))]),_:2},1032,["onClick"])]))),256)),h.createVNode(C,{type:"primary",plain:"",size:"small",icon:h.unref(b8),onClick:c,style:{"margin-bottom":"10px"}},{default:h.withCtx(()=>[h.createTextVNode("添加因子")]),_:1},8,["icon"]),h.createVNode(C,{type:"primary",plain:"",size:"small",icon:h.unref(b8),onClick:m[2]||(m[2]=F=>c("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(E,{modelValue:s.value.sqlEnable,"onUpdate:modelValue":m[3]||(m[3]=F=>s.value.sqlEnable=F)},{default:h.withCtx(()=>[h.createVNode(N,{label:"关闭",value:0}),h.createVNode(N,{label:"启用",value:1})]),_:1},8,["modelValue"]),s.value.sqlEnable?(h.openBlock(),h.createBlock(C,{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(k,{modelValue:s.value.sqlValue,"onUpdate:modelValue":m[4]||(m[4]=F=>s.value.sqlValue=F),autosize:{minRows:4},type:"textarea",style:{"margin-bottom":"10px"}},null,8,["modelValue"]),qbt],64)):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["modelValue"])]),h.createVNode(Bbt,{visible:r.value,"onUpdate:visible":m[6]||(m[6]=F=>r.value=F),data:n.config.factorDescriptions},null,8,["visible","data"])],64)}}},[["__scopeId","data-v-3cac46e2"]]),awt="",IC=n=>(h.pushScopeId("data-v-bdb03941"),n=n(),h.popScopeId(),n),Ybt={key:0,class:"common-indicator"},Qbt={class:"indicator"},Zbt=IC(()=>h.createElementVNode("div",{class:"title"},[h.createElementVNode("span",null,"常用指标: "),h.createElementVNode("span",null,"不限")],-1)),Xbt={class:"options"},Jbt=["onClick"],e_t={class:"tags"},t_t=["onClick"],n_t={style:{"font-size":"18px"}},i_t={key:0,class:"out-box"},r_t=IC(()=>h.createElementVNode("span",null,"自定义: ",-1)),o_t={key:0,class:"convenient-option-box"},s_t={class:"out-box"},a_t=IC(()=>h.createElementVNode("span",null,"自定义: ",-1)),l_t={key:0},u_t={key:0},c_t={key:0},d_t={key:1},h_t={class:"tFeaturelncomes-option-box"},f_t={class:"tFeaturelncomes-out-box"},p_t=IC(()=>h.createElementVNode("span",null,"自定义: ",-1)),g_t={key:2},m_t={key:3},b_t={key:4},__t={class:"dialog-footer"},v_t=Yi({__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=h.useModel(n,"data"),t=n,i=h.ref(!1),r=h.computed(()=>{var g;return(g=t.data.find(m=>m.radioType==="1"))==null?void 0:g.key}),o=h.computed(()=>{let g=[];return t.varietyMarket===null&&!t.commonOption.length?g=t.config.options:(g=t.config.options,t.varietyMarket&&(g=g.filter(({parent:m})=>m.varietyMarketIds.includes(t.varietyMarket))),t.commonOption.length&&(g=g.filter(({parent:m})=>{const{commonOptionIds:_}=m;return[...new Set([..._,...t.commonOption])].length!==[..._,...t.commonOption].length}))),g}),s=h.ref({}),a=h.ref({}),l=g=>{s.value=g;const m={key:g.key,type:g.type,label:g.label};switch(g.key){case"st":{a.value={...m,st:null};break}case"tFeaturelncomes":{a.value={...m,rule:1,withFewYears:null,yearsCount:null,netProfit:null};break}case"priceLevels":{a.value={...m,priceLevels:null};break}case"peTtmLevels":{a.value={...m,peTtmLevels:null};break}case"optionsCpType":{a.value={...m,optionsCpType:null};break}default:a.value={...m,range:[null,null],unit:g.defaultUnit.length?[...g.defaultUnit]:[null,null],radioType:r.value&&r.value!==g.key?"0":g.defaultRadioType,rankRange:g.defaultRankRange||[null,null]}}i.value=!0},u=()=>{switch(a.value.key){case"st":{const{label:m,st:_}=a.value;if(_===null)return Ml.warning("格式错误: 请至少选择一个值");a.value.tagText=`${m}: ${_?"是":"否"}`;break}case"tFeaturelncomes":{const{label:m,rule:_,withFewYears:b,yearsCount:C,netProfit:v}=a.value;if(["",null].includes(b)||["",null].includes(C)||["",null].includes(v))return Ml.warning("格式错误: 请填写完整");a.value.tagText=`${m}: ${b}年内${C}年以上盈利${_===1?"超":"跌"}过${v}亿`;break}case"priceLevels":{const{label:m,priceLevels:_}=a.value;if(!_||_.length===0)return Ml.warning("格式错误: 请至少选择一个值");a.value.tagText=`${m}: 已选${_}分位`;break}case"peTtmLevels":{const{label:m,peTtmLevels:_}=a.value;if(!_||_.length===0)return Ml.warning("格式错误: 请至少选择一个值");a.value.tagText=`${m}: 已选${_}分位`;break}case"optionsCpType":{const{label:m,optionsCpType:_}=a.value;if(_===null)return Ml.warning("格式错误: 请至少选择一个值");a.value.tagText=`${m}: ${_===1?"看涨":"看跌"}`;break}default:{const{label:m,unit:_,radioType:b}=a.value,C=b==="1"?a.value.rankRange:a.value.range;if(["",null].includes(C[0])&&["",null].includes(C[1]))return Ml.warning("格式错误: 请至少填写一个值");if(b==="1"){const w=Number(C[0]),S=Number(C[1]);if(isNaN(w)||isNaN(S))return Ml.warning("格式错误: 请填写数字");if(w<0||S<0)return Ml.warning("格式错误: 请填写大于0的数字");if(w>S)return Ml.warning("格式错误: 请填写正确的排名范围")}const v=b==="1"?"":_[0]??"",y=b==="1"?"":_[1]??"";!["",null].includes(C[0])&&!["",null].includes(C[1])?a.value.tagText=`${m}${b==="1"?"排名":""}: ${C[0]}${v} ~ ${C[1]}${y}`:["",null].includes(C[0])?a.value.tagText=`${m}${b==="1"?"排名":""}: ≤${C[1]}${y}`:a.value.tagText=`${m}${b==="1"?"排名":""}: ≥${C[0]}${v}`}}const g=e.value.findIndex(({key:m})=>m===a.value.key);g===-1?e.value.push(a.value):e.value.splice(g,1,a.value),i.value=!1},c=g=>{s.value=o.value.find(({key:m})=>m===g.key),a.value=JSON.parse(JSON.stringify(g)),i.value=!0},d=g=>{e.value.splice(g,1)},f=g=>{a.value.range=[...g.range],a.value.unit=[...g.unit]},p=g=>{switch(g){case"≤0":Object.assign(a.value,{rule:2,withFewYears:1,yearsCount:1,netProfit:0});break;case"≥0":Object.assign(a.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:0});break;case"五年内有四年以上盈利超过5千万":Object.assign(a.value,{rule:1,withFewYears:5,yearsCount:4,netProfit:.5});break;case"≥10亿":Object.assign(a.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:10});break;case"≥20亿":Object.assign(a.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:20});break}};return h.watch(()=>o.value,()=>{e.value.length&&(e.value=e.value.filter(({key:g})=>o.value.find(m=>m.key===g)))}),(g,m)=>{const _=Uw,b=wF,C=I8,v=Kp,y=M1,w=lg,S=ag,x=$w,D=rS,N=ng;return n.config.show&&o.value.length?(h.openBlock(),h.createElementBlock("div",Ybt,[h.createElementVNode("div",Qbt,[Zbt,h.createElementVNode("div",Xbt,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value,E=>(h.openBlock(),h.createElementBlock("span",{key:E.key,onClick:k=>l(E)},h.toDisplayString(E.label),9,Jbt))),128))])]),h.createElementVNode("div",e_t,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(e.value,(E,k)=>(h.openBlock(),h.createBlock(_,{closable:"",type:"info",onClose:L=>d(k)},{default:h.withCtx(()=>[h.createElementVNode("span",null,h.toDisplayString(E.tagText),1),h.createElementVNode("span",{class:"edit",onClick:L=>c(E)},"编辑",8,t_t)]),_:2},1032,["onClose"]))),256))]),h.createVNode(N,{modelValue:i.value,"onUpdate:modelValue":m[19]||(m[19]=E=>i.value=E),title:s.value.label,width:"600","align-center":"","destroy-on-close":""},h.createSlots({footer:h.withCtx(()=>[h.createElementVNode("div",__t,[h.createVNode(y,{type:"primary",onClick:u},{default:h.withCtx(()=>[h.createTextVNode("确定")]),_:1})])]),default:h.withCtx(()=>[s.value.type===void 0&&a.value.radioType==="1"?(h.openBlock(),h.createElementBlock("div",i_t,[r_t,h.createVNode(v,{modelValue:a.value.rankRange[0],"onUpdate:modelValue":m[1]||(m[1]=E=>a.value.rankRange[0]=E),style:{flex:"1"}},null,8,["modelValue"]),h.createTextVNode(" ~ "),h.createVNode(v,{modelValue:a.value.rankRange[1],"onUpdate:modelValue":m[2]||(m[2]=E=>a.value.rankRange[1]=E),style:{flex:"1"}},null,8,["modelValue"])])):s.value.type===void 0?(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[s.value.convenientOptions.length?(h.openBlock(),h.createElementBlock("div",o_t,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value.convenientOptions,E=>(h.openBlock(),h.createBlock(y,{key:E.text,onClick:k=>f(E)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(E.text),1)]),_:2},1032,["onClick"]))),128))])):h.createCommentVNode("",!0),h.createElementVNode("div",s_t,[a_t,h.createVNode(v,{modelValue:a.value.range[0],"onUpdate:modelValue":m[4]||(m[4]=E=>a.value.range[0]=E),style:{flex:"1"}},h.createSlots({_:2},[s.value.unitOptions.length?{name:"append",fn:h.withCtx(()=>[s.value.unitOptions.length===1?(h.openBlock(),h.createElementBlock("span",l_t,h.toDisplayString(a.value.unit[0]),1)):(h.openBlock(),h.createBlock(S,{key:1,modelValue:a.value.unit[0],"onUpdate:modelValue":m[3]||(m[3]=E=>a.value.unit[0]=E),style:{width:"72px"}},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value.unitOptions,E=>(h.openBlock(),h.createBlock(w,{label:E,value:E},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"]),h.createTextVNode(" ~ "),h.createVNode(v,{modelValue:a.value.range[1],"onUpdate:modelValue":m[6]||(m[6]=E=>a.value.range[1]=E),style:{flex:"1"}},h.createSlots({_:2},[s.value.unitOptions.length?{name:"append",fn:h.withCtx(()=>[s.value.unitOptions.length===1?(h.openBlock(),h.createElementBlock("span",u_t,h.toDisplayString(a.value.unit[1]),1)):(h.openBlock(),h.createBlock(S,{key:1,modelValue:a.value.unit[1],"onUpdate:modelValue":m[5]||(m[5]=E=>a.value.unit[1]=E),style:{width:"72px"}},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value.unitOptions,E=>(h.openBlock(),h.createBlock(w,{label:E,value:E},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"])])],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:2},[s.value.key==="st"?(h.openBlock(),h.createElementBlock("div",c_t,[h.createVNode(C,{modelValue:a.value.st,"onUpdate:modelValue":m[7]||(m[7]=E=>a.value.st=E)},{default:h.withCtx(()=>[h.createVNode(x,{label:"是",value:1}),h.createVNode(x,{label:"否",value:0})]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),s.value.key==="tFeaturelncomes"?(h.openBlock(),h.createElementBlock("div",d_t,[h.createElementVNode("div",h_t,[h.createVNode(y,{onClick:m[8]||(m[8]=E=>p("≤0"))},{default:h.withCtx(()=>[h.createTextVNode("≤0")]),_:1}),h.createVNode(y,{onClick:m[9]||(m[9]=E=>p("≥0"))},{default:h.withCtx(()=>[h.createTextVNode("≥0")]),_:1}),h.createVNode(y,{onClick:m[10]||(m[10]=E=>p("五年内有四年以上盈利超过5千万"))},{default:h.withCtx(()=>[h.createTextVNode("五年内有四年以上盈利超过5千万")]),_:1}),h.createVNode(y,{onClick:m[11]||(m[11]=E=>p("≥10亿"))},{default:h.withCtx(()=>[h.createTextVNode("≥10亿")]),_:1}),h.createVNode(y,{onClick:m[12]||(m[12]=E=>p("≥20亿"))},{default:h.withCtx(()=>[h.createTextVNode("≥20亿")]),_:1})]),h.createElementVNode("div",f_t,[p_t,h.createElementVNode("div",null,[h.createVNode(D,{modelValue:a.value.withFewYears,"onUpdate:modelValue":m[13]||(m[13]=E=>a.value.withFewYears=E),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 年内 "),h.createVNode(D,{modelValue:a.value.yearsCount,"onUpdate:modelValue":m[14]||(m[14]=E=>a.value.yearsCount=E),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 年以上盈利"+h.toDisplayString(a.value.rule===1?"超":"跌")+"过 ",1),h.createVNode(D,{modelValue:a.value.netProfit,"onUpdate:modelValue":m[15]||(m[15]=E=>a.value.netProfit=E),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 亿 ")])])])):h.createCommentVNode("",!0),s.value.key==="priceLevels"?(h.openBlock(),h.createElementBlock("div",g_t,[h.createVNode(S,{modelValue:a.value.priceLevels,"onUpdate:modelValue":m[16]||(m[16]=E=>a.value.priceLevels=E),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList([1,2,3,4,5],E=>h.createVNode(w,{key:E,label:`${E}分位`,value:E},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),s.value.key==="peTtmLevels"?(h.openBlock(),h.createElementBlock("div",m_t,[h.createVNode(S,{modelValue:a.value.peTtmLevels,"onUpdate:modelValue":m[17]||(m[17]=E=>a.value.peTtmLevels=E),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],E=>h.createVNode(w,{key:E,label:`${E}分位`,value:E},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),s.value.key==="optionsCpType"?(h.openBlock(),h.createElementBlock("div",b_t,[h.createVNode(C,{modelValue:a.value.optionsCpType,"onUpdate:modelValue":m[18]||(m[18]=E=>a.value.optionsCpType=E)},{default:h.withCtx(()=>[h.createVNode(x,{label:"看涨",value:1}),h.createVNode(x,{label:"看跌",value:2})]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0)],64))]),_:2},[s.value.showRankType?{name:"header",fn:h.withCtx(()=>[h.createElementVNode("span",n_t,h.toDisplayString(s.value.label),1),h.createVNode(C,{modelValue:a.value.radioType,"onUpdate:modelValue":m[0]||(m[0]=E=>a.value.radioType=E),style:{"vertical-align":"4px","margin-left":"12px"}},{default:h.withCtx(()=>[h.createVNode(b,{label:"数值",value:"0"}),h.createVNode(b,{disabled:r.value&&r.value!==s.value.key,label:"排名",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"0"}:void 0]),1032,["modelValue","title"])])):h.createCommentVNode("",!0)}}},[["__scopeId","data-v-bdb03941"]]),uwt="",G9=n=>(h.pushScopeId("data-v-25e1c57e"),n=n(),h.popScopeId(),n),y_t={class:"variety-search"},C_t={key:0,class:"variety-search-row"},w_t={class:"title"},S_t=G9(()=>h.createElementVNode("span",null,"品种市场: ",-1)),x_t={key:1,class:"variety-search-row"},D_t={class:"title"},N_t=G9(()=>h.createElementVNode("span",null,"常用选项: ",-1)),E_t={key:2,class:"variety-search-row"},L_t={class:"title"},k_t=G9(()=>h.createElementVNode("span",null,"上市板块: ",-1)),T_t={key:3,class:"variety-search-row"},A_t={class:"title"},M_t=G9(()=>h.createElementVNode("span",null,"自定标签: ",-1)),I_t={key:4,class:"variety-search-row"},R_t={class:"title"},O_t=G9(()=>h.createElementVNode("span",null,"因子筛选: ",-1)),P_t=Yi({__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:[],factorScreen:{list:[],sqlEnable:0,sqlValue:null},commonIndicator:[]});const r=h.computed(()=>{const c={};return Object.keys($1e).forEach(d=>{const f=$1e[d],p=t.config[d]??{},g={...f,...p};c[d]=g}),c}),o=h.computed(()=>r.value.varietyMarket.options),s=h.computed(()=>{const{varietyMarket:c}=i.value;if(c){const d=o.value.find(({value:f})=>f===c).memo;return r.value.commonOption.options.filter(({value:f})=>d.includes(f))}else return r.value.commonOption.options}),a=h.computed(()=>{const{varietyMarket:c}=i.value;return c?r.value.marketIds.options.filter(d=>d.varietyMarketIds.includes(c)):r.value.marketIds.options}),l=h.computed(()=>r.value.customTag.options),u=c=>{["commonOption","marketIds","customTag","factorScreen","commonIndicator"].includes(c)?i.value[c]=[]:i.value[c]=null};return h.watch(()=>s.value,c=>{var d;(d=i.value.commonOption)!=null&&d.length&&(i.value.commonOption=i.value.commonOption.filter(f=>c.find(({value:p})=>p===f)))}),h.watch(()=>a.value,c=>{var d;(d=i.value.marketIds)!=null&&d.length&&(i.value.marketIds=i.value.marketIds.filter(f=>c.find(({value:p})=>p===f)))}),e({formatData:c=>{var f,p,g,m,_;console.log("%c[st-varietySearch]: 正在生成接口传参结构的数据...","color: tomato");const d={};if(c.varietyMarket&&(d.exchangeId=String(c.varietyMarket)),(f=c.commonOption)!=null&&f.length&&(d.optionId=c.commonOption.join(",")),(p=c.marketIds)!=null&&p.length&&(d.marketIds=c.marketIds),(g=c.customTag)!=null&&g.length&&(d.tagIds=c.customTag),(m=r.value.factorScreen)!=null&&m.show){const{factorScreen:b}=c;if((_=b==null?void 0:b.list)!=null&&_.length&&(d.tbFeatureFactorScores=b.list.map(C=>{switch(C.key){case"compare":return{freqId:C.cycle,factorId:C.factor,compareType:C.compareType,freqId2:C.cycle2,factorId2:C.factor2};default:return{freqId:C.cycle,factorId:C.factor,startScore:C.score[0],endScore:C.score[1]}}})),b.sqlEnable){const C=b.list.reduce((y,w,S)=>{var D,N;const x=`条件${S+1}`;switch(w.key){case"compare":{let E="";(D=r.value.factorScreen)!=null&&D.cycleShow?E=`freq_id = ${w.cycle} and factor_id = ${w.factor} ${w.compareType} freq_id = ${w.cycle2} and factor_id = ${w.factor2}`:E=`factor_id = ${w.factor} ${w.compareType} factor_id = ${w.factor2}`,y.set(x,`(${E})`);break}default:{let E=`factor_id = ${w.factor} and `;(N=r.value.factorScreen)!=null&&N.cycleShow&&(E=`freq_id = ${w.cycle} and factor_id = ${w.factor} and `),(w.score[0]||w.score[0]===0)&&(w.score[1]||w.score[1]===0)?E+=`score >= ${w.score[0]} and score <= ${w.score[1]}`:w.score[0]||w.score[0]===0?E+=`score >= ${w.score[0]}`:(w.score[1]||w.score[1]===0)&&(E+=`score <= ${w.score[1]}`),y.set(x,`(${E})`)}}return y},new Map([]));let v=b.sqlValue;for(const[y,w]of C){const S=new RegExp(y,"g");v=v.replace(S,w)}d.sql=v}d.enableSql=b.sqlEnable===1?2:1}{const b=["expireDays","virtualRealDegree","yearProfitRate","impliedVolatility","levelMultiplier","turnover","volume","openInterest","optionsCpType","optionGear"],C=c.commonIndicator.reduce((D,N)=>{const{key:E,type:k,range:L,unit:I,radioType:F,rankRange:R}=N;if(F==="1")b.includes(E)?d.sortBy={column:N.key,start:R[0]||null,end:R[1]||null}:D.push({column:N.key,type:"1",start:R[0]||null,end:R[1]||null});else if(E==="dividendYield"){let[M,A]=L;["",null].includes(M)||(M=M/100),["",null].includes(A)||(A=A/100),D.push({column:N.key,start:M,end:A})}else if(k===void 0&&!b.includes(E)){let[M,A]=L;if(!["",null].includes(M))switch(I[0]){case"亿":M=M*1e8;break;case"千万":M=M*1e7;break;default:M=M;break}if(!["",null].includes(A))switch(I[1]){case"亿":A=A*1e8;break;case"千万":A=A*1e7;break;default:A=A;break}D.push({column:N.key,start:M,end:A})}return D},[]);C.length&&(d.query=C);const v=c.commonIndicator.find(({key:D})=>D==="st");v&&(d.st=v.st);const y=c.commonIndicator.find(({key:D})=>D==="tFeaturelncomes");y&&(d.netProfitQueryDto={...y,netProfit:y.netProfit*1e8});const w=c.commonIndicator.find(({key:D})=>D==="priceLevels");w&&(d.priceLevels=w.priceLevels);const S=c.commonIndicator.find(({key:D})=>D==="peTtmLevels");S&&(d.peTtmLevels=S.peTtmLevels);const x={};c.commonIndicator.forEach(D=>{const{key:N}=D;switch(N){case"expireDays":["",null].includes(D.range[0])||(x.minExpireDays=D.range[0]),["",null].includes(D.range[1])||(x.maxExpireDays=D.range[1]);break;case"virtualRealDegree":["",null].includes(D.range[0])||(x.minVirtualRealDegree=D.range[0]/100),["",null].includes(D.range[1])||(x.maxVirtualRealDegree=D.range[1]/100);break;case"yearProfitRate":["",null].includes(D.range[0])||(x.minYearProfitRate=D.range[0]/100),["",null].includes(D.range[1])||(x.maxYearProfitRate=D.range[1]/100);break;case"impliedVolatility":["",null].includes(D.range[0])||(x.minImpliedVolatility=D.range[0]/100),["",null].includes(D.range[1])||(x.maxImpliedVolatility=D.range[1]/100);break;case"levelMultiplier":["",null].includes(D.range[0])||(x.minLevelMultiplier=D.range[0]),["",null].includes(D.range[1])||(x.maxLevelMultiplier=D.range[1]);break;case"turnover":["",null].includes(D.range[0])||(x.minTurnover=D.range[0]*1e4),["",null].includes(D.range[1])||(x.maxTurnover=D.range[1]*1e4);break;case"volume":["",null].includes(D.range[0])||(x.minVolume=D.range[0]),["",null].includes(D.range[1])||(x.maxVolume=D.range[1]);break;case"openInterest":["",null].includes(D.range[0])||(x.minOpenInterest=D.range[0]),["",null].includes(D.range[1])||(x.maxOpenInterest=D.range[1]);break;case"optionsCpType":x.optionsCpType=D.optionsCpType;break;case"optionGear":["",null].includes(D.range[0])||(x.minOptionGear=D.range[0]),["",null].includes(D.range[1])||(x.maxOptionGear=D.range[1]);break}}),Object.keys(x).length&&(d.searchOptionDto={...d.searchOptionDto,...x})}return console.log("%c[st-varietySearch]: 接口传参数据生成完毕","color: green",d),d},reset:()=>{i.value={varietyMarket:null,commonOption:[],marketIds:[],customTag:[],factorScreen:{list:[],sqlEnable:0,sqlValue:null},commonIndicator:[]}}}),(c,d)=>{var _,b,C,v,y;const f=$w,p=I8,g=od,m=gF;return h.openBlock(),h.createElementBlock("div",y_t,[(_=r.value.varietyMarket)!=null&&_.show?(h.openBlock(),h.createElementBlock("div",C_t,[h.createElementVNode("div",w_t,[S_t,h.createElementVNode("span",{onClick:d[0]||(d[0]=w=>u("varietyMarket"))},"不限")]),h.createVNode(p,{modelValue:i.value.varietyMarket,"onUpdate:modelValue":d[1]||(d[1]=w=>i.value.varietyMarket=w),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value,({label:w,value:S})=>(h.openBlock(),h.createBlock(f,{label:w,value:S,key:S},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),(b=r.value.commonOption)!=null&&b.show&&s.value.length?(h.openBlock(),h.createElementBlock("div",x_t,[h.createElementVNode("div",D_t,[N_t,h.createElementVNode("span",{onClick:d[2]||(d[2]=w=>u("commonOption"))},"不限")]),h.createVNode(m,{modelValue:i.value.commonOption,"onUpdate:modelValue":d[3]||(d[3]=w=>i.value.commonOption=w),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value,({label:w,value:S})=>(h.openBlock(),h.createBlock(g,{label:w,value:S,key:S},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",E_t,[h.createElementVNode("div",L_t,[k_t,h.createElementVNode("span",{onClick:d[4]||(d[4]=w=>u("marketIds"))},"不限")]),h.createVNode(m,{modelValue:i.value.marketIds,"onUpdate:modelValue":d[5]||(d[5]=w=>i.value.marketIds=w),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(a.value,({label:w,value:S})=>(h.openBlock(),h.createBlock(g,{label:w,value:S,key:S},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),(v=r.value.customTag)!=null&&v.show&&l.value.length?(h.openBlock(),h.createElementBlock("div",T_t,[h.createElementVNode("div",A_t,[M_t,h.createElementVNode("span",{onClick:d[6]||(d[6]=w=>u("customTag"))},"不限")]),h.createVNode(m,{modelValue:i.value.customTag,"onUpdate:modelValue":d[7]||(d[7]=w=>i.value.customTag=w),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(l.value,({label:w,value:S})=>(h.openBlock(),h.createBlock(g,{label:w,value:S,key:S},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),(y=r.value.factorScreen)!=null&&y.show?(h.openBlock(),h.createElementBlock("div",I_t,[h.createElementVNode("div",R_t,[O_t,h.createElementVNode("span",{onClick:d[8]||(d[8]=w=>u("factorScreen"))},"不限")]),h.createVNode(Gbt,{data:i.value.factorScreen,"onUpdate:data":d[9]||(d[9]=w=>i.value.factorScreen=w),config:r.value.factorScreen},null,8,["data","config"])])):h.createCommentVNode("",!0),h.createVNode(v_t,{data:i.value.commonIndicator,"onUpdate:data":d[10]||(d[10]=w=>i.value.commonIndicator=w),varietyMarket:i.value.varietyMarket,commonOption:i.value.commonOption,config:r.value.commonIndicator},null,8,["data","varietyMarket","commonOption","config"])])}}},[["__scopeId","data-v-25e1c57e"]]),F_t={install(n){n.component("st-varietySearch",P_t)}},dwt="",hwt="",fwt="",B_t={key:0,class:"footer-box"},V_t={__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,u=null;const c=h.useModel(n,"tableActiveData"),d=h.computed(()=>c.value.map(b=>b[r.value.tableActiveKey])),f=({rowData:b,rowIndex:C})=>{const{tableActiveNum:v,tableActiveKey:y}=r.value;if(d.value.includes(b[y]))return;const w=Math.floor(C/v)*v,S=w+v;c.value=i.tableData.slice(w,S)},p=({code:b})=>{const{tableData:C}=i,{tableActiveNum:v,tableActiveKey:y,pageUpDownEnabled:w}=r.value;if(!C.length||!w)return;const S=C.findIndex(E=>E[y]===d.value.at(0)),x=C.findIndex(E=>E[y]===d.value.at(-1));let D=null,N=null;switch(b){case"PageUp":if(S===0)return;D=S-v>0?S-v:0,N=D+v-1,c.value=C.slice(D,N+1),m(D,"PageUp");break;case"PageDown":if(x===C.length-1)return;D=S+v,N=D+v-1,c.value=C.slice(D,N+1),m(N,"PageDown");break}},g=b=>{l||(a===b.scrollLeft&&b.yAxisScrollDir==="backward"&&(s.value=0),a=b.scrollLeft)},m=(b,C)=>{b!==null&&(clearTimeout(u),l=!0,C==="PageUp"?s.value=0:b>=i.tableData.length-1&&(s.value=30,t("touchBottom")),h.nextTick(()=>{o.value.scrollToRow(b),o.value.scrollToLeft(a),u=setTimeout(()=>{l=!1},500)}))},_=({rowData:b})=>{if(!c.value.length)return;let C="";const{tableActiveKey:v}=r.value;return b[v]===d.value[0]&&(C+=" virtual-table-active-start"),d.value.includes(b[v])&&(C+=" virtual-table-active-row"),b[v]===d.value[d.value.length-1]&&(C+=" virtual-table-active-end"),C};return h.onMounted(()=>{window.addEventListener("keydown",p)}),h.watch(()=>i.tableLoading,b=>{b||(s.value=0)}),h.onUnmounted(()=>{window.removeEventListener("keydown",p)}),(b,C)=>{const v=Zw,y=M1,w=qme,S=Cbe,x=wbe;return h.openBlock(),h.createBlock(x,null,{default:h.withCtx(({height:D,width:N})=>[h.createVNode(S,{ref_key:"tableRef",ref:o,id:"virtualTable",fixed:"",data:n.tableData,columns:n.tableColumn,width:N,height:D,"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:C[0]||(C[0]=E=>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",B_t,[n.tableLoading==="more"?(h.openBlock(),h.createBlock(w,{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(w,{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})}}},pwt="",z_t=Yi(V_t,[["__scopeId","data-v-7e702a8a"]]),H_t={install(n){n.component("st-virtualTable",z_t)}},W_t={install(n){Kbe.install(n),Zbe.install(n),u_e.install(n),h_e.install(n),Dit.install(n),Vit.install(n),Kit.install(n),Zit.install(n),_bt.install(n),Cbt.install(n),xbt.install(n),Ebt.install(n),Tbt.install(n),Pbt.install(n),F_t.install(n),H_t.install(n)}};/*!-----------------------------------------------------------------------------
812
+ ${u.data.colorValue}`}}],data:o.data.map(u=>({...u,itemStyle:{color:u.color},children:u.children.map(c=>({...c,itemStyle:{color:c.color}}))}))}]},!0)};return e({reset:()=>{l()}}),(u,c)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"chartRef",ref:s,class:"chart"},null,512))}}),YCt="",kbt=Yi(Lbt,[["__scopeId","data-v-ab677899"]]),Tbt={install(n){n.component("st-treeMap",kbt)}},QCt="",ZCt="",XCt="",JCt="",Abt={class:"user"},Mbt={key:0},Ibt={class:"user-msg"},Rbt=h.defineComponent({__name:"index",props:{config:{type:Object,default:()=>({})}},emits:["loginout"],setup(n,{emit:e}){const t=KQe(),i=e,r=n,o=()=>{const{loginUrl:a}=r.config||{};GQe(a)},s=()=>{const{loginoutToLogin:a,loginoutUrl:l}=r.config||{};YQe(a,l),i("loginout")};return(a,l)=>{const u=ci,c=P5e,d=F5e,f=O5e;return h.openBlock(),h.createElementBlock("div",Abt,[h.unref(t)?(h.openBlock(),h.createElementBlock("div",Mbt,[h.createVNode(f,{placement:"bottom"},{dropdown:h.withCtx(()=>[h.createVNode(d,null,{default:h.withCtx(()=>[h.createVNode(c,{onClick:s},{default:h.withCtx(()=>[h.createTextVNode("退出登录")]),_:1})]),_:1})]),default:h.withCtx(()=>{var p;return[h.createElementVNode("div",Ibt,[h.createVNode(u,{class:"user-msg-icon"},{default:h.withCtx(()=>[h.createVNode(h.unref(L3e))]),_:1}),h.createElementVNode("span",null,h.toDisplayString((p=h.unref(t))==null?void 0:p.username),1),h.createVNode(u,{class:"user-msg-arrow"},{default:h.withCtx(()=>[h.createVNode(h.unref(wf))]),_:1})])]}),_:1})])):(h.openBlock(),h.createElementBlock("div",{key:1,class:"user-login",onClick:o},[h.createTextVNode(" 前往登录 "),h.createVNode(u,{class:"user-login-icon"},{default:h.withCtx(()=>[h.createVNode(h.unref(C3e))]),_:1})]))])}}}),ewt="",Obt=Yi(Rbt,[["__scopeId","data-v-b83bf27d"]]),Pbt={install(n){n.component("st-user",Obt)}},twt="",$1e={varietyMarket:{show:!0,options:[{label:"ETF",value:2,memo:[]},{label:"A股",value:3,memo:[4,6,12,14,15]},{label:"期货",value:4,memo:[1,2,3,5,7,8,9,10]},{label:"港股",value:5,memo:[4,6,14]},{label:"外盘",value:6,memo:[1,2,3,5,7,8,9,10]},{label:"美股",value:7,memo:[4,6,14]},{label:"期权",value:8,memo:[11]}]},commonOption:{show:!0,options:[{label:"个股",value:14},{label:"期货主连",value:1},{label:"期货主力",value:2},{label:"期货加权",value:3},{label:"常用股票指数",value:4},{label:"期货收益率指数",value:5},{label:"行业板块指数",value:6},{label:"期货次主连",value:7},{label:"期货次主力",value:8},{label:"期货板块收益率指数",value:9},{label:"期货板块加权指数",value:10},{label:"期权",value:11},{label:"价差板块指数",value:12},{label:"概念板块指数",value:15}]},marketIds:{show:!0,options:[]},customTag:{show:!0,options:[]},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]},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]},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]},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]},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]},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]},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]},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]},type:"custom"},{key:"pb",label:"市净率",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15]},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]},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:"roe",label:"净资产收益率roe",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15]},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]},type:"custom"},{key:"dividendYield",label:"股息率",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15]},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]},type:"custom"},{key:"peTtmLevels",label:"市盈率分位",parent:{varietyMarketIds:[3,5,7],commonOptionIds:[4,6,12,14,15]},type:"custom"},{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:[]}]}},nwt="",Fbt=(n,e,t)=>{!e[0]&&e[0]!==0&&!e[1]&&e[1]!==0?t(new Error("至少填写一个分数")):t()},j1e=n=>{const e=/(条件(\d+))/g;return n.match(e)||[]},Bbt={__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=BS,o=FS,s=ng;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"])}}},iwt="",rwt="",owt="",U1e=n=>(h.pushScopeId("data-v-3cac46e2"),n=n(),h.popScopeId(),n),Vbt={class:"factor-screen"},zbt={class:"custom-header"},Hbt=["id"],Wbt={class:"form-row"},$bt={class:"index"},jbt={style:{display:"flex","align-items":"center",width:"100%",height:"24px"}},Ubt=U1e(()=>h.createElementVNode("span",null,"~",-1)),qbt=U1e(()=>h.createElementVNode("span",null,"&&代表and,||代表or",-1)),Kbt={class:"dialog-footer"},Gbt=Yi({__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||c(),i.value=!0},l=()=>{o.value.validate(g=>{const{list:m,sqlEnable:_,sqlValue:b}=s.value;if(g){if(_){if(!b)return Ml.error("SQL语句不能为空");const C=j1e(b),v=m.map((w,S)=>`条件${S+1}`),y=C.filter(w=>!v.includes(w));if(y.length)return Ml.error(`请检查SQL语句, 不存在[${y}]`)}t.value={list:JSON.parse(JSON.stringify(m)),sqlEnable:_,sqlValue:b},i.value=!1}})},u=g=>{s.value.list.splice(g,1)},c=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=j1e(s.value.sqlValue);s.value.sqlValue=s.value.list.reduce((_,b,C)=>(m.includes(`条件${C+1}`)||(_+=`&& 条件${C+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:C,factor2:v}=g;let y="";return y+=` ${e.config.cycleOptions.find(({value:w})=>w===m).label}`,y+=` ${e.config.factorOptions.find(({value:w})=>w===_).label}`,y+=` ${b}`,y+=` ${e.config.cycleOptions.find(({value:w})=>w===C).label}`,y+=` ${e.config.factorOptions.find(({value:w})=>w===v).label}`,y}default:{const{cycle:m,factor:_,score:b}=g;let C="";return C+=` ${e.config.cycleOptions.find(({value:v})=>v===m).label}`,C+=` ${e.config.factorOptions.find(({value:v})=>v===_).label}`,C+=` ${b[0]||b[0]===0?`${b[0]}分`:"∞"}`,C+=" ~",C+=` ${b[1]||b[1]===0?`${b[1]}分`:"∞"}`,C}}},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)=>{const _=Ebe,b=Uw,C=M1,v=ci,y=Pu,w=lg,S=ag,x=GF,D=rS,N=$w,E=I8,k=Kp,L=KF,I=ng;return h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createElementVNode("div",Vbt,[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]=F=>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,(F,R)=>(h.openBlock(),h.createBlock(b,{closable:"",type:"info",onClose:M=>p("factorTag",R)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(f(F)),1)]),_:2},1032,["onClose"]))),256)):h.createCommentVNode("",!0),h.createVNode(C,{class:"screen-btn",type:"primary",plain:"",size:"small",icon:h.unref(b8),onClick:a},{default:h.withCtx(()=>[h.createTextVNode(" 添加因子 ")]),_:1},8,["icon"])]),h.createVNode(I,{modelValue:i.value,"onUpdate:modelValue":m[5]||(m[5]=F=>i.value=F),width:"602","align-center":"","destroy-on-close":""},{header:h.withCtx(({titleId:F,titleClass:R})=>[h.createElementVNode("div",zbt,[h.createElementVNode("span",{id:F,class:h.normalizeClass(R)}," 因子筛选 ",10,Hbt),h.createVNode(y,{effect:"dark",content:"点击查看: 因子使用说明",placement:"right"},{default:h.withCtx(()=>[h.createVNode(v,{onClick:m[1]||(m[1]=M=>r.value=!0)},{default:h.withCtx(()=>[h.createVNode(h.unref(fw))]),_:1})]),_:1})])]),footer:h.withCtx(()=>[h.createElementVNode("div",Kbt,[h.createVNode(C,{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,(F,R)=>(h.openBlock(),h.createElementBlock("div",Wbt,[h.createElementVNode("span",$bt,h.toDisplayString(`条件${R+1}`),1),F.key==="compare"?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[n.config.cycleShow?(h.openBlock(),h.createBlock(x,{key:0,prop:"list."+R+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:F.cycle,"onUpdate:modelValue":M=>F.cycle=M,placeholder:"选择周期",size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.cycleOptions,({label:M,value:A})=>(h.openBlock(),h.createBlock(w,{label:M,value:A,key:A},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):h.createCommentVNode("",!0),h.createVNode(x,{prop:"list."+R+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:F.factor,"onUpdate:modelValue":M=>F.factor=M,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.factorOptions,({label:M,value:A})=>(h.openBlock(),h.createBlock(w,{label:M,value:A,key:A},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:F.compareType,"onUpdate:modelValue":M=>F.compareType=M,size:"small"},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList([">",">=","<","<="],M=>h.createVNode(w,{label:M,value:M,key:M},null,8,["label","value"])),64))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024),n.config.cycleShow?(h.openBlock(),h.createBlock(x,{key:1,prop:"list."+R+".cycle2",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:F.cycle2,"onUpdate:modelValue":M=>F.cycle2=M,placeholder:"选择周期",size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.cycleOptions,({label:M,value:A})=>(h.openBlock(),h.createBlock(w,{label:M,value:A,key:A},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):h.createCommentVNode("",!0),h.createVNode(x,{prop:"list."+R+".factor2",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:F.factor2,"onUpdate:modelValue":M=>F.factor2=M,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.factorOptions,({label:M,value:A})=>(h.openBlock(),h.createBlock(w,{label:M,value:A,key:A},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."+R+".cycle",rules:{required:!0,message:"周期不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:F.cycle,"onUpdate:modelValue":M=>F.cycle=M,placeholder:"选择周期",size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.cycleOptions,({label:M,value:A})=>(h.openBlock(),h.createBlock(w,{label:M,value:A,key:A},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):h.createCommentVNode("",!0),h.createVNode(x,{prop:"list."+R+".factor",rules:{required:!0,message:"因子不能为空",trigger:"blur"},style:{width:"100px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createVNode(S,{modelValue:F.factor,"onUpdate:modelValue":M=>F.factor=M,placeholder:"选择因子",filterable:"",size:"small","no-match-text":"无匹配数据"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.config.factorOptions,({label:M,value:A})=>(h.openBlock(),h.createBlock(w,{label:M,value:A,key:A},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),h.createVNode(x,{prop:"list."+R+".score",rules:{validator:h.unref(Fbt),trigger:"blur"},style:{width:"200px","margin-right":"10px"}},{default:h.withCtx(()=>[h.createElementVNode("div",jbt,[h.createVNode(D,{modelValue:F.score[0],"onUpdate:modelValue":M=>F.score[0]=M,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"]),Ubt,h.createVNode(D,{modelValue:F.score[1],"onUpdate:modelValue":M=>F.score[1]=M,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"])])]),_:2},1032,["prop","rules"])],64)),h.createVNode(v,{onClick:M=>u(R)},{default:h.withCtx(()=>[h.createVNode(h.unref(dw))]),_:2},1032,["onClick"])]))),256)),h.createVNode(C,{type:"primary",plain:"",size:"small",icon:h.unref(b8),onClick:c,style:{"margin-bottom":"10px"}},{default:h.withCtx(()=>[h.createTextVNode("添加因子")]),_:1},8,["icon"]),h.createVNode(C,{type:"primary",plain:"",size:"small",icon:h.unref(b8),onClick:m[2]||(m[2]=F=>c("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(E,{modelValue:s.value.sqlEnable,"onUpdate:modelValue":m[3]||(m[3]=F=>s.value.sqlEnable=F)},{default:h.withCtx(()=>[h.createVNode(N,{label:"关闭",value:0}),h.createVNode(N,{label:"启用",value:1})]),_:1},8,["modelValue"]),s.value.sqlEnable?(h.openBlock(),h.createBlock(C,{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(k,{modelValue:s.value.sqlValue,"onUpdate:modelValue":m[4]||(m[4]=F=>s.value.sqlValue=F),autosize:{minRows:4},type:"textarea",style:{"margin-bottom":"10px"}},null,8,["modelValue"]),qbt],64)):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["modelValue"])]),h.createVNode(Bbt,{visible:r.value,"onUpdate:visible":m[6]||(m[6]=F=>r.value=F),data:n.config.factorDescriptions},null,8,["visible","data"])],64)}}},[["__scopeId","data-v-3cac46e2"]]),awt="",IC=n=>(h.pushScopeId("data-v-bdb03941"),n=n(),h.popScopeId(),n),Ybt={key:0,class:"common-indicator"},Qbt={class:"indicator"},Zbt=IC(()=>h.createElementVNode("div",{class:"title"},[h.createElementVNode("span",null,"常用指标: "),h.createElementVNode("span",null,"不限")],-1)),Xbt={class:"options"},Jbt=["onClick"],e_t={class:"tags"},t_t=["onClick"],n_t={style:{"font-size":"18px"}},i_t={key:0,class:"out-box"},r_t=IC(()=>h.createElementVNode("span",null,"自定义: ",-1)),o_t={key:0,class:"convenient-option-box"},s_t={class:"out-box"},a_t=IC(()=>h.createElementVNode("span",null,"自定义: ",-1)),l_t={key:0},u_t={key:0},c_t={key:0},d_t={key:1},h_t={class:"tFeaturelncomes-option-box"},f_t={class:"tFeaturelncomes-out-box"},p_t=IC(()=>h.createElementVNode("span",null,"自定义: ",-1)),g_t={key:2},m_t={key:3},b_t={key:4},__t={class:"dialog-footer"},v_t=Yi({__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=h.useModel(n,"data"),t=n,i=h.ref(!1),r=h.computed(()=>{var g;return(g=t.data.find(m=>m.radioType==="1"))==null?void 0:g.key}),o=h.computed(()=>{let g=[];return t.varietyMarket===null&&!t.commonOption.length?g=t.config.options:(g=t.config.options,t.varietyMarket&&(g=g.filter(({parent:m})=>m.varietyMarketIds.includes(t.varietyMarket))),t.commonOption.length&&(g=g.filter(({parent:m})=>{const{commonOptionIds:_}=m;return[...new Set([..._,...t.commonOption])].length!==[..._,...t.commonOption].length}))),g}),s=h.ref({}),a=h.ref({}),l=g=>{s.value=g;const m={key:g.key,type:g.type,label:g.label};switch(g.key){case"st":{a.value={...m,st:null};break}case"tFeaturelncomes":{a.value={...m,rule:1,withFewYears:null,yearsCount:null,netProfit:null};break}case"priceLevels":{a.value={...m,priceLevels:null};break}case"peTtmLevels":{a.value={...m,peTtmLevels:null};break}case"optionsCpType":{a.value={...m,optionsCpType:null};break}default:a.value={...m,range:[null,null],unit:g.defaultUnit.length?[...g.defaultUnit]:[null,null],radioType:r.value&&r.value!==g.key?"0":g.defaultRadioType,rankRange:g.defaultRankRange||[null,null]}}i.value=!0},u=()=>{switch(a.value.key){case"st":{const{label:m,st:_}=a.value;if(_===null)return Ml.warning("格式错误: 请至少选择一个值");a.value.tagText=`${m}: ${_?"是":"否"}`;break}case"tFeaturelncomes":{const{label:m,rule:_,withFewYears:b,yearsCount:C,netProfit:v}=a.value;if(["",null].includes(b)||["",null].includes(C)||["",null].includes(v))return Ml.warning("格式错误: 请填写完整");a.value.tagText=`${m}: ${b}年内${C}年以上盈利${_===1?"超":"跌"}过${v}亿`;break}case"priceLevels":{const{label:m,priceLevels:_}=a.value;if(!_||_.length===0)return Ml.warning("格式错误: 请至少选择一个值");a.value.tagText=`${m}: 已选${_}分位`;break}case"peTtmLevels":{const{label:m,peTtmLevels:_}=a.value;if(!_||_.length===0)return Ml.warning("格式错误: 请至少选择一个值");a.value.tagText=`${m}: 已选${_}分位`;break}case"optionsCpType":{const{label:m,optionsCpType:_}=a.value;if(_===null)return Ml.warning("格式错误: 请至少选择一个值");a.value.tagText=`${m}: ${_===1?"看涨":"看跌"}`;break}default:{const{label:m,unit:_,radioType:b}=a.value,C=b==="1"?a.value.rankRange:a.value.range;if(["",null].includes(C[0])&&["",null].includes(C[1]))return Ml.warning("格式错误: 请至少填写一个值");if(b==="1"){const w=Number(C[0]),S=Number(C[1]);if(isNaN(w)||isNaN(S))return Ml.warning("格式错误: 请填写数字");if(w<0||S<0)return Ml.warning("格式错误: 请填写大于0的数字");if(w>S)return Ml.warning("格式错误: 请填写正确的排名范围")}const v=b==="1"?"":_[0]??"",y=b==="1"?"":_[1]??"";!["",null].includes(C[0])&&!["",null].includes(C[1])?a.value.tagText=`${m}${b==="1"?"排名":""}: ${C[0]}${v} ~ ${C[1]}${y}`:["",null].includes(C[0])?a.value.tagText=`${m}${b==="1"?"排名":""}: ≤${C[1]}${y}`:a.value.tagText=`${m}${b==="1"?"排名":""}: ≥${C[0]}${v}`}}const g=e.value.findIndex(({key:m})=>m===a.value.key);g===-1?e.value.push(a.value):e.value.splice(g,1,a.value),i.value=!1},c=g=>{s.value=o.value.find(({key:m})=>m===g.key),a.value=JSON.parse(JSON.stringify(g)),i.value=!0},d=g=>{e.value.splice(g,1)},f=g=>{a.value.range=[...g.range],a.value.unit=[...g.unit]},p=g=>{switch(g){case"≤0":Object.assign(a.value,{rule:2,withFewYears:1,yearsCount:1,netProfit:0});break;case"≥0":Object.assign(a.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:0});break;case"五年内有四年以上盈利超过5千万":Object.assign(a.value,{rule:1,withFewYears:5,yearsCount:4,netProfit:.5});break;case"≥10亿":Object.assign(a.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:10});break;case"≥20亿":Object.assign(a.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:20});break}};return h.watch(()=>o.value,()=>{e.value.length&&(e.value=e.value.filter(({key:g})=>o.value.find(m=>m.key===g)))}),(g,m)=>{const _=Uw,b=wF,C=I8,v=Kp,y=M1,w=lg,S=ag,x=$w,D=rS,N=ng;return n.config.show&&o.value.length?(h.openBlock(),h.createElementBlock("div",Ybt,[h.createElementVNode("div",Qbt,[Zbt,h.createElementVNode("div",Xbt,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value,E=>(h.openBlock(),h.createElementBlock("span",{key:E.key,onClick:k=>l(E)},h.toDisplayString(E.label),9,Jbt))),128))])]),h.createElementVNode("div",e_t,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(e.value,(E,k)=>(h.openBlock(),h.createBlock(_,{closable:"",type:"info",onClose:L=>d(k)},{default:h.withCtx(()=>[h.createElementVNode("span",null,h.toDisplayString(E.tagText),1),h.createElementVNode("span",{class:"edit",onClick:L=>c(E)},"编辑",8,t_t)]),_:2},1032,["onClose"]))),256))]),h.createVNode(N,{modelValue:i.value,"onUpdate:modelValue":m[19]||(m[19]=E=>i.value=E),title:s.value.label,width:"600","align-center":"","destroy-on-close":""},h.createSlots({footer:h.withCtx(()=>[h.createElementVNode("div",__t,[h.createVNode(y,{type:"primary",onClick:u},{default:h.withCtx(()=>[h.createTextVNode("确定")]),_:1})])]),default:h.withCtx(()=>[s.value.type===void 0&&a.value.radioType==="1"?(h.openBlock(),h.createElementBlock("div",i_t,[r_t,h.createVNode(v,{modelValue:a.value.rankRange[0],"onUpdate:modelValue":m[1]||(m[1]=E=>a.value.rankRange[0]=E),style:{flex:"1"}},null,8,["modelValue"]),h.createTextVNode(" ~ "),h.createVNode(v,{modelValue:a.value.rankRange[1],"onUpdate:modelValue":m[2]||(m[2]=E=>a.value.rankRange[1]=E),style:{flex:"1"}},null,8,["modelValue"])])):s.value.type===void 0?(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[s.value.convenientOptions.length?(h.openBlock(),h.createElementBlock("div",o_t,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value.convenientOptions,E=>(h.openBlock(),h.createBlock(y,{key:E.text,onClick:k=>f(E)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(E.text),1)]),_:2},1032,["onClick"]))),128))])):h.createCommentVNode("",!0),h.createElementVNode("div",s_t,[a_t,h.createVNode(v,{modelValue:a.value.range[0],"onUpdate:modelValue":m[4]||(m[4]=E=>a.value.range[0]=E),style:{flex:"1"}},h.createSlots({_:2},[s.value.unitOptions.length?{name:"append",fn:h.withCtx(()=>[s.value.unitOptions.length===1?(h.openBlock(),h.createElementBlock("span",l_t,h.toDisplayString(a.value.unit[0]),1)):(h.openBlock(),h.createBlock(S,{key:1,modelValue:a.value.unit[0],"onUpdate:modelValue":m[3]||(m[3]=E=>a.value.unit[0]=E),style:{width:"72px"}},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value.unitOptions,E=>(h.openBlock(),h.createBlock(w,{label:E,value:E},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"]),h.createTextVNode(" ~ "),h.createVNode(v,{modelValue:a.value.range[1],"onUpdate:modelValue":m[6]||(m[6]=E=>a.value.range[1]=E),style:{flex:"1"}},h.createSlots({_:2},[s.value.unitOptions.length?{name:"append",fn:h.withCtx(()=>[s.value.unitOptions.length===1?(h.openBlock(),h.createElementBlock("span",u_t,h.toDisplayString(a.value.unit[1]),1)):(h.openBlock(),h.createBlock(S,{key:1,modelValue:a.value.unit[1],"onUpdate:modelValue":m[5]||(m[5]=E=>a.value.unit[1]=E),style:{width:"72px"}},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value.unitOptions,E=>(h.openBlock(),h.createBlock(w,{label:E,value:E},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"])])],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:2},[s.value.key==="st"?(h.openBlock(),h.createElementBlock("div",c_t,[h.createVNode(C,{modelValue:a.value.st,"onUpdate:modelValue":m[7]||(m[7]=E=>a.value.st=E)},{default:h.withCtx(()=>[h.createVNode(x,{label:"是",value:1}),h.createVNode(x,{label:"否",value:0})]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),s.value.key==="tFeaturelncomes"?(h.openBlock(),h.createElementBlock("div",d_t,[h.createElementVNode("div",h_t,[h.createVNode(y,{onClick:m[8]||(m[8]=E=>p("≤0"))},{default:h.withCtx(()=>[h.createTextVNode("≤0")]),_:1}),h.createVNode(y,{onClick:m[9]||(m[9]=E=>p("≥0"))},{default:h.withCtx(()=>[h.createTextVNode("≥0")]),_:1}),h.createVNode(y,{onClick:m[10]||(m[10]=E=>p("五年内有四年以上盈利超过5千万"))},{default:h.withCtx(()=>[h.createTextVNode("五年内有四年以上盈利超过5千万")]),_:1}),h.createVNode(y,{onClick:m[11]||(m[11]=E=>p("≥10亿"))},{default:h.withCtx(()=>[h.createTextVNode("≥10亿")]),_:1}),h.createVNode(y,{onClick:m[12]||(m[12]=E=>p("≥20亿"))},{default:h.withCtx(()=>[h.createTextVNode("≥20亿")]),_:1})]),h.createElementVNode("div",f_t,[p_t,h.createElementVNode("div",null,[h.createVNode(D,{modelValue:a.value.withFewYears,"onUpdate:modelValue":m[13]||(m[13]=E=>a.value.withFewYears=E),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 年内 "),h.createVNode(D,{modelValue:a.value.yearsCount,"onUpdate:modelValue":m[14]||(m[14]=E=>a.value.yearsCount=E),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 年以上盈利"+h.toDisplayString(a.value.rule===1?"超":"跌")+"过 ",1),h.createVNode(D,{modelValue:a.value.netProfit,"onUpdate:modelValue":m[15]||(m[15]=E=>a.value.netProfit=E),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 亿 ")])])])):h.createCommentVNode("",!0),s.value.key==="priceLevels"?(h.openBlock(),h.createElementBlock("div",g_t,[h.createVNode(S,{modelValue:a.value.priceLevels,"onUpdate:modelValue":m[16]||(m[16]=E=>a.value.priceLevels=E),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList([1,2,3,4,5],E=>h.createVNode(w,{key:E,label:`${E}分位`,value:E},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),s.value.key==="peTtmLevels"?(h.openBlock(),h.createElementBlock("div",m_t,[h.createVNode(S,{modelValue:a.value.peTtmLevels,"onUpdate:modelValue":m[17]||(m[17]=E=>a.value.peTtmLevels=E),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],E=>h.createVNode(w,{key:E,label:`${E}分位`,value:E},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),s.value.key==="optionsCpType"?(h.openBlock(),h.createElementBlock("div",b_t,[h.createVNode(C,{modelValue:a.value.optionsCpType,"onUpdate:modelValue":m[18]||(m[18]=E=>a.value.optionsCpType=E)},{default:h.withCtx(()=>[h.createVNode(x,{label:"看涨",value:1}),h.createVNode(x,{label:"看跌",value:2})]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0)],64))]),_:2},[s.value.showRankType?{name:"header",fn:h.withCtx(()=>[h.createElementVNode("span",n_t,h.toDisplayString(s.value.label),1),h.createVNode(C,{modelValue:a.value.radioType,"onUpdate:modelValue":m[0]||(m[0]=E=>a.value.radioType=E),style:{"vertical-align":"4px","margin-left":"12px"}},{default:h.withCtx(()=>[h.createVNode(b,{label:"数值",value:"0"}),h.createVNode(b,{disabled:r.value&&r.value!==s.value.key,label:"排名",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"0"}:void 0]),1032,["modelValue","title"])])):h.createCommentVNode("",!0)}}},[["__scopeId","data-v-bdb03941"]]),uwt="",G9=n=>(h.pushScopeId("data-v-1a808f17"),n=n(),h.popScopeId(),n),y_t={class:"variety-search"},C_t={key:0,class:"variety-search-row"},w_t={class:"title"},S_t=G9(()=>h.createElementVNode("span",null,"品种市场: ",-1)),x_t={key:1,class:"variety-search-row"},D_t={class:"title"},N_t=G9(()=>h.createElementVNode("span",null,"常用选项: ",-1)),E_t={key:2,class:"variety-search-row"},L_t={class:"title"},k_t=G9(()=>h.createElementVNode("span",null,"上市板块: ",-1)),T_t={key:3,class:"variety-search-row"},A_t={class:"title"},M_t=G9(()=>h.createElementVNode("span",null,"自定标签: ",-1)),I_t={key:4,class:"variety-search-row"},R_t={class:"title"},O_t=G9(()=>h.createElementVNode("span",null,"因子筛选: ",-1)),P_t=Yi({__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:[],factorScreen:{list:[],sqlEnable:0,sqlValue:null},commonIndicator:[]});const r=h.computed(()=>{const c={};return Object.keys($1e).forEach(d=>{const f=$1e[d],p=t.config[d]??{},g={...f,...p};c[d]=g}),c}),o=h.computed(()=>r.value.varietyMarket.options),s=h.computed(()=>{const{varietyMarket:c}=i.value;if(c){const d=o.value.find(({value:f})=>f===c).memo;return r.value.commonOption.options.filter(({value:f})=>d.includes(f))}else return r.value.commonOption.options}),a=h.computed(()=>{const{varietyMarket:c}=i.value;return c?r.value.marketIds.options.filter(d=>d.varietyMarketIds.includes(c)):r.value.marketIds.options}),l=h.computed(()=>r.value.customTag.options),u=c=>{["commonOption","marketIds","customTag","factorScreen","commonIndicator"].includes(c)?i.value[c]=[]:i.value[c]=null};return h.watch(()=>s.value,c=>{var d;(d=i.value.commonOption)!=null&&d.length&&(i.value.commonOption=i.value.commonOption.filter(f=>c.find(({value:p})=>p===f)))}),h.watch(()=>a.value,c=>{var d;(d=i.value.marketIds)!=null&&d.length&&(i.value.marketIds=i.value.marketIds.filter(f=>c.find(({value:p})=>p===f)))}),e({formatData:c=>{var f,p,g,m,_;console.log("%c[st-varietySearch]: 正在生成接口传参结构的数据...","color: tomato");const d={};if(c.varietyMarket&&(d.exchangeId=String(c.varietyMarket)),(f=c.commonOption)!=null&&f.length&&(d.optionId=c.commonOption.join(",")),(p=c.marketIds)!=null&&p.length&&(d.marketIds=c.marketIds),(g=c.customTag)!=null&&g.length&&(d.tagIds=c.customTag),(m=r.value.factorScreen)!=null&&m.show){const{factorScreen:b}=c;if((_=b==null?void 0:b.list)!=null&&_.length&&(d.tbFeatureFactorScores=b.list.map(C=>{switch(C.key){case"compare":return{freqId:C.cycle,factorId:C.factor,compareType:C.compareType,freqId2:C.cycle2,factorId2:C.factor2};default:return{freqId:C.cycle,factorId:C.factor,startScore:C.score[0],endScore:C.score[1]}}})),b.sqlEnable){const C=b.list.reduce((y,w,S)=>{var D,N;const x=`条件${S+1}`;switch(w.key){case"compare":{let E="";(D=r.value.factorScreen)!=null&&D.cycleShow?E=`freq_id = ${w.cycle} and factor_id = ${w.factor} ${w.compareType} freq_id = ${w.cycle2} and factor_id = ${w.factor2}`:E=`factor_id = ${w.factor} ${w.compareType} factor_id = ${w.factor2}`,y.set(x,`(${E})`);break}default:{let E=`factor_id = ${w.factor} and `;(N=r.value.factorScreen)!=null&&N.cycleShow&&(E=`freq_id = ${w.cycle} and factor_id = ${w.factor} and `),(w.score[0]||w.score[0]===0)&&(w.score[1]||w.score[1]===0)?E+=`score >= ${w.score[0]} and score <= ${w.score[1]}`:w.score[0]||w.score[0]===0?E+=`score >= ${w.score[0]}`:(w.score[1]||w.score[1]===0)&&(E+=`score <= ${w.score[1]}`),y.set(x,`(${E})`)}}return y},new Map([]));let v=b.sqlValue;for(const[y,w]of C){const S=new RegExp(y,"g");v=v.replace(S,w)}d.sql=v}d.enableSql=b.sqlEnable===1?2:1}{const b=["expireDays","virtualRealDegree","yearProfitRate","impliedVolatility","levelMultiplier","turnover","volume","openInterest","optionsCpType","optionGear"],C=c.commonIndicator.reduce((D,N)=>{const{key:E,type:k,range:L,unit:I,radioType:F,rankRange:R}=N;if(F==="1")d.sortBy={column:N.key,start:R[0]||null,end:R[1]||null};else if(E==="dividendYield"){let[M,A]=L;["",null].includes(M)||(M=M/100),["",null].includes(A)||(A=A/100),D.push({column:N.key,start:M,end:A})}else if(k===void 0&&!b.includes(E)){let[M,A]=L;if(!["",null].includes(M))switch(I[0]){case"亿":M=M*1e8;break;case"千万":M=M*1e7;break;default:M=M;break}if(!["",null].includes(A))switch(I[1]){case"亿":A=A*1e8;break;case"千万":A=A*1e7;break;default:A=A;break}D.push({column:N.key,start:M,end:A})}return D},[]);C.length&&(d.query=C);const v=c.commonIndicator.find(({key:D})=>D==="st");v&&(d.st=v.st);const y=c.commonIndicator.find(({key:D})=>D==="tFeaturelncomes");y&&(d.netProfitQueryDto={...y,netProfit:y.netProfit*1e8});const w=c.commonIndicator.find(({key:D})=>D==="priceLevels");w&&(d.priceLevels=w.priceLevels);const S=c.commonIndicator.find(({key:D})=>D==="peTtmLevels");S&&(d.peTtmLevels=S.peTtmLevels);const x={};c.commonIndicator.forEach(D=>{const{key:N}=D;switch(N){case"expireDays":["",null].includes(D.range[0])||(x.minExpireDays=D.range[0]),["",null].includes(D.range[1])||(x.maxExpireDays=D.range[1]);break;case"virtualRealDegree":["",null].includes(D.range[0])||(x.minVirtualRealDegree=D.range[0]/100),["",null].includes(D.range[1])||(x.maxVirtualRealDegree=D.range[1]/100);break;case"yearProfitRate":["",null].includes(D.range[0])||(x.minYearProfitRate=D.range[0]/100),["",null].includes(D.range[1])||(x.maxYearProfitRate=D.range[1]/100);break;case"impliedVolatility":["",null].includes(D.range[0])||(x.minImpliedVolatility=D.range[0]/100),["",null].includes(D.range[1])||(x.maxImpliedVolatility=D.range[1]/100);break;case"levelMultiplier":["",null].includes(D.range[0])||(x.minLevelMultiplier=D.range[0]),["",null].includes(D.range[1])||(x.maxLevelMultiplier=D.range[1]);break;case"turnover":["",null].includes(D.range[0])||(x.minTurnover=D.range[0]*1e4),["",null].includes(D.range[1])||(x.maxTurnover=D.range[1]*1e4);break;case"volume":["",null].includes(D.range[0])||(x.minVolume=D.range[0]),["",null].includes(D.range[1])||(x.maxVolume=D.range[1]);break;case"openInterest":["",null].includes(D.range[0])||(x.minOpenInterest=D.range[0]),["",null].includes(D.range[1])||(x.maxOpenInterest=D.range[1]);break;case"optionsCpType":x.optionsCpType=D.optionsCpType;break;case"optionGear":["",null].includes(D.range[0])||(x.minOptionGear=D.range[0]),["",null].includes(D.range[1])||(x.maxOptionGear=D.range[1]);break}}),Object.keys(x).length&&(d.searchOptionDto={...d.searchOptionDto,...x})}return console.log("%c[st-varietySearch]: 接口传参数据生成完毕","color: green",d),d},reset:()=>{i.value={varietyMarket:null,commonOption:[],marketIds:[],customTag:[],factorScreen:{list:[],sqlEnable:0,sqlValue:null},commonIndicator:[]}}}),(c,d)=>{var _,b,C,v,y;const f=$w,p=I8,g=od,m=gF;return h.openBlock(),h.createElementBlock("div",y_t,[(_=r.value.varietyMarket)!=null&&_.show?(h.openBlock(),h.createElementBlock("div",C_t,[h.createElementVNode("div",w_t,[S_t,h.createElementVNode("span",{onClick:d[0]||(d[0]=w=>u("varietyMarket"))},"不限")]),h.createVNode(p,{modelValue:i.value.varietyMarket,"onUpdate:modelValue":d[1]||(d[1]=w=>i.value.varietyMarket=w),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value,({label:w,value:S})=>(h.openBlock(),h.createBlock(f,{label:w,value:S,key:S},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),(b=r.value.commonOption)!=null&&b.show&&s.value.length?(h.openBlock(),h.createElementBlock("div",x_t,[h.createElementVNode("div",D_t,[N_t,h.createElementVNode("span",{onClick:d[2]||(d[2]=w=>u("commonOption"))},"不限")]),h.createVNode(m,{modelValue:i.value.commonOption,"onUpdate:modelValue":d[3]||(d[3]=w=>i.value.commonOption=w),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value,({label:w,value:S})=>(h.openBlock(),h.createBlock(g,{label:w,value:S,key:S},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",E_t,[h.createElementVNode("div",L_t,[k_t,h.createElementVNode("span",{onClick:d[4]||(d[4]=w=>u("marketIds"))},"不限")]),h.createVNode(m,{modelValue:i.value.marketIds,"onUpdate:modelValue":d[5]||(d[5]=w=>i.value.marketIds=w),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(a.value,({label:w,value:S})=>(h.openBlock(),h.createBlock(g,{label:w,value:S,key:S},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),(v=r.value.customTag)!=null&&v.show&&l.value.length?(h.openBlock(),h.createElementBlock("div",T_t,[h.createElementVNode("div",A_t,[M_t,h.createElementVNode("span",{onClick:d[6]||(d[6]=w=>u("customTag"))},"不限")]),h.createVNode(m,{modelValue:i.value.customTag,"onUpdate:modelValue":d[7]||(d[7]=w=>i.value.customTag=w),size:"small"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(l.value,({label:w,value:S})=>(h.openBlock(),h.createBlock(g,{label:w,value:S,key:S},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),(y=r.value.factorScreen)!=null&&y.show?(h.openBlock(),h.createElementBlock("div",I_t,[h.createElementVNode("div",R_t,[O_t,h.createElementVNode("span",{onClick:d[8]||(d[8]=w=>u("factorScreen"))},"不限")]),h.createVNode(Gbt,{data:i.value.factorScreen,"onUpdate:data":d[9]||(d[9]=w=>i.value.factorScreen=w),config:r.value.factorScreen},null,8,["data","config"])])):h.createCommentVNode("",!0),h.createVNode(v_t,{data:i.value.commonIndicator,"onUpdate:data":d[10]||(d[10]=w=>i.value.commonIndicator=w),varietyMarket:i.value.varietyMarket,commonOption:i.value.commonOption,config:r.value.commonIndicator},null,8,["data","varietyMarket","commonOption","config"])])}}},[["__scopeId","data-v-1a808f17"]]),F_t={install(n){n.component("st-varietySearch",P_t)}},dwt="",hwt="",fwt="",B_t={key:0,class:"footer-box"},V_t={__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,u=null;const c=h.useModel(n,"tableActiveData"),d=h.computed(()=>c.value.map(b=>b[r.value.tableActiveKey])),f=({rowData:b,rowIndex:C})=>{const{tableActiveNum:v,tableActiveKey:y}=r.value;if(d.value.includes(b[y]))return;const w=Math.floor(C/v)*v,S=w+v;c.value=i.tableData.slice(w,S)},p=({code:b})=>{const{tableData:C}=i,{tableActiveNum:v,tableActiveKey:y,pageUpDownEnabled:w}=r.value;if(!C.length||!w)return;const S=C.findIndex(E=>E[y]===d.value.at(0)),x=C.findIndex(E=>E[y]===d.value.at(-1));let D=null,N=null;switch(b){case"PageUp":if(S===0)return;D=S-v>0?S-v:0,N=D+v-1,c.value=C.slice(D,N+1),m(D,"PageUp");break;case"PageDown":if(x===C.length-1)return;D=S+v,N=D+v-1,c.value=C.slice(D,N+1),m(N,"PageDown");break}},g=b=>{l||(a===b.scrollLeft&&b.yAxisScrollDir==="backward"&&(s.value=0),a=b.scrollLeft)},m=(b,C)=>{b!==null&&(clearTimeout(u),l=!0,C==="PageUp"?s.value=0:b>=i.tableData.length-1&&(s.value=30,t("touchBottom")),h.nextTick(()=>{o.value.scrollToRow(b),o.value.scrollToLeft(a),u=setTimeout(()=>{l=!1},500)}))},_=({rowData:b})=>{if(!c.value.length)return;let C="";const{tableActiveKey:v}=r.value;return b[v]===d.value[0]&&(C+=" virtual-table-active-start"),d.value.includes(b[v])&&(C+=" virtual-table-active-row"),b[v]===d.value[d.value.length-1]&&(C+=" virtual-table-active-end"),C};return h.onMounted(()=>{window.addEventListener("keydown",p)}),h.watch(()=>i.tableLoading,b=>{b||(s.value=0)}),h.onUnmounted(()=>{window.removeEventListener("keydown",p)}),(b,C)=>{const v=Zw,y=M1,w=qme,S=Cbe,x=wbe;return h.openBlock(),h.createBlock(x,null,{default:h.withCtx(({height:D,width:N})=>[h.createVNode(S,{ref_key:"tableRef",ref:o,id:"virtualTable",fixed:"",data:n.tableData,columns:n.tableColumn,width:N,height:D,"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:C[0]||(C[0]=E=>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",B_t,[n.tableLoading==="more"?(h.openBlock(),h.createBlock(w,{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(w,{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})}}},pwt="",z_t=Yi(V_t,[["__scopeId","data-v-7e702a8a"]]),H_t={install(n){n.component("st-virtualTable",z_t)}},W_t={install(n){Kbe.install(n),Zbe.install(n),u_e.install(n),h_e.install(n),Dit.install(n),Vit.install(n),Kit.install(n),Zit.install(n),_bt.install(n),Cbt.install(n),xbt.install(n),Ebt.install(n),Tbt.install(n),Pbt.install(n),F_t.install(n),H_t.install(n)}};/*!-----------------------------------------------------------------------------
813
813
  * Copyright (c) Microsoft Corporation. All rights reserved.
814
814
  * Version: 0.47.0(69991d66135e4a1fc1cf0b1ac4ad25d429866a0d)
815
815
  * Released under the MIT license
@@ -240805,7 +240805,7 @@ S_t({
240805
240805
  extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"],
240806
240806
  aliases: ["Python", "py"],
240807
240807
  firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
240808
- loader: () => import("./python-656f1fea.js")
240808
+ loader: () => import("./python-72fd599d.js")
240809
240809
  });
240810
240810
  const x_t = /* @__PURE__ */ Ve({
240811
240811
  __name: "index",
@@ -243136,7 +243136,7 @@ const AC = (n) => (ry("data-v-bdb03941"), n = n(), oy(), n), iyt = {
243136
243136
  };
243137
243137
  }
243138
243138
  }, Lyt = /* @__PURE__ */ Dr(Eyt, [["__scopeId", "data-v-bdb03941"]]);
243139
- const H8 = (n) => (ry("data-v-25e1c57e"), n = n(), oy(), n), Ayt = { class: "variety-search" }, Tyt = {
243139
+ const H8 = (n) => (ry("data-v-1a808f17"), n = n(), oy(), n), Ayt = { class: "variety-search" }, Tyt = {
243140
243140
  key: 0,
243141
243141
  class: "variety-search-row"
243142
243142
  }, kyt = { class: "title" }, Myt = /* @__PURE__ */ H8(() => /* @__PURE__ */ Re("span", null, "品种市场: ", -1)), Iyt = {
@@ -243265,16 +243265,11 @@ const H8 = (n) => (ry("data-v-25e1c57e"), n = n(), oy(), n), Ayt = { class: "var
243265
243265
  const m = ["expireDays", "virtualRealDegree", "yearProfitRate", "impliedVolatility", "levelMultiplier", "turnover", "volume", "openInterest", "optionsCpType", "optionGear"], y = c.commonIndicator.reduce((x, D) => {
243266
243266
  const { key: N, type: L, range: E, unit: M, radioType: P, rankRange: I } = D;
243267
243267
  if (P === "1")
243268
- m.includes(N) ? d.sortBy = {
243268
+ d.sortBy = {
243269
243269
  column: D.key,
243270
243270
  start: I[0] || null,
243271
243271
  end: I[1] || null
243272
- } : x.push({
243273
- column: D.key,
243274
- type: "1",
243275
- start: I[0] || null,
243276
- end: I[1] || null
243277
- });
243272
+ };
243278
243273
  else if (N === "dividendYield") {
243279
243274
  let [k, T] = E;
243280
243275
  ["", null].includes(k) || (k = k / 100), ["", null].includes(T) || (T = T / 100), x.push({
@@ -243503,7 +243498,7 @@ const H8 = (n) => (ry("data-v-25e1c57e"), n = n(), oy(), n), Ayt = { class: "var
243503
243498
  ]);
243504
243499
  };
243505
243500
  }
243506
- }, qyt = /* @__PURE__ */ Dr(Uyt, [["__scopeId", "data-v-25e1c57e"]]), Kyt = {
243501
+ }, qyt = /* @__PURE__ */ Dr(Uyt, [["__scopeId", "data-v-1a808f17"]]), Kyt = {
243507
243502
  install(n) {
243508
243503
  n.component("st-varietySearch", qyt);
243509
243504
  }
@@ -1,4 +1,4 @@
1
- import { m as a } from "./index-baf940eb.js";
1
+ import { m as a } from "./index-a981dd97.js";
2
2
  import "vue";
3
3
  import "echarts";
4
4
  /*!-----------------------------------------------------------------------------