st-comp 0.0.128 → 0.0.129
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 +3 -3
- package/es/style.css +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +1 -1
- package/lib/{index-c2cabc8b.js → index-46222655.js} +4 -4
- package/lib/{python-d3e3fec3.js → python-477921cb.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/index.vue +1 -1
- package/src/pages/KlineBasic/api.js +1 -1
- package/src/pages/KlineBasic/index.vue +1 -1
package/es/KlineBasic.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./base-ec05f348.cjs");const me=require("./el-overlay-891dcc40.cjs");require("./el-input-6c6f5bda.cjs");const ye=require("./el-input-number-0524d787.cjs"),ve=require("./el-button-196807af.cjs"),ge=require("./el-empty-19ea04f4.cjs"),ue=require("./el-menu-item-dc904a35.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-popper-f62316cd.cjs");const e=require("vue"),he=require("echarts"),U=require("./index-a96158ae.cjs"),ie=require("./el-message-562e923d.cjs"),re=require("./_plugin-vue_export-helper-f246444f.cjs");require("./el-tag-3b03d13e.cjs");const ce=require("./el-select-928f8c19.cjs");require("./el-scrollbar-d1c3e7f7.cjs");require("./vnode-7fbc61e1.cjs");require("./index-e1e83173.cjs");require("./use-form-common-props-1b84d8f4.cjs");require("./refs-d00b710b.cjs");require("./event-61f49698.cjs");require("./scroll-41224831.cjs");require("./index-8a0b1c53.cjs");require("./typescript-b63f8e83.cjs");require("./index-80a2b137.cjs");require("./index-eea0bcb3.cjs");require("./config-provider-7cdfca4d.cjs");require("./castArray-a45823fe.cjs");require("./debounce-b2ff12bd.cjs");function xe(l){const T=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const B in l)if(B!=="default"){const w=Object.getOwnPropertyDescriptor(l,B);Object.defineProperty(T,B,w.get?w:{enumerable:!0,get:()=>l[B]})}}return T.default=l,Object.freeze(T)}const le=xe(he);var _e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function be(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var de={exports:{}};(function(l,T){(function(B,w){l.exports=w()})(_e,function(){var B=1e3,w=6e4,D=36e5,t="millisecond",S="second",M="minute",p="hour",h="day",$="week",d="month",y="quarter",x="year",k="date",E="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(u){var i=["th","st","nd","rd"],r=u%100;return"["+u+(i[(r-20)%10]||i[r]||i[0])+"]"}},j=function(u,i,r){var s=String(u);return!s||s.length>=i?u:""+Array(i+1-s.length).join(r)+u},_={s:j,z:function(u){var i=-u.utcOffset(),r=Math.abs(i),s=Math.floor(r/60),a=r%60;return(i<=0?"+":"-")+j(s,2,"0")+":"+j(a,2,"0")},m:function u(i,r){if(i.date()<r.date())return-u(r,i);var s=12*(r.year()-i.year())+(r.month()-i.month()),a=i.clone().add(s,d),o=r-a<0,n=i.clone().add(s+(o?-1:1),d);return+(-(s+(r-a)/(o?a-n:n-a))||0)},a:function(u){return u<0?Math.ceil(u)||0:Math.floor(u)},p:function(u){return{M:d,y:x,w:$,d:h,D:k,h:p,m:M,s:S,ms:t,Q:y}[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(u){return u===void 0}},I="en",W={};W[I]=F;var G="$isDayjsObject",H=function(u){return u instanceof ee||!(!u||!u[G])},Q=function u(i,r,s){var a;if(!i)return I;if(typeof i=="string"){var o=i.toLowerCase();W[o]&&(a=o),r&&(W[o]=r,a=o);var n=i.split("-");if(!a&&n.length>1)return u(n[0])}else{var c=i.name;W[c]=i,a=c}return!s&&a&&(I=a),a||!s&&I},q=function(u,i){if(H(u))return u.clone();var r=typeof i=="object"?i:{};return r.date=u,r.args=arguments,new ee(r)},b=_;b.l=Q,b.i=H,b.w=function(u,i){return q(u,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var ee=function(){function u(r){this.$L=Q(r.locale,null,!0),this.parse(r),this.$x=this.$x||r.x||{},this[G]=!0}var i=u.prototype;return i.parse=function(r){this.$d=function(s){var a=s.date,o=s.utc;if(a===null)return new Date(NaN);if(b.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var n=a.match(N);if(n){var c=n[2]-1||0,f=(n[7]||"0").substring(0,3);return o?new Date(Date.UTC(n[1],c,n[3]||1,n[4]||0,n[5]||0,n[6]||0,f)):new Date(n[1],c,n[3]||1,n[4]||0,n[5]||0,n[6]||0,f)}}return new Date(a)}(r),this.init()},i.init=function(){var r=this.$d;this.$y=r.getFullYear(),this.$M=r.getMonth(),this.$D=r.getDate(),this.$W=r.getDay(),this.$H=r.getHours(),this.$m=r.getMinutes(),this.$s=r.getSeconds(),this.$ms=r.getMilliseconds()},i.$utils=function(){return b},i.isValid=function(){return this.$d.toString()!==E},i.isSame=function(r,s){var a=q(r);return this.startOf(s)<=a&&a<=this.endOf(s)},i.isAfter=function(r,s){return q(r)<this.startOf(s)},i.isBefore=function(r,s){return this.endOf(s)<q(r)},i.$g=function(r,s,a){return b.u(r)?this[s]:this.set(a,r)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(r,s){var a=this,o=!!b.u(s)||s,n=b.p(r),c=function(A,C){var Y=b.w(a.$u?Date.UTC(a.$y,C,A):new Date(a.$y,C,A),a);return o?Y:Y.endOf(h)},f=function(A,C){return b.w(a.toDate()[A].apply(a.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(C)),a)},m=this.$W,v=this.$M,g=this.$D,O="set"+(this.$u?"UTC":"");switch(n){case x:return o?c(1,0):c(31,11);case d:return o?c(1,v):c(0,v+1);case $:var L=this.$locale().weekStart||0,V=(m<L?m+7:m)-L;return c(o?g-V:g+(6-V),v);case h:case k:return f(O+"Hours",0);case p:return f(O+"Minutes",1);case M:return f(O+"Seconds",2);case S:return f(O+"Milliseconds",3);default:return this.clone()}},i.endOf=function(r){return this.startOf(r,!1)},i.$set=function(r,s){var a,o=b.p(r),n="set"+(this.$u?"UTC":""),c=(a={},a[h]=n+"Date",a[k]=n+"Date",a[d]=n+"Month",a[x]=n+"FullYear",a[p]=n+"Hours",a[M]=n+"Minutes",a[S]=n+"Seconds",a[t]=n+"Milliseconds",a)[o],f=o===h?this.$D+(s-this.$W):s;if(o===d||o===x){var m=this.clone().set(k,1);m.$d[c](f),m.init(),this.$d=m.set(k,Math.min(this.$D,m.daysInMonth())).$d}else c&&this.$d[c](f);return this.init(),this},i.set=function(r,s){return this.clone().$set(r,s)},i.get=function(r){return this[b.p(r)]()},i.add=function(r,s){var a,o=this;r=Number(r);var n=b.p(s),c=function(v){var g=q(o);return b.w(g.date(g.date()+Math.round(v*r)),o)};if(n===d)return this.set(d,this.$M+r);if(n===x)return this.set(x,this.$y+r);if(n===h)return c(1);if(n===$)return c(7);var f=(a={},a[M]=w,a[p]=D,a[S]=B,a)[n]||1,m=this.$d.getTime()+r*f;return b.w(m,this)},i.subtract=function(r,s){return this.add(-1*r,s)},i.format=function(r){var s=this,a=this.$locale();if(!this.isValid())return a.invalidDate||E;var o=r||"YYYY-MM-DDTHH:mm:ssZ",n=b.z(this),c=this.$H,f=this.$m,m=this.$M,v=a.weekdays,g=a.months,O=a.meridiem,L=function(C,Y,P,K){return C&&(C[Y]||C(s,o))||P[Y].slice(0,K)},V=function(C){return b.s(c%12||12,C,"0")},A=O||function(C,Y,P){var K=C<12?"AM":"PM";return P?K.toLowerCase():K};return o.replace(R,function(C,Y){return Y||function(P){switch(P){case"YY":return String(s.$y).slice(-2);case"YYYY":return b.s(s.$y,4,"0");case"M":return m+1;case"MM":return b.s(m+1,2,"0");case"MMM":return L(a.monthsShort,m,g,3);case"MMMM":return L(g,m);case"D":return s.$D;case"DD":return b.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return L(a.weekdaysMin,s.$W,v,2);case"ddd":return L(a.weekdaysShort,s.$W,v,3);case"dddd":return v[s.$W];case"H":return String(c);case"HH":return b.s(c,2,"0");case"h":return V(1);case"hh":return V(2);case"a":return A(c,f,!0);case"A":return A(c,f,!1);case"m":return String(f);case"mm":return b.s(f,2,"0");case"s":return String(s.$s);case"ss":return b.s(s.$s,2,"0");case"SSS":return b.s(s.$ms,3,"0");case"Z":return n}return null}(C)||n.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(r,s,a){var o,n=this,c=b.p(s),f=q(r),m=(f.utcOffset()-this.utcOffset())*w,v=this-f,g=function(){return b.m(n,f)};switch(c){case x:o=g()/12;break;case d:o=g();break;case y:o=g()/3;break;case $:o=(v-m)/6048e5;break;case h:o=(v-m)/864e5;break;case p:o=v/D;break;case M:o=v/w;break;case S:o=v/B;break;default:o=v}return a?o:b.a(o)},i.daysInMonth=function(){return this.endOf(d).$D},i.$locale=function(){return W[this.$L]},i.locale=function(r,s){if(!r)return this.$L;var a=this.clone(),o=Q(r,s,!0);return o&&(a.$L=o),a},i.clone=function(){return b.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},u}(),te=ee.prototype;return q.prototype=te,[["$ms",t],["$s",S],["$m",M],["$H",p],["$W",h],["$M",d],["$y",x],["$D",k]].forEach(function(u){te[u[1]]=function(i){return this.$g(i,u[0],u[1])}}),q.extend=function(u,i){return u.$i||(u(i,ee,q),u.$i=!0),q},q.locale=Q,q.isDayjs=H,q.unix=function(u){return q(1e3*u)},q.en=W[I],q.Ls=W,q.p={},q})})(de);var ke=de.exports;const we=be(ke);let X=null;const $e=l=>{const T=U.y(l,{handleReq:B=>{U.v()&&(B.headers.token=U.U())},handleRes:B=>{const{data:w}=B;if(w.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:U.K(),!0}});T.get,X=T.post},Se=l=>X("/middleLayer/kline/getKlineBasic",{...l,userId:U.V("id")}),Me=l=>X("/middleLayer/kline/getKline",l),Ve=async l=>X("/alarm/deliversign/addAlarmPrice",{...l,userId:U.V("id")}),De=async l=>X("/alarm/deliversign/findAlarmPriceByUserId",{...l,userId:U.V("id")}),fe=async l=>X("/alarm/deliversign/updateAlarmPrice",{...l,userId:U.V("id")}),Le=async l=>X("/alarm/deliversign/deleteAlarmPrice",{...l,userId:U.V("id")}),{round:ne}=U.x,Te=(l,T,B,w)=>{const{data:D,time:t}=l,{gridTop:S,gridRight:M,gridLeft:p,maxShowCounts:h,showSubChart:$}=T;return{animation:!1,grid:{top:`${S}px`,right:`${M}px`,bottom:$?"6px":"24px",left:`${p}px`},dataZoom:[{type:"inside",startValue:B,endValue:w,maxValueSpan:h}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:d=>{const{axisDimension:y,value:x}=d;return y==="x"?$?"":x:String(ne(x))}}},formatter:()=>""},xAxis:{show:!$,type:"category",data:t,splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:d=>ne(d.min),max:d=>ne(d.max)},series:[{type:"candlestick",data:D,itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1}},...l.mainIndicator.map(d=>({name:d.key,type:"line",silent:!0,symbol:"none",data:d.data,lineStyle:{width:d.width||1},itemStyle:{color:d.color}}))]}},Be=(l,T,B,w,D)=>{const{variety:t,featureId:S,featureType:M}=B,{gridTop:p,gridLeft:h,gridRight:$}=w;return T.reduce((d,y)=>{const{warnPrice:x}=y,k=l==null?void 0:l.convertToPixel({yAxisIndex:0},x);if(k<=p||k>=(l==null?void 0:l.getHeight()))return d;let E=0;return[...d,{type:"group",name:"warningLine",info:y,draggable:"vertical",children:[{type:"line",info:y,shape:{x1:h,y1:k,x2:(l==null?void 0:l.getWidth())-$,y2:k},style:{stroke:"#FFF",lineWidth:1,lineDash:[8,4]},z:10},{type:"text",info:y,x:(l==null?void 0:l.getWidth())-$,y:k-5,style:{fill:"#FFF",text:x,stroke:"#000",lineWidth:1,opacity:1},z:10}],ondragstart:N=>{E=N.offsetY},ondrag:N=>{var R;if(N.target&&N.target.childAt(1)){const F=l.convertFromPixel({yAxisIndex:0},k+(N.offsetY-E));(R=N.target.childAt(1))==null||R.animate("style",!1).when(1,{text:ne(F,3)}).start()}},ondragend:async N=>{const F=N.offsetY-E;if(F!==0){const j=l==null?void 0:l.convertFromPixel({yAxisIndex:0},F+k),_={id:y.id,warnPrice:ne(j,3),featureId:S,featureCode:t,featureType:M};await fe(_),ie.ElMessage.success("画线预警修改成功"),D&&D()}}}]},[])},Ne={class:"kline-tips"},Fe=e.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(l){return(T,B)=>(e.openBlock(),e.createElementBlock("div",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.data,(w,D)=>(e.openBlock(),e.createElementBlock("div",{key:D,class:"kline-tips-item",style:e.normalizeStyle({color:w.color})},e.toDisplayString(w.label)+" "+e.toDisplayString(w.value),5))),128))]))}});const se=re._export_sfc(Fe,[["__scopeId","data-v-f83b6b36"]]);const Oe={class:"kline-tips"},Ee={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(l){const{round:T,formatValue:B}=U.x,w=l,D=e.computed(()=>{const{data:S,activeIndex:M}=w;if(S.data&&S.data[M]){const p=S.data[M],h=[{label:"开",value:T(p[0])},{label:"高",value:T(p[3])},{label:"低",value:T(p[2])},{label:"收",value:T(p[1])}];p[4]!==null&&h.push({label:"额",value:B(p[4])});let $;return p[6]>0?$="red":p[6]<0&&($="green"),h.push({label:"涨跌",value:`${T(p[6])}%`,color:$}),h}return[]}),t=e.computed(()=>{var p;const{data:S,activeIndex:M}=w;return((p=S==null?void 0:S.mainIndicator)==null?void 0:p.map(h=>({label:h.key,value:T(h.data[M]),color:h.color})))||[]});return(S,M)=>(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(se,{data:D.value},null,8,["data"]),e.createVNode(se,{data:t.value},null,8,["data"])]))}},qe=re._export_sfc(Ee,[["__scopeId","data-v-64b5c2a3"]]);const Ae={class:"klineSub"},Ce={class:"klineSub-tips"},Ie={key:0,class:"klineSub-tips-select"},We={__name:"index",props:{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(l,{expose:T,emit:B}){const{round:w}=U.x;let D,t;const S=B,M=l,p=e.ref(),h=e.computed({get(){return M.modelValue},set(y){S("update:modelValue",y)}}),$=e.computed(()=>{var k;const{data:y,activeIndex:x}=M;return((k=y==null?void 0:y.subIndicator)==null?void 0:k.map(E=>({label:E.key,color:E.color,value:E.data[x]||"-"})))||[]});e.onMounted(()=>{D=le.init(p.value);let y=!0;t=new ResizeObserver(()=>{if(y){y=null;return}D.resize()}),t.observe(p.value)}),e.onUnmounted(()=>{D.dispose(),t.disconnect(),t=null});const d=(y,x)=>{const k=y[x],E=x===0?y[x]:y[x-1];return k[0]===k[1]?k[0]>=E[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:k[1]>k[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return T({connect:y=>{le.connect([y,D])},draw:(y,x)=>{e.nextTick(()=>{const{startValue:k,endValue:E,maxValueSpan:N}=y,{leftYAxisRange:R,rightYAxisRange:F}=M.data.subIndicator[0],j=M.data.subIndicator.map(_=>{if(_.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:_.data.map((I,W)=>_.seriesColor==="kline"?{value:I,itemStyle:d(M.data.data,W)}:_.seriesColor==="value"?{value:I,itemStyle:{color:I>=0?"#FF0000":"#00FFFF"}}:{value:I,itemStyle:{color:_.seriesColor}})};if(_.series==="line")return{xAxisIndex:0,yAxisIndex:_.yAxis==="right"?2:1,name:_.key,type:"line",silent:!0,symbol:"none",data:_.data,lineStyle:{width:1},itemStyle:{color:_.color}}});D.setOption({animation:!1,grid:{left:`${x.gridLeft}px`,top:"10px",right:`${x.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:k,endValue:E,maxValueSpan:N}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:_=>{const{axisDimension:I,value:W}=_;if(I==="x")return W;if(_.axisIndex===1)return String(w(W))}}},formatter:()=>""},xAxis:{type:"category",data:M.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:_=>_}},yAxis:[{position:"right"},{position:"left",min:R==="cover"?_=>_.min:null,max:R==="cover"?_=>_.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:F==="cover"?_=>_.min:null,max:F==="cover"?_=>_.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:j},!0)})}}),(y,x)=>{const k=ce.ElOption,E=ce.ElSelect;return e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("div",Ce,[$.value.length?(e.openBlock(),e.createElementBlock("div",Ie,[e.createVNode(E,{modelValue:h.value,"onUpdate:modelValue":x[0]||(x[0]=N=>h.value=N),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.subIndicatorList,N=>(e.openBlock(),e.createBlock(k,{key:N.value,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(se,{data:$.value},null,8,["data"])]),e.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:p},null,512)])}}},Pe=re._export_sfc(We,[["__scopeId","data-v-c06321cd"]]),Ye=e.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(l,{emit:T}){const B=T,w=e.ref(),D=e.ref(),t=e.ref({display:"none",top:"0px",left:"0px"}),S=()=>{t.value.display="none",B("closeContextMenuCallBack"),document.removeEventListener("click",S)},M=p=>{if(p.preventDefault(),t.value.display==="block"){const{offsetX:h,offsetY:$}=p,{offsetWidth:d,offsetHeight:y}=D.value;if(h<=d&&$<=y)return}w.value.click(),t.value={display:"block",top:`${p.offsetY}px`,left:`${p.offsetX}px`},e.nextTick(()=>{const h=w.value.getBoundingClientRect(),$=D.value.getBoundingClientRect();$.left+$.width>=h.right&&(t.value.left=`${p.offsetX-$.width}px`),$.top+$.height>=h.bottom&&(console.log("高度超出"),t.value.top=`${p.offsetY-$.height}px`)}),document.addEventListener("click",S)};return(p,h)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"contextmenuRef",ref:w,class:"contextmenu",onContextmenu:M,onMouseleave:S},[e.renderSlot(p.$slots,"default",{},void 0,!0),t.value.display!=="none"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:D,class:"contextmenu-popover",style:e.normalizeStyle(t.value)},[e.renderSlot(p.$slots,"popover",{},void 0,!0)],4)):e.createCommentVNode("",!0)],544))}});const Re=re._export_sfc(Ye,[["__scopeId","data-v-811db6b4"]]);const pe=l=>(e.pushScopeId("data-v-70c4625e"),l=l(),e.popScopeId(),l),je={class:"klineBasic"},He={class:"klineBasic-tips"},ze={key:0,class:"klineBasic-sub"},Ue={key:1,class:"klineBasic-empty"},Ze={key:2,class:"klineBasic-error"},Ke=pe(()=>e.createElementVNode("div",{class:"klineBasic-error-content"}," 加载失败,请刷新重试 ",-1)),Je={style:{"text-align":"center"}},Xe=pe(()=>e.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),Ge={class:"dialog-footer"},Qe={__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:()=>({})}},emits:["change","getFactorData"],setup(l,{expose:T,emit:B}){const w=[{label:"画线预警",key:"drawWarningLine"}];let D=null,t=null,S,M,p=!1,h=!1;const $=B,d=l,y=e.ref(!1),x=e.ref(!1),k=e.ref(null),E=e.ref(null),N=e.ref("VOL"),R=e.ref(0),F=e.ref({}),j=e.ref([]),_=e.ref({}),I=e.ref(!1),W=e.ref(""),G=e.ref([...w]),H=e.computed(()=>({defaultShowCounts:500,addCounts:2e3,maxShowCounts:5e3,loadCheckCounts:500,showSubChart:!0,gridTop:48,gridLeft:80,gridRight:50,showWarningLine:!0,getFactorData:!0,...d.config}));e.watch(()=>{var o,n;return[d.variety,d.cycle,d.mainIndicator,N.value,(o=d.indicatorStore)==null?void 0:o.filterIndicator,(n=d.indicatorStore)==null?void 0:n.customIndicator]},()=>{b()},{deep:!0}),e.onMounted(()=>{$e(d.env),b()}),e.onUnmounted(()=>{t==null||t.off("datazoom"),t==null||t.off("highlight"),t==null||t.off("globalout"),t==null||t.dispose(),D==null||D.dispose()});const Q=()=>{t||(t=le.init(k.value),q(),H.value.showSubChart&&E.value.connect(t),D=U.D(k.value),D.listen(()=>{requestAnimationFrame(()=>{t.resize()})}))},q=()=>{t==null||t.on("datazoom",n=>{clearTimeout(M),M=setTimeout(()=>{var f,m,v,g;const{loadCheckCounts:c}=H.value;if((m=(f=t==null?void 0:t.getOption())==null?void 0:f.dataZoom)!=null&&m[0]){const{startValue:O}=(g=(v=t==null?void 0:t.getOption())==null?void 0:v.dataZoom)==null?void 0:g[0];O<c&&p===!1&&h===!1&&(p=!0,ee("history")),u()}clearTimeout(M)},100)}),t==null||t.on("highlight",n=>{var f,m;let c=n.dataIndex||-1;n.batch&&(c=typeof((f=n==null?void 0:n.batch[0])==null?void 0:f.dataIndex)=="number"?(m=n==null?void 0:n.batch[0])==null?void 0:m.dataIndex:-1),clearTimeout(S),S=setTimeout(()=>{R.value=c,clearTimeout(S)},20)}),t==null||t.on("globalout",()=>{var c,f,m;const n=(m=(f=(c=t==null?void 0:t.getOption())==null?void 0:c.dataZoom)==null?void 0:f[0])==null?void 0:m.endValue;R.value=n});let o=null;t==null||t.on("contextmenu",n=>{o=setTimeout(()=>{n.componentType==="graphic"&&(_.value=n.info,G.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout(o),o=null})})},b=async()=>{var o,n,c,f,m,v;try{if(!d.variety||!d.cycle)return;const{variety:g,featureId:O,cycle:L,indicatorStore:V,mainIndicator:A,right:C,startTime:Y,endTime:P}=d,{defaultShowCounts:K,addCounts:J,showWarningLine:ae,getFactorData:oe}=H.value,z={variety:g,featureId:O,cycle:L,mainIndicatorList:V.getIndicatorParams(A),subIndicator:N.value,right:C,showWarningLine:ae,getFactorData:oe};Y&&P?(z.startTime=Y,z.endTime=P):Y?(z.startTime=Y,z.limit=K+J):P?(z.endTime=P,z.limit=K+J):(z.endTime=we().format("YYYY-MM-DD HH:mm:ss"),z.limit=K+J);const Z=await Se(z);if((c=(n=(o=Z==null?void 0:Z.body)==null?void 0:o.kline)==null?void 0:n.time)!=null&&c.length)y.value=!1,x.value=!1;else{y.value=!0,x.value=!1;return}F.value=(f=Z==null?void 0:Z.body)==null?void 0:f.kline,j.value=((m=Z==null?void 0:Z.body)==null?void 0:m.warningLine)||[],te(),u(),oe&&$("getFactorData",(v=Z==null?void 0:Z.body)==null?void 0:v.factor)}catch(g){throw x.value=!0,y.value=!1,new Error(g)}},ee=async o=>{const{variety:n,cycle:c,indicatorStore:f,mainIndicator:m,right:v}=d,{addCounts:g}=H.value,{time:O}=F.value;if(o==="history"){const L=await Me({variety:n,cycle:c,endTime:O[0],limit:g,mainIndicatorList:f.getIndicatorParams(m),subIndicator:N.value,right:v});F.value={time:[...L.body.time,...F.value.time.slice(1)],data:[...L.body.data,...F.value.data.slice(1)],mainIndicator:F.value.mainIndicator.map((V,A)=>({...V,data:[...L.body.mainIndicator[A].data,...V.data.slice(1)]})),subIndicator:F.value.subIndicator.map((V,A)=>({...V,data:[...L.body.subIndicator[A].data,...V.data.slice(1)]}))},te(!0),L.body.data.length<g&&(h=!0),p=!1}},te=(o=!1)=>{var A,C,Y;Q();const{time:n}=F.value,{gridRight:c,gridLeft:f,defaultShowCounts:m,maxShowCounts:v,showSubChart:g}=H.value;let O=n.length-1-m,L=n.length-1;if(o){const P=t.getOption(),K=(C=(A=P==null?void 0:P.xAxis)==null?void 0:A[0])==null?void 0:C.data,J=(Y=P==null?void 0:P.dataZoom)==null?void 0:Y[0],ae=K[J==null?void 0:J.startValue],oe=K[J==null?void 0:J.endValue];O=n.findIndex(z=>z===ae),L=n.findIndex(z=>z===oe)}const V=Te(F.value,H.value,O,L);t.setOption(V,!0),R.value=L,g&&E.value.draw({startValue:O,endValue:L,maxValueSpan:v},{gridLeft:f,gridRight:c})},u=()=>{if(!t)return;const o=t==null?void 0:t.getOption();o&&(t==null||t.setOption({...o,graphic:[...Be(t,j.value,d,H.value,()=>{i()})]},!0))},i=async()=>{const o=await De({featureId:d.featureId});j.value=(o==null?void 0:o.body)||[],u(),$("change","warningLine",j.value)},r=async o=>{const{variety:n,varietyName:c,featureId:f,featureType:m}=d;if(o.key==="drawWarningLine"){const v=t==null?void 0:t.getOption(),g=v.tooltip[0];t==null||t.setOption({...v,tooltip:{...g,axisPointer:{...g.axisPointer,lineStyle:{width:0},crossStyle:{width:2},label:{...g.axisPointer.label,backgroundColor:"transparent",formatter:L=>""}}}});const O=async L=>{t==null||t.getZr().off("mousedown",O);const V=t==null?void 0:t.convertFromPixel({yAxisIndex:0},L.offsetY),A=Math.round(V*1e3)/1e3;t==null||t.setOption({...v,tooltip:{...g,axisPointer:{...g.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...g.axisPointer.label,backgroundColor:null}}}}),await Ve({featureCode:n,featureName:c,featureId:f,featureType:m,warnPrice:A}),ie.ElMessage.success("画线预警成功!"),i()};t==null||t.getZr().on("mousedown",O)}else o.key==="deleteWarningLine"?(await Le({id:_.value.id}),ie.ElMessage.success("画线预警删除成功"),i()):o.key==="changeWarningLine"&&(I.value=!0,W.value=_.value.warnPrice)},s=async()=>{const{variety:o,varietyName:n,featureId:c,featureType:f}=d;await fe({id:_.value.id,featureCode:o,featureName:n,featureId:c,featureType:f,warnPrice:W.value}),ie.ElMessage.success("画线预警修改成功"),i()},a=()=>{G.value=[...w]};return T({draw:(o,n)=>{o==="warningLine"&&(j.value=n,u())}}),(o,n)=>{var L;const c=ue.ElMenuItem,f=ue.ElMenu,m=ge.ElEmpty,v=ve.ElButton,g=ye.ElInputNumber,O=me.ElDialog;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",je,[e.createElementVNode("div",He,[e.createVNode(qe,{data:F.value,activeIndex:R.value},null,8,["data","activeIndex"])]),e.createElementVNode("div",{class:"klineBasic-main",style:e.normalizeStyle({height:H.value.showSubChart?"70%":"100%"})},[e.createVNode(Re,{onCloseContextMenuCallBack:a},{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(G.value,V=>(e.openBlock(),e.createBlock(c,{style:{height:"36px"},key:V.key,index:V.key,onClick:A=>r(V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"klineBasicMainRef",ref:k,style:{height:"100%"}},null,512)]),_:1})],4),H.value.showSubChart?(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(Pe,{ref_key:"klineSubRef",ref:E,modelValue:N.value,"onUpdate:modelValue":n[0]||(n[0]=V=>N.value=V),data:F.value,activeIndex:R.value,subIndicatorList:(L=l.indicatorStore)==null?void 0:L.subIndicatorList},null,8,["modelValue","data","activeIndex","subIndicatorList"])])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("div",Ue,[e.createVNode(m,{class:"klineBasic-empty-content",description:"暂无数据"})])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("div",Ze,[Ke,e.createElementVNode("div",Je,[e.createVNode(v,{onClick:b},{default:e.withCtx(()=>[e.createTextVNode("刷新")]),_:1})])])):e.createCommentVNode("",!0)]),e.createVNode(O,{modelValue:I.value,"onUpdate:modelValue":n[3]||(n[3]=V=>I.value=V),title:"画线预警-修改价格",width:"30%","align-center":""},{footer:e.withCtx(()=>[e.createElementVNode("span",Ge,[e.createVNode(v,{onClick:n[2]||(n[2]=V=>I.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(v,{type:"primary",onClick:s},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})])]),default:e.withCtx(()=>[Xe,e.createVNode(g,{modelValue:W.value,"onUpdate:modelValue":n[1]||(n[1]=V=>W.value=V),placeholder:"输入预警价格"},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},et=re._export_sfc(Qe,[["__scopeId","data-v-70c4625e"]]),tt={install(l){l.component("st-klineBasic",et)}};module.exports=tt;
|
|
1
|
+
"use strict";require("./base-ec05f348.cjs");const me=require("./el-overlay-891dcc40.cjs");require("./el-input-6c6f5bda.cjs");const ye=require("./el-input-number-0524d787.cjs"),ve=require("./el-button-196807af.cjs"),ge=require("./el-empty-19ea04f4.cjs"),ue=require("./el-menu-item-dc904a35.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-popper-f62316cd.cjs");const e=require("vue"),he=require("echarts"),U=require("./index-a96158ae.cjs"),ie=require("./el-message-562e923d.cjs"),re=require("./_plugin-vue_export-helper-f246444f.cjs");require("./el-tag-3b03d13e.cjs");const ce=require("./el-select-928f8c19.cjs");require("./el-scrollbar-d1c3e7f7.cjs");require("./vnode-7fbc61e1.cjs");require("./index-e1e83173.cjs");require("./use-form-common-props-1b84d8f4.cjs");require("./refs-d00b710b.cjs");require("./event-61f49698.cjs");require("./scroll-41224831.cjs");require("./index-8a0b1c53.cjs");require("./typescript-b63f8e83.cjs");require("./index-80a2b137.cjs");require("./index-eea0bcb3.cjs");require("./config-provider-7cdfca4d.cjs");require("./castArray-a45823fe.cjs");require("./debounce-b2ff12bd.cjs");function xe(l){const T=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const B in l)if(B!=="default"){const w=Object.getOwnPropertyDescriptor(l,B);Object.defineProperty(T,B,w.get?w:{enumerable:!0,get:()=>l[B]})}}return T.default=l,Object.freeze(T)}const le=xe(he);var _e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function be(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var de={exports:{}};(function(l,T){(function(B,w){l.exports=w()})(_e,function(){var B=1e3,w=6e4,D=36e5,t="millisecond",S="second",M="minute",p="hour",h="day",$="week",d="month",y="quarter",x="year",k="date",E="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(u){var i=["th","st","nd","rd"],r=u%100;return"["+u+(i[(r-20)%10]||i[r]||i[0])+"]"}},j=function(u,i,r){var s=String(u);return!s||s.length>=i?u:""+Array(i+1-s.length).join(r)+u},_={s:j,z:function(u){var i=-u.utcOffset(),r=Math.abs(i),s=Math.floor(r/60),a=r%60;return(i<=0?"+":"-")+j(s,2,"0")+":"+j(a,2,"0")},m:function u(i,r){if(i.date()<r.date())return-u(r,i);var s=12*(r.year()-i.year())+(r.month()-i.month()),a=i.clone().add(s,d),o=r-a<0,n=i.clone().add(s+(o?-1:1),d);return+(-(s+(r-a)/(o?a-n:n-a))||0)},a:function(u){return u<0?Math.ceil(u)||0:Math.floor(u)},p:function(u){return{M:d,y:x,w:$,d:h,D:k,h:p,m:M,s:S,ms:t,Q:y}[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(u){return u===void 0}},I="en",W={};W[I]=F;var G="$isDayjsObject",H=function(u){return u instanceof ee||!(!u||!u[G])},Q=function u(i,r,s){var a;if(!i)return I;if(typeof i=="string"){var o=i.toLowerCase();W[o]&&(a=o),r&&(W[o]=r,a=o);var n=i.split("-");if(!a&&n.length>1)return u(n[0])}else{var c=i.name;W[c]=i,a=c}return!s&&a&&(I=a),a||!s&&I},q=function(u,i){if(H(u))return u.clone();var r=typeof i=="object"?i:{};return r.date=u,r.args=arguments,new ee(r)},b=_;b.l=Q,b.i=H,b.w=function(u,i){return q(u,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var ee=function(){function u(r){this.$L=Q(r.locale,null,!0),this.parse(r),this.$x=this.$x||r.x||{},this[G]=!0}var i=u.prototype;return i.parse=function(r){this.$d=function(s){var a=s.date,o=s.utc;if(a===null)return new Date(NaN);if(b.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var n=a.match(N);if(n){var c=n[2]-1||0,f=(n[7]||"0").substring(0,3);return o?new Date(Date.UTC(n[1],c,n[3]||1,n[4]||0,n[5]||0,n[6]||0,f)):new Date(n[1],c,n[3]||1,n[4]||0,n[5]||0,n[6]||0,f)}}return new Date(a)}(r),this.init()},i.init=function(){var r=this.$d;this.$y=r.getFullYear(),this.$M=r.getMonth(),this.$D=r.getDate(),this.$W=r.getDay(),this.$H=r.getHours(),this.$m=r.getMinutes(),this.$s=r.getSeconds(),this.$ms=r.getMilliseconds()},i.$utils=function(){return b},i.isValid=function(){return this.$d.toString()!==E},i.isSame=function(r,s){var a=q(r);return this.startOf(s)<=a&&a<=this.endOf(s)},i.isAfter=function(r,s){return q(r)<this.startOf(s)},i.isBefore=function(r,s){return this.endOf(s)<q(r)},i.$g=function(r,s,a){return b.u(r)?this[s]:this.set(a,r)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(r,s){var a=this,o=!!b.u(s)||s,n=b.p(r),c=function(A,C){var Y=b.w(a.$u?Date.UTC(a.$y,C,A):new Date(a.$y,C,A),a);return o?Y:Y.endOf(h)},f=function(A,C){return b.w(a.toDate()[A].apply(a.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(C)),a)},m=this.$W,v=this.$M,g=this.$D,O="set"+(this.$u?"UTC":"");switch(n){case x:return o?c(1,0):c(31,11);case d:return o?c(1,v):c(0,v+1);case $:var L=this.$locale().weekStart||0,V=(m<L?m+7:m)-L;return c(o?g-V:g+(6-V),v);case h:case k:return f(O+"Hours",0);case p:return f(O+"Minutes",1);case M:return f(O+"Seconds",2);case S:return f(O+"Milliseconds",3);default:return this.clone()}},i.endOf=function(r){return this.startOf(r,!1)},i.$set=function(r,s){var a,o=b.p(r),n="set"+(this.$u?"UTC":""),c=(a={},a[h]=n+"Date",a[k]=n+"Date",a[d]=n+"Month",a[x]=n+"FullYear",a[p]=n+"Hours",a[M]=n+"Minutes",a[S]=n+"Seconds",a[t]=n+"Milliseconds",a)[o],f=o===h?this.$D+(s-this.$W):s;if(o===d||o===x){var m=this.clone().set(k,1);m.$d[c](f),m.init(),this.$d=m.set(k,Math.min(this.$D,m.daysInMonth())).$d}else c&&this.$d[c](f);return this.init(),this},i.set=function(r,s){return this.clone().$set(r,s)},i.get=function(r){return this[b.p(r)]()},i.add=function(r,s){var a,o=this;r=Number(r);var n=b.p(s),c=function(v){var g=q(o);return b.w(g.date(g.date()+Math.round(v*r)),o)};if(n===d)return this.set(d,this.$M+r);if(n===x)return this.set(x,this.$y+r);if(n===h)return c(1);if(n===$)return c(7);var f=(a={},a[M]=w,a[p]=D,a[S]=B,a)[n]||1,m=this.$d.getTime()+r*f;return b.w(m,this)},i.subtract=function(r,s){return this.add(-1*r,s)},i.format=function(r){var s=this,a=this.$locale();if(!this.isValid())return a.invalidDate||E;var o=r||"YYYY-MM-DDTHH:mm:ssZ",n=b.z(this),c=this.$H,f=this.$m,m=this.$M,v=a.weekdays,g=a.months,O=a.meridiem,L=function(C,Y,P,K){return C&&(C[Y]||C(s,o))||P[Y].slice(0,K)},V=function(C){return b.s(c%12||12,C,"0")},A=O||function(C,Y,P){var K=C<12?"AM":"PM";return P?K.toLowerCase():K};return o.replace(R,function(C,Y){return Y||function(P){switch(P){case"YY":return String(s.$y).slice(-2);case"YYYY":return b.s(s.$y,4,"0");case"M":return m+1;case"MM":return b.s(m+1,2,"0");case"MMM":return L(a.monthsShort,m,g,3);case"MMMM":return L(g,m);case"D":return s.$D;case"DD":return b.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return L(a.weekdaysMin,s.$W,v,2);case"ddd":return L(a.weekdaysShort,s.$W,v,3);case"dddd":return v[s.$W];case"H":return String(c);case"HH":return b.s(c,2,"0");case"h":return V(1);case"hh":return V(2);case"a":return A(c,f,!0);case"A":return A(c,f,!1);case"m":return String(f);case"mm":return b.s(f,2,"0");case"s":return String(s.$s);case"ss":return b.s(s.$s,2,"0");case"SSS":return b.s(s.$ms,3,"0");case"Z":return n}return null}(C)||n.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(r,s,a){var o,n=this,c=b.p(s),f=q(r),m=(f.utcOffset()-this.utcOffset())*w,v=this-f,g=function(){return b.m(n,f)};switch(c){case x:o=g()/12;break;case d:o=g();break;case y:o=g()/3;break;case $:o=(v-m)/6048e5;break;case h:o=(v-m)/864e5;break;case p:o=v/D;break;case M:o=v/w;break;case S:o=v/B;break;default:o=v}return a?o:b.a(o)},i.daysInMonth=function(){return this.endOf(d).$D},i.$locale=function(){return W[this.$L]},i.locale=function(r,s){if(!r)return this.$L;var a=this.clone(),o=Q(r,s,!0);return o&&(a.$L=o),a},i.clone=function(){return b.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},u}(),te=ee.prototype;return q.prototype=te,[["$ms",t],["$s",S],["$m",M],["$H",p],["$W",h],["$M",d],["$y",x],["$D",k]].forEach(function(u){te[u[1]]=function(i){return this.$g(i,u[0],u[1])}}),q.extend=function(u,i){return u.$i||(u(i,ee,q),u.$i=!0),q},q.locale=Q,q.isDayjs=H,q.unix=function(u){return q(1e3*u)},q.en=W[I],q.Ls=W,q.p={},q})})(de);var ke=de.exports;const we=be(ke);let X=null;const $e=l=>{const T=U.y(l,{handleReq:B=>{U.v()&&(B.headers.token=U.U())},handleRes:B=>{const{data:w}=B;if(w.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:U.K(),!0}});T.get,X=T.post},Se=l=>X("/middleLayer/kline/getKlineBasic",{...l,userId:U.V("id")}),Me=l=>X("/middleLayer/kline/getKline",l),Ve=async l=>X("/alarm/deliversign/addAlarmPrice",{...l,userId:U.V("id")}),De=async l=>X("/alarm/deliversign/findAlarmPriceByUserId",{...l,userId:U.V("id")}),fe=async l=>X("/alarm/deliversign/updateAlarmPrice",{...l,userId:U.V("id")}),Le=async l=>X("/alarm/deliversign/deleteAlarmPrice",{...l,userId:U.V("id")}),{round:ne}=U.x,Te=(l,T,B,w)=>{const{data:D,time:t}=l,{gridTop:S,gridRight:M,gridLeft:p,maxShowCounts:h,showSubChart:$}=T;return{animation:!1,grid:{top:`${S}px`,right:`${M}px`,bottom:$?"6px":"24px",left:`${p}px`},dataZoom:[{type:"inside",startValue:B,endValue:w,maxValueSpan:h}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:d=>{const{axisDimension:y,value:x}=d;return y==="x"?$?"":x:String(ne(x))}}},formatter:()=>""},xAxis:{show:!$,type:"category",data:t,splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:d=>ne(d.min),max:d=>ne(d.max)},series:[{type:"candlestick",data:D,itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1}},...l.mainIndicator.map(d=>({name:d.key,type:"line",silent:!0,symbol:"none",data:d.data,lineStyle:{width:d.width||1},itemStyle:{color:d.color}}))]}},Be=(l,T,B,w,D)=>{const{variety:t,featureId:S,featureType:M}=B,{gridTop:p,gridLeft:h,gridRight:$}=w;return T.reduce((d,y)=>{const{warnPrice:x}=y,k=l==null?void 0:l.convertToPixel({yAxisIndex:0},x);if(k<=p||k>=(l==null?void 0:l.getHeight()))return d;let E=0;return[...d,{type:"group",name:"warningLine",info:y,draggable:"vertical",children:[{type:"line",info:y,shape:{x1:h,y1:k,x2:(l==null?void 0:l.getWidth())-$,y2:k},style:{stroke:"#FFF",lineWidth:1,lineDash:[8,4]},z:10},{type:"text",info:y,x:(l==null?void 0:l.getWidth())-$,y:k-5,style:{fill:"#FFF",text:x,stroke:"#000",lineWidth:1,opacity:1},z:10}],ondragstart:N=>{E=N.offsetY},ondrag:N=>{var R;if(N.target&&N.target.childAt(1)){const F=l.convertFromPixel({yAxisIndex:0},k+(N.offsetY-E));(R=N.target.childAt(1))==null||R.animate("style",!1).when(1,{text:ne(F,3)}).start()}},ondragend:async N=>{const F=N.offsetY-E;if(F!==0){const j=l==null?void 0:l.convertFromPixel({yAxisIndex:0},F+k),_={id:y.id,warnPrice:ne(j,3),featureId:S,featureCode:t,featureType:M};await fe(_),ie.ElMessage.success("画线预警修改成功"),D&&D()}}}]},[])},Ne={class:"kline-tips"},Fe=e.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(l){return(T,B)=>(e.openBlock(),e.createElementBlock("div",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.data,(w,D)=>(e.openBlock(),e.createElementBlock("div",{key:D,class:"kline-tips-item",style:e.normalizeStyle({color:w.color})},e.toDisplayString(w.label)+" "+e.toDisplayString(w.value),5))),128))]))}});const se=re._export_sfc(Fe,[["__scopeId","data-v-f83b6b36"]]);const Oe={class:"kline-tips"},Ee={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(l){const{round:T,formatValue:B}=U.x,w=l,D=e.computed(()=>{const{data:S,activeIndex:M}=w;if(S.data&&S.data[M]){const p=S.data[M],h=[{label:"开",value:T(p[0])},{label:"高",value:T(p[3])},{label:"低",value:T(p[2])},{label:"收",value:T(p[1])}];p[4]!==null&&h.push({label:"额",value:B(p[4])});let $;return p[6]>0?$="red":p[6]<0&&($="green"),h.push({label:"涨跌",value:`${T(p[6])}%`,color:$}),h}return[]}),t=e.computed(()=>{var p;const{data:S,activeIndex:M}=w;return((p=S==null?void 0:S.mainIndicator)==null?void 0:p.map(h=>({label:h.key,value:T(h.data[M]),color:h.color})))||[]});return(S,M)=>(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(se,{data:D.value},null,8,["data"]),e.createVNode(se,{data:t.value},null,8,["data"])]))}},qe=re._export_sfc(Ee,[["__scopeId","data-v-64b5c2a3"]]);const Ae={class:"klineSub"},Ce={class:"klineSub-tips"},Ie={key:0,class:"klineSub-tips-select"},We={__name:"index",props:{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(l,{expose:T,emit:B}){const{round:w}=U.x;let D,t;const S=B,M=l,p=e.ref(),h=e.computed({get(){return M.modelValue},set(y){S("update:modelValue",y)}}),$=e.computed(()=>{var k;const{data:y,activeIndex:x}=M;return((k=y==null?void 0:y.subIndicator)==null?void 0:k.map(E=>({label:E.key,color:E.color,value:E.data[x]||"-"})))||[]});e.onMounted(()=>{D=le.init(p.value);let y=!0;t=new ResizeObserver(()=>{if(y){y=null;return}D.resize()}),t.observe(p.value)}),e.onUnmounted(()=>{D.dispose(),t.disconnect(),t=null});const d=(y,x)=>{const k=y[x],E=x===0?y[x]:y[x-1];return k[0]===k[1]?k[0]>=E[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:k[1]>k[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return T({connect:y=>{le.connect([y,D])},draw:(y,x)=>{e.nextTick(()=>{const{startValue:k,endValue:E,maxValueSpan:N}=y,{leftYAxisRange:R,rightYAxisRange:F}=M.data.subIndicator[0],j=M.data.subIndicator.map(_=>{if(_.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:_.data.map((I,W)=>_.seriesColor==="kline"?{value:I,itemStyle:d(M.data.data,W)}:_.seriesColor==="value"?{value:I,itemStyle:{color:I>=0?"#FF0000":"#00FFFF"}}:{value:I,itemStyle:{color:_.seriesColor}})};if(_.series==="line")return{xAxisIndex:0,yAxisIndex:_.yAxis==="right"?2:1,name:_.key,type:"line",silent:!0,symbol:"none",data:_.data,lineStyle:{width:1},itemStyle:{color:_.color}}});D.setOption({animation:!1,grid:{left:`${x.gridLeft}px`,top:"10px",right:`${x.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:k,endValue:E,maxValueSpan:N}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:_=>{const{axisDimension:I,value:W}=_;if(I==="x")return W;if(_.axisIndex===1)return String(w(W))}}},formatter:()=>""},xAxis:{type:"category",data:M.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:_=>_}},yAxis:[{position:"right"},{position:"left",min:R==="cover"?_=>_.min:null,max:R==="cover"?_=>_.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:F==="cover"?_=>_.min:null,max:F==="cover"?_=>_.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:j},!0)})}}),(y,x)=>{const k=ce.ElOption,E=ce.ElSelect;return e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("div",Ce,[$.value.length?(e.openBlock(),e.createElementBlock("div",Ie,[e.createVNode(E,{modelValue:h.value,"onUpdate:modelValue":x[0]||(x[0]=N=>h.value=N),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.subIndicatorList,N=>(e.openBlock(),e.createBlock(k,{key:N.value,label:N.label,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(se,{data:$.value},null,8,["data"])]),e.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:p},null,512)])}}},Pe=re._export_sfc(We,[["__scopeId","data-v-c06321cd"]]),Ye=e.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(l,{emit:T}){const B=T,w=e.ref(),D=e.ref(),t=e.ref({display:"none",top:"0px",left:"0px"}),S=()=>{t.value.display="none",B("closeContextMenuCallBack"),document.removeEventListener("click",S)},M=p=>{if(p.preventDefault(),t.value.display==="block"){const{offsetX:h,offsetY:$}=p,{offsetWidth:d,offsetHeight:y}=D.value;if(h<=d&&$<=y)return}w.value.click(),t.value={display:"block",top:`${p.offsetY}px`,left:`${p.offsetX}px`},e.nextTick(()=>{const h=w.value.getBoundingClientRect(),$=D.value.getBoundingClientRect();$.left+$.width>=h.right&&(t.value.left=`${p.offsetX-$.width}px`),$.top+$.height>=h.bottom&&(console.log("高度超出"),t.value.top=`${p.offsetY-$.height}px`)}),document.addEventListener("click",S)};return(p,h)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"contextmenuRef",ref:w,class:"contextmenu",onContextmenu:M,onMouseleave:S},[e.renderSlot(p.$slots,"default",{},void 0,!0),t.value.display!=="none"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:D,class:"contextmenu-popover",style:e.normalizeStyle(t.value)},[e.renderSlot(p.$slots,"popover",{},void 0,!0)],4)):e.createCommentVNode("",!0)],544))}});const Re=re._export_sfc(Ye,[["__scopeId","data-v-811db6b4"]]);const pe=l=>(e.pushScopeId("data-v-2134db21"),l=l(),e.popScopeId(),l),je={class:"klineBasic"},He={class:"klineBasic-tips"},ze={key:0,class:"klineBasic-sub"},Ue={key:1,class:"klineBasic-empty"},Ze={key:2,class:"klineBasic-error"},Ke=pe(()=>e.createElementVNode("div",{class:"klineBasic-error-content"}," 加载失败,请刷新重试 ",-1)),Je={style:{"text-align":"center"}},Xe=pe(()=>e.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),Ge={class:"dialog-footer"},Qe={__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:()=>({})}},emits:["change","getFactorData"],setup(l,{expose:T,emit:B}){const w=[{label:"画线预警",key:"drawWarningLine"}];let D=null,t=null,S,M,p=!1,h=!1;const $=B,d=l,y=e.ref(!1),x=e.ref(!1),k=e.ref(null),E=e.ref(null),N=e.ref("VOL"),R=e.ref(0),F=e.ref({}),j=e.ref([]),_=e.ref({}),I=e.ref(!1),W=e.ref(""),G=e.ref([...w]),H=e.computed(()=>({defaultShowCounts:500,addCounts:2e3,maxShowCounts:5e3,loadCheckCounts:500,showSubChart:!0,gridTop:48,gridLeft:80,gridRight:50,showWarningLine:!0,getFactorData:!0,...d.config}));e.watch(()=>{var o,n;return[d.variety,d.cycle,d.mainIndicator,N.value,(o=d.indicatorStore)==null?void 0:o.filterIndicator,(n=d.indicatorStore)==null?void 0:n.customIndicator]},()=>{b()},{deep:!0}),e.onMounted(()=>{$e(d.env),b()}),e.onUnmounted(()=>{t==null||t.off("datazoom"),t==null||t.off("highlight"),t==null||t.off("globalout"),t==null||t.dispose(),D==null||D.dispose()});const Q=()=>{t||(t=le.init(k.value),q(),H.value.showSubChart&&E.value.connect(t),D=U.D(k.value),D.listen(()=>{requestAnimationFrame(()=>{t.resize()})}))},q=()=>{t==null||t.on("datazoom",n=>{clearTimeout(M),M=setTimeout(()=>{var f,m,v,g;const{loadCheckCounts:c}=H.value;if((m=(f=t==null?void 0:t.getOption())==null?void 0:f.dataZoom)!=null&&m[0]){const{startValue:O}=(g=(v=t==null?void 0:t.getOption())==null?void 0:v.dataZoom)==null?void 0:g[0];O<c&&p===!1&&h===!1&&(p=!0,ee("history")),u()}clearTimeout(M)},100)}),t==null||t.on("highlight",n=>{var f,m;let c=n.dataIndex||-1;n.batch&&(c=typeof((f=n==null?void 0:n.batch[0])==null?void 0:f.dataIndex)=="number"?(m=n==null?void 0:n.batch[0])==null?void 0:m.dataIndex:-1),clearTimeout(S),S=setTimeout(()=>{R.value=c,clearTimeout(S)},20)}),t==null||t.on("globalout",()=>{var c,f,m;const n=(m=(f=(c=t==null?void 0:t.getOption())==null?void 0:c.dataZoom)==null?void 0:f[0])==null?void 0:m.endValue;R.value=n});let o=null;t==null||t.on("contextmenu",n=>{o=setTimeout(()=>{n.componentType==="graphic"&&(_.value=n.info,G.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout(o),o=null})})},b=async()=>{var o,n,c,f,m,v;try{if(!d.variety||!d.cycle)return;const{variety:g,featureId:O,cycle:L,indicatorStore:V,mainIndicator:A,right:C,startTime:Y,endTime:P}=d,{defaultShowCounts:K,addCounts:J,showWarningLine:ae,getFactorData:oe}=H.value,z={variety:g,featureId:O,cycle:L,mainIndicatorList:V.getIndicatorParams(A),subIndicator:N.value,right:C,showWarningLine:ae,getFactorData:oe};Y&&P?(z.startTime=Y,z.endTime=P):Y?(z.startTime=Y,z.limit=K+J):P?(z.endTime=P,z.limit=K+J):(z.endTime=we().add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),z.limit=K+J);const Z=await Se(z);if((c=(n=(o=Z==null?void 0:Z.body)==null?void 0:o.kline)==null?void 0:n.time)!=null&&c.length)y.value=!1,x.value=!1;else{y.value=!0,x.value=!1;return}F.value=(f=Z==null?void 0:Z.body)==null?void 0:f.kline,j.value=((m=Z==null?void 0:Z.body)==null?void 0:m.warningLine)||[],te(),u(),oe&&$("getFactorData",(v=Z==null?void 0:Z.body)==null?void 0:v.factor)}catch(g){throw x.value=!0,y.value=!1,new Error(g)}},ee=async o=>{const{variety:n,cycle:c,indicatorStore:f,mainIndicator:m,right:v}=d,{addCounts:g}=H.value,{time:O}=F.value;if(o==="history"){const L=await Me({variety:n,cycle:c,endTime:O[0],limit:g,mainIndicatorList:f.getIndicatorParams(m),subIndicator:N.value,right:v});F.value={time:[...L.body.time,...F.value.time.slice(1)],data:[...L.body.data,...F.value.data.slice(1)],mainIndicator:F.value.mainIndicator.map((V,A)=>({...V,data:[...L.body.mainIndicator[A].data,...V.data.slice(1)]})),subIndicator:F.value.subIndicator.map((V,A)=>({...V,data:[...L.body.subIndicator[A].data,...V.data.slice(1)]}))},te(!0),L.body.data.length<g&&(h=!0),p=!1}},te=(o=!1)=>{var A,C,Y;Q();const{time:n}=F.value,{gridRight:c,gridLeft:f,defaultShowCounts:m,maxShowCounts:v,showSubChart:g}=H.value;let O=n.length-1-m,L=n.length-1;if(o){const P=t.getOption(),K=(C=(A=P==null?void 0:P.xAxis)==null?void 0:A[0])==null?void 0:C.data,J=(Y=P==null?void 0:P.dataZoom)==null?void 0:Y[0],ae=K[J==null?void 0:J.startValue],oe=K[J==null?void 0:J.endValue];O=n.findIndex(z=>z===ae),L=n.findIndex(z=>z===oe)}const V=Te(F.value,H.value,O,L);t.setOption(V,!0),R.value=L,g&&E.value.draw({startValue:O,endValue:L,maxValueSpan:v},{gridLeft:f,gridRight:c})},u=()=>{if(!t)return;const o=t==null?void 0:t.getOption();o&&(t==null||t.setOption({...o,graphic:[...Be(t,j.value,d,H.value,()=>{i()})]},!0))},i=async()=>{const o=await De({featureId:d.featureId});j.value=(o==null?void 0:o.body)||[],u(),$("change","warningLine",j.value)},r=async o=>{const{variety:n,varietyName:c,featureId:f,featureType:m}=d;if(o.key==="drawWarningLine"){const v=t==null?void 0:t.getOption(),g=v.tooltip[0];t==null||t.setOption({...v,tooltip:{...g,axisPointer:{...g.axisPointer,lineStyle:{width:0},crossStyle:{width:2},label:{...g.axisPointer.label,backgroundColor:"transparent",formatter:L=>""}}}});const O=async L=>{t==null||t.getZr().off("mousedown",O);const V=t==null?void 0:t.convertFromPixel({yAxisIndex:0},L.offsetY),A=Math.round(V*1e3)/1e3;t==null||t.setOption({...v,tooltip:{...g,axisPointer:{...g.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...g.axisPointer.label,backgroundColor:null}}}}),await Ve({featureCode:n,featureName:c,featureId:f,featureType:m,warnPrice:A}),ie.ElMessage.success("画线预警成功!"),i()};t==null||t.getZr().on("mousedown",O)}else o.key==="deleteWarningLine"?(await Le({id:_.value.id}),ie.ElMessage.success("画线预警删除成功"),i()):o.key==="changeWarningLine"&&(I.value=!0,W.value=_.value.warnPrice)},s=async()=>{const{variety:o,varietyName:n,featureId:c,featureType:f}=d;await fe({id:_.value.id,featureCode:o,featureName:n,featureId:c,featureType:f,warnPrice:W.value}),ie.ElMessage.success("画线预警修改成功"),i()},a=()=>{G.value=[...w]};return T({draw:(o,n)=>{o==="warningLine"&&(j.value=n,u())}}),(o,n)=>{var L;const c=ue.ElMenuItem,f=ue.ElMenu,m=ge.ElEmpty,v=ve.ElButton,g=ye.ElInputNumber,O=me.ElDialog;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",je,[e.createElementVNode("div",He,[e.createVNode(qe,{data:F.value,activeIndex:R.value},null,8,["data","activeIndex"])]),e.createElementVNode("div",{class:"klineBasic-main",style:e.normalizeStyle({height:H.value.showSubChart?"70%":"100%"})},[e.createVNode(Re,{onCloseContextMenuCallBack:a},{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(G.value,V=>(e.openBlock(),e.createBlock(c,{style:{height:"36px"},key:V.key,index:V.key,onClick:A=>r(V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"klineBasicMainRef",ref:k,style:{height:"100%"}},null,512)]),_:1})],4),H.value.showSubChart?(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(Pe,{ref_key:"klineSubRef",ref:E,modelValue:N.value,"onUpdate:modelValue":n[0]||(n[0]=V=>N.value=V),data:F.value,activeIndex:R.value,subIndicatorList:(L=l.indicatorStore)==null?void 0:L.subIndicatorList},null,8,["modelValue","data","activeIndex","subIndicatorList"])])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("div",Ue,[e.createVNode(m,{class:"klineBasic-empty-content",description:"暂无数据"})])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("div",Ze,[Ke,e.createElementVNode("div",Je,[e.createVNode(v,{onClick:b},{default:e.withCtx(()=>[e.createTextVNode("刷新")]),_:1})])])):e.createCommentVNode("",!0)]),e.createVNode(O,{modelValue:I.value,"onUpdate:modelValue":n[3]||(n[3]=V=>I.value=V),title:"画线预警-修改价格",width:"30%","align-center":""},{footer:e.withCtx(()=>[e.createElementVNode("span",Ge,[e.createVNode(v,{onClick:n[2]||(n[2]=V=>I.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(v,{type:"primary",onClick:s},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})])]),default:e.withCtx(()=>[Xe,e.createVNode(g,{modelValue:W.value,"onUpdate:modelValue":n[1]||(n[1]=V=>W.value=V),placeholder:"输入预警价格"},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},et=re._export_sfc(Qe,[["__scopeId","data-v-2134db21"]]),tt={install(l){l.component("st-klineBasic",et)}};module.exports=tt;
|
package/es/KlineBasic.js
CHANGED
|
@@ -836,7 +836,7 @@ const ct = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ft = {
|
|
|
836
836
|
}
|
|
837
837
|
});
|
|
838
838
|
const vt = /* @__PURE__ */ ce(yt, [["__scopeId", "data-v-811db6b4"]]);
|
|
839
|
-
const Fe = (a) => (Pe("data-v-
|
|
839
|
+
const Fe = (a) => (Pe("data-v-2134db21"), a = a(), Ye(), a), gt = { class: "klineBasic" }, ht = { class: "klineBasic-tips" }, _t = {
|
|
840
840
|
key: 0,
|
|
841
841
|
class: "klineBasic-sub"
|
|
842
842
|
}, xt = {
|
|
@@ -1016,7 +1016,7 @@ const Fe = (a) => (Pe("data-v-70c4625e"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
1016
1016
|
showWarningLine: ye,
|
|
1017
1017
|
getFactorData: de
|
|
1018
1018
|
};
|
|
1019
|
-
R && N ? (K.startTime = R, K.endTime = N) : R ? (K.startTime = R, K.limit = X + G) : N ? (K.endTime = N, K.limit = X + G) : (K.endTime = Je().format("YYYY-MM-DD HH:mm:ss"), K.limit = X + G);
|
|
1019
|
+
R && N ? (K.startTime = R, K.endTime = N) : R ? (K.startTime = R, K.limit = X + G) : N ? (K.endTime = N, K.limit = X + G) : (K.endTime = Je().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), K.limit = X + G);
|
|
1020
1020
|
const J = await Ge(K);
|
|
1021
1021
|
if ((u = (t = (o = J == null ? void 0 : J.body) == null ? void 0 : o.kline) == null ? void 0 : t.time) != null && u.length)
|
|
1022
1022
|
m.value = !1, h.value = !1;
|
|
@@ -1295,7 +1295,7 @@ const Fe = (a) => (Pe("data-v-70c4625e"), a = a(), Ye(), a), gt = { class: "klin
|
|
|
1295
1295
|
], 64);
|
|
1296
1296
|
};
|
|
1297
1297
|
}
|
|
1298
|
-
}, Lt = /* @__PURE__ */ ce(Mt, [["__scopeId", "data-v-
|
|
1298
|
+
}, Lt = /* @__PURE__ */ ce(Mt, [["__scopeId", "data-v-2134db21"]]), on = {
|
|
1299
1299
|
install(a) {
|
|
1300
1300
|
a.component("st-klineBasic", Lt);
|
|
1301
1301
|
}
|