st-comp 0.0.259 → 0.0.261

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.
@@ -1,7 +1,7 @@
1
- "use strict";const C=require("./base-ef747d02.cjs"),R=require("./el-dialog-1b185570.cjs");require("./el-overlay-ea65cb05.cjs");const U=require("./el-button-974ff9e9.cjs"),K=require("./el-input-fa18ef84.cjs"),e=require("vue"),M=require("./dayjs.min-2c20abe6.cjs"),W=require("./index-8901a38c.cjs"),D=require("./index-33f80550.cjs"),X=require("./_plugin-vue_export-helper-f246444f.cjs"),P=require("./index-6ca95c8a.cjs"),A=require("./use-form-common-props-d3ed62c6.cjs");require("./index-28e03bad.cjs");require("./index-9780a537.cjs");require("./index-bb833443.cjs");require("./index-f1c702f6.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-c80f33a4.cjs");require("./index-37b8d3c6.cjs");require("./index-eea0bcb3.cjs");require("./typescript-b63f8e83.cjs");require("./index-7dce9f59.cjs");require("./config-provider-2ae47cc8.cjs");const G=C.buildProps({size:{type:[Number,String],values:A.componentSizes,default:"",validator:c=>C.isNumber(c)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:A.iconPropType},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:C.definePropType(String),default:"cover"}}),Q={error:c=>c instanceof Event},Z=e.defineComponent({name:"ElAvatar"}),ee=e.defineComponent({...Z,props:G,emits:Q,setup(c,{emit:N}){const k=c,r=C.useNamespace("avatar"),v=e.ref(!1),l=e.computed(()=>{const{size:n,icon:T,shape:E}=k,a=[r.b()];return C.isString(n)&&a.push(r.m(n)),T&&a.push(r.m("icon")),E&&a.push(r.m(E)),a}),y=e.computed(()=>{const{size:n}=k;return C.isNumber(n)?r.cssVarBlock({size:C.addUnit(n)||""}):void 0}),m=e.computed(()=>({objectFit:k.fit}));e.watch(()=>k.src,()=>v.value=!1);function d(n){v.value=!0,N("error",n)}return(n,T)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(l)),style:e.normalizeStyle(e.unref(y))},[(n.src||n.srcSet)&&!v.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.src,alt:n.alt,srcset:n.srcSet,style:e.normalizeStyle(e.unref(m)),onError:d},null,44,["src","alt","srcset"])):n.icon?(e.openBlock(),e.createBlock(e.unref(D.ElIcon),{key:1},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.icon)))]),_:1})):e.renderSlot(n.$slots,"default",{key:2})],6))}});var te=C._export_sfc(ee,[["__file","avatar.vue"]]);const se=C.withInstall(te);const ae=async({appId:c,apiKey:N,value:k,callback:r})=>{var v;try{const l=await fetch(`https://dashscope.aliyuncs.com/api/v1/apps/${c}/completion`,{method:"POST",body:JSON.stringify({input:{prompt:k},parameters:{incremental_output:"true"},debug:{}}),headers:{Authorization:`Bearer ${N}`,"Content-Type":"application/json","X-DashScope-SSE":"enable"}});if(!l.ok){r("error",`HTTP ${l.status}: ${l.statusText}`);return}const y=l.body.getReader(),m=new TextDecoder;let d="",n=null;for(;;){const{done:T,value:E}=await y.read();if(T){d.trim()&&ne(d,r),r("finish","");break}d+=m.decode(E,{stream:!0});let a;for(;(a=d.indexOf(`
2
- `))!==-1;){const h=d.substring(0,a).trim();if(d=d.substring(a+1),h.startsWith("event:")){n=h.substring(6).trim();continue}if(h.startsWith("data:")){const _=h.substring(5).trim();if(n==="error"||_&&_.startsWith("{"))try{const f=JSON.parse(_);if(f.code||f.message||n==="error"){const F=f.message||f.code||"未知错误";r("error",`百炼服务端错误: ${F}`);return}const x=(v=f==null?void 0:f.output)==null?void 0:v.text;x&&r&&r("message",x)}catch{console.debug("JSON 解析失败:",_)}n=null}}}}catch(l){console.error("流式请求失败:",l),r("error",l.message)}},ne=(c,N)=>{var v;const k=c.split(`
3
- `);let r=null;for(const l of k){if(l.startsWith("event:")){r=l.substring(6).trim();continue}if(l.startsWith("data:")){const y=l.substring(5).trim();if(y&&y!=="[DONE]")try{const m=JSON.parse(y);if(r==="error"||m.code||m.message){const n=m.message||m.code||"未知错误";N("error",`百炼服务端错误: ${n}`);return}const d=(v=m==null?void 0:m.output)==null?void 0:v.text;d&&N&&N("message",d)}catch{}r=null}}};const w=c=>(e.pushScopeId("data-v-94f32fe5"),c=c(),e.popScopeId(),c),oe={class:"ai-dialog-body"},re={class:"avatar"},ie={class:"message-content"},le=["innerHTML"],ce={key:1,class:"message-text"},ue={class:"message-createTime"},de=w(()=>e.createElementVNode("div",{class:"message-createTime"},"请问对本轮查询结果是否满意?",-1)),me={class:"feedback-buttons"},fe=["onClick"],pe=w(()=>e.createElementVNode("span",{class:"btn-emoji"},"👍",-1)),ve=w(()=>e.createElementVNode("span",{class:"btn-text"},"满意",-1)),ge=[pe,ve],he=["onClick"],_e=w(()=>e.createElementVNode("span",{class:"btn-emoji"},"👎",-1)),ke=w(()=>e.createElementVNode("span",{class:"btn-text"},"不满意",-1)),ye=[_e,ke],Te={key:1,class:"message-createTime"},be={key:0,class:"message-item assistant"},Ne={class:"avatar"},Ee=w(()=>e.createElementVNode("div",{class:"message-content"},[e.createElementVNode("div",{class:"typing-indicator"},[e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span")])],-1)),Ve={class:"input-area"},Ce={class:"input-actions"},we=w(()=>e.createElementVNode("div",{class:"input-hint"},[e.createElementVNode("span",null,"Enter 发送 | Ctrl + Enter 换行")],-1)),Se={class:"feedback-dialog-content"},Be=w(()=>e.createElementVNode("div",{class:"feedback-emoji"},"😟",-1)),qe=w(()=>e.createElementVNode("p",{class:"feedback-tip"},"很抱歉没能帮到您,请告诉我们哪里需要改进:",-1)),xe={class:"dialog-footer"},Me={__name:"index",props:{defaultMessage:{type:String,default:`你好呀!我是你的品种池AI助手,会根据您的自然语言去进行品种的条件查询
1
+ "use strict";const C=require("./base-ef747d02.cjs"),R=require("./el-dialog-1b185570.cjs");require("./el-overlay-ea65cb05.cjs");const K=require("./el-button-974ff9e9.cjs"),U=require("./el-input-fa18ef84.cjs"),e=require("vue"),M=require("./dayjs.min-2c20abe6.cjs"),W=require("./index-8901a38c.cjs"),D=require("./index-33f80550.cjs"),X=require("./_plugin-vue_export-helper-f246444f.cjs"),P=require("./index-6ca95c8a.cjs"),A=require("./use-form-common-props-d3ed62c6.cjs");require("./index-28e03bad.cjs");require("./index-9780a537.cjs");require("./index-bb833443.cjs");require("./index-f1c702f6.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-c80f33a4.cjs");require("./index-37b8d3c6.cjs");require("./index-eea0bcb3.cjs");require("./typescript-b63f8e83.cjs");require("./index-7dce9f59.cjs");require("./config-provider-2ae47cc8.cjs");const G=C.buildProps({size:{type:[Number,String],values:A.componentSizes,default:"",validator:c=>C.isNumber(c)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:A.iconPropType},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:C.definePropType(String),default:"cover"}}),Q={error:c=>c instanceof Event},Z=e.defineComponent({name:"ElAvatar"}),ee=e.defineComponent({...Z,props:G,emits:Q,setup(c,{emit:N}){const k=c,r=C.useNamespace("avatar"),v=e.ref(!1),l=e.computed(()=>{const{size:n,icon:b,shape:E}=k,a=[r.b()];return C.isString(n)&&a.push(r.m(n)),b&&a.push(r.m("icon")),E&&a.push(r.m(E)),a}),y=e.computed(()=>{const{size:n}=k;return C.isNumber(n)?r.cssVarBlock({size:C.addUnit(n)||""}):void 0}),m=e.computed(()=>({objectFit:k.fit}));e.watch(()=>k.src,()=>v.value=!1);function d(n){v.value=!0,N("error",n)}return(n,b)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(l)),style:e.normalizeStyle(e.unref(y))},[(n.src||n.srcSet)&&!v.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.src,alt:n.alt,srcset:n.srcSet,style:e.normalizeStyle(e.unref(m)),onError:d},null,44,["src","alt","srcset"])):n.icon?(e.openBlock(),e.createBlock(e.unref(D.ElIcon),{key:1},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.icon)))]),_:1})):e.renderSlot(n.$slots,"default",{key:2})],6))}});var te=C._export_sfc(ee,[["__file","avatar.vue"]]);const se=C.withInstall(te);const ae=async({appId:c,apiKey:N,value:k,callback:r})=>{var v;try{const l=await fetch(`https://dashscope.aliyuncs.com/api/v1/apps/${c}/completion`,{method:"POST",body:JSON.stringify({input:{prompt:k},parameters:{incremental_output:"true"},debug:{}}),headers:{Authorization:`Bearer ${N}`,"Content-Type":"application/json","X-DashScope-SSE":"enable"}});if(!l.ok){r("error",`HTTP ${l.status}: ${l.statusText}`);return}const y=l.body.getReader(),m=new TextDecoder;let d="",n=null;for(;;){const{done:b,value:E}=await y.read();if(b){d.trim()&&ne(d,r),r("finish","");break}d+=m.decode(E,{stream:!0});let a;for(;(a=d.indexOf(`
2
+ `))!==-1;){const h=d.substring(0,a).trim();if(d=d.substring(a+1),h.startsWith("event:")){n=h.substring(6).trim();continue}if(h.startsWith("data:")){const _=h.substring(5).trim();if(n==="error"||_&&_.startsWith("{"))try{const p=JSON.parse(_);if(p.code||p.message||n==="error"){const F=p.message||p.code||"未知错误";r("error",`百炼服务端错误: ${F}`);return}const x=(v=p==null?void 0:p.output)==null?void 0:v.text;x&&r&&r("message",x)}catch{console.debug("JSON 解析失败:",_)}n=null}}}}catch(l){console.error("流式请求失败:",l),r("error",l.message)}},ne=(c,N)=>{var v;const k=c.split(`
3
+ `);let r=null;for(const l of k){if(l.startsWith("event:")){r=l.substring(6).trim();continue}if(l.startsWith("data:")){const y=l.substring(5).trim();if(y&&y!=="[DONE]")try{const m=JSON.parse(y);if(r==="error"||m.code||m.message){const n=m.message||m.code||"未知错误";N("error",`百炼服务端错误: ${n}`);return}const d=(v=m==null?void 0:m.output)==null?void 0:v.text;d&&N&&N("message",d)}catch{}r=null}}};const w=c=>(e.pushScopeId("data-v-536916ba"),c=c(),e.popScopeId(),c),oe={class:"ai-dialog-body"},re={class:"avatar"},ie={class:"message-content"},le=["innerHTML"],ce={key:1,class:"message-text"},ue={class:"message-createTime"},de=w(()=>e.createElementVNode("div",{class:"message-createTime"},"请问对本轮查询结果是否满意?",-1)),me={class:"feedback-buttons"},pe=["onClick"],fe=w(()=>e.createElementVNode("span",{class:"btn-emoji"},"👍",-1)),ve=w(()=>e.createElementVNode("span",{class:"btn-text"},"满意",-1)),ge=[fe,ve],he=["onClick"],_e=w(()=>e.createElementVNode("span",{class:"btn-emoji"},"👎",-1)),ke=w(()=>e.createElementVNode("span",{class:"btn-text"},"不满意",-1)),ye=[_e,ke],be={key:1,class:"message-createTime"},Te={key:0,class:"message-item assistant"},Ne={class:"avatar"},Ee=w(()=>e.createElementVNode("div",{class:"message-content"},[e.createElementVNode("div",{class:"typing-indicator"},[e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span")])],-1)),Ve={class:"input-area"},Ce={class:"input-actions"},we=w(()=>e.createElementVNode("div",{class:"input-hint"},[e.createElementVNode("span",null,"Enter 发送 | Ctrl + Enter 换行")],-1)),Se={class:"feedback-dialog-content"},Be=w(()=>e.createElementVNode("div",{class:"feedback-emoji"},"😟",-1)),qe=w(()=>e.createElementVNode("p",{class:"feedback-tip"},"很抱歉没能帮到您,请告诉我们哪里需要改进:",-1)),xe={class:"dialog-footer"},Me={__name:"index",props:{defaultMessage:{type:String,default:`你好呀!我是你的品种池AI助手,会根据您的自然语言去进行品种的条件查询
4
4
 
5
5
  示例:
6
- 帮我查A股科创板下品种转价差上证50并且总市值大于1千万, 按照总市值升序进行排序`}},emits:["callBack"],setup(c,{expose:N,emit:k}){const r=e.inject("stConfig"),v=e.reactive(W.V()),l=e.ref(!1),y=k,m=c,d=e.ref(),n=e.ref(!1),T=e.ref(!1),E=e.ref(null),a=e.ref([{role:"assistant",content:m.defaultMessage,userContent:null,showFeedback:!1,hasFeedback:!1,createTime:M.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:0,firstPackageTime:0}]),h=e.ref(""),_=e.ref(!1),f=e.ref(""),x=e.ref({}),F=o=>{if(typeof o!="string")return!1;try{const t=JSON.parse(o);return t!==null&&typeof t=="object"}catch{return!1}},O=o=>{if(!F(o))return null;try{const t=JSON.parse(o),{parsedConditions:s,...i}=t;return{parsedConditions:s,webParams:i}}catch{return null}},z=o=>{var s;if(!o)return"";let t="";return(s=o.parsedConditions)!=null&&s.length&&(t+='<div class="parsed-conditions">',o.parsedConditions.forEach(i=>{t+=`<div class="parsed-conditions-item">${i}</div>`}),t+="</div>"),t},B=async(o,t)=>{switch(o){case"satisfied":{const s=a.value[t],i={userName:v.username,userContent:s.userContent,aiContent:s.content,type:1,createTime:s.createTime,resTime:s.resTime,firstPackageTime:s.firstPackageTime,isSolved:1,logOrigin:1};await r.request.post("/alarm/deliversign/addVarietyAiHelperLog",i),P.ElMessage.success("感谢您的评价!"),a.value[t].hasFeedback=!0;break}case"open":{x.value=t,_.value=!0;break}case"unsatisfied":{const s=a.value[t],i={userName:v.username,userContent:s.userContent,userSuggestion:f.value,aiContent:s.content,type:2,resTime:s.resTime,createTime:s.createTime,firstPackageTime:s.firstPackageTime,isSolved:0,logOrigin:1};await r.request.post("/alarm/deliversign/addVarietyAiHelperLog",i),P.ElMessage.success("感谢您的反馈!我们将持续跟踪并进行优化"),_.value=!1,a.value[t].hasFeedback=!0;break}case"default":{const s=a.value[t],i={userName:v.username,userContent:s.userContent,userSuggestion:f.value,aiContent:s.content,type:null,resTime:s.resTime,createTime:s.createTime,firstPackageTime:s.firstPackageTime,isSolved:1,logOrigin:1};await r.request.post("/alarm/deliversign/addVarietyAiHelperLog",i)}}},H=async()=>{const o=h.value.trim();if(!o)return P.ElMessage.warning("请输入消息内容");if(n.value)return;a.value.push({role:"user",content:o,createTime:M.dayjs().format("YYYY-MM-DD HH:mm:ss")}),h.value="",await S(),a.value.push({role:"assistant",content:"",userContent:o,showFeedback:!1,hasFeedback:!1,createTime:M.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:0,firstPackageTime:0}),await S(),n.value=!0,T.value=!0;let t="",s=new Date().getTime();try{await ae({appId:"9e54d112acfe4531bd1fc4fee8827fef",apiKey:"sk-d995eb26a4334bdeb2ccb4cbfaf51de8",value:o,callback:(V,g)=>{var u;if(V==="error"){T.value=!1,n.value=!1,a.value.pop(),a.value.push({role:"assistant",userContent:o,content:`❌ ${g}`,showFeedback:!1,hasFeedback:!1,createTime:M.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:new Date().getTime()-s,firstPackageTime:0}),B("default",a.value.length-1),S();return}else if(V==="message"){t+=g;const p=a.value[a.value.length-1];p&&p.role==="assistant"&&(p.content=t,S()),p.firstPackageTime===0&&(p.firstPackageTime=new Date().getTime()-s)}else if(V==="finish"){T.value=!1,n.value=!1;const p=a.value[a.value.length-1];p&&p.role==="assistant"&&(p.showFeedback=!0,p.resTime=new Date().getTime()-s,B("default",a.value.length-1)),console.log(t);try{const b=JSON.parse(t);if(b.parsedConditions&&delete b.parsedConditions,(u=b.customTagNames)!=null&&u.length){const L=b.customTagNames.reduce((Y,J)=>{const $=d.value[J];return $&&Y.push($),Y},[]);delete b.customTagNames,b.customTag=L}y("callBack",b)}catch{y("callBack",t)}}}})}catch(i){P.ElMessage.error(`AI响应异常: ${i}`),a.value.pop(),a.value.push({role:"assistant",userContent:o,content:"❌ 抱歉,AI服务响应异常,请稍后重试。",showFeedback:!0,hasFeedback:!1,createTime:M.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:new Date().getTime()-s,firstPackageTime:0}),B("default",a.value.length-1),await S(),n.value=!1,T.value=!1}},j=o=>{if(o.key==="Enter")if(o.ctrlKey){o.preventDefault();const t=o.target,s=t.selectionStart,i=t.selectionEnd;h.value=h.value.substring(0,s)+`
7
- `+h.value.substring(i),e.nextTick(()=>{t.selectionStart=t.selectionEnd=s+1})}else o.preventDefault(),H()},S=async()=>{await e.nextTick(),E.value&&(E.value.scrollTop=E.value.scrollHeight)},I=async()=>{const o=await Promise.all([r.request.post("/alarm/deliversign/findTagsByUserId"),r.request.post("/alarm/deliversign/findSystemTagsByTagName")]);d.value=o.reduce((t,s)=>{var i;return{...t,...(i=s.body)==null?void 0:i.reduce((q,V)=>({...q,[V.tagName]:V.id}),{})}},{})};return e.onMounted(()=>{I()}),e.watch(()=>a.value,()=>{S()},{deep:!0}),e.watch(()=>_.value,o=>{o||(f.value="")}),N({open:()=>{l.value=!0,e.nextTick(()=>{S()})}}),(o,t)=>{const s=se,i=K.ElInput,q=U.ElButton,V=R.ElDialog;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(V,{class:"ai-dialog",modelValue:l.value,"onUpdate:modelValue":t[1]||(t[1]=g=>l.value=g),title:"✨ 品种池参数解析AI助手",width:"500px",center:"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0},{default:e.withCtx(()=>{var g;return[e.createElementVNode("div",oe,[e.createElementVNode("div",{ref_key:"messageListRef",ref:E,class:"message-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(u,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:e.normalizeClass([u.role,"message-item"])},[u.content?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",re,[e.createVNode(s,{size:32,icon:u.role==="user"?e.unref(D.user_filled_default):e.unref(D.service_default)},null,8,["icon"])]),e.createElementVNode("div",ie,[F(u.content)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"message-json",innerHTML:z(O(u.content))},null,8,le)):(e.openBlock(),e.createElementBlock("div",ce,e.toDisplayString(u.content),1)),e.createElementVNode("div",ue,e.toDisplayString(u.createTime),1),u.role==="assistant"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[u.showFeedback&&!u.hasFeedback?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[de,e.createElementVNode("div",me,[e.createElementVNode("button",{class:"feedback-btn satisfied-btn",onClick:b=>B("satisfied",p)},ge,8,fe),e.createElementVNode("button",{class:"feedback-btn unsatisfied-btn",onClick:b=>B("open",p)},ye,8,he)])],64)):e.createCommentVNode("",!0),u.showFeedback&&u.hasFeedback?(e.openBlock(),e.createElementBlock("div",Te,"感谢您进行的评价反馈")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])],64)):e.createCommentVNode("",!0)],2))),128)),T.value&&!((g=a.value[a.value.length-1])!=null&&g.content)?(e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("div",Ne,[e.createVNode(s,{size:32,icon:e.unref(D.service_default)},null,8,["icon"])]),Ee])):e.createCommentVNode("",!0)],512),e.createElementVNode("div",Ve,[e.createVNode(i,{class:"message-input",modelValue:h.value,"onUpdate:modelValue":t[0]||(t[0]=u=>h.value=u),type:"textarea",rows:4,autosize:{minRows:2,maxRows:4},placeholder:"输入您想查询的品种条件...",onKeydown:j},null,8,["modelValue"]),e.createElementVNode("div",Ce,[we,e.createVNode(q,{class:"send-btn",type:"primary",icon:e.unref(D.promotion_default),loading:n.value,onClick:H,round:""},{default:e.withCtx(()=>[e.createTextVNode(" 发送 ")]),_:1},8,["icon","loading"])])])])]}),_:1},8,["modelValue"]),e.createVNode(V,{modelValue:_.value,"onUpdate:modelValue":t[5]||(t[5]=g=>_.value=g),title:"📝 反馈意见",width:"400px"},{footer:e.withCtx(()=>[e.createElementVNode("span",xe,[e.createVNode(q,{onClick:t[3]||(t[3]=g=>_.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(q,{type:"primary",onClick:t[4]||(t[4]=g=>B("unsatisfied",x.value))},{default:e.withCtx(()=>[e.createTextVNode("提交反馈")]),_:1})])]),default:e.withCtx(()=>[e.createElementVNode("div",Se,[Be,qe,e.createVNode(i,{modelValue:f.value,"onUpdate:modelValue":t[2]||(t[2]=g=>f.value=g),type:"textarea",rows:4,placeholder:"[非必填]例如:回答不够准确、查询结果有误、界面体验不佳..."},null,8,["modelValue"])])]),_:1},8,["modelValue"])],64)}}},De=X._export_sfc(Me,[["__scopeId","data-v-94f32fe5"]]),Fe={install(c){c.component("st-varietyAiHelper",De)}};module.exports=Fe;
6
+ 帮我查A股科创板下品种转价差上证50并且总市值大于1千万, 最近一次红箱的开盘价大于前5根K线的最高价, 并按照总市值升序进行排序`}},emits:["callBack"],setup(c,{expose:N,emit:k}){const r=e.inject("stConfig"),v=e.reactive(W.V()),l=e.ref(!1),y=k,m=c,d=e.ref(),n=e.ref(!1),b=e.ref(!1),E=e.ref(null),a=e.ref([{role:"assistant",content:m.defaultMessage,userContent:null,showFeedback:!1,hasFeedback:!1,createTime:M.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:0,firstPackageTime:0}]),h=e.ref(""),_=e.ref(!1),p=e.ref(""),x=e.ref({}),F=o=>{if(typeof o!="string")return!1;try{const t=JSON.parse(o);return t!==null&&typeof t=="object"}catch{return!1}},O=o=>{if(!F(o))return null;try{const t=JSON.parse(o),{parsedConditions:s,...i}=t;return{parsedConditions:s,webParams:i}}catch{return null}},z=o=>{var s;if(!o)return"";let t="";return(s=o.parsedConditions)!=null&&s.length&&(t+='<div class="parsed-conditions">',o.parsedConditions.forEach(i=>{t+=`<div class="parsed-conditions-item">${i}</div>`}),t+="</div>"),t},B=async(o,t)=>{switch(o){case"satisfied":{const s=a.value[t],i={userName:v.username,userContent:s.userContent,aiContent:s.content,type:1,createTime:s.createTime,resTime:s.resTime,firstPackageTime:s.firstPackageTime,isSolved:1,logOrigin:1};await r.request.post("/alarm/deliversign/addVarietyAiHelperLog",i),P.ElMessage.success("感谢您的评价!"),a.value[t].hasFeedback=!0;break}case"open":{x.value=t,_.value=!0;break}case"unsatisfied":{const s=a.value[t],i={userName:v.username,userContent:s.userContent,userSuggestion:p.value,aiContent:s.content,type:2,resTime:s.resTime,createTime:s.createTime,firstPackageTime:s.firstPackageTime,isSolved:0,logOrigin:1};await r.request.post("/alarm/deliversign/addVarietyAiHelperLog",i),P.ElMessage.success("感谢您的反馈!我们将持续跟踪并进行优化"),_.value=!1,a.value[t].hasFeedback=!0;break}case"default":{const s=a.value[t],i={userName:v.username,userContent:s.userContent,userSuggestion:p.value,aiContent:s.content,type:null,resTime:s.resTime,createTime:s.createTime,firstPackageTime:s.firstPackageTime,isSolved:1,logOrigin:1};await r.request.post("/alarm/deliversign/addVarietyAiHelperLog",i)}}},H=async()=>{const o=h.value.trim();if(!o)return P.ElMessage.warning("请输入消息内容");if(n.value)return;a.value.push({role:"user",content:o,createTime:M.dayjs().format("YYYY-MM-DD HH:mm:ss")}),h.value="",await S(),a.value.push({role:"assistant",content:"",userContent:o,showFeedback:!1,hasFeedback:!1,createTime:M.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:0,firstPackageTime:0}),await S(),n.value=!0,b.value=!0;let t="",s=new Date().getTime();try{await ae({appId:"9e54d112acfe4531bd1fc4fee8827fef",apiKey:"sk-d995eb26a4334bdeb2ccb4cbfaf51de8",value:o,callback:(V,g)=>{var u;if(V==="error"){b.value=!1,n.value=!1,a.value.pop(),a.value.push({role:"assistant",userContent:o,content:`❌ ${g}`,showFeedback:!1,hasFeedback:!1,createTime:M.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:new Date().getTime()-s,firstPackageTime:0}),B("default",a.value.length-1),S();return}else if(V==="message"){t+=g;const f=a.value[a.value.length-1];f&&f.role==="assistant"&&(f.content=t,S()),f.firstPackageTime===0&&(f.firstPackageTime=new Date().getTime()-s)}else if(V==="finish"){b.value=!1,n.value=!1;const f=a.value[a.value.length-1];f&&f.role==="assistant"&&(f.showFeedback=!0,f.resTime=new Date().getTime()-s,B("default",a.value.length-1)),console.log(t);try{const T=JSON.parse(t);if(T.parsedConditions&&delete T.parsedConditions,(u=T.customTagNames)!=null&&u.length){const L=T.customTagNames.reduce((Y,J)=>{const $=d.value[J];return $&&Y.push($),Y},[]);delete T.customTagNames,T.customTag=L}y("callBack",T)}catch{y("callBack",t)}}}})}catch(i){P.ElMessage.error(`AI响应异常: ${i}`),a.value.pop(),a.value.push({role:"assistant",userContent:o,content:"❌ 抱歉,AI服务响应异常,请稍后重试。",showFeedback:!0,hasFeedback:!1,createTime:M.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:new Date().getTime()-s,firstPackageTime:0}),B("default",a.value.length-1),await S(),n.value=!1,b.value=!1}},j=o=>{if(o.key==="Enter")if(o.ctrlKey){o.preventDefault();const t=o.target,s=t.selectionStart,i=t.selectionEnd;h.value=h.value.substring(0,s)+`
7
+ `+h.value.substring(i),e.nextTick(()=>{t.selectionStart=t.selectionEnd=s+1})}else o.preventDefault(),H()},S=async()=>{await e.nextTick(),E.value&&(E.value.scrollTop=E.value.scrollHeight)},I=async()=>{const o=await Promise.all([r.request.post("/alarm/deliversign/findTagsByUserId"),r.request.post("/alarm/deliversign/findSystemTagsByTagName")]);d.value=o.reduce((t,s)=>{var i;return{...t,...(i=s.body)==null?void 0:i.reduce((q,V)=>({...q,[V.tagName]:V.id}),{})}},{})};return e.onMounted(()=>{I()}),e.watch(()=>a.value,()=>{S()},{deep:!0}),e.watch(()=>_.value,o=>{o||(p.value="")}),N({open:()=>{l.value=!0,e.nextTick(()=>{S()})}}),(o,t)=>{const s=se,i=U.ElInput,q=K.ElButton,V=R.ElDialog;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(V,{class:"ai-dialog",modelValue:l.value,"onUpdate:modelValue":t[1]||(t[1]=g=>l.value=g),title:"✨ 品种池参数解析AI助手",width:"500px",center:"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0},{default:e.withCtx(()=>{var g;return[e.createElementVNode("div",oe,[e.createElementVNode("div",{ref_key:"messageListRef",ref:E,class:"message-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(u,f)=>(e.openBlock(),e.createElementBlock("div",{key:f,class:e.normalizeClass([u.role,"message-item"])},[u.content?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",re,[e.createVNode(s,{size:32,icon:u.role==="user"?e.unref(D.user_filled_default):e.unref(D.service_default)},null,8,["icon"])]),e.createElementVNode("div",ie,[F(u.content)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"message-json",innerHTML:z(O(u.content))},null,8,le)):(e.openBlock(),e.createElementBlock("div",ce,e.toDisplayString(u.content),1)),e.createElementVNode("div",ue,e.toDisplayString(u.createTime),1),u.role==="assistant"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[u.showFeedback&&!u.hasFeedback?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[de,e.createElementVNode("div",me,[e.createElementVNode("button",{class:"feedback-btn satisfied-btn",onClick:T=>B("satisfied",f)},ge,8,pe),e.createElementVNode("button",{class:"feedback-btn unsatisfied-btn",onClick:T=>B("open",f)},ye,8,he)])],64)):e.createCommentVNode("",!0),u.showFeedback&&u.hasFeedback?(e.openBlock(),e.createElementBlock("div",be,"感谢您进行的评价反馈")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])],64)):e.createCommentVNode("",!0)],2))),128)),b.value&&!((g=a.value[a.value.length-1])!=null&&g.content)?(e.openBlock(),e.createElementBlock("div",Te,[e.createElementVNode("div",Ne,[e.createVNode(s,{size:32,icon:e.unref(D.service_default)},null,8,["icon"])]),Ee])):e.createCommentVNode("",!0)],512),e.createElementVNode("div",Ve,[e.createVNode(i,{class:"message-input",modelValue:h.value,"onUpdate:modelValue":t[0]||(t[0]=u=>h.value=u),type:"textarea",rows:4,autosize:{minRows:2,maxRows:4},placeholder:"输入您想查询的品种条件...",onKeydown:j},null,8,["modelValue"]),e.createElementVNode("div",Ce,[we,e.createVNode(q,{class:"send-btn",type:"primary",icon:e.unref(D.promotion_default),loading:n.value,onClick:H,round:""},{default:e.withCtx(()=>[e.createTextVNode(" 发送 ")]),_:1},8,["icon","loading"])])])])]}),_:1},8,["modelValue"]),e.createVNode(V,{modelValue:_.value,"onUpdate:modelValue":t[5]||(t[5]=g=>_.value=g),title:"📝 反馈意见",width:"400px"},{footer:e.withCtx(()=>[e.createElementVNode("span",xe,[e.createVNode(q,{onClick:t[3]||(t[3]=g=>_.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(q,{type:"primary",onClick:t[4]||(t[4]=g=>B("unsatisfied",x.value))},{default:e.withCtx(()=>[e.createTextVNode("提交反馈")]),_:1})])]),default:e.withCtx(()=>[e.createElementVNode("div",Se,[Be,qe,e.createVNode(i,{modelValue:p.value,"onUpdate:modelValue":t[2]||(t[2]=g=>p.value=g),type:"textarea",rows:4,placeholder:"[非必填]例如:回答不够准确、查询结果有误、界面体验不佳..."},null,8,["modelValue"])])]),_:1},8,["modelValue"])],64)}}},De=X._export_sfc(Me,[["__scopeId","data-v-536916ba"]]),Fe={install(c){c.component("st-varietyAiHelper",De)}};module.exports=Fe;
@@ -180,10 +180,10 @@ const Be = async ({ appId: c, apiKey: E, value: k, callback: r }) => {
180
180
  }
181
181
  }
182
182
  };
183
- const V = (c) => (we("data-v-94f32fe5"), c = c(), Ce(), c), Le = { class: "ai-dialog-body" }, Ie = { class: "avatar" }, Je = { class: "message-content" }, je = ["innerHTML"], Re = {
183
+ const V = (c) => (we("data-v-536916ba"), c = c(), Ce(), c), Le = { class: "ai-dialog-body" }, Ie = { class: "avatar" }, Je = { class: "message-content" }, je = ["innerHTML"], Re = {
184
184
  key: 1,
185
185
  class: "message-text"
186
- }, qe = { class: "message-createTime" }, Ue = /* @__PURE__ */ V(() => /* @__PURE__ */ o("div", { class: "message-createTime" }, "请问对本轮查询结果是否满意?", -1)), Ke = { class: "feedback-buttons" }, We = ["onClick"], Xe = /* @__PURE__ */ V(() => /* @__PURE__ */ o("span", { class: "btn-emoji" }, "👍", -1)), Ge = /* @__PURE__ */ V(() => /* @__PURE__ */ o("span", { class: "btn-text" }, "满意", -1)), Qe = [
186
+ }, qe = { class: "message-createTime" }, Ke = /* @__PURE__ */ V(() => /* @__PURE__ */ o("div", { class: "message-createTime" }, "请问对本轮查询结果是否满意?", -1)), Ue = { class: "feedback-buttons" }, We = ["onClick"], Xe = /* @__PURE__ */ V(() => /* @__PURE__ */ o("span", { class: "btn-emoji" }, "👍", -1)), Ge = /* @__PURE__ */ V(() => /* @__PURE__ */ o("span", { class: "btn-text" }, "满意", -1)), Qe = [
187
187
  Xe,
188
188
  Ge
189
189
  ], Ze = ["onClick"], et = /* @__PURE__ */ V(() => /* @__PURE__ */ o("span", { class: "btn-emoji" }, "👎", -1)), tt = /* @__PURE__ */ V(() => /* @__PURE__ */ o("span", { class: "btn-text" }, "不满意", -1)), st = [
@@ -211,7 +211,7 @@ const V = (c) => (we("data-v-94f32fe5"), c = c(), Ce(), c), Le = { class: "ai-di
211
211
  default: `你好呀!我是你的品种池AI助手,会根据您的自然语言去进行品种的条件查询
212
212
 
213
213
  示例:
214
- 帮我查A股科创板下品种转价差上证50并且总市值大于1千万, 按照总市值升序进行排序`
214
+ 帮我查A股科创板下品种转价差上证50并且总市值大于1千万, 最近一次红箱的开盘价大于前5根K线的最高价, 并按照总市值升序进行排序`
215
215
  }
216
216
  },
217
217
  emits: ["callBack"],
@@ -372,9 +372,9 @@ const V = (c) => (we("data-v-94f32fe5"), c = c(), Ce(), c), Le = { class: "ai-di
372
372
  try {
373
373
  const C = JSON.parse(e);
374
374
  if (C.parsedConditions && delete C.parsedConditions, (u = C.customTagNames) != null && u.length) {
375
- const re = C.customTagNames.reduce((U, ie) => {
376
- const K = d.value[ie];
377
- return K && U.push(K), U;
375
+ const re = C.customTagNames.reduce((K, ie) => {
376
+ const U = d.value[ie];
377
+ return U && K.push(U), K;
378
378
  }, []);
379
379
  delete C.customTagNames, C.customTag = re;
380
380
  }
@@ -486,8 +486,8 @@ const V = (c) => (we("data-v-94f32fe5"), c = c(), Ce(), c), Le = { class: "ai-di
486
486
  o("div", qe, G(u.createTime), 1),
487
487
  u.role === "assistant" ? (v(), y(O, { key: 2 }, [
488
488
  u.showFeedback && !u.hasFeedback ? (v(), y(O, { key: 0 }, [
489
- Ue,
490
- o("div", Ke, [
489
+ Ke,
490
+ o("div", Ue, [
491
491
  o("button", {
492
492
  class: "feedback-btn satisfied-btn",
493
493
  onClick: (C) => F("satisfied", f)
@@ -591,7 +591,7 @@ const V = (c) => (we("data-v-94f32fe5"), c = c(), Ce(), c), Le = { class: "ai-di
591
591
  ], 64);
592
592
  };
593
593
  }
594
- }, vt = /* @__PURE__ */ Ve(ft, [["__scopeId", "data-v-94f32fe5"]]), zt = {
594
+ }, vt = /* @__PURE__ */ Ve(ft, [["__scopeId", "data-v-536916ba"]]), zt = {
595
595
  install(c) {
596
596
  c.component("st-varietyAiHelper", vt);
597
597
  }
@@ -23,4 +23,4 @@
23
23
  hc8888    热轧卷板期货指数
24
24
  sp8888    纸浆期货指数
25
25
  bu8888    石油沥青期货指数`},null,8,["modelValue"])]),_:1},8,["modelValue"]),u.createVNode(tu,{"modal-class":"log-dialog",modelValue:V.value,"onUpdate:modelValue":E[20]||(E[20]=B=>V.value=B),width:"80vw","align-center":"","append-to-body":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:u.withCtx(({titleId:B,titleClass:W})=>[u.createElementVNode("div",kr,[u.createElementVNode("div",gr,[u.createElementVNode("span",{id:B,class:u.normalizeClass(W)}," 日志明细 ",10,vr)]),u.createElementVNode("div",yr,[u.createVNode(z,{onClick:E[18]||(E[18]=T=>V.value=!1)},{default:u.withCtx(()=>[u.createVNode(u.unref(Q.close_default))]),_:1})])])]),footer:u.withCtx(()=>[u.createElementVNode("div",Er,[u.createVNode(S,{type:"primary",loading:f.value,onClick:$e},{default:u.withCtx(()=>[u.createTextVNode(" AI分析 ")]),_:1},8,["loading"]),u.createVNode(S,{type:"primary",onClick:y},{default:u.withCtx(()=>[u.createTextVNode(" 复制 ")]),_:1}),u.createVNode(S,{onClick:E[19]||(E[19]=B=>V.value=!1)},{default:u.withCtx(()=>[u.createTextVNode("关闭")]),_:1})])]),default:u.withCtx(()=>[u.createElementVNode("div",Cr,[u.createVNode(ze,{class:"code",height:"600px"},{default:u.withCtx(()=>[u.createElementVNode("pre",null,u.toDisplayString(N.code),1)]),_:1}),u.createVNode(ze,{class:"log",height:"600px"},{default:u.withCtx(()=>[u.createElementVNode("pre",{class:u.normalizeClass(N.result===1?"success-log":"error-log")},u.toDisplayString(N.result===1?`✅️ 测试通过
26
- ${N.detail}`:N.detail),3)]),_:1}),u.createVNode(ze,{class:"ai",height:"600px"},{default:u.withCtx(()=>[N.ai?(u.openBlock(),u.createBlock(Bt,{key:0,mode:"preview","model-value":N.ai},null,8,["model-value"])):f.value?(u.openBlock(),u.createBlock(St,{key:1,rows:5,animated:""})):f.value?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(It,{key:2,description:"点击下方按钮: AI分析, 分析结果将会展示在此处"}))]),_:1})])]),_:1},8,["modelValue"]),u.createVNode(Ot,{ref_key:"stVarSelectDialogRef",ref:c},null,512)],64)}}},wr=Te._export_sfc(Dr,[["__scopeId","data-v-b6323311"]]);const uu=e=>(u.pushScopeId("data-v-6a791396"),e=e(),u.popScopeId(),e),Vr={key:0,class:"common-indicator"},Fr={class:"indicator"},Ar={class:"title"},Nr=uu(()=>u.createElementVNode("span",null,"常用指标: ",-1)),Tr={class:"options"},Br=["onClick"],Sr={class:"tags"},Ir=["onClick"],Or={style:{"font-size":"18px"}},$r={key:0,class:"out-box"},Mr=uu(()=>u.createElementVNode("span",null,"自定义: ",-1)),qr={key:0,class:"convenient-option-box"},Rr={class:"out-box"},zr=uu(()=>u.createElementVNode("span",null,"自定义: ",-1)),Lr={key:0},Pr={key:0},Ur={key:0},jr={key:1},Hr={class:"tFeaturelncomes-option-box"},Zr={class:"tFeaturelncomes-out-box"},Gr=uu(()=>u.createElementVNode("span",null,"自定义: ",-1)),Jr={key:2},Wr={key:3},Qr={key:4},Yr={key:5},Kr={key:6},Xr={key:7},ea={style:{display:"flex","align-items":"center"}},ua={key:8},ta={class:"dialog-footer"},na={__name:"index",props:u.mergeModels({config:{type:Object,default:()=>{}},varietyMarket:{type:Number,default:()=>null},commonOption:{type:Array,default:()=>[]}},{data:{default:[]},dataModifiers:{}}),emits:["update:data"],setup(e){const t=[{label:"近2周",value:"1"},{label:"近1个月",value:"2"},{label:"近3个月",value:"3"},{label:"近6个月",value:"4"},{label:"近1年",value:"5"}],n=[{label:"无保留意见",value:1},{label:"保留意见",value:2},{label:"否定意见",value:3},{label:"无法表示意见",value:4}],r=u.inject("clearRow"),a=u.useModel(e,"data"),o=e,l=u.ref(!1),c=u.computed(()=>{var g;return(g=o.data.find(h=>h.radioType==="1"))==null?void 0:g.key}),i=u.computed(()=>{let g=[];return o.varietyMarket===null&&!o.commonOption.length?g=o.config.options:(g=o.config.options,o.varietyMarket&&(g=g.filter(({parent:h})=>h.varietyMarketIds.includes(o.varietyMarket))),o.commonOption.length&&(g=g.filter(({parent:h})=>{const{commonOptionIds:F}=h;return[...new Set([...F,...o.commonOption])].length!==[...F,...o.commonOption].length}))),g}),d=u.ref({}),s=u.ref({}),p=g=>{d.value=g;const h={key:g.key,type:g.type,label:g.label};switch(g.key){case"st":{s.value={...h,st:null};break}case"tFeaturelncomes":{s.value={...h,rule:1,withFewYears:null,yearsCount:null,netProfit:null};break}case"priceLevels":{s.value={...h,priceLevels:null};break}case"peTtmLevels":{s.value={...h,peTtmLevels:null};break}case"peTrendTtmLevels":{s.value={...h,peTrendTtmLevels:null};break}case"optionsCpType":{s.value={...h,optionsCpType:null};break}case"perVolumn":{s.value={...h,radio:null,levels:[]};break}case"mainFlow":{s.value={...h,radioType:"0",rankRange:[null,null]};break}case"auditOpinionType":{s.value={...h,enumType:null};break}default:s.value={...h,range:[null,null],unit:g.defaultUnit.length?[...g.defaultUnit]:[null,null],radioType:c.value&&c.value!==g.key?"0":g.defaultRadioType,rankRange:g.defaultRankRange||[null,null]}}l.value=!0},x=()=>{var h,F;switch(s.value.key){case"st":{const{label:v,st:m}=s.value;if(m===null)return L.ElMessage.warning("格式错误: 请至少选择一个值");s.value.tagText=`${v}: ${m?"是":"否"}`;break}case"tFeaturelncomes":{const{label:v,rule:m,withFewYears:k,yearsCount:C,netProfit:A}=s.value;if(["",null].includes(k)||["",null].includes(C)||["",null].includes(A))return L.ElMessage.warning("格式错误: 请填写完整");s.value.tagText=`${v}: ${k}年内${C}年以上盈利${m===1?"超":"跌"}过${A}亿`;break}case"priceLevels":{const{label:v,priceLevels:m}=s.value;if(!m||m.length===0)return L.ElMessage.warning("格式错误: 请至少选择一个值");s.value.tagText=`${v}: 已选${m}分位`;break}case"peTtmLevels":{const{label:v,peTtmLevels:m}=s.value;if(!m||m.length===0)return L.ElMessage.warning("格式错误: 请至少选择一个值");s.value.tagText=`${v}: 已选${m}分位`;break}case"peTrendTtmLevels":{const{label:v,peTrendTtmLevels:m}=s.value;if(!m||m.length===0)return L.ElMessage.warning("格式错误: 请至少选择一个值");s.value.tagText=`${v}: 已选${m}分位`;break}case"optionsCpType":{const{label:v,optionsCpType:m}=s.value;if(m===null)return L.ElMessage.warning("格式错误: 请至少选择一个值");s.value.tagText=`${v}: ${m===1?"看涨":"看跌"}`;break}case"perVolumn":{const{label:v,radio:m,levels:k}=s.value;if(!m)return L.ElMessage.warning("格式错误: 请选择时间");if(!(k!=null&&k.length))return L.ElMessage.warning("格式错误: 请选择分位");s.value.tagText=`${v}: ${(h=t.find(C=>C.value===m))==null?void 0:h.label}${k.map(C=>`${C}分位`).join("、")}`;break}case"mainFlow":{const{label:v,radioType:m,radio:k,rankRange:C}=s.value,A=w=>{if(w===""||w===null||w===void 0)return!1;const O=Number(w);return!isNaN(O)};if(!k)return L.ElMessage.warning("格式错误: 请选择时间");if(!A(C[0])&&!A(C[1]))return L.ElMessage.warning(`格式错误: 请填写${m==="0"?"涨幅范围":"排名范围"}`);!["",null].includes(C[0])&&!["",null].includes(C[1])?s.value.tagText=`${v}: ${k}日${m==="0"?"涨幅范围":"排名范围"}: ${C[0]}${m==="0"?"%":""} ~ ${C[1]}${m==="0"?"%":""}`:["",null].includes(C[0])?s.value.tagText=`${v}: ${k}日${m==="0"?"涨幅范围":"排名范围"}: ≤${C[1]}${m==="0"?"%":""}`:s.value.tagText=`${v}: ${k}日${m==="0"?"涨幅范围":"排名范围"}: ≥${C[0]}${m==="0"?"%":""}`;break}case"auditOpinionType":{const{label:v,enumType:m}=s.value;if(m===null)return L.ElMessage.warning("格式错误: 请至少选择一个值");s.value.tagText=`${v}: ${(F=n.find(k=>k.value===m))==null?void 0:F.label}`;break}default:{const{label:v,unit:m,radioType:k}=s.value,C=k==="1"?s.value.rankRange:s.value.range;if(["",null].includes(C[0])&&["",null].includes(C[1]))return L.ElMessage.warning("格式错误: 请至少填写一个值");if(k==="1"){const O=Number(C[0]),$=Number(C[1]);if(isNaN(O)||isNaN($))return L.ElMessage.warning("格式错误: 请填写数字");if(O<0||$<0)return L.ElMessage.warning("格式错误: 请填写大于0的数字");if(O>$)return L.ElMessage.warning("格式错误: 请填写正确的排名范围")}const A=k==="1"?"":m[0]??"",w=k==="1"?"":m[1]??"";!["",null].includes(C[0])&&!["",null].includes(C[1])?s.value.tagText=`${v}${k==="1"?"排名":""}: ${C[0]}${A} ~ ${C[1]}${w}`:["",null].includes(C[0])?s.value.tagText=`${v}${k==="1"?"排名":""}: ≤${C[1]}${w}`:s.value.tagText=`${v}${k==="1"?"排名":""}: ≥${C[0]}${A}`}}const g=a.value.findIndex(({key:v})=>v===s.value.key);g===-1?a.value.push(s.value):a.value.splice(g,1,s.value),l.value=!1},f=g=>{d.value=i.value.find(({key:h})=>h===g.key),s.value=JSON.parse(JSON.stringify(g)),l.value=!0},b=g=>{a.value.splice(g,1)},D=g=>{s.value.range=[...g.range],s.value.unit=[...g.unit]},V=g=>{switch(g){case"≤0":Object.assign(s.value,{rule:2,withFewYears:1,yearsCount:1,netProfit:0});break;case"≥0":Object.assign(s.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:0});break;case"五年内有四年以上盈利超过5千万":Object.assign(s.value,{rule:1,withFewYears:5,yearsCount:4,netProfit:.5});break;case"≥10亿":Object.assign(s.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:10});break;case"≥20亿":Object.assign(s.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:20});break}};u.watch(()=>i.value,()=>{a.value.length&&(a.value=a.value.filter(({key:g})=>i.value.find(h=>h.key===g)))});const N=()=>{s.value.radio=null,s.value.rankRange=[null,null]};return(g,h)=>{const F=We.ElTag,v=hu,m=Be,k=bu.ElInput,C=Je.ElButton,A=xe.ElOption,w=xe.ElSelect,O=Qe,$=Gu.ElInputNumber,K=Ne.ElDialog;return e.config.show&&i.value.length?(u.openBlock(),u.createElementBlock("div",Vr,[u.createElementVNode("div",Fr,[u.createElementVNode("div",Ar,[Nr,u.createElementVNode("span",{onClick:h[0]||(h[0]=y=>u.unref(r)("commonIndicator"))},"不限")]),u.createElementVNode("div",Tr,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.value,y=>(u.openBlock(),u.createElementBlock("span",{key:y.key,onClick:_=>p(y)},u.toDisplayString(y.label),9,Br))),128))])]),u.createElementVNode("div",Sr,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.value,(y,_)=>(u.openBlock(),u.createBlock(F,{closable:"",type:"info",onClose:j=>b(_)},{default:u.withCtx(()=>[u.createElementVNode("span",null,u.toDisplayString(y.tagText),1),u.createElementVNode("span",{class:"edit",onClick:j=>f(y)},"编辑",8,Ir)]),_:2},1032,["onClose"]))),256))]),u.createVNode(K,{modelValue:l.value,"onUpdate:modelValue":h[28]||(h[28]=y=>l.value=y),title:d.value.label,width:"600","align-center":"","destroy-on-close":""},u.createSlots({footer:u.withCtx(()=>[u.createElementVNode("div",ta,[u.createVNode(C,{type:"primary",onClick:x},{default:u.withCtx(()=>[u.createTextVNode("确定")]),_:1})])]),default:u.withCtx(()=>{var y;return[d.value.type===void 0&&s.value.radioType==="1"?(u.openBlock(),u.createElementBlock("div",$r,[Mr,u.createVNode(k,{modelValue:s.value.rankRange[0],"onUpdate:modelValue":h[3]||(h[3]=_=>s.value.rankRange[0]=_),style:{flex:"1"}},null,8,["modelValue"]),u.createTextVNode(" ~ "),u.createVNode(k,{modelValue:s.value.rankRange[1],"onUpdate:modelValue":h[4]||(h[4]=_=>s.value.rankRange[1]=_),style:{flex:"1"}},null,8,["modelValue"])])):d.value.type===void 0?(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[(y=d.value.convenientOptions)!=null&&y.length?(u.openBlock(),u.createElementBlock("div",qr,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(d.value.convenientOptions,_=>(u.openBlock(),u.createBlock(C,{key:_.text,onClick:j=>D(_)},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(_.text),1)]),_:2},1032,["onClick"]))),128))])):u.createCommentVNode("",!0),u.createElementVNode("div",Rr,[zr,u.createVNode(k,{modelValue:s.value.range[0],"onUpdate:modelValue":h[6]||(h[6]=_=>s.value.range[0]=_),style:{flex:"1"}},u.createSlots({_:2},[d.value.unitOptions.length?{name:"append",fn:u.withCtx(()=>[d.value.unitOptions.length===1?(u.openBlock(),u.createElementBlock("span",Lr,u.toDisplayString(s.value.unit[0]),1)):(u.openBlock(),u.createBlock(w,{key:1,modelValue:s.value.unit[0],"onUpdate:modelValue":h[5]||(h[5]=_=>s.value.unit[0]=_),style:{width:"72px"}},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(d.value.unitOptions,_=>(u.openBlock(),u.createBlock(A,{label:_,value:_},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"]),u.createTextVNode(" ~ "),u.createVNode(k,{modelValue:s.value.range[1],"onUpdate:modelValue":h[8]||(h[8]=_=>s.value.range[1]=_),style:{flex:"1"}},u.createSlots({_:2},[d.value.unitOptions.length?{name:"append",fn:u.withCtx(()=>[d.value.unitOptions.length===1?(u.openBlock(),u.createElementBlock("span",Pr,u.toDisplayString(s.value.unit[1]),1)):(u.openBlock(),u.createBlock(w,{key:1,modelValue:s.value.unit[1],"onUpdate:modelValue":h[7]||(h[7]=_=>s.value.unit[1]=_),style:{width:"72px"}},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(d.value.unitOptions,_=>(u.openBlock(),u.createBlock(A,{label:_,value:_},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"])])],64)):(u.openBlock(),u.createElementBlock(u.Fragment,{key:2},[d.value.key==="st"?(u.openBlock(),u.createElementBlock("div",Ur,[u.createVNode(m,{modelValue:s.value.st,"onUpdate:modelValue":h[9]||(h[9]=_=>s.value.st=_)},{default:u.withCtx(()=>[u.createVNode(O,{label:"是",value:1}),u.createVNode(O,{label:"否",value:0})]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),d.value.key==="tFeaturelncomes"?(u.openBlock(),u.createElementBlock("div",jr,[u.createElementVNode("div",Hr,[u.createVNode(C,{onClick:h[10]||(h[10]=_=>V("≤0"))},{default:u.withCtx(()=>[u.createTextVNode("≤0")]),_:1}),u.createVNode(C,{onClick:h[11]||(h[11]=_=>V("≥0"))},{default:u.withCtx(()=>[u.createTextVNode("≥0")]),_:1}),u.createVNode(C,{onClick:h[12]||(h[12]=_=>V("五年内有四年以上盈利超过5千万"))},{default:u.withCtx(()=>[u.createTextVNode("五年内有四年以上盈利超过5千万")]),_:1}),u.createVNode(C,{onClick:h[13]||(h[13]=_=>V("≥10亿"))},{default:u.withCtx(()=>[u.createTextVNode("≥10亿")]),_:1}),u.createVNode(C,{onClick:h[14]||(h[14]=_=>V("≥20亿"))},{default:u.withCtx(()=>[u.createTextVNode("≥20亿")]),_:1})]),u.createElementVNode("div",Zr,[Gr,u.createElementVNode("div",null,[u.createVNode($,{modelValue:s.value.withFewYears,"onUpdate:modelValue":h[15]||(h[15]=_=>s.value.withFewYears=_),"controls-position":"right"},null,8,["modelValue"]),u.createTextVNode(" 年内 "),u.createVNode($,{modelValue:s.value.yearsCount,"onUpdate:modelValue":h[16]||(h[16]=_=>s.value.yearsCount=_),"controls-position":"right"},null,8,["modelValue"]),u.createTextVNode(" 年以上盈利"+u.toDisplayString(s.value.rule===1?"超":"跌")+"过 ",1),u.createVNode($,{modelValue:s.value.netProfit,"onUpdate:modelValue":h[17]||(h[17]=_=>s.value.netProfit=_),"controls-position":"right"},null,8,["modelValue"]),u.createTextVNode(" 亿 ")])])])):u.createCommentVNode("",!0),d.value.key==="priceLevels"?(u.openBlock(),u.createElementBlock("div",Jr,[u.createVNode(w,{modelValue:s.value.priceLevels,"onUpdate:modelValue":h[18]||(h[18]=_=>s.value.priceLevels=_),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:u.withCtx(()=>[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList([1,2,3,4,5],_=>u.createVNode(A,{key:_,label:`${_}分位`,value:_},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),d.value.key==="peTtmLevels"?(u.openBlock(),u.createElementBlock("div",Wr,[u.createVNode(w,{modelValue:s.value.peTtmLevels,"onUpdate:modelValue":h[19]||(h[19]=_=>s.value.peTtmLevels=_),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:u.withCtx(()=>[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList([1,2,3,4,5,6,7,8,9,10],_=>u.createVNode(A,{key:_,label:`${_}分位`,value:_},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),d.value.key==="peTrendTtmLevels"?(u.openBlock(),u.createElementBlock("div",Qr,[u.createVNode(w,{modelValue:s.value.peTrendTtmLevels,"onUpdate:modelValue":h[20]||(h[20]=_=>s.value.peTrendTtmLevels=_),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:u.withCtx(()=>[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList([1,2,3,4,5,6,7,8,9,10],_=>u.createVNode(A,{key:_,label:`${_}分位`,value:_},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),d.value.key==="optionsCpType"?(u.openBlock(),u.createElementBlock("div",Yr,[u.createVNode(m,{modelValue:s.value.optionsCpType,"onUpdate:modelValue":h[21]||(h[21]=_=>s.value.optionsCpType=_)},{default:u.withCtx(()=>[u.createVNode(O,{label:"看涨",value:1}),u.createVNode(O,{label:"看跌",value:2})]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),d.value.key==="perVolumn"?(u.openBlock(),u.createElementBlock("div",Kr,[u.createVNode(m,{modelValue:s.value.radio,"onUpdate:modelValue":h[22]||(h[22]=_=>s.value.radio=_)},{default:u.withCtx(()=>[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList(t,_=>u.createVNode(O,{key:_.value,value:_.value},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(_.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"]),u.createVNode(w,{modelValue:s.value.levels,"onUpdate:modelValue":h[23]||(h[23]=_=>s.value.levels=_),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:u.withCtx(()=>[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList([1,2,3,4,5],_=>u.createVNode(A,{key:_,label:`${_}分位`,value:_},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),d.value.key==="mainFlow"?(u.openBlock(),u.createElementBlock("div",Xr,[u.createVNode(m,{modelValue:s.value.radio,"onUpdate:modelValue":h[24]||(h[24]=_=>s.value.radio=_)},{default:u.withCtx(()=>[u.createVNode(O,{value:"3"},{default:u.withCtx(()=>[u.createTextVNode("3日")]),_:1}),u.createVNode(O,{value:"5"},{default:u.withCtx(()=>[u.createTextVNode("5日")]),_:1}),u.createVNode(O,{value:"10"},{default:u.withCtx(()=>[u.createTextVNode("10日")]),_:1}),u.createVNode(O,{value:"20"},{default:u.withCtx(()=>[u.createTextVNode("20日")]),_:1})]),_:1},8,["modelValue"]),u.createElementVNode("div",ea,[u.createElementVNode("span",null,u.toDisplayString(s.value.radioType==="0"?"涨幅范围":"排名范围")+": ",1),u.createVNode(k,{modelValue:s.value.rankRange[0],"onUpdate:modelValue":h[25]||(h[25]=_=>s.value.rankRange[0]=_),style:{flex:"1"}},null,8,["modelValue"]),u.createTextVNode(" ~ "),u.createVNode(k,{modelValue:s.value.rankRange[1],"onUpdate:modelValue":h[26]||(h[26]=_=>s.value.rankRange[1]=_),style:{flex:"1"}},null,8,["modelValue"])])])):u.createCommentVNode("",!0),d.value.key==="auditOpinionType"?(u.openBlock(),u.createElementBlock("div",ua,[u.createVNode(m,{modelValue:s.value.enumType,"onUpdate:modelValue":h[27]||(h[27]=_=>s.value.enumType=_)},{default:u.withCtx(()=>[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList(n,(_,j)=>u.createVNode(O,{key:j,label:_.label,value:_.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0)],64))]}),_:2},[d.value.showRankType?{name:"header",fn:u.withCtx(()=>[u.createElementVNode("span",Or,u.toDisplayString(d.value.label),1),u.createVNode(m,{modelValue:s.value.radioType,"onUpdate:modelValue":h[1]||(h[1]=y=>s.value.radioType=y),style:{"vertical-align":"4px","margin-left":"12px"}},{default:u.withCtx(()=>[u.createVNode(v,{label:"数值",value:"0"}),u.createVNode(v,{disabled:c.value&&c.value!==d.value.key,label:"排名",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"0"}:d.value.key==="mainFlow"?{name:"header",fn:u.withCtx(()=>[u.createElementVNode("span",{style:{"font-size":"18px"}},u.toDisplayString(d.value.label),1),u.createVNode(m,{modelValue:s.value.radioType,"onUpdate:modelValue":h[2]||(h[2]=y=>s.value.radioType=y),style:{"vertical-align":"4px","margin-left":"12px"},onChange:N},{default:u.withCtx(()=>[u.createVNode(v,{label:"涨幅范围",value:"0"}),u.createVNode(v,{disabled:c.value&&c.value!==d.value.key,label:"排名范围",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"1"}:void 0]),1032,["modelValue","title"])])):u.createCommentVNode("",!0)}}},oa=Te._export_sfc(na,[["__scopeId","data-v-6a791396"]]);const ra=e=>(u.pushScopeId("data-v-07aa9e1a"),e=e(),u.popScopeId(),e),aa={key:0,class:"composite-order"},la={class:"title"},ca=ra(()=>u.createElementVNode("span",null,"组合排序: ",-1)),ia={class:"tag-box"},sa=["onClick"],da={class:"custom-header"},fa={class:"left"},pa=["id"],ba={class:"right"},ha={class:"dialog-footer"},ma={__name:"index",props:u.mergeModels({config:{type:Object,default:()=>{}},varietyMarket:{type:Number,default:()=>null},commonOption:{type:Array,default:()=>[]}},{data:{default:[]},dataModifiers:{}}),emits:u.mergeModels(["actionState"],["update:data"]),setup(e,{emit:t}){const n=u.inject("clearRow"),r=u.useModel(e,"data"),a=t,o=e,l=u.ref(!1),c=u.ref({id:null,name:null,value:"desc"}),i=u.computed(()=>{let s=[];return o.varietyMarket===null&&!o.commonOption.length?s=o.config.options:(s=o.config.options,o.varietyMarket&&(s=s.filter(({parent:p})=>p.varietyMarketIds.includes(o.varietyMarket))),o.commonOption.length&&(s=s.filter(({parent:p})=>{const{commonOptionIds:x}=p;return[...new Set([...x,...o.commonOption])].length!==[...x,...o.commonOption].length}))),s}),d=(s,p)=>{switch(s){case"add":{c.value={id:null,name:null,value:"desc"},l.value=!0;break}case"edit":{const x=r.value[p];c.value={...x},l.value=!0;break}case"submit":{a("actionState","组合排序");const{id:x,name:f,value:b}=c.value;if(!f)return L.ElMessage.warning("请选择需要排序的条件");const{label:D}=i.value.find(N=>N.key===f),V=`${D}-${b==="asc"?"升序↑":"降序↓"}`;if(x===null){const N=r.value.findIndex(g=>g.name===f);N===-1?r.value.push({...c.value,id:f,tagText:V}):r.value.splice(N,1,{...c.value,id:f,tagText:V})}else if(c.value.id){const N=r.value.findIndex(h=>h.name===x),g=r.value.findIndex(h=>h.name===f);r.value[N]={...c.value,id:f,tagText:V},g!==-1&&N!==g&&r.value.splice(g,1)}l.value=!1;break}case"delete":{r.value.splice(p,1);break}}};return u.watch(()=>i.value,()=>{r.value.length&&(r.value=r.value.filter(({name:s})=>i.value.find(p=>p.key===s)))}),(s,p)=>{const x=We.ElTag,f=Je.ElButton,b=Q.ElIcon,D=xe.ElOption,V=xe.ElSelect,N=Ue.ElFormItem,g=Qe,h=Be,F=Ue.ElForm,v=Ne.ElDialog;return e.config.show&&i.value.length?(u.openBlock(),u.createElementBlock("div",aa,[u.createElementVNode("div",la,[ca,u.createElementVNode("span",{onClick:p[0]||(p[0]=m=>u.unref(n)("compositeOrder"))},"不限")]),u.createElementVNode("div",ia,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.value,(m,k)=>(u.openBlock(),u.createBlock(x,{closable:"",type:"info",onClose:C=>d("delete",k)},{default:u.withCtx(()=>[u.createElementVNode("span",null,u.toDisplayString(m.tagText),1),u.createElementVNode("span",{class:"edit",onClick:C=>d("edit",k)},"编辑",8,sa)]),_:2},1032,["onClose"]))),256)),u.createVNode(f,{type:"primary",plain:"",size:"small",icon:u.unref(Q.plus_default),onClick:p[1]||(p[1]=m=>d("add"))},{default:u.withCtx(()=>[u.createTextVNode(" 添加排序 ")]),_:1},8,["icon"])]),u.createVNode(v,{"modal-class":"order-dialog",modelValue:l.value,"onUpdate:modelValue":p[7]||(p[7]=m=>l.value=m),width:"400","align-center":"","destroy-on-close":"",overflow:"","show-close":!1},{header:u.withCtx(({titleId:m,titleClass:k})=>[u.createElementVNode("div",da,[u.createElementVNode("div",fa,[u.createElementVNode("span",{id:m,class:u.normalizeClass(k)}," 添加条件 ",10,pa)]),u.createElementVNode("div",ba,[u.createVNode(b,{onClick:p[2]||(p[2]=C=>l.value=!1)},{default:u.withCtx(()=>[u.createVNode(u.unref(Q.close_default))]),_:1})])])]),footer:u.withCtx(()=>[u.createElementVNode("div",ha,[u.createVNode(f,{onClick:p[5]||(p[5]=m=>l.value=!1)},{default:u.withCtx(()=>[u.createTextVNode("取消")]),_:1}),u.createVNode(f,{type:"primary",onClick:p[6]||(p[6]=m=>d("submit"))},{default:u.withCtx(()=>[u.createTextVNode(" 确定 ")]),_:1})])]),default:u.withCtx(()=>[u.createVNode(F,{ref:"compositeOrderFormRef",model:c.value},{default:u.withCtx(()=>[u.createVNode(N,{label:"添加条件: "},{default:u.withCtx(()=>[u.createVNode(V,{modelValue:c.value.name,"onUpdate:modelValue":p[3]||(p[3]=m=>c.value.name=m),filterable:"",placeholder:"请选择","no-match-text":"未匹配到相关条件"},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.value,({label:m,key:k})=>(u.openBlock(),u.createBlock(D,{label:m,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),u.createVNode(N,{label:"排序方式: "},{default:u.withCtx(()=>[u.createVNode(h,{modelValue:c.value.value,"onUpdate:modelValue":p[4]||(p[4]=m=>c.value.value=m)},{default:u.withCtx(()=>[u.createVNode(g,{label:"升序",value:"asc"}),u.createVNode(g,{label:"降序",value:"desc"})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0)}}},xa=Te._export_sfc(ma,[["__scopeId","data-v-07aa9e1a"]]);const _a={class:"tag-list"},ka={class:"tab-list-item"},ga={style:{display:"flex",width:"280px"}},va={style:{flex:"1","line-height":"24px"}},ya={class:"dialog-footer"},Ca={style:{"margin-bottom":"12px"}},Ea={class:"dialog-footer"},Da={__name:"index",props:{data:{default:[]},dataModifiers:{}},emits:["update:data"],setup(e){let t=null;const{request:n}=u.inject("stConfig"),r=u.useModel(e,"data"),a=u.ref(!1),o=u.ref("person"),l=u.ref(""),c=u.ref({}),i=u.ref([]),d=u.ref([]),s=u.ref(!1),p=u.ref(null),x=u.ref(""),f=u.computed(()=>r.value.map(m=>({name:c.value[m],id:m})));u.watch(()=>o.value,()=>{l.value="",F()}),u.watch(()=>l.value,()=>{clearTimeout(t),t=setTimeout(()=>{F()},300)});const b=m=>!!d.value.includes(m.id),D=m=>{b(m)?d.value=d.value.filter(k=>k!==m.id):d.value.push(m.id)},V=(m,k)=>{switch(m){case"add":{i.value=[],a.value=!0,l.value="",d.value=[...r.value],F();break}case"submit":{a.value=!1,r.value=[...d.value];break}case"delete":{r.value.splice(k,1);break}}},N=m=>{Wu.ElMessageBox.alert(`确认删除标签“${m.name}”吗?`,"删除标签",{confirmButtonText:"OK",callback:async k=>{k==="confirm"&&(await n.post("/alarm/deliversign/deleteTag",{tagId:m.id}),F(),L.ElMessage.success("删除成功!"))}})},g=m=>{p.value=m,x.value=m.name,s.value=!0},h=async()=>{await n.post("/alarm/deliversign/addOrUpdateFeatureTag",{tagName:x.value,tagId:p.value.id}),c.value={...c.value,[p.value.id]:x.value},i.value=i.value.map(m=>m.id===p.value.id?{...m,name:x.value}:m),s.value=!1,L.ElMessage.success("修改成功!")},F=async()=>{if(o.value==="person"){const m=await n.post("/alarm/deliversign/findTagsByUserId",{tagName:l.value});i.value=[],c.value={...c.value,...m.body.reduce((k,C)=>({...k,[C.id]:C.tagName}),{})},u.nextTick(()=>{var k;i.value=(k=m.body)==null?void 0:k.map(C=>({name:C.tagName,id:C.id}))})}else{const m=await n.post("/alarm/deliversign/findSystemTagsByTagName",{tagName:l.value});i.value=[],c.value={...c.value,...m.body.reduce((k,C)=>({...k,[C.id]:C.tagName}),{})},u.nextTick(()=>{var k;i.value=(k=m.body)==null?void 0:k.map(C=>({name:C.tagName,id:C.id}))})}};return(async()=>{const m=await Promise.all([n.post("/alarm/deliversign/findTagsByUserId"),n.post("/alarm/deliversign/findSystemTagsByTagName")]);c.value=m.reduce((k,C)=>{var A;return{...k,...(A=C.body)==null?void 0:A.reduce((w,O)=>({...w,[O.id]:O.tagName}),{})}},{})})(),(m,k)=>{const C=We.ElTag,A=Je.ElButton,w=hu,O=Be,$=bu.ElInput,K=su.ElCheckbox,y=Ne.ElDialog;return u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createElementVNode("div",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(f.value,(_,j)=>(u.openBlock(),u.createBlock(C,{closable:"",style:{"margin-right":"10px"},type:"info",onClose:$e=>V("delete",j)},{default:u.withCtx(()=>[u.createElementVNode("span",null,u.toDisplayString(_.name),1)]),_:2},1032,["onClose"]))),256)),u.createVNode(A,{class:"screen-btn",type:"primary",plain:"",size:"small",icon:u.unref(Q.plus_default),onClick:k[0]||(k[0]=_=>V("add"))},{default:u.withCtx(()=>[u.createTextVNode(" 添加标签 ")]),_:1},8,["icon"])]),u.createVNode(y,{modelValue:a.value,"onUpdate:modelValue":k[5]||(k[5]=_=>a.value=_),width:"1000"},{header:u.withCtx(()=>[u.createElementVNode("div",null,[u.createTextVNode(" 添加标签 "),u.createVNode(O,{modelValue:o.value,"onUpdate:modelValue":k[1]||(k[1]=_=>o.value=_),size:"small",style:{"margin-left":"8px","vertical-align":"5px"}},{default:u.withCtx(()=>[u.createVNode(w,{label:"个人",value:"person"}),u.createVNode(w,{label:"系统",value:"system"})]),_:1},8,["modelValue"]),u.createVNode($,{modelValue:l.value,"onUpdate:modelValue":k[2]||(k[2]=_=>l.value=_),size:"small",style:{width:"120px","margin-left":"8px"},placeholder:"请输入标签名称"},null,8,["modelValue"])])]),footer:u.withCtx(()=>[u.createElementVNode("div",ya,[u.createVNode(A,{onClick:k[3]||(k[3]=_=>a.value=!1)},{default:u.withCtx(()=>[u.createTextVNode("取消")]),_:1}),u.createVNode(A,{type:"primary",onClick:k[4]||(k[4]=_=>V("submit"))},{default:u.withCtx(()=>[u.createTextVNode("确定")]),_:1})])]),default:u.withCtx(()=>[u.createElementVNode("div",_a,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.value,_=>(u.openBlock(),u.createElementBlock("div",ka,[u.createVNode(K,{checked:b(_),onChange:j=>D(_)},{default:u.withCtx(()=>[u.createElementVNode("div",ga,[u.createElementVNode("div",va,u.toDisplayString(_.name),1),o.value==="person"?(u.openBlock(),u.createBlock(A,{key:0,size:"small",icon:u.unref(Q.edit_default),onClick:j=>g(_)},null,8,["icon","onClick"])):u.createCommentVNode("",!0),o.value==="person"?(u.openBlock(),u.createBlock(A,{key:1,size:"small",icon:u.unref(Q.delete_default),onClick:j=>N(_)},null,8,["icon","onClick"])):u.createCommentVNode("",!0)])]),_:2},1032,["checked","onChange"])]))),256))])]),_:1},8,["modelValue"]),u.createVNode(y,{modelValue:s.value,"onUpdate:modelValue":k[9]||(k[9]=_=>s.value=_),title:"编辑标签",top:"20vh",width:"600"},{footer:u.withCtx(()=>[u.createElementVNode("div",Ea,[u.createVNode(A,{onClick:k[7]||(k[7]=_=>s.value=!1)},{default:u.withCtx(()=>[u.createTextVNode("取消")]),_:1}),u.createVNode(A,{type:"primary",onClick:k[8]||(k[8]=_=>h())},{default:u.withCtx(()=>[u.createTextVNode("确定")]),_:1})])]),default:u.withCtx(()=>{var _;return[u.createElementVNode("div",Ca,"原名称:"+u.toDisplayString((_=p.value)==null?void 0:_.name),1),u.createVNode($,{modelValue:x.value,"onUpdate:modelValue":k[6]||(k[6]=j=>x.value=j)},null,8,["modelValue"])]}),_:1},8,["modelValue"])],64)}}},wa=Te._export_sfc(Da,[["__scopeId","data-v-7f5f72e8"]]);const De=e=>(u.pushScopeId("data-v-22fde7d8"),e=e(),u.popScopeId(),e),Va={class:"variety-search"},Fa={key:0,class:"variety-search-row"},Aa={class:"title"},Na=De(()=>u.createElementVNode("span",null,"品种市场: ",-1)),Ta={key:1,class:"variety-search-row"},Ba={class:"title"},Sa=De(()=>u.createElementVNode("span",null,"常用选项: ",-1)),Ia={key:2,class:"variety-search-row"},Oa={class:"title"},$a=De(()=>u.createElementVNode("span",null,"上市板块: ",-1)),Ma={key:3,class:"variety-search-row"},qa={class:"title"},Ra=De(()=>u.createElementVNode("span",null,"自定标签: ",-1)),za={key:4,class:"variety-search-row"},La={class:"title"},Pa=De(()=>u.createElementVNode("span",null,"价差转换: ",-1)),Ua={key:5,class:"variety-search-row"},ja={class:"title"},Ha=De(()=>u.createElementVNode("span",null,"因子筛选: ",-1)),Za={__name:"index",props:u.mergeModels({config:{type:Object,default:{}}},{searchData:{},searchDataModifiers:{}}),emits:u.mergeModels(["actionState"],["update:searchData"]),setup(e,{expose:t,emit:n}){const r=n,a=e,o=u.useModel(e,"searchData");o.value=Object.assign(o.value,{varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[],compositeOrder:[]});const l=u.computed(()=>{const x={};return Object.keys(Vu).forEach(f=>{const b=Vu[f],D=a.config[f]??{},V={...b,...D};x[f]=V}),x}),c=u.computed(()=>l.value.varietyMarket.options),i=u.computed(()=>{const{varietyMarket:x}=o.value;return x?c.value.find(({value:b})=>b===x).memo.reduce((b,D)=>{const V=l.value.commonOption.options.find(N=>N.value===D);return V&&b.push(V),b},[]):l.value.commonOption.options}),d=u.computed(()=>{const{varietyMarket:x}=o.value;return x?l.value.marketIds.options.filter(f=>f.varietyMarketIds.includes(x)):l.value.marketIds.options}),s=u.computed(()=>l.value.jcTranslate.jcOptions),p=x=>{switch(x){case"commonOption":{o.value[x]=[];break}case"marketIds":{o.value[x]=[];break}case"customTag":{o.value[x]=[];break}case"jcTranslate":{o.value[x]={type:null,jcList:[]};break}case"factorScreen":{o.value[x]={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""};break}case"commonIndicator":{o.value[x]=[];break}case"compositeOrder":{o.value[x]=[];break}default:{o.value[x]=null;break}}};return u.watch(()=>i.value,x=>{var f;(f=o.value.commonOption)!=null&&f.length&&(o.value.commonOption=o.value.commonOption.filter(b=>x.find(({value:D})=>D===b)))}),u.watch(()=>d.value,x=>{var f;(f=o.value.marketIds)!=null&&f.length&&(o.value.marketIds=o.value.marketIds.filter(b=>x.find(({value:D})=>D===b)))}),u.provide("clearRow",p),t({formatData:x=>{var b,D,V,N,g,h,F;console.log("%c[st-varietySearch]: 正在生成接口传参...","color: tomato");const f={};if(x.varietyMarket&&(f.exchangeId=String(x.varietyMarket)),(b=x.commonOption)!=null&&b.length&&(f.optionId=x.commonOption.join(",")),(D=x.marketIds)!=null&&D.length&&(f.marketIds=x.marketIds),(V=x.customTag)!=null&&V.length&&(f.tagIds=x.customTag),(N=l.value.jcTranslate)!=null&&N.show){const{jcTranslate:v}=x,{type:m,jcList:k}=v;switch(m){case 1:{f.translateType=1,f.jcType=k.join(",");break}case 2:f.translateType=2}}if((g=l.value.factorScreen)!=null&&g.show){const{factorScreen:v}=x;if((h=v==null?void 0:v.list)!=null&&h.length&&(f.tbFeatureFactorScores=v.list.map(m=>{switch(m.key){case"compare":return{freqId:m.cycle,factorId:m.factor,compareType:m.compareType,freqId2:m.cycle2,factorId2:m.factor2};default:return{freqId:m.cycle,factorId:m.factor,startScore:m.score[0],endScore:m.score[1]}}})),v.sqlEnable){const m=v.list.reduce((C,A,w)=>{var $,K;const O=`条件${w+1}`;switch(A.key){case"compare":{let y="";($=l.value.factorScreen)!=null&&$.cycleShow?y=`freq_id = ${A.cycle} and factor_id = ${A.factor} ${A.compareType} freq_id = ${A.cycle2} and factor_id = ${A.factor2}`:y=`factor_id = ${A.factor} ${A.compareType} factor_id = ${A.factor2}`,C.set(O,`(${y})`);break}default:{let y=`factor_id = ${A.factor} and `;(K=l.value.factorScreen)!=null&&K.cycleShow&&(y=`freq_id = ${A.cycle} and factor_id = ${A.factor} and `),(A.score[0]||A.score[0]===0)&&(A.score[1]||A.score[1]===0)?y+=`score >= ${A.score[0]} and score <= ${A.score[1]}`:A.score[0]||A.score[0]===0?y+=`score >= ${A.score[0]}`:(A.score[1]||A.score[1]===0)&&(y+=`score <= ${A.score[1]}`),C.set(O,`(${y})`)}}return C},new Map([]));let k=v.sqlValue;for(const[C,A]of m){const w=new RegExp(C,"g");k=k.replace(w,A)}f.sql=k,f.sqlExpression=v.sqlValue}f.enableSql=v.sqlEnable===1?2:1,v.factorSelectExpr&&(f.factorSelectExpr=v.factorSelectExpr)}{const v=["expireDays","virtualRealDegree","yearProfitRate","impliedVolatility","levelMultiplier","turnover","volume","openInterest","optionsCpType","optionGear"],m=x.commonIndicator.reduce((y,_)=>{const{key:j,type:$e,range:I,unit:E,radioType:R,radio:M,rankRange:P}=_;if(j==="mainFlow"){let[S,z]=P,Z=R==="0"?`netInfow${M}d`:`last${M}DayMainFlowRank`;y.push({column:Z,start:S,end:z})}if(j==="auditOpinionType")y.push({column:_.key,enumType:_.enumType});else if(R==="1")f.sortBy={column:_.key,start:P[0]||null,end:P[1]||null};else if(["dividendYield","incrementRevenueLyr","netProfitGrowthRatioLyr","fiveYearRoe"].includes(j)){let[S,z]=I;["",null].includes(S)||(S=S/100),["",null].includes(z)||(z=z/100),y.push({column:_.key,start:S,end:z})}else if($e===void 0&&!v.includes(j)){let[S,z]=I;if(!["",null].includes(S))switch(E[0]){case"亿":S=S*1e8;break;case"千万":S=S*1e7;break;default:S=S;break}if(!["",null].includes(z))switch(E[1]){case"亿":z=z*1e8;break;case"千万":z=z*1e7;break;default:z=z;break}y.push({column:_.key,start:S,end:z})}return y},[]);m.length&&(f.query=m);const k=x.commonIndicator.find(({key:y})=>y==="st");k&&(f.st=k.st);const C=x.commonIndicator.find(({key:y})=>y==="tFeaturelncomes");C&&(f.netProfitQueryDto={...C,netProfit:C.netProfit*1e8});const A=x.commonIndicator.find(({key:y})=>y==="priceLevels");A&&(f.priceLevels=A.priceLevels);const w=x.commonIndicator.find(({key:y})=>y==="peTtmLevels");w&&(f.peTtmLevels=w.peTtmLevels);const O=x.commonIndicator.find(({key:y})=>y==="peTrendTtmLevels");O&&(f.peTrendTtmLevels=O.peTrendTtmLevels);const $={};x.commonIndicator.forEach(y=>{const{key:_}=y;switch(_){case"expireDays":["",null].includes(y.range[0])||($.minExpireDays=y.range[0]),["",null].includes(y.range[1])||($.maxExpireDays=y.range[1]);break;case"virtualRealDegree":["",null].includes(y.range[0])||($.minVirtualRealDegree=y.range[0]/100),["",null].includes(y.range[1])||($.maxVirtualRealDegree=y.range[1]/100);break;case"yearProfitRate":["",null].includes(y.range[0])||($.minYearProfitRate=y.range[0]/100),["",null].includes(y.range[1])||($.maxYearProfitRate=y.range[1]/100);break;case"impliedVolatility":["",null].includes(y.range[0])||($.minImpliedVolatility=y.range[0]/100),["",null].includes(y.range[1])||($.maxImpliedVolatility=y.range[1]/100);break;case"levelMultiplier":["",null].includes(y.range[0])||($.minLevelMultiplier=y.range[0]),["",null].includes(y.range[1])||($.maxLevelMultiplier=y.range[1]);break;case"turnover":["",null].includes(y.range[0])||($.minTurnover=y.range[0]*1e4),["",null].includes(y.range[1])||($.maxTurnover=y.range[1]*1e4);break;case"volume":["",null].includes(y.range[0])||($.minVolume=y.range[0]),["",null].includes(y.range[1])||($.maxVolume=y.range[1]);break;case"openInterest":["",null].includes(y.range[0])||($.minOpenInterest=y.range[0]),["",null].includes(y.range[1])||($.maxOpenInterest=y.range[1]);break;case"optionsCpType":$.optionsCpType=y.optionsCpType;break;case"optionGear":["",null].includes(y.range[0])||($.minOptionGear=y.range[0]),["",null].includes(y.range[1])||($.maxOptionGear=y.range[1]);break}});const K=x.commonIndicator.find(({key:y})=>y==="perVolumn");K&&(f.perVolumn={type:K.radio,value:K.levels}),Object.keys($).length&&(f.searchOptionDto={...f.searchOptionDto,...$})}return(F=x.compositeOrder)!=null&&F.length&&(f.compositeOrder=x.compositeOrder.map(({name:v,value:m})=>({name:v,value:m}))),console.log("%c[st-varietySearch]: 接口传参数据生成完毕","color: green",f),f},reset:()=>{o.value={varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[],compositeOrder:[]}}}),(x,f)=>{var F,v,m,k,C,A;const b=Qe,D=Be,V=su.ElCheckbox,N=su.ElCheckboxGroup,g=xe.ElOption,h=xe.ElSelect;return u.openBlock(),u.createElementBlock("div",Va,[(F=l.value.varietyMarket)!=null&&F.show?(u.openBlock(),u.createElementBlock("div",Fa,[u.createElementVNode("div",Aa,[Na,u.createElementVNode("span",{onClick:f[0]||(f[0]=w=>p("varietyMarket"))},"不限")]),u.createVNode(D,{modelValue:o.value.varietyMarket,"onUpdate:modelValue":f[1]||(f[1]=w=>o.value.varietyMarket=w),size:"small"},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(c.value,({label:w,value:O})=>(u.openBlock(),u.createBlock(b,{label:w,value:O,key:O},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),(v=l.value.commonOption)!=null&&v.show&&i.value.length?(u.openBlock(),u.createElementBlock("div",Ta,[u.createElementVNode("div",Ba,[Sa,u.createElementVNode("span",{onClick:f[2]||(f[2]=w=>p("commonOption"))},"不限")]),u.createVNode(N,{modelValue:o.value.commonOption,"onUpdate:modelValue":f[3]||(f[3]=w=>o.value.commonOption=w),size:"small"},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.value,({label:w,value:O})=>(u.openBlock(),u.createBlock(V,{label:w,value:O,key:O},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),(m=l.value.marketIds)!=null&&m.show&&d.value.length?(u.openBlock(),u.createElementBlock("div",Ia,[u.createElementVNode("div",Oa,[$a,u.createElementVNode("span",{onClick:f[4]||(f[4]=w=>p("marketIds"))},"不限")]),u.createVNode(N,{modelValue:o.value.marketIds,"onUpdate:modelValue":f[5]||(f[5]=w=>o.value.marketIds=w),size:"small"},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(d.value,({label:w,value:O})=>(u.openBlock(),u.createBlock(V,{label:w,value:O,key:O},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),(k=l.value.customTag)!=null&&k.show?(u.openBlock(),u.createElementBlock("div",Ma,[u.createElementVNode("div",qa,[Ra,u.createElementVNode("span",{onClick:f[6]||(f[6]=w=>p("customTag"))},"不限")]),u.createVNode(wa,{data:o.value.customTag,"onUpdate:data":f[7]||(f[7]=w=>o.value.customTag=w)},null,8,["data"])])):u.createCommentVNode("",!0),(C=l.value.jcTranslate)!=null&&C.show?(u.openBlock(),u.createElementBlock("div",za,[u.createElementVNode("div",La,[Pa,u.createElementVNode("span",{onClick:f[8]||(f[8]=w=>p("jcTranslate"))},"不限")]),u.createVNode(D,{modelValue:o.value.jcTranslate.type,"onUpdate:modelValue":f[9]||(f[9]=w=>o.value.jcTranslate.type=w),size:"small"},{default:u.withCtx(()=>[u.createVNode(b,{value:2},{default:u.withCtx(()=>[u.createTextVNode("价差转品种")]),_:1}),u.createVNode(b,{value:1},{default:u.withCtx(()=>[u.createTextVNode("品种转价差")]),_:1})]),_:1},8,["modelValue"]),u.withDirectives(u.createVNode(h,{modelValue:o.value.jcTranslate.jcList,"onUpdate:modelValue":f[10]||(f[10]=w=>o.value.jcTranslate.jcList=w),size:"small",multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"请选择价差品种",style:{width:"140px"}},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(s.value,w=>(u.openBlock(),u.createBlock(g,{key:w.value,label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),[[u.vShow,o.value.jcTranslate.type===1]])])):u.createCommentVNode("",!0),(A=l.value.factorScreen)!=null&&A.show?(u.openBlock(),u.createElementBlock("div",Ua,[u.createElementVNode("div",ja,[Ha,u.createElementVNode("span",{onClick:f[11]||(f[11]=w=>p("factorScreen"))},"不限")]),u.createVNode(wr,{data:o.value.factorScreen,"onUpdate:data":f[12]||(f[12]=w=>o.value.factorScreen=w),config:l.value.factorScreen,onActionState:f[13]||(f[13]=(...w)=>r("actionState",...w))},null,8,["data","config"])])):u.createCommentVNode("",!0),u.createVNode(oa,{data:o.value.commonIndicator,"onUpdate:data":f[14]||(f[14]=w=>o.value.commonIndicator=w),varietyMarket:o.value.varietyMarket,commonOption:o.value.commonOption,config:l.value.commonIndicator},null,8,["data","varietyMarket","commonOption","config"]),u.createVNode(xa,{data:o.value.compositeOrder,"onUpdate:data":f[15]||(f[15]=w=>o.value.compositeOrder=w),varietyMarket:o.value.varietyMarket,commonOption:o.value.commonOption,config:l.value.compositeOrder,onActionState:f[16]||(f[16]=(...w)=>r("actionState",...w))},null,8,["data","varietyMarket","commonOption","config"])])}}},Ga=Te._export_sfc(Za,[["__scopeId","data-v-22fde7d8"]]),Ja={install(e){e.component("st-varietySearch",Ga)}};module.exports=Ja;
26
+ ${N.detail}`:N.detail),3)]),_:1}),u.createVNode(ze,{class:"ai",height:"600px"},{default:u.withCtx(()=>[N.ai?(u.openBlock(),u.createBlock(Bt,{key:0,mode:"preview","model-value":N.ai},null,8,["model-value"])):f.value?(u.openBlock(),u.createBlock(St,{key:1,rows:5,animated:""})):f.value?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(It,{key:2,description:"点击下方按钮: AI分析, 分析结果将会展示在此处"}))]),_:1})])]),_:1},8,["modelValue"]),u.createVNode(Ot,{ref_key:"stVarSelectDialogRef",ref:c},null,512)],64)}}},wr=Te._export_sfc(Dr,[["__scopeId","data-v-b6323311"]]);const uu=e=>(u.pushScopeId("data-v-6a791396"),e=e(),u.popScopeId(),e),Vr={key:0,class:"common-indicator"},Fr={class:"indicator"},Ar={class:"title"},Nr=uu(()=>u.createElementVNode("span",null,"常用指标: ",-1)),Tr={class:"options"},Br=["onClick"],Sr={class:"tags"},Ir=["onClick"],Or={style:{"font-size":"18px"}},$r={key:0,class:"out-box"},Mr=uu(()=>u.createElementVNode("span",null,"自定义: ",-1)),qr={key:0,class:"convenient-option-box"},Rr={class:"out-box"},zr=uu(()=>u.createElementVNode("span",null,"自定义: ",-1)),Lr={key:0},Pr={key:0},Ur={key:0},jr={key:1},Hr={class:"tFeaturelncomes-option-box"},Zr={class:"tFeaturelncomes-out-box"},Gr=uu(()=>u.createElementVNode("span",null,"自定义: ",-1)),Jr={key:2},Wr={key:3},Qr={key:4},Yr={key:5},Kr={key:6},Xr={key:7},ea={style:{display:"flex","align-items":"center"}},ua={key:8},ta={class:"dialog-footer"},na={__name:"index",props:u.mergeModels({config:{type:Object,default:()=>{}},varietyMarket:{type:Number,default:()=>null},commonOption:{type:Array,default:()=>[]}},{data:{default:[]},dataModifiers:{}}),emits:["update:data"],setup(e){const t=[{label:"近2周",value:"1"},{label:"近1个月",value:"2"},{label:"近3个月",value:"3"},{label:"近6个月",value:"4"},{label:"近1年",value:"5"}],n=[{label:"无保留意见",value:1},{label:"保留意见",value:2},{label:"否定意见",value:3},{label:"无法表示意见",value:4}],r=u.inject("clearRow"),a=u.useModel(e,"data"),o=e,l=u.ref(!1),c=u.computed(()=>{var g;return(g=o.data.find(h=>h.radioType==="1"))==null?void 0:g.key}),i=u.computed(()=>{let g=[];return o.varietyMarket===null&&!o.commonOption.length?g=o.config.options:(g=o.config.options,o.varietyMarket&&(g=g.filter(({parent:h})=>h.varietyMarketIds.includes(o.varietyMarket))),o.commonOption.length&&(g=g.filter(({parent:h})=>{const{commonOptionIds:F}=h;return[...new Set([...F,...o.commonOption])].length!==[...F,...o.commonOption].length}))),g}),d=u.ref({}),s=u.ref({}),p=g=>{d.value=g;const h={key:g.key,type:g.type,label:g.label};switch(g.key){case"st":{s.value={...h,st:null};break}case"tFeaturelncomes":{s.value={...h,rule:1,withFewYears:null,yearsCount:null,netProfit:null};break}case"priceLevels":{s.value={...h,priceLevels:null};break}case"peTtmLevels":{s.value={...h,peTtmLevels:null};break}case"peTrendTtmLevels":{s.value={...h,peTrendTtmLevels:null};break}case"optionsCpType":{s.value={...h,optionsCpType:null};break}case"perVolumn":{s.value={...h,radio:null,levels:[]};break}case"mainFlow":{s.value={...h,radioType:"0",rankRange:[null,null]};break}case"auditOpinionType":{s.value={...h,enumType:null};break}default:s.value={...h,range:[null,null],unit:g.defaultUnit.length?[...g.defaultUnit]:[null,null],radioType:c.value&&c.value!==g.key?"0":g.defaultRadioType,rankRange:g.defaultRankRange||[null,null]}}l.value=!0},x=()=>{var h,F;switch(s.value.key){case"st":{const{label:v,st:m}=s.value;if(m===null)return L.ElMessage.warning("格式错误: 请至少选择一个值");s.value.tagText=`${v}: ${m?"是":"否"}`;break}case"tFeaturelncomes":{const{label:v,rule:m,withFewYears:k,yearsCount:C,netProfit:A}=s.value;if(["",null].includes(k)||["",null].includes(C)||["",null].includes(A))return L.ElMessage.warning("格式错误: 请填写完整");s.value.tagText=`${v}: ${k}年内${C}年以上盈利${m===1?"超":"跌"}过${A}亿`;break}case"priceLevels":{const{label:v,priceLevels:m}=s.value;if(!m||m.length===0)return L.ElMessage.warning("格式错误: 请至少选择一个值");s.value.tagText=`${v}: 已选${m}分位`;break}case"peTtmLevels":{const{label:v,peTtmLevels:m}=s.value;if(!m||m.length===0)return L.ElMessage.warning("格式错误: 请至少选择一个值");s.value.tagText=`${v}: 已选${m}分位`;break}case"peTrendTtmLevels":{const{label:v,peTrendTtmLevels:m}=s.value;if(!m||m.length===0)return L.ElMessage.warning("格式错误: 请至少选择一个值");s.value.tagText=`${v}: 已选${m}分位`;break}case"optionsCpType":{const{label:v,optionsCpType:m}=s.value;if(m===null)return L.ElMessage.warning("格式错误: 请至少选择一个值");s.value.tagText=`${v}: ${m===1?"看涨":"看跌"}`;break}case"perVolumn":{const{label:v,radio:m,levels:k}=s.value;if(!m)return L.ElMessage.warning("格式错误: 请选择时间");if(!(k!=null&&k.length))return L.ElMessage.warning("格式错误: 请选择分位");s.value.tagText=`${v}: ${(h=t.find(C=>C.value===m))==null?void 0:h.label}${k.map(C=>`${C}分位`).join("、")}`;break}case"mainFlow":{const{label:v,radioType:m,radio:k,rankRange:C}=s.value,A=w=>{if(w===""||w===null||w===void 0)return!1;const O=Number(w);return!isNaN(O)};if(!k)return L.ElMessage.warning("格式错误: 请选择时间");if(!A(C[0])&&!A(C[1]))return L.ElMessage.warning(`格式错误: 请填写${m==="0"?"涨幅范围":"排名范围"}`);!["",null].includes(C[0])&&!["",null].includes(C[1])?s.value.tagText=`${v}: ${k}日${m==="0"?"涨幅范围":"排名范围"}: ${C[0]}${m==="0"?"%":""} ~ ${C[1]}${m==="0"?"%":""}`:["",null].includes(C[0])?s.value.tagText=`${v}: ${k}日${m==="0"?"涨幅范围":"排名范围"}: ≤${C[1]}${m==="0"?"%":""}`:s.value.tagText=`${v}: ${k}日${m==="0"?"涨幅范围":"排名范围"}: ≥${C[0]}${m==="0"?"%":""}`;break}case"auditOpinionType":{const{label:v,enumType:m}=s.value;if(m===null)return L.ElMessage.warning("格式错误: 请至少选择一个值");s.value.tagText=`${v}: ${(F=n.find(k=>k.value===m))==null?void 0:F.label}`;break}default:{const{label:v,unit:m,radioType:k}=s.value,C=k==="1"?s.value.rankRange:s.value.range;if(["",null].includes(C[0])&&["",null].includes(C[1]))return L.ElMessage.warning("格式错误: 请至少填写一个值");if(k==="1"){const O=Number(C[0]),$=Number(C[1]);if(isNaN(O)||isNaN($))return L.ElMessage.warning("格式错误: 请填写数字");if(O<0||$<0)return L.ElMessage.warning("格式错误: 请填写大于0的数字");if(O>$)return L.ElMessage.warning("格式错误: 请填写正确的排名范围")}const A=k==="1"?"":m[0]??"",w=k==="1"?"":m[1]??"";!["",null].includes(C[0])&&!["",null].includes(C[1])?s.value.tagText=`${v}${k==="1"?"排名":""}: ${C[0]}${A} ~ ${C[1]}${w}`:["",null].includes(C[0])?s.value.tagText=`${v}${k==="1"?"排名":""}: ≤${C[1]}${w}`:s.value.tagText=`${v}${k==="1"?"排名":""}: ≥${C[0]}${A}`}}const g=a.value.findIndex(({key:v})=>v===s.value.key);g===-1?a.value.push(s.value):a.value.splice(g,1,s.value),l.value=!1},f=g=>{d.value=i.value.find(({key:h})=>h===g.key),s.value=JSON.parse(JSON.stringify(g)),l.value=!0},b=g=>{a.value.splice(g,1)},D=g=>{s.value.range=[...g.range],s.value.unit=[...g.unit]},V=g=>{switch(g){case"≤0":Object.assign(s.value,{rule:2,withFewYears:1,yearsCount:1,netProfit:0});break;case"≥0":Object.assign(s.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:0});break;case"五年内有四年以上盈利超过5千万":Object.assign(s.value,{rule:1,withFewYears:5,yearsCount:4,netProfit:.5});break;case"≥10亿":Object.assign(s.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:10});break;case"≥20亿":Object.assign(s.value,{rule:1,withFewYears:1,yearsCount:1,netProfit:20});break}};u.watch(()=>i.value,()=>{a.value.length&&(a.value=a.value.filter(({key:g})=>i.value.find(h=>h.key===g)))});const N=()=>{s.value.radio=null,s.value.rankRange=[null,null]};return(g,h)=>{const F=We.ElTag,v=hu,m=Be,k=bu.ElInput,C=Je.ElButton,A=xe.ElOption,w=xe.ElSelect,O=Qe,$=Gu.ElInputNumber,K=Ne.ElDialog;return e.config.show&&i.value.length?(u.openBlock(),u.createElementBlock("div",Vr,[u.createElementVNode("div",Fr,[u.createElementVNode("div",Ar,[Nr,u.createElementVNode("span",{onClick:h[0]||(h[0]=y=>u.unref(r)("commonIndicator"))},"不限")]),u.createElementVNode("div",Tr,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.value,y=>(u.openBlock(),u.createElementBlock("span",{key:y.key,onClick:_=>p(y)},u.toDisplayString(y.label),9,Br))),128))])]),u.createElementVNode("div",Sr,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.value,(y,_)=>(u.openBlock(),u.createBlock(F,{closable:"",type:"info",onClose:j=>b(_)},{default:u.withCtx(()=>[u.createElementVNode("span",null,u.toDisplayString(y.tagText),1),u.createElementVNode("span",{class:"edit",onClick:j=>f(y)},"编辑",8,Ir)]),_:2},1032,["onClose"]))),256))]),u.createVNode(K,{modelValue:l.value,"onUpdate:modelValue":h[28]||(h[28]=y=>l.value=y),title:d.value.label,width:"600","align-center":"","destroy-on-close":""},u.createSlots({footer:u.withCtx(()=>[u.createElementVNode("div",ta,[u.createVNode(C,{type:"primary",onClick:x},{default:u.withCtx(()=>[u.createTextVNode("确定")]),_:1})])]),default:u.withCtx(()=>{var y;return[d.value.type===void 0&&s.value.radioType==="1"?(u.openBlock(),u.createElementBlock("div",$r,[Mr,u.createVNode(k,{modelValue:s.value.rankRange[0],"onUpdate:modelValue":h[3]||(h[3]=_=>s.value.rankRange[0]=_),style:{flex:"1"}},null,8,["modelValue"]),u.createTextVNode(" ~ "),u.createVNode(k,{modelValue:s.value.rankRange[1],"onUpdate:modelValue":h[4]||(h[4]=_=>s.value.rankRange[1]=_),style:{flex:"1"}},null,8,["modelValue"])])):d.value.type===void 0?(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[(y=d.value.convenientOptions)!=null&&y.length?(u.openBlock(),u.createElementBlock("div",qr,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(d.value.convenientOptions,_=>(u.openBlock(),u.createBlock(C,{key:_.text,onClick:j=>D(_)},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(_.text),1)]),_:2},1032,["onClick"]))),128))])):u.createCommentVNode("",!0),u.createElementVNode("div",Rr,[zr,u.createVNode(k,{modelValue:s.value.range[0],"onUpdate:modelValue":h[6]||(h[6]=_=>s.value.range[0]=_),style:{flex:"1"}},u.createSlots({_:2},[d.value.unitOptions.length?{name:"append",fn:u.withCtx(()=>[d.value.unitOptions.length===1?(u.openBlock(),u.createElementBlock("span",Lr,u.toDisplayString(s.value.unit[0]),1)):(u.openBlock(),u.createBlock(w,{key:1,modelValue:s.value.unit[0],"onUpdate:modelValue":h[5]||(h[5]=_=>s.value.unit[0]=_),style:{width:"72px"}},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(d.value.unitOptions,_=>(u.openBlock(),u.createBlock(A,{label:_,value:_},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"]),u.createTextVNode(" ~ "),u.createVNode(k,{modelValue:s.value.range[1],"onUpdate:modelValue":h[8]||(h[8]=_=>s.value.range[1]=_),style:{flex:"1"}},u.createSlots({_:2},[d.value.unitOptions.length?{name:"append",fn:u.withCtx(()=>[d.value.unitOptions.length===1?(u.openBlock(),u.createElementBlock("span",Pr,u.toDisplayString(s.value.unit[1]),1)):(u.openBlock(),u.createBlock(w,{key:1,modelValue:s.value.unit[1],"onUpdate:modelValue":h[7]||(h[7]=_=>s.value.unit[1]=_),style:{width:"72px"}},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(d.value.unitOptions,_=>(u.openBlock(),u.createBlock(A,{label:_,value:_},null,8,["label","value"]))),256))]),_:1},8,["modelValue"]))]),key:"0"}:void 0]),1032,["modelValue"])])],64)):(u.openBlock(),u.createElementBlock(u.Fragment,{key:2},[d.value.key==="st"?(u.openBlock(),u.createElementBlock("div",Ur,[u.createVNode(m,{modelValue:s.value.st,"onUpdate:modelValue":h[9]||(h[9]=_=>s.value.st=_)},{default:u.withCtx(()=>[u.createVNode(O,{label:"是",value:1}),u.createVNode(O,{label:"否",value:0})]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),d.value.key==="tFeaturelncomes"?(u.openBlock(),u.createElementBlock("div",jr,[u.createElementVNode("div",Hr,[u.createVNode(C,{onClick:h[10]||(h[10]=_=>V("≤0"))},{default:u.withCtx(()=>[u.createTextVNode("≤0")]),_:1}),u.createVNode(C,{onClick:h[11]||(h[11]=_=>V("≥0"))},{default:u.withCtx(()=>[u.createTextVNode("≥0")]),_:1}),u.createVNode(C,{onClick:h[12]||(h[12]=_=>V("五年内有四年以上盈利超过5千万"))},{default:u.withCtx(()=>[u.createTextVNode("五年内有四年以上盈利超过5千万")]),_:1}),u.createVNode(C,{onClick:h[13]||(h[13]=_=>V("≥10亿"))},{default:u.withCtx(()=>[u.createTextVNode("≥10亿")]),_:1}),u.createVNode(C,{onClick:h[14]||(h[14]=_=>V("≥20亿"))},{default:u.withCtx(()=>[u.createTextVNode("≥20亿")]),_:1})]),u.createElementVNode("div",Zr,[Gr,u.createElementVNode("div",null,[u.createVNode($,{modelValue:s.value.withFewYears,"onUpdate:modelValue":h[15]||(h[15]=_=>s.value.withFewYears=_),"controls-position":"right"},null,8,["modelValue"]),u.createTextVNode(" 年内 "),u.createVNode($,{modelValue:s.value.yearsCount,"onUpdate:modelValue":h[16]||(h[16]=_=>s.value.yearsCount=_),"controls-position":"right"},null,8,["modelValue"]),u.createTextVNode(" 年以上盈利"+u.toDisplayString(s.value.rule===1?"超":"跌")+"过 ",1),u.createVNode($,{modelValue:s.value.netProfit,"onUpdate:modelValue":h[17]||(h[17]=_=>s.value.netProfit=_),"controls-position":"right"},null,8,["modelValue"]),u.createTextVNode(" 亿 ")])])])):u.createCommentVNode("",!0),d.value.key==="priceLevels"?(u.openBlock(),u.createElementBlock("div",Jr,[u.createVNode(w,{modelValue:s.value.priceLevels,"onUpdate:modelValue":h[18]||(h[18]=_=>s.value.priceLevels=_),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:u.withCtx(()=>[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList([1,2,3,4,5],_=>u.createVNode(A,{key:_,label:`${_}分位`,value:_},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),d.value.key==="peTtmLevels"?(u.openBlock(),u.createElementBlock("div",Wr,[u.createVNode(w,{modelValue:s.value.peTtmLevels,"onUpdate:modelValue":h[19]||(h[19]=_=>s.value.peTtmLevels=_),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:u.withCtx(()=>[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList([1,2,3,4,5,6,7,8,9,10],_=>u.createVNode(A,{key:_,label:`${_}分位`,value:_},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),d.value.key==="peTrendTtmLevels"?(u.openBlock(),u.createElementBlock("div",Qr,[u.createVNode(w,{modelValue:s.value.peTrendTtmLevels,"onUpdate:modelValue":h[20]||(h[20]=_=>s.value.peTrendTtmLevels=_),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:u.withCtx(()=>[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList([1,2,3,4,5,6,7,8,9,10],_=>u.createVNode(A,{key:_,label:`${_}分位`,value:_},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),d.value.key==="optionsCpType"?(u.openBlock(),u.createElementBlock("div",Yr,[u.createVNode(m,{modelValue:s.value.optionsCpType,"onUpdate:modelValue":h[21]||(h[21]=_=>s.value.optionsCpType=_)},{default:u.withCtx(()=>[u.createVNode(O,{label:"看涨",value:1}),u.createVNode(O,{label:"看跌",value:2})]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),d.value.key==="perVolumn"?(u.openBlock(),u.createElementBlock("div",Kr,[u.createVNode(m,{modelValue:s.value.radio,"onUpdate:modelValue":h[22]||(h[22]=_=>s.value.radio=_)},{default:u.withCtx(()=>[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList(t,_=>u.createVNode(O,{key:_.value,value:_.value},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(_.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"]),u.createVNode(w,{modelValue:s.value.levels,"onUpdate:modelValue":h[23]||(h[23]=_=>s.value.levels=_),multiple:"",clearable:"",placeholder:"请选择",style:{width:"420px"}},{default:u.withCtx(()=>[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList([1,2,3,4,5],_=>u.createVNode(A,{key:_,label:`${_}分位`,value:_},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),d.value.key==="mainFlow"?(u.openBlock(),u.createElementBlock("div",Xr,[u.createVNode(m,{modelValue:s.value.radio,"onUpdate:modelValue":h[24]||(h[24]=_=>s.value.radio=_)},{default:u.withCtx(()=>[u.createVNode(O,{value:"3"},{default:u.withCtx(()=>[u.createTextVNode("3日")]),_:1}),u.createVNode(O,{value:"5"},{default:u.withCtx(()=>[u.createTextVNode("5日")]),_:1}),u.createVNode(O,{value:"10"},{default:u.withCtx(()=>[u.createTextVNode("10日")]),_:1}),u.createVNode(O,{value:"20"},{default:u.withCtx(()=>[u.createTextVNode("20日")]),_:1})]),_:1},8,["modelValue"]),u.createElementVNode("div",ea,[u.createElementVNode("span",null,u.toDisplayString(s.value.radioType==="0"?"涨幅范围":"排名范围")+": ",1),u.createVNode(k,{modelValue:s.value.rankRange[0],"onUpdate:modelValue":h[25]||(h[25]=_=>s.value.rankRange[0]=_),style:{flex:"1"}},null,8,["modelValue"]),u.createTextVNode(" ~ "),u.createVNode(k,{modelValue:s.value.rankRange[1],"onUpdate:modelValue":h[26]||(h[26]=_=>s.value.rankRange[1]=_),style:{flex:"1"}},null,8,["modelValue"])])])):u.createCommentVNode("",!0),d.value.key==="auditOpinionType"?(u.openBlock(),u.createElementBlock("div",ua,[u.createVNode(m,{modelValue:s.value.enumType,"onUpdate:modelValue":h[27]||(h[27]=_=>s.value.enumType=_)},{default:u.withCtx(()=>[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList(n,(_,j)=>u.createVNode(O,{key:j,label:_.label,value:_.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0)],64))]}),_:2},[d.value.showRankType?{name:"header",fn:u.withCtx(()=>[u.createElementVNode("span",Or,u.toDisplayString(d.value.label),1),u.createVNode(m,{modelValue:s.value.radioType,"onUpdate:modelValue":h[1]||(h[1]=y=>s.value.radioType=y),style:{"vertical-align":"4px","margin-left":"12px"}},{default:u.withCtx(()=>[u.createVNode(v,{label:"数值",value:"0"}),u.createVNode(v,{disabled:c.value&&c.value!==d.value.key,label:"排名",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"0"}:d.value.key==="mainFlow"?{name:"header",fn:u.withCtx(()=>[u.createElementVNode("span",{style:{"font-size":"18px"}},u.toDisplayString(d.value.label),1),u.createVNode(m,{modelValue:s.value.radioType,"onUpdate:modelValue":h[2]||(h[2]=y=>s.value.radioType=y),style:{"vertical-align":"4px","margin-left":"12px"},onChange:N},{default:u.withCtx(()=>[u.createVNode(v,{label:"涨幅范围",value:"0"}),u.createVNode(v,{disabled:c.value&&c.value!==d.value.key,label:"排名范围",value:"1"},null,8,["disabled"])]),_:1},8,["modelValue"])]),key:"1"}:void 0]),1032,["modelValue","title"])])):u.createCommentVNode("",!0)}}},oa=Te._export_sfc(na,[["__scopeId","data-v-6a791396"]]);const ra=e=>(u.pushScopeId("data-v-07aa9e1a"),e=e(),u.popScopeId(),e),aa={key:0,class:"composite-order"},la={class:"title"},ca=ra(()=>u.createElementVNode("span",null,"组合排序: ",-1)),ia={class:"tag-box"},sa=["onClick"],da={class:"custom-header"},fa={class:"left"},pa=["id"],ba={class:"right"},ha={class:"dialog-footer"},ma={__name:"index",props:u.mergeModels({config:{type:Object,default:()=>{}},varietyMarket:{type:Number,default:()=>null},commonOption:{type:Array,default:()=>[]}},{data:{default:[]},dataModifiers:{}}),emits:u.mergeModels(["actionState"],["update:data"]),setup(e,{emit:t}){const n=u.inject("clearRow"),r=u.useModel(e,"data"),a=t,o=e,l=u.ref(!1),c=u.ref({id:null,name:null,value:"desc"}),i=u.computed(()=>{let s=[];return o.varietyMarket===null&&!o.commonOption.length?s=o.config.options:(s=o.config.options,o.varietyMarket&&(s=s.filter(({parent:p})=>p.varietyMarketIds.includes(o.varietyMarket))),o.commonOption.length&&(s=s.filter(({parent:p})=>{const{commonOptionIds:x}=p;return[...new Set([...x,...o.commonOption])].length!==[...x,...o.commonOption].length}))),s}),d=(s,p)=>{switch(s){case"add":{c.value={id:null,name:null,value:"desc"},l.value=!0;break}case"edit":{const x=r.value[p];c.value={...x},l.value=!0;break}case"submit":{a("actionState","组合排序");const{id:x,name:f,value:b}=c.value;if(!f)return L.ElMessage.warning("请选择需要排序的条件");const{label:D}=i.value.find(N=>N.key===f),V=`${D}-${b==="asc"?"升序↑":"降序↓"}`;if(x===null){const N=r.value.findIndex(g=>g.name===f);N===-1?r.value.push({...c.value,id:f,tagText:V}):r.value.splice(N,1,{...c.value,id:f,tagText:V})}else if(c.value.id){const N=r.value.findIndex(h=>h.name===x),g=r.value.findIndex(h=>h.name===f);r.value[N]={...c.value,id:f,tagText:V},g!==-1&&N!==g&&r.value.splice(g,1)}l.value=!1;break}case"delete":{r.value.splice(p,1);break}}};return u.watch(()=>i.value,()=>{r.value.length&&(r.value=r.value.filter(({name:s})=>i.value.find(p=>p.key===s)))}),(s,p)=>{const x=We.ElTag,f=Je.ElButton,b=Q.ElIcon,D=xe.ElOption,V=xe.ElSelect,N=Ue.ElFormItem,g=Qe,h=Be,F=Ue.ElForm,v=Ne.ElDialog;return e.config.show&&i.value.length?(u.openBlock(),u.createElementBlock("div",aa,[u.createElementVNode("div",la,[ca,u.createElementVNode("span",{onClick:p[0]||(p[0]=m=>u.unref(n)("compositeOrder"))},"不限")]),u.createElementVNode("div",ia,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.value,(m,k)=>(u.openBlock(),u.createBlock(x,{closable:"",type:"info",onClose:C=>d("delete",k)},{default:u.withCtx(()=>[u.createElementVNode("span",null,u.toDisplayString(m.tagText),1),u.createElementVNode("span",{class:"edit",onClick:C=>d("edit",k)},"编辑",8,sa)]),_:2},1032,["onClose"]))),256)),u.createVNode(f,{type:"primary",plain:"",size:"small",icon:u.unref(Q.plus_default),onClick:p[1]||(p[1]=m=>d("add"))},{default:u.withCtx(()=>[u.createTextVNode(" 添加排序 ")]),_:1},8,["icon"])]),u.createVNode(v,{"modal-class":"order-dialog",modelValue:l.value,"onUpdate:modelValue":p[7]||(p[7]=m=>l.value=m),width:"400","align-center":"","destroy-on-close":"",overflow:"","show-close":!1},{header:u.withCtx(({titleId:m,titleClass:k})=>[u.createElementVNode("div",da,[u.createElementVNode("div",fa,[u.createElementVNode("span",{id:m,class:u.normalizeClass(k)}," 添加条件 ",10,pa)]),u.createElementVNode("div",ba,[u.createVNode(b,{onClick:p[2]||(p[2]=C=>l.value=!1)},{default:u.withCtx(()=>[u.createVNode(u.unref(Q.close_default))]),_:1})])])]),footer:u.withCtx(()=>[u.createElementVNode("div",ha,[u.createVNode(f,{onClick:p[5]||(p[5]=m=>l.value=!1)},{default:u.withCtx(()=>[u.createTextVNode("取消")]),_:1}),u.createVNode(f,{type:"primary",onClick:p[6]||(p[6]=m=>d("submit"))},{default:u.withCtx(()=>[u.createTextVNode(" 确定 ")]),_:1})])]),default:u.withCtx(()=>[u.createVNode(F,{ref:"compositeOrderFormRef",model:c.value},{default:u.withCtx(()=>[u.createVNode(N,{label:"添加条件: "},{default:u.withCtx(()=>[u.createVNode(V,{modelValue:c.value.name,"onUpdate:modelValue":p[3]||(p[3]=m=>c.value.name=m),filterable:"",placeholder:"请选择","no-match-text":"未匹配到相关条件"},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.value,({label:m,key:k})=>(u.openBlock(),u.createBlock(D,{label:m,value:k,key:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),u.createVNode(N,{label:"排序方式: "},{default:u.withCtx(()=>[u.createVNode(h,{modelValue:c.value.value,"onUpdate:modelValue":p[4]||(p[4]=m=>c.value.value=m)},{default:u.withCtx(()=>[u.createVNode(g,{label:"升序",value:"asc"}),u.createVNode(g,{label:"降序",value:"desc"})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0)}}},xa=Te._export_sfc(ma,[["__scopeId","data-v-07aa9e1a"]]);const _a={class:"tag-list"},ka={class:"tab-list-item"},ga={style:{display:"flex",width:"280px"}},va={style:{flex:"1","line-height":"24px"}},ya={class:"dialog-footer"},Ca={style:{"margin-bottom":"12px"}},Ea={class:"dialog-footer"},Da={__name:"index",props:{data:{default:[]},dataModifiers:{}},emits:["update:data"],setup(e){let t=null;const{request:n}=u.inject("stConfig"),r=u.useModel(e,"data"),a=u.ref(!1),o=u.ref("person"),l=u.ref(""),c=u.ref({}),i=u.ref([]),d=u.ref([]),s=u.ref(!1),p=u.ref(null),x=u.ref(""),f=u.computed(()=>r.value.map(m=>({name:c.value[m],id:m})));u.watch(()=>o.value,()=>{l.value="",F()}),u.watch(()=>l.value,()=>{clearTimeout(t),t=setTimeout(()=>{F()},300)});const b=m=>!!d.value.includes(m.id),D=m=>{b(m)?d.value=d.value.filter(k=>k!==m.id):d.value.push(m.id)},V=(m,k)=>{switch(m){case"add":{i.value=[],a.value=!0,l.value="",d.value=[...r.value],F();break}case"submit":{a.value=!1,r.value=[...d.value];break}case"delete":{r.value.splice(k,1);break}}},N=m=>{Wu.ElMessageBox.alert(`确认删除标签“${m.name}”吗?`,"删除标签",{confirmButtonText:"OK",callback:async k=>{k==="confirm"&&(await n.post("/alarm/deliversign/deleteTag",{tagId:m.id}),F(),L.ElMessage.success("删除成功!"))}})},g=m=>{p.value=m,x.value=m.name,s.value=!0},h=async()=>{await n.post("/alarm/deliversign/addOrUpdateFeatureTag",{tagName:x.value,tagId:p.value.id}),c.value={...c.value,[p.value.id]:x.value},i.value=i.value.map(m=>m.id===p.value.id?{...m,name:x.value}:m),s.value=!1,L.ElMessage.success("修改成功!")},F=async()=>{if(o.value==="person"){const m=await n.post("/alarm/deliversign/findTagsByUserId",{tagName:l.value});i.value=[],c.value={...c.value,...m.body.reduce((k,C)=>({...k,[C.id]:C.tagName}),{})},u.nextTick(()=>{var k;i.value=(k=m.body)==null?void 0:k.map(C=>({name:C.tagName,id:C.id}))})}else{const m=await n.post("/alarm/deliversign/findSystemTagsByTagName",{tagName:l.value});i.value=[],c.value={...c.value,...m.body.reduce((k,C)=>({...k,[C.id]:C.tagName}),{})},u.nextTick(()=>{var k;i.value=(k=m.body)==null?void 0:k.map(C=>({name:C.tagName,id:C.id}))})}};return(async()=>{const m=await Promise.all([n.post("/alarm/deliversign/findTagsByUserId"),n.post("/alarm/deliversign/findSystemTagsByTagName")]);c.value=m.reduce((k,C)=>{var A;return{...k,...(A=C.body)==null?void 0:A.reduce((w,O)=>({...w,[O.id]:O.tagName}),{})}},{})})(),(m,k)=>{const C=We.ElTag,A=Je.ElButton,w=hu,O=Be,$=bu.ElInput,K=su.ElCheckbox,y=Ne.ElDialog;return u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createElementVNode("div",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(f.value,(_,j)=>(u.openBlock(),u.createBlock(C,{closable:"",style:{"margin-right":"10px"},type:"info",onClose:$e=>V("delete",j)},{default:u.withCtx(()=>[u.createElementVNode("span",null,u.toDisplayString(_.name),1)]),_:2},1032,["onClose"]))),256)),u.createVNode(A,{class:"screen-btn",type:"primary",plain:"",size:"small",icon:u.unref(Q.plus_default),onClick:k[0]||(k[0]=_=>V("add"))},{default:u.withCtx(()=>[u.createTextVNode(" 添加标签 ")]),_:1},8,["icon"])]),u.createVNode(y,{modelValue:a.value,"onUpdate:modelValue":k[5]||(k[5]=_=>a.value=_),width:"1000"},{header:u.withCtx(()=>[u.createElementVNode("div",null,[u.createTextVNode(" 添加标签 "),u.createVNode(O,{modelValue:o.value,"onUpdate:modelValue":k[1]||(k[1]=_=>o.value=_),size:"small",style:{"margin-left":"8px","vertical-align":"5px"}},{default:u.withCtx(()=>[u.createVNode(w,{label:"个人",value:"person"}),u.createVNode(w,{label:"系统",value:"system"})]),_:1},8,["modelValue"]),u.createVNode($,{modelValue:l.value,"onUpdate:modelValue":k[2]||(k[2]=_=>l.value=_),size:"small",style:{width:"120px","margin-left":"8px"},placeholder:"请输入标签名称"},null,8,["modelValue"])])]),footer:u.withCtx(()=>[u.createElementVNode("div",ya,[u.createVNode(A,{onClick:k[3]||(k[3]=_=>a.value=!1)},{default:u.withCtx(()=>[u.createTextVNode("取消")]),_:1}),u.createVNode(A,{type:"primary",onClick:k[4]||(k[4]=_=>V("submit"))},{default:u.withCtx(()=>[u.createTextVNode("确定")]),_:1})])]),default:u.withCtx(()=>[u.createElementVNode("div",_a,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.value,_=>(u.openBlock(),u.createElementBlock("div",ka,[u.createVNode(K,{checked:b(_),onChange:j=>D(_)},{default:u.withCtx(()=>[u.createElementVNode("div",ga,[u.createElementVNode("div",va,u.toDisplayString(_.name),1),o.value==="person"?(u.openBlock(),u.createBlock(A,{key:0,size:"small",icon:u.unref(Q.edit_default),onClick:j=>g(_)},null,8,["icon","onClick"])):u.createCommentVNode("",!0),o.value==="person"?(u.openBlock(),u.createBlock(A,{key:1,size:"small",icon:u.unref(Q.delete_default),onClick:j=>N(_)},null,8,["icon","onClick"])):u.createCommentVNode("",!0)])]),_:2},1032,["checked","onChange"])]))),256))])]),_:1},8,["modelValue"]),u.createVNode(y,{modelValue:s.value,"onUpdate:modelValue":k[9]||(k[9]=_=>s.value=_),title:"编辑标签",top:"20vh",width:"600"},{footer:u.withCtx(()=>[u.createElementVNode("div",Ea,[u.createVNode(A,{onClick:k[7]||(k[7]=_=>s.value=!1)},{default:u.withCtx(()=>[u.createTextVNode("取消")]),_:1}),u.createVNode(A,{type:"primary",onClick:k[8]||(k[8]=_=>h())},{default:u.withCtx(()=>[u.createTextVNode("确定")]),_:1})])]),default:u.withCtx(()=>{var _;return[u.createElementVNode("div",Ca,"原名称:"+u.toDisplayString((_=p.value)==null?void 0:_.name),1),u.createVNode($,{modelValue:x.value,"onUpdate:modelValue":k[6]||(k[6]=j=>x.value=j)},null,8,["modelValue"])]}),_:1},8,["modelValue"])],64)}}},wa=Te._export_sfc(Da,[["__scopeId","data-v-7f5f72e8"]]);const De=e=>(u.pushScopeId("data-v-4649bf5a"),e=e(),u.popScopeId(),e),Va={class:"variety-search"},Fa={key:0,class:"variety-search-row"},Aa={class:"title"},Na=De(()=>u.createElementVNode("span",null,"品种市场: ",-1)),Ta={key:1,class:"variety-search-row"},Ba={class:"title"},Sa=De(()=>u.createElementVNode("span",null,"常用选项: ",-1)),Ia={key:2,class:"variety-search-row"},Oa={class:"title"},$a=De(()=>u.createElementVNode("span",null,"上市板块: ",-1)),Ma={key:3,class:"variety-search-row"},qa={class:"title"},Ra=De(()=>u.createElementVNode("span",null,"自定标签: ",-1)),za={key:4,class:"variety-search-row"},La={class:"title"},Pa=De(()=>u.createElementVNode("span",null,"价差转换: ",-1)),Ua={key:5,class:"variety-search-row"},ja={class:"title"},Ha=De(()=>u.createElementVNode("span",null,"因子筛选: ",-1)),Za={__name:"index",props:u.mergeModels({config:{type:Object,default:{}}},{searchData:{},searchDataModifiers:{}}),emits:u.mergeModels(["actionState"],["update:searchData"]),setup(e,{expose:t,emit:n}){const r=n,a=e,o=u.useModel(e,"searchData");o.value=Object.assign(o.value,{varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[],compositeOrder:[]});const l=u.computed(()=>{const x={};return Object.keys(Vu).forEach(f=>{const b=Vu[f],D=a.config[f]??{},V={...b,...D};x[f]=V}),x}),c=u.computed(()=>l.value.varietyMarket.options),i=u.computed(()=>{const{varietyMarket:x}=o.value;return x?c.value.find(({value:b})=>b===x).memo.reduce((b,D)=>{const V=l.value.commonOption.options.find(N=>N.value===D);return V&&b.push(V),b},[]):l.value.commonOption.options}),d=u.computed(()=>{const{varietyMarket:x}=o.value;return x?l.value.marketIds.options.filter(f=>f.varietyMarketIds.includes(x)):l.value.marketIds.options}),s=u.computed(()=>l.value.jcTranslate.jcOptions),p=x=>{switch(x){case"commonOption":{o.value[x]=[];break}case"marketIds":{o.value[x]=[];break}case"customTag":{o.value[x]=[];break}case"jcTranslate":{o.value[x]={type:null,jcList:[]};break}case"factorScreen":{o.value[x]={list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""};break}case"commonIndicator":{o.value[x]=[];break}case"compositeOrder":{o.value[x]=[];break}default:{o.value[x]=null;break}}};return u.watch(()=>i.value,x=>{var f;(f=o.value.commonOption)!=null&&f.length&&(o.value.commonOption=o.value.commonOption.filter(b=>x.find(({value:D})=>D===b)))}),u.watch(()=>d.value,x=>{var f;(f=o.value.marketIds)!=null&&f.length&&(o.value.marketIds=o.value.marketIds.filter(b=>x.find(({value:D})=>D===b)))}),u.provide("clearRow",p),t({formatData:x=>{var b,D,V,N,g,h,F;console.log("%c[st-varietySearch]: 正在生成接口传参...","color: tomato");const f={};if(x.varietyMarket&&(f.exchangeId=String(x.varietyMarket)),(b=x.commonOption)!=null&&b.length&&(f.optionId=x.commonOption.join(",")),(D=x.marketIds)!=null&&D.length&&(f.marketIds=x.marketIds),(V=x.customTag)!=null&&V.length&&(f.tagIds=x.customTag),(N=l.value.jcTranslate)!=null&&N.show){const{jcTranslate:v}=x,{type:m,jcList:k}=v;switch(m){case 1:{f.translateType=1,f.jcType=k.join(",");break}case 2:f.translateType=2}}if((g=l.value.factorScreen)!=null&&g.show){const{factorScreen:v}=x;if((h=v==null?void 0:v.list)!=null&&h.length&&(f.tbFeatureFactorScores=v.list.map(m=>{switch(m.key){case"compare":return{freqId:m.cycle,factorId:m.factor,compareType:m.compareType,freqId2:m.cycle2,factorId2:m.factor2};default:return{freqId:m.cycle,factorId:m.factor,startScore:m.score[0],endScore:m.score[1]}}})),v.sqlEnable){const m=v.list.reduce((C,A,w)=>{var $,K;const O=`条件${w+1}`;switch(A.key){case"compare":{let y="";($=l.value.factorScreen)!=null&&$.cycleShow?y=`freq_id = ${A.cycle} and factor_id = ${A.factor} ${A.compareType} freq_id = ${A.cycle2} and factor_id = ${A.factor2}`:y=`factor_id = ${A.factor} ${A.compareType} factor_id = ${A.factor2}`,C.set(O,`(${y})`);break}default:{let y=`factor_id = ${A.factor} and `;(K=l.value.factorScreen)!=null&&K.cycleShow&&(y=`freq_id = ${A.cycle} and factor_id = ${A.factor} and `),(A.score[0]||A.score[0]===0)&&(A.score[1]||A.score[1]===0)?y+=`score >= ${A.score[0]} and score <= ${A.score[1]}`:A.score[0]||A.score[0]===0?y+=`score >= ${A.score[0]}`:(A.score[1]||A.score[1]===0)&&(y+=`score <= ${A.score[1]}`),C.set(O,`(${y})`)}}return C},new Map([]));let k=v.sqlValue;for(const[C,A]of m){const w=new RegExp(C,"g");k=k.replace(w,A)}f.sql=k,f.sqlExpression=v.sqlValue}f.enableSql=v.sqlEnable===1?2:1,v.factorSelectExpr&&(f.factorSelectExpr=v.factorSelectExpr)}{const v=["expireDays","virtualRealDegree","yearProfitRate","impliedVolatility","levelMultiplier","turnover","volume","openInterest","optionsCpType","optionGear"],m=x.commonIndicator.reduce((y,_)=>{const{key:j,type:$e,range:I,unit:E,radioType:R,radio:M,rankRange:P}=_;if(j==="mainFlow"){let[S,z]=P,Z=R==="0"?`netInfow${M}d`:`last${M}DayMainFlowRank`;y.push({column:Z,start:S,end:z})}if(j==="auditOpinionType")y.push({column:_.key,enumType:_.enumType});else if(R==="1")f.sortBy={column:_.key,start:P[0]||null,end:P[1]||null};else if(["dividendYield","incrementRevenueLyr","netProfitGrowthRatioLyr","fiveYearRoe"].includes(j)){let[S,z]=I;["",null].includes(S)||(S=S/100),["",null].includes(z)||(z=z/100),y.push({column:_.key,start:S,end:z})}else if($e===void 0&&!v.includes(j)){let[S,z]=I;if(!["",null].includes(S))switch(E[0]){case"亿":S=S*1e8;break;case"千万":S=S*1e7;break;default:S=S;break}if(!["",null].includes(z))switch(E[1]){case"亿":z=z*1e8;break;case"千万":z=z*1e7;break;default:z=z;break}y.push({column:_.key,start:S,end:z})}return y},[]);m.length&&(f.query=m);const k=x.commonIndicator.find(({key:y})=>y==="st");k&&(f.st=k.st);const C=x.commonIndicator.find(({key:y})=>y==="tFeaturelncomes");C&&(f.netProfitQueryDto={...C,netProfit:C.netProfit*1e8});const A=x.commonIndicator.find(({key:y})=>y==="priceLevels");A&&(f.priceLevels=A.priceLevels);const w=x.commonIndicator.find(({key:y})=>y==="peTtmLevels");w&&(f.peTtmLevels=w.peTtmLevels);const O=x.commonIndicator.find(({key:y})=>y==="peTrendTtmLevels");O&&(f.peTrendTtmLevels=O.peTrendTtmLevels);const $={};x.commonIndicator.forEach(y=>{const{key:_}=y;switch(_){case"expireDays":["",null].includes(y.range[0])||($.minExpireDays=y.range[0]),["",null].includes(y.range[1])||($.maxExpireDays=y.range[1]);break;case"virtualRealDegree":["",null].includes(y.range[0])||($.minVirtualRealDegree=y.range[0]/100),["",null].includes(y.range[1])||($.maxVirtualRealDegree=y.range[1]/100);break;case"yearProfitRate":["",null].includes(y.range[0])||($.minYearProfitRate=y.range[0]/100),["",null].includes(y.range[1])||($.maxYearProfitRate=y.range[1]/100);break;case"impliedVolatility":["",null].includes(y.range[0])||($.minImpliedVolatility=y.range[0]/100),["",null].includes(y.range[1])||($.maxImpliedVolatility=y.range[1]/100);break;case"levelMultiplier":["",null].includes(y.range[0])||($.minLevelMultiplier=y.range[0]),["",null].includes(y.range[1])||($.maxLevelMultiplier=y.range[1]);break;case"turnover":y.radioType==="0"&&!["",null].includes(y.range[0])&&($.minTurnover=y.range[0]*1e4),y.radioType==="0"&&!["",null].includes(y.range[1])&&($.maxTurnover=y.range[1]*1e4);break;case"volume":y.radioType==="0"&&!["",null].includes(y.range[0])&&($.minVolume=y.range[0]),y.radioType==="0"&&!["",null].includes(y.range[1])&&($.maxVolume=y.range[1]);break;case"openInterest":y.radioType==="0"&&!["",null].includes(y.range[0])&&($.minOpenInterest=y.range[0]),y.radioType==="0"&&!["",null].includes(y.range[1])&&($.maxOpenInterest=y.range[1]);break;case"optionsCpType":$.optionsCpType=y.optionsCpType;break;case"optionGear":["",null].includes(y.range[0])||($.minOptionGear=y.range[0]),["",null].includes(y.range[1])||($.maxOptionGear=y.range[1]);break}});const K=x.commonIndicator.find(({key:y})=>y==="perVolumn");K&&(f.perVolumn={type:K.radio,value:K.levels}),Object.keys($).length&&(f.searchOptionDto={...f.searchOptionDto,...$})}return(F=x.compositeOrder)!=null&&F.length&&(f.compositeOrder=x.compositeOrder.map(({name:v,value:m})=>({name:v,value:m}))),console.log("%c[st-varietySearch]: 接口传参数据生成完毕","color: green",f),f},reset:()=>{o.value={varietyMarket:null,commonOption:[],marketIds:[],customTag:[],jcTranslate:{type:null,jcList:[]},factorScreen:{list:[],sqlEnable:0,sqlValue:null,factorSelectExpr:""},commonIndicator:[],compositeOrder:[]}}}),(x,f)=>{var F,v,m,k,C,A;const b=Qe,D=Be,V=su.ElCheckbox,N=su.ElCheckboxGroup,g=xe.ElOption,h=xe.ElSelect;return u.openBlock(),u.createElementBlock("div",Va,[(F=l.value.varietyMarket)!=null&&F.show?(u.openBlock(),u.createElementBlock("div",Fa,[u.createElementVNode("div",Aa,[Na,u.createElementVNode("span",{onClick:f[0]||(f[0]=w=>p("varietyMarket"))},"不限")]),u.createVNode(D,{modelValue:o.value.varietyMarket,"onUpdate:modelValue":f[1]||(f[1]=w=>o.value.varietyMarket=w),size:"small"},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(c.value,({label:w,value:O})=>(u.openBlock(),u.createBlock(b,{label:w,value:O,key:O},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),(v=l.value.commonOption)!=null&&v.show&&i.value.length?(u.openBlock(),u.createElementBlock("div",Ta,[u.createElementVNode("div",Ba,[Sa,u.createElementVNode("span",{onClick:f[2]||(f[2]=w=>p("commonOption"))},"不限")]),u.createVNode(N,{modelValue:o.value.commonOption,"onUpdate:modelValue":f[3]||(f[3]=w=>o.value.commonOption=w),size:"small"},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.value,({label:w,value:O})=>(u.openBlock(),u.createBlock(V,{label:w,value:O,key:O},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),(m=l.value.marketIds)!=null&&m.show&&d.value.length?(u.openBlock(),u.createElementBlock("div",Ia,[u.createElementVNode("div",Oa,[$a,u.createElementVNode("span",{onClick:f[4]||(f[4]=w=>p("marketIds"))},"不限")]),u.createVNode(N,{modelValue:o.value.marketIds,"onUpdate:modelValue":f[5]||(f[5]=w=>o.value.marketIds=w),size:"small"},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(d.value,({label:w,value:O})=>(u.openBlock(),u.createBlock(V,{label:w,value:O,key:O},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):u.createCommentVNode("",!0),(k=l.value.customTag)!=null&&k.show?(u.openBlock(),u.createElementBlock("div",Ma,[u.createElementVNode("div",qa,[Ra,u.createElementVNode("span",{onClick:f[6]||(f[6]=w=>p("customTag"))},"不限")]),u.createVNode(wa,{data:o.value.customTag,"onUpdate:data":f[7]||(f[7]=w=>o.value.customTag=w)},null,8,["data"])])):u.createCommentVNode("",!0),(C=l.value.jcTranslate)!=null&&C.show?(u.openBlock(),u.createElementBlock("div",za,[u.createElementVNode("div",La,[Pa,u.createElementVNode("span",{onClick:f[8]||(f[8]=w=>p("jcTranslate"))},"不限")]),u.createVNode(D,{modelValue:o.value.jcTranslate.type,"onUpdate:modelValue":f[9]||(f[9]=w=>o.value.jcTranslate.type=w),size:"small"},{default:u.withCtx(()=>[u.createVNode(b,{value:2},{default:u.withCtx(()=>[u.createTextVNode("价差转品种")]),_:1}),u.createVNode(b,{value:1},{default:u.withCtx(()=>[u.createTextVNode("品种转价差")]),_:1})]),_:1},8,["modelValue"]),u.withDirectives(u.createVNode(h,{modelValue:o.value.jcTranslate.jcList,"onUpdate:modelValue":f[10]||(f[10]=w=>o.value.jcTranslate.jcList=w),size:"small",multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"请选择价差品种",style:{width:"140px"}},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(s.value,w=>(u.openBlock(),u.createBlock(g,{key:w.value,label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),[[u.vShow,o.value.jcTranslate.type===1]])])):u.createCommentVNode("",!0),(A=l.value.factorScreen)!=null&&A.show?(u.openBlock(),u.createElementBlock("div",Ua,[u.createElementVNode("div",ja,[Ha,u.createElementVNode("span",{onClick:f[11]||(f[11]=w=>p("factorScreen"))},"不限")]),u.createVNode(wr,{data:o.value.factorScreen,"onUpdate:data":f[12]||(f[12]=w=>o.value.factorScreen=w),config:l.value.factorScreen,onActionState:f[13]||(f[13]=(...w)=>r("actionState",...w))},null,8,["data","config"])])):u.createCommentVNode("",!0),u.createVNode(oa,{data:o.value.commonIndicator,"onUpdate:data":f[14]||(f[14]=w=>o.value.commonIndicator=w),varietyMarket:o.value.varietyMarket,commonOption:o.value.commonOption,config:l.value.commonIndicator},null,8,["data","varietyMarket","commonOption","config"]),u.createVNode(xa,{data:o.value.compositeOrder,"onUpdate:data":f[15]||(f[15]=w=>o.value.compositeOrder=w),varietyMarket:o.value.varietyMarket,commonOption:o.value.commonOption,config:l.value.compositeOrder,onActionState:f[16]||(f[16]=(...w)=>r("actionState",...w))},null,8,["data","varietyMarket","commonOption","config"])])}}},Ga=Te._export_sfc(Za,[["__scopeId","data-v-4649bf5a"]]),Ja={install(e){e.component("st-varietySearch",Ga)}};module.exports=Ja;
@@ -6481,7 +6481,7 @@ const Oo = { class: "tag-list" }, $o = { class: "tab-list-item" }, Vo = { style:
6481
6481
  };
6482
6482
  }
6483
6483
  }, Lo = /* @__PURE__ */ Ku(zo, [["__scopeId", "data-v-7f5f72e8"]]);
6484
- const Pu = (u) => (ge("data-v-22fde7d8"), u = u(), ve(), u), Po = { class: "variety-search" }, Uo = {
6484
+ const Pu = (u) => (ge("data-v-4649bf5a"), u = u(), ve(), u), Po = { class: "variety-search" }, Uo = {
6485
6485
  key: 0,
6486
6486
  class: "variety-search-row"
6487
6487
  }, No = { class: "title" }, jo = /* @__PURE__ */ Pu(() => /* @__PURE__ */ D("span", null, "品种市场: ", -1)), Zo = {
@@ -6755,13 +6755,13 @@ const Pu = (u) => (ge("data-v-22fde7d8"), u = u(), ve(), u), Po = { class: "vari
6755
6755
  ["", null].includes(E.range[0]) || (N.minLevelMultiplier = E.range[0]), ["", null].includes(E.range[1]) || (N.maxLevelMultiplier = E.range[1]);
6756
6756
  break;
6757
6757
  case "turnover":
6758
- ["", null].includes(E.range[0]) || (N.minTurnover = E.range[0] * 1e4), ["", null].includes(E.range[1]) || (N.maxTurnover = E.range[1] * 1e4);
6758
+ E.radioType === "0" && !["", null].includes(E.range[0]) && (N.minTurnover = E.range[0] * 1e4), E.radioType === "0" && !["", null].includes(E.range[1]) && (N.maxTurnover = E.range[1] * 1e4);
6759
6759
  break;
6760
6760
  case "volume":
6761
- ["", null].includes(E.range[0]) || (N.minVolume = E.range[0]), ["", null].includes(E.range[1]) || (N.maxVolume = E.range[1]);
6761
+ E.radioType === "0" && !["", null].includes(E.range[0]) && (N.minVolume = E.range[0]), E.radioType === "0" && !["", null].includes(E.range[1]) && (N.maxVolume = E.range[1]);
6762
6762
  break;
6763
6763
  case "openInterest":
6764
- ["", null].includes(E.range[0]) || (N.minOpenInterest = E.range[0]), ["", null].includes(E.range[1]) || (N.maxOpenInterest = E.range[1]);
6764
+ E.radioType === "0" && !["", null].includes(E.range[0]) && (N.minOpenInterest = E.range[0]), E.radioType === "0" && !["", null].includes(E.range[1]) && (N.maxOpenInterest = E.range[1]);
6765
6765
  break;
6766
6766
  case "optionsCpType":
6767
6767
  N.optionsCpType = E.optionsCpType;
@@ -6975,7 +6975,7 @@ const Pu = (u) => (ge("data-v-22fde7d8"), u = u(), ve(), u), Po = { class: "vari
6975
6975
  ]);
6976
6976
  };
6977
6977
  }
6978
- }, oi = /* @__PURE__ */ Ku(li, [["__scopeId", "data-v-22fde7d8"]]), ac = {
6978
+ }, oi = /* @__PURE__ */ Ku(li, [["__scopeId", "data-v-4649bf5a"]]), ac = {
6979
6979
  install(u) {
6980
6980
  u.component("st-varietySearch", oi);
6981
6981
  }