create-ssnode-cli 0.1.0 → 0.2.0

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.
Files changed (65) hide show
  1. package/README.md +1 -2
  2. package/index.js +0 -1
  3. package/package.json +2 -2
  4. package/templates/backend/package.json +1 -1
  5. package/templates/backend/scripts/build.cjs +67 -1
  6. package/templates/root/AGENTS.md +1 -1
  7. package/templates/root/README.md +6 -6
  8. package/templates/web/dist/assets/{404-f80ef771.js → 404-63aa5037.js} +1 -1
  9. package/templates/web/dist/assets/{404-legacy-3002ee98.js → 404-legacy-494c4093.js} +1 -1
  10. package/templates/web/dist/assets/{AuthLayout-f07f2dff.js → AuthLayout-07e9f5d2.js} +1 -1
  11. package/templates/web/dist/assets/{AuthLayout-legacy-635887dd.js → AuthLayout-legacy-1b94749f.js} +1 -1
  12. package/templates/web/dist/assets/Background-13406ae6.js +1 -0
  13. package/templates/web/dist/assets/Background-90a49ee7.css +1 -0
  14. package/templates/web/dist/assets/Background-legacy-35ca5eef.js +1 -0
  15. package/templates/web/dist/assets/{Screen-2126fd8d.js → Screen-4310b270.js} +1 -1
  16. package/templates/web/dist/assets/{Screen-legacy-e1974f1b.js → Screen-legacy-d5f1a31f.js} +1 -1
  17. package/templates/web/dist/assets/{ScreenChartOption-cc9d0192.js → ScreenChartOption-a6927065.js} +1 -1
  18. package/templates/web/dist/assets/{ScreenChartOption-legacy-b1b2d49d.js → ScreenChartOption-legacy-b4c04ce9.js} +1 -1
  19. package/templates/web/dist/assets/{api-21ca288f.js → api-83561db2.js} +1 -1
  20. package/templates/web/dist/assets/{api-legacy-b464070b.js → api-legacy-8e15c853.js} +1 -1
  21. package/templates/web/dist/assets/{base-8cbac341.js → base-5bf689c3.js} +1 -1
  22. package/templates/web/dist/assets/{base-legacy-ee9fb316.js → base-legacy-d3323277.js} +1 -1
  23. package/templates/web/dist/assets/{child-10cea360.js → child-87a05c88.js} +1 -1
  24. package/templates/web/dist/assets/{child-legacy-5af47aba.js → child-legacy-d4d0277d.js} +1 -1
  25. package/templates/web/dist/assets/{component-ae0df581.js → component-1fcd971d.js} +1 -1
  26. package/templates/web/dist/assets/{component-legacy-7824b5dc.js → component-legacy-943364e8.js} +1 -1
  27. package/templates/web/dist/assets/{demo-1b5e36be.js → demo-14e7532b.js} +1 -1
  28. package/templates/web/dist/assets/{demo-legacy-e12d2ac9.js → demo-legacy-da0d2bfa.js} +1 -1
  29. package/templates/web/dist/assets/{echarts-vendor-fdb2c14f.js → echarts-vendor-d6ce4b9c.js} +1 -1
  30. package/templates/web/dist/assets/{echarts-vendor-legacy-e99e5121.js → echarts-vendor-legacy-79597af6.js} +1 -1
  31. package/templates/web/dist/assets/{grandson-d5883b90.js → grandson-4f840b4d.js} +1 -1
  32. package/templates/web/dist/assets/{grandson-legacy-10cd2476.js → grandson-legacy-527ae016.js} +1 -1
  33. package/templates/web/dist/assets/{index-9fbd51da.js → index-268d1ac1.js} +1 -1
  34. package/templates/web/dist/assets/{index-5dbcad00.js → index-3448ef35.js} +1 -1
  35. package/templates/web/dist/assets/{index-6faaa6d8.js → index-3a2983ce.js} +1 -1
  36. package/templates/web/dist/assets/{index-25ea283a.js → index-5e7dfdb5.js} +1 -1
  37. package/templates/web/dist/assets/{index-16f6b85c.js → index-71f600d4.js} +1 -1
  38. package/templates/web/dist/assets/{index-687d6cfe.js → index-9120f091.js} +1 -1
  39. package/templates/web/dist/assets/{index-3a9a0a97.js → index-af61b79b.js} +1 -1
  40. package/templates/web/dist/assets/{index-fbf4ee3f.js → index-b75948c0.js} +1 -1
  41. package/templates/web/dist/assets/{index-5dbae75a.js → index-c1ee2fb3.js} +1 -1
  42. package/templates/web/dist/assets/{index-8f6fba9f.js → index-e03d0352.js} +1 -1
  43. package/templates/web/dist/assets/{index-2e42b180.js → index-e4c9d42a.js} +1 -1
  44. package/templates/web/dist/assets/{index-463d9205.js → index-f57c9694.js} +1 -1
  45. package/templates/web/dist/assets/{index-legacy-07d00151.js → index-legacy-06643c96.js} +1 -1
  46. package/templates/web/dist/assets/{index-legacy-ced5a7f1.js → index-legacy-081b881d.js} +1 -1
  47. package/templates/web/dist/assets/{index-legacy-e9af81d8.js → index-legacy-0983aa0f.js} +1 -1
  48. package/templates/web/dist/assets/{index-legacy-38c170dc.js → index-legacy-19a8ac10.js} +1 -1
  49. package/templates/web/dist/assets/{index-legacy-9be704da.js → index-legacy-35c1de97.js} +1 -1
  50. package/templates/web/dist/assets/{index-legacy-3d221bb6.js → index-legacy-376a4633.js} +1 -1
  51. package/templates/web/dist/assets/{index-legacy-0f01787c.js → index-legacy-3a393896.js} +1 -1
  52. package/templates/web/dist/assets/{index-legacy-ba034322.js → index-legacy-548904e6.js} +1 -1
  53. package/templates/web/dist/assets/{index-legacy-f3e49a4e.js → index-legacy-5f22daba.js} +1 -1
  54. package/templates/web/dist/assets/{index-legacy-dd62c9e7.js → index-legacy-8bba1715.js} +1 -1
  55. package/templates/web/dist/assets/{index-legacy-8c7d1ee7.js → index-legacy-aebba3cb.js} +1 -1
  56. package/templates/web/dist/assets/{index-legacy-95da3338.js → index-legacy-b03d819e.js} +1 -1
  57. package/templates/web/dist/assets/{parent-e7114c1b.js → parent-ad02830b.js} +1 -1
  58. package/templates/web/dist/assets/{parent-legacy-9e493d04.js → parent-legacy-163f567f.js} +1 -1
  59. package/templates/web/dist/assets/{vendor-e7ea3a11.js → vendor-2663c204.js} +13 -13
  60. package/templates/web/dist/assets/{vendor-legacy-a62a28c9.js → vendor-legacy-2df23db3.js} +6 -6
  61. package/templates/web/dist/index.html +3 -3
  62. package/templates/web/src/layouts/Background.module.less +5 -3
  63. package/templates/web/dist/assets/Background-63ce83a2.js +0 -1
  64. package/templates/web/dist/assets/Background-b264d337.css +0 -1
  65. package/templates/web/dist/assets/Background-legacy-a34b521f.js +0 -1
