st-comp 0.0.146 → 0.0.147
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/components.d.ts +0 -3
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +2 -2
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +22 -26
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +103 -112
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +1426 -671
- package/es/KlineNew.cjs +3 -1
- package/es/KlineNew.js +2736 -314
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +96 -102
- package/es/Table.cjs +1 -1
- package/es/Table.js +60 -66
- package/es/User.cjs +1 -1
- package/es/User.js +96 -103
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +32 -41
- package/es/VirtualTable.cjs +1 -13
- package/es/VirtualTable.js +1 -2801
- package/es/_initCloneObject-7493ecd5.cjs +1 -0
- package/es/{_initCloneObject-14b53c6f.js → _initCloneObject-a8dcd058.js} +26 -26
- package/es/{base-ec05f348.cjs → base-00ce90ec.cjs} +3 -3
- package/es/{base-437d17f3.js → base-674a354a.js} +63 -64
- package/es/config-provider-419ffbf2.js +120 -0
- package/es/config-provider-68414290.cjs +3 -0
- package/es/dropdown-127a8c0d.cjs +1 -0
- package/es/{dropdown-634b5e27.js → dropdown-ce30ada6.js} +30 -31
- package/es/el-button-7b9f5933.js +745 -0
- package/es/el-button-c00975e1.cjs +1 -0
- package/es/{el-checkbox-group-e8fece80.js → el-checkbox-group-0554b352.js} +10 -10
- package/es/el-checkbox-group-7a313d34.cjs +1 -0
- package/es/{el-empty-bacc6613.js → el-empty-39b3aed7.js} +5 -5
- package/es/{el-empty-19ea04f4.cjs → el-empty-87154b6d.cjs} +1 -1
- package/es/el-form-item-7867f64d.cjs +12 -0
- package/es/{el-form-item-af1855f0.js → el-form-item-fc6f80ab.js} +78 -79
- package/es/el-input-2ff1628c.cjs +1 -0
- package/es/{el-input-4961b99f.js → el-input-d249ac86.js} +82 -84
- package/es/{el-input-number-610fc8ba.js → el-input-number-2066fbb7.js} +35 -36
- package/es/el-input-number-d6801a5c.cjs +1 -0
- package/es/{el-message-c3b3ac96.js → el-message-9859835d.js} +79 -81
- package/es/el-message-ffcf690c.cjs +1 -0
- package/es/el-overlay-91784be2.cjs +1 -0
- package/es/el-overlay-f0757cc4.js +525 -0
- package/es/el-popover-4db657e2.cjs +1 -0
- package/es/{el-popover-0aa071f2.js → el-popover-b7b43c1f.js} +18 -18
- package/es/el-scrollbar-35bac6b3.js +2452 -0
- package/es/el-scrollbar-ec09bbd3.cjs +1 -0
- package/es/el-select-0785c35a.cjs +1 -0
- package/es/{el-select-9381b156.js → el-select-bcbb7e55.js} +329 -333
- package/es/el-table-column-2478adf8.cjs +14 -0
- package/es/{el-table-column-55bffba5.js → el-table-column-c1e1a206.js} +346 -350
- package/es/el-tag-13ee17b3.cjs +1 -0
- package/es/el-tag-73372c6c.js +359 -0
- package/es/index-07b61d12.cjs +1 -0
- package/es/{index-39ec9741.js → index-45de4a12.js} +7 -7
- package/es/index-65b719a4.cjs +1 -0
- package/es/index-8b5fbc11.js +66 -0
- package/es/index-8c85d7c5.js +858 -0
- package/es/index-a49f4743.cjs +2 -0
- package/es/{scroll-387fcfdb.js → scroll-cb696ed2.js} +1 -1
- package/es/{scroll-41224831.cjs → scroll-cca17da0.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/{zh-cn-ab9a583d.cjs → zh-cn-37af467d.cjs} +1 -1
- package/es/{zh-cn-eb9c2820.js → zh-cn-ef7d7220.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +206 -206
- package/lib/{index-9b8ff62a.js → index-24f8572c.js} +31450 -33319
- package/lib/{python-a9c3d9e5.js → python-2143eee4.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/components/KlineSub/index.vue +17 -3
- package/packages/KlineBasic/index.vue +2 -1
- package/packages/KlineBasic/utils.js +20 -2
- package/packages/index.ts +0 -2
- package/src/pages/KlineBasic/api.js +1 -1
- package/src/router/routes.ts +0 -5
- package/es/Kline.cjs +0 -1
- package/es/Kline.js +0 -1901
- package/es/_initCloneObject-441db749.cjs +0 -1
- package/es/castArray-4251bbe4.js +0 -10
- package/es/castArray-a45823fe.cjs +0 -1
- package/es/config-provider-55482a43.js +0 -47
- package/es/config-provider-7cdfca4d.cjs +0 -1
- package/es/debounce-ac30be50.js +0 -83
- package/es/debounce-b2ff12bd.cjs +0 -1
- package/es/dropdown-d7c59a21.cjs +0 -1
- package/es/el-button-196807af.cjs +0 -1
- package/es/el-button-e1665717.js +0 -235
- package/es/el-checkbox-group-492b95cc.cjs +0 -1
- package/es/el-form-item-5bdffd07.cjs +0 -12
- package/es/el-input-23e2bac3.cjs +0 -1
- package/es/el-input-number-40a81eb5.cjs +0 -1
- package/es/el-menu-item-78b858f2.cjs +0 -1
- package/es/el-menu-item-7d04c11a.js +0 -771
- package/es/el-message-d4df8136.cjs +0 -1
- package/es/el-overlay-12dd9b35.js +0 -519
- package/es/el-overlay-bc0790a2.cjs +0 -1
- package/es/el-popover-8a77e015.cjs +0 -1
- package/es/el-popper-50100766.js +0 -2262
- package/es/el-popper-746070ba.cjs +0 -1
- package/es/el-scrollbar-562d0595.js +0 -201
- package/es/el-scrollbar-d1c3e7f7.cjs +0 -1
- package/es/el-select-b162dffc.cjs +0 -1
- package/es/el-table-column-6d761fce.cjs +0 -14
- package/es/el-tag-985d9aff.js +0 -279
- package/es/el-tag-c51a6490.cjs +0 -1
- package/es/index-09e01b1d.js +0 -81
- package/es/index-0cb48e01.js +0 -306
- package/es/index-3bf8d597.cjs +0 -1
- package/es/index-657047bb.js +0 -513
- package/es/index-8a0b1c53.cjs +0 -3
- package/es/index-a387515d.cjs +0 -1
- package/es/index-a902a0d9.js +0 -59
- package/es/index-deb8de52.cjs +0 -1
- package/es/index-eea0bcb3.cjs +0 -1
- package/es/index.esm-8d9a2abe.js +0 -2432
- package/es/index.esm-94a95a2a.cjs +0 -3
- package/es/raf-8fc301fd.cjs +0 -1
- package/es/raf-b128c7b7.js +0 -6
- package/es/typescript-7ae59c4c.js +0 -4
- package/es/typescript-b63f8e83.cjs +0 -1
- package/es/use-form-common-props-1b84d8f4.cjs +0 -2
- package/es/use-form-common-props-f377e500.js +0 -587
- package/es/vnode-7dfd4ed5.js +0 -14
- package/es/vnode-7fbc61e1.cjs +0 -1
- package/packages/Kline/components/Contextmenu/index.vue +0 -110
- package/packages/Kline/components/Tips/index.vue +0 -40
- package/packages/Kline/componentsNew/KlineSlide/index.vue +0 -155
- package/packages/Kline/componentsNew/KlineSub/index.vue +0 -297
- package/packages/Kline/componentsNew/KlineTips/index.vue +0 -66
- package/packages/Kline/componentsNew/KlineUtils/index.vue +0 -84
- package/packages/Kline/componentsNew/Tips/index.vue +0 -33
- package/packages/Kline/formatKlineData.ts +0 -109
- package/packages/Kline/images/buy.svg +0 -1
- package/packages/Kline/images/pen.png +0 -0
- package/packages/Kline/images/sell.svg +0 -1
- package/packages/Kline/images/t.svg +0 -1
- package/packages/Kline/index.ts +0 -16
- package/packages/Kline/index.vue +0 -891
- package/packages/Kline/option.ts +0 -539
- package/packages/Kline/type.d.ts +0 -219
- package/packages/Kline/utils.ts +0 -682
- package/src/pages/Kline/api.ts +0 -127
- package/src/pages/Kline/components/MultiCycleSingleVariety.vue +0 -701
- package/src/pages/Kline/components/SingleCycleSingleVariety.vue +0 -924
- package/src/pages/Kline/index.vue +0 -90
package/es/KlineBasic.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./base-ec05f348.cjs");const ye=require("./el-overlay-bc0790a2.cjs");require("./el-input-23e2bac3.cjs");const he=require("./el-input-number-40a81eb5.cjs"),ve=require("./el-button-196807af.cjs"),be=require("./el-empty-19ea04f4.cjs"),de=require("./el-menu-item-78b858f2.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-popper-746070ba.cjs");const e=require("vue"),xe=require("echarts"),J=require("./index-a96158ae.cjs"),se=require("./el-message-d4df8136.cjs"),ae=require("./_plugin-vue_export-helper-f246444f.cjs");require("./el-tag-c51a6490.cjs");const fe=require("./el-select-b162dffc.cjs");require("./el-scrollbar-d1c3e7f7.cjs");require("./vnode-7fbc61e1.cjs");require("./index-3bf8d597.cjs");require("./use-form-common-props-1b84d8f4.cjs");require("./scroll-41224831.cjs");require("./index-8a0b1c53.cjs");require("./typescript-b63f8e83.cjs");require("./index-deb8de52.cjs");require("./index-eea0bcb3.cjs");require("./config-provider-7cdfca4d.cjs");require("./index-a387515d.cjs");require("./castArray-a45823fe.cjs");require("./debounce-b2ff12bd.cjs");function _e(s){const N=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const E in s)if(E!=="default"){const M=Object.getOwnPropertyDescriptor(s,E);Object.defineProperty(N,E,M.get?M:{enumerable:!0,get:()=>s[E]})}}return N.default=s,Object.freeze(N)}const ue=_e(xe);var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function we(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var pe={exports:{}};(function(s,N){(function(E,M){s.exports=M()})(Ye,function(){var E=1e3,M=6e4,L=36e5,t="millisecond",S="second",$="minute",y="hour",v="day",k="week",l="month",h="quarter",b="year",Y="date",I="Invalid Date",F=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,j=/\[([^\]]+)]|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,q={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(c){var i=["th","st","nd","rd"],o=c%100;return"["+c+(i[(o-20)%10]||i[o]||i[0])+"]"}},H=function(c,i,o){var u=String(c);return!u||u.length>=i?c:""+Array(i+1-u.length).join(o)+c},x={s:H,z:function(c){var i=-c.utcOffset(),o=Math.abs(i),u=Math.floor(o/60),a=o%60;return(i<=0?"+":"-")+H(u,2,"0")+":"+H(a,2,"0")},m:function c(i,o){if(i.date()<o.date())return-c(o,i);var u=12*(o.year()-i.year())+(o.month()-i.month()),a=i.clone().add(u,l),m=o-a<0,r=i.clone().add(u+(m?-1:1),l);return+(-(u+(o-a)/(m?a-r:r-a))||0)},a:function(c){return c<0?Math.ceil(c)||0:Math.floor(c)},p:function(c){return{M:l,y:b,w:k,d:v,D:Y,h:y,m:$,s:S,ms:t,Q:h}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(c){return c===void 0}},W="en",P={};P[W]=q;var ee="$isDayjsObject",z=function(c){return c instanceof ne||!(!c||!c[ee])},te=function c(i,o,u){var a;if(!i)return W;if(typeof i=="string"){var m=i.toLowerCase();P[m]&&(a=m),o&&(P[m]=o,a=m);var r=i.split("-");if(!a&&r.length>1)return c(r[0])}else{var n=i.name;P[n]=i,a=n}return!u&&a&&(W=a),a||!u&&W},C=function(c,i){if(z(c))return c.clone();var o=typeof i=="object"?i:{};return o.date=c,o.args=arguments,new ne(o)},_=x;_.l=te,_.i=z,_.w=function(c,i){return C(c,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var ne=function(){function c(o){this.$L=te(o.locale,null,!0),this.parse(o),this.$x=this.$x||o.x||{},this[ee]=!0}var i=c.prototype;return i.parse=function(o){this.$d=function(u){var a=u.date,m=u.utc;if(a===null)return new Date(NaN);if(_.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var r=a.match(F);if(r){var n=r[2]-1||0,d=(r[7]||"0").substring(0,3);return m?new Date(Date.UTC(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,d)):new Date(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,d)}}return new Date(a)}(o),this.init()},i.init=function(){var o=this.$d;this.$y=o.getFullYear(),this.$M=o.getMonth(),this.$D=o.getDate(),this.$W=o.getDay(),this.$H=o.getHours(),this.$m=o.getMinutes(),this.$s=o.getSeconds(),this.$ms=o.getMilliseconds()},i.$utils=function(){return _},i.isValid=function(){return this.$d.toString()!==I},i.isSame=function(o,u){var a=C(o);return this.startOf(u)<=a&&a<=this.endOf(u)},i.isAfter=function(o,u){return C(o)<this.startOf(u)},i.isBefore=function(o,u){return this.endOf(u)<C(o)},i.$g=function(o,u,a){return _.u(o)?this[u]:this.set(a,o)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(o,u){var a=this,m=!!_.u(u)||u,r=_.p(o),n=function(D,O){var U=_.w(a.$u?Date.UTC(a.$y,O,D):new Date(a.$y,O,D),a);return m?U:U.endOf(v)},d=function(D,O){return _.w(a.toDate()[D].apply(a.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(O)),a)},f=this.$W,g=this.$M,p=this.$D,w="set"+(this.$u?"UTC":"");switch(r){case b:return m?n(1,0):n(31,11);case l:return m?n(1,g):n(0,g+1);case k:var B=this.$locale().weekStart||0,A=(f<B?f+7:f)-B;return n(m?p-A:p+(6-A),g);case v:case Y:return d(w+"Hours",0);case y:return d(w+"Minutes",1);case $:return d(w+"Seconds",2);case S:return d(w+"Milliseconds",3);default:return this.clone()}},i.endOf=function(o){return this.startOf(o,!1)},i.$set=function(o,u){var a,m=_.p(o),r="set"+(this.$u?"UTC":""),n=(a={},a[v]=r+"Date",a[Y]=r+"Date",a[l]=r+"Month",a[b]=r+"FullYear",a[y]=r+"Hours",a[$]=r+"Minutes",a[S]=r+"Seconds",a[t]=r+"Milliseconds",a)[m],d=m===v?this.$D+(u-this.$W):u;if(m===l||m===b){var f=this.clone().set(Y,1);f.$d[n](d),f.init(),this.$d=f.set(Y,Math.min(this.$D,f.daysInMonth())).$d}else n&&this.$d[n](d);return this.init(),this},i.set=function(o,u){return this.clone().$set(o,u)},i.get=function(o){return this[_.p(o)]()},i.add=function(o,u){var a,m=this;o=Number(o);var r=_.p(u),n=function(g){var p=C(m);return _.w(p.date(p.date()+Math.round(g*o)),m)};if(r===l)return this.set(l,this.$M+o);if(r===b)return this.set(b,this.$y+o);if(r===v)return n(1);if(r===k)return n(7);var d=(a={},a[$]=M,a[y]=L,a[S]=E,a)[r]||1,f=this.$d.getTime()+o*d;return _.w(f,this)},i.subtract=function(o,u){return this.add(-1*o,u)},i.format=function(o){var u=this,a=this.$locale();if(!this.isValid())return a.invalidDate||I;var m=o||"YYYY-MM-DDTHH:mm:ssZ",r=_.z(this),n=this.$H,d=this.$m,f=this.$M,g=a.weekdays,p=a.months,w=a.meridiem,B=function(O,U,Z,R){return O&&(O[U]||O(u,m))||Z[U].slice(0,R)},A=function(O){return _.s(n%12||12,O,"0")},D=w||function(O,U,Z){var R=O<12?"AM":"PM";return Z?R.toLowerCase():R};return m.replace(j,function(O,U){return U||function(Z){switch(Z){case"YY":return String(u.$y).slice(-2);case"YYYY":return _.s(u.$y,4,"0");case"M":return f+1;case"MM":return _.s(f+1,2,"0");case"MMM":return B(a.monthsShort,f,p,3);case"MMMM":return B(p,f);case"D":return u.$D;case"DD":return _.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return B(a.weekdaysMin,u.$W,g,2);case"ddd":return B(a.weekdaysShort,u.$W,g,3);case"dddd":return g[u.$W];case"H":return String(n);case"HH":return _.s(n,2,"0");case"h":return A(1);case"hh":return A(2);case"a":return D(n,d,!0);case"A":return D(n,d,!1);case"m":return String(d);case"mm":return _.s(d,2,"0");case"s":return String(u.$s);case"ss":return _.s(u.$s,2,"0");case"SSS":return _.s(u.$ms,3,"0");case"Z":return r}return null}(O)||r.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(o,u,a){var m,r=this,n=_.p(u),d=C(o),f=(d.utcOffset()-this.utcOffset())*M,g=this-d,p=function(){return _.m(r,d)};switch(n){case b:m=p()/12;break;case l:m=p();break;case h:m=p()/3;break;case k:m=(g-f)/6048e5;break;case v:m=(g-f)/864e5;break;case y:m=g/L;break;case $:m=g/M;break;case S:m=g/E;break;default:m=g}return a?m:_.a(m)},i.daysInMonth=function(){return this.endOf(l).$D},i.$locale=function(){return P[this.$L]},i.locale=function(o,u){if(!o)return this.$L;var a=this.clone(),m=te(o,u,!0);return m&&(a.$L=m),a},i.clone=function(){return _.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()},c}(),re=ne.prototype;return C.prototype=re,[["$ms",t],["$s",S],["$m",$],["$H",y],["$W",v],["$M",l],["$y",b],["$D",Y]].forEach(function(c){re[c[1]]=function(i){return this.$g(i,c[0],c[1])}}),C.extend=function(c,i){return c.$i||(c(i,ne,C),c.$i=!0),C},C.locale=te,C.isDayjs=z,C.unix=function(c){return C(1e3*c)},C.en=P[W],C.Ls=P,C.p={},C})})(pe);var De=pe.exports;const T=we(De);let Q=null;const Me=s=>{const N=J.y(s,{handleReq:E=>{J.v()&&(E.headers.token=J.U())},handleRes:E=>{const{data:M}=E;if(M.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:J.K(),!0}});N.get,Q=N.post},ke=s=>Q("/middleLayer/kline/getKlineBasic",{...s,userId:J.V("id")}),Se=s=>Q("/middleLayer/kline/getKline",s),$e=async s=>Q("/alarm/deliversign/addAlarmPrice",{...s,userId:J.V("id")}),Te=async s=>Q("/alarm/deliversign/findAlarmPriceByUserId",{...s,userId:J.V("id")}),me=async s=>Q("/alarm/deliversign/updateAlarmPrice",{...s,userId:J.V("id")}),Ve=async s=>Q("/alarm/deliversign/deleteAlarmPrice",{...s,userId:J.V("id")}),{round:oe}=J.x,Le=(s,N,E,M)=>{const{data:L,time:t}=s,{gridTop:S,gridRight:$,gridLeft:y,maxShowCounts:v,showSubChart:k}=N;return{animation:!1,grid:{top:`${S}px`,right:`${$}px`,bottom:k?"6px":"24px",left:`${y}px`},dataZoom:[{type:"inside",startValue:E,endValue:M,maxValueSpan:v}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:l=>{const{axisDimension:h,value:b}=l;return h==="x"?k?"":b:String(oe(b))}}},formatter:()=>""},xAxis:{show:!k,type:"category",data:t,splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:l=>oe(l.min),max:l=>oe(l.max)},series:[{type:"candlestick",data:L,itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1}},...s.mainIndicator.map(l=>({name:l.key,type:"line",silent:!0,symbol:"none",data:l.data,lineStyle:{width:l.width||1},itemStyle:{color:l.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)"}}}},Be=(s,N,E,M,L)=>{const{variety:t,featureId:S,featureType:$}=E,{gridTop:y,gridLeft:v,gridRight:k}=M;return N.reduce((l,h)=>{const{warnPrice:b}=h,Y=s==null?void 0:s.convertToPixel({yAxisIndex:0},b);if(Y<=y||Y>=(s==null?void 0:s.getHeight()))return l;let I=0;return[...l,{type:"group",name:"warningLine",info:h,draggable:"vertical",children:[{type:"line",info:h,shape:{x1:v,y1:Y,x2:(s==null?void 0:s.getWidth())-k,y2:Y},style:{stroke:"#FFF",lineWidth:1,lineDash:[8,4]},z:10},{type:"text",info:h,x:(s==null?void 0:s.getWidth())-k,y:Y-5,style:{fill:"#FFF",text:b,stroke:"#000",lineWidth:1,opacity:1},z:10}],ondragstart:F=>{I=F.offsetY},ondrag:F=>{var j;if(F.target&&F.target.childAt(1)){const q=s.convertFromPixel({yAxisIndex:0},Y+(F.offsetY-I));(j=F.target.childAt(1))==null||j.animate("style",!1).when(1,{text:oe(q,3)}).start()}},ondragend:async F=>{const q=F.offsetY-I;if(q!==0){const H=s==null?void 0:s.convertFromPixel({yAxisIndex:0},q+Y),x={id:h.id,warnPrice:oe(H,3),featureId:S,featureCode:t,featureType:$};await me(x),se.ElMessage.success("画线预警修改成功"),L&&L()}}}]},[])},Oe={class:"kline-tips"},Ne=e.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(s){return(N,E)=>(e.openBlock(),e.createElementBlock("div",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.data,(M,L)=>(e.openBlock(),e.createElementBlock("div",{key:L,class:"kline-tips-item",style:e.normalizeStyle({color:M.color})},e.toDisplayString(M.label)+" "+e.toDisplayString(M.value),5))),128))]))}});const ce=ae._export_sfc(Ne,[["__scopeId","data-v-f83b6b36"]]);const Ee={class:"kline-tips"},Fe={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(s){const{round:N,formatValue:E}=J.x,M=s,L=e.computed(()=>{const{data:S,activeIndex:$}=M;if(S.data&&S.data[$]){const y=S.data[$],v=[{label:"开",value:N(y[0])},{label:"高",value:N(y[3])},{label:"低",value:N(y[2])},{label:"收",value:N(y[1])}];y[4]!==null&&v.push({label:"额",value:E(y[4])});let k;return y[6]>0?k="red":y[6]<0&&(k="green"),v.push({label:"涨跌",value:`${N(y[6])}%`,color:k}),v}return[]}),t=e.computed(()=>{var y;const{data:S,activeIndex:$}=M;return((y=S==null?void 0:S.mainIndicator)==null?void 0:y.map(v=>({label:v.key,value:N(v.data[$]),color:v.color})))||[]});return(S,$)=>(e.openBlock(),e.createElementBlock("div",Ee,[e.createVNode(ce,{data:L.value},null,8,["data"]),e.createVNode(ce,{data:t.value},null,8,["data"])]))}},Ae=ae._export_sfc(Fe,[["__scopeId","data-v-64b5c2a3"]]);const Re={class:"klineSub"},qe={class:"klineSub-tips"},Ie={key:0,class:"klineSub-tips-select"},Ce={__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(s,{expose:N,emit:E}){const{round:M}=J.x;let L,t;const S=E,$=s,y=e.ref(),v=e.computed({get(){return $.modelValue},set(h){S("update:modelValue",h)}}),k=e.computed(()=>{var Y;const{data:h,activeIndex:b}=$;return((Y=h==null?void 0:h.subIndicator)==null?void 0:Y.map(I=>({label:I.key,color:I.color,value:I.data[b]||"-"})))||[]});e.onMounted(()=>{L=ue.init(y.value);let h=!0;t=new ResizeObserver(()=>{if(h){h=null;return}L.resize()}),t.observe(y.value)}),e.onUnmounted(()=>{L.dispose(),t.disconnect(),t=null});const l=(h,b)=>{const Y=h[b],I=b===0?h[b]:h[b-1];return Y[0]===Y[1]?Y[0]>=I[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:Y[1]>Y[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return N({connect:h=>{ue.connect([h,L])},draw:(h,b)=>{e.nextTick(()=>{const{startValue:Y,endValue:I,maxValueSpan:F}=h,{leftYAxisRange:j,rightYAxisRange:q}=$.data.subIndicator[0],H=$.data.subIndicator.map(x=>{if(x.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:x.data.map((W,P)=>x.seriesColor==="kline"?{value:W,itemStyle:l($.data.data,P)}:x.seriesColor==="value"?{value:W,itemStyle:{color:W>=0?"#FF0000":"#00FFFF"}}:{value:W,itemStyle:{color:x.seriesColor}})};if(x.series==="line")return{xAxisIndex:0,yAxisIndex:x.yAxis==="right"?2:1,name:x.key,type:"line",silent:!0,symbol:"none",data:x.data,lineStyle:{width:1},itemStyle:{color:x.color}}});L.setOption({animation:!1,grid:{left:`${b.gridLeft}px`,top:"10px",right:`${b.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:Y,endValue:I,maxValueSpan:F}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:x=>{const{axisDimension:W,value:P}=x;if(W==="x")return P;if(x.axisIndex===1)return String(M(P))}}},formatter:()=>""},xAxis:{type:"category",data:$.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:x=>x}},yAxis:[{position:"right"},{position:"left",min:j==="cover"?x=>x.min:null,max:j==="cover"?x=>x.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:q==="cover"?x=>x.min:null,max:q==="cover"?x=>x.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:H},!0)})}}),(h,b)=>{const Y=fe.ElOption,I=fe.ElSelect;return e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("div",qe,[k.value.length?(e.openBlock(),e.createElementBlock("div",Ie,[e.createVNode(I,{modelValue:v.value,"onUpdate:modelValue":b[0]||(b[0]=F=>v.value=F),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.subIndicatorList,F=>(e.openBlock(),e.createBlock(Y,{key:F.value,label:F.label,value:F.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(ce,{data:k.value},null,8,["data"])]),e.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:y},null,512)])}}},We=ae._export_sfc(Ce,[["__scopeId","data-v-c06321cd"]]),Pe=e.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(s,{emit:N}){const E=N,M=e.ref(),L=e.ref(),t=e.ref({display:"none",top:"0px",left:"0px"}),S=()=>{t.value.display="none",E("closeContextMenuCallBack"),document.removeEventListener("click",S)},$=y=>{if(y.preventDefault(),t.value.display==="block"){const{offsetX:v,offsetY:k}=y,{offsetWidth:l,offsetHeight:h}=L.value;if(v<=l&&k<=h)return}M.value.click(),t.value={display:"block",top:`${y.offsetY}px`,left:`${y.offsetX}px`},e.nextTick(()=>{const v=M.value.getBoundingClientRect(),k=L.value.getBoundingClientRect();k.left+k.width>=v.right&&(t.value.left=`${y.offsetX-k.width}px`),k.top+k.height>=v.bottom&&(console.log("高度超出"),t.value.top=`${y.offsetY-k.height}px`)}),document.addEventListener("click",S)};return(y,v)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"contextmenuRef",ref:M,class:"contextmenu",onContextmenu:$,onMouseleave:S},[e.renderSlot(y.$slots,"default",{},void 0,!0),t.value.display!=="none"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:L,class:"contextmenu-popover",style:e.normalizeStyle(t.value)},[e.renderSlot(y.$slots,"popover",{},void 0,!0)],4)):e.createCommentVNode("",!0)],544))}});const je=ae._export_sfc(Pe,[["__scopeId","data-v-811db6b4"]]);const ge=s=>(e.pushScopeId("data-v-c3c33299"),s=s(),e.popScopeId(),s),He={class:"klineBasic"},ze={class:"klineBasic-tips"},Ue={key:0,class:"klineBasic-sub"},Ze={key:1,class:"klineBasic-empty"},Ke={key:2,class:"klineBasic-error"},Xe=ge(()=>e.createElementVNode("div",{class:"klineBasic-error-content"},"加载失败,请刷新重试",-1)),Je={style:{"text-align":"center"}},Ge=ge(()=>e.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),Qe={class:"dialog-footer"},et={__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(s,{expose:N,emit:E}){const M=[{label:"画线预警",key:"drawWarningLine"}];let L=null,t=null,S,$,y=!1,v=!1;const k=E,l=s,h=e.ref(!1),b=e.ref(!1),Y=e.ref(null),I=e.ref(null),F=e.ref("VOL"),j=e.ref(0),q=e.ref({}),H=e.ref([]),x=e.ref({}),W=e.ref(!1),P=e.ref(""),ee=e.ref([...M]),z=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 r,n;return[l.variety,l.cycle,l.mainIndicator,F.value,(r=l.indicatorStore)==null?void 0:r.filterIndicator,(n=l.indicatorStore)==null?void 0:n.customIndicator]},()=>{_()},{deep:!0}),e.onMounted(()=>{Me(l.env),_()}),e.onUnmounted(()=>{t==null||t.off("datazoom"),t==null||t.off("highlight"),t==null||t.off("globalout"),t==null||t.dispose(),L==null||L.dispose()});const te=()=>{t||(t=ue.init(Y.value),C(),z.value.showSubChart&&I.value.connect(t),L=J.D(Y.value),L.listen(()=>{requestAnimationFrame(()=>{t.resize()})}))},C=()=>{t==null||t.on("datazoom",n=>{clearTimeout($),$=setTimeout(()=>{var f,g,p,w;const{loadCheckCounts:d}=z.value;if((g=(f=t==null?void 0:t.getOption())==null?void 0:f.dataZoom)!=null&&g[0]){const{startValue:B}=(w=(p=t==null?void 0:t.getOption())==null?void 0:p.dataZoom)==null?void 0:w[0];B<d&&y===!1&&v===!1&&(y=!0,ne("history")),c()}clearTimeout($)},100)}),t==null||t.on("highlight",n=>{var f,g;let d=n.dataIndex||-1;n.batch&&(d=typeof((f=n==null?void 0:n.batch[0])==null?void 0:f.dataIndex)=="number"?(g=n==null?void 0:n.batch[0])==null?void 0:g.dataIndex:-1),clearTimeout(S),S=setTimeout(()=>{j.value=d,clearTimeout(S)},20)}),t==null||t.on("globalout",()=>{var d,f,g;const n=(g=(f=(d=t==null?void 0:t.getOption())==null?void 0:d.dataZoom)==null?void 0:f[0])==null?void 0:g.endValue;j.value=n});let r=null;t==null||t.on("contextmenu",n=>{r=setTimeout(()=>{n.componentType==="graphic"&&(x.value=n.info,ee.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout(r),r=null})})},_=async()=>{var r,n,d,f,g,p;try{if(!l.variety||!l.cycle)return;const{variety:w,featureId:B,cycle:A,indicatorStore:D,mainIndicator:O,right:U,startTime:Z,endTime:R}=l,{defaultShowCounts:K,addCounts:V,showWarningLine:le,getFactorData:ie}=z.value,X={variety:w,featureId:B,cycle:A,mainIndicatorList:D.getIndicatorParams(O),subIndicator:F.value,right:U,showWarningLine:le,getFactorData:ie};Z&&R?(X.startTime=Z,X.endTime=R):Z?(X.startTime=Z,X.limit=K+V):R?(X.endTime=R,X.limit=K+V):(X.endTime=T().add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),X.limit=K+V);const G=await ke(X);if((d=(n=(r=G==null?void 0:G.body)==null?void 0:r.kline)==null?void 0:n.time)!=null&&d.length)h.value=!1,b.value=!1;else{h.value=!0,b.value=!1;return}q.value=(f=G==null?void 0:G.body)==null?void 0:f.kline,H.value=((g=G==null?void 0:G.body)==null?void 0:g.warningLine)||[],re(),c(),ie&&k("getFactorData",(p=G==null?void 0:G.body)==null?void 0:p.factor)}catch(w){throw b.value=!0,h.value=!1,new Error(w)}},ne=async r=>{const{variety:n,cycle:d,indicatorStore:f,mainIndicator:g,right:p}=l,{addCounts:w}=z.value,{time:B}=q.value;if(r==="history"){const A=await Se({variety:n,cycle:d,endTime:B[0],limit:w,mainIndicatorList:f.getIndicatorParams(g),subIndicator:F.value,right:p});q.value={time:[...A.body.time,...q.value.time.slice(1)],data:[...A.body.data,...q.value.data.slice(1)],mainIndicator:q.value.mainIndicator.map((D,O)=>({...D,data:[...A.body.mainIndicator[O].data,...D.data.slice(1)]})),subIndicator:q.value.subIndicator.map((D,O)=>({...D,data:[...A.body.subIndicator[O].data,...D.data.slice(1)]}))},re(!0),A.body.data.length<w&&(v=!0),y=!1}},re=(r=!1)=>{var O,U,Z;te();const{time:n}=q.value,{gridRight:d,gridLeft:f,defaultShowCounts:g,maxShowCounts:p,showSubChart:w}=z.value;let B=n.length-1-g,A=n.length-1;if(r){const R=t.getOption(),K=(U=(O=R==null?void 0:R.xAxis)==null?void 0:O[0])==null?void 0:U.data,V=(Z=R==null?void 0:R.dataZoom)==null?void 0:Z[0],le=K[V==null?void 0:V.startValue],ie=K[V==null?void 0:V.endValue];B=n.findIndex(X=>X===le),A=n.findIndex(X=>X===ie)}const D=Le(q.value,z.value,B,A);if(t.setOption(D,!0),j.value=A,l.brushRange){let R=null,K=null;switch(l.cycle){case"6":{R=n.find(V=>new Date(V).getTime()>=new Date(l.brushRange[0]).getTime()||T(V).format("YYYY-MM-DD")===T(l.brushRange[0]).format("YYYY-MM-DD")),K=n.findLast(V=>new Date(V).getTime()<=new Date(l.brushRange[1]).getTime()||T(V).format("YYYY-MM-DD")===T(l.brushRange[1]).format("YYYY-MM-DD"));break}case"7":{R=n.find(V=>T(V).day(5).format("YYYY-MM-DD")===T(l.brushRange[0]).day(5).format("YYYY-MM-DD")),K=n.findLast(V=>T(V).day(5).format("YYYY-MM-DD")===T(l.brushRange[1]).day(5).format("YYYY-MM-DD"));break}case"8":{R=n.find(V=>T(V).endOf("month").format("YYYY-MM-DD")===T(l.brushRange[0]).endOf("month").format("YYYY-MM-DD")),K=n.findLast(V=>T(V).endOf("month").format("YYYY-MM-DD")===T(l.brushRange[1]).endOf("month").format("YYYY-MM-DD"));break}default:R=n.find(V=>new Date(V).getTime()>=new Date(l.brushRange[0]).getTime()),K=n.findLast(V=>new Date(V).getTime()<=new Date(l.brushRange[1]).getTime())}console.log(R,K),t.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[R,K],xAxisIndex:0}]})}w&&I.value.draw({startValue:B,endValue:A,maxValueSpan:p},{gridLeft:f,gridRight:d}),i()},c=()=>{if(!t)return;const r=t==null?void 0:t.getOption();r&&(t==null||t.setOption({...r,graphic:[...Be(t,H.value,l,z.value,()=>{o()})]},!0),i())},i=()=>{const{time:r}=q.value;if(l.brushRange&&(r!=null&&r.length)){let n=T(l.brushRange[0]).format("YYYY-MM-DD 00:00:00"),d=T(l.brushRange[1]).format("YYYY-MM-DD 23:59:59"),f=null,g=null;switch(l.cycle){case"6":{f=r.find(p=>T(p).format("YYYY-MM-DD")===T(n).format("YYYY-MM-DD")),g=f;break}case"7":{f=r.find(p=>T(p).day(5).format("YYYY-MM-DD")===T(n).day(5).format("YYYY-MM-DD")),g=r.findLast(p=>T(p).day(5).format("YYYY-MM-DD")===T(d).day(5).format("YYYY-MM-DD"));break}case"8":{f=r.find(p=>T(p).endOf("month").format("YYYY-MM-DD")===T(n).endOf("month").format("YYYY-MM-DD")),g=r.findLast(p=>T(p).endOf("month").format("YYYY-MM-DD")===T(d).endOf("month").format("YYYY-MM-DD"));break}default:f=r.find(p=>{const w=T(p).format("YYYY-MM-DD")===T(n).format("YYYY-MM-DD"),B=new Date(p).getTime()>=new Date(n).getTime();return w&&B}),g=r.findLast(p=>{const w=T(p).format("YYYY-MM-DD")===T(d).format("YYYY-MM-DD"),B=new Date(p).getTime()<=new Date(d).getTime();return w&&B})}t.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[f,g],xAxisIndex:0}]})}},o=async()=>{const r=await Te({featureId:l.featureId});H.value=(r==null?void 0:r.body)||[],c(),k("change","warningLine",H.value)},u=async r=>{const{variety:n,varietyName:d,featureId:f,featureType:g}=l;if(r.key==="drawWarningLine"){const p=t==null?void 0:t.getOption(),w=p.tooltip[0];t==null||t.setOption({...p,tooltip:{...w,axisPointer:{...w.axisPointer,lineStyle:{width:0},crossStyle:{width:2},label:{...w.axisPointer.label,backgroundColor:"transparent",formatter:A=>""}}}});const B=async A=>{t==null||t.getZr().off("mousedown",B);const D=t==null?void 0:t.convertFromPixel({yAxisIndex:0},A.offsetY),O=Math.round(D*1e3)/1e3;t==null||t.setOption({...p,tooltip:{...w,axisPointer:{...w.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...w.axisPointer.label,backgroundColor:null}}}}),await $e({featureCode:n,featureName:d,featureId:f,featureType:g,warnPrice:O}),se.ElMessage.success("画线预警成功!"),o()};t==null||t.getZr().on("mousedown",B)}else r.key==="deleteWarningLine"?(await Ve({id:x.value.id}),se.ElMessage.success("画线预警删除成功"),o()):r.key==="changeWarningLine"&&(W.value=!0,P.value=x.value.warnPrice)},a=async()=>{const{variety:r,varietyName:n,featureId:d,featureType:f}=l;await me({id:x.value.id,featureCode:r,featureName:n,featureId:d,featureType:f,warnPrice:P.value}),se.ElMessage.success("画线预警修改成功"),o()},m=()=>{ee.value=[...M]};return N({draw:(r,n)=>{r==="warningLine"&&(H.value=n,c())}}),(r,n)=>{var A;const d=de.ElMenuItem,f=de.ElMenu,g=be.ElEmpty,p=ve.ElButton,w=he.ElInputNumber,B=ye.ElDialog;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",He,[e.createElementVNode("div",ze,[e.createVNode(Ae,{data:q.value,activeIndex:j.value},null,8,["data","activeIndex"])]),e.createElementVNode("div",{class:"klineBasic-main",style:e.normalizeStyle({height:z.value.showSubChart?"70%":"100%"})},[e.createVNode(je,{onCloseContextMenuCallBack:m},{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(ee.value,D=>(e.openBlock(),e.createBlock(d,{style:{height:"36px"},key:D.key,index:D.key,onClick:O=>u(D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(D.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"klineBasicMainRef",ref:Y,style:{height:"100%"}},null,512)]),_:1})],4),z.value.showSubChart?(e.openBlock(),e.createElementBlock("div",Ue,[e.createVNode(We,{ref_key:"klineSubRef",ref:I,modelValue:F.value,"onUpdate:modelValue":n[0]||(n[0]=D=>F.value=D),data:q.value,activeIndex:j.value,subIndicatorList:(A=s.indicatorStore)==null?void 0:A.subIndicatorList},null,8,["modelValue","data","activeIndex","subIndicatorList"])])):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createElementBlock("div",Ze,[e.createVNode(g,{class:"klineBasic-empty-content",description:"暂无数据"})])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("div",Ke,[Xe,e.createElementVNode("div",Je,[e.createVNode(p,{onClick:_},{default:e.withCtx(()=>[e.createTextVNode("刷新")]),_:1})])])):e.createCommentVNode("",!0)]),e.createVNode(B,{modelValue:W.value,"onUpdate:modelValue":n[3]||(n[3]=D=>W.value=D),title:"画线预警-修改价格",width:"30%","align-center":""},{footer:e.withCtx(()=>[e.createElementVNode("span",Qe,[e.createVNode(p,{onClick:n[2]||(n[2]=D=>W.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(p,{type:"primary",onClick:a},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})])]),default:e.withCtx(()=>[Ge,e.createVNode(w,{modelValue:P.value,"onUpdate:modelValue":n[1]||(n[1]=D=>P.value=D),placeholder:"输入预警价格"},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},tt=ae._export_sfc(et,[["__scopeId","data-v-c3c33299"]]),nt={install(s){s.component("st-klineBasic",tt)}};module.exports=nt;
|
|
1
|
+
"use strict";const w=require("./base-00ce90ec.cjs"),be=require("./el-overlay-91784be2.cjs"),De=require("./el-input-2ff1628c.cjs"),Ee=require("./el-input-number-d6801a5c.cjs"),xe=require("./el-button-c00975e1.cjs"),Ye=require("./el-empty-87154b6d.cjs");require("./el-tooltip-0ea8fbf8.cjs");const he=require("./el-scrollbar-ec09bbd3.cjs"),e=require("vue"),Ce=require("echarts"),ne=require("./index-a96158ae.cjs"),ue=require("./el-message-ffcf690c.cjs"),le=require("./_plugin-vue_export-helper-f246444f.cjs"),Ne=require("./el-tag-13ee17b3.cjs"),ye=require("./el-select-0785c35a.cjs"),R=require("./index-a49f4743.cjs");require("./scroll-cca17da0.cjs");require("./config-provider-68414290.cjs");require("./index-65b719a4.cjs");require("./index-07b61d12.cjs");function Ie(t){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const h=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(d,i,h.get?h:{enumerable:!0,get:()=>t[i]})}}return d.default=t,Object.freeze(d)}const me=Ie(Ce);var Oe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Be(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Me={exports:{}};(function(t,d){(function(i,h){t.exports=h()})(Oe,function(){var i=1e3,h=6e4,o=36e5,l="millisecond",M="second",T="minute",f="hour",b="day",k="week",p="month",g="quarter",$="year",D="date",W="Invalid Date",I=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,H=/\[([^\]]+)]|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,B={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(x){var r=["th","st","nd","rd"],a=x%100;return"["+x+(r[(a-20)%10]||r[a]||r[0])+"]"}},Z=function(x,r,a){var u=String(x);return!u||u.length>=r?x:""+Array(r+1-u.length).join(a)+x},E={s:Z,z:function(x){var r=-x.utcOffset(),a=Math.abs(r),u=Math.floor(a/60),c=a%60;return(r<=0?"+":"-")+Z(u,2,"0")+":"+Z(c,2,"0")},m:function x(r,a){if(r.date()<a.date())return-x(a,r);var u=12*(a.year()-r.year())+(a.month()-r.month()),c=r.clone().add(u,p),m=a-c<0,n=r.clone().add(u+(m?-1:1),p);return+(-(u+(a-c)/(m?c-n:n-c))||0)},a:function(x){return x<0?Math.ceil(x)||0:Math.floor(x)},p:function(x){return{M:p,y:$,w:k,d:b,D,h:f,m:T,s:M,ms:l,Q:g}[x]||String(x||"").toLowerCase().replace(/s$/,"")},u:function(x){return x===void 0}},j="en",V={};V[j]=B;var K="$isDayjsObject",U=function(x){return x instanceof G||!(!x||!x[K])},X=function x(r,a,u){var c;if(!r)return j;if(typeof r=="string"){var m=r.toLowerCase();V[m]&&(c=m),a&&(V[m]=a,c=m);var n=r.split("-");if(!c&&n.length>1)return x(n[0])}else{var s=r.name;V[s]=r,c=s}return!u&&c&&(j=c),c||!u&&j},P=function(x,r){if(U(x))return x.clone();var a=typeof r=="object"?r:{};return a.date=x,a.args=arguments,new G(a)},Y=E;Y.l=X,Y.i=U,Y.w=function(x,r){return P(x,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})};var G=function(){function x(a){this.$L=X(a.locale,null,!0),this.parse(a),this.$x=this.$x||a.x||{},this[K]=!0}var r=x.prototype;return r.parse=function(a){this.$d=function(u){var c=u.date,m=u.utc;if(c===null)return new Date(NaN);if(Y.u(c))return new Date;if(c instanceof Date)return new Date(c);if(typeof c=="string"&&!/Z$/i.test(c)){var n=c.match(I);if(n){var s=n[2]-1||0,v=(n[7]||"0").substring(0,3);return m?new Date(Date.UTC(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,v)):new Date(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,v)}}return new Date(c)}(a),this.init()},r.init=function(){var a=this.$d;this.$y=a.getFullYear(),this.$M=a.getMonth(),this.$D=a.getDate(),this.$W=a.getDay(),this.$H=a.getHours(),this.$m=a.getMinutes(),this.$s=a.getSeconds(),this.$ms=a.getMilliseconds()},r.$utils=function(){return Y},r.isValid=function(){return this.$d.toString()!==W},r.isSame=function(a,u){var c=P(a);return this.startOf(u)<=c&&c<=this.endOf(u)},r.isAfter=function(a,u){return P(a)<this.startOf(u)},r.isBefore=function(a,u){return this.endOf(u)<P(a)},r.$g=function(a,u,c){return Y.u(a)?this[u]:this.set(c,a)},r.unix=function(){return Math.floor(this.valueOf()/1e3)},r.valueOf=function(){return this.$d.getTime()},r.startOf=function(a,u){var c=this,m=!!Y.u(u)||u,n=Y.p(a),s=function(O,F){var J=Y.w(c.$u?Date.UTC(c.$y,F,O):new Date(c.$y,F,O),c);return m?J:J.endOf(b)},v=function(O,F){return Y.w(c.toDate()[O].apply(c.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(F)),c)},y=this.$W,S=this.$M,_=this.$D,C="set"+(this.$u?"UTC":"");switch(n){case $:return m?s(1,0):s(31,11);case p:return m?s(1,S):s(0,S+1);case k:var A=this.$locale().weekStart||0,q=(y<A?y+7:y)-A;return s(m?_-q:_+(6-q),S);case b:case D:return v(C+"Hours",0);case f:return v(C+"Minutes",1);case T:return v(C+"Seconds",2);case M:return v(C+"Milliseconds",3);default:return this.clone()}},r.endOf=function(a){return this.startOf(a,!1)},r.$set=function(a,u){var c,m=Y.p(a),n="set"+(this.$u?"UTC":""),s=(c={},c[b]=n+"Date",c[D]=n+"Date",c[p]=n+"Month",c[$]=n+"FullYear",c[f]=n+"Hours",c[T]=n+"Minutes",c[M]=n+"Seconds",c[l]=n+"Milliseconds",c)[m],v=m===b?this.$D+(u-this.$W):u;if(m===p||m===$){var y=this.clone().set(D,1);y.$d[s](v),y.init(),this.$d=y.set(D,Math.min(this.$D,y.daysInMonth())).$d}else s&&this.$d[s](v);return this.init(),this},r.set=function(a,u){return this.clone().$set(a,u)},r.get=function(a){return this[Y.p(a)]()},r.add=function(a,u){var c,m=this;a=Number(a);var n=Y.p(u),s=function(S){var _=P(m);return Y.w(_.date(_.date()+Math.round(S*a)),m)};if(n===p)return this.set(p,this.$M+a);if(n===$)return this.set($,this.$y+a);if(n===b)return s(1);if(n===k)return s(7);var v=(c={},c[T]=h,c[f]=o,c[M]=i,c)[n]||1,y=this.$d.getTime()+a*v;return Y.w(y,this)},r.subtract=function(a,u){return this.add(-1*a,u)},r.format=function(a){var u=this,c=this.$locale();if(!this.isValid())return c.invalidDate||W;var m=a||"YYYY-MM-DDTHH:mm:ssZ",n=Y.z(this),s=this.$H,v=this.$m,y=this.$M,S=c.weekdays,_=c.months,C=c.meridiem,A=function(F,J,Q,z){return F&&(F[J]||F(u,m))||Q[J].slice(0,z)},q=function(F){return Y.s(s%12||12,F,"0")},O=C||function(F,J,Q){var z=F<12?"AM":"PM";return Q?z.toLowerCase():z};return m.replace(H,function(F,J){return J||function(Q){switch(Q){case"YY":return String(u.$y).slice(-2);case"YYYY":return Y.s(u.$y,4,"0");case"M":return y+1;case"MM":return Y.s(y+1,2,"0");case"MMM":return A(c.monthsShort,y,_,3);case"MMMM":return A(_,y);case"D":return u.$D;case"DD":return Y.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return A(c.weekdaysMin,u.$W,S,2);case"ddd":return A(c.weekdaysShort,u.$W,S,3);case"dddd":return S[u.$W];case"H":return String(s);case"HH":return Y.s(s,2,"0");case"h":return q(1);case"hh":return q(2);case"a":return O(s,v,!0);case"A":return O(s,v,!1);case"m":return String(v);case"mm":return Y.s(v,2,"0");case"s":return String(u.$s);case"ss":return Y.s(u.$s,2,"0");case"SSS":return Y.s(u.$ms,3,"0");case"Z":return n}return null}(F)||n.replace(":","")})},r.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},r.diff=function(a,u,c){var m,n=this,s=Y.p(u),v=P(a),y=(v.utcOffset()-this.utcOffset())*h,S=this-v,_=function(){return Y.m(n,v)};switch(s){case $:m=_()/12;break;case p:m=_();break;case g:m=_()/3;break;case k:m=(S-y)/6048e5;break;case b:m=(S-y)/864e5;break;case f:m=S/o;break;case T:m=S/h;break;case M:m=S/i;break;default:m=S}return c?m:Y.a(m)},r.daysInMonth=function(){return this.endOf(p).$D},r.$locale=function(){return V[this.$L]},r.locale=function(a,u){if(!a)return this.$L;var c=this.clone(),m=X(a,u,!0);return m&&(c.$L=m),c},r.clone=function(){return Y.w(this.$d,this)},r.toDate=function(){return new Date(this.valueOf())},r.toJSON=function(){return this.isValid()?this.toISOString():null},r.toISOString=function(){return this.$d.toISOString()},r.toString=function(){return this.$d.toUTCString()},x}(),ae=G.prototype;return P.prototype=ae,[["$ms",l],["$s",M],["$m",T],["$H",f],["$W",b],["$M",p],["$y",$],["$D",D]].forEach(function(x){ae[x[1]]=function(r){return this.$g(r,x[0],x[1])}}),P.extend=function(x,r){return x.$i||(x(r,G,P),x.$i=!0),P},P.locale=X,P.isDayjs=U,P.unix=function(x){return P(1e3*x)},P.en=V[j],P.Ls=V,P.p={},P})})(Me);var Ve=Me.exports;const N=Be(Ve),Le=e.defineComponent({name:"ElCollapseTransition"}),Pe=e.defineComponent({...Le,setup(t){const d=w.useNamespace("collapse-transition"),i=o=>{o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom},h={beforeEnter(o){o.dataset||(o.dataset={}),o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.style.height&&(o.dataset.elExistsHeight=o.style.height),o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0},enter(o){requestAnimationFrame(()=>{o.dataset.oldOverflow=o.style.overflow,o.dataset.elExistsHeight?o.style.maxHeight=o.dataset.elExistsHeight:o.scrollHeight!==0?o.style.maxHeight=`${o.scrollHeight}px`:o.style.maxHeight=0,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom,o.style.overflow="hidden"})},afterEnter(o){o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow},enterCancelled(o){i(o)},beforeLeave(o){o.dataset||(o.dataset={}),o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.dataset.oldOverflow=o.style.overflow,o.style.maxHeight=`${o.scrollHeight}px`,o.style.overflow="hidden"},leave(o){o.scrollHeight!==0&&(o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0)},afterLeave(o){i(o)},leaveCancelled(o){i(o)}};return(o,l)=>(e.openBlock(),e.createBlock(e.Transition,e.mergeProps({name:e.unref(d).b()},e.toHandlers(h)),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16,["name"]))}});var Ae=w._export_sfc(Pe,[["__file","collapse-transition.vue"]]);const Fe=w.withInstall(Ae);let Re=class{constructor(d,i){this.parent=d,this.domNode=i,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(d){d===this.subMenuItems.length?d=0:d<0&&(d=this.subMenuItems.length-1),this.subMenuItems[d].focus(),this.subIndex=d}addListeners(){const d=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,i=>{i.addEventListener("keydown",h=>{let o=!1;switch(h.code){case R.EVENT_CODE.down:{this.gotoSubIndex(this.subIndex+1),o=!0;break}case R.EVENT_CODE.up:{this.gotoSubIndex(this.subIndex-1),o=!0;break}case R.EVENT_CODE.tab:{R.triggerEvent(d,"mouseleave");break}case R.EVENT_CODE.enter:case R.EVENT_CODE.numpadEnter:case R.EVENT_CODE.space:{o=!0,h.currentTarget.click();break}}return o&&(h.preventDefault(),h.stopPropagation()),!1})})}},We=class{constructor(d,i){this.domNode=d,this.submenu=null,this.submenu=null,this.init(i)}init(d){this.domNode.setAttribute("tabindex","0");const i=this.domNode.querySelector(`.${d}-menu`);i&&(this.submenu=new Re(this,i)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",d=>{let i=!1;switch(d.code){case R.EVENT_CODE.down:{R.triggerEvent(d.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),i=!0;break}case R.EVENT_CODE.up:{R.triggerEvent(d.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),i=!0;break}case R.EVENT_CODE.tab:{R.triggerEvent(d.currentTarget,"mouseleave");break}case R.EVENT_CODE.enter:case R.EVENT_CODE.numpadEnter:case R.EVENT_CODE.space:{i=!0,d.currentTarget.click();break}}i&&d.preventDefault()})}},qe=class{constructor(d,i){this.domNode=d,this.init(i)}init(d){const i=this.domNode.childNodes;Array.from(i).forEach(h=>{h.nodeType===1&&new We(h,d)})}};const ze=e.defineComponent({name:"ElMenuCollapseTransition",setup(){const t=w.useNamespace("menu");return{listeners:{onBeforeEnter:i=>i.style.opacity="0.2",onEnter(i,h){w.addClass(i,`${t.namespace.value}-opacity-transition`),i.style.opacity="1",h()},onAfterEnter(i){w.removeClass(i,`${t.namespace.value}-opacity-transition`),i.style.opacity=""},onBeforeLeave(i){i.dataset||(i.dataset={}),w.hasClass(i,t.m("collapse"))?(w.removeClass(i,t.m("collapse")),i.dataset.oldOverflow=i.style.overflow,i.dataset.scrollWidth=i.clientWidth.toString(),w.addClass(i,t.m("collapse"))):(w.addClass(i,t.m("collapse")),i.dataset.oldOverflow=i.style.overflow,i.dataset.scrollWidth=i.clientWidth.toString(),w.removeClass(i,t.m("collapse"))),i.style.width=`${i.scrollWidth}px`,i.style.overflow="hidden"},onLeave(i){w.addClass(i,"horizontal-collapse-transition"),i.style.width=`${i.dataset.scrollWidth}px`}}}}});function He(t,d,i,h,o,l){return e.openBlock(),e.createBlock(e.Transition,e.mergeProps({mode:"out-in"},t.listeners),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}var je=w._export_sfc(ze,[["render",He],["__file","menu-collapse-transition.vue"]]);function _e(t,d){const i=e.computed(()=>{let o=t.parent;const l=[d.value];for(;o.type.name!=="ElMenu";)o.props.index&&l.unshift(o.props.index),o=o.parent;return l});return{parentMenu:e.computed(()=>{let o=t.parent;for(;o&&!["ElMenu","ElSubMenu"].includes(o.type.name);)o=o.parent;return o}),indexPath:i}}function Ue(t){return e.computed(()=>{const i=t.backgroundColor;return i?new xe.TinyColor(i).shade(20).toString():""})}const we=(t,d)=>{const i=w.useNamespace("menu");return e.computed(()=>i.cssVarBlock({"text-color":t.textColor||"","hover-text-color":t.textColor||"","bg-color":t.backgroundColor||"","hover-bg-color":Ue(t).value||"","active-color":t.activeTextColor||"",level:`${d}`}))},Ze=w.buildProps({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:R.iconPropType},expandOpenIcon:{type:R.iconPropType},collapseCloseIcon:{type:R.iconPropType},collapseOpenIcon:{type:R.iconPropType}}),de="ElSubMenu";var ge=e.defineComponent({name:de,props:Ze,setup(t,{slots:d,expose:i}){const h=e.getCurrentInstance(),{indexPath:o,parentMenu:l}=_e(h,e.computed(()=>t.index)),M=w.useNamespace("menu"),T=w.useNamespace("sub-menu"),f=e.inject("rootMenu");f||w.throwError(de,"can not inject root menu");const b=e.inject(`subMenu:${l.value.uid}`);b||w.throwError(de,"can not inject sub menu");const k=e.ref({}),p=e.ref({});let g;const $=e.ref(!1),D=e.ref(),W=e.ref(null),I=e.computed(()=>U.value==="horizontal"&&B.value?"bottom-start":"right-start"),H=e.computed(()=>U.value==="horizontal"&&B.value||U.value==="vertical"&&!f.props.collapse?t.expandCloseIcon&&t.expandOpenIcon?V.value?t.expandOpenIcon:t.expandCloseIcon:R.arrow_down_default:t.collapseCloseIcon&&t.collapseOpenIcon?V.value?t.collapseOpenIcon:t.collapseCloseIcon:R.arrow_right_default),B=e.computed(()=>b.level===0),Z=e.computed(()=>{const n=t.teleported;return n===void 0?B.value:n}),E=e.computed(()=>f.props.collapse?`${M.namespace.value}-zoom-in-left`:`${M.namespace.value}-zoom-in-top`),j=e.computed(()=>U.value==="horizontal"&&B.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),V=e.computed(()=>f.openedMenus.includes(t.index)),K=e.computed(()=>{let n=!1;return Object.values(k.value).forEach(s=>{s.active&&(n=!0)}),Object.values(p.value).forEach(s=>{s.active&&(n=!0)}),n}),U=e.computed(()=>f.props.mode),X=e.reactive({index:t.index,indexPath:o,active:K}),P=we(f.props,b.level+1),Y=e.computed(()=>{var n;return(n=t.popperOffset)!=null?n:f.props.popperOffset}),G=e.computed(()=>{var n;return(n=t.popperClass)!=null?n:f.props.popperClass}),ae=e.computed(()=>{var n;return(n=t.showTimeout)!=null?n:f.props.showTimeout}),x=e.computed(()=>{var n;return(n=t.hideTimeout)!=null?n:f.props.hideTimeout}),r=()=>{var n,s,v;return(v=(s=(n=W.value)==null?void 0:n.popperRef)==null?void 0:s.popperInstanceRef)==null?void 0:v.destroy()},a=n=>{n||r()},u=()=>{f.props.menuTrigger==="hover"&&f.props.mode==="horizontal"||f.props.collapse&&f.props.mode==="vertical"||t.disabled||f.handleSubMenuClick({index:t.index,indexPath:o.value,active:K.value})},c=(n,s=ae.value)=>{var v;if(n.type!=="focus"){if(f.props.menuTrigger==="click"&&f.props.mode==="horizontal"||!f.props.collapse&&f.props.mode==="vertical"||t.disabled){b.mouseInChild.value=!0;return}b.mouseInChild.value=!0,g==null||g(),{stop:g}=w.useTimeoutFn(()=>{f.openMenu(t.index,o.value)},s),Z.value&&((v=l.value.vnode.el)==null||v.dispatchEvent(new MouseEvent("mouseenter")))}},m=(n=!1)=>{var s;if(f.props.menuTrigger==="click"&&f.props.mode==="horizontal"||!f.props.collapse&&f.props.mode==="vertical"){b.mouseInChild.value=!1;return}g==null||g(),b.mouseInChild.value=!1,{stop:g}=w.useTimeoutFn(()=>!$.value&&f.closeMenu(t.index,o.value),x.value),Z.value&&n&&((s=b.handleMouseleave)==null||s.call(b,!0))};e.watch(()=>f.props.collapse,n=>a(!!n));{const n=v=>{p.value[v.index]=v},s=v=>{delete p.value[v.index]};e.provide(`subMenu:${h.uid}`,{addSubMenu:n,removeSubMenu:s,handleMouseleave:m,mouseInChild:$,level:b.level+1})}return i({opened:V}),e.onMounted(()=>{f.addSubMenu(X),b.addSubMenu(X)}),e.onBeforeUnmount(()=>{b.removeSubMenu(X),f.removeSubMenu(X)}),()=>{var n;const s=[(n=d.title)==null?void 0:n.call(d),e.h(R.ElIcon,{class:T.e("icon-arrow"),style:{transform:V.value?t.expandCloseIcon&&t.expandOpenIcon||t.collapseCloseIcon&&t.collapseOpenIcon&&f.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>w.isString(H.value)?e.h(h.appContext.components[H.value]):e.h(H.value)})],v=f.isMenuPopup?e.h(he.ElTooltip,{ref:W,visible:V.value,effect:"light",pure:!0,offset:Y.value,showArrow:!1,persistent:!0,popperClass:G.value,placement:I.value,teleported:Z.value,fallbackPlacements:j.value,transition:E.value,gpuAcceleration:!1},{content:()=>{var y;return e.h("div",{class:[M.m(U.value),M.m("popup-container"),G.value],onMouseenter:S=>c(S,100),onMouseleave:()=>m(!0),onFocus:S=>c(S,100)},[e.h("ul",{class:[M.b(),M.m("popup"),M.m(`popup-${I.value}`)],style:P.value},[(y=d.default)==null?void 0:y.call(d)])])},default:()=>e.h("div",{class:T.e("title"),onClick:u},s)}):e.h(e.Fragment,{},[e.h("div",{class:T.e("title"),ref:D,onClick:u},s),e.h(Fe,{},{default:()=>{var y;return e.withDirectives(e.h("ul",{role:"menu",class:[M.b(),M.m("inline")],style:P.value},[(y=d.default)==null?void 0:y.call(d)]),[[e.vShow,V.value]])}})]);return e.h("li",{class:[T.b(),T.is("active",K.value),T.is("opened",V.value),T.is("disabled",t.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:V.value,onMouseenter:c,onMouseleave:()=>m(),onFocus:c},[v])}}});const Ke=w.buildProps({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:w.definePropType(Array),default:()=>De.mutable([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:R.iconPropType,default:()=>R.more_default},popperEffect:{type:w.definePropType(String),default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300}}),fe=t=>w.isArray$1(t)&&t.every(d=>w.isString(d)),Xe={close:(t,d)=>w.isString(t)&&fe(d),open:(t,d)=>w.isString(t)&&fe(d),select:(t,d,i,h)=>w.isString(t)&&fe(d)&&w.isObject(i)&&(h===void 0||h instanceof Promise)};var Ge=e.defineComponent({name:"ElMenu",props:Ke,emits:Xe,setup(t,{emit:d,slots:i,expose:h}){const o=e.getCurrentInstance(),l=o.appContext.config.globalProperties.$router,M=e.ref(),T=w.useNamespace("menu"),f=w.useNamespace("sub-menu"),b=e.ref(-1),k=e.ref(t.defaultOpeneds&&!t.collapse?t.defaultOpeneds.slice(0):[]),p=e.ref(t.defaultActive),g=e.ref({}),$=e.ref({}),D=e.computed(()=>t.mode==="horizontal"||t.mode==="vertical"&&t.collapse),W=()=>{const r=p.value&&g.value[p.value];if(!r||t.mode==="horizontal"||t.collapse)return;r.indexPath.forEach(u=>{const c=$.value[u];c&&I(u,c.indexPath)})},I=(r,a)=>{k.value.includes(r)||(t.uniqueOpened&&(k.value=k.value.filter(u=>a.includes(u))),k.value.push(r),d("open",r,a))},H=r=>{const a=k.value.indexOf(r);a!==-1&&k.value.splice(a,1)},B=(r,a)=>{H(r),d("close",r,a)},Z=({index:r,indexPath:a})=>{k.value.includes(r)?B(r,a):I(r,a)},E=r=>{(t.mode==="horizontal"||t.collapse)&&(k.value=[]);const{index:a,indexPath:u}=r;if(!(w.isNil(a)||w.isNil(u)))if(t.router&&l){const c=r.route||a,m=l.push(c).then(n=>(n||(p.value=a),n));d("select",a,u,{index:a,indexPath:u,route:c},m)}else p.value=a,d("select",a,u,{index:a,indexPath:u})},j=r=>{const a=g.value,u=a[r]||p.value&&a[p.value]||a[t.defaultActive];u?p.value=u.index:p.value=r},V=r=>{const a=getComputedStyle(r),u=Number.parseInt(a.marginLeft,10),c=Number.parseInt(a.marginRight,10);return r.offsetWidth+u+c||0},K=()=>{var r,a;if(!M.value)return-1;const u=Array.from((a=(r=M.value)==null?void 0:r.childNodes)!=null?a:[]).filter(_=>_.nodeName!=="#text"||_.nodeValue),c=64,m=getComputedStyle(M.value),n=Number.parseInt(m.paddingLeft,10),s=Number.parseInt(m.paddingRight,10),v=M.value.clientWidth-n-s;let y=0,S=0;return u.forEach((_,C)=>{_.nodeName!=="#comment"&&(y+=V(_),y<=v-c&&(S=C+1))}),S===u.length?-1:S},U=r=>$.value[r].indexPath,X=(r,a=33.34)=>{let u;return()=>{u&&clearTimeout(u),u=setTimeout(()=>{r()},a)}};let P=!0;const Y=()=>{if(b.value===K())return;const r=()=>{b.value=-1,e.nextTick(()=>{b.value=K()})};P?r():X(r)(),P=!1};e.watch(()=>t.defaultActive,r=>{g.value[r]||(p.value=""),j(r)}),e.watch(()=>t.collapse,r=>{r&&(k.value=[])}),e.watch(g.value,W);let G;e.watchEffect(()=>{t.mode==="horizontal"&&t.ellipsis?G=he.useResizeObserver(M,Y).stop:G==null||G()});const ae=e.ref(!1);{const r=m=>{$.value[m.index]=m},a=m=>{delete $.value[m.index]},u=m=>{g.value[m.index]=m},c=m=>{delete g.value[m.index]};e.provide("rootMenu",e.reactive({props:t,openedMenus:k,items:g,subMenus:$,activeIndex:p,isMenuPopup:D,addMenuItem:u,removeMenuItem:c,addSubMenu:r,removeSubMenu:a,openMenu:I,closeMenu:B,handleMenuItemClick:E,handleSubMenuClick:Z})),e.provide(`subMenu:${o.uid}`,{addSubMenu:r,removeSubMenu:a,mouseInChild:ae,level:0})}e.onMounted(()=>{t.mode==="horizontal"&&new qe(o.vnode.el,T.namespace.value)}),h({open:a=>{const{indexPath:u}=$.value[a];u.forEach(c=>I(c,u))},close:H,handleResize:Y});const x=we(t,0);return()=>{var r,a;let u=(a=(r=i.default)==null?void 0:r.call(i))!=null?a:[];const c=[];if(t.mode==="horizontal"&&M.value){const s=be.flattedChildren(u),v=b.value===-1?s:s.slice(0,b.value),y=b.value===-1?[]:s.slice(b.value);y!=null&&y.length&&t.ellipsis&&(u=v,c.push(e.h(ge,{index:"sub-menu-more",class:f.e("hide-arrow"),popperOffset:t.popperOffset},{title:()=>e.h(R.ElIcon,{class:f.e("icon-more")},{default:()=>e.h(t.ellipsisIcon)}),default:()=>y})))}const m=t.closeOnClickOutside?[[Ne.ClickOutside,()=>{k.value.length&&(ae.value||(k.value.forEach(s=>d("close",s,U(s))),k.value=[]))}]]:[],n=e.withDirectives(e.h("ul",{key:String(t.collapse),role:"menubar",ref:M,style:x.value,class:{[T.b()]:!0,[T.m(t.mode)]:!0,[T.m("collapse")]:t.collapse}},[...u,...c]),m);return t.collapseTransition&&t.mode==="vertical"?e.h(je,()=>n):n}}});const Je=w.buildProps({index:{type:w.definePropType([String,null]),default:null},route:{type:w.definePropType([String,Object])},disabled:Boolean}),Qe={click:t=>w.isString(t.index)&&w.isArray$1(t.indexPath)},pe="ElMenuItem",et=e.defineComponent({name:pe,components:{ElTooltip:he.ElTooltip},props:Je,emits:Qe,setup(t,{emit:d}){const i=e.getCurrentInstance(),h=e.inject("rootMenu"),o=w.useNamespace("menu"),l=w.useNamespace("menu-item");h||w.throwError(pe,"can not inject root menu");const{parentMenu:M,indexPath:T}=_e(i,e.toRef(t,"index")),f=e.inject(`subMenu:${M.value.uid}`);f||w.throwError(pe,"can not inject sub menu");const b=e.computed(()=>t.index===h.activeIndex),k=e.reactive({index:t.index,indexPath:T,active:b}),p=()=>{t.disabled||(h.handleMenuItemClick({index:t.index,indexPath:T.value,route:t.route}),d("click",k))};return e.onMounted(()=>{f.addSubMenu(k),h.addMenuItem(k)}),e.onBeforeUnmount(()=>{f.removeSubMenu(k),h.removeMenuItem(k)}),{parentMenu:M,rootMenu:h,active:b,nsMenu:o,nsMenuItem:l,handleClick:p}}});function tt(t,d,i,h,o,l){const M=e.resolveComponent("el-tooltip");return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass([t.nsMenuItem.b(),t.nsMenuItem.is("active",t.active),t.nsMenuItem.is("disabled",t.disabled)]),role:"menuitem",tabindex:"-1",onClick:t.handleClick},[t.parentMenu.type.name==="ElMenu"&&t.rootMenu.props.collapse&&t.$slots.title?(e.openBlock(),e.createBlock(M,{key:0,effect:t.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:e.withCtx(()=>[e.renderSlot(t.$slots,"title")]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.nsMenu.be("tooltip","trigger"))},[e.renderSlot(t.$slots,"default")],2)]),_:3},8,["effect"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(t.$slots,"default"),e.renderSlot(t.$slots,"title")],64))],10,["onClick"])}var ke=w._export_sfc(et,[["render",tt],["__file","menu-item.vue"]]);const nt={title:String},ot="ElMenuItemGroup",at=e.defineComponent({name:ot,props:nt,setup(){return{ns:w.useNamespace("menu-item-group")}}});function rt(t,d,i,h,o,l){return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(t.ns.b())},[e.createElementVNode("div",{class:e.normalizeClass(t.ns.e("title"))},[t.$slots.title?e.renderSlot(t.$slots,"title",{key:1}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.title),1)],64))],2),e.createElementVNode("ul",null,[e.renderSlot(t.$slots,"default")])],2)}var Se=w._export_sfc(at,[["render",rt],["__file","menu-item-group.vue"]]);const st=w.withInstall(Ge,{MenuItem:ke,MenuItemGroup:Se,SubMenu:ge}),lt=w.withNoopInstall(ke);w.withNoopInstall(Se);w.withNoopInstall(ge);let re=null;const it=t=>{const d=ne.y(t,{handleReq:i=>{ne.v()&&(i.headers.token=ne.U())},handleRes:i=>{const{data:h}=i;if(h.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:ne.K(),!0}});d.get,re=d.post},ut=t=>re("/middleLayer/kline/getKlineBasic",{...t,userId:ne.V("id")}),ct=t=>re("/middleLayer/kline/getKline",t),dt=async t=>re("/alarm/deliversign/addAlarmPrice",{...t,userId:ne.V("id")}),ft=async t=>re("/alarm/deliversign/findAlarmPriceByUserId",{...t,userId:ne.V("id")}),Te=async t=>re("/alarm/deliversign/updateAlarmPrice",{...t,userId:ne.V("id")}),pt=async t=>re("/alarm/deliversign/deleteAlarmPrice",{...t,userId:ne.V("id")}),{round:se}=ne.x,mt=(t,d,i,h,o)=>{const{data:l,time:M}=t,{gridTop:T,gridRight:f,gridLeft:b,maxShowCounts:k,showSubChart:p}=d;return{animation:!1,grid:{top:`${T}px`,right:`${f}px`,bottom:p?"6px":"24px",left:`${b}px`},dataZoom:[{type:"inside",startValue:i,endValue:h,maxValueSpan:k}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:g=>{const{axisDimension:$,value:D}=g;return $==="x"?p?"":["6","7","8"].includes(o)?N(D).format("YYYY-MM-DD"):D:String(se(D))}}},formatter:()=>""},xAxis:{show:!p,type:"category",data:M,splitLine:{show:!1},axisLabel:{formatter:g=>["6","7","8"].includes(props.cycle)?N(g).format("YYYY-MM-DD"):g}},yAxis:{type:"value",axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:g=>se(g.min),max:g=>se(g.max)},series:[{type:"candlestick",data:l,itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1}},...t.mainIndicator.map(g=>({name:g.key,type:"line",silent:!0,symbol:"none",data:g.data,lineStyle:{width:g.width||1},itemStyle:{color:g.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)"}}}},vt=(t,d,i,h,o)=>{const{variety:l,featureId:M,featureType:T}=i,{gridTop:f,gridLeft:b,gridRight:k}=h;return d.reduce((p,g)=>{const{warnPrice:$}=g,D=t==null?void 0:t.convertToPixel({yAxisIndex:0},$);if(D<=f||D>=(t==null?void 0:t.getHeight()))return p;let W=0;return[...p,{type:"group",name:"warningLine",info:g,draggable:"vertical",children:[{type:"line",info:g,shape:{x1:b,y1:D,x2:(t==null?void 0:t.getWidth())-k,y2:D},style:{stroke:"#FFF",lineWidth:1,lineDash:[8,4]},z:10},{type:"text",info:g,x:(t==null?void 0:t.getWidth())-k,y:D-5,style:{fill:"#FFF",text:$,stroke:"#000",lineWidth:1,opacity:1},z:10}],ondragstart:I=>{W=I.offsetY},ondrag:I=>{var H;if(I.target&&I.target.childAt(1)){const B=t.convertFromPixel({yAxisIndex:0},D+(I.offsetY-W));(H=I.target.childAt(1))==null||H.animate("style",!1).when(1,{text:se(B,3)}).start()}},ondragend:async I=>{const B=I.offsetY-W;if(B!==0){const Z=t==null?void 0:t.convertFromPixel({yAxisIndex:0},B+D),E={id:g.id,warnPrice:se(Z,3),featureId:M,featureCode:l,featureType:T};await Te(E),ue.ElMessage.success("画线预警修改成功"),o&&o()}}}]},[])},ht={class:"kline-tips"},gt=e.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(t){return(d,i)=>(e.openBlock(),e.createElementBlock("div",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data,(h,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"kline-tips-item",style:e.normalizeStyle({color:h.color})},e.toDisplayString(h.label)+" "+e.toDisplayString(h.value),5))),128))]))}});const ve=le._export_sfc(gt,[["__scopeId","data-v-f83b6b36"]]);const yt={class:"kline-tips"},bt={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(t){const{round:d,formatValue:i}=ne.x,h=t,o=e.computed(()=>{const{data:M,activeIndex:T}=h;if(M.data&&M.data[T]){const f=M.data[T],b=[{label:"开",value:d(f[0])},{label:"高",value:d(f[3])},{label:"低",value:d(f[2])},{label:"收",value:d(f[1])}];f[4]!==null&&b.push({label:"额",value:i(f[4])});let k;return f[6]>0?k="red":f[6]<0&&(k="green"),b.push({label:"涨跌",value:`${d(f[6])}%`,color:k}),b}return[]}),l=e.computed(()=>{var f;const{data:M,activeIndex:T}=h;return((f=M==null?void 0:M.mainIndicator)==null?void 0:f.map(b=>({label:b.key,value:d(b.data[T]),color:b.color})))||[]});return(M,T)=>(e.openBlock(),e.createElementBlock("div",yt,[e.createVNode(ve,{data:o.value},null,8,["data"]),e.createVNode(ve,{data:l.value},null,8,["data"])]))}},xt=le._export_sfc(bt,[["__scopeId","data-v-64b5c2a3"]]);const Mt={class:"klineSub"},_t={class:"klineSub-tips"},wt={key:0,class:"klineSub-tips-select"},kt={__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(t,{expose:d,emit:i}){const{round:h}=ne.x;let o,l;const M=i,T=t,f=e.ref(),b=e.computed({get(){return T.modelValue},set(g){M("update:modelValue",g)}}),k=e.computed(()=>{var D;const{data:g,activeIndex:$}=T;return((D=g==null?void 0:g.subIndicator)==null?void 0:D.map(W=>({label:W.key,color:W.color,value:W.data[$]||"-"})))||[]});e.onMounted(()=>{o=me.init(f.value);let g=!0;l=new ResizeObserver(()=>{if(g){g=null;return}o.resize()}),l.observe(f.value)}),e.onUnmounted(()=>{o.dispose(),l.disconnect(),l=null});const p=(g,$)=>{const D=g[$],W=$===0?g[$]:g[$-1];return D[0]===D[1]?D[0]>=W[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:D[1]>D[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return d({connect:g=>{me.connect([g,o])},draw:(g,$)=>{e.nextTick(()=>{const{startValue:D,endValue:W,maxValueSpan:I}=g,{leftYAxisRange:H,rightYAxisRange:B}=T.data.subIndicator[0],Z=T.data.subIndicator.map(E=>{if(E.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:E.data.map((j,V)=>E.seriesColor==="kline"?{value:j,itemStyle:p(T.data.data,V)}:E.seriesColor==="value"?{value:j,itemStyle:{color:j>=0?"#FF0000":"#00FFFF"}}:{value:j,itemStyle:{color:E.seriesColor}})};if(E.series==="line")return{xAxisIndex:0,yAxisIndex:E.yAxis==="right"?2:1,name:E.key,type:"line",silent:!0,symbol:"none",data:E.data,lineStyle:{width:1},itemStyle:{color:E.color}}});o.setOption({animation:!1,grid:{left:`${$.gridLeft}px`,top:"10px",right:`${$.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:D,endValue:W,maxValueSpan:I}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:E=>{const{axisDimension:j,value:V}=E;if(j==="x")return["6","7","8"].includes(T.cycle)?N(V).format("YYYY-MM-DD"):V;if(E.axisIndex===1)return String(h(V))}}},formatter:()=>""},xAxis:{type:"category",data:T.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{formatter:E=>["6","7","8"].includes(T.cycle)?N(E).format("YYYY-MM-DD"):E}},yAxis:[{position:"right"},{position:"left",min:H==="cover"?E=>E.min:null,max:H==="cover"?E=>E.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:B==="cover"?E=>E.min:null,max:B==="cover"?E=>E.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:Z},!0)})}}),(g,$)=>{const D=ye.ElOption,W=ye.ElSelect;return e.openBlock(),e.createElementBlock("div",Mt,[e.createElementVNode("div",_t,[k.value.length?(e.openBlock(),e.createElementBlock("div",wt,[e.createVNode(W,{modelValue:b.value,"onUpdate:modelValue":$[0]||($[0]=I=>b.value=I),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subIndicatorList,I=>(e.openBlock(),e.createBlock(D,{key:I.value,label:I.label,value:I.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(ve,{data:k.value},null,8,["data"])]),e.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:f},null,512)])}}},St=le._export_sfc(kt,[["__scopeId","data-v-ab519de5"]]),Tt=e.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(t,{emit:d}){const i=d,h=e.ref(),o=e.ref(),l=e.ref({display:"none",top:"0px",left:"0px"}),M=()=>{l.value.display="none",i("closeContextMenuCallBack"),document.removeEventListener("click",M)},T=f=>{if(f.preventDefault(),l.value.display==="block"){const{offsetX:b,offsetY:k}=f,{offsetWidth:p,offsetHeight:g}=o.value;if(b<=p&&k<=g)return}h.value.click(),l.value={display:"block",top:`${f.offsetY}px`,left:`${f.offsetX}px`},e.nextTick(()=>{const b=h.value.getBoundingClientRect(),k=o.value.getBoundingClientRect();k.left+k.width>=b.right&&(l.value.left=`${f.offsetX-k.width}px`),k.top+k.height>=b.bottom&&(console.log("高度超出"),l.value.top=`${f.offsetY-k.height}px`)}),document.addEventListener("click",M)};return(f,b)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"contextmenuRef",ref:h,class:"contextmenu",onContextmenu:T,onMouseleave:M},[e.renderSlot(f.$slots,"default",{},void 0,!0),l.value.display!=="none"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:o,class:"contextmenu-popover",style:e.normalizeStyle(l.value)},[e.renderSlot(f.$slots,"popover",{},void 0,!0)],4)):e.createCommentVNode("",!0)],544))}});const $t=le._export_sfc(Tt,[["__scopeId","data-v-811db6b4"]]);const $e=t=>(e.pushScopeId("data-v-95b8303f"),t=t(),e.popScopeId(),t),Dt={class:"klineBasic"},Et={class:"klineBasic-tips"},Yt={key:0,class:"klineBasic-sub"},Ct={key:1,class:"klineBasic-empty"},Nt={key:2,class:"klineBasic-error"},It=$e(()=>e.createElementVNode("div",{class:"klineBasic-error-content"},"加载失败,请刷新重试",-1)),Ot={style:{"text-align":"center"}},Bt=$e(()=>e.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),Vt={class:"dialog-footer"},Lt={__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(t,{expose:d,emit:i}){const h=[{label:"画线预警",key:"drawWarningLine"}];let o=null,l=null,M,T,f=!1,b=!1;const k=i,p=t,g=e.ref(!1),$=e.ref(!1),D=e.ref(null),W=e.ref(null),I=e.ref("VOL"),H=e.ref(0),B=e.ref({}),Z=e.ref([]),E=e.ref({}),j=e.ref(!1),V=e.ref(""),K=e.ref([...h]),U=e.computed(()=>({defaultShowCounts:500,addCounts:2e3,maxShowCounts:5e3,loadCheckCounts:500,showSubChart:!0,gridTop:48,gridLeft:80,gridRight:50,showWarningLine:!0,getFactorData:!0,...p.config}));e.watch(()=>{var n,s;return[p.variety,p.cycle,p.mainIndicator,I.value,(n=p.indicatorStore)==null?void 0:n.filterIndicator,(s=p.indicatorStore)==null?void 0:s.customIndicator]},()=>{Y()},{deep:!0}),e.onMounted(()=>{it(p.env),Y()}),e.onUnmounted(()=>{l==null||l.off("datazoom"),l==null||l.off("highlight"),l==null||l.off("globalout"),l==null||l.dispose(),o==null||o.dispose()});const X=()=>{l||(l=me.init(D.value),P(),U.value.showSubChart&&W.value.connect(l),o=ne.D(D.value),o.listen(()=>{requestAnimationFrame(()=>{l.resize()})}))},P=()=>{l==null||l.on("datazoom",s=>{clearTimeout(T),T=setTimeout(()=>{var y,S,_,C;const{loadCheckCounts:v}=U.value;if((S=(y=l==null?void 0:l.getOption())==null?void 0:y.dataZoom)!=null&&S[0]){const{startValue:A}=(C=(_=l==null?void 0:l.getOption())==null?void 0:_.dataZoom)==null?void 0:C[0];A<v&&f===!1&&b===!1&&(f=!0,G("history")),x()}clearTimeout(T)},100)}),l==null||l.on("highlight",s=>{var y,S;let v=s.dataIndex||-1;s.batch&&(v=typeof((y=s==null?void 0:s.batch[0])==null?void 0:y.dataIndex)=="number"?(S=s==null?void 0:s.batch[0])==null?void 0:S.dataIndex:-1),clearTimeout(M),M=setTimeout(()=>{H.value=v,clearTimeout(M)},20)}),l==null||l.on("globalout",()=>{var v,y,S;const s=(S=(y=(v=l==null?void 0:l.getOption())==null?void 0:v.dataZoom)==null?void 0:y[0])==null?void 0:S.endValue;H.value=s});let n=null;l==null||l.on("contextmenu",s=>{n=setTimeout(()=>{s.componentType==="graphic"&&(E.value=s.info,K.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout(n),n=null})})},Y=async()=>{var n,s,v,y,S,_;try{if(!p.variety||!p.cycle)return;const{variety:C,featureId:A,cycle:q,indicatorStore:O,mainIndicator:F,right:J,startTime:Q,endTime:z}=p,{defaultShowCounts:ee,addCounts:L,showWarningLine:ce,getFactorData:ie}=U.value,te={variety:C,featureId:A,cycle:q,mainIndicatorList:O.getIndicatorParams(F),subIndicator:I.value,right:J,showWarningLine:ce,getFactorData:ie};Q&&z?(te.startTime=Q,te.endTime=z):Q?(te.startTime=Q,te.limit=ee+L):z?(te.endTime=z,te.limit=ee+L):(te.endTime=N().add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),te.limit=ee+L);const oe=await ut(te);if((v=(s=(n=oe==null?void 0:oe.body)==null?void 0:n.kline)==null?void 0:s.time)!=null&&v.length)g.value=!1,$.value=!1;else{g.value=!0,$.value=!1;return}B.value=(y=oe==null?void 0:oe.body)==null?void 0:y.kline,Z.value=((S=oe==null?void 0:oe.body)==null?void 0:S.warningLine)||[],ae(),x(),ie&&k("getFactorData",(_=oe==null?void 0:oe.body)==null?void 0:_.factor)}catch(C){throw $.value=!0,g.value=!1,new Error(C)}},G=async n=>{const{variety:s,cycle:v,indicatorStore:y,mainIndicator:S,right:_}=p,{addCounts:C}=U.value,{time:A}=B.value;if(n==="history"){const q=await ct({variety:s,cycle:v,endTime:A[0],limit:C,mainIndicatorList:y.getIndicatorParams(S),subIndicator:I.value,right:_});B.value={time:[...q.body.time,...B.value.time.slice(1)],data:[...q.body.data,...B.value.data.slice(1)],mainIndicator:B.value.mainIndicator.map((O,F)=>({...O,data:[...q.body.mainIndicator[F].data,...O.data.slice(1)]})),subIndicator:B.value.subIndicator.map((O,F)=>({...O,data:[...q.body.subIndicator[F].data,...O.data.slice(1)]}))},ae(!0),q.body.data.length<C&&(b=!0),f=!1}},ae=(n=!1)=>{var F,J,Q;X();const{time:s}=B.value,{gridRight:v,gridLeft:y,defaultShowCounts:S,maxShowCounts:_,showSubChart:C}=U.value;let A=s.length-1-S,q=s.length-1;if(n){const z=l.getOption(),ee=(J=(F=z==null?void 0:z.xAxis)==null?void 0:F[0])==null?void 0:J.data,L=(Q=z==null?void 0:z.dataZoom)==null?void 0:Q[0],ce=ee[L==null?void 0:L.startValue],ie=ee[L==null?void 0:L.endValue];A=s.findIndex(te=>te===ce),q=s.findIndex(te=>te===ie)}const O=mt(B.value,U.value,A,q,p.cycle);if(l.setOption(O,!0),H.value=q,p.brushRange){let z=null,ee=null;switch(p.cycle){case"6":{z=s.find(L=>new Date(L).getTime()>=new Date(p.brushRange[0]).getTime()||N(L).format("YYYY-MM-DD")===N(p.brushRange[0]).format("YYYY-MM-DD")),ee=s.findLast(L=>new Date(L).getTime()<=new Date(p.brushRange[1]).getTime()||N(L).format("YYYY-MM-DD")===N(p.brushRange[1]).format("YYYY-MM-DD"));break}case"7":{z=s.find(L=>N(L).day(5).format("YYYY-MM-DD")===N(p.brushRange[0]).day(5).format("YYYY-MM-DD")),ee=s.findLast(L=>N(L).day(5).format("YYYY-MM-DD")===N(p.brushRange[1]).day(5).format("YYYY-MM-DD"));break}case"8":{z=s.find(L=>N(L).endOf("month").format("YYYY-MM-DD")===N(p.brushRange[0]).endOf("month").format("YYYY-MM-DD")),ee=s.findLast(L=>N(L).endOf("month").format("YYYY-MM-DD")===N(p.brushRange[1]).endOf("month").format("YYYY-MM-DD"));break}default:z=s.find(L=>new Date(L).getTime()>=new Date(p.brushRange[0]).getTime()),ee=s.findLast(L=>new Date(L).getTime()<=new Date(p.brushRange[1]).getTime())}console.log(z,ee),l.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[z,ee],xAxisIndex:0}]})}C&&W.value.draw({startValue:A,endValue:q,maxValueSpan:_},{gridLeft:y,gridRight:v}),r()},x=()=>{if(!l)return;const n=l==null?void 0:l.getOption();n&&(l==null||l.setOption({...n,graphic:[...vt(l,Z.value,p,U.value,()=>{a()})]},!0),r())},r=()=>{const{time:n}=B.value;if(p.brushRange&&(n!=null&&n.length)){let s=N(p.brushRange[0]).format("YYYY-MM-DD 00:00:00"),v=N(p.brushRange[1]).format("YYYY-MM-DD 23:59:59"),y=null,S=null;switch(p.cycle){case"6":{y=n.find(_=>N(_).format("YYYY-MM-DD")===N(s).format("YYYY-MM-DD")),S=y;break}case"7":{y=n.find(_=>N(_).day(5).format("YYYY-MM-DD")===N(s).day(5).format("YYYY-MM-DD")),S=n.findLast(_=>N(_).day(5).format("YYYY-MM-DD")===N(v).day(5).format("YYYY-MM-DD"));break}case"8":{y=n.find(_=>N(_).endOf("month").format("YYYY-MM-DD")===N(s).endOf("month").format("YYYY-MM-DD")),S=n.findLast(_=>N(_).endOf("month").format("YYYY-MM-DD")===N(v).endOf("month").format("YYYY-MM-DD"));break}default:y=n.find(_=>{const C=N(_).format("YYYY-MM-DD")===N(s).format("YYYY-MM-DD"),A=new Date(_).getTime()>=new Date(s).getTime();return C&&A}),S=n.findLast(_=>{const C=N(_).format("YYYY-MM-DD")===N(v).format("YYYY-MM-DD"),A=new Date(_).getTime()<=new Date(v).getTime();return C&&A})}l.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[y,S],xAxisIndex:0}]})}},a=async()=>{const n=await ft({featureId:p.featureId});Z.value=(n==null?void 0:n.body)||[],x(),k("change","warningLine",Z.value)},u=async n=>{const{variety:s,varietyName:v,featureId:y,featureType:S}=p;if(n.key==="drawWarningLine"){const _=l==null?void 0:l.getOption(),C=_.tooltip[0];l==null||l.setOption({..._,tooltip:{...C,axisPointer:{...C.axisPointer,lineStyle:{width:0},crossStyle:{width:2},label:{...C.axisPointer.label,backgroundColor:"transparent",formatter:q=>""}}}});const A=async q=>{l==null||l.getZr().off("mousedown",A);const O=l==null?void 0:l.convertFromPixel({yAxisIndex:0},q.offsetY),F=Math.round(O*1e3)/1e3;l==null||l.setOption({..._,tooltip:{...C,axisPointer:{...C.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...C.axisPointer.label,backgroundColor:null}}}}),await dt({featureCode:s,featureName:v,featureId:y,featureType:S,warnPrice:F}),ue.ElMessage.success("画线预警成功!"),a()};l==null||l.getZr().on("mousedown",A)}else n.key==="deleteWarningLine"?(await pt({id:E.value.id}),ue.ElMessage.success("画线预警删除成功"),a()):n.key==="changeWarningLine"&&(j.value=!0,V.value=E.value.warnPrice)},c=async()=>{const{variety:n,varietyName:s,featureId:v,featureType:y}=p;await Te({id:E.value.id,featureCode:n,featureName:s,featureId:v,featureType:y,warnPrice:V.value}),ue.ElMessage.success("画线预警修改成功"),a()},m=()=>{K.value=[...h]};return d({draw:(n,s)=>{n==="warningLine"&&(Z.value=s,x())}}),(n,s)=>{var q;const v=lt,y=st,S=Ye.ElEmpty,_=xe.ElButton,C=Ee.ElInputNumber,A=be.ElDialog;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Dt,[e.createElementVNode("div",Et,[e.createVNode(xt,{data:B.value,activeIndex:H.value},null,8,["data","activeIndex"])]),e.createElementVNode("div",{class:"klineBasic-main",style:e.normalizeStyle({height:U.value.showSubChart?"70%":"100%"})},[e.createVNode($t,{onCloseContextMenuCallBack:m},{popover:e.withCtx(()=>[e.createVNode(y,{style:{borderRadius:"4px",overflow:"hidden",background:"#fff",borderRight:0}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(K.value,O=>(e.openBlock(),e.createBlock(v,{style:{height:"36px"},key:O.key,index:O.key,onClick:F=>u(O)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"klineBasicMainRef",ref:D,style:{height:"100%"}},null,512)]),_:1})],4),U.value.showSubChart?(e.openBlock(),e.createElementBlock("div",Yt,[e.createVNode(St,{ref_key:"klineSubRef",ref:W,modelValue:I.value,"onUpdate:modelValue":s[0]||(s[0]=O=>I.value=O),data:B.value,cycle:t.cycle,activeIndex:H.value,subIndicatorList:(q=t.indicatorStore)==null?void 0:q.subIndicatorList},null,8,["modelValue","data","cycle","activeIndex","subIndicatorList"])])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("div",Ct,[e.createVNode(S,{class:"klineBasic-empty-content",description:"暂无数据"})])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("div",Nt,[It,e.createElementVNode("div",Ot,[e.createVNode(_,{onClick:Y},{default:e.withCtx(()=>[e.createTextVNode("刷新")]),_:1})])])):e.createCommentVNode("",!0)]),e.createVNode(A,{modelValue:j.value,"onUpdate:modelValue":s[3]||(s[3]=O=>j.value=O),title:"画线预警-修改价格",width:"30%","align-center":""},{footer:e.withCtx(()=>[e.createElementVNode("span",Vt,[e.createVNode(_,{onClick:s[2]||(s[2]=O=>j.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(_,{type:"primary",onClick:c},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})])]),default:e.withCtx(()=>[Bt,e.createVNode(C,{modelValue:V.value,"onUpdate:modelValue":s[1]||(s[1]=O=>V.value=O),placeholder:"输入预警价格"},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},Pt=le._export_sfc(Lt,[["__scopeId","data-v-95b8303f"]]),At={install(t){t.component("st-klineBasic",Pt)}};module.exports=At;
|