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