@@ -1 +1 @@
1
- System.register(["./vendor-legacy-a62a28c9.js","./echarts-vendor-legacy-e99e5121.js"],(function(t,e){"use strict";var r,n,o,a,s,c,l,i,u,d,f,h,g,p,b,m,S;return{setters:[t=>{r=t.r,n=t.j},t=>{o=t.u,a=t.i,s=t.a,c=t.b,l=t.c,i=t.d,u=t.e,d=t.f,f=t.g,h=t.h,g=t.j,p=t.k,b=t.l,m=t.m,S=t.n}],execute:function(){t("B",v),o([a,s,c,l,i,u,d,f,h,g,p,b,m]);const e={text:"操作处理中...",showSpinner:!1,textColor:"#9d9d9d",maskColor:"transparent",fontSize:"25px",fontWeight:"bold",fontFamily:"SourceHanSansCN"};function v(t){const{onLoad:o,chartOption:a,className:s,style:c,onEvents:l,chartOptionDeps:i,loading:u,onInit:d}=t,f=r.useRef(),h=r.useRef();return r.useEffect((()=>{const t=S(f.current);h.current=t,d?.(t),l&&l.forEach((e=>{t.on(e.eventName,(r=>{e.eventCallback?.(r,t)}))}));const e=new ResizeObserver((()=>{t.resize()}));return e.observe(f.current),o?.(),()=>{e.disconnect(),t.dispose()}}),[]),r.useEffect((()=>{h.current&&(h.current.off(),l&&l.forEach((t=>{h.current.on(t.eventName,(e=>{t.eventCallback?.(e,h.current)}))})))}),[l]),r.useEffect((()=>{u?h.current.showLoading(e):h.current.hideLoading()}),[u]),r.useEffect((()=>a?(a.dataset&&(Array.isArray(a.dataset)?a.dataset.forEach((t=>{t.source||(t.source=[])})):a.dataset.source||(a.dataset.source=[])),h.current.setOption(a),()=>{h.current.clear()}):()=>{}),i),n.jsx("div",{className:s,style:{height:"100%",width:"100%",...c},ref:f})}v.defaultProps={chartOption:null,style:null,className:null,onLoad:null,onEvents:null,chartOptionDeps:null,loading:!1,onInit:null};const M=Object.freeze(Object.defineProperty({__proto__:null,DefaultLoadingOptions:e,HighlightHexColor:function(t,e=.2){const r=t.replace(/^#/,""),n=parseInt(r.slice(0,2),16)/255,o=parseInt(r.slice(2,4),16)/255,a=parseInt(r.slice(4,6),16)/255,s=Math.max(n,o,a),c=Math.min(n,o,a);let l,i,u=(s+c)/2;if(s===c)l=i=0;else{const t=s-c;switch(i=u>.5?t/(2-s-c):t/(s+c),s){case n:l=(o-a)/t+(o<a?6:0);break;case o:l=(a-n)/t+2;break;case a:l=(n-o)/t+4}l/=6}u=Math.min(1,u+.4);const d=u<.5?u*(1+i):u+i-u*i,f=2*u-d,h=t=>(t<0&&(t+=1),t>1&&(t-=1),t<1/6?f+6*(d-f)*t:t<.5?d:t<2/3?f+(d-f)*(2/3-t)*6:f),g=Math.round(255*h(l+1/3)),p=Math.round(255*h(l)),b=Math.round(255*h(l-1/3));return`#${[g.toString(16).padStart(2,"0"),p.toString(16).padStart(2,"0"),b.toString(16).padStart(2,"0")].join("")}`},MixHexColor:function(t,e=.2){const r=(n=t,{r:parseInt(n.slice(1,3),16),g:parseInt(n.slice(3,5),16),b:parseInt(n.slice(5,7),16)});var n;const o=(c=e,{r:(a=r).r+((s={r:255,g:255,b:255}).r-a.r)*c,g:a.g+(s.g-a.g)*c,b:a.b+(s.b-a.b)*c});var a,s,c;return((t,e,r)=>{const n=t=>t.toString(16).padStart(2,"0");return`#${n(t)}${n(e)}${n(r)}`})(o.r,o.g,o.b)},RandomHexColor:function(){const t=Math.floor(256*Math.random()),e=Math.floor(256*Math.random()),r=Math.floor(256*Math.random()),n=t=>{const e=t.toString(16);return 1===e.length?`0${e}`:e};return`#${n(t)}${n(e)}${n(r)}`},default:v},Symbol.toStringTag,{value:"Module"}));t("_",M)}}}));
1
+ System.register(["./vendor-legacy-2df23db3.js","./echarts-vendor-legacy-79597af6.js"],(function(t,e){"use strict";var r,n,o,a,s,c,l,i,u,d,f,h,g,p,b,m,S;return{setters:[t=>{r=t.r,n=t.j},t=>{o=t.u,a=t.i,s=t.a,c=t.b,l=t.c,i=t.d,u=t.e,d=t.f,f=t.g,h=t.h,g=t.j,p=t.k,b=t.l,m=t.m,S=t.n}],execute:function(){t("B",v),o([a,s,c,l,i,u,d,f,h,g,p,b,m]);const e={text:"操作处理中...",showSpinner:!1,textColor:"#9d9d9d",maskColor:"transparent",fontSize:"25px",fontWeight:"bold",fontFamily:"SourceHanSansCN"};function v(t){const{onLoad:o,chartOption:a,className:s,style:c,onEvents:l,chartOptionDeps:i,loading:u,onInit:d}=t,f=r.useRef(),h=r.useRef();return r.useEffect((()=>{const t=S(f.current);h.current=t,d?.(t),l&&l.forEach((e=>{t.on(e.eventName,(r=>{e.eventCallback?.(r,t)}))}));const e=new ResizeObserver((()=>{t.resize()}));return e.observe(f.current),o?.(),()=>{e.disconnect(),t.dispose()}}),[]),r.useEffect((()=>{h.current&&(h.current.off(),l&&l.forEach((t=>{h.current.on(t.eventName,(e=>{t.eventCallback?.(e,h.current)}))})))}),[l]),r.useEffect((()=>{u?h.current.showLoading(e):h.current.hideLoading()}),[u]),r.useEffect((()=>a?(a.dataset&&(Array.isArray(a.dataset)?a.dataset.forEach((t=>{t.source||(t.source=[])})):a.dataset.source||(a.dataset.source=[])),h.current.setOption(a),()=>{h.current.clear()}):()=>{}),i),n.jsx("div",{className:s,style:{height:"100%",width:"100%",...c},ref:f})}v.defaultProps={chartOption:null,style:null,className:null,onLoad:null,onEvents:null,chartOptionDeps:null,loading:!1,onInit:null};const M=Object.freeze(Object.defineProperty({__proto__:null,DefaultLoadingOptions:e,HighlightHexColor:function(t,e=.2){const r=t.replace(/^#/,""),n=parseInt(r.slice(0,2),16)/255,o=parseInt(r.slice(2,4),16)/255,a=parseInt(r.slice(4,6),16)/255,s=Math.max(n,o,a),c=Math.min(n,o,a);let l,i,u=(s+c)/2;if(s===c)l=i=0;else{const t=s-c;switch(i=u>.5?t/(2-s-c):t/(s+c),s){case n:l=(o-a)/t+(o<a?6:0);break;case o:l=(a-n)/t+2;break;case a:l=(n-o)/t+4}l/=6}u=Math.min(1,u+.4);const d=u<.5?u*(1+i):u+i-u*i,f=2*u-d,h=t=>(t<0&&(t+=1),t>1&&(t-=1),t<1/6?f+6*(d-f)*t:t<.5?d:t<2/3?f+(d-f)*(2/3-t)*6:f),g=Math.round(255*h(l+1/3)),p=Math.round(255*h(l)),b=Math.round(255*h(l-1/3));return`#${[g.toString(16).padStart(2,"0"),p.toString(16).padStart(2,"0"),b.toString(16).padStart(2,"0")].join("")}`},MixHexColor:function(t,e=.2){const r=(n=t,{r:parseInt(n.slice(1,3),16),g:parseInt(n.slice(3,5),16),b:parseInt(n.slice(5,7),16)});var n;const o=(c=e,{r:(a=r).r+((s={r:255,g:255,b:255}).r-a.r)*c,g:a.g+(s.g-a.g)*c,b:a.b+(s.b-a.b)*c});var a,s,c;return((t,e,r)=>{const n=t=>t.toString(16).padStart(2,"0");return`#${n(t)}${n(e)}${n(r)}`})(o.r,o.g,o.b)},RandomHexColor:function(){const t=Math.floor(256*Math.random()),e=Math.floor(256*Math.random()),r=Math.floor(256*Math.random()),n=t=>{const e=t.toString(16);return 1===e.length?`0${e}`:e};return`#${n(t)}${n(e)}${n(r)}`},default:v},Symbol.toStringTag,{value:"Module"}));t("_",M)}}}));
@@ -1 +1 @@
1
- import{j as s,O as r}from"./vendor-e7ea3a11.js";function n(t){return s.jsxs("div",{children:[s.jsx("span",{children:"二级页面"}),s.jsx(r,{})]})}export{n as default};
1
+ import{j as s,O as r}from"./vendor-2663c204.js";function n(t){return s.jsxs("div",{children:[s.jsx("span",{children:"二级页面"}),s.jsx(r,{})]})}export{n as default};
@@ -1 +1 @@
1
- System.register(["./vendor-legacy-a62a28c9.js"],(function(e,t){"use strict";var n,r;return{setters:[e=>{n=e.j,r=e.O}],execute:function(){e("default",(function(e){return n.jsxs("div",{children:[n.jsx("span",{children:"二级页面"}),n.jsx(r,{})]})}))}}}));
1
+ System.register(["./vendor-legacy-2df23db3.js"],(function(e,t){"use strict";var n,r;return{setters:[e=>{n=e.j,r=e.O}],execute:function(){e("default",(function(e){return n.jsxs("div",{children:[n.jsx("span",{children:"二级页面"}),n.jsx(r,{})]})}))}}}));
@@ -1 +1 @@
1
- import{_ as i}from"./base-8cbac341.js";import{_}from"./index-5dbae75a.js";import{_ as m}from"./index-463d9205.js";import{r,j as o}from"./vendor-e7ea3a11.js";import{P as d}from"./index-2e42b180.js";import"./echarts-vendor-fdb2c14f.js";const p="_background_1dv22_10",x="_block_1dv22_19",u="_name_1dv22_25",n={background:p,block:x,name:u},c=Object.assign({"../../components/Chart/base.tsx":i,"../../components/FlowLight/index.tsx":_,"../../components/ImagePreview/index.tsx":m});function k(){const[e,a]=r.useState();return r.useEffect(()=>{const s=[];Object.keys(c).forEach(t=>{const l=c[t].default;s.push({url:t,c:o.jsx(l,{style:{width:350}})})}),a(s)},[]),o.jsxs("div",{className:n.background,children:[o.jsxs("h2",{style:{margin:0},children:[d.title," - 目录"]}),o.jsxs("h4",{style:{margin:"15px 0px 0px"},children:["版本号:","v1.0.0"]}),e==null?void 0:e.map((s,t)=>o.jsxs("div",{className:n.block,children:[o.jsxs("span",{className:n.name,children:["【",t+1,"】 ,",s.url]}),s.c]},s.url))]})}export{k as default};
1
+ import{_ as i}from"./base-5bf689c3.js";import{_}from"./index-c1ee2fb3.js";import{_ as m}from"./index-f57c9694.js";import{r,j as o}from"./vendor-2663c204.js";import{P as d}from"./index-e4c9d42a.js";import"./echarts-vendor-d6ce4b9c.js";const p="_background_1dv22_10",x="_block_1dv22_19",u="_name_1dv22_25",n={background:p,block:x,name:u},c=Object.assign({"../../components/Chart/base.tsx":i,"../../components/FlowLight/index.tsx":_,"../../components/ImagePreview/index.tsx":m});function k(){const[e,a]=r.useState();return r.useEffect(()=>{const s=[];Object.keys(c).forEach(t=>{const l=c[t].default;s.push({url:t,c:o.jsx(l,{style:{width:350}})})}),a(s)},[]),o.jsxs("div",{className:n.background,children:[o.jsxs("h2",{style:{margin:0},children:[d.title," - 目录"]}),o.jsxs("h4",{style:{margin:"15px 0px 0px"},children:["版本号:","v1.0.0"]}),e==null?void 0:e.map((s,t)=>o.jsxs("div",{className:n.block,children:[o.jsxs("span",{className:n.name,children:["【",t+1,"】 ,",s.url]}),s.c]},s.url))]})}export{k as default};
@@ -1 +1 @@
1
- System.register(["./base-legacy-ee9fb316.js","./index-legacy-38c170dc.js","./index-legacy-f3e49a4e.js","./vendor-legacy-a62a28c9.js","./index-legacy-8c7d1ee7.js","./echarts-vendor-legacy-e99e5121.js"],(function(e,n){"use strict";var s,t,a,c,o,l;return{setters:[e=>{s=e._},e=>{t=e._},e=>{a=e._},e=>{c=e.r,o=e.j},e=>{l=e.P},null],execute:function(){var n=document.createElement("style");n.textContent="._background_1dv22_10{padding:30px;display:flex;flex-direction:column;flex-wrap:wrap;background-color:#042c57;color:#fff;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}._background_1dv22_10 ._block_1dv22_19{display:flex;flex-direction:column;margin-bottom:20px;padding:10px}._background_1dv22_10 ._block_1dv22_19 ._name_1dv22_25{font-size:14px;color:#fff;margin-bottom:8px}\n",document.head.appendChild(n),e("default",(function(){const[e,n]=c.useState();return c.useEffect((()=>{const e=[];Object.keys(r).forEach((n=>{const s=r[n].default;e.push({url:n,c:o.jsx(s,{style:{width:350}})})})),n(e)}),[]),o.jsxs("div",{className:d.background,children:[o.jsxs("h2",{style:{margin:0},children:[l.title," - 目录"]}),o.jsxs("h4",{style:{margin:"15px 0px 0px"},children:["版本号:","v1.0.0"]}),e?.map(((e,n)=>o.jsxs("div",{className:d.block,children:[o.jsxs("span",{className:d.name,children:["【",n+1,"】 ,",e.url]}),e.c]},e.url)))]})}));const d={background:"_background_1dv22_10",block:"_block_1dv22_19",name:"_name_1dv22_25"},r=Object.assign({"../../components/Chart/base.tsx":s,"../../components/FlowLight/index.tsx":t,"../../components/ImagePreview/index.tsx":a})}}}));
1
+ System.register(["./base-legacy-d3323277.js","./index-legacy-19a8ac10.js","./index-legacy-5f22daba.js","./vendor-legacy-2df23db3.js","./index-legacy-aebba3cb.js","./echarts-vendor-legacy-79597af6.js"],(function(e,n){"use strict";var s,t,a,c,o,l;return{setters:[e=>{s=e._},e=>{t=e._},e=>{a=e._},e=>{c=e.r,o=e.j},e=>{l=e.P},null],execute:function(){var n=document.createElement("style");n.textContent="._background_1dv22_10{padding:30px;display:flex;flex-direction:column;flex-wrap:wrap;background-color:#042c57;color:#fff;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}._background_1dv22_10 ._block_1dv22_19{display:flex;flex-direction:column;margin-bottom:20px;padding:10px}._background_1dv22_10 ._block_1dv22_19 ._name_1dv22_25{font-size:14px;color:#fff;margin-bottom:8px}\n",document.head.appendChild(n),e("default",(function(){const[e,n]=c.useState();return c.useEffect((()=>{const e=[];Object.keys(r).forEach((n=>{const s=r[n].default;e.push({url:n,c:o.jsx(s,{style:{width:350}})})})),n(e)}),[]),o.jsxs("div",{className:d.background,children:[o.jsxs("h2",{style:{margin:0},children:[l.title," - 目录"]}),o.jsxs("h4",{style:{margin:"15px 0px 0px"},children:["版本号:","v1.0.0"]}),e?.map(((e,n)=>o.jsxs("div",{className:d.block,children:[o.jsxs("span",{className:d.name,children:["【",n+1,"】 ,",e.url]}),e.c]},e.url)))]})}));const d={background:"_background_1dv22_10",block:"_block_1dv22_19",name:"_name_1dv22_25"},r=Object.assign({"../../components/Chart/base.tsx":s,"../../components/FlowLight/index.tsx":t,"../../components/ImagePreview/index.tsx":a})}}}));
@@ -1 +1 @@
1
- import{r as P,n as O,j as m,T as _,a4 as G,$ as K,I as q,a5 as H,l as j,a6 as z}from"./vendor-e7ea3a11.js";import{B as J}from"./base-8cbac341.js";import{L as X}from"./echarts-vendor-fdb2c14f.js";import{S as Q}from"./ScreenChartOption-cc9d0192.js";import U from"./index-8f6fba9f.js";const Z="_editrow_1936a_10",ee={editrow:Z};function te(e){const{dataIndex:t,style:i,record:o,index:s,className:a,colSpan:n,rowSpan:r,children:x,editable:c,isEditing:A,editType:R="text",editRender:w,editSelectProps:p,editInputNumberProps:C,editInputProps:D,editDatePickerProps:B,editFormItemProps:W={}}=e,[Y,L]=P.useState(A),$=O.useFormInstance(),d=Array.isArray(t)?t.concat(s).join("."):"".concat(t,".").concat(s),u=()=>{L(!1)},F=()=>{L(!0),$.getFieldValue(d)===void 0&&$.setFieldValue("".concat(t,".").concat(s),o[t])};let g=null;switch(R){case"number":g=m.jsx(H,{...C});break;case"text":g=m.jsx(q,{autoFocus:!0,...D,onBlur:()=>{A||u()},onPressEnter:()=>{A||u()}});break;case"select":g=m.jsx(K,{...p});break;case"datepicker":g=m.jsx(G,{...B});break;case"custom":g=w==null?void 0:w(o[t],o);break}return P.useEffect(()=>{L(A)},[A]),m.jsxs("td",{className:a,colSpan:n,rowSpan:r,style:i,children:[Y&&m.jsx(O.Item,{name:d,style:{margin:0},...W,children:g}),!Y&&c&&m.jsx("div",{className:ee.editrow,onClick:()=>{F()},children:$.getFieldValue(d)!==void 0?$.getFieldValue(d):x}),!Y&&!c&&x]})}function ie(e){const{columns:t,dataSource:i,loadData:o,lazyLoadData:s=!1,currentTime:a,mock:n,editable:r,editFormProps:x}=e,[c,A]=P.useState({list:i,total:i==null?void 0:i.length}),[R,w]=P.useState(!1),p=P.useRef({current:1,pageSize:10}),[C]=O.useForm(),[D,B]=P.useState(),W=d=>d===D,Y=(d=50)=>{const u=[],F=(T=[])=>{const S=[];return T.forEach(l=>{if(l.children){const y=F(l.children);S.push(...y)}else S.push(l.dataIndex)}),S},g=F(t);for(let T=0;T<d;T++){const S={};g.forEach(l=>{if(typeof l=="string")S[l]=(Math.random()*100).toFixed(2);else if(Array.isArray(l)){const y=(v=[],E=0,V={})=>{if(E===l.length-1)V[v[E]]=(Math.random()*100).toFixed(2);else{const N=V[v[E]]||{};V[v[E]]=N,y(v,E+1,N)}};y(l,0,S)}}),S.time=a||j().subtract(T,"d").format("YYYY-MM-DD"),S.timeMonth=a||j().subtract(T,"d").format("YYYY-MM"),u.push(S)}return u},L=(d=!1)=>{o?(w(!0),d&&(p.current.current=1),o(p.current.current,p.current.pageSize).then(u=>{w(!1),A({list:u.data,total:u.total})}).catch(()=>{w(!1)})):n&&(w(!0),setTimeout(()=>{w(!1);const u=Y(p.current.pageSize);A({list:u,total:u.length})},500))};if(P.useEffect(()=>{(o&&!s||n)&&L()},[a]),delete e.dataSource,delete e.loadData,r){const d=l=>{C.setFieldsValue({...l}),B(l)},u=()=>{B(null)},F=()=>{C.resetFields()},g=()=>C.getFieldsValue(),T=t.map(l=>l.editable?{...l,onCell:(y,v)=>{var E;return{...(E=l.onCell)==null?void 0:E.call(l,y,v),record:y,dataIndex:l.dataIndex,index:v,editable:typeof l.editable=="function"?l.editable(y,v):l.editable,isEditing:l.isEditing!==void 0?l.isEditing:W(y),editType:l.editType||"text",editFormItemProps:l.editFormItemProps,editRender:l.editRender,editDatePickerProps:l.editDatePickerProps,editSelectProps:l.editSelectProps,editInputNumberProps:l.editInputNumberProps,editInputProps:l.editInputProps}}}:l);return delete e.columns,{element:m.jsx(O,{form:C,component:!1,...x,children:m.jsx(_,{components:{body:{cell:te}},bordered:!0,dataSource:i||(c==null?void 0:c.list),columns:T,scroll:{x:"max-content"},pagination:{showTotal:l=>"共".concat(l,"条"),showSizeChanger:!0,current:p.current.current,pageSize:p.current.pageSize,onShowSizeChange:(l,y)=>{p.current={current:l,pageSize:y},L()},onChange:u},...e})}),reload:L,startEdit:d,endEdit:u,submitEdit:g,resetEdit:F}}return{element:m.jsx(_,{dataSource:i||(c==null?void 0:c.list),scroll:{x:"max-content"},bordered:!0,loading:R,pagination:{showTotal:d=>"共".concat(d,"条"),total:c==null?void 0:c.total,showSizeChanger:!0,defaultCurrent:p.current.current,defaultPageSize:p.current.pageSize,onChange:(d,u)=>{p.current={current:d,pageSize:u},L()}},...e}),reload:L}}const b="#999999",k="#194a87",f="#404040",I="#999999",M="#194a87",h="#404040";function oe(e){const t=[];for(let s=0;s<12;s++)t.push({type:"".concat(s+1,"月"),value:200*Math.random()});const i={dimensions:["type","value"],source:t},o={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!1},grid:{left:"0%",right:"0%",bottom:"0px",top:"50px",containLabel:!0,z:22},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:I}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:M},alignWithLabel:!0},axisLabel:{color:h,fontSize:14,margin:10}},yAxis:{name:"单位:%",nameTextStyle:{color:h},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},series:{name:"数值",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{barBorderRadius:[20,20,0,0],color:new X(0,1,0,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])}},showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}},dataset:i};return z.merge(o,e),o}function ne(e=["demo"],t){const i=[];for(let n=0;n<12;n++)i.push({type:"".concat(n+1,"月"),...e.reduce((r,x,c)=>(r[x]=(200*Math.random()*(c%2===1?1:-1)).toFixed(2),r),{})});const o={dimensions:["type",...e],source:i},s={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!1},grid:{left:"0%",right:"0%",bottom:"0px",top:"50px",containLabel:!0,z:22},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:I}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:M},alignWithLabel:!0},axisLabel:{textStyle:{color:h},fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:h},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},series:[],dataset:o},a=e.map(n=>({name:n,type:"bar",xAxisIndex:0,yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}}));return s.series=a,z.merge(s,t),s}function le(e){const t={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!1},grid:{left:40,right:20,bottom:"0px",top:0,containLabel:!0,z:22},xAxis:{name:"单位:%",nameTextStyle:{color:h},splitLine:{show:!0},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{color:f,fontSize:14,margin:10}},yAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:I}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:M},alignWithLabel:!0},axisLabel:{color:h,fontSize:14,margin:10}},series:{name:"",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{borderRadius:[0,20,20,0],color:new X(0,0,1,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])},showBackground:!0,backgroundStyle:{borderRadius:[0,20,20,0],color:"#e9ebf7"}}};if(z.merge(t,e),!t.dataset){let i=[];const o=["a","b","c","d","e"];o==null||o.forEach(s=>{i.push({type:s,value:(Math.random()*100).toFixed(2)})}),i.length===0&&(i=[{type:"克州",value:20},{type:"乌鲁木齐",value:30},{type:"超高压",value:80},{type:"昌吉",value:22},{type:"吐鲁番",value:20},{type:"奎屯",value:30},{type:"博尔塔拉",value:26},{type:"哈密",value:28}]),t.dataset={dimensions:["type","value"],source:i}}return t}const ae=(e,t)=>{const i={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!0},grid:{left:10,right:0,bottom:0,top:30,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:I}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:M},alignWithLabel:!0},axisLabel:{color:h,fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:h},splitLine:{show:!0},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{color:f,fontSize:14,margin:10}},series:[],animation:!0},o=[];if(e.forEach(s=>{o.push({name:s,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:10,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})}),i.series=o,z.merge(i,t),!i.dataset){const s=[];for(let a=0;a<10;a++){const n={time:j().subtract(a,"d").format("YYYY-MM-DD")};e.forEach(r=>{n[r]=Math.random()*100}),s.push(n)}i.dataset={dimensions:["time",...e],source:s}}return i};function se(e=["预测误差","预测波动"],t={}){const i=["#ffba00","#2759a4","#ff7e00","#6fbd6b","#50abdf","#7181d0","#ac77ce"],o={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}},alwaysShowContent:!0,formatter:s=>{const[{data:a={},dimensionNames:n=[]}]=s;return"".concat(a.name,"<br /><span>").concat(e[0],":").concat(a[n[0]],"<br />").concat(e[1],":").concat(a[n[1]])}},legend:{show:!1},grid:{left:50,right:80,bottom:30,top:30,containLabel:!0},xAxis:{name:e[0],splitLine:{show:!1},axisLine:{lineStyle:{color:I},symbol:["none","arrow"]},axisTick:{show:!1},axisLabel:{show:!1}},yAxis:{name:e[1],nameTextStyle:{color:h},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b},symbol:["none","arrow"]},axisTick:{show:!1},axisLabel:{show:!1}},series:{name:"",type:"scatter",symbol:"circle",symbolSize:20,label:{show:!0,position:"top"},itemStyle:{color(s){let a=s.dataIndex;return a>=6&&(a-=6),i[a]}}}};return z.merge(o,t),o.dataset||(o.dataset={dimensions:["均方误差","平均绝对误差"],source:[{name:"专家修正",平均绝对误差:2.349,均方误差:2.333},{name:"智能AI算法",平均绝对误差:3.333,均方误差:2.333},{name:"自回归移动平均模型",平均绝对误差:4.333,均方误差:5.333}]}),o}function re(e){const t={title:{text:"",left:"center",top:"53%",padding:[24,0]},series:{name:"",type:"pie",radius:["40%","60%"],hoverAnimation:!1,label:{formatter:(i,o,s)=>{const{percent:a}=i;return"{black|".concat(i.name,"} {yellow|").concat(i.value,"} {blue|").concat(a,"%}")},padding:[0,-60],height:50,rich:{black:{color:"#333",align:"right",fontSize:14,padding:[4,0],borderColor:"red",marginBottom:"-10px"},yellow:{color:"#ffc72b",fontSize:16,padding:[5,4],align:"center"},blue:{color:"#28c9db",fontSize:14,align:"center",marginRight:"-100px"}}},labelLine:{showAbove:!0,length:60,length2:60,maxSurfaceAngle:0,lineStyle:{color:"#0b5263"}}}};return z.merge(t,e),t.series.data||(t.series.data=[{value:260,name:"测试1"},{value:103,name:"测试2"}]),t}function ce(e=["容量","同期","上一周期"],t=["同比","环比","占总比重"],i={}){const o={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:I}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:M},alignWithLabel:!0},axisLabel:{color:h,fontSize:14,margin:10}},yAxis:[{name:"单位:万户",nameTextStyle:{color:h},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{color:f,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:h},min:-10,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{color:f,fontSize:14,margin:10}}],animation:!0,series:[]},s=[];if(e.forEach(a=>{s.push({name:a,type:"bar",yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}})}),t.forEach(a=>{s.push({name:a,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:10,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})}),o.series=s,z.merge(o,i),!o.dataset){const a=[];for(let n=0;n<10;n++){const r={time:j().subtract(n,"M").format("YYYY/MM")};e.forEach(x=>{r[x]=(Math.random()*500).toFixed(2)}),t.forEach(x=>{r[x]=(Math.random()*100).toFixed(2)}),a.push(r)}o.dataset={dimensions:["time",...e,...t],source:a}}return o}function de(e=["10kV以下","10kV及以上"],t=["10kV及以上所占比重"],i){const o=[];for(let r=0;r<10;r++){const x={time:j().subtract(r,"M").format("YYYY/MM")};e.forEach(c=>{x[c]=(Math.random()*500).toFixed(2)}),t.forEach(c=>{x[c]=(Math.random()*100).toFixed(2)}),o.push(x)}const s={dimensions:["time",...e,...t],source:o},a={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:I}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:M},alignWithLabel:!0},axisLabel:{textStyle:{color:h},fontSize:14,margin:10}},yAxis:[{name:"单位:万户",nameTextStyle:{color:f},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:f},min:-10,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}}],animation:!0,series:[],dataset:s},n=[];return e.forEach(r=>{n.push({name:r,type:"bar",barWidth:"30%",yAxisIndex:0,stack:!0})}),t.forEach(r=>{n.push({name:r,yAxisIndex:1,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:10,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})}),a.series=n,z.merge(a,i),a}function ue(e,t){const i=[{name:"智能AI算法",value:[1.45,1.96]},{name:"专家修正",value:[2.39,3.81]},{name:"XGBoost",value:[3.84,4.26]}],o=function(){let n=0;return e.forEach(r=>{n+=r.value[0]}),(n/e.length).toFixed(2)},s=function(){let n=0;return e.forEach(r=>{n+=r.value[1]}),(n/e.length).toFixed(2)},a={title:{text:""},grid:{left:"10px",right:"100px",bottom:0,top:"30px",containLabel:!0},tooltip:{trigger:"item",axisPointer:{show:!0,type:"cross",lineStyle:{type:"dashed",width:1}},formatter(n){if(n.componentType=="series")return'<div style="border-bottom: 1px solid rgba(255,255,255,.3); font-size: 18px;padding-bottom: 7px;margin-bottom: 7px">'.concat(n.name,"</div><span>预测误差</span> : ").concat(n.data.value[0],"<br/><span>预测波动</span> : ").concat(n.data.value[1])}},xAxis:{name:"预测误差",type:"value",scale:!0,splitLine:{show:!1},axisLine:{lineStyle:{color:I}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:M},alignWithLabel:!0},axisLabel:{textStyle:{color:h},fontSize:14,margin:10}},yAxis:{name:"预测波动",nameTextStyle:{color:f},type:"value",scale:!0,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},series:[{type:"scatter",data:e||i,symbolSize:20,markLine:{label:{normal:{formatter(n){return n.name}}},lineStyle:{normal:{color:"#626c91",type:"solid",width:1},emphasis:{color:"#d9def7"}},data:[{xAxis:o(),name:"预测误差平均水平",label:{color:"red"}},{yAxis:s(),name:"预测波动平均水平",label:{color:"red"}}]}}]};return z.merge(a,t),a}const me=Object.freeze(Object.defineProperty({__proto__:null,getBarAndLineOption:ce,getBarStackAndLineOption:de,getBaseBarChartOption:oe,getBaseBarRollbackChartOption:le,getLineChartOption:ae,getMultiBarChartOption:ne,getPieChartOption:re,getScatterChartOption:se,getScatterPlotOption:ue},Symbol.toStringTag,{value:"Module"})),xe={BackgroundChart:me,ScreenChart:Q},he=xe;function be(e){const t=()=>[{title:"时间",dataIndex:"time"},{title:"数据1",dataIndex:"value1"},{title:"数据2",dataIndex:"value2"},{title:"数据3",dataIndex:"value3"},{title:"数据4",dataIndex:"value4"}],{element:i}=ie({columns:t(),mock:!0});return m.jsxs("div",{children:[m.jsx(U,{}),m.jsx("h3",{children:"折线图配置"}),m.jsx(J,{style:{height:200},chartOption:he.BackgroundChart.getLineChartOption(["农业","工业","商业","渔业"])}),m.jsx("h3",{children:"表格示例"}),i]})}export{be as default};
1
+ import{r as P,n as O,j as m,T as _,a4 as G,$ as K,I as q,a5 as H,l as j,a6 as z}from"./vendor-2663c204.js";import{B as J}from"./base-5bf689c3.js";import{L as X}from"./echarts-vendor-d6ce4b9c.js";import{S as Q}from"./ScreenChartOption-a6927065.js";import U from"./index-e03d0352.js";const Z="_editrow_1936a_10",ee={editrow:Z};function te(e){const{dataIndex:t,style:i,record:o,index:s,className:a,colSpan:n,rowSpan:r,children:x,editable:c,isEditing:A,editType:R="text",editRender:w,editSelectProps:p,editInputNumberProps:C,editInputProps:D,editDatePickerProps:B,editFormItemProps:W={}}=e,[Y,L]=P.useState(A),$=O.useFormInstance(),d=Array.isArray(t)?t.concat(s).join("."):"".concat(t,".").concat(s),u=()=>{L(!1)},F=()=>{L(!0),$.getFieldValue(d)===void 0&&$.setFieldValue("".concat(t,".").concat(s),o[t])};let g=null;switch(R){case"number":g=m.jsx(H,{...C});break;case"text":g=m.jsx(q,{autoFocus:!0,...D,onBlur:()=>{A||u()},onPressEnter:()=>{A||u()}});break;case"select":g=m.jsx(K,{...p});break;case"datepicker":g=m.jsx(G,{...B});break;case"custom":g=w==null?void 0:w(o[t],o);break}return P.useEffect(()=>{L(A)},[A]),m.jsxs("td",{className:a,colSpan:n,rowSpan:r,style:i,children:[Y&&m.jsx(O.Item,{name:d,style:{margin:0},...W,children:g}),!Y&&c&&m.jsx("div",{className:ee.editrow,onClick:()=>{F()},children:$.getFieldValue(d)!==void 0?$.getFieldValue(d):x}),!Y&&!c&&x]})}function ie(e){const{columns:t,dataSource:i,loadData:o,lazyLoadData:s=!1,currentTime:a,mock:n,editable:r,editFormProps:x}=e,[c,A]=P.useState({list:i,total:i==null?void 0:i.length}),[R,w]=P.useState(!1),p=P.useRef({current:1,pageSize:10}),[C]=O.useForm(),[D,B]=P.useState(),W=d=>d===D,Y=(d=50)=>{const u=[],F=(T=[])=>{const S=[];return T.forEach(l=>{if(l.children){const y=F(l.children);S.push(...y)}else S.push(l.dataIndex)}),S},g=F(t);for(let T=0;T<d;T++){const S={};g.forEach(l=>{if(typeof l=="string")S[l]=(Math.random()*100).toFixed(2);else if(Array.isArray(l)){const y=(v=[],E=0,V={})=>{if(E===l.length-1)V[v[E]]=(Math.random()*100).toFixed(2);else{const N=V[v[E]]||{};V[v[E]]=N,y(v,E+1,N)}};y(l,0,S)}}),S.time=a||j().subtract(T,"d").format("YYYY-MM-DD"),S.timeMonth=a||j().subtract(T,"d").format("YYYY-MM"),u.push(S)}return u},L=(d=!1)=>{o?(w(!0),d&&(p.current.current=1),o(p.current.current,p.current.pageSize).then(u=>{w(!1),A({list:u.data,total:u.total})}).catch(()=>{w(!1)})):n&&(w(!0),setTimeout(()=>{w(!1);const u=Y(p.current.pageSize);A({list:u,total:u.length})},500))};if(P.useEffect(()=>{(o&&!s||n)&&L()},[a]),delete e.dataSource,delete e.loadData,r){const d=l=>{C.setFieldsValue({...l}),B(l)},u=()=>{B(null)},F=()=>{C.resetFields()},g=()=>C.getFieldsValue(),T=t.map(l=>l.editable?{...l,onCell:(y,v)=>{var E;return{...(E=l.onCell)==null?void 0:E.call(l,y,v),record:y,dataIndex:l.dataIndex,index:v,editable:typeof l.editable=="function"?l.editable(y,v):l.editable,isEditing:l.isEditing!==void 0?l.isEditing:W(y),editType:l.editType||"text",editFormItemProps:l.editFormItemProps,editRender:l.editRender,editDatePickerProps:l.editDatePickerProps,editSelectProps:l.editSelectProps,editInputNumberProps:l.editInputNumberProps,editInputProps:l.editInputProps}}}:l);return delete e.columns,{element:m.jsx(O,{form:C,component:!1,...x,children:m.jsx(_,{components:{body:{cell:te}},bordered:!0,dataSource:i||(c==null?void 0:c.list),columns:T,scroll:{x:"max-content"},pagination:{showTotal:l=>"共".concat(l,"条"),showSizeChanger:!0,current:p.current.current,pageSize:p.current.pageSize,onShowSizeChange:(l,y)=>{p.current={current:l,pageSize:y},L()},onChange:u},...e})}),reload:L,startEdit:d,endEdit:u,submitEdit:g,resetEdit:F}}return{element:m.jsx(_,{dataSource:i||(c==null?void 0:c.list),scroll:{x:"max-content"},bordered:!0,loading:R,pagination:{showTotal:d=>"共".concat(d,"条"),total:c==null?void 0:c.total,showSizeChanger:!0,defaultCurrent:p.current.current,defaultPageSize:p.current.pageSize,onChange:(d,u)=>{p.current={current:d,pageSize:u},L()}},...e}),reload:L}}const b="#999999",k="#194a87",f="#404040",I="#999999",M="#194a87",h="#404040";function oe(e){const t=[];for(let s=0;s<12;s++)t.push({type:"".concat(s+1,"月"),value:200*Math.random()});const i={dimensions:["type","value"],source:t},o={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!1},grid:{left:"0%",right:"0%",bottom:"0px",top:"50px",containLabel:!0,z:22},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:I}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:M},alignWithLabel:!0},axisLabel:{color:h,fontSize:14,margin:10}},yAxis:{name:"单位:%",nameTextStyle:{color:h},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},series:{name:"数值",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{barBorderRadius:[20,20,0,0],color:new X(0,1,0,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])}},showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}},dataset:i};return z.merge(o,e),o}function ne(e=["demo"],t){const i=[];for(let n=0;n<12;n++)i.push({type:"".concat(n+1,"月"),...e.reduce((r,x,c)=>(r[x]=(200*Math.random()*(c%2===1?1:-1)).toFixed(2),r),{})});const o={dimensions:["type",...e],source:i},s={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!1},grid:{left:"0%",right:"0%",bottom:"0px",top:"50px",containLabel:!0,z:22},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:I}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:M},alignWithLabel:!0},axisLabel:{textStyle:{color:h},fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:h},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},series:[],dataset:o},a=e.map(n=>({name:n,type:"bar",xAxisIndex:0,yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}}));return s.series=a,z.merge(s,t),s}function le(e){const t={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!1},grid:{left:40,right:20,bottom:"0px",top:0,containLabel:!0,z:22},xAxis:{name:"单位:%",nameTextStyle:{color:h},splitLine:{show:!0},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{color:f,fontSize:14,margin:10}},yAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:I}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:M},alignWithLabel:!0},axisLabel:{color:h,fontSize:14,margin:10}},series:{name:"",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{borderRadius:[0,20,20,0],color:new X(0,0,1,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])},showBackground:!0,backgroundStyle:{borderRadius:[0,20,20,0],color:"#e9ebf7"}}};if(z.merge(t,e),!t.dataset){let i=[];const o=["a","b","c","d","e"];o==null||o.forEach(s=>{i.push({type:s,value:(Math.random()*100).toFixed(2)})}),i.length===0&&(i=[{type:"克州",value:20},{type:"乌鲁木齐",value:30},{type:"超高压",value:80},{type:"昌吉",value:22},{type:"吐鲁番",value:20},{type:"奎屯",value:30},{type:"博尔塔拉",value:26},{type:"哈密",value:28}]),t.dataset={dimensions:["type","value"],source:i}}return t}const ae=(e,t)=>{const i={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!0},grid:{left:10,right:0,bottom:0,top:30,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:I}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:M},alignWithLabel:!0},axisLabel:{color:h,fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:h},splitLine:{show:!0},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{color:f,fontSize:14,margin:10}},series:[],animation:!0},o=[];if(e.forEach(s=>{o.push({name:s,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:10,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})}),i.series=o,z.merge(i,t),!i.dataset){const s=[];for(let a=0;a<10;a++){const n={time:j().subtract(a,"d").format("YYYY-MM-DD")};e.forEach(r=>{n[r]=Math.random()*100}),s.push(n)}i.dataset={dimensions:["time",...e],source:s}}return i};function se(e=["预测误差","预测波动"],t={}){const i=["#ffba00","#2759a4","#ff7e00","#6fbd6b","#50abdf","#7181d0","#ac77ce"],o={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}},alwaysShowContent:!0,formatter:s=>{const[{data:a={},dimensionNames:n=[]}]=s;return"".concat(a.name,"<br /><span>").concat(e[0],":").concat(a[n[0]],"<br />").concat(e[1],":").concat(a[n[1]])}},legend:{show:!1},grid:{left:50,right:80,bottom:30,top:30,containLabel:!0},xAxis:{name:e[0],splitLine:{show:!1},axisLine:{lineStyle:{color:I},symbol:["none","arrow"]},axisTick:{show:!1},axisLabel:{show:!1}},yAxis:{name:e[1],nameTextStyle:{color:h},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b},symbol:["none","arrow"]},axisTick:{show:!1},axisLabel:{show:!1}},series:{name:"",type:"scatter",symbol:"circle",symbolSize:20,label:{show:!0,position:"top"},itemStyle:{color(s){let a=s.dataIndex;return a>=6&&(a-=6),i[a]}}}};return z.merge(o,t),o.dataset||(o.dataset={dimensions:["均方误差","平均绝对误差"],source:[{name:"专家修正",平均绝对误差:2.349,均方误差:2.333},{name:"智能AI算法",平均绝对误差:3.333,均方误差:2.333},{name:"自回归移动平均模型",平均绝对误差:4.333,均方误差:5.333}]}),o}function re(e){const t={title:{text:"",left:"center",top:"53%",padding:[24,0]},series:{name:"",type:"pie",radius:["40%","60%"],hoverAnimation:!1,label:{formatter:(i,o,s)=>{const{percent:a}=i;return"{black|".concat(i.name,"} {yellow|").concat(i.value,"} {blue|").concat(a,"%}")},padding:[0,-60],height:50,rich:{black:{color:"#333",align:"right",fontSize:14,padding:[4,0],borderColor:"red",marginBottom:"-10px"},yellow:{color:"#ffc72b",fontSize:16,padding:[5,4],align:"center"},blue:{color:"#28c9db",fontSize:14,align:"center",marginRight:"-100px"}}},labelLine:{showAbove:!0,length:60,length2:60,maxSurfaceAngle:0,lineStyle:{color:"#0b5263"}}}};return z.merge(t,e),t.series.data||(t.series.data=[{value:260,name:"测试1"},{value:103,name:"测试2"}]),t}function ce(e=["容量","同期","上一周期"],t=["同比","环比","占总比重"],i={}){const o={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:I}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:M},alignWithLabel:!0},axisLabel:{color:h,fontSize:14,margin:10}},yAxis:[{name:"单位:万户",nameTextStyle:{color:h},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{color:f,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:h},min:-10,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{color:f,fontSize:14,margin:10}}],animation:!0,series:[]},s=[];if(e.forEach(a=>{s.push({name:a,type:"bar",yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}})}),t.forEach(a=>{s.push({name:a,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:10,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})}),o.series=s,z.merge(o,i),!o.dataset){const a=[];for(let n=0;n<10;n++){const r={time:j().subtract(n,"M").format("YYYY/MM")};e.forEach(x=>{r[x]=(Math.random()*500).toFixed(2)}),t.forEach(x=>{r[x]=(Math.random()*100).toFixed(2)}),a.push(r)}o.dataset={dimensions:["time",...e,...t],source:a}}return o}function de(e=["10kV以下","10kV及以上"],t=["10kV及以上所占比重"],i){const o=[];for(let r=0;r<10;r++){const x={time:j().subtract(r,"M").format("YYYY/MM")};e.forEach(c=>{x[c]=(Math.random()*500).toFixed(2)}),t.forEach(c=>{x[c]=(Math.random()*100).toFixed(2)}),o.push(x)}const s={dimensions:["time",...e,...t],source:o},a={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:I}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:M},alignWithLabel:!0},axisLabel:{textStyle:{color:h},fontSize:14,margin:10}},yAxis:[{name:"单位:万户",nameTextStyle:{color:f},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:f},min:-10,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}}],animation:!0,series:[],dataset:s},n=[];return e.forEach(r=>{n.push({name:r,type:"bar",barWidth:"30%",yAxisIndex:0,stack:!0})}),t.forEach(r=>{n.push({name:r,yAxisIndex:1,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:10,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})}),a.series=n,z.merge(a,i),a}function ue(e,t){const i=[{name:"智能AI算法",value:[1.45,1.96]},{name:"专家修正",value:[2.39,3.81]},{name:"XGBoost",value:[3.84,4.26]}],o=function(){let n=0;return e.forEach(r=>{n+=r.value[0]}),(n/e.length).toFixed(2)},s=function(){let n=0;return e.forEach(r=>{n+=r.value[1]}),(n/e.length).toFixed(2)},a={title:{text:""},grid:{left:"10px",right:"100px",bottom:0,top:"30px",containLabel:!0},tooltip:{trigger:"item",axisPointer:{show:!0,type:"cross",lineStyle:{type:"dashed",width:1}},formatter(n){if(n.componentType=="series")return'<div style="border-bottom: 1px solid rgba(255,255,255,.3); font-size: 18px;padding-bottom: 7px;margin-bottom: 7px">'.concat(n.name,"</div><span>预测误差</span> : ").concat(n.data.value[0],"<br/><span>预测波动</span> : ").concat(n.data.value[1])}},xAxis:{name:"预测误差",type:"value",scale:!0,splitLine:{show:!1},axisLine:{lineStyle:{color:I}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:M},alignWithLabel:!0},axisLabel:{textStyle:{color:h},fontSize:14,margin:10}},yAxis:{name:"预测波动",nameTextStyle:{color:f},type:"value",scale:!0,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:b}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:k}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},series:[{type:"scatter",data:e||i,symbolSize:20,markLine:{label:{normal:{formatter(n){return n.name}}},lineStyle:{normal:{color:"#626c91",type:"solid",width:1},emphasis:{color:"#d9def7"}},data:[{xAxis:o(),name:"预测误差平均水平",label:{color:"red"}},{yAxis:s(),name:"预测波动平均水平",label:{color:"red"}}]}}]};return z.merge(a,t),a}const me=Object.freeze(Object.defineProperty({__proto__:null,getBarAndLineOption:ce,getBarStackAndLineOption:de,getBaseBarChartOption:oe,getBaseBarRollbackChartOption:le,getLineChartOption:ae,getMultiBarChartOption:ne,getPieChartOption:re,getScatterChartOption:se,getScatterPlotOption:ue},Symbol.toStringTag,{value:"Module"})),xe={BackgroundChart:me,ScreenChart:Q},he=xe;function be(e){const t=()=>[{title:"时间",dataIndex:"time"},{title:"数据1",dataIndex:"value1"},{title:"数据2",dataIndex:"value2"},{title:"数据3",dataIndex:"value3"},{title:"数据4",dataIndex:"value4"}],{element:i}=ie({columns:t(),mock:!0});return m.jsxs("div",{children:[m.jsx(U,{}),m.jsx("h3",{children:"折线图配置"}),m.jsx(J,{style:{height:200},chartOption:he.BackgroundChart.getLineChartOption(["农业","工业","商业","渔业"])}),m.jsx("h3",{children:"表格示例"}),i]})}export{be as default};
@@ -1 +1 @@
1
- System.register(["./vendor-legacy-a62a28c9.js","./base-legacy-ee9fb316.js","./echarts-vendor-legacy-e99e5121.js","./ScreenChartOption-legacy-b1b2d49d.js","./index-legacy-07d00151.js"],(function(e,t){"use strict";var o,i,n,a,l,r,s,c,d,h,x,m,p,y;return{setters:[e=>{o=e.r,i=e.n,n=e.j,a=e.T,l=e.a4,r=e.$,s=e.I,c=e.a5,d=e.l,h=e.a6},e=>{x=e.B},e=>{m=e.L},e=>{p=e.S},e=>{y=e.default}],execute:function(){var t=document.createElement("style");t.textContent="._editrow_1936a_10{cursor:pointer;width:100%;min-height:20px;display:inline-block;border-radius:2px}._editrow_1936a_10:hover{border:1px solid #d9d9d9}\n",document.head.appendChild(t),e("default",(function(e){const{element:t}=function(e){const{columns:t,dataSource:l,loadData:r,lazyLoadData:s=!1,currentTime:c,mock:h,editable:x,editFormProps:m}=e,[p,y]=o.useState({list:l,total:l?.length}),[u,S]=o.useState(!1),b=o.useRef({current:1,pageSize:10}),[f]=i.useForm(),[w,L]=o.useState(),k=e=>e===w,z=(e=50)=>{const o=[],i=(e=[])=>{const t=[];return e.forEach((e=>{if(e.children){const o=i(e.children);t.push(...o)}else t.push(e.dataIndex)})),t},n=i(t);for(let t=0;t<e;t++){const e={};n.forEach((t=>{if("string"==typeof t)e[t]=(100*Math.random()).toFixed(2);else if(Array.isArray(t)){const o=(e=[],i=0,n={})=>{if(i===t.length-1)n[e[i]]=(100*Math.random()).toFixed(2);else{const t=n[e[i]]||{};n[e[i]]=t,o(e,i+1,t)}};o(t,0,e)}})),e.time=c||d().subtract(t,"d").format("YYYY-MM-DD"),e.timeMonth=c||d().subtract(t,"d").format("YYYY-MM"),o.push(e)}return o},v=(e=!1)=>{r?(S(!0),e&&(b.current.current=1),r(b.current.current,b.current.pageSize).then((e=>{S(!1),y({list:e.data,total:e.total})})).catch((()=>{S(!1)}))):h&&(S(!0),setTimeout((()=>{S(!1);const e=z(b.current.pageSize);y({list:e,total:e.length})}),500))};if(o.useEffect((()=>{(r&&!s||h)&&v()}),[c]),delete e.dataSource,delete e.loadData,x){const o=e=>{f.setFieldsValue({...e}),L(e)},r=()=>{L(null)},s=()=>{f.resetFields()},c=()=>f.getFieldsValue(),d=t.map((e=>e.editable?{...e,onCell:(t,o)=>({...e.onCell?.(t,o),record:t,dataIndex:e.dataIndex,index:o,editable:"function"==typeof e.editable?e.editable(t,o):e.editable,isEditing:void 0!==e.isEditing?e.isEditing:k(t),editType:e.editType||"text",editFormItemProps:e.editFormItemProps,editRender:e.editRender,editDatePickerProps:e.editDatePickerProps,editSelectProps:e.editSelectProps,editInputNumberProps:e.editInputNumberProps,editInputProps:e.editInputProps})}:e));return delete e.columns,{element:n.jsx(i,{form:f,component:!1,...m,children:n.jsx(a,{components:{body:{cell:g}},bordered:!0,dataSource:l||p?.list,columns:d,scroll:{x:"max-content"},pagination:{showTotal:e=>`共${e}条`,showSizeChanger:!0,current:b.current.current,pageSize:b.current.pageSize,onShowSizeChange:(e,t)=>{b.current={current:e,pageSize:t},v()},onChange:r},...e})}),reload:v,startEdit:o,endEdit:r,submitEdit:c,resetEdit:s}}const A=n.jsx(a,{dataSource:l||p?.list,scroll:{x:"max-content"},bordered:!0,loading:u,pagination:{showTotal:e=>`共${e}条`,total:p?.total,showSizeChanger:!0,defaultCurrent:b.current.current,defaultPageSize:b.current.pageSize,onChange:(e,t)=>{b.current={current:e,pageSize:t},v()}},...e});return{element:A,reload:v}}({columns:[{title:"时间",dataIndex:"time"},{title:"数据1",dataIndex:"value1"},{title:"数据2",dataIndex:"value2"},{title:"数据3",dataIndex:"value3"},{title:"数据4",dataIndex:"value4"}],mock:!0});return n.jsxs("div",{children:[n.jsx(y,{}),n.jsx("h3",{children:"折线图配置"}),n.jsx(x,{style:{height:200},chartOption:z.BackgroundChart.getLineChartOption(["农业","工业","商业","渔业"])}),n.jsx("h3",{children:"表格示例"}),t]})}));const u={editrow:"_editrow_1936a_10"};function g(e){const{dataIndex:t,style:a,record:d,index:h,className:x,colSpan:m,rowSpan:p,children:y,editable:g,isEditing:S,editType:b="text",editRender:f,editSelectProps:w,editInputNumberProps:L,editInputProps:k,editDatePickerProps:z,editFormItemProps:v={}}=e,[A,T]=o.useState(S),I=i.useFormInstance(),P=Array.isArray(t)?t.concat(h).join("."):`${t}.${h}`,E=()=>{T(!1)};let M=null;switch(b){case"number":M=n.jsx(c,{...L});break;case"text":M=n.jsx(s,{autoFocus:!0,...k,onBlur:()=>{S||E()},onPressEnter:()=>{S||E()}});break;case"select":M=n.jsx(r,{...w});break;case"datepicker":M=n.jsx(l,{...z});break;case"custom":M=f?.(d[t],d)}return o.useEffect((()=>{T(S)}),[S]),n.jsxs("td",{className:x,colSpan:m,rowSpan:p,style:a,children:[A&&n.jsx(i.Item,{name:P,style:{margin:0},...v,children:M}),!A&&g&&n.jsx("div",{className:u.editrow,onClick:()=>{T(!0),void 0===I.getFieldValue(P)&&I.setFieldValue(`${t}.${h}`,d[t])},children:void 0!==I.getFieldValue(P)?I.getFieldValue(P):y}),!A&&!g&&y]})}const S="#999999",b="#194a87",f="#404040",w="#999999",L="#194a87",k="#404040",z={BackgroundChart:Object.freeze(Object.defineProperty({__proto__:null,getBarAndLineOption:function(e=["容量","同期","上一周期"],t=["同比","环比","占总比重"],o={}){const i={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:w}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:L},alignWithLabel:!0},axisLabel:{color:k,fontSize:14,margin:10}},yAxis:[{name:"单位:万户",nameTextStyle:{color:k},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{color:f,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:k},min:-10,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{color:f,fontSize:14,margin:10}}],animation:!0,series:[]},n=[];if(e.forEach((e=>{n.push({name:e,type:"bar",yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}})})),t.forEach((e=>{n.push({name:e,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:10,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})})),i.series=n,h.merge(i,o),!i.dataset){const o=[];for(let i=0;i<10;i++){const n={time:d().subtract(i,"M").format("YYYY/MM")};e.forEach((e=>{n[e]=(500*Math.random()).toFixed(2)})),t.forEach((e=>{n[e]=(100*Math.random()).toFixed(2)})),o.push(n)}i.dataset={dimensions:["time",...e,...t],source:o}}return i},getBarStackAndLineOption:function(e=["10kV以下","10kV及以上"],t=["10kV及以上所占比重"],o){const i=[];for(let r=0;r<10;r++){const o={time:d().subtract(r,"M").format("YYYY/MM")};e.forEach((e=>{o[e]=(500*Math.random()).toFixed(2)})),t.forEach((e=>{o[e]=(100*Math.random()).toFixed(2)})),i.push(o)}const n={dimensions:["time",...e,...t],source:i},a={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:w}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:L},alignWithLabel:!0},axisLabel:{textStyle:{color:k},fontSize:14,margin:10}},yAxis:[{name:"单位:万户",nameTextStyle:{color:f},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:f},min:-10,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}}],animation:!0,series:[],dataset:n},l=[];return e.forEach((e=>{l.push({name:e,type:"bar",barWidth:"30%",yAxisIndex:0,stack:!0})})),t.forEach((e=>{l.push({name:e,yAxisIndex:1,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:10,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})})),a.series=l,h.merge(a,o),a},getBaseBarChartOption:function(e){const t=[];for(let n=0;n<12;n++)t.push({type:`${n+1}月`,value:200*Math.random()});const o={dimensions:["type","value"],source:t},i={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!1},grid:{left:"0%",right:"0%",bottom:"0px",top:"50px",containLabel:!0,z:22},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:w}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:L},alignWithLabel:!0},axisLabel:{color:k,fontSize:14,margin:10}},yAxis:{name:"单位:%",nameTextStyle:{color:k},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},series:{name:"数值",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{barBorderRadius:[20,20,0,0],color:new m(0,1,0,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])}},showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}},dataset:o};return h.merge(i,e),i},getBaseBarRollbackChartOption:function(e){const t={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!1},grid:{left:40,right:20,bottom:"0px",top:0,containLabel:!0,z:22},xAxis:{name:"单位:%",nameTextStyle:{color:k},splitLine:{show:!0},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{color:f,fontSize:14,margin:10}},yAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:w}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:L},alignWithLabel:!0},axisLabel:{color:k,fontSize:14,margin:10}},series:{name:"",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{borderRadius:[0,20,20,0],color:new m(0,0,1,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])},showBackground:!0,backgroundStyle:{borderRadius:[0,20,20,0],color:"#e9ebf7"}}};if(h.merge(t,e),!t.dataset){let e=[];const o=["a","b","c","d","e"];o?.forEach((t=>{e.push({type:t,value:(100*Math.random()).toFixed(2)})})),0===e.length&&(e=[{type:"克州",value:20},{type:"乌鲁木齐",value:30},{type:"超高压",value:80},{type:"昌吉",value:22},{type:"吐鲁番",value:20},{type:"奎屯",value:30},{type:"博尔塔拉",value:26},{type:"哈密",value:28}]),t.dataset={dimensions:["type","value"],source:e}}return t},getLineChartOption:(e,t)=>{const o={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!0},grid:{left:10,right:0,bottom:0,top:30,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:w}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:L},alignWithLabel:!0},axisLabel:{color:k,fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:k},splitLine:{show:!0},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{color:f,fontSize:14,margin:10}},series:[],animation:!0},i=[];if(e.forEach((e=>{i.push({name:e,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:10,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})})),o.series=i,h.merge(o,t),!o.dataset){const t=[];for(let o=0;o<10;o++){const i={time:d().subtract(o,"d").format("YYYY-MM-DD")};e.forEach((e=>{i[e]=100*Math.random()})),t.push(i)}o.dataset={dimensions:["time",...e],source:t}}return o},getMultiBarChartOption:function(e=["demo"],t){const o=[];for(let l=0;l<12;l++)o.push({type:`${l+1}月`,...e.reduce(((e,t,o)=>(e[t]=(200*Math.random()*(o%2==1?1:-1)).toFixed(2),e)),{})});const i={dimensions:["type",...e],source:o},n={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!1},grid:{left:"0%",right:"0%",bottom:"0px",top:"50px",containLabel:!0,z:22},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:w}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:L},alignWithLabel:!0},axisLabel:{textStyle:{color:k},fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:k},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},series:[],dataset:i},a=e.map((e=>({name:e,type:"bar",xAxisIndex:0,yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}})));return n.series=a,h.merge(n,t),n},getPieChartOption:function(e){const t={title:{text:"",left:"center",top:"53%",padding:[24,0]},series:{name:"",type:"pie",radius:["40%","60%"],hoverAnimation:!1,label:{formatter:(e,t,o)=>{const{percent:i}=e;return`{black|${e.name}} {yellow|${e.value}} {blue|${i}%}`},padding:[0,-60],height:50,rich:{black:{color:"#333",align:"right",fontSize:14,padding:[4,0],borderColor:"red",marginBottom:"-10px"},yellow:{color:"#ffc72b",fontSize:16,padding:[5,4],align:"center"},blue:{color:"#28c9db",fontSize:14,align:"center",marginRight:"-100px"}}},labelLine:{showAbove:!0,length:60,length2:60,maxSurfaceAngle:0,lineStyle:{color:"#0b5263"}}}};return h.merge(t,e),t.series.data||(t.series.data=[{value:260,name:"测试1"},{value:103,name:"测试2"}]),t},getScatterChartOption:function(e=["预测误差","预测波动"],t={}){const o=["#ffba00","#2759a4","#ff7e00","#6fbd6b","#50abdf","#7181d0","#ac77ce"],i={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}},alwaysShowContent:!0,formatter:t=>{const[{data:o={},dimensionNames:i=[]}]=t;return`${o.name}<br /><span>${e[0]}:${o[i[0]]}<br />${e[1]}:${o[i[1]]}`}},legend:{show:!1},grid:{left:50,right:80,bottom:30,top:30,containLabel:!0},xAxis:{name:e[0],splitLine:{show:!1},axisLine:{lineStyle:{color:w},symbol:["none","arrow"]},axisTick:{show:!1},axisLabel:{show:!1}},yAxis:{name:e[1],nameTextStyle:{color:k},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S},symbol:["none","arrow"]},axisTick:{show:!1},axisLabel:{show:!1}},series:{name:"",type:"scatter",symbol:"circle",symbolSize:20,label:{show:!0,position:"top"},itemStyle:{color(e){let t=e.dataIndex;return t>=6&&(t-=6),o[t]}}}};return h.merge(i,t),i.dataset||(i.dataset={dimensions:["均方误差","平均绝对误差"],source:[{name:"专家修正","平均绝对误差":2.349,"均方误差":2.333},{name:"智能AI算法","平均绝对误差":3.333,"均方误差":2.333},{name:"自回归移动平均模型","平均绝对误差":4.333,"均方误差":5.333}]}),i},getScatterPlotOption:function(e,t){const o={title:{text:""},grid:{left:"10px",right:"100px",bottom:0,top:"30px",containLabel:!0},tooltip:{trigger:"item",axisPointer:{show:!0,type:"cross",lineStyle:{type:"dashed",width:1}},formatter(e){if("series"==e.componentType)return`<div style="border-bottom: 1px solid rgba(255,255,255,.3); font-size: 18px;padding-bottom: 7px;margin-bottom: 7px">${e.name}</div><span>预测误差</span> : ${e.data.value[0]}<br/><span>预测波动</span> : ${e.data.value[1]}`}},xAxis:{name:"预测误差",type:"value",scale:!0,splitLine:{show:!1},axisLine:{lineStyle:{color:w}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:L},alignWithLabel:!0},axisLabel:{textStyle:{color:k},fontSize:14,margin:10}},yAxis:{name:"预测波动",nameTextStyle:{color:f},type:"value",scale:!0,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},series:[{type:"scatter",data:e||[{name:"智能AI算法",value:[1.45,1.96]},{name:"专家修正",value:[2.39,3.81]},{name:"XGBoost",value:[3.84,4.26]}],symbolSize:20,markLine:{label:{normal:{formatter:e=>e.name}},lineStyle:{normal:{color:"#626c91",type:"solid",width:1},emphasis:{color:"#d9def7"}},data:[{xAxis:function(){let t=0;return e.forEach((e=>{t+=e.value[0]})),(t/e.length).toFixed(2)}(),name:"预测误差平均水平",label:{color:"red"}},{yAxis:function(){let t=0;return e.forEach((e=>{t+=e.value[1]})),(t/e.length).toFixed(2)}(),name:"预测波动平均水平",label:{color:"red"}}]}}]};return h.merge(o,t),o}},Symbol.toStringTag,{value:"Module"})),ScreenChart:p}}}}));
1
+ System.register(["./vendor-legacy-2df23db3.js","./base-legacy-d3323277.js","./echarts-vendor-legacy-79597af6.js","./ScreenChartOption-legacy-b4c04ce9.js","./index-legacy-06643c96.js"],(function(e,t){"use strict";var o,i,n,a,l,r,s,c,d,h,x,m,p,y;return{setters:[e=>{o=e.r,i=e.n,n=e.j,a=e.T,l=e.a4,r=e.$,s=e.I,c=e.a5,d=e.l,h=e.a6},e=>{x=e.B},e=>{m=e.L},e=>{p=e.S},e=>{y=e.default}],execute:function(){var t=document.createElement("style");t.textContent="._editrow_1936a_10{cursor:pointer;width:100%;min-height:20px;display:inline-block;border-radius:2px}._editrow_1936a_10:hover{border:1px solid #d9d9d9}\n",document.head.appendChild(t),e("default",(function(e){const{element:t}=function(e){const{columns:t,dataSource:l,loadData:r,lazyLoadData:s=!1,currentTime:c,mock:h,editable:x,editFormProps:m}=e,[p,y]=o.useState({list:l,total:l?.length}),[u,S]=o.useState(!1),b=o.useRef({current:1,pageSize:10}),[f]=i.useForm(),[w,L]=o.useState(),k=e=>e===w,z=(e=50)=>{const o=[],i=(e=[])=>{const t=[];return e.forEach((e=>{if(e.children){const o=i(e.children);t.push(...o)}else t.push(e.dataIndex)})),t},n=i(t);for(let t=0;t<e;t++){const e={};n.forEach((t=>{if("string"==typeof t)e[t]=(100*Math.random()).toFixed(2);else if(Array.isArray(t)){const o=(e=[],i=0,n={})=>{if(i===t.length-1)n[e[i]]=(100*Math.random()).toFixed(2);else{const t=n[e[i]]||{};n[e[i]]=t,o(e,i+1,t)}};o(t,0,e)}})),e.time=c||d().subtract(t,"d").format("YYYY-MM-DD"),e.timeMonth=c||d().subtract(t,"d").format("YYYY-MM"),o.push(e)}return o},v=(e=!1)=>{r?(S(!0),e&&(b.current.current=1),r(b.current.current,b.current.pageSize).then((e=>{S(!1),y({list:e.data,total:e.total})})).catch((()=>{S(!1)}))):h&&(S(!0),setTimeout((()=>{S(!1);const e=z(b.current.pageSize);y({list:e,total:e.length})}),500))};if(o.useEffect((()=>{(r&&!s||h)&&v()}),[c]),delete e.dataSource,delete e.loadData,x){const o=e=>{f.setFieldsValue({...e}),L(e)},r=()=>{L(null)},s=()=>{f.resetFields()},c=()=>f.getFieldsValue(),d=t.map((e=>e.editable?{...e,onCell:(t,o)=>({...e.onCell?.(t,o),record:t,dataIndex:e.dataIndex,index:o,editable:"function"==typeof e.editable?e.editable(t,o):e.editable,isEditing:void 0!==e.isEditing?e.isEditing:k(t),editType:e.editType||"text",editFormItemProps:e.editFormItemProps,editRender:e.editRender,editDatePickerProps:e.editDatePickerProps,editSelectProps:e.editSelectProps,editInputNumberProps:e.editInputNumberProps,editInputProps:e.editInputProps})}:e));return delete e.columns,{element:n.jsx(i,{form:f,component:!1,...m,children:n.jsx(a,{components:{body:{cell:g}},bordered:!0,dataSource:l||p?.list,columns:d,scroll:{x:"max-content"},pagination:{showTotal:e=>`共${e}条`,showSizeChanger:!0,current:b.current.current,pageSize:b.current.pageSize,onShowSizeChange:(e,t)=>{b.current={current:e,pageSize:t},v()},onChange:r},...e})}),reload:v,startEdit:o,endEdit:r,submitEdit:c,resetEdit:s}}const A=n.jsx(a,{dataSource:l||p?.list,scroll:{x:"max-content"},bordered:!0,loading:u,pagination:{showTotal:e=>`共${e}条`,total:p?.total,showSizeChanger:!0,defaultCurrent:b.current.current,defaultPageSize:b.current.pageSize,onChange:(e,t)=>{b.current={current:e,pageSize:t},v()}},...e});return{element:A,reload:v}}({columns:[{title:"时间",dataIndex:"time"},{title:"数据1",dataIndex:"value1"},{title:"数据2",dataIndex:"value2"},{title:"数据3",dataIndex:"value3"},{title:"数据4",dataIndex:"value4"}],mock:!0});return n.jsxs("div",{children:[n.jsx(y,{}),n.jsx("h3",{children:"折线图配置"}),n.jsx(x,{style:{height:200},chartOption:z.BackgroundChart.getLineChartOption(["农业","工业","商业","渔业"])}),n.jsx("h3",{children:"表格示例"}),t]})}));const u={editrow:"_editrow_1936a_10"};function g(e){const{dataIndex:t,style:a,record:d,index:h,className:x,colSpan:m,rowSpan:p,children:y,editable:g,isEditing:S,editType:b="text",editRender:f,editSelectProps:w,editInputNumberProps:L,editInputProps:k,editDatePickerProps:z,editFormItemProps:v={}}=e,[A,T]=o.useState(S),I=i.useFormInstance(),P=Array.isArray(t)?t.concat(h).join("."):`${t}.${h}`,E=()=>{T(!1)};let M=null;switch(b){case"number":M=n.jsx(c,{...L});break;case"text":M=n.jsx(s,{autoFocus:!0,...k,onBlur:()=>{S||E()},onPressEnter:()=>{S||E()}});break;case"select":M=n.jsx(r,{...w});break;case"datepicker":M=n.jsx(l,{...z});break;case"custom":M=f?.(d[t],d)}return o.useEffect((()=>{T(S)}),[S]),n.jsxs("td",{className:x,colSpan:m,rowSpan:p,style:a,children:[A&&n.jsx(i.Item,{name:P,style:{margin:0},...v,children:M}),!A&&g&&n.jsx("div",{className:u.editrow,onClick:()=>{T(!0),void 0===I.getFieldValue(P)&&I.setFieldValue(`${t}.${h}`,d[t])},children:void 0!==I.getFieldValue(P)?I.getFieldValue(P):y}),!A&&!g&&y]})}const S="#999999",b="#194a87",f="#404040",w="#999999",L="#194a87",k="#404040",z={BackgroundChart:Object.freeze(Object.defineProperty({__proto__:null,getBarAndLineOption:function(e=["容量","同期","上一周期"],t=["同比","环比","占总比重"],o={}){const i={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:w}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:L},alignWithLabel:!0},axisLabel:{color:k,fontSize:14,margin:10}},yAxis:[{name:"单位:万户",nameTextStyle:{color:k},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{color:f,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:k},min:-10,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{color:f,fontSize:14,margin:10}}],animation:!0,series:[]},n=[];if(e.forEach((e=>{n.push({name:e,type:"bar",yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}})})),t.forEach((e=>{n.push({name:e,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:10,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})})),i.series=n,h.merge(i,o),!i.dataset){const o=[];for(let i=0;i<10;i++){const n={time:d().subtract(i,"M").format("YYYY/MM")};e.forEach((e=>{n[e]=(500*Math.random()).toFixed(2)})),t.forEach((e=>{n[e]=(100*Math.random()).toFixed(2)})),o.push(n)}i.dataset={dimensions:["time",...e,...t],source:o}}return i},getBarStackAndLineOption:function(e=["10kV以下","10kV及以上"],t=["10kV及以上所占比重"],o){const i=[];for(let r=0;r<10;r++){const o={time:d().subtract(r,"M").format("YYYY/MM")};e.forEach((e=>{o[e]=(500*Math.random()).toFixed(2)})),t.forEach((e=>{o[e]=(100*Math.random()).toFixed(2)})),i.push(o)}const n={dimensions:["time",...e,...t],source:i},a={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:w}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:L},alignWithLabel:!0},axisLabel:{textStyle:{color:k},fontSize:14,margin:10}},yAxis:[{name:"单位:万户",nameTextStyle:{color:f},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:f},min:-10,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}}],animation:!0,series:[],dataset:n},l=[];return e.forEach((e=>{l.push({name:e,type:"bar",barWidth:"30%",yAxisIndex:0,stack:!0})})),t.forEach((e=>{l.push({name:e,yAxisIndex:1,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:10,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})})),a.series=l,h.merge(a,o),a},getBaseBarChartOption:function(e){const t=[];for(let n=0;n<12;n++)t.push({type:`${n+1}月`,value:200*Math.random()});const o={dimensions:["type","value"],source:t},i={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!1},grid:{left:"0%",right:"0%",bottom:"0px",top:"50px",containLabel:!0,z:22},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:w}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:L},alignWithLabel:!0},axisLabel:{color:k,fontSize:14,margin:10}},yAxis:{name:"单位:%",nameTextStyle:{color:k},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},series:{name:"数值",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{barBorderRadius:[20,20,0,0],color:new m(0,1,0,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])}},showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}},dataset:o};return h.merge(i,e),i},getBaseBarRollbackChartOption:function(e){const t={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!1},grid:{left:40,right:20,bottom:"0px",top:0,containLabel:!0,z:22},xAxis:{name:"单位:%",nameTextStyle:{color:k},splitLine:{show:!0},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{color:f,fontSize:14,margin:10}},yAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:w}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:L},alignWithLabel:!0},axisLabel:{color:k,fontSize:14,margin:10}},series:{name:"",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{borderRadius:[0,20,20,0],color:new m(0,0,1,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])},showBackground:!0,backgroundStyle:{borderRadius:[0,20,20,0],color:"#e9ebf7"}}};if(h.merge(t,e),!t.dataset){let e=[];const o=["a","b","c","d","e"];o?.forEach((t=>{e.push({type:t,value:(100*Math.random()).toFixed(2)})})),0===e.length&&(e=[{type:"克州",value:20},{type:"乌鲁木齐",value:30},{type:"超高压",value:80},{type:"昌吉",value:22},{type:"吐鲁番",value:20},{type:"奎屯",value:30},{type:"博尔塔拉",value:26},{type:"哈密",value:28}]),t.dataset={dimensions:["type","value"],source:e}}return t},getLineChartOption:(e,t)=>{const o={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!0},grid:{left:10,right:0,bottom:0,top:30,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:w}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:L},alignWithLabel:!0},axisLabel:{color:k,fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:k},splitLine:{show:!0},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{color:f,fontSize:14,margin:10}},series:[],animation:!0},i=[];if(e.forEach((e=>{i.push({name:e,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:10,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})})),o.series=i,h.merge(o,t),!o.dataset){const t=[];for(let o=0;o<10;o++){const i={time:d().subtract(o,"d").format("YYYY-MM-DD")};e.forEach((e=>{i[e]=100*Math.random()})),t.push(i)}o.dataset={dimensions:["time",...e],source:t}}return o},getMultiBarChartOption:function(e=["demo"],t){const o=[];for(let l=0;l<12;l++)o.push({type:`${l+1}月`,...e.reduce(((e,t,o)=>(e[t]=(200*Math.random()*(o%2==1?1:-1)).toFixed(2),e)),{})});const i={dimensions:["type",...e],source:o},n={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!1},grid:{left:"0%",right:"0%",bottom:"0px",top:"50px",containLabel:!0,z:22},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:w}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:L},alignWithLabel:!0},axisLabel:{textStyle:{color:k},fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:k},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},series:[],dataset:i},a=e.map((e=>({name:e,type:"bar",xAxisIndex:0,yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}})));return n.series=a,h.merge(n,t),n},getPieChartOption:function(e){const t={title:{text:"",left:"center",top:"53%",padding:[24,0]},series:{name:"",type:"pie",radius:["40%","60%"],hoverAnimation:!1,label:{formatter:(e,t,o)=>{const{percent:i}=e;return`{black|${e.name}} {yellow|${e.value}} {blue|${i}%}`},padding:[0,-60],height:50,rich:{black:{color:"#333",align:"right",fontSize:14,padding:[4,0],borderColor:"red",marginBottom:"-10px"},yellow:{color:"#ffc72b",fontSize:16,padding:[5,4],align:"center"},blue:{color:"#28c9db",fontSize:14,align:"center",marginRight:"-100px"}}},labelLine:{showAbove:!0,length:60,length2:60,maxSurfaceAngle:0,lineStyle:{color:"#0b5263"}}}};return h.merge(t,e),t.series.data||(t.series.data=[{value:260,name:"测试1"},{value:103,name:"测试2"}]),t},getScatterChartOption:function(e=["预测误差","预测波动"],t={}){const o=["#ffba00","#2759a4","#ff7e00","#6fbd6b","#50abdf","#7181d0","#ac77ce"],i={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}},alwaysShowContent:!0,formatter:t=>{const[{data:o={},dimensionNames:i=[]}]=t;return`${o.name}<br /><span>${e[0]}:${o[i[0]]}<br />${e[1]}:${o[i[1]]}`}},legend:{show:!1},grid:{left:50,right:80,bottom:30,top:30,containLabel:!0},xAxis:{name:e[0],splitLine:{show:!1},axisLine:{lineStyle:{color:w},symbol:["none","arrow"]},axisTick:{show:!1},axisLabel:{show:!1}},yAxis:{name:e[1],nameTextStyle:{color:k},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S},symbol:["none","arrow"]},axisTick:{show:!1},axisLabel:{show:!1}},series:{name:"",type:"scatter",symbol:"circle",symbolSize:20,label:{show:!0,position:"top"},itemStyle:{color(e){let t=e.dataIndex;return t>=6&&(t-=6),o[t]}}}};return h.merge(i,t),i.dataset||(i.dataset={dimensions:["均方误差","平均绝对误差"],source:[{name:"专家修正","平均绝对误差":2.349,"均方误差":2.333},{name:"智能AI算法","平均绝对误差":3.333,"均方误差":2.333},{name:"自回归移动平均模型","平均绝对误差":4.333,"均方误差":5.333}]}),i},getScatterPlotOption:function(e,t){const o={title:{text:""},grid:{left:"10px",right:"100px",bottom:0,top:"30px",containLabel:!0},tooltip:{trigger:"item",axisPointer:{show:!0,type:"cross",lineStyle:{type:"dashed",width:1}},formatter(e){if("series"==e.componentType)return`<div style="border-bottom: 1px solid rgba(255,255,255,.3); font-size: 18px;padding-bottom: 7px;margin-bottom: 7px">${e.name}</div><span>预测误差</span> : ${e.data.value[0]}<br/><span>预测波动</span> : ${e.data.value[1]}`}},xAxis:{name:"预测误差",type:"value",scale:!0,splitLine:{show:!1},axisLine:{lineStyle:{color:w}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:L},alignWithLabel:!0},axisLabel:{textStyle:{color:k},fontSize:14,margin:10}},yAxis:{name:"预测波动",nameTextStyle:{color:f},type:"value",scale:!0,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:S}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:b}},axisLabel:{textStyle:{color:f},fontSize:14,margin:10}},series:[{type:"scatter",data:e||[{name:"智能AI算法",value:[1.45,1.96]},{name:"专家修正",value:[2.39,3.81]},{name:"XGBoost",value:[3.84,4.26]}],symbolSize:20,markLine:{label:{normal:{formatter:e=>e.name}},lineStyle:{normal:{color:"#626c91",type:"solid",width:1},emphasis:{color:"#d9def7"}},data:[{xAxis:function(){let t=0;return e.forEach((e=>{t+=e.value[0]})),(t/e.length).toFixed(2)}(),name:"预测误差平均水平",label:{color:"red"}},{yAxis:function(){let t=0;return e.forEach((e=>{t+=e.value[1]})),(t/e.length).toFixed(2)}(),name:"预测波动平均水平",label:{color:"red"}}]}}]};return h.merge(o,t),o}},Symbol.toStringTag,{value:"Module"})),ScreenChart:p}}}}));