st-comp 0.0.193 → 0.0.194
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +86 -80
- package/es/Map.cjs +1 -1
- package/es/Map.js +1 -102944
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +12 -1
- package/es/VarietySearch.cjs +18 -1
- package/es/VarietySearch.js +5982 -27
- package/es/{index-a2e3a171.js → index-a8ee0e8c.js} +23054 -29031
- package/es/index-fdb71325.cjs +660 -0
- package/es/{python-e2743163.cjs → python-0405c62e.cjs} +2 -2
- package/es/{python-834e210e.js → python-791e6a42.js} +11 -46
- package/es/style.css +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +29 -29
- package/lib/{index-6e5ffcc4.js → index-db060de6.js} +387 -381
- package/lib/{python-a5c47b74.js → python-077c8efa.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/index.vue +2 -2
- package/es/index-5ab78274.cjs +0 -677
package/es/KlineBasic.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./base-ef747d02.cjs");const ve=require("./el-dialog-a24f4f8f.cjs");require("./el-overlay-ef92f51f.cjs");require("./el-input-06243b61.cjs");const xe=require("./el-input-number-854b2066.cjs"),be=require("./el-button-5973d99c.cjs"),he=require("./el-empty-1697ded8.cjs"),ie=require("./el-menu-item-6522d54c.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-popper-c9e0136d.cjs");const e=require("vue"),_e=require("echarts"),c=require("./dayjs.min-2c20abe6.cjs"),j=require("./index-8901a38c.cjs"),J=require("./el-message-0aeea1a3.cjs"),K=require("./_plugin-vue_export-helper-f246444f.cjs");require("./el-tag-fe492a6d.cjs");const se=require("./el-select-6d813c15.cjs");require("./el-scrollbar-05815cf5.cjs");require("./index-eab8a286.cjs");require("./index-bb833443.cjs");require("./index-9780a537.cjs");require("./index-f1c702f6.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-c2c5ca8f.cjs");require("./index-ca7dbd47.cjs");require("./typescript-b63f8e83.cjs");require("./index-7e4e0bd3.cjs");require("./index-eea0bcb3.cjs");require("./config-provider-79c2df1b.cjs");require("./index-a9d4ef0f.cjs");require("./debounce-62f5b6e8.cjs");function Ye(o){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const S in o)if(S!=="default"){const h=Object.getOwnPropertyDescriptor(o,S);Object.defineProperty(b,S,h.get?h:{enumerable:!0,get:()=>o[S]})}}return b.default=o,Object.freeze(b)}const ne=Ye(_e);let W=null;const ke=o=>{const b=j.y(o,{handleReq:S=>{j.v()&&(S.headers.token=j.U())},handleRes:S=>{const{data:h}=S;if(h.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:j.K(),!0}});b.get,W=b.post},we=o=>W("/middleLayer/kline/getKlineBasic",{...o,userId:j.V("id")}),De=o=>W("/middleLayer/kline/getKline",o),Me=async o=>W("/alarm/deliversign/addAlarmPrice",{...o,userId:j.V("id")}),Se=async o=>W("/alarm/deliversign/findAlarmPriceByUserId",{...o,userId:j.V("id")}),ue=async o=>W("/alarm/deliversign/updateAlarmPrice",{...o,userId:j.V("id")}),Ve=async o=>W("/alarm/deliversign/deleteAlarmPrice",{...o,userId:j.V("id")}),{round:z}=j.x,Le=(o,b,S,h,v)=>{const{data:t,time:w}=o,{gridTop:_,gridRight:u,gridLeft:Y,maxShowCounts:k,showSubChart:l}=b;return{animation:!1,grid:{top:`${_}px`,right:`${u}px`,bottom:l?"6px":"24px",left:`${Y}px`},dataZoom:[{type:"inside",startValue:S,endValue:h,maxValueSpan:k}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:r=>{const{axisDimension:D,value:y}=r;return D==="x"?l?"":["6","7","8"].includes(v)?c.dayjs(y).format("YYYY-MM-DD"):y:String(z(y))}}},formatter:()=>""},xAxis:{show:!l,type:"category",data:w,splitLine:{show:!1},axisLabel:{formatter:r=>["6","7","8"].includes(v)?c.dayjs(r).format("YYYY-MM-DD"):r}},yAxis:{type:"value",axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:r=>z(r.min),max:r=>z(r.max)},series:[{type:"candlestick",data:t,itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1}},...o.mainIndicator.map(r=>({name:r.key,type:"line",silent:!0,symbol:"none",data:r.data,lineStyle:{width:r.width||1},itemStyle:{color:r.color}}))],toolbox:{show:!1},brush:{xAxisIndex:"all",brushLink:"all",transformable:!1,outOfBrush:{colorAlpha:2},brushStyle:{color:"rgba(255,255,255,0.1)",borderColor:"rgba(255,255,255,0.4)"}}}},Te=(o,b,S,h,v)=>{const{variety:t,featureId:w,featureType:_}=S,{gridTop:u,gridLeft:Y,gridRight:k}=h;return b.reduce((l,r)=>{const{warnPrice:D}=r,y=o==null?void 0:o.convertToPixel({yAxisIndex:0},D);if(y<=u||y>=(o==null?void 0:o.getHeight()))return l;let E=0;return[...l,{type:"group",name:"warningLine",info:r,draggable:"vertical",children:[{type:"line",info:r,shape:{x1:Y,y1:y,x2:(o==null?void 0:o.getWidth())-k,y2:y},style:{stroke:"#FFF",lineWidth:1,lineDash:[8,4]},z:10},{type:"text",info:r,x:(o==null?void 0:o.getWidth())-k,y:y-5,style:{fill:"#FFF",text:D,stroke:"#000",lineWidth:1,opacity:1},z:10}],ondragstart:V=>{E=V.offsetY},ondrag:V=>{var R;if(V.target&&V.target.childAt(1)){const L=o.convertFromPixel({yAxisIndex:0},y+(V.offsetY-E));(R=V.target.childAt(1))==null||R.animate("style",!1).when(1,{text:z(L,3)}).start()}},ondragend:async V=>{const L=V.offsetY-E;if(L!==0){const N=o==null?void 0:o.convertFromPixel({yAxisIndex:0},L+y),d={id:r.id,warnPrice:z(N,3),featureId:w,featureCode:t,featureType:_};await ue(d),J.ElMessage.success("画线预警修改成功"),v&&v()}}}]},[])},Be={class:"kline-tips"},Ee=e.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(o){return(b,S)=>(e.openBlock(),e.createElementBlock("div",Be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data,(h,v)=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"kline-tips-item",style:e.normalizeStyle({color:h.color})},e.toDisplayString(h.label)+" "+e.toDisplayString(h.value),5))),128))]))}});const oe=K._export_sfc(Ee,[["__scopeId","data-v-f83b6b36"]]);const Ne={class:"kline-tips"},Fe={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(o){const{round:b,formatValue:S}=j.x,h=o,v=e.computed(()=>{const{data:w,activeIndex:_}=h;if(w.data&&w.data[_]){const u=w.data[_],Y=[{label:"开",value:b(u[0])},{label:"高",value:b(u[3])},{label:"低",value:b(u[2])},{label:"收",value:b(u[1])}];u[4]!==null&&Y.push({label:"额",value:S(u[4])});let k;return u[6]>0?k="red":u[6]<0&&(k="green"),Y.push({label:"涨跌",value:`${b(u[6])}%`,color:k}),Y}return[]}),t=e.computed(()=>{var u;const{data:w,activeIndex:_}=h;return((u=w==null?void 0:w.mainIndicator)==null?void 0:u.map(Y=>({label:Y.key,value:b(Y.data[_]),color:Y.color})))||[]});return(w,_)=>(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(oe,{data:v.value},null,8,["data"]),e.createVNode(oe,{data:t.value},null,8,["data"])]))}},qe=K._export_sfc(Fe,[["__scopeId","data-v-64b5c2a3"]]);const je={class:"klineSub"},Re={class:"klineSub-tips"},Ae={key:0,class:"klineSub-tips-select"},Oe={__name:"index",props:{cycle:{type:[String,Number],default:()=>null},data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0}},emits:["update:modelValue"],setup(o,{expose:b,emit:S}){const{round:h}=j.x;let v,t;const w=S,_=o,u=e.ref(),Y=e.computed({get(){return _.modelValue},set(r){w("update:modelValue",r)}}),k=e.computed(()=>{var y;const{data:r,activeIndex:D}=_;return((y=r==null?void 0:r.subIndicator)==null?void 0:y.map(E=>({label:E.key,color:E.color,value:E.data[D]||"-"})))||[]});e.onMounted(()=>{v=ne.init(u.value);let r=!0;t=new ResizeObserver(()=>{if(r){r=null;return}v.resize()}),t.observe(u.value)}),e.onUnmounted(()=>{v.dispose(),t.disconnect(),t=null});const l=(r,D)=>{const y=r[D],E=D===0?r[D]:r[D-1];return y[0]===y[1]?y[0]>=E[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:y[1]>y[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return b({connect:r=>{ne.connect([r,v])},draw:(r,D)=>{e.nextTick(()=>{const{startValue:y,endValue:E,maxValueSpan:V}=r,{leftYAxisRange:R,rightYAxisRange:L}=_.data.subIndicator[0],N=_.data.subIndicator.map(d=>{if(d.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:d.data.map((O,P)=>d.seriesColor==="kline"?{value:O,itemStyle:l(_.data.data,P)}:d.seriesColor==="value"?{value:O,itemStyle:{color:O>=0?"#FF0000":"#00FFFF"}}:{value:O,itemStyle:{color:d.seriesColor}})};if(d.series==="line")return{xAxisIndex:0,yAxisIndex:d.yAxis==="right"?2:1,name:d.key,type:"line",silent:!0,symbol:"none",data:d.data,lineStyle:{width:1},itemStyle:{color:d.color}}});v.setOption({animation:!1,grid:{left:`${D.gridLeft}px`,top:"10px",right:`${D.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:y,endValue:E,maxValueSpan:V}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:d=>{const{axisDimension:O,value:P}=d;if(O==="x")return["6","7","8"].includes(_.cycle)?c.dayjs(P).format("YYYY-MM-DD"):P;if(d.axisIndex===1)return String(h(P))}}},formatter:()=>""},xAxis:{type:"category",data:_.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{formatter:d=>["6","7","8"].includes(_.cycle)?c.dayjs(d).format("YYYY-MM-DD"):d}},yAxis:[{position:"right"},{position:"left",min:R==="cover"?d=>d.min:null,max:R==="cover"?d=>d.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:L==="cover"?d=>d.min:null,max:L==="cover"?d=>d.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:N},!0)})}}),(r,D)=>{const y=se.ElOption,E=se.ElSelect;return e.openBlock(),e.createElementBlock("div",je,[e.createElementVNode("div",Re,[k.value.length?(e.openBlock(),e.createElementBlock("div",Ae,[e.createVNode(E,{modelValue:Y.value,"onUpdate:modelValue":D[0]||(D[0]=V=>Y.value=V),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.subIndicatorList,V=>(e.openBlock(),e.createBlock(y,{key:V.value,label:V.label,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(oe,{data:k.value},null,8,["data"])]),e.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:u},null,512)])}}},Ie=K._export_sfc(Oe,[["__scopeId","data-v-ab519de5"]]),Pe=e.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(o,{emit:b}){const S=b,h=e.ref(),v=e.ref(),t=e.ref({display:"none",top:"0px",left:"0px"}),w=()=>{t.value.display="none",S("closeContextMenuCallBack"),document.removeEventListener("click",w)},_=u=>{if(u.preventDefault(),t.value.display==="block"){const{offsetX:Y,offsetY:k}=u,{offsetWidth:l,offsetHeight:r}=v.value;if(Y<=l&&k<=r)return}h.value.click(),t.value={display:"block",top:`${u.offsetY}px`,left:`${u.offsetX}px`},e.nextTick(()=>{const Y=h.value.getBoundingClientRect(),k=v.value.getBoundingClientRect();k.left+k.width>=Y.right&&(t.value.left=`${u.offsetX-k.width}px`),k.top+k.height>=Y.bottom&&(console.log("高度超出"),t.value.top=`${u.offsetY-k.height}px`)}),document.addEventListener("click",w)};return(u,Y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"contextmenuRef",ref:h,class:"contextmenu",onContextmenu:_,onMouseleave:w},[e.renderSlot(u.$slots,"default",{},void 0,!0),t.value.display!=="none"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:v,class:"contextmenu-popover",style:e.normalizeStyle(t.value)},[e.renderSlot(u.$slots,"popover",{},void 0,!0)],4)):e.createCommentVNode("",!0)],544))}});const $e=K._export_sfc(Pe,[["__scopeId","data-v-811db6b4"]]);const ce=o=>(e.pushScopeId("data-v-79254471"),o=o(),e.popScopeId(),o),Ce={class:"klineBasic-tips"},We={key:0,class:"klineBasic-sub"},ze={key:1,class:"klineBasic-empty"},Ke={key:2,class:"klineBasic-error"},Ue=ce(()=>e.createElementVNode("div",{class:"klineBasic-error-content"},"加载失败,请刷新重试",-1)),He={style:{"text-align":"center"}},Ze=ce(()=>e.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),Xe={class:"dialog-footer"},Ge={__name:"index",props:{variety:{type:[String,Number],default:()=>null},varietyName:{type:[String,Number],default:()=>null},featureId:{type:[String,Number],default:()=>null},featureType:{type:[String,Number],default:()=>null},cycle:{type:[String,Number],default:()=>null},mainIndicator:{type:String,default:()=>""},indicatorStore:{type:Object,default:()=>null},startTime:{type:String,default:()=>null},endTime:{type:String,default:()=>null},right:{type:[String,Number],default:1},config:{type:Object,default:()=>({})},env:{type:Object,default:()=>({})},brushRange:{type:[Array,null],default:()=>null}},emits:["change","getFactorData"],setup(o,{expose:b,emit:S}){const h=[{label:"画线预警",key:"drawWarningLine"}];let v=null,t=null,w,_,u=!1,Y=!1;const k=S,l=o,r=e.ref(!1),D=e.ref(!1),y=e.ref(!1),E=e.ref(null),V=e.ref(null),R=e.ref("VOL"),L=e.ref(0),N=e.ref({}),d=e.ref([]),O=e.ref({}),P=e.ref(!1),U=e.ref(""),Q=e.ref([...h]),$=e.computed(()=>({defaultShowCounts:500,addCounts:2e3,maxShowCounts:5e3,loadCheckCounts:500,showSubChart:!0,gridTop:48,gridLeft:80,gridRight:50,showWarningLine:!0,getFactorData:!0,...l.config}));e.watch(()=>{var i,n;return[l.variety,l.cycle,l.mainIndicator,R.value,(i=l.indicatorStore)==null?void 0:i.filterIndicator,(n=l.indicatorStore)==null?void 0:n.customIndicator]},()=>{ee()},{deep:!0}),e.onMounted(()=>{ke(l.env),ee(),window.addEventListener("keydown",ae)}),e.onUnmounted(()=>{t==null||t.off("datazoom"),t==null||t.off("highlight"),t==null||t.off("globalout"),t==null||t.dispose(),v==null||v.dispose(),window.removeEventListener("keydown",ae)});const de=()=>{t||(t=ne.init(E.value),fe(),$.value.showSubChart&&V.value.connect(t),v=j.D(E.value),v.listen(()=>{requestAnimationFrame(()=>{t.resize()})}))},ae=({code:i,ctrlKey:n})=>{if(!(n||r.value))return;const{xAxis:m,dataZoom:f}=t.getOption(),{data:p}=(m==null?void 0:m[0])??{data:[]};let{startValue:a,endValue:s}=(f==null?void 0:f[0])??{};if(p!=null&&p.length){switch(i){case"ArrowUp":{if(s-a<5)return;const M=Math.floor((s-a)/2)+1;a=a+M,s-a<5&&(a=s-4);break}case"ArrowDown":{const M=Math.min(500,s-a);a=a-M-1;break}case"ArrowLeft":{a>0&&(a-=1,s-=1),L.value>0&&(L.value-=1);break}case"ArrowRight":{s<p.length-1&&(a+=1,s+=1),r.value&&L.value<p.length-1&&(L.value+=1);break}}t.dispatchAction({type:"dataZoom",startValue:a,endValue:s}),t.dispatchAction({type:"updateAxisPointer",seriesIndex:0,dataIndex:r.value?L.value:null}),t.dispatchAction({type:"highlight",dataIndex:r.value?L.value:s})}},fe=()=>{t==null||t.on("datazoom",n=>{clearTimeout(_),_=setTimeout(()=>{var f,p,a,s;const{loadCheckCounts:m}=$.value;if((p=(f=t==null?void 0:t.getOption())==null?void 0:f.dataZoom)!=null&&p[0]){const{startValue:M}=(s=(a=t==null?void 0:t.getOption())==null?void 0:a.dataZoom)==null?void 0:s[0];M<m&&u===!1&&Y===!1&&(u=!0,pe("history")),H()}clearTimeout(_)},100)}),t==null||t.on("highlight",n=>{var f,p;let m=n.dataIndex||-1;n.batch&&(m=typeof((f=n==null?void 0:n.batch[0])==null?void 0:f.dataIndex)=="number"?(p=n==null?void 0:n.batch[0])==null?void 0:p.dataIndex:-1),clearTimeout(w),w=setTimeout(()=>{L.value=m,clearTimeout(w)},20)}),t==null||t.on("globalout",()=>{var m,f,p;const n=(p=(f=(m=t==null?void 0:t.getOption())==null?void 0:m.dataZoom)==null?void 0:f[0])==null?void 0:p.endValue;L.value=n});let i=null;t==null||t.on("contextmenu",n=>{i=setTimeout(()=>{n.componentType==="graphic"&&(O.value=n.info,Q.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout(i),i=null})})},ee=async()=>{var i,n,m,f,p,a;try{if(!l.variety||!l.cycle)return;const{variety:s,featureId:M,cycle:T,indicatorStore:x,mainIndicator:I,right:X,startTime:C,endTime:B}=l,{defaultShowCounts:F,addCounts:g,showWarningLine:te,getFactorData:G}=$.value,q={variety:s,featureId:M,cycle:T,mainIndicatorList:x.getIndicatorParams(I),subIndicator:R.value,right:X,showWarningLine:te,getFactorData:G};C&&B?(q.startTime=C,q.endTime=B):C?(q.startTime=C,q.limit=F+g):B?(q.endTime=B,q.limit=F+g):(q.endTime=c.dayjs().add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),q.limit=F+g);const A=await we(q);if((m=(n=(i=A==null?void 0:A.body)==null?void 0:i.kline)==null?void 0:n.time)!=null&&m.length)D.value=!1,y.value=!1;else{D.value=!0,y.value=!1;return}N.value=(f=A==null?void 0:A.body)==null?void 0:f.kline,d.value=((p=A==null?void 0:A.body)==null?void 0:p.warningLine)||[],re(),H(),G&&k("getFactorData",(a=A==null?void 0:A.body)==null?void 0:a.factor)}catch(s){throw y.value=!0,D.value=!1,new Error(s)}},pe=async i=>{const{variety:n,cycle:m,indicatorStore:f,mainIndicator:p,right:a}=l,{addCounts:s}=$.value,{time:M}=N.value;if(i==="history"){const T=await De({variety:n,cycle:m,endTime:M[0],limit:s,mainIndicatorList:f.getIndicatorParams(p),subIndicator:R.value,right:a});N.value={time:[...T.body.time,...N.value.time.slice(1)],data:[...T.body.data,...N.value.data.slice(1)],mainIndicator:N.value.mainIndicator.map((x,I)=>({...x,data:[...T.body.mainIndicator[I].data,...x.data.slice(1)]})),subIndicator:N.value.subIndicator.map((x,I)=>({...x,data:[...T.body.subIndicator[I].data,...x.data.slice(1)]}))},re(!0),T.body.data.length<s&&(Y=!0),u=!1}},re=(i=!1)=>{var I,X,C;de();const{time:n}=N.value,{gridRight:m,gridLeft:f,defaultShowCounts:p,maxShowCounts:a,showSubChart:s}=$.value;let M=n.length-1-p,T=n.length-1;if(i){const B=t.getOption(),F=(X=(I=B==null?void 0:B.xAxis)==null?void 0:I[0])==null?void 0:X.data,g=(C=B==null?void 0:B.dataZoom)==null?void 0:C[0],te=F[g==null?void 0:g.startValue],G=F[g==null?void 0:g.endValue];M=n.findIndex(q=>q===te),T=n.findIndex(q=>q===G)}const x=Le(N.value,$.value,M,T,l.cycle);if(t.setOption(x,!0),L.value=T,l.brushRange){let B=null,F=null;switch(l.cycle){case"6":{B=n.find(g=>new Date(g).getTime()>=new Date(l.brushRange[0]).getTime()||c.dayjs(g).format("YYYY-MM-DD")===c.dayjs(l.brushRange[0]).format("YYYY-MM-DD")),F=n.findLast(g=>new Date(g).getTime()<=new Date(l.brushRange[1]).getTime()||c.dayjs(g).format("YYYY-MM-DD")===c.dayjs(l.brushRange[1]).format("YYYY-MM-DD"));break}case"7":{B=n.find(g=>c.dayjs(g).day(5).format("YYYY-MM-DD")===c.dayjs(l.brushRange[0]).day(5).format("YYYY-MM-DD")),F=n.findLast(g=>c.dayjs(g).day(5).format("YYYY-MM-DD")===c.dayjs(l.brushRange[1]).day(5).format("YYYY-MM-DD"));break}case"8":{B=n.find(g=>c.dayjs(g).endOf("month").format("YYYY-MM-DD")===c.dayjs(l.brushRange[0]).endOf("month").format("YYYY-MM-DD")),F=n.findLast(g=>c.dayjs(g).endOf("month").format("YYYY-MM-DD")===c.dayjs(l.brushRange[1]).endOf("month").format("YYYY-MM-DD"));break}default:B=n.find(g=>new Date(g).getTime()>=new Date(l.brushRange[0]).getTime()),F=n.findLast(g=>new Date(g).getTime()<=new Date(l.brushRange[1]).getTime())}console.log(B,F),t.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[B,F],xAxisIndex:0}]})}s&&V.value.draw({startValue:M,endValue:T,maxValueSpan:a},{gridLeft:f,gridRight:m}),le()},H=()=>{if(!t)return;const i=t==null?void 0:t.getOption();i&&(t==null||t.setOption({...i,graphic:[...Te(t,d.value,l,$.value,()=>{Z()})]},!0),le())},le=()=>{const{time:i}=N.value;if(l.brushRange&&(i!=null&&i.length)){let n=c.dayjs(l.brushRange[0]).format("YYYY-MM-DD 00:00:00"),m=c.dayjs(l.brushRange[1]).format("YYYY-MM-DD 23:59:59"),f=null,p=null;switch(l.cycle){case"6":{f=i.find(a=>c.dayjs(a).format("YYYY-MM-DD")===c.dayjs(n).format("YYYY-MM-DD")),p=f;break}case"7":{f=i.find(a=>c.dayjs(a).day(5).format("YYYY-MM-DD")===c.dayjs(n).day(5).format("YYYY-MM-DD")),p=i.findLast(a=>c.dayjs(a).day(5).format("YYYY-MM-DD")===c.dayjs(m).day(5).format("YYYY-MM-DD"));break}case"8":{f=i.find(a=>c.dayjs(a).endOf("month").format("YYYY-MM-DD")===c.dayjs(n).endOf("month").format("YYYY-MM-DD")),p=i.findLast(a=>c.dayjs(a).endOf("month").format("YYYY-MM-DD")===c.dayjs(m).endOf("month").format("YYYY-MM-DD"));break}default:f=i.find(a=>{const s=c.dayjs(a).format("YYYY-MM-DD")===c.dayjs(n).format("YYYY-MM-DD"),M=new Date(a).getTime()>=new Date(n).getTime();return s&&M}),p=i.findLast(a=>{const s=c.dayjs(a).format("YYYY-MM-DD")===c.dayjs(m).format("YYYY-MM-DD"),M=new Date(a).getTime()<=new Date(m).getTime();return s&&M})}t.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[f,p],xAxisIndex:0}]})}},Z=async()=>{const i=await Se({featureId:l.featureId});d.value=(i==null?void 0:i.body)||[],H(),k("change","warningLine",d.value)},ye=async i=>{const{variety:n,varietyName:m,featureId:f,featureType:p}=l;if(i.key==="drawWarningLine"){const a=t==null?void 0:t.getOption(),s=a.tooltip[0];t==null||t.setOption({...a,tooltip:{...s,axisPointer:{...s.axisPointer,lineStyle:{width:0},crossStyle:{width:2},label:{...s.axisPointer.label,backgroundColor:"transparent",formatter:T=>""}}}});const M=async T=>{t==null||t.getZr().off("mousedown",M);const x=t==null?void 0:t.convertFromPixel({yAxisIndex:0},T.offsetY),I=Math.round(x*1e3)/1e3;t==null||t.setOption({...a,tooltip:{...s,axisPointer:{...s.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...s.axisPointer.label,backgroundColor:null}}}}),await Me({featureCode:n,featureName:m,featureId:f,featureType:p,warnPrice:I}),J.ElMessage.success("画线预警成功!"),Z()};t==null||t.getZr().on("mousedown",M)}else i.key==="deleteWarningLine"?(await Ve({id:O.value.id}),J.ElMessage.success("画线预警删除成功"),Z()):i.key==="changeWarningLine"&&(P.value=!0,U.value=O.value.warnPrice)},me=async()=>{const{variety:i,varietyName:n,featureId:m,featureType:f}=l;await ue({id:O.value.id,featureCode:i,featureName:n,featureId:m,featureType:f,warnPrice:U.value}),J.ElMessage.success("画线预警修改成功"),Z()},ge=()=>{Q.value=[...h]};return b({draw:(i,n)=>{i==="warningLine"&&(d.value=n,H())}}),(i,n)=>{var T;const m=ie.ElMenuItem,f=ie.ElMenu,p=he.ElEmpty,a=be.ElButton,s=xe.ElInputNumber,M=ve.ElDialog;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"klineBasic",onMousemove:n[1]||(n[1]=x=>r.value=!0),onMouseout:n[2]||(n[2]=x=>r.value=!1)},[e.createElementVNode("div",Ce,[e.createVNode(qe,{data:N.value,activeIndex:L.value},null,8,["data","activeIndex"])]),e.createElementVNode("div",{class:"klineBasic-main",style:e.normalizeStyle({height:$.value.showSubChart?"70%":"100%"})},[e.createVNode($e,{onCloseContextMenuCallBack:ge},{popover:e.withCtx(()=>[e.createVNode(f,{style:{borderRadius:"4px",overflow:"hidden",background:"#fff",borderRight:0}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,x=>(e.openBlock(),e.createBlock(m,{style:{height:"36px"},key:x.key,index:x.key,onClick:I=>ye(x)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"klineBasicMainRef",ref:E,style:{height:"100%"}},null,512)]),_:1})],4),$.value.showSubChart?(e.openBlock(),e.createElementBlock("div",We,[e.createVNode(Ie,{ref_key:"klineSubRef",ref:V,modelValue:R.value,"onUpdate:modelValue":n[0]||(n[0]=x=>R.value=x),data:N.value,cycle:o.cycle,activeIndex:L.value,subIndicatorList:(T=o.indicatorStore)==null?void 0:T.subIndicatorList},null,8,["modelValue","data","cycle","activeIndex","subIndicatorList"])])):e.createCommentVNode("",!0),D.value?(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(p,{class:"klineBasic-empty-content",description:"暂无数据"})])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("div",Ke,[Ue,e.createElementVNode("div",He,[e.createVNode(a,{onClick:ee},{default:e.withCtx(()=>[e.createTextVNode("刷新")]),_:1})])])):e.createCommentVNode("",!0)],32),e.createVNode(M,{modelValue:P.value,"onUpdate:modelValue":n[5]||(n[5]=x=>P.value=x),title:"画线预警-修改价格",width:"30%","align-center":""},{footer:e.withCtx(()=>[e.createElementVNode("span",Xe,[e.createVNode(a,{onClick:n[4]||(n[4]=x=>P.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(a,{type:"primary",onClick:me},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})])]),default:e.withCtx(()=>[Ze,e.createVNode(s,{modelValue:U.value,"onUpdate:modelValue":n[3]||(n[3]=x=>U.value=x),placeholder:"输入预警价格"},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},Je=K._export_sfc(Ge,[["__scopeId","data-v-79254471"]]),Qe={install(o){o.component("st-klineBasic",Je)}};module.exports=Qe;
|
|
1
|
+
"use strict";require("./base-ef747d02.cjs");const ve=require("./el-dialog-a24f4f8f.cjs");require("./el-overlay-ef92f51f.cjs");require("./el-input-06243b61.cjs");const xe=require("./el-input-number-854b2066.cjs"),be=require("./el-button-5973d99c.cjs"),he=require("./el-empty-1697ded8.cjs"),ie=require("./el-menu-item-6522d54c.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-popper-c9e0136d.cjs");const e=require("vue"),_e=require("echarts"),c=require("./dayjs.min-2c20abe6.cjs"),j=require("./index-8901a38c.cjs"),J=require("./el-message-0aeea1a3.cjs"),U=require("./_plugin-vue_export-helper-f246444f.cjs");require("./el-tag-fe492a6d.cjs");const se=require("./el-select-6d813c15.cjs");require("./el-scrollbar-05815cf5.cjs");require("./index-eab8a286.cjs");require("./index-bb833443.cjs");require("./index-9780a537.cjs");require("./index-f1c702f6.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-c2c5ca8f.cjs");require("./index-ca7dbd47.cjs");require("./typescript-b63f8e83.cjs");require("./index-7e4e0bd3.cjs");require("./index-eea0bcb3.cjs");require("./config-provider-79c2df1b.cjs");require("./index-a9d4ef0f.cjs");require("./debounce-62f5b6e8.cjs");function Ye(o){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const S in o)if(S!=="default"){const h=Object.getOwnPropertyDescriptor(o,S);Object.defineProperty(b,S,h.get?h:{enumerable:!0,get:()=>o[S]})}}return b.default=o,Object.freeze(b)}const ne=Ye(_e);let z=null;const ke=o=>{const b=j.y(o,{handleReq:S=>{j.v()&&(S.headers.token=j.U())},handleRes:S=>{const{data:h}=S;if(h.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:j.K(),!0}});b.get,z=b.post},we=o=>z("/middleLayer/kline/getKlineBasic",{...o,userId:j.V("id")}),De=o=>z("/middleLayer/kline/getKline",o),Me=async o=>z("/alarm/deliversign/addAlarmPrice",{...o,userId:j.V("id")}),Se=async o=>z("/alarm/deliversign/findAlarmPriceByUserId",{...o,userId:j.V("id")}),ue=async o=>z("/alarm/deliversign/updateAlarmPrice",{...o,userId:j.V("id")}),Ve=async o=>z("/alarm/deliversign/deleteAlarmPrice",{...o,userId:j.V("id")}),{round:K}=j.x,Le=(o,b,S,h,v)=>{const{data:t,time:w}=o,{gridTop:_,gridRight:u,gridLeft:Y,maxShowCounts:k,showSubChart:l}=b;return{animation:!1,grid:{top:`${_}px`,right:`${u}px`,bottom:l?"6px":"24px",left:`${Y}px`},dataZoom:[{type:"inside",startValue:S,endValue:h,maxValueSpan:k}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:r=>{const{axisDimension:D,value:y}=r;return D==="x"?l?"":["6","7","8"].includes(v)?c.dayjs(y).format("YYYY-MM-DD"):y:String(K(y))}}},formatter:()=>""},xAxis:{show:!l,type:"category",data:w,splitLine:{show:!1},axisLabel:{formatter:r=>["6","7","8"].includes(v)?c.dayjs(r).format("YYYY-MM-DD"):r}},yAxis:{type:"value",axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:r=>K(r.min),max:r=>K(r.max)},series:[{type:"candlestick",data:t,itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1}},...o.mainIndicator.map(r=>({name:r.key,type:"line",silent:!0,symbol:"none",data:r.data,lineStyle:{width:r.width||1},itemStyle:{color:r.color}}))],toolbox:{show:!1},brush:{xAxisIndex:"all",brushLink:"all",transformable:!1,outOfBrush:{colorAlpha:2},brushStyle:{color:"rgba(255,255,255,0.1)",borderColor:"rgba(255,255,255,0.4)"}}}},Te=(o,b,S,h,v)=>{const{variety:t,featureId:w,featureType:_}=S,{gridTop:u,gridLeft:Y,gridRight:k}=h;return b.reduce((l,r)=>{const{warnPrice:D}=r,y=o==null?void 0:o.convertToPixel({yAxisIndex:0},D);if(y<=u||y>=(o==null?void 0:o.getHeight()))return l;let E=0;return[...l,{type:"group",name:"warningLine",info:r,draggable:"vertical",children:[{type:"line",info:r,shape:{x1:Y,y1:y,x2:(o==null?void 0:o.getWidth())-k,y2:y},style:{stroke:"#FFF",lineWidth:1,lineDash:[8,4]},z:10},{type:"text",info:r,x:(o==null?void 0:o.getWidth())-k,y:y-5,style:{fill:"#FFF",text:D,stroke:"#000",lineWidth:1,opacity:1},z:10}],ondragstart:V=>{E=V.offsetY},ondrag:V=>{var R;if(V.target&&V.target.childAt(1)){const L=o.convertFromPixel({yAxisIndex:0},y+(V.offsetY-E));(R=V.target.childAt(1))==null||R.animate("style",!1).when(1,{text:K(L,3)}).start()}},ondragend:async V=>{const L=V.offsetY-E;if(L!==0){const N=o==null?void 0:o.convertFromPixel({yAxisIndex:0},L+y),d={id:r.id,warnPrice:K(N,3),featureId:w,featureCode:t,featureType:_};await ue(d),J.ElMessage.success("画线预警修改成功"),v&&v()}}}]},[])},Be={class:"kline-tips"},Ee=e.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(o){return(b,S)=>(e.openBlock(),e.createElementBlock("div",Be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data,(h,v)=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"kline-tips-item",style:e.normalizeStyle({color:h.color})},e.toDisplayString(h.label)+" "+e.toDisplayString(h.value),5))),128))]))}});const oe=U._export_sfc(Ee,[["__scopeId","data-v-f83b6b36"]]);const Ne={class:"kline-tips"},Fe={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(o){const{round:b,formatValue:S}=j.x,h=o,v=e.computed(()=>{const{data:w,activeIndex:_}=h;if(w.data&&w.data[_]){const u=w.data[_],Y=[{label:"开",value:b(u[0])},{label:"高",value:b(u[3])},{label:"低",value:b(u[2])},{label:"收",value:b(u[1])}];u[4]!==null&&Y.push({label:"额",value:S(u[4])});let k;return u[6]>0?k="red":u[6]<0&&(k="green"),Y.push({label:"涨跌",value:`${b(u[6])}%`,color:k}),Y}return[]}),t=e.computed(()=>{var u;const{data:w,activeIndex:_}=h;return((u=w==null?void 0:w.mainIndicator)==null?void 0:u.map(Y=>({label:Y.key,value:b(Y.data[_]),color:Y.color})))||[]});return(w,_)=>(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(oe,{data:v.value},null,8,["data"]),e.createVNode(oe,{data:t.value},null,8,["data"])]))}},qe=U._export_sfc(Fe,[["__scopeId","data-v-64b5c2a3"]]);const je={class:"klineSub"},Re={class:"klineSub-tips"},Ae={key:0,class:"klineSub-tips-select"},Oe={__name:"index",props:{cycle:{type:[String,Number],default:()=>null},data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0}},emits:["update:modelValue"],setup(o,{expose:b,emit:S}){const{round:h}=j.x;let v,t;const w=S,_=o,u=e.ref(),Y=e.computed({get(){return _.modelValue},set(r){w("update:modelValue",r)}}),k=e.computed(()=>{var y;const{data:r,activeIndex:D}=_;return((y=r==null?void 0:r.subIndicator)==null?void 0:y.map(E=>({label:E.key,color:E.color,value:E.data[D]||"-"})))||[]});e.onMounted(()=>{v=ne.init(u.value);let r=!0;t=new ResizeObserver(()=>{if(r){r=null;return}v.resize()}),t.observe(u.value)}),e.onUnmounted(()=>{v.dispose(),t.disconnect(),t=null});const l=(r,D)=>{const y=r[D],E=D===0?r[D]:r[D-1];return y[0]===y[1]?y[0]>=E[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:y[1]>y[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return b({connect:r=>{ne.connect([r,v])},draw:(r,D)=>{e.nextTick(()=>{const{startValue:y,endValue:E,maxValueSpan:V}=r,{leftYAxisRange:R,rightYAxisRange:L}=_.data.subIndicator[0],N=_.data.subIndicator.map(d=>{if(d.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:d.data.map((O,P)=>d.seriesColor==="kline"?{value:O,itemStyle:l(_.data.data,P)}:d.seriesColor==="value"?{value:O,itemStyle:{color:O>=0?"#FF0000":"#00FFFF"}}:{value:O,itemStyle:{color:d.seriesColor}})};if(d.series==="line")return{xAxisIndex:0,yAxisIndex:d.yAxis==="right"?2:1,name:d.key,type:"line",silent:!0,symbol:"none",data:d.data,lineStyle:{width:1},itemStyle:{color:d.color}}});v.setOption({animation:!1,grid:{left:`${D.gridLeft}px`,top:"10px",right:`${D.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:y,endValue:E,maxValueSpan:V}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:d=>{const{axisDimension:O,value:P}=d;if(O==="x")return["6","7","8"].includes(_.cycle)?c.dayjs(P).format("YYYY-MM-DD"):P;if(d.axisIndex===1)return String(h(P))}}},formatter:()=>""},xAxis:{type:"category",data:_.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{formatter:d=>["6","7","8"].includes(_.cycle)?c.dayjs(d).format("YYYY-MM-DD"):d}},yAxis:[{position:"right"},{position:"left",min:R==="cover"?d=>d.min:null,max:R==="cover"?d=>d.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:L==="cover"?d=>d.min:null,max:L==="cover"?d=>d.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:N},!0)})}}),(r,D)=>{const y=se.ElOption,E=se.ElSelect;return e.openBlock(),e.createElementBlock("div",je,[e.createElementVNode("div",Re,[k.value.length?(e.openBlock(),e.createElementBlock("div",Ae,[e.createVNode(E,{modelValue:Y.value,"onUpdate:modelValue":D[0]||(D[0]=V=>Y.value=V),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.subIndicatorList,V=>(e.openBlock(),e.createBlock(y,{key:V.value,label:V.label,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(oe,{data:k.value},null,8,["data"])]),e.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:u},null,512)])}}},Ie=U._export_sfc(Oe,[["__scopeId","data-v-ab519de5"]]),Pe=e.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(o,{emit:b}){const S=b,h=e.ref(),v=e.ref(),t=e.ref({display:"none",top:"0px",left:"0px"}),w=()=>{t.value.display="none",S("closeContextMenuCallBack"),document.removeEventListener("click",w)},_=u=>{if(u.preventDefault(),t.value.display==="block"){const{offsetX:Y,offsetY:k}=u,{offsetWidth:l,offsetHeight:r}=v.value;if(Y<=l&&k<=r)return}h.value.click(),t.value={display:"block",top:`${u.offsetY}px`,left:`${u.offsetX}px`},e.nextTick(()=>{const Y=h.value.getBoundingClientRect(),k=v.value.getBoundingClientRect();k.left+k.width>=Y.right&&(t.value.left=`${u.offsetX-k.width}px`),k.top+k.height>=Y.bottom&&(console.log("高度超出"),t.value.top=`${u.offsetY-k.height}px`)}),document.addEventListener("click",w)};return(u,Y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"contextmenuRef",ref:h,class:"contextmenu",onContextmenu:_,onMouseleave:w},[e.renderSlot(u.$slots,"default",{},void 0,!0),t.value.display!=="none"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:v,class:"contextmenu-popover",style:e.normalizeStyle(t.value)},[e.renderSlot(u.$slots,"popover",{},void 0,!0)],4)):e.createCommentVNode("",!0)],544))}});const $e=U._export_sfc(Pe,[["__scopeId","data-v-811db6b4"]]);const ce=o=>(e.pushScopeId("data-v-9e6456be"),o=o(),e.popScopeId(),o),Ce={class:"klineBasic-tips"},We={key:0,class:"klineBasic-sub"},ze={key:1,class:"klineBasic-empty"},Ke={key:2,class:"klineBasic-error"},Ue=ce(()=>e.createElementVNode("div",{class:"klineBasic-error-content"},"加载失败,请刷新重试",-1)),He={style:{"text-align":"center"}},Ze=ce(()=>e.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),Xe={class:"dialog-footer"},Ge={__name:"index",props:{variety:{type:[String,Number],default:()=>null},varietyName:{type:[String,Number],default:()=>null},featureId:{type:[String,Number],default:()=>null},featureType:{type:[String,Number],default:()=>null},cycle:{type:[String,Number],default:()=>null},mainIndicator:{type:String,default:()=>""},indicatorStore:{type:Object,default:()=>null},startTime:{type:String,default:()=>null},endTime:{type:String,default:()=>null},right:{type:[String,Number],default:1},config:{type:Object,default:()=>({})},env:{type:Object,default:()=>({})},brushRange:{type:[Array,null],default:()=>null}},emits:["change","getFactorData"],setup(o,{expose:b,emit:S}){const h=[{label:"画线预警",key:"drawWarningLine"}];let v=null,t=null,w,_,u=!1,Y=!1;const k=S,l=o,r=e.ref(!1),D=e.ref(!1),y=e.ref(!1),E=e.ref(null),V=e.ref(null),R=e.ref("VOL"),L=e.ref(0),N=e.ref({}),d=e.ref([]),O=e.ref({}),P=e.ref(!1),H=e.ref(""),Q=e.ref([...h]),C=e.computed(()=>({defaultShowCounts:500,addCounts:2e3,maxShowCounts:5e3,loadCheckCounts:500,showSubChart:!0,gridTop:48,gridLeft:80,gridRight:50,showWarningLine:!0,getFactorData:!0,...l.config}));e.watch(()=>{var i,n;return[l.variety,l.cycle,l.mainIndicator,R.value,(i=l.indicatorStore)==null?void 0:i.filterIndicator,(n=l.indicatorStore)==null?void 0:n.customIndicator]},()=>{ee()},{deep:!0}),e.onMounted(()=>{ke(l.env),ee(),window.addEventListener("keydown",ae)}),e.onUnmounted(()=>{t==null||t.off("datazoom"),t==null||t.off("highlight"),t==null||t.off("globalout"),t==null||t.dispose(),v==null||v.dispose(),window.removeEventListener("keydown",ae)});const de=()=>{t||(t=ne.init(E.value),fe(),C.value.showSubChart&&V.value.connect(t),v=j.D(E.value),v.listen(()=>{requestAnimationFrame(()=>{t.resize()})}))},ae=({code:i,ctrlKey:n})=>{if(!(n||r.value))return;const{xAxis:m,dataZoom:f}=t.getOption(),{data:p}=(m==null?void 0:m[0])??{data:[]};let{startValue:a,endValue:s}=(f==null?void 0:f[0])??{};if(p!=null&&p.length){switch(i){case"ArrowUp":{if(s-a<5)return;const M=Math.floor((s-a)/2)+1;a=a+M,s-a<5&&(a=s-4);break}case"ArrowDown":{const M=Math.min(500,s-a);a=a-M-1;break}case"ArrowLeft":{a>0&&(a-=1,s-=1),L.value>0&&(L.value-=1);break}case"ArrowRight":{s<p.length-1&&(a+=1,s+=1),r.value&&L.value<p.length-1&&(L.value+=1);break}}t.dispatchAction({type:"dataZoom",startValue:a,endValue:s}),t.dispatchAction({type:"updateAxisPointer",seriesIndex:0,dataIndex:r.value?L.value:null}),t.dispatchAction({type:"highlight",dataIndex:r.value?L.value:s})}},fe=()=>{t==null||t.on("datazoom",n=>{clearTimeout(_),_=setTimeout(()=>{var f,p,a,s;const{loadCheckCounts:m}=C.value;if((p=(f=t==null?void 0:t.getOption())==null?void 0:f.dataZoom)!=null&&p[0]){const{startValue:M}=(s=(a=t==null?void 0:t.getOption())==null?void 0:a.dataZoom)==null?void 0:s[0];M<m&&u===!1&&Y===!1&&(u=!0,pe("history")),Z()}clearTimeout(_)},100)}),t==null||t.on("highlight",n=>{var f,p;let m=n.dataIndex||-1;n.batch&&(m=typeof((f=n==null?void 0:n.batch[0])==null?void 0:f.dataIndex)=="number"?(p=n==null?void 0:n.batch[0])==null?void 0:p.dataIndex:-1),clearTimeout(w),w=setTimeout(()=>{L.value=m,clearTimeout(w)},20)}),t==null||t.on("globalout",()=>{var m,f,p;const n=(p=(f=(m=t==null?void 0:t.getOption())==null?void 0:m.dataZoom)==null?void 0:f[0])==null?void 0:p.endValue;L.value=n});let i=null;t==null||t.on("contextmenu",n=>{i=setTimeout(()=>{n.componentType==="graphic"&&(O.value=n.info,Q.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout(i),i=null})})},ee=async()=>{var i,n,m,f,p,a;try{if(!l.variety||!l.cycle)return;const{variety:s,featureId:M,cycle:T,indicatorStore:x,mainIndicator:I,right:$,startTime:W,endTime:B}=l,{defaultShowCounts:F,addCounts:g,showWarningLine:te,getFactorData:G}=C.value,q={variety:s,featureId:M,cycle:T,mainIndicatorList:x.getIndicatorParams(I),subIndicator:R.value,right:$,showWarningLine:te,getFactorData:G};W&&B?(q.startTime=W,q.endTime=B):W?(q.startTime=W,q.limit=F+g):B?(q.endTime=B,q.limit=F+g):(q.endTime=c.dayjs().add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),q.limit=F+g);const A=await we(q);if((m=(n=(i=A==null?void 0:A.body)==null?void 0:i.kline)==null?void 0:n.time)!=null&&m.length)D.value=!1,y.value=!1;else{D.value=!0,y.value=!1;return}N.value=(f=A==null?void 0:A.body)==null?void 0:f.kline,d.value=((p=A==null?void 0:A.body)==null?void 0:p.warningLine)||[],re(),Z(),G&&k("getFactorData",(a=A==null?void 0:A.body)==null?void 0:a.factor)}catch(s){throw y.value=!0,D.value=!1,new Error(s)}},pe=async i=>{const{variety:n,cycle:m,indicatorStore:f,mainIndicator:p,right:a}=l,{addCounts:s}=C.value,{time:M}=N.value;if(i==="history"){const T=await De({variety:n,cycle:m,endTime:M[0],limit:s,mainIndicatorList:f.getIndicatorParams(p),subIndicator:R.value,right:a});N.value={time:[...T.body.time,...N.value.time.slice(1)],data:[...T.body.data,...N.value.data.slice(1)],mainIndicator:N.value.mainIndicator.map((x,I)=>{var $;return{...x,data:[...(($=T.body.mainIndicator[I])==null?void 0:$.data)??[],...x.data.slice(1)]}}),subIndicator:N.value.subIndicator.map((x,I)=>{var $;return{...x,data:[...(($=T.body.subIndicator[I])==null?void 0:$.data)??[],...x.data.slice(1)]}})},re(!0),T.body.data.length<s&&(Y=!0),u=!1}},re=(i=!1)=>{var I,$,W;de();const{time:n}=N.value,{gridRight:m,gridLeft:f,defaultShowCounts:p,maxShowCounts:a,showSubChart:s}=C.value;let M=n.length-1-p,T=n.length-1;if(i){const B=t.getOption(),F=($=(I=B==null?void 0:B.xAxis)==null?void 0:I[0])==null?void 0:$.data,g=(W=B==null?void 0:B.dataZoom)==null?void 0:W[0],te=F[g==null?void 0:g.startValue],G=F[g==null?void 0:g.endValue];M=n.findIndex(q=>q===te),T=n.findIndex(q=>q===G)}const x=Le(N.value,C.value,M,T,l.cycle);if(t.setOption(x,!0),L.value=T,l.brushRange){let B=null,F=null;switch(l.cycle){case"6":{B=n.find(g=>new Date(g).getTime()>=new Date(l.brushRange[0]).getTime()||c.dayjs(g).format("YYYY-MM-DD")===c.dayjs(l.brushRange[0]).format("YYYY-MM-DD")),F=n.findLast(g=>new Date(g).getTime()<=new Date(l.brushRange[1]).getTime()||c.dayjs(g).format("YYYY-MM-DD")===c.dayjs(l.brushRange[1]).format("YYYY-MM-DD"));break}case"7":{B=n.find(g=>c.dayjs(g).day(5).format("YYYY-MM-DD")===c.dayjs(l.brushRange[0]).day(5).format("YYYY-MM-DD")),F=n.findLast(g=>c.dayjs(g).day(5).format("YYYY-MM-DD")===c.dayjs(l.brushRange[1]).day(5).format("YYYY-MM-DD"));break}case"8":{B=n.find(g=>c.dayjs(g).endOf("month").format("YYYY-MM-DD")===c.dayjs(l.brushRange[0]).endOf("month").format("YYYY-MM-DD")),F=n.findLast(g=>c.dayjs(g).endOf("month").format("YYYY-MM-DD")===c.dayjs(l.brushRange[1]).endOf("month").format("YYYY-MM-DD"));break}default:B=n.find(g=>new Date(g).getTime()>=new Date(l.brushRange[0]).getTime()),F=n.findLast(g=>new Date(g).getTime()<=new Date(l.brushRange[1]).getTime())}console.log(B,F),t.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[B,F],xAxisIndex:0}]})}s&&V.value.draw({startValue:M,endValue:T,maxValueSpan:a},{gridLeft:f,gridRight:m}),le()},Z=()=>{if(!t)return;const i=t==null?void 0:t.getOption();i&&(t==null||t.setOption({...i,graphic:[...Te(t,d.value,l,C.value,()=>{X()})]},!0),le())},le=()=>{const{time:i}=N.value;if(l.brushRange&&(i!=null&&i.length)){let n=c.dayjs(l.brushRange[0]).format("YYYY-MM-DD 00:00:00"),m=c.dayjs(l.brushRange[1]).format("YYYY-MM-DD 23:59:59"),f=null,p=null;switch(l.cycle){case"6":{f=i.find(a=>c.dayjs(a).format("YYYY-MM-DD")===c.dayjs(n).format("YYYY-MM-DD")),p=f;break}case"7":{f=i.find(a=>c.dayjs(a).day(5).format("YYYY-MM-DD")===c.dayjs(n).day(5).format("YYYY-MM-DD")),p=i.findLast(a=>c.dayjs(a).day(5).format("YYYY-MM-DD")===c.dayjs(m).day(5).format("YYYY-MM-DD"));break}case"8":{f=i.find(a=>c.dayjs(a).endOf("month").format("YYYY-MM-DD")===c.dayjs(n).endOf("month").format("YYYY-MM-DD")),p=i.findLast(a=>c.dayjs(a).endOf("month").format("YYYY-MM-DD")===c.dayjs(m).endOf("month").format("YYYY-MM-DD"));break}default:f=i.find(a=>{const s=c.dayjs(a).format("YYYY-MM-DD")===c.dayjs(n).format("YYYY-MM-DD"),M=new Date(a).getTime()>=new Date(n).getTime();return s&&M}),p=i.findLast(a=>{const s=c.dayjs(a).format("YYYY-MM-DD")===c.dayjs(m).format("YYYY-MM-DD"),M=new Date(a).getTime()<=new Date(m).getTime();return s&&M})}t.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[f,p],xAxisIndex:0}]})}},X=async()=>{const i=await Se({featureId:l.featureId});d.value=(i==null?void 0:i.body)||[],Z(),k("change","warningLine",d.value)},ye=async i=>{const{variety:n,varietyName:m,featureId:f,featureType:p}=l;if(i.key==="drawWarningLine"){const a=t==null?void 0:t.getOption(),s=a.tooltip[0];t==null||t.setOption({...a,tooltip:{...s,axisPointer:{...s.axisPointer,lineStyle:{width:0},crossStyle:{width:2},label:{...s.axisPointer.label,backgroundColor:"transparent",formatter:T=>""}}}});const M=async T=>{t==null||t.getZr().off("mousedown",M);const x=t==null?void 0:t.convertFromPixel({yAxisIndex:0},T.offsetY),I=Math.round(x*1e3)/1e3;t==null||t.setOption({...a,tooltip:{...s,axisPointer:{...s.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...s.axisPointer.label,backgroundColor:null}}}}),await Me({featureCode:n,featureName:m,featureId:f,featureType:p,warnPrice:I}),J.ElMessage.success("画线预警成功!"),X()};t==null||t.getZr().on("mousedown",M)}else i.key==="deleteWarningLine"?(await Ve({id:O.value.id}),J.ElMessage.success("画线预警删除成功"),X()):i.key==="changeWarningLine"&&(P.value=!0,H.value=O.value.warnPrice)},me=async()=>{const{variety:i,varietyName:n,featureId:m,featureType:f}=l;await ue({id:O.value.id,featureCode:i,featureName:n,featureId:m,featureType:f,warnPrice:H.value}),J.ElMessage.success("画线预警修改成功"),X()},ge=()=>{Q.value=[...h]};return b({draw:(i,n)=>{i==="warningLine"&&(d.value=n,Z())}}),(i,n)=>{var T;const m=ie.ElMenuItem,f=ie.ElMenu,p=he.ElEmpty,a=be.ElButton,s=xe.ElInputNumber,M=ve.ElDialog;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"klineBasic",onMousemove:n[1]||(n[1]=x=>r.value=!0),onMouseout:n[2]||(n[2]=x=>r.value=!1)},[e.createElementVNode("div",Ce,[e.createVNode(qe,{data:N.value,activeIndex:L.value},null,8,["data","activeIndex"])]),e.createElementVNode("div",{class:"klineBasic-main",style:e.normalizeStyle({height:C.value.showSubChart?"70%":"100%"})},[e.createVNode($e,{onCloseContextMenuCallBack:ge},{popover:e.withCtx(()=>[e.createVNode(f,{style:{borderRadius:"4px",overflow:"hidden",background:"#fff",borderRight:0}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,x=>(e.openBlock(),e.createBlock(m,{style:{height:"36px"},key:x.key,index:x.key,onClick:I=>ye(x)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"klineBasicMainRef",ref:E,style:{height:"100%"}},null,512)]),_:1})],4),C.value.showSubChart?(e.openBlock(),e.createElementBlock("div",We,[e.createVNode(Ie,{ref_key:"klineSubRef",ref:V,modelValue:R.value,"onUpdate:modelValue":n[0]||(n[0]=x=>R.value=x),data:N.value,cycle:o.cycle,activeIndex:L.value,subIndicatorList:(T=o.indicatorStore)==null?void 0:T.subIndicatorList},null,8,["modelValue","data","cycle","activeIndex","subIndicatorList"])])):e.createCommentVNode("",!0),D.value?(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(p,{class:"klineBasic-empty-content",description:"暂无数据"})])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("div",Ke,[Ue,e.createElementVNode("div",He,[e.createVNode(a,{onClick:ee},{default:e.withCtx(()=>[e.createTextVNode("刷新")]),_:1})])])):e.createCommentVNode("",!0)],32),e.createVNode(M,{modelValue:P.value,"onUpdate:modelValue":n[5]||(n[5]=x=>P.value=x),title:"画线预警-修改价格",width:"30%","align-center":""},{footer:e.withCtx(()=>[e.createElementVNode("span",Xe,[e.createVNode(a,{onClick:n[4]||(n[4]=x=>P.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(a,{type:"primary",onClick:me},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})])]),default:e.withCtx(()=>[Ze,e.createVNode(s,{modelValue:H.value,"onUpdate:modelValue":n[3]||(n[3]=x=>H.value=x),placeholder:"输入预警价格"},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},Je=U._export_sfc(Ge,[["__scopeId","data-v-9e6456be"]]),Qe={install(o){o.component("st-klineBasic",Je)}};module.exports=Qe;
|
package/es/KlineBasic.js
CHANGED
|
@@ -8,12 +8,12 @@ import { E as Ie } from "./el-empty-deee6b39.js";
|
|
|
8
8
|
import { E as $e, a as Pe } from "./el-menu-item-1172154b.js";
|
|
9
9
|
import "./el-tooltip-4ed993c7.js";
|
|
10
10
|
import "./el-popper-ee1f8186.js";
|
|
11
|
-
import { defineComponent as he, openBlock as E, createElementBlock as O, Fragment as le, renderList as me, normalizeStyle as ye, toDisplayString as ce, computed as
|
|
11
|
+
import { defineComponent as he, openBlock as E, createElementBlock as O, Fragment as le, renderList as me, normalizeStyle as ye, toDisplayString as ce, computed as J, createVNode as B, ref as R, onMounted as _e, onUnmounted as we, nextTick as De, createElementVNode as U, withCtx as K, createBlock as ke, createCommentVNode as X, renderSlot as Ye, watch as We, createTextVNode as re, pushScopeId as Ne, popScopeId as qe } from "vue";
|
|
12
12
|
import * as fe from "echarts";
|
|
13
13
|
import { d as u } from "./dayjs.min-8313b006.js";
|
|
14
|
-
import { y as Ce, v as ze, U as Ke, K as Ue, V as
|
|
14
|
+
import { y as Ce, v as ze, U as Ke, K as Ue, V as Q, x as ge, D as He } from "./index-7ed0999e.js";
|
|
15
15
|
import { E as ie } from "./el-message-35d4e3ac.js";
|
|
16
|
-
import { _ as
|
|
16
|
+
import { _ as ee } from "./_plugin-vue_export-helper-dad06003.js";
|
|
17
17
|
import "./el-tag-554c333b.js";
|
|
18
18
|
import { E as je, a as Ze } from "./el-select-8cb88e3c.js";
|
|
19
19
|
import "./el-scrollbar-09769d9e.js";
|
|
@@ -31,7 +31,7 @@ import "./index-657047bb.js";
|
|
|
31
31
|
import "./config-provider-95d27ce2.js";
|
|
32
32
|
import "./index-384ed4b0.js";
|
|
33
33
|
import "./debounce-06f59c68.js";
|
|
34
|
-
let
|
|
34
|
+
let Z = null;
|
|
35
35
|
const Xe = (n) => {
|
|
36
36
|
const k = Ce(n, {
|
|
37
37
|
handleReq: (A) => {
|
|
@@ -43,8 +43,8 @@ const Xe = (n) => {
|
|
|
43
43
|
return location.origin.includes("localhost") ? location.href = `${location.origin}/#/404` : Ue(), !0;
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
-
k.get,
|
|
47
|
-
}, Ge = (n) =>
|
|
46
|
+
k.get, Z = k.post;
|
|
47
|
+
}, Ge = (n) => Z("/middleLayer/kline/getKlineBasic", { ...n, userId: Q("id") }), Je = (n) => Z("/middleLayer/kline/getKline", n), Qe = async (n) => Z("/alarm/deliversign/addAlarmPrice", { ...n, userId: Q("id") }), et = async (n) => Z("/alarm/deliversign/findAlarmPriceByUserId", { ...n, userId: Q("id") }), Me = async (n) => Z("/alarm/deliversign/updateAlarmPrice", { ...n, userId: Q("id") }), tt = async (n) => Z("/alarm/deliversign/deleteAlarmPrice", { ...n, userId: Q("id") }), { round: G } = ge, nt = (n, k, A, D, g) => {
|
|
48
48
|
const { data: e, time: h } = n, { gridTop: b, gridRight: s, gridLeft: x, maxShowCounts: Y, showSubChart: r } = k;
|
|
49
49
|
return {
|
|
50
50
|
animation: !1,
|
|
@@ -72,7 +72,7 @@ const Xe = (n) => {
|
|
|
72
72
|
rich: {},
|
|
73
73
|
formatter: (a) => {
|
|
74
74
|
const { axisDimension: _, value: p } = a;
|
|
75
|
-
return _ === "x" ? r ? "" : ["6", "7", "8"].includes(g) ? u(p).format("YYYY-MM-DD") : p : String(
|
|
75
|
+
return _ === "x" ? r ? "" : ["6", "7", "8"].includes(g) ? u(p).format("YYYY-MM-DD") : p : String(G(p));
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
},
|
|
@@ -101,8 +101,8 @@ const Xe = (n) => {
|
|
|
101
101
|
color: "#333"
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
|
-
min: (a) =>
|
|
105
|
-
max: (a) =>
|
|
104
|
+
min: (a) => G(a.min),
|
|
105
|
+
max: (a) => G(a.max)
|
|
106
106
|
},
|
|
107
107
|
series: [
|
|
108
108
|
{
|
|
@@ -204,7 +204,7 @@ const Xe = (n) => {
|
|
|
204
204
|
var P;
|
|
205
205
|
if (M.target && M.target.childAt(1)) {
|
|
206
206
|
const S = n.convertFromPixel({ yAxisIndex: 0 }, p + (M.offsetY - F));
|
|
207
|
-
(P = M.target.childAt(1)) == null || P.animate("style", !1).when(1, { text:
|
|
207
|
+
(P = M.target.childAt(1)) == null || P.animate("style", !1).when(1, { text: G(S, 3) }).start();
|
|
208
208
|
}
|
|
209
209
|
},
|
|
210
210
|
// 事件:结束拖拽
|
|
@@ -213,7 +213,7 @@ const Xe = (n) => {
|
|
|
213
213
|
if (S !== 0) {
|
|
214
214
|
const V = n == null ? void 0 : n.convertFromPixel({ yAxisIndex: 0 }, S + p), d = {
|
|
215
215
|
id: a.id,
|
|
216
|
-
warnPrice:
|
|
216
|
+
warnPrice: G(V, 3),
|
|
217
217
|
featureId: h,
|
|
218
218
|
//品种id
|
|
219
219
|
featureCode: e,
|
|
@@ -246,7 +246,7 @@ const Xe = (n) => {
|
|
|
246
246
|
]));
|
|
247
247
|
}
|
|
248
248
|
});
|
|
249
|
-
const pe = /* @__PURE__ */
|
|
249
|
+
const pe = /* @__PURE__ */ ee(rt, [["__scopeId", "data-v-f83b6b36"]]);
|
|
250
250
|
const it = { class: "kline-tips" }, lt = {
|
|
251
251
|
__name: "index",
|
|
252
252
|
props: {
|
|
@@ -261,7 +261,7 @@ const it = { class: "kline-tips" }, lt = {
|
|
|
261
261
|
}
|
|
262
262
|
},
|
|
263
263
|
setup(n) {
|
|
264
|
-
const { round: k, formatValue: A } = ge, D = n, g =
|
|
264
|
+
const { round: k, formatValue: A } = ge, D = n, g = J(() => {
|
|
265
265
|
const { data: h, activeIndex: b } = D;
|
|
266
266
|
if (h.data && h.data[b]) {
|
|
267
267
|
const s = h.data[b], x = [
|
|
@@ -275,7 +275,7 @@ const it = { class: "kline-tips" }, lt = {
|
|
|
275
275
|
return s[6] > 0 ? Y = "red" : s[6] < 0 && (Y = "green"), x.push({ label: "涨跌", value: `${k(s[6])}%`, color: Y }), x;
|
|
276
276
|
}
|
|
277
277
|
return [];
|
|
278
|
-
}), e =
|
|
278
|
+
}), e = J(() => {
|
|
279
279
|
var s;
|
|
280
280
|
const { data: h, activeIndex: b } = D;
|
|
281
281
|
return ((s = h == null ? void 0 : h.mainIndicator) == null ? void 0 : s.map((x) => ({ label: x.key, value: k(x.data[b]), color: x.color }))) || [];
|
|
@@ -285,7 +285,7 @@ const it = { class: "kline-tips" }, lt = {
|
|
|
285
285
|
B(pe, { data: e.value }, null, 8, ["data"])
|
|
286
286
|
]));
|
|
287
287
|
}
|
|
288
|
-
}, st = /* @__PURE__ */
|
|
288
|
+
}, st = /* @__PURE__ */ ee(lt, [["__scopeId", "data-v-64b5c2a3"]]);
|
|
289
289
|
const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
290
290
|
key: 0,
|
|
291
291
|
class: "klineSub-tips-select"
|
|
@@ -308,14 +308,14 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
308
308
|
setup(n, { expose: k, emit: A }) {
|
|
309
309
|
const { round: D } = ge;
|
|
310
310
|
let g, e;
|
|
311
|
-
const h = A, b = n, s = R(), x =
|
|
311
|
+
const h = A, b = n, s = R(), x = J({
|
|
312
312
|
get() {
|
|
313
313
|
return b.modelValue;
|
|
314
314
|
},
|
|
315
315
|
set(a) {
|
|
316
316
|
h("update:modelValue", a);
|
|
317
317
|
}
|
|
318
|
-
}), Y =
|
|
318
|
+
}), Y = J(() => {
|
|
319
319
|
var p;
|
|
320
320
|
const { data: a, activeIndex: _ } = b;
|
|
321
321
|
return ((p = a == null ? void 0 : a.subIndicator) == null ? void 0 : p.map((F) => ({ label: F.key, color: F.color, value: F.data[_] || "-" }))) || [];
|
|
@@ -490,7 +490,7 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
490
490
|
}), (a, _) => {
|
|
491
491
|
const p = je, F = Ze;
|
|
492
492
|
return E(), O("div", ut, [
|
|
493
|
-
|
|
493
|
+
U("div", dt, [
|
|
494
494
|
Y.value.length ? (E(), O("div", ct, [
|
|
495
495
|
B(F, {
|
|
496
496
|
modelValue: x.value,
|
|
@@ -499,7 +499,7 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
499
499
|
"popper-class": "element-dark",
|
|
500
500
|
class: "element-dark subIndicator"
|
|
501
501
|
}, {
|
|
502
|
-
default:
|
|
502
|
+
default: K(() => [
|
|
503
503
|
(E(!0), O(le, null, me(n.subIndicatorList, (M) => (E(), ke(p, {
|
|
504
504
|
key: M.value,
|
|
505
505
|
label: M.label,
|
|
@@ -508,10 +508,10 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
508
508
|
]),
|
|
509
509
|
_: 1
|
|
510
510
|
}, 8, ["modelValue"])
|
|
511
|
-
])) :
|
|
511
|
+
])) : X("", !0),
|
|
512
512
|
B(pe, { data: Y.value }, null, 8, ["data"])
|
|
513
513
|
]),
|
|
514
|
-
|
|
514
|
+
U("div", {
|
|
515
515
|
class: "klineSub-chart",
|
|
516
516
|
ref_key: "subChartRef",
|
|
517
517
|
ref: s
|
|
@@ -519,7 +519,7 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
519
519
|
]);
|
|
520
520
|
};
|
|
521
521
|
}
|
|
522
|
-
}, pt = /* @__PURE__ */
|
|
522
|
+
}, pt = /* @__PURE__ */ ee(ft, [["__scopeId", "data-v-ab519de5"]]), mt = /* @__PURE__ */ he({
|
|
523
523
|
__name: "index",
|
|
524
524
|
emits: ["closeContextMenuCallBack"],
|
|
525
525
|
setup(n, { emit: k }) {
|
|
@@ -560,12 +560,12 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
560
560
|
style: ye(e.value)
|
|
561
561
|
}, [
|
|
562
562
|
Ye(s.$slots, "popover", {}, void 0, !0)
|
|
563
|
-
], 4)) :
|
|
563
|
+
], 4)) : X("", !0)
|
|
564
564
|
], 544));
|
|
565
565
|
}
|
|
566
566
|
});
|
|
567
|
-
const yt = /* @__PURE__ */
|
|
568
|
-
const Se = (n) => (Ne("data-v-
|
|
567
|
+
const yt = /* @__PURE__ */ ee(mt, [["__scopeId", "data-v-811db6b4"]]);
|
|
568
|
+
const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klineBasic-tips" }, vt = {
|
|
569
569
|
key: 0,
|
|
570
570
|
class: "klineBasic-sub"
|
|
571
571
|
}, bt = {
|
|
@@ -574,7 +574,7 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
574
574
|
}, xt = {
|
|
575
575
|
key: 2,
|
|
576
576
|
class: "klineBasic-error"
|
|
577
|
-
}, Yt = /* @__PURE__ */ Se(() => /* @__PURE__ */
|
|
577
|
+
}, Yt = /* @__PURE__ */ Se(() => /* @__PURE__ */ U("div", { class: "klineBasic-error-content" }, "加载失败,请刷新重试", -1)), ht = { style: { "text-align": "center" } }, _t = /* @__PURE__ */ Se(() => /* @__PURE__ */ U("span", { style: { "margin-right": "10px" } }, "预警价格:", -1)), wt = { class: "dialog-footer" }, Dt = {
|
|
578
578
|
__name: "index",
|
|
579
579
|
props: {
|
|
580
580
|
variety: {
|
|
@@ -645,7 +645,7 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
645
645
|
setup(n, { expose: k, emit: A }) {
|
|
646
646
|
const D = [{ label: "画线预警", key: "drawWarningLine" }];
|
|
647
647
|
let g = null, e = null, h, b, s = !1, x = !1;
|
|
648
|
-
const Y = A, r = n, a = R(!1), _ = R(!1), p = R(!1), F = R(null), M = R(null), P = R("VOL"), S = R(0), V = R({}), d = R([]), N = R({}), C = R(!1),
|
|
648
|
+
const Y = A, r = n, a = R(!1), _ = R(!1), p = R(!1), F = R(null), M = R(null), P = R("VOL"), S = R(0), V = R({}), d = R([]), N = R({}), C = R(!1), te = R(""), se = R([...D]), H = J(() => ({
|
|
649
649
|
defaultShowCounts: 500,
|
|
650
650
|
// 默认展示条数
|
|
651
651
|
addCounts: 2e3,
|
|
@@ -683,7 +683,7 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
683
683
|
e == null || e.off("datazoom"), e == null || e.off("highlight"), e == null || e.off("globalout"), e == null || e.dispose(), g == null || g.dispose(), window.removeEventListener("keydown", ve);
|
|
684
684
|
});
|
|
685
685
|
const Le = () => {
|
|
686
|
-
e || (e = fe.init(F.value), Te(),
|
|
686
|
+
e || (e = fe.init(F.value), Te(), H.value.showSubChart && M.value.connect(e), g = He(F.value), g.listen(() => {
|
|
687
687
|
requestAnimationFrame(() => {
|
|
688
688
|
e.resize();
|
|
689
689
|
});
|
|
@@ -733,10 +733,10 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
733
733
|
e == null || e.on("datazoom", (t) => {
|
|
734
734
|
clearTimeout(b), b = setTimeout(() => {
|
|
735
735
|
var c, f, o, l;
|
|
736
|
-
const { loadCheckCounts: m } =
|
|
736
|
+
const { loadCheckCounts: m } = H.value;
|
|
737
737
|
if ((f = (c = e == null ? void 0 : e.getOption()) == null ? void 0 : c.dataZoom) != null && f[0]) {
|
|
738
738
|
const { startValue: w } = (l = (o = e == null ? void 0 : e.getOption()) == null ? void 0 : o.dataZoom) == null ? void 0 : l[0];
|
|
739
|
-
w < m && s === !1 && x === !1 && (s = !0, Fe("history")),
|
|
739
|
+
w < m && s === !1 && x === !1 && (s = !0, Fe("history")), ne();
|
|
740
740
|
}
|
|
741
741
|
clearTimeout(b);
|
|
742
742
|
}, 100);
|
|
@@ -765,17 +765,17 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
765
765
|
try {
|
|
766
766
|
if (!r.variety || !r.cycle)
|
|
767
767
|
return;
|
|
768
|
-
const { variety: l, featureId: w, cycle: L, indicatorStore: v, mainIndicator: q, right:
|
|
768
|
+
const { variety: l, featureId: w, cycle: L, indicatorStore: v, mainIndicator: q, right: z, startTime: j, endTime: T } = r, { defaultShowCounts: I, addCounts: y, showWarningLine: de, getFactorData: ae } = H.value, $ = {
|
|
769
769
|
variety: l,
|
|
770
770
|
featureId: w,
|
|
771
771
|
cycle: L,
|
|
772
772
|
mainIndicatorList: v.getIndicatorParams(q),
|
|
773
773
|
subIndicator: P.value,
|
|
774
|
-
right:
|
|
774
|
+
right: z,
|
|
775
775
|
showWarningLine: de,
|
|
776
776
|
getFactorData: ae
|
|
777
777
|
};
|
|
778
|
-
|
|
778
|
+
j && T ? ($.startTime = j, $.endTime = T) : j ? ($.startTime = j, $.limit = I + y) : T ? ($.endTime = T, $.limit = I + y) : ($.endTime = u().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), $.limit = I + y);
|
|
779
779
|
const W = await Ge($);
|
|
780
780
|
if ((m = (t = (i = W == null ? void 0 : W.body) == null ? void 0 : i.kline) == null ? void 0 : t.time) != null && m.length)
|
|
781
781
|
_.value = !1, p.value = !1;
|
|
@@ -783,12 +783,12 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
783
783
|
_.value = !0, p.value = !1;
|
|
784
784
|
return;
|
|
785
785
|
}
|
|
786
|
-
V.value = (c = W == null ? void 0 : W.body) == null ? void 0 : c.kline, d.value = ((f = W == null ? void 0 : W.body) == null ? void 0 : f.warningLine) || [], be(),
|
|
786
|
+
V.value = (c = W == null ? void 0 : W.body) == null ? void 0 : c.kline, d.value = ((f = W == null ? void 0 : W.body) == null ? void 0 : f.warningLine) || [], be(), ne(), ae && Y("getFactorData", (o = W == null ? void 0 : W.body) == null ? void 0 : o.factor);
|
|
787
787
|
} catch (l) {
|
|
788
788
|
throw p.value = !0, _.value = !1, new Error(l);
|
|
789
789
|
}
|
|
790
790
|
}, Fe = async (i) => {
|
|
791
|
-
const { variety: t, cycle: m, indicatorStore: c, mainIndicator: f, right: o } = r, { addCounts: l } =
|
|
791
|
+
const { variety: t, cycle: m, indicatorStore: c, mainIndicator: f, right: o } = r, { addCounts: l } = H.value, { time: w } = V.value;
|
|
792
792
|
if (i === "history") {
|
|
793
793
|
const L = await Je({
|
|
794
794
|
variety: t,
|
|
@@ -802,26 +802,32 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
802
802
|
V.value = {
|
|
803
803
|
time: [...L.body.time, ...V.value.time.slice(1)],
|
|
804
804
|
data: [...L.body.data, ...V.value.data.slice(1)],
|
|
805
|
-
mainIndicator: V.value.mainIndicator.map((v, q) =>
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
805
|
+
mainIndicator: V.value.mainIndicator.map((v, q) => {
|
|
806
|
+
var z;
|
|
807
|
+
return {
|
|
808
|
+
...v,
|
|
809
|
+
data: [...((z = L.body.mainIndicator[q]) == null ? void 0 : z.data) ?? [], ...v.data.slice(1)]
|
|
810
|
+
};
|
|
811
|
+
}),
|
|
812
|
+
subIndicator: V.value.subIndicator.map((v, q) => {
|
|
813
|
+
var z;
|
|
814
|
+
return {
|
|
815
|
+
...v,
|
|
816
|
+
data: [...((z = L.body.subIndicator[q]) == null ? void 0 : z.data) ?? [], ...v.data.slice(1)]
|
|
817
|
+
};
|
|
818
|
+
})
|
|
813
819
|
}, be(!0), L.body.data.length < l && (x = !0), s = !1;
|
|
814
820
|
}
|
|
815
821
|
}, be = (i = !1) => {
|
|
816
|
-
var q,
|
|
822
|
+
var q, z, j;
|
|
817
823
|
Le();
|
|
818
|
-
const { time: t } = V.value, { gridRight: m, gridLeft: c, defaultShowCounts: f, maxShowCounts: o, showSubChart: l } =
|
|
824
|
+
const { time: t } = V.value, { gridRight: m, gridLeft: c, defaultShowCounts: f, maxShowCounts: o, showSubChart: l } = H.value;
|
|
819
825
|
let w = t.length - 1 - f, L = t.length - 1;
|
|
820
826
|
if (i) {
|
|
821
|
-
const T = e.getOption(), I = (
|
|
827
|
+
const T = e.getOption(), I = (z = (q = T == null ? void 0 : T.xAxis) == null ? void 0 : q[0]) == null ? void 0 : z.data, y = (j = T == null ? void 0 : T.dataZoom) == null ? void 0 : j[0], de = I[y == null ? void 0 : y.startValue], ae = I[y == null ? void 0 : y.endValue];
|
|
822
828
|
w = t.findIndex(($) => $ === de), L = t.findIndex(($) => $ === ae);
|
|
823
829
|
}
|
|
824
|
-
const v = nt(V.value,
|
|
830
|
+
const v = nt(V.value, H.value, w, L, r.cycle);
|
|
825
831
|
if (e.setOption(v, !0), S.value = L, r.brushRange) {
|
|
826
832
|
let T = null, I = null;
|
|
827
833
|
switch (r.cycle) {
|
|
@@ -852,7 +858,7 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
852
858
|
});
|
|
853
859
|
}
|
|
854
860
|
l && M.value.draw({ startValue: w, endValue: L, maxValueSpan: o }, { gridLeft: c, gridRight: m }), xe();
|
|
855
|
-
},
|
|
861
|
+
}, ne = () => {
|
|
856
862
|
if (!e)
|
|
857
863
|
return;
|
|
858
864
|
const i = e == null ? void 0 : e.getOption();
|
|
@@ -860,8 +866,8 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
860
866
|
{
|
|
861
867
|
...i,
|
|
862
868
|
graphic: [
|
|
863
|
-
...ot(e, d.value, r,
|
|
864
|
-
|
|
869
|
+
...ot(e, d.value, r, H.value, () => {
|
|
870
|
+
oe();
|
|
865
871
|
})
|
|
866
872
|
]
|
|
867
873
|
},
|
|
@@ -904,9 +910,9 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
904
910
|
]
|
|
905
911
|
});
|
|
906
912
|
}
|
|
907
|
-
},
|
|
913
|
+
}, oe = async () => {
|
|
908
914
|
const i = await et({ featureId: r.featureId });
|
|
909
|
-
d.value = (i == null ? void 0 : i.body) || [],
|
|
915
|
+
d.value = (i == null ? void 0 : i.body) || [], ne(), Y("change", "warningLine", d.value);
|
|
910
916
|
}, Re = async (i) => {
|
|
911
917
|
const { variety: t, varietyName: m, featureId: c, featureType: f } = r;
|
|
912
918
|
if (i.key === "drawWarningLine") {
|
|
@@ -972,11 +978,11 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
972
978
|
featureType: f,
|
|
973
979
|
//品种类型
|
|
974
980
|
warnPrice: q
|
|
975
|
-
}), ie.success("画线预警成功!"),
|
|
981
|
+
}), ie.success("画线预警成功!"), oe();
|
|
976
982
|
};
|
|
977
983
|
e == null || e.getZr().on("mousedown", w);
|
|
978
984
|
} else
|
|
979
|
-
i.key === "deleteWarningLine" ? (await tt({ id: N.value.id }), ie.success("画线预警删除成功"),
|
|
985
|
+
i.key === "deleteWarningLine" ? (await tt({ id: N.value.id }), ie.success("画线预警删除成功"), oe()) : i.key === "changeWarningLine" && (C.value = !0, te.value = N.value.warnPrice);
|
|
980
986
|
}, Ae = async () => {
|
|
981
987
|
const { variety: i, varietyName: t, featureId: m, featureType: c } = r;
|
|
982
988
|
await Me({
|
|
@@ -989,50 +995,50 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
989
995
|
//品种id
|
|
990
996
|
featureType: c,
|
|
991
997
|
//品种类型
|
|
992
|
-
warnPrice:
|
|
993
|
-
}), ie.success("画线预警修改成功"),
|
|
998
|
+
warnPrice: te.value
|
|
999
|
+
}), ie.success("画线预警修改成功"), oe();
|
|
994
1000
|
}, Ve = () => {
|
|
995
1001
|
se.value = [...D];
|
|
996
1002
|
};
|
|
997
1003
|
return k({
|
|
998
1004
|
draw: (i, t) => {
|
|
999
|
-
i === "warningLine" && (d.value = t,
|
|
1005
|
+
i === "warningLine" && (d.value = t, ne());
|
|
1000
1006
|
}
|
|
1001
1007
|
}), (i, t) => {
|
|
1002
1008
|
var L;
|
|
1003
1009
|
const m = $e, c = Pe, f = Ie, o = Oe, l = Be, w = Ee;
|
|
1004
1010
|
return E(), O(le, null, [
|
|
1005
|
-
|
|
1011
|
+
U("div", {
|
|
1006
1012
|
class: "klineBasic",
|
|
1007
1013
|
onMousemove: t[1] || (t[1] = (v) => a.value = !0),
|
|
1008
1014
|
onMouseout: t[2] || (t[2] = (v) => a.value = !1)
|
|
1009
1015
|
}, [
|
|
1010
|
-
|
|
1016
|
+
U("div", gt, [
|
|
1011
1017
|
B(st, {
|
|
1012
1018
|
data: V.value,
|
|
1013
1019
|
activeIndex: S.value
|
|
1014
1020
|
}, null, 8, ["data", "activeIndex"])
|
|
1015
1021
|
]),
|
|
1016
|
-
|
|
1022
|
+
U("div", {
|
|
1017
1023
|
class: "klineBasic-main",
|
|
1018
|
-
style: ye({ height:
|
|
1024
|
+
style: ye({ height: H.value.showSubChart ? "70%" : "100%" })
|
|
1019
1025
|
}, [
|
|
1020
1026
|
B(yt, { onCloseContextMenuCallBack: Ve }, {
|
|
1021
|
-
popover:
|
|
1027
|
+
popover: K(() => [
|
|
1022
1028
|
B(c, { style: {
|
|
1023
1029
|
borderRadius: "4px",
|
|
1024
1030
|
overflow: "hidden",
|
|
1025
1031
|
background: "#fff",
|
|
1026
1032
|
borderRight: 0
|
|
1027
1033
|
} }, {
|
|
1028
|
-
default:
|
|
1034
|
+
default: K(() => [
|
|
1029
1035
|
(E(!0), O(le, null, me(se.value, (v) => (E(), ke(m, {
|
|
1030
1036
|
style: { height: "36px" },
|
|
1031
1037
|
key: v.key,
|
|
1032
1038
|
index: v.key,
|
|
1033
1039
|
onClick: (q) => Re(v)
|
|
1034
1040
|
}, {
|
|
1035
|
-
default:
|
|
1041
|
+
default: K(() => [
|
|
1036
1042
|
re(ce(v.label), 1)
|
|
1037
1043
|
]),
|
|
1038
1044
|
_: 2
|
|
@@ -1041,8 +1047,8 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1041
1047
|
_: 1
|
|
1042
1048
|
})
|
|
1043
1049
|
]),
|
|
1044
|
-
default:
|
|
1045
|
-
|
|
1050
|
+
default: K(() => [
|
|
1051
|
+
U("div", {
|
|
1046
1052
|
ref_key: "klineBasicMainRef",
|
|
1047
1053
|
ref: F,
|
|
1048
1054
|
style: { height: "100%" }
|
|
@@ -1051,7 +1057,7 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1051
1057
|
_: 1
|
|
1052
1058
|
})
|
|
1053
1059
|
], 4),
|
|
1054
|
-
|
|
1060
|
+
H.value.showSubChart ? (E(), O("div", vt, [
|
|
1055
1061
|
B(pt, {
|
|
1056
1062
|
ref_key: "klineSubRef",
|
|
1057
1063
|
ref: M,
|
|
@@ -1062,24 +1068,24 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1062
1068
|
activeIndex: S.value,
|
|
1063
1069
|
subIndicatorList: (L = n.indicatorStore) == null ? void 0 : L.subIndicatorList
|
|
1064
1070
|
}, null, 8, ["modelValue", "data", "cycle", "activeIndex", "subIndicatorList"])
|
|
1065
|
-
])) :
|
|
1071
|
+
])) : X("", !0),
|
|
1066
1072
|
_.value ? (E(), O("div", bt, [
|
|
1067
1073
|
B(f, {
|
|
1068
1074
|
class: "klineBasic-empty-content",
|
|
1069
1075
|
description: "暂无数据"
|
|
1070
1076
|
})
|
|
1071
|
-
])) :
|
|
1077
|
+
])) : X("", !0),
|
|
1072
1078
|
p.value ? (E(), O("div", xt, [
|
|
1073
1079
|
Yt,
|
|
1074
|
-
|
|
1080
|
+
U("div", ht, [
|
|
1075
1081
|
B(o, { onClick: ue }, {
|
|
1076
|
-
default:
|
|
1082
|
+
default: K(() => [
|
|
1077
1083
|
re("刷新")
|
|
1078
1084
|
]),
|
|
1079
1085
|
_: 1
|
|
1080
1086
|
})
|
|
1081
1087
|
])
|
|
1082
|
-
])) :
|
|
1088
|
+
])) : X("", !0)
|
|
1083
1089
|
], 32),
|
|
1084
1090
|
B(w, {
|
|
1085
1091
|
modelValue: C.value,
|
|
@@ -1088,12 +1094,12 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1088
1094
|
width: "30%",
|
|
1089
1095
|
"align-center": ""
|
|
1090
1096
|
}, {
|
|
1091
|
-
footer:
|
|
1092
|
-
|
|
1097
|
+
footer: K(() => [
|
|
1098
|
+
U("span", wt, [
|
|
1093
1099
|
B(o, {
|
|
1094
1100
|
onClick: t[4] || (t[4] = (v) => C.value = !1)
|
|
1095
1101
|
}, {
|
|
1096
|
-
default:
|
|
1102
|
+
default: K(() => [
|
|
1097
1103
|
re("取消")
|
|
1098
1104
|
]),
|
|
1099
1105
|
_: 1
|
|
@@ -1102,18 +1108,18 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1102
1108
|
type: "primary",
|
|
1103
1109
|
onClick: Ae
|
|
1104
1110
|
}, {
|
|
1105
|
-
default:
|
|
1111
|
+
default: K(() => [
|
|
1106
1112
|
re("确定")
|
|
1107
1113
|
]),
|
|
1108
1114
|
_: 1
|
|
1109
1115
|
})
|
|
1110
1116
|
])
|
|
1111
1117
|
]),
|
|
1112
|
-
default:
|
|
1118
|
+
default: K(() => [
|
|
1113
1119
|
_t,
|
|
1114
1120
|
B(l, {
|
|
1115
|
-
modelValue:
|
|
1116
|
-
"onUpdate:modelValue": t[3] || (t[3] = (v) =>
|
|
1121
|
+
modelValue: te.value,
|
|
1122
|
+
"onUpdate:modelValue": t[3] || (t[3] = (v) => te.value = v),
|
|
1117
1123
|
placeholder: "输入预警价格"
|
|
1118
1124
|
}, null, 8, ["modelValue"])
|
|
1119
1125
|
]),
|
|
@@ -1122,7 +1128,7 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1122
1128
|
], 64);
|
|
1123
1129
|
};
|
|
1124
1130
|
}
|
|
1125
|
-
}, kt = /* @__PURE__ */
|
|
1131
|
+
}, kt = /* @__PURE__ */ ee(Dt, [["__scopeId", "data-v-9e6456be"]]), an = {
|
|
1126
1132
|
install(n) {
|
|
1127
1133
|
n.component("st-klineBasic", kt);
|
|
1128
1134
|
}
|