st-comp 0.0.111 → 0.0.112

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-a506dbba.js";
1
+ import { i as m } from "./index-a301a9d6.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=A1,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 ad.error("SQL语句不能为空");const C=j1e(b),v=m.map((w,S)=>`条件${S+1}`),y=C.filter(w=>!v.includes(w));if(y.length)return ad.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=A1,v=ci,y=Ou,w=lg,S=ag,x=GF,N=rS,D=$w,k=I8,L=Kp,E=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(E,{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(N,{modelValue:F.score[0],"onUpdate:modelValue":M=>F.score[0]=M,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"]),Ubt,h.createVNode(N,{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(k,{modelValue:s.value.sqlEnable,"onUpdate:modelValue":m[3]||(m[3]=F=>s.value.sqlEnable=F)},{default:h.withCtx(()=>[h.createVNode(D,{label:"关闭",value:0}),h.createVNode(D,{label:"启用",value:1})]),_:1},8,["modelValue"]),s.value.sqlEnable?(h.openBlock(),h.createBlock(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(L,{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-7cb706a5"),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(()=>{let p=[];return t.varietyMarket===null&&!t.commonOption.length?p=t.config.options:(p=t.config.options,t.varietyMarket&&(p=p.filter(({parent:g})=>g.varietyMarketIds.includes(t.varietyMarket))),t.commonOption.length&&(p=p.filter(({parent:g})=>{const{commonOptionIds:m}=g;return[...new Set([...m,...t.commonOption])].length!==[...m,...t.commonOption].length}))),p}),o=h.ref({}),s=h.ref({}),a=p=>{o.value=p;const g={key:p.key,type:p.type,label:p.label};switch(p.key){case"st":{s.value={...g,st:null};break}case"tFeaturelncomes":{s.value={...g,rule:1,withFewYears:null,yearsCount:null,netProfit:null};break}case"priceLevels":{s.value={...g,priceLevels:null};break}case"peTtmLevels":{s.value={...g,peTtmLevels:null};break}case"optionsCpType":{s.value={...g,optionsCpType:null};break}default:s.value={...g,range:[null,null],unit:p.defaultUnit.length?[...p.defaultUnit]:[null,null],radioType:p.defaultRadioType,rankRange:p.defaultRankRange||[null,null]}}i.value=!0},l=()=>{switch(s.value.key){case"st":{const{label:g,st:m}=s.value;if(m===null)return ad.warning("格式错误: 请至少选择一个值");s.value.tagText=`${g}: ${m?"是":"否"}`;break}case"tFeaturelncomes":{const{label:g,rule:m,withFewYears:_,yearsCount:b,netProfit:C}=s.value;if(["",null].includes(_)||["",null].includes(b)||["",null].includes(C))return ad.warning("格式错误: 请填写完整");s.value.tagText=`${g}: ${_}年内${b}年以上盈利${m===1?"超":"跌"}过${C}亿`;break}case"priceLevels":{const{label:g,priceLevels:m}=s.value;if(!m||m.length===0)return ad.warning("格式错误: 请至少选择一个值");s.value.tagText=`${g}: 已选${m}分位`;break}case"peTtmLevels":{const{label:g,peTtmLevels:m}=s.value;if(!m||m.length===0)return ad.warning("格式错误: 请至少选择一个值");s.value.tagText=`${g}: 已选${m}分位`;break}case"optionsCpType":{const{label:g,optionsCpType:m}=s.value;if(m===null)return ad.warning("格式错误: 请至少选择一个值");s.value.tagText=`${g}: ${m===1?"看涨":"看跌"}`;break}default:{const{label:g,unit:m,radioType:_}=s.value,b=_==="1"?s.value.rankRange:s.value.range;if(["",null].includes(b[0])&&["",null].includes(b[1]))return ad.warning("格式错误: 请至少填写一个值");!["",null].includes(b[0])&&!["",null].includes(b[1])?s.value.tagText=`${g}${_==="1"?"排名":""}: ${b[0]}${m[0]??""} ~ ${b[1]}${m[1]??""}`:["",null].includes(b[0])?s.value.tagText=`${g}${_==="1"?"排名":""}: ≤${b[1]}${m[1]??""}`:s.value.tagText=`${g}${_==="1"?"排名":""}: ≥${b[0]}${m[0]??""}`}}const p=e.value.findIndex(({key:g})=>g===s.value.key);p===-1?e.value.push(s.value):e.value.splice(p,1,s.value),i.value=!1},u=p=>{o.value=r.value.find(({key:g})=>g===p.key),s.value=JSON.parse(JSON.stringify(p)),i.value=!0},c=p=>{e.value.splice(p,1)},d=p=>{s.value.range=[...p.range],s.value.unit=[...p.unit]},f=p=>{switch(p){case"≤0":Object.assign(s.value,{rule:2,withFewYears:1,yearsCount:1,netProfit:0});break;case"≥0":Object.assign(s.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:0});break;case"五年内有四年以上盈利超过5千万":Object.assign(s.value,{rule:1,withFewYears:5,yearsCount:4,netProfit:.5});break;case"≥10亿":Object.assign(s.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:10});break;case"≥20亿":Object.assign(s.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:20});break}};return h.watch(()=>r.value,()=>{e.value.length&&(e.value=e.value.filter(({key:p})=>r.value.find(g=>g.key===p)))}),(p,g)=>{const m=Uw,_=wF,b=I8,C=Kp,v=A1,y=lg,w=ag,S=$w,x=rS,N=ng;return n.config.show&&r.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(r.value,D=>(h.openBlock(),h.createElementBlock("span",{key:D.key,onClick:k=>a(D)},h.toDisplayString(D.label),9,Jbt))),128))])]),h.createElementVNode("div",e_t,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(e.value,(D,k)=>(h.openBlock(),h.createBlock(m,{closable:"",type:"info",onClose:L=>c(k)},{default:h.withCtx(()=>[h.createElementVNode("span",null,h.toDisplayString(D.tagText),1),h.createElementVNode("span",{class:"edit",onClick:L=>u(D)},"编辑",8,t_t)]),_:2},1032,["onClose"]))),256))]),h.createVNode(N,{modelValue:i.value,"onUpdate:modelValue":g[19]||(g[19]=D=>i.value=D),title:o.value.label,width:"600","align-center":"","destroy-on-close":""},h.createSlots({footer:h.withCtx(()=>[h.createElementVNode("div",__t,[h.createVNode(v,{type:"primary",onClick:l},{default:h.withCtx(()=>[h.createTextVNode("确定")]),_:1})])]),default:h.withCtx(()=>[o.value.type===void 0&&s.value.radioType==="1"?(h.openBlock(),h.createElementBlock("div",i_t,[r_t,h.createVNode(C,{modelValue:s.value.rankRange[0],"onUpdate:modelValue":g[1]||(g[1]=D=>s.value.rankRange[0]=D),style:{flex:"1"}},null,8,["modelValue"]),h.createTextVNode(" ~ "),h.createVNode(C,{modelValue:s.value.rankRange[1],"onUpdate:modelValue":g[2]||(g[2]=D=>s.value.rankRange[1]=D),style:{flex:"1"}},null,8,["modelValue"])])):o.value.type===void 0?(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[o.value.convenientOptions.length?(h.openBlock(),h.createElementBlock("div",o_t,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value.convenientOptions,D=>(h.openBlock(),h.createBlock(v,{key:D.text,onClick:k=>d(D)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(D.text),1)]),_:2},1032,["onClick"]))),128))])):h.createCommentVNode("",!0),h.createElementVNode("div",s_t,[a_t,h.createVNode(C,{modelValue:s.value.range[0],"onUpdate:modelValue":g[4]||(g[4]=D=>s.value.range[0]=D),style:{flex:"1"}},h.createSlots({_:2},[o.value.unitOptions.length?{name:"append",fn:h.withCtx(()=>[o.value.unitOptions.length===1?(h.openBlock(),h.createElementBlock("span",l_t,h.toDisplayString(s.value.unit[0]),1)):(h.openBlock(),h.createBlock(w,{key:1,modelValue:s.value.unit[0],"onUpdate:modelValue":g[3]||(g[3]=D=>s.value.unit[0]=D),style:{width:"72px"}},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value.unitOptions,D=>(h.openBlock(),h.createBlock(y,{label:D,value:D},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"]),h.createTextVNode(" ~ "),h.createVNode(C,{modelValue:s.value.range[1],"onUpdate:modelValue":g[6]||(g[6]=D=>s.value.range[1]=D),style:{flex:"1"}},h.createSlots({_:2},[o.value.unitOptions.length?{name:"append",fn:h.withCtx(()=>[o.value.unitOptions.length===1?(h.openBlock(),h.createElementBlock("span",u_t,h.toDisplayString(s.value.unit[1]),1)):(h.openBlock(),h.createBlock(w,{key:1,modelValue:s.value.unit[1],"onUpdate:modelValue":g[5]||(g[5]=D=>s.value.unit[1]=D),style:{width:"72px"}},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value.unitOptions,D=>(h.openBlock(),h.createBlock(y,{label:D,value:D},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"])])],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:2},[o.value.key==="st"?(h.openBlock(),h.createElementBlock("div",c_t,[h.createVNode(b,{modelValue:s.value.st,"onUpdate:modelValue":g[7]||(g[7]=D=>s.value.st=D)},{default:h.withCtx(()=>[h.createVNode(S,{label:"是",value:1}),h.createVNode(S,{label:"否",value:0})]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),o.value.key==="tFeaturelncomes"?(h.openBlock(),h.createElementBlock("div",d_t,[h.createElementVNode("div",h_t,[h.createVNode(v,{onClick:g[8]||(g[8]=D=>f("≤0"))},{default:h.withCtx(()=>[h.createTextVNode("≤0")]),_:1}),h.createVNode(v,{onClick:g[9]||(g[9]=D=>f("≥0"))},{default:h.withCtx(()=>[h.createTextVNode("≥0")]),_:1}),h.createVNode(v,{onClick:g[10]||(g[10]=D=>f("五年内有四年以上盈利超过5千万"))},{default:h.withCtx(()=>[h.createTextVNode("五年内有四年以上盈利超过5千万")]),_:1}),h.createVNode(v,{onClick:g[11]||(g[11]=D=>f("≥10亿"))},{default:h.withCtx(()=>[h.createTextVNode("≥10亿")]),_:1}),h.createVNode(v,{onClick:g[12]||(g[12]=D=>f("≥20亿"))},{default:h.withCtx(()=>[h.createTextVNode("≥20亿")]),_:1})]),h.createElementVNode("div",f_t,[p_t,h.createElementVNode("div",null,[h.createVNode(x,{modelValue:s.value.withFewYears,"onUpdate:modelValue":g[13]||(g[13]=D=>s.value.withFewYears=D),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 年内 "),h.createVNode(x,{modelValue:s.value.yearsCount,"onUpdate:modelValue":g[14]||(g[14]=D=>s.value.yearsCount=D),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 年以上盈利"+h.toDisplayString(s.value.rule===1?"超":"跌")+"过 ",1),h.createVNode(x,{modelValue:s.value.netProfit,"onUpdate:modelValue":g[15]||(g[15]=D=>s.value.netProfit=D),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 亿 ")])])])):h.createCommentVNode("",!0),o.value.key==="priceLevels"?(h.openBlock(),h.createElementBlock("div",g_t,[h.createVNode(w,{modelValue:s.value.priceLevels,"onUpdate:modelValue":g[16]||(g[16]=D=>s.value.priceLevels=D),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList([1,2,3,4,5],D=>h.createVNode(y,{key:D,label:`${D}分位`,value:D},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),o.value.key==="peTtmLevels"?(h.openBlock(),h.createElementBlock("div",m_t,[h.createVNode(w,{modelValue:s.value.peTtmLevels,"onUpdate:modelValue":g[17]||(g[17]=D=>s.value.peTtmLevels=D),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],D=>h.createVNode(y,{key:D,label:`${D}分位`,value:D},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),o.value.key==="optionsCpType"?(h.openBlock(),h.createElementBlock("div",b_t,[h.createVNode(b,{modelValue:s.value.optionsCpType,"onUpdate:modelValue":g[18]||(g[18]=D=>s.value.optionsCpType=D)},{default:h.withCtx(()=>[h.createVNode(S,{label:"看涨",value:1}),h.createVNode(S,{label:"看跌",value:2})]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0)],64))]),_:2},[o.value.showRankType?{name:"header",fn:h.withCtx(()=>[h.createElementVNode("span",n_t,h.toDisplayString(o.value.label),1),h.createVNode(b,{modelValue:s.value.radioType,"onUpdate:modelValue":g[0]||(g[0]=D=>s.value.radioType=D),style:{"vertical-align":"4px","margin-left":"12px"}},{default:h.withCtx(()=>[h.createVNode(_,{label:"数值",value:"0"}),h.createVNode(_,{label:"排名",value:"1"})]),_:1},8,["modelValue"])]),key:"0"}:void 0]),1032,["modelValue","title"])])):h.createCommentVNode("",!0)}}},[["__scopeId","data-v-7cb706a5"]]),uwt="",G9=n=>(h.pushScopeId("data-v-1be324b2"),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 N,D;const x=`条件${S+1}`;switch(w.key){case"compare":{let k="";(N=r.value.factorScreen)!=null&&N.cycleShow?k=`freq_id = ${w.cycle} and factor_id = ${w.factor} ${w.compareType} freq_id = ${w.cycle2} and factor_id = ${w.factor2}`:k=`factor_id = ${w.factor} ${w.compareType} factor_id = ${w.factor2}`,y.set(x,`(${k})`);break}default:{let k=`factor_id = ${w.factor} and `;(D=r.value.factorScreen)!=null&&D.cycleShow&&(k=`freq_id = ${w.cycle} and factor_id = ${w.factor} and `),(w.score[0]||w.score[0]===0)&&(w.score[1]||w.score[1]===0)?k+=`score >= ${w.score[0]} and score <= ${w.score[1]}`:w.score[0]||w.score[0]===0?k+=`score >= ${w.score[0]}`:(w.score[1]||w.score[1]===0)&&(k+=`score <= ${w.score[1]}`),y.set(x,`(${k})`)}}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=[],v=c.commonIndicator.reduce((D,k)=>{const{key:L,type:E,range:I,unit:F,radioType:R,rankRange:M}=k;if(R==="1")b.includes(L)?C.push({column:k.key,start:M[0]||null,end:M[1]||null}):D.push({column:k.key,type:"1",start:M[0]||null,end:M[1]||null});else if(L==="dividendYield"){let[A,V]=I;["",null].includes(A)||(A=A/100),["",null].includes(V)||(V=V/100),D.push({column:k.key,start:A,end:V})}else if(E===void 0&&!b.includes(L)){let[A,V]=I;if(!["",null].includes(A))switch(F[0]){case"亿":A=A*1e8;break;case"千万":A=A*1e7;break;default:A=A;break}if(!["",null].includes(V))switch(F[1]){case"亿":V=V*1e8;break;case"千万":V=V*1e7;break;default:V=V;break}D.push({column:k.key,start:A,end:V})}return D},[]);C.length&&(d.searchOptionDto={rangeDtoList:C}),v.length&&(d.query=v);const y=c.commonIndicator.find(({key:D})=>D==="st");y&&(d.st=y.st);const w=c.commonIndicator.find(({key:D})=>D==="tFeaturelncomes");w&&(d.netProfitQueryDto={...w,netProfit:w.netProfit*1e8});const S=c.commonIndicator.find(({key:D})=>D==="priceLevels");S&&(d.priceLevels=S.priceLevels);const x=c.commonIndicator.find(({key:D})=>D==="peTtmLevels");x&&(d.peTtmLevels=x.peTtmLevels);const N={};c.commonIndicator.forEach(D=>{const{key:k}=D;switch(k){case"expireDays":["",null].includes(D.range[0])||(N.minExpireDays=D.range[0]),["",null].includes(D.range[1])||(N.maxExpireDays=D.range[1]);break;case"virtualRealDegree":["",null].includes(D.range[0])||(N.minVirtualRealDegree=D.range[0]/100),["",null].includes(D.range[1])||(N.maxVirtualRealDegree=D.range[1]/100);break;case"yearProfitRate":["",null].includes(D.range[0])||(N.minYearProfitRate=D.range[0]/100),["",null].includes(D.range[1])||(N.maxYearProfitRate=D.range[1]/100);break;case"impliedVolatility":["",null].includes(D.range[0])||(N.minImpliedVolatility=D.range[0]/100),["",null].includes(D.range[1])||(N.maxImpliedVolatility=D.range[1]/100);break;case"levelMultiplier":["",null].includes(D.range[0])||(N.minLevelMultiplier=D.range[0]),["",null].includes(D.range[1])||(N.maxLevelMultiplier=D.range[1]);break;case"turnover":["",null].includes(D.range[0])||(N.minTurnover=D.range[0]*1e4),["",null].includes(D.range[1])||(N.maxTurnover=D.range[1]*1e4);break;case"volume":["",null].includes(D.range[0])||(N.minVolume=D.range[0]),["",null].includes(D.range[1])||(N.maxVolume=D.range[1]);break;case"openInterest":["",null].includes(D.range[0])||(N.minOpenInterest=D.range[0]),["",null].includes(D.range[1])||(N.maxOpenInterest=D.range[1]);break;case"optionsCpType":N.optionsCpType=D.optionsCpType;break;case"optionGear":["",null].includes(D.range[0])||(N.minOptionGear=D.range[0]),["",null].includes(D.range[1])||(N.maxOptionGear=D.range[1]);break}}),Object.keys(N).length&&(d.searchOptionDto={...d.searchOptionDto,...N})}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=rd,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-1be324b2"]]),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(k=>k[y]===d.value.at(0)),x=C.findIndex(k=>k[y]===d.value.at(-1));let N=null,D=null;switch(b){case"PageUp":if(S===0)return;N=S-v>0?S-v:0,D=N+v-1,c.value=C.slice(N,D+1),m(N,"PageUp");break;case"PageDown":if(x===C.length-1)return;N=S+v,D=N+v-1,c.value=C.slice(N,D+1),m(D,"PageDown");break}},g=b=>{l||(a===b.scrollLeft&&b.yAxisScrollDir==="backward"&&(s.value=0),a=b.scrollLeft)},m=(b,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=A1,w=qme,S=Cbe,x=wbe;return h.openBlock(),h.createBlock(x,null,{default:h.withCtx(({height:N,width:D})=>[h.createVNode(S,{ref_key:"tableRef",ref:o,id:"virtualTable",fixed:"",data:n.tableData,columns:n.tableColumn,width:D,height:N,"header-height":r.value.headerHeight,"row-height":r.value.rowHeight,"row-class":_,"row-event-handlers":{onClick:f},"footer-height":s.value,"scrollbar-always-on":"",onScroll:g,onEndReached:C[0]||(C[0]=k=>m(n.tableData.length-1,"PageDown"))},{empty:h.withCtx(()=>[h.createVNode(v,{description:"暂无数据",style:{height:"100%"}})]),footer:h.withCtx(()=>[s.value?(h.openBlock(),h.createElementBlock("div",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 ad.error("SQL语句不能为空");const C=j1e(b),v=m.map((w,S)=>`条件${S+1}`),y=C.filter(w=>!v.includes(w));if(y.length)return ad.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=A1,v=ci,y=Ou,w=lg,S=ag,x=GF,N=rS,D=$w,k=I8,L=Kp,E=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(E,{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(N,{modelValue:F.score[0],"onUpdate:modelValue":M=>F.score[0]=M,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"]),Ubt,h.createVNode(N,{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(k,{modelValue:s.value.sqlEnable,"onUpdate:modelValue":m[3]||(m[3]=F=>s.value.sqlEnable=F)},{default:h.withCtx(()=>[h.createVNode(D,{label:"关闭",value:0}),h.createVNode(D,{label:"启用",value:1})]),_:1},8,["modelValue"]),s.value.sqlEnable?(h.openBlock(),h.createBlock(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(L,{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-87221c7d"),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(()=>{let p=[];return t.varietyMarket===null&&!t.commonOption.length?p=t.config.options:(p=t.config.options,t.varietyMarket&&(p=p.filter(({parent:g})=>g.varietyMarketIds.includes(t.varietyMarket))),t.commonOption.length&&(p=p.filter(({parent:g})=>{const{commonOptionIds:m}=g;return[...new Set([...m,...t.commonOption])].length!==[...m,...t.commonOption].length}))),p}),o=h.ref({}),s=h.ref({}),a=p=>{o.value=p;const g={key:p.key,type:p.type,label:p.label};switch(p.key){case"st":{s.value={...g,st:null};break}case"tFeaturelncomes":{s.value={...g,rule:1,withFewYears:null,yearsCount:null,netProfit:null};break}case"priceLevels":{s.value={...g,priceLevels:null};break}case"peTtmLevels":{s.value={...g,peTtmLevels:null};break}case"optionsCpType":{s.value={...g,optionsCpType:null};break}default:s.value={...g,range:[null,null],unit:p.defaultUnit.length?[...p.defaultUnit]:[null,null],radioType:p.defaultRadioType,rankRange:p.defaultRankRange||[null,null]}}i.value=!0},l=()=>{switch(s.value.key){case"st":{const{label:g,st:m}=s.value;if(m===null)return ad.warning("格式错误: 请至少选择一个值");s.value.tagText=`${g}: ${m?"是":"否"}`;break}case"tFeaturelncomes":{const{label:g,rule:m,withFewYears:_,yearsCount:b,netProfit:C}=s.value;if(["",null].includes(_)||["",null].includes(b)||["",null].includes(C))return ad.warning("格式错误: 请填写完整");s.value.tagText=`${g}: ${_}年内${b}年以上盈利${m===1?"超":"跌"}过${C}亿`;break}case"priceLevels":{const{label:g,priceLevels:m}=s.value;if(!m||m.length===0)return ad.warning("格式错误: 请至少选择一个值");s.value.tagText=`${g}: 已选${m}分位`;break}case"peTtmLevels":{const{label:g,peTtmLevels:m}=s.value;if(!m||m.length===0)return ad.warning("格式错误: 请至少选择一个值");s.value.tagText=`${g}: 已选${m}分位`;break}case"optionsCpType":{const{label:g,optionsCpType:m}=s.value;if(m===null)return ad.warning("格式错误: 请至少选择一个值");s.value.tagText=`${g}: ${m===1?"看涨":"看跌"}`;break}default:{const{label:g,unit:m,radioType:_}=s.value,b=_==="1"?s.value.rankRange:s.value.range;if(["",null].includes(b[0])&&["",null].includes(b[1]))return ad.warning("格式错误: 请至少填写一个值");const C=_==="1"?"":m[0]??"",v=_==="1"?"":m[1]??"";!["",null].includes(b[0])&&!["",null].includes(b[1])?s.value.tagText=`${g}${_==="1"?"排名":""}: ${b[0]}${C} ~ ${b[1]}${v}`:["",null].includes(b[0])?s.value.tagText=`${g}${_==="1"?"排名":""}: ≤${b[1]}${v}`:s.value.tagText=`${g}${_==="1"?"排名":""}: ≥${b[0]}${C}`}}const p=e.value.findIndex(({key:g})=>g===s.value.key);p===-1?e.value.push(s.value):e.value.splice(p,1,s.value),i.value=!1},u=p=>{o.value=r.value.find(({key:g})=>g===p.key),s.value=JSON.parse(JSON.stringify(p)),i.value=!0},c=p=>{e.value.splice(p,1)},d=p=>{s.value.range=[...p.range],s.value.unit=[...p.unit]},f=p=>{switch(p){case"≤0":Object.assign(s.value,{rule:2,withFewYears:1,yearsCount:1,netProfit:0});break;case"≥0":Object.assign(s.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:0});break;case"五年内有四年以上盈利超过5千万":Object.assign(s.value,{rule:1,withFewYears:5,yearsCount:4,netProfit:.5});break;case"≥10亿":Object.assign(s.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:10});break;case"≥20亿":Object.assign(s.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:20});break}};return h.watch(()=>r.value,()=>{e.value.length&&(e.value=e.value.filter(({key:p})=>r.value.find(g=>g.key===p)))}),(p,g)=>{const m=Uw,_=wF,b=I8,C=Kp,v=A1,y=lg,w=ag,S=$w,x=rS,N=ng;return n.config.show&&r.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(r.value,D=>(h.openBlock(),h.createElementBlock("span",{key:D.key,onClick:k=>a(D)},h.toDisplayString(D.label),9,Jbt))),128))])]),h.createElementVNode("div",e_t,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(e.value,(D,k)=>(h.openBlock(),h.createBlock(m,{closable:"",type:"info",onClose:L=>c(k)},{default:h.withCtx(()=>[h.createElementVNode("span",null,h.toDisplayString(D.tagText),1),h.createElementVNode("span",{class:"edit",onClick:L=>u(D)},"编辑",8,t_t)]),_:2},1032,["onClose"]))),256))]),h.createVNode(N,{modelValue:i.value,"onUpdate:modelValue":g[19]||(g[19]=D=>i.value=D),title:o.value.label,width:"600","align-center":"","destroy-on-close":""},h.createSlots({footer:h.withCtx(()=>[h.createElementVNode("div",__t,[h.createVNode(v,{type:"primary",onClick:l},{default:h.withCtx(()=>[h.createTextVNode("确定")]),_:1})])]),default:h.withCtx(()=>[o.value.type===void 0&&s.value.radioType==="1"?(h.openBlock(),h.createElementBlock("div",i_t,[r_t,h.createVNode(C,{modelValue:s.value.rankRange[0],"onUpdate:modelValue":g[1]||(g[1]=D=>s.value.rankRange[0]=D),style:{flex:"1"}},null,8,["modelValue"]),h.createTextVNode(" ~ "),h.createVNode(C,{modelValue:s.value.rankRange[1],"onUpdate:modelValue":g[2]||(g[2]=D=>s.value.rankRange[1]=D),style:{flex:"1"}},null,8,["modelValue"])])):o.value.type===void 0?(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[o.value.convenientOptions.length?(h.openBlock(),h.createElementBlock("div",o_t,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value.convenientOptions,D=>(h.openBlock(),h.createBlock(v,{key:D.text,onClick:k=>d(D)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(D.text),1)]),_:2},1032,["onClick"]))),128))])):h.createCommentVNode("",!0),h.createElementVNode("div",s_t,[a_t,h.createVNode(C,{modelValue:s.value.range[0],"onUpdate:modelValue":g[4]||(g[4]=D=>s.value.range[0]=D),style:{flex:"1"}},h.createSlots({_:2},[o.value.unitOptions.length?{name:"append",fn:h.withCtx(()=>[o.value.unitOptions.length===1?(h.openBlock(),h.createElementBlock("span",l_t,h.toDisplayString(s.value.unit[0]),1)):(h.openBlock(),h.createBlock(w,{key:1,modelValue:s.value.unit[0],"onUpdate:modelValue":g[3]||(g[3]=D=>s.value.unit[0]=D),style:{width:"72px"}},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value.unitOptions,D=>(h.openBlock(),h.createBlock(y,{label:D,value:D},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"]),h.createTextVNode(" ~ "),h.createVNode(C,{modelValue:s.value.range[1],"onUpdate:modelValue":g[6]||(g[6]=D=>s.value.range[1]=D),style:{flex:"1"}},h.createSlots({_:2},[o.value.unitOptions.length?{name:"append",fn:h.withCtx(()=>[o.value.unitOptions.length===1?(h.openBlock(),h.createElementBlock("span",u_t,h.toDisplayString(s.value.unit[1]),1)):(h.openBlock(),h.createBlock(w,{key:1,modelValue:s.value.unit[1],"onUpdate:modelValue":g[5]||(g[5]=D=>s.value.unit[1]=D),style:{width:"72px"}},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value.unitOptions,D=>(h.openBlock(),h.createBlock(y,{label:D,value:D},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"])])],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:2},[o.value.key==="st"?(h.openBlock(),h.createElementBlock("div",c_t,[h.createVNode(b,{modelValue:s.value.st,"onUpdate:modelValue":g[7]||(g[7]=D=>s.value.st=D)},{default:h.withCtx(()=>[h.createVNode(S,{label:"是",value:1}),h.createVNode(S,{label:"否",value:0})]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),o.value.key==="tFeaturelncomes"?(h.openBlock(),h.createElementBlock("div",d_t,[h.createElementVNode("div",h_t,[h.createVNode(v,{onClick:g[8]||(g[8]=D=>f("≤0"))},{default:h.withCtx(()=>[h.createTextVNode("≤0")]),_:1}),h.createVNode(v,{onClick:g[9]||(g[9]=D=>f("≥0"))},{default:h.withCtx(()=>[h.createTextVNode("≥0")]),_:1}),h.createVNode(v,{onClick:g[10]||(g[10]=D=>f("五年内有四年以上盈利超过5千万"))},{default:h.withCtx(()=>[h.createTextVNode("五年内有四年以上盈利超过5千万")]),_:1}),h.createVNode(v,{onClick:g[11]||(g[11]=D=>f("≥10亿"))},{default:h.withCtx(()=>[h.createTextVNode("≥10亿")]),_:1}),h.createVNode(v,{onClick:g[12]||(g[12]=D=>f("≥20亿"))},{default:h.withCtx(()=>[h.createTextVNode("≥20亿")]),_:1})]),h.createElementVNode("div",f_t,[p_t,h.createElementVNode("div",null,[h.createVNode(x,{modelValue:s.value.withFewYears,"onUpdate:modelValue":g[13]||(g[13]=D=>s.value.withFewYears=D),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 年内 "),h.createVNode(x,{modelValue:s.value.yearsCount,"onUpdate:modelValue":g[14]||(g[14]=D=>s.value.yearsCount=D),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 年以上盈利"+h.toDisplayString(s.value.rule===1?"超":"跌")+"过 ",1),h.createVNode(x,{modelValue:s.value.netProfit,"onUpdate:modelValue":g[15]||(g[15]=D=>s.value.netProfit=D),"controls-position":"right"},null,8,["modelValue"]),h.createTextVNode(" 亿 ")])])])):h.createCommentVNode("",!0),o.value.key==="priceLevels"?(h.openBlock(),h.createElementBlock("div",g_t,[h.createVNode(w,{modelValue:s.value.priceLevels,"onUpdate:modelValue":g[16]||(g[16]=D=>s.value.priceLevels=D),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList([1,2,3,4,5],D=>h.createVNode(y,{key:D,label:`${D}分位`,value:D},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),o.value.key==="peTtmLevels"?(h.openBlock(),h.createElementBlock("div",m_t,[h.createVNode(w,{modelValue:s.value.peTtmLevels,"onUpdate:modelValue":g[17]||(g[17]=D=>s.value.peTtmLevels=D),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],D=>h.createVNode(y,{key:D,label:`${D}分位`,value:D},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0),o.value.key==="optionsCpType"?(h.openBlock(),h.createElementBlock("div",b_t,[h.createVNode(b,{modelValue:s.value.optionsCpType,"onUpdate:modelValue":g[18]||(g[18]=D=>s.value.optionsCpType=D)},{default:h.withCtx(()=>[h.createVNode(S,{label:"看涨",value:1}),h.createVNode(S,{label:"看跌",value:2})]),_:1},8,["modelValue"])])):h.createCommentVNode("",!0)],64))]),_:2},[o.value.showRankType?{name:"header",fn:h.withCtx(()=>[h.createElementVNode("span",n_t,h.toDisplayString(o.value.label),1),h.createVNode(b,{modelValue:s.value.radioType,"onUpdate:modelValue":g[0]||(g[0]=D=>s.value.radioType=D),style:{"vertical-align":"4px","margin-left":"12px"}},{default:h.withCtx(()=>[h.createVNode(_,{label:"数值",value:"0"}),h.createVNode(_,{label:"排名",value:"1"})]),_:1},8,["modelValue"])]),key:"0"}:void 0]),1032,["modelValue","title"])])):h.createCommentVNode("",!0)}}},[["__scopeId","data-v-87221c7d"]]),uwt="",G9=n=>(h.pushScopeId("data-v-1be324b2"),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 N,D;const x=`条件${S+1}`;switch(w.key){case"compare":{let k="";(N=r.value.factorScreen)!=null&&N.cycleShow?k=`freq_id = ${w.cycle} and factor_id = ${w.factor} ${w.compareType} freq_id = ${w.cycle2} and factor_id = ${w.factor2}`:k=`factor_id = ${w.factor} ${w.compareType} factor_id = ${w.factor2}`,y.set(x,`(${k})`);break}default:{let k=`factor_id = ${w.factor} and `;(D=r.value.factorScreen)!=null&&D.cycleShow&&(k=`freq_id = ${w.cycle} and factor_id = ${w.factor} and `),(w.score[0]||w.score[0]===0)&&(w.score[1]||w.score[1]===0)?k+=`score >= ${w.score[0]} and score <= ${w.score[1]}`:w.score[0]||w.score[0]===0?k+=`score >= ${w.score[0]}`:(w.score[1]||w.score[1]===0)&&(k+=`score <= ${w.score[1]}`),y.set(x,`(${k})`)}}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=[],v=c.commonIndicator.reduce((D,k)=>{const{key:L,type:E,range:I,unit:F,radioType:R,rankRange:M}=k;if(R==="1")b.includes(L)?C.push({column:k.key,start:M[0]||null,end:M[1]||null}):D.push({column:k.key,type:"1",start:M[0]||null,end:M[1]||null});else if(L==="dividendYield"){let[A,V]=I;["",null].includes(A)||(A=A/100),["",null].includes(V)||(V=V/100),D.push({column:k.key,start:A,end:V})}else if(E===void 0&&!b.includes(L)){let[A,V]=I;if(!["",null].includes(A))switch(F[0]){case"亿":A=A*1e8;break;case"千万":A=A*1e7;break;default:A=A;break}if(!["",null].includes(V))switch(F[1]){case"亿":V=V*1e8;break;case"千万":V=V*1e7;break;default:V=V;break}D.push({column:k.key,start:A,end:V})}return D},[]);C.length&&(d.searchOptionDto={rangeDtoList:C}),v.length&&(d.query=v);const y=c.commonIndicator.find(({key:D})=>D==="st");y&&(d.st=y.st);const w=c.commonIndicator.find(({key:D})=>D==="tFeaturelncomes");w&&(d.netProfitQueryDto={...w,netProfit:w.netProfit*1e8});const S=c.commonIndicator.find(({key:D})=>D==="priceLevels");S&&(d.priceLevels=S.priceLevels);const x=c.commonIndicator.find(({key:D})=>D==="peTtmLevels");x&&(d.peTtmLevels=x.peTtmLevels);const N={};c.commonIndicator.forEach(D=>{const{key:k}=D;switch(k){case"expireDays":["",null].includes(D.range[0])||(N.minExpireDays=D.range[0]),["",null].includes(D.range[1])||(N.maxExpireDays=D.range[1]);break;case"virtualRealDegree":["",null].includes(D.range[0])||(N.minVirtualRealDegree=D.range[0]/100),["",null].includes(D.range[1])||(N.maxVirtualRealDegree=D.range[1]/100);break;case"yearProfitRate":["",null].includes(D.range[0])||(N.minYearProfitRate=D.range[0]/100),["",null].includes(D.range[1])||(N.maxYearProfitRate=D.range[1]/100);break;case"impliedVolatility":["",null].includes(D.range[0])||(N.minImpliedVolatility=D.range[0]/100),["",null].includes(D.range[1])||(N.maxImpliedVolatility=D.range[1]/100);break;case"levelMultiplier":["",null].includes(D.range[0])||(N.minLevelMultiplier=D.range[0]),["",null].includes(D.range[1])||(N.maxLevelMultiplier=D.range[1]);break;case"turnover":["",null].includes(D.range[0])||(N.minTurnover=D.range[0]*1e4),["",null].includes(D.range[1])||(N.maxTurnover=D.range[1]*1e4);break;case"volume":["",null].includes(D.range[0])||(N.minVolume=D.range[0]),["",null].includes(D.range[1])||(N.maxVolume=D.range[1]);break;case"openInterest":["",null].includes(D.range[0])||(N.minOpenInterest=D.range[0]),["",null].includes(D.range[1])||(N.maxOpenInterest=D.range[1]);break;case"optionsCpType":N.optionsCpType=D.optionsCpType;break;case"optionGear":["",null].includes(D.range[0])||(N.minOptionGear=D.range[0]),["",null].includes(D.range[1])||(N.maxOptionGear=D.range[1]);break}}),Object.keys(N).length&&(d.searchOptionDto={...d.searchOptionDto,...N})}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=rd,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-1be324b2"]]),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(k=>k[y]===d.value.at(0)),x=C.findIndex(k=>k[y]===d.value.at(-1));let N=null,D=null;switch(b){case"PageUp":if(S===0)return;N=S-v>0?S-v:0,D=N+v-1,c.value=C.slice(N,D+1),m(N,"PageUp");break;case"PageDown":if(x===C.length-1)return;N=S+v,D=N+v-1,c.value=C.slice(N,D+1),m(D,"PageDown");break}},g=b=>{l||(a===b.scrollLeft&&b.yAxisScrollDir==="backward"&&(s.value=0),a=b.scrollLeft)},m=(b,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=A1,w=qme,S=Cbe,x=wbe;return h.openBlock(),h.createBlock(x,null,{default:h.withCtx(({height:N,width:D})=>[h.createVNode(S,{ref_key:"tableRef",ref:o,id:"virtualTable",fixed:"",data:n.tableData,columns:n.tableColumn,width:D,height:N,"header-height":r.value.headerHeight,"row-height":r.value.rowHeight,"row-class":_,"row-event-handlers":{onClick:f},"footer-height":s.value,"scrollbar-always-on":"",onScroll:g,onEndReached:C[0]||(C[0]=k=>m(n.tableData.length-1,"PageDown"))},{empty:h.withCtx(()=>[h.createVNode(v,{description:"暂无数据",style:{height:"100%"}})]),footer:h.withCtx(()=>[s.value?(h.openBlock(),h.createElementBlock("div",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-f575acc3.js")
240808
+ loader: () => import("./python-ce6bece2.js")
240809
240809
  });
240810
240810
  const x_t = /* @__PURE__ */ Ve({
240811
240811
  __name: "index",
@@ -242630,7 +242630,7 @@ const Xue = (n) => (ry("data-v-3cac46e2"), n = n(), oy(), n), q_t = { class: "fa
242630
242630
  };
242631
242631
  }
242632
242632
  }, nyt = /* @__PURE__ */ Dr(tyt, [["__scopeId", "data-v-3cac46e2"]]);
242633
- const AC = (n) => (ry("data-v-7cb706a5"), n = n(), oy(), n), iyt = {
242633
+ const AC = (n) => (ry("data-v-87221c7d"), n = n(), oy(), n), iyt = {
242634
242634
  key: 0,
242635
242635
  class: "common-indicator"
242636
242636
  }, ryt = { class: "indicator" }, oyt = /* @__PURE__ */ AC(() => /* @__PURE__ */ Re("div", { class: "title" }, [
@@ -242755,7 +242755,8 @@ const AC = (n) => (ry("data-v-7cb706a5"), n = n(), oy(), n), iyt = {
242755
242755
  const { label: g, unit: p, radioType: v } = s.value, m = v === "1" ? s.value.rankRange : s.value.range;
242756
242756
  if (["", null].includes(m[0]) && ["", null].includes(m[1]))
242757
242757
  return ih.warning("格式错误: 请至少填写一个值");
242758
- !["", null].includes(m[0]) && !["", null].includes(m[1]) ? s.value.tagText = `${g}${v === "1" ? "排名" : ""}: ${m[0]}${p[0] ?? ""} ~ ${m[1]}${p[1] ?? ""}` : ["", null].includes(m[0]) ? s.value.tagText = `${g}${v === "1" ? "排名" : ""}: ≤${m[1]}${p[1] ?? ""}` : s.value.tagText = `${g}${v === "1" ? "排名" : ""}: ≥${m[0]}${p[0] ?? ""}`;
242758
+ const y = v === "1" ? "" : p[0] ?? "", b = v === "1" ? "" : p[1] ?? "";
242759
+ !["", null].includes(m[0]) && !["", null].includes(m[1]) ? s.value.tagText = `${g}${v === "1" ? "排名" : ""}: ${m[0]}${y} ~ ${m[1]}${b}` : ["", null].includes(m[0]) ? s.value.tagText = `${g}${v === "1" ? "排名" : ""}: ≤${m[1]}${b}` : s.value.tagText = `${g}${v === "1" ? "排名" : ""}: ≥${m[0]}${y}`;
242759
242760
  }
242760
242761
  }
242761
242762
  const f = e.value.findIndex(({ key: g }) => g === s.value.key);
@@ -243121,7 +243122,7 @@ const AC = (n) => (ry("data-v-7cb706a5"), n = n(), oy(), n), iyt = {
243121
243122
  ])) : nt("", !0);
243122
243123
  };
243123
243124
  }
243124
- }, Lyt = /* @__PURE__ */ Dr(Eyt, [["__scopeId", "data-v-7cb706a5"]]);
243125
+ }, Lyt = /* @__PURE__ */ Dr(Eyt, [["__scopeId", "data-v-87221c7d"]]);
243125
243126
  const H8 = (n) => (ry("data-v-1be324b2"), n = n(), oy(), n), Ayt = { class: "variety-search" }, Tyt = {
243126
243127
  key: 0,
243127
243128
  class: "variety-search-row"
@@ -1,4 +1,4 @@
1
- import { m as a } from "./index-a506dbba.js";
1
+ import { m as a } from "./index-a301a9d6.js";
2
2
  import "vue";
3
3
  import "echarts";
4
4
  /*!-----------------------------------------------------------------------------