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
package/README.md CHANGED
@@ -75,7 +75,6 @@ $ npm create ssnode-cli my-app
75
75
  │ pnpm install
76
76
  │ pnpm dev # web(6177)+ backend(3001)
77
77
  │ → 部署前:配 SSH 凭证 web/scripts/server.config.json + backend/scripts/server.config.cjs(从 example 拷)
78
- │ → 首次部署前:backend/ 下重生 package-lock.json(见 README「第 4 步」)
79
78
  │
80
79
  └ Happy hacking!
81
80
  ```
@@ -90,7 +89,7 @@ $ npm create ssnode-cli my-app
90
89
  - **密钥生成注入**:dev/prod 两套独立密钥(JWT secret、大屏签名 signKey、超管密码、AES cryptKey),前后端成对同值写入并回读校验;超管账号打印在控制台
91
90
  - **git init + 首次 commit**、**pnpm install**(交互可选)
92
91
 
93
- CLI 搞不定的两件事(生成结束会提示):部署前配 SSH 凭证(example 拷)、backend 首次部署前重生 `package-lock.json`。
92
+ CLI 搞不定的一件事(生成结束会提示):部署前配 SSH 凭证(example 拷)。backend lockfile 由 buildops 自动生成,无需手工。
94
93
 
95
94
  ## 仓库
96
95
 
package/index.js CHANGED
@@ -383,7 +383,6 @@ function nextSteps(stack, targetDir, installed, pm) {
383
383
  if (stack === 'fullstack') {
384
384
  lines.push(`${pm} ${pm === 'npm' ? 'run ' : ''}dev # web(6177)+ backend(3001)${pm === 'npm' ? '(workspace 顺序执行)' : ''}`);
385
385
  lines.push('→ 部署前:配 SSH 凭证 web/scripts/server.config.json + backend/scripts/server.config.cjs(从 example 拷)');
386
- lines.push('→ 首次部署前:backend/ 下重生 package-lock.json(见 README「第 4 步」)');
387
386
  } else if (stack === 'web') {
388
387
  lines.push(`${pm} ${pm === 'npm' ? 'run ' : ''}dev # 端口 6177;checkToken=false 免登录`);
389
388
  lines.push('→ 接后端时:public/env.config.js 的 checkToken 改回 true,并填 .env.* 签名密钥');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ssnode-cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "SSNodeFullStack 脚手架 — 生成全栈 / 仅前端 / 仅后端项目(Vite+React+AntD / NestJS+SQLite)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -48,4 +48,4 @@
48
48
  "dependencies": {
49
49
  "@clack/prompts": "0.11.0"
50
50
  }
51
- }
51
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backend",
3
- "version": "1.0.2",
3
+ "version": "1.0.1",
4
4
  "description": "全栈模板 - 后台服务(NestJS + SQLite + TypeORM)",
5
5
  "private": true,
6
6
  "engines": {
@@ -32,6 +32,7 @@
32
32
  */
33
33
  const fs = require('fs');
34
34
  const path = require('path');
35
+ const os = require('os');
35
36
  const readline = require('readline');
36
37
 
37
38
  const BACKEND = path.resolve(__dirname, '..');
@@ -265,6 +266,70 @@ function cleanAppleDoubles(dir) {
265
266
  return removed;
266
267
  }
267
268
 
269
+ // 生成/刷新 backend/package-lock.json(Dockerfile `npm ci` 用的真 npm lockfile)。
270
+ // 生成必须在隔离目录(一次性 mkdtemp),直接在 backend/ 下跑 npm 会踩两个雷(实测):
271
+ // ① 根 package.json 声明 workspaces → npm 自动爬到 workspace 根解析整个 monorepo,
272
+ // 撞上 pnpm 符号链 node_modules → 崩溃/hang(Cannot read properties of null / 长时间无输出);
273
+ // ② 加 --workspaces=false 钉住单包后,npm 又会读 backend/node_modules 的 pnpm 符号链
274
+ // 实际树,把 resolved 写成 "../node_modules/.pnpm/..." 伪路径(即 validateLockfile
275
+ // 防的污染,进 Docker npm ci 建出断链 node_modules)。
276
+ // 隔离目录无父 workspace、无 node_modules → npm 只能按 registry 解析 → 真 lockfile,
277
+ // 产物拷回 backend/package-lock.json(落位与 README「第 4 步」手工配方一致)。触发条件:
278
+ // ① lock 不存在 → 生成(免手工);
279
+ // ② package.json 的 dependencies 与 lock packages[""].dependencies 不同步 → 刷新
280
+ // (pnpm install 改依赖后自动跟上,防 Dockerfile 按旧 lock 装出旧树;syncLockVersion
281
+ // 只对 version 字段管不了依赖树)。devDependencies 不比对:lock 以 --omit=dev 生成,
282
+ // 不含 dev 树,devDeps 变更不影响容器安装。
283
+ // 失败 throw 附手工兜底命令(与 README「第 4 步」同款)。
284
+ function sameDeps(a, b) {
285
+ const ka = Object.keys(a).sort();
286
+ const kb = Object.keys(b).sort();
287
+ return ka.length === kb.length && ka.every((k) => a[k] === b[k]);
288
+ }
289
+
290
+ function lockDepsOutOfSync(lockPath, pkg) {
291
+ try {
292
+ const lock = JSON.parse(fs.readFileSync(lockPath, 'utf8'));
293
+ const lockDeps = (lock.packages && lock.packages[''] && lock.packages[''].dependencies) || {};
294
+ return !sameDeps(lockDeps, pkg.dependencies || {});
295
+ } catch {
296
+ return true; // lock 损坏/不可解析 → 视为不同步,重生成
297
+ }
298
+ }
299
+
300
+ function ensureLockfile() {
301
+ const lockPath = path.join(BACKEND, 'package-lock.json');
302
+ const missing = !fs.existsSync(lockPath);
303
+ if (!missing && !lockDepsOutOfSync(lockPath, readPkg())) return;
304
+ console.log(
305
+ missing
306
+ ? '▶ backend/package-lock.json 不存在(Dockerfile npm ci 依赖它),自动生成 ...'
307
+ : '▶ package.json 依赖与 lock 不同步,自动刷新 backend/package-lock.json ...'
308
+ );
309
+ const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'be-lock-'));
310
+ try {
311
+ fs.copyFileSync(PKG_PATH, path.join(tmp, 'package.json'));
312
+ const r = require('child_process').spawnSync(
313
+ 'npm',
314
+ ['install', '--package-lock-only', '--omit=dev', '--legacy-peer-deps'],
315
+ { cwd: tmp, stdio: 'inherit', shell: true }
316
+ );
317
+ const tmpLock = path.join(tmp, 'package-lock.json');
318
+ if (r.error || r.status !== 0 || !fs.existsSync(tmpLock)) {
319
+ throw new Error(
320
+ `npm install --package-lock-only 生成 lockfile 失败(status=${r.status})。手工兜底:\n` +
321
+ ' mkdir -p /tmp/be-lock && cp backend/package.json /tmp/be-lock/ \\\n' +
322
+ ' && (cd /tmp/be-lock && npm install --package-lock-only --omit=dev --legacy-peer-deps \\\n' +
323
+ ' && cp package-lock.json <repo>/backend/)'
324
+ );
325
+ }
326
+ fs.copyFileSync(tmpLock, lockPath);
327
+ } finally {
328
+ fs.rmSync(tmp, { recursive: true, force: true });
329
+ }
330
+ console.log(' ✓ backend/package-lock.json 已生成/刷新');
331
+ }
332
+
268
333
  // 防御:package-lock.json 必须是真 npm lockfile(resolved = registry URL)。
269
334
  // pnpm workspace 下误跑 `npm install` 会把现有 pnpm 符号链当 resolved 路径写进 lock
270
335
  // (resolved = "../node_modules/.pnpm/..."),Dockerfile `npm ci` 据此建出指向容器内不存在的
@@ -272,7 +337,7 @@ function cleanAppleDoubles(dir) {
272
337
  // buildops 时拦此污染,提示重生路径。
273
338
  function validateLockfile() {
274
339
  const lockPath = path.join(BACKEND, 'package-lock.json');
275
- if (!fs.existsSync(lockPath)) return; // 未生成时跳过(Dockerfile npm ci 另因缺 lock 报错)
340
+ if (!fs.existsSync(lockPath)) return; // 正常已被上方 ensureLockfile 生成,此处纯防御
276
341
  const raw = fs.readFileSync(lockPath, 'utf8');
277
342
  if (raw.includes('node_modules/.pnpm')) {
278
343
  throw new Error(
@@ -287,6 +352,7 @@ function validateLockfile() {
287
352
 
288
353
  // 组装运维包
289
354
  function buildOps(version) {
355
+ ensureLockfile();
290
356
  validateLockfile();
291
357
  const pkg = readPkg();
292
358
  // name 路径安全化:backend → backend
@@ -50,7 +50,7 @@ scripts/ 根级发布/回滚薄编排
50
50
  7. **两个请求实例禁止复用**:`request.ts`(后台,带 Authorization)与 `app-request.ts`(大屏,三头签名)独立,复用会互相头污染。
51
51
  8. **DB 文件名程序定死**:`template.prod.sqlite`/`template.dev.sqlite`,改名要同步 `sqlite.config.ts`、`configuration.ts`、`ops/sqlite/config.sh`、ops 探针四处。
52
52
  9. **better-sqlite3 v13 无预编译二进制**:需 python3/make/g++ 源码编译(Dockerfile 已装齐);本地装依赖报 node-gyp 错先查这个。
53
- 10. **backend/package-lock.json 必须是真 npm lockfile**(Dockerfile `npm ci` 用;首次部署前按 README「第 4 步」重生,避开 pnpm 符号链污染)。
53
+ 10. **backend/package-lock.json 必须是真 npm lockfile**(Dockerfile `npm ci` 用;buildops 自动生成/刷新——缺失或依赖不同步时在隔离目录跑 `npm install --package-lock-only` 拷回,无需手工;在 `backend/` 下裸跑 npm 会撞 workspace 根探测/pnpm 符号链污染,详见 `build.cjs::ensureLockfile` 注释与 README「第 4 步」)。
54
54
 
55
55
  ## 编码与接口约定
56
56
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > 个人全栈项目脚手架。从某全栈项目抽离公共框架而来:可视化大屏(只读)+ 后台管理系统(配置台)+ NestJS 后端(SQLite)。业务主线:**后台配置 → SQLite → 大屏消费**。
4
4
 
5
- 本项目由 `create-ssnode-cli` 生成 —— 包名/标题/DB 名/密钥已自动替换注入,「必改清单」第 1、2 类已完成,只剩部署凭证与 lockfile 两项手工步骤。框架层(双轨鉴权、SQLite 加固、docker/systemd/pm2 部署引擎、Capistrano 回滚)开箱即用,业务面已收敛到最小示例。
5
+ 本项目由 `create-ssnode-cli` 生成 —— 包名/标题/DB 名/密钥已自动替换注入,「必改清单」第 1、2 类已完成,只剩部署凭证一项手工步骤(lockfile 由 buildops 自动生成)。框架层(双轨鉴权、SQLite 加固、docker/systemd/pm2 部署引擎、Capistrano 回滚)开箱即用,业务面已收敛到最小示例。
6
6
 
7
7
  ---
8
8
 
@@ -15,7 +15,7 @@
15
15
 
16
16
  dev 时 vite proxy 把 `/api`、`/ws`、`/static/uploads` 转给 `localhost:3001`;前端同源请求,`web/public/env.config.js` 的 `requestBaseUrl` 留空。
17
17
 
18
- ## 必改清单(生成项目只做 3、4;1、2、5 已由脚手架完成)
18
+ ## 必改清单(生成项目只做 3;1、2 已由脚手架完成,4 已自动化,5 按需)
19
19
 
20
20
  若走 `cp -r` 老路手动拷模板,才需要按序改这 5 类:
21
21
 
@@ -40,14 +40,14 @@ dev/prod 两套密钥已生成并写入下列位置(超管密码见生成时控
40
40
  - `web/scripts/server.config.json`:从 `server.config.example.json` 拷,填 SSH host/账号/密码/部署路径(已 `.gitignore`)
41
41
  - `backend/scripts/server.config.cjs`:从 `server.config.example.cjs` 拷,填 SSH + `backendServiceDir`(已 `.gitignore`)
42
42
 
43
- ### 4. backend lockfile(首次部署前重生)
44
- 模板**未带** `backend/package-lock.json`(供 Dockerfile `npm ci` 的真 npm lockfile)。首次部署前在 `backend/` 下重生,避开 pnpm 符号链污染:
43
+ ### 4. backend lockfile(自动生成,无需手工)
44
+ 模板**未带** `backend/package-lock.json`(供 Dockerfile `npm ci` 的真 npm lockfile)——`pnpm buildops` 会自动生成/刷新:缺失或与 package.json 依赖不同步时,自动在一次性隔离目录跑 `npm install --package-lock-only` 并把产物拷回 `backend/`(不能直接在 `backend/` 下跑:npm 会爬 workspace 根、读 pnpm 符号链,崩或产出伪 lock)。异常时的手工兜底:
45
45
  ```bash
46
46
  mkdir -p /tmp/be-lock && cp backend/package.json /tmp/be-lock/ \
47
47
  && (cd /tmp/be-lock && npm install --package-lock-only --omit=dev --legacy-peer-deps \
48
48
  && cp package-lock.json <repo>/backend/)
49
49
  ```
50
- 详见 `backend/scripts/build.cjs::validateLockfile`。
50
+ 详见 `backend/scripts/build.cjs::ensureLockfile`。
51
51
 
52
52
  ### 5. 业务面(按需替换示例)— 部分由脚手架保留,业务扩展仍手工
53
53
  模板带 **2 个后台 CRUD 示例**(后端模块 + 前端页面,照着扩自己的业务):
@@ -89,7 +89,7 @@ UI 规范见 `docs/airtable/DESIGN.md`;后期想换自己的风格:替换/修改
89
89
  - `pnpm --filter backend buildops` = build 之后组装运维包到 `backend/release/`。
90
90
  - **混淆边界**:`mangle.keep_fnames` 必须开——Swagger 的 operationId/schema 名从类名读,混淆类名会废掉 `/docs`;Nest DI 走构造函数引用不受影响。属性名不 mangle(保 yaml/DTO/装饰器元数据)。
91
91
  - **泄露面**:运维包/镜像内的 dist 剥离 `.js.map` 与 `.d.ts`(源码映射与接口结构不外发);`.js.map` 仅本地排障用(terser 已链到源 ts 的映射,`node --enable-source-maps` 可栈回源)。
92
- - **关键 gotcha**:`backend/package-lock.json` 必须是真 npm lockfile(见上方第 4 步)。
92
+ - **关键 gotcha**:`backend/package-lock.json` 必须是真 npm lockfile(buildops 自动生成,见上方第 4 步;裸 `npm install` 造成的 pnpm 符号链污染会被拦截)。
93
93
  - **关键 gotcha**:better-sqlite3 v13 不发布预编译二进制,需 python3/make/g++ 源码编译;`node:22-slim` Dockerfile 已 `apt-get install python3 make g++`。
94
94
 
95
95
  ### 部署 + 发布/回滚
@@ -1 +1 @@
1
- import{u as n,j as t}from"./vendor-e7ea3a11.js";function i(){const r=n();return t.jsx("div",{style:{width:"100%",height:"100vh",boxSizing:"border-box",margin:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"#fff",color:"#1a1a1a",overflow:"hidden",position:"relative"},children:t.jsxs("div",{style:{position:"relative",textAlign:"center"},children:[t.jsx("div",{style:{fontSize:"200px",fontWeight:800,lineHeight:1,letterSpacing:"4px",color:"#1a1a1a",textShadow:"0 6px 20px rgba(0, 0, 0, 0.08)"},children:"404"}),t.jsx("div",{style:{marginTop:20,fontSize:24,fontWeight:600,color:"#1a1a1a",letterSpacing:"2px"},children:"页面走丢了"}),t.jsx("div",{style:{marginTop:8,fontSize:14,color:"rgba(0, 0, 0, 0.45)"},children:"抱歉,您访问的页面不存在或已被移除"}),t.jsxs("div",{style:{marginTop:36,display:"flex",gap:16,justifyContent:"center"},children:[t.jsx("span",{onClick:()=>r("/"),style:{padding:"11px 32px",fontSize:15,fontWeight:500,borderRadius:24,cursor:"pointer",color:"#fff",background:"#000",transition:"all 0.2s ease"},onMouseEnter:e=>e.currentTarget.style.opacity="0.8",onMouseLeave:e=>e.currentTarget.style.opacity="1",children:"返回首页"}),t.jsx("span",{onClick:()=>window.history.back(),style:{padding:"11px 32px",fontSize:15,fontWeight:500,borderRadius:24,cursor:"pointer",color:"#000",border:"1px solid #000",background:"transparent",boxSizing:"border-box",transition:"all 0.2s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#000",e.currentTarget.style.color="#fff"},onMouseLeave:e=>{e.currentTarget.style.background="transparent",e.currentTarget.style.color="#000"},children:"返回上一页"})]})]})})}export{i as default};
1
+ import{u as n,j as t}from"./vendor-2663c204.js";function i(){const r=n();return t.jsx("div",{style:{width:"100%",height:"100vh",boxSizing:"border-box",margin:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"#fff",color:"#1a1a1a",overflow:"hidden",position:"relative"},children:t.jsxs("div",{style:{position:"relative",textAlign:"center"},children:[t.jsx("div",{style:{fontSize:"200px",fontWeight:800,lineHeight:1,letterSpacing:"4px",color:"#1a1a1a",textShadow:"0 6px 20px rgba(0, 0, 0, 0.08)"},children:"404"}),t.jsx("div",{style:{marginTop:20,fontSize:24,fontWeight:600,color:"#1a1a1a",letterSpacing:"2px"},children:"页面走丢了"}),t.jsx("div",{style:{marginTop:8,fontSize:14,color:"rgba(0, 0, 0, 0.45)"},children:"抱歉,您访问的页面不存在或已被移除"}),t.jsxs("div",{style:{marginTop:36,display:"flex",gap:16,justifyContent:"center"},children:[t.jsx("span",{onClick:()=>r("/"),style:{padding:"11px 32px",fontSize:15,fontWeight:500,borderRadius:24,cursor:"pointer",color:"#fff",background:"#000",transition:"all 0.2s ease"},onMouseEnter:e=>e.currentTarget.style.opacity="0.8",onMouseLeave:e=>e.currentTarget.style.opacity="1",children:"返回首页"}),t.jsx("span",{onClick:()=>window.history.back(),style:{padding:"11px 32px",fontSize:15,fontWeight:500,borderRadius:24,cursor:"pointer",color:"#000",border:"1px solid #000",background:"transparent",boxSizing:"border-box",transition:"all 0.2s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#000",e.currentTarget.style.color="#fff"},onMouseLeave:e=>{e.currentTarget.style.background="transparent",e.currentTarget.style.color="#000"},children:"返回上一页"})]})]})})}export{i as default};
@@ -1 +1 @@
1
- System.register(["./vendor-legacy-a62a28c9.js"],(function(e,t){"use strict";var r,n;return{setters:[e=>{r=e.u,n=e.j}],execute:function(){e("default",(function(){const e=r();return n.jsx("div",{style:{width:"100%",height:"100vh",boxSizing:"border-box",margin:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"#fff",color:"#1a1a1a",overflow:"hidden",position:"relative"},children:n.jsxs("div",{style:{position:"relative",textAlign:"center"},children:[n.jsx("div",{style:{fontSize:"200px",fontWeight:800,lineHeight:1,letterSpacing:"4px",color:"#1a1a1a",textShadow:"0 6px 20px rgba(0, 0, 0, 0.08)"},children:"404"}),n.jsx("div",{style:{marginTop:20,fontSize:24,fontWeight:600,color:"#1a1a1a",letterSpacing:"2px"},children:"页面走丢了"}),n.jsx("div",{style:{marginTop:8,fontSize:14,color:"rgba(0, 0, 0, 0.45)"},children:"抱歉,您访问的页面不存在或已被移除"}),n.jsxs("div",{style:{marginTop:36,display:"flex",gap:16,justifyContent:"center"},children:[n.jsx("span",{onClick:()=>e("/"),style:{padding:"11px 32px",fontSize:15,fontWeight:500,borderRadius:24,cursor:"pointer",color:"#fff",background:"#000",transition:"all 0.2s ease"},onMouseEnter:e=>e.currentTarget.style.opacity="0.8",onMouseLeave:e=>e.currentTarget.style.opacity="1",children:"返回首页"}),n.jsx("span",{onClick:()=>window.history.back(),style:{padding:"11px 32px",fontSize:15,fontWeight:500,borderRadius:24,cursor:"pointer",color:"#000",border:"1px solid #000",background:"transparent",boxSizing:"border-box",transition:"all 0.2s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#000",e.currentTarget.style.color="#fff"},onMouseLeave:e=>{e.currentTarget.style.background="transparent",e.currentTarget.style.color="#000"},children:"返回上一页"})]})]})})}))}}}));
1
+ System.register(["./vendor-legacy-2df23db3.js"],(function(e,t){"use strict";var r,n;return{setters:[e=>{r=e.u,n=e.j}],execute:function(){e("default",(function(){const e=r();return n.jsx("div",{style:{width:"100%",height:"100vh",boxSizing:"border-box",margin:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"#fff",color:"#1a1a1a",overflow:"hidden",position:"relative"},children:n.jsxs("div",{style:{position:"relative",textAlign:"center"},children:[n.jsx("div",{style:{fontSize:"200px",fontWeight:800,lineHeight:1,letterSpacing:"4px",color:"#1a1a1a",textShadow:"0 6px 20px rgba(0, 0, 0, 0.08)"},children:"404"}),n.jsx("div",{style:{marginTop:20,fontSize:24,fontWeight:600,color:"#1a1a1a",letterSpacing:"2px"},children:"页面走丢了"}),n.jsx("div",{style:{marginTop:8,fontSize:14,color:"rgba(0, 0, 0, 0.45)"},children:"抱歉,您访问的页面不存在或已被移除"}),n.jsxs("div",{style:{marginTop:36,display:"flex",gap:16,justifyContent:"center"},children:[n.jsx("span",{onClick:()=>e("/"),style:{padding:"11px 32px",fontSize:15,fontWeight:500,borderRadius:24,cursor:"pointer",color:"#fff",background:"#000",transition:"all 0.2s ease"},onMouseEnter:e=>e.currentTarget.style.opacity="0.8",onMouseLeave:e=>e.currentTarget.style.opacity="1",children:"返回首页"}),n.jsx("span",{onClick:()=>window.history.back(),style:{padding:"11px 32px",fontSize:15,fontWeight:500,borderRadius:24,cursor:"pointer",color:"#000",border:"1px solid #000",background:"transparent",boxSizing:"border-box",transition:"all 0.2s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#000",e.currentTarget.style.color="#fff"},onMouseLeave:e=>{e.currentTarget.style.background="transparent",e.currentTarget.style.color="#000"},children:"返回上一页"})]})]})})}))}}}));
@@ -1 +1 @@
1
- import{u as m,e as p,r as s,Q as d,j as f,S as g,O as h}from"./vendor-e7ea3a11.js";import{a as r}from"./api-21ca288f.js";import"./index-2e42b180.js";function E(){const c=m(),n=p(),[l,t]=s.useState(!0),[o,i]=s.useState(!1);return s.useEffect(()=>{if(!window.ENV.checkToken){t(!1);return}const e=()=>{c("/login?redirect=".concat(encodeURIComponent(n.pathname+n.search)))};t(!0);const u=d.parse(n.search.replace("?",""));if(u.user){r.admin.user.ssoLogin(u.token).then(a=>{a?(t(!1),i(!0)):(t(!1),i(!1))});return}r.admin.user.isLogin().then(a=>{a.login?(t(!1),i(a.permission)):(t(!1),e())})},[]),s.useEffect(()=>{o&&r.admin.user.getInfo().then(e=>{e.status==="SUCCESS"&&(e.data.menu?e.data.menuArray=JSON.parse(e.data.menu):e.data.menuArray=[])})},[o]),l?f.jsx(g,{spinning:!0,tip:"登录中...",size:"large",style:{height:"100vh",width:"100vw",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"}}):f.jsx(h,{})}export{E as default};
1
+ import{u as m,e as p,r as s,Q as d,j as f,S as g,O as h}from"./vendor-2663c204.js";import{a as r}from"./api-83561db2.js";import"./index-e4c9d42a.js";function E(){const c=m(),n=p(),[l,t]=s.useState(!0),[o,i]=s.useState(!1);return s.useEffect(()=>{if(!window.ENV.checkToken){t(!1);return}const e=()=>{c("/login?redirect=".concat(encodeURIComponent(n.pathname+n.search)))};t(!0);const u=d.parse(n.search.replace("?",""));if(u.user){r.admin.user.ssoLogin(u.token).then(a=>{a?(t(!1),i(!0)):(t(!1),i(!1))});return}r.admin.user.isLogin().then(a=>{a.login?(t(!1),i(a.permission)):(t(!1),e())})},[]),s.useEffect(()=>{o&&r.admin.user.getInfo().then(e=>{e.status==="SUCCESS"&&(e.data.menu?e.data.menuArray=JSON.parse(e.data.menu):e.data.menuArray=[])})},[o]),l?f.jsx(g,{spinning:!0,tip:"登录中...",size:"large",style:{height:"100vh",width:"100vw",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"}}):f.jsx(h,{})}export{E as default};
@@ -1 +1 @@
1
- System.register(["./vendor-legacy-a62a28c9.js","./api-legacy-b464070b.js","./index-legacy-8c7d1ee7.js"],(function(e,t){"use strict";var n,s,r,a,i,u,o,c;return{setters:[e=>{n=e.u,s=e.e,r=e.r,a=e.Q,i=e.j,u=e.S,o=e.O},e=>{c=e.a},null],execute:function(){e("default",(function(){const e=n(),t=s(),[d,l]=r.useState(!0),[f,g]=r.useState(!1);return r.useEffect((()=>{if(!window.ENV.checkToken)return void l(!1);l(!0);const n=a.parse(t.search.replace("?",""));n.user?c.admin.user.ssoLogin(n.token).then((e=>{e?(l(!1),g(!0)):(l(!1),g(!1))})):c.admin.user.isLogin().then((n=>{n.login?(l(!1),g(n.permission)):(l(!1),e(`/login?redirect=${encodeURIComponent(t.pathname+t.search)}`))}))}),[]),r.useEffect((()=>{f&&c.admin.user.getInfo().then((e=>{"SUCCESS"===e.status&&(e.data.menu?e.data.menuArray=JSON.parse(e.data.menu):e.data.menuArray=[])}))}),[f]),d?i.jsx(u,{spinning:!0,tip:"登录中...",size:"large",style:{height:"100vh",width:"100vw",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"}}):i.jsx(o,{})}))}}}));
1
+ System.register(["./vendor-legacy-2df23db3.js","./api-legacy-8e15c853.js","./index-legacy-aebba3cb.js"],(function(e,t){"use strict";var n,s,r,a,i,u,o,c;return{setters:[e=>{n=e.u,s=e.e,r=e.r,a=e.Q,i=e.j,u=e.S,o=e.O},e=>{c=e.a},null],execute:function(){e("default",(function(){const e=n(),t=s(),[d,l]=r.useState(!0),[f,g]=r.useState(!1);return r.useEffect((()=>{if(!window.ENV.checkToken)return void l(!1);l(!0);const n=a.parse(t.search.replace("?",""));n.user?c.admin.user.ssoLogin(n.token).then((e=>{e?(l(!1),g(!0)):(l(!1),g(!1))})):c.admin.user.isLogin().then((n=>{n.login?(l(!1),g(n.permission)):(l(!1),e(`/login?redirect=${encodeURIComponent(t.pathname+t.search)}`))}))}),[]),r.useEffect((()=>{f&&c.admin.user.getInfo().then((e=>{"SUCCESS"===e.status&&(e.data.menu?e.data.menuArray=JSON.parse(e.data.menu):e.data.menuArray=[])}))}),[f]),d?i.jsx(u,{spinning:!0,tip:"登录中...",size:"large",style:{height:"100vh",width:"100vw",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"}}):i.jsx(o,{})}))}}}));
@@ -0,0 +1 @@
1
+ import{e as C,u as I,r as c,j as e,C as w,Z as M,D as P,f as K,A as E,U as O,g as R,M as S,h as T,i as D,k as F,O as W,l as B,z as U,m as z,L}from"./vendor-2663c204.js";import{g as $,R as A,P as V}from"./index-e4c9d42a.js";import{a as Z}from"./api-83561db2.js";import{a as G}from"./theme-3a4c7290.js";const H="_background_1qfg6_10",J="_header_1qfg6_19",Q="_logo_1qfg6_28",X="_logotext_1qfg6_31",Y="_menus_1qfg6_36",ee="_menublock_1qfg6_45",se="_menublockimg_1qfg6_56",ne="_menublockselect_1qfg6_64",te="_userview_1qfg6_68",oe="_version_1qfg6_75",le="_screenEntry_1qfg6_85",ae="_bottom_1qfg6_101",ce="_slider_1qfg6_108",re="_menuWrap_1qfg6_115",ie="_menuIcon_1qfg6_127",de="_sliderFooter_1qfg6_139",ue="_collapseText_1qfg6_157",me="_right_1qfg6_160",he="_route_1qfg6_169",fe="_breadcrumb_1qfg6_175",ge="_contentview_1qfg6_178",t={background:H,header:J,logo:Q,logotext:X,menus:Y,menublock:ee,menublockimg:se,menublockselect:ne,userview:te,version:oe,screenEntry:le,bottom:ae,slider:ce,menuWrap:re,menuIcon:ie,sliderFooter:de,collapseText:ue,right:me,route:he,breadcrumb:fe,contentview:ge};B.locale(U);z.object;function je(){const i=C(),h=I(),j=c.useRef(),[f,v]=c.useState([]),[d,k]=c.useState(!1),[m,g]=c.useState({selectKeys:[],openKeys:[]}),y=c.useCallback(s=>e.jsx("a",{href:s.path,style:{color:"unset",fontSize:16},children:s.title},s.path),[]),_=c.useCallback((s,l)=>{const n=l&&s.selectIcon||s.icon;if(n)return typeof n!="string"?n:e.jsx("i",{className:t.menuIcon,style:{maskImage:"url(".concat(n,")"),WebkitMaskImage:"url(".concat(n,")")}})},[]);c.useEffect(()=>{const{routes:s}=$(i.pathname),l=[...s];l.pop(),g({openKeys:l.map(n=>n.fullPath),selectKeys:s.map(n=>n.fullPath)})},[i.pathname]),c.useEffect(()=>{var r,a;const s=A.find(o=>o.name==="系统"),l=(r=s==null?void 0:s.children)==null?void 0:r.find(o=>o.name==="后台管理系统"),n=(a=l==null?void 0:l.children)==null?void 0:a.find(o=>o.name==="后台管理系统");v((n==null?void 0:n.children)||[])},[]);const q=c.useMemo(()=>{const s=(l,n,r=[])=>l.filter(a=>a.name&&!a.hideInMenu).reduce((a,o)=>{var x;if(a)return a;const u=[...r,o];if(o.fullPath===n)return u;if((x=o.children)!=null&&x.length){const b=s(o.children,n,u);if(b)return b}return null},null);return s(f,i.pathname)||[]},[f,i.pathname]),p=(s,l=[])=>s.filter(n=>n.name&&!n.hideInMenu).map(n=>{var o;const r=m.selectKeys.includes(n.fullPath);return((o=n.children)==null?void 0:o.filter(u=>u.name&&!u.hideInMenu).length)>0?{key:n.fullPath,icon:_(n,r),label:n.name,children:p(n.children,[...l,n])}:{key:n.fullPath,icon:_(n,r),label:n.name}}),N=[{key:"logout",label:"退出系统",icon:e.jsx(L,{}),onClick:()=>{Z.admin.user.logout().then(s=>{s&&h("/login?redirect=".concat(encodeURIComponent(i.pathname+i.search)))})}}];return e.jsx(w,{locale:M,theme:G,children:e.jsx("div",{style:{width:"100vw",height:"100vh"},children:e.jsxs("div",{className:t.background,ref:j,children:[e.jsxs("div",{className:t.header,children:[e.jsx("img",{className:t.logo,alt:"logo",src:"/logo.svg"}),e.jsx("span",{className:t.logotext,children:V.title}),e.jsx("div",{style:{flex:1}}),e.jsxs("div",{className:t.userview,children:[e.jsx("span",{className:t.version,children:"v1.0.0"}),e.jsx("button",{type:"button",className:t.screenEntry,title:"进入大屏",onClick:()=>h("/screen"),children:e.jsx(P,{})}),e.jsx(K,{menu:{items:N},children:e.jsxs("div",{className:t.userInfo,children:[e.jsx(E,{style:{backgroundColor:"transparent",border:"2px solid #d1d1d1"},icon:e.jsx(O,{})}),e.jsx("span",{style:{margin:"0 10px"},children:"admin"}),e.jsx(R,{})]})})]})]}),e.jsxs("div",{className:t.bottom,children:[e.jsxs("div",{className:t.slider,style:{width:d?64:240},children:[e.jsx("div",{className:t.menuWrap,children:e.jsx(S,{mode:"inline",inlineCollapsed:d,items:p(f),onSelect:s=>{h(s.key)},selectedKeys:m.selectKeys,openKeys:d?[]:m.openKeys,onOpenChange:s=>{g({...m,openKeys:s})}})}),e.jsxs("div",{className:t.sliderFooter,onClick:()=>k(s=>!s),role:"button",tabIndex:0,children:[d?e.jsx(T,{}):e.jsx(D,{}),!d&&e.jsx("span",{className:t.collapseText,children:"收起菜单"})]})]}),e.jsxs("div",{className:t.right,children:[e.jsx("div",{className:t.route,children:e.jsx(F,{items:q.map(s=>({key:s.name,title:s.name,path:s.fullPath})),className:t.breadcrumb,itemRender:y})}),e.jsx("div",{className:t.contentview,children:e.jsx(W,{})})]})]})]})})})}export{je as default};
@@ -0,0 +1 @@
1
+ ._background_1qfg6_10{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box;transform-origin:left top;background-color:#f8fafc}._background_1qfg6_10 ._header_1qfg6_19{display:flex;flex-direction:row;align-items:center;padding:0 15px;height:60px;color:#fff;background-color:#181d26}._background_1qfg6_10 ._header_1qfg6_19 ._logo_1qfg6_28{width:32px}._background_1qfg6_10 ._header_1qfg6_19 ._logotext_1qfg6_31{margin-left:10px;font-size:20px;line-height:20px}._background_1qfg6_10 ._header_1qfg6_19 ._menus_1qfg6_36{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;margin-right:50px;font-size:16px;flex:1}._background_1qfg6_10 ._header_1qfg6_19 ._menus_1qfg6_36 ._menublock_1qfg6_45{display:flex;flex-direction:row;align-items:center;margin-left:30px;border-bottom:2px solid transparent;height:60px;color:#d0d6e0;box-sizing:border-box;cursor:pointer}._background_1qfg6_10 ._header_1qfg6_19 ._menus_1qfg6_36 ._menublock_1qfg6_45 ._menublockimg_1qfg6_56{margin-right:8px;width:20px}._background_1qfg6_10 ._header_1qfg6_19 ._menus_1qfg6_36 ._menublock_1qfg6_45:hover,._background_1qfg6_10 ._header_1qfg6_19 ._menus_1qfg6_36 ._menublockselect_1qfg6_64{border-color:#fff;color:#fff}._background_1qfg6_10 ._header_1qfg6_19 ._userview_1qfg6_68{cursor:pointer;display:flex;align-items:center;gap:14px}._background_1qfg6_10 ._header_1qfg6_19 ._userview_1qfg6_68 ._version_1qfg6_75{color:#9297a0;font-size:12px;line-height:1;padding:3px 8px;border:1px solid #3a3f48;border-radius:10px;background:rgba(255,255,255,.04);white-space:nowrap}._background_1qfg6_10 ._header_1qfg6_19 ._userview_1qfg6_68 ._screenEntry_1qfg6_85{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;color:#9297a0;font-size:16px;line-height:1;transition:color .2s,background .2s}._background_1qfg6_10 ._header_1qfg6_19 ._userview_1qfg6_68 ._screenEntry_1qfg6_85:hover{color:#fff;background:rgba(255,255,255,.08)}._background_1qfg6_10 ._bottom_1qfg6_101{display:flex;flex-direction:row;width:100%;height:calc(100% - 60px);box-sizing:border-box}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108{display:flex;flex-direction:column;background-color:#1d1f25;transition:width .2s ease;overflow:hidden}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108 ._menuWrap_1qfg6_115{flex:1;overflow-y:auto;overflow-x:hidden}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108 ._menuWrap_1qfg6_115::-webkit-scrollbar{width:4px}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108 ._menuWrap_1qfg6_115::-webkit-scrollbar-thumb{background:#3a3f48;border-radius:2px}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108 ._menuIcon_1qfg6_127{display:inline-block;width:16px;height:16px;background-color:currentColor;mask-size:contain;mask-repeat:no-repeat;mask-position:center;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-position:center}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108 ._sliderFooter_1qfg6_139{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;height:48px;border-top:1px solid #2a2d35;color:#d0d6e0;font-size:14px;cursor:pointer;user-select:none;flex-shrink:0}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108 ._sliderFooter_1qfg6_139:hover{background-color:#23262e;color:#fff}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108 ._sliderFooter_1qfg6_139 ._collapseText_1qfg6_157{white-space:nowrap}._background_1qfg6_10 ._bottom_1qfg6_101 ._right_1qfg6_160{display:flex;flex-direction:column;padding:0 40px;flex:1;width:0;box-sizing:border-box;background-color:#f8fafc}._background_1qfg6_10 ._bottom_1qfg6_101 ._right_1qfg6_160 ._route_1qfg6_169{display:flex;flex-direction:row;align-items:center;height:44px}._background_1qfg6_10 ._bottom_1qfg6_101 ._right_1qfg6_160 ._route_1qfg6_169 ._breadcrumb_1qfg6_175{color:#333840}._background_1qfg6_10 ._bottom_1qfg6_101 ._right_1qfg6_160 ._contentview_1qfg6_178{overflow:auto;height:calc(100% - 84px);box-sizing:border-box;background-color:#fff}
@@ -0,0 +1 @@
1
+ System.register(["./vendor-legacy-2df23db3.js","./index-legacy-aebba3cb.js","./api-legacy-8e15c853.js","./theme-legacy-ad78aecb.js"],(function(e,_){"use strict";var o,r,n,t,i,l,s,a,c,g,f,d,u,m,h,b,x,q,p,k,y,j,v,w,N;return{setters:[e=>{o=e.e,r=e.u,n=e.r,t=e.j,i=e.C,l=e.Z,s=e.D,a=e.f,c=e.A,g=e.U,f=e.g,d=e.M,u=e.h,m=e.i,h=e.k,b=e.O,x=e.l,q=e.z,p=e.m,k=e.L},e=>{y=e.g,j=e.R,v=e.P},e=>{w=e.a},e=>{N=e.a}],execute:function(){var _=document.createElement("style");_.textContent="._background_1qfg6_10{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box;transform-origin:left top;background-color:#f8fafc}._background_1qfg6_10 ._header_1qfg6_19{display:flex;flex-direction:row;align-items:center;padding:0 15px;height:60px;color:#fff;background-color:#181d26}._background_1qfg6_10 ._header_1qfg6_19 ._logo_1qfg6_28{width:32px}._background_1qfg6_10 ._header_1qfg6_19 ._logotext_1qfg6_31{margin-left:10px;font-size:20px;line-height:20px}._background_1qfg6_10 ._header_1qfg6_19 ._menus_1qfg6_36{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;margin-right:50px;font-size:16px;flex:1}._background_1qfg6_10 ._header_1qfg6_19 ._menus_1qfg6_36 ._menublock_1qfg6_45{display:flex;flex-direction:row;align-items:center;margin-left:30px;border-bottom:2px solid transparent;height:60px;color:#d0d6e0;box-sizing:border-box;cursor:pointer}._background_1qfg6_10 ._header_1qfg6_19 ._menus_1qfg6_36 ._menublock_1qfg6_45 ._menublockimg_1qfg6_56{margin-right:8px;width:20px}._background_1qfg6_10 ._header_1qfg6_19 ._menus_1qfg6_36 ._menublock_1qfg6_45:hover,._background_1qfg6_10 ._header_1qfg6_19 ._menus_1qfg6_36 ._menublockselect_1qfg6_64{border-color:#fff;color:#fff}._background_1qfg6_10 ._header_1qfg6_19 ._userview_1qfg6_68{cursor:pointer;display:flex;align-items:center;gap:14px}._background_1qfg6_10 ._header_1qfg6_19 ._userview_1qfg6_68 ._version_1qfg6_75{color:#9297a0;font-size:12px;line-height:1;padding:3px 8px;border:1px solid #3a3f48;border-radius:10px;background:rgba(255,255,255,.04);white-space:nowrap}._background_1qfg6_10 ._header_1qfg6_19 ._userview_1qfg6_68 ._screenEntry_1qfg6_85{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;color:#9297a0;font-size:16px;line-height:1;transition:color .2s,background .2s}._background_1qfg6_10 ._header_1qfg6_19 ._userview_1qfg6_68 ._screenEntry_1qfg6_85:hover{color:#fff;background:rgba(255,255,255,.08)}._background_1qfg6_10 ._bottom_1qfg6_101{display:flex;flex-direction:row;width:100%;height:calc(100% - 60px);box-sizing:border-box}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108{display:flex;flex-direction:column;background-color:#1d1f25;transition:width .2s ease;overflow:hidden}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108 ._menuWrap_1qfg6_115{flex:1;overflow-y:auto;overflow-x:hidden}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108 ._menuWrap_1qfg6_115::-webkit-scrollbar{width:4px}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108 ._menuWrap_1qfg6_115::-webkit-scrollbar-thumb{background:#3a3f48;border-radius:2px}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108 ._menuIcon_1qfg6_127{display:inline-block;width:16px;height:16px;background-color:currentColor;mask-size:contain;mask-repeat:no-repeat;mask-position:center;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-position:center}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108 ._sliderFooter_1qfg6_139{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;height:48px;border-top:1px solid #2a2d35;color:#d0d6e0;font-size:14px;cursor:pointer;user-select:none;flex-shrink:0}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108 ._sliderFooter_1qfg6_139:hover{background-color:#23262e;color:#fff}._background_1qfg6_10 ._bottom_1qfg6_101 ._slider_1qfg6_108 ._sliderFooter_1qfg6_139 ._collapseText_1qfg6_157{white-space:nowrap}._background_1qfg6_10 ._bottom_1qfg6_101 ._right_1qfg6_160{display:flex;flex-direction:column;padding:0 40px;flex:1;width:0;box-sizing:border-box;background-color:#f8fafc}._background_1qfg6_10 ._bottom_1qfg6_101 ._right_1qfg6_160 ._route_1qfg6_169{display:flex;flex-direction:row;align-items:center;height:44px}._background_1qfg6_10 ._bottom_1qfg6_101 ._right_1qfg6_160 ._route_1qfg6_169 ._breadcrumb_1qfg6_175{color:#333840}._background_1qfg6_10 ._bottom_1qfg6_101 ._right_1qfg6_160 ._contentview_1qfg6_178{overflow:auto;height:calc(100% - 84px);box-sizing:border-box;background-color:#fff}\n",document.head.appendChild(_),e("default",(function(){const e=o(),_=r(),x=n.useRef(),[q,p]=n.useState([]),[C,I]=n.useState(!1),[K,E]=n.useState({selectKeys:[],openKeys:[]}),P=n.useCallback((e=>t.jsx("a",{href:e.path,style:{color:"unset",fontSize:16},children:e.title},e.path)),[]),W=n.useCallback(((e,_)=>{const o=_&&e.selectIcon||e.icon;if(o)return"string"!=typeof o?o:t.jsx("i",{className:z.menuIcon,style:{maskImage:`url(${o})`,WebkitMaskImage:`url(${o})`}})}),[]);n.useEffect((()=>{const{routes:_}=y(e.pathname),o=[..._];o.pop(),E({openKeys:o.map((e=>e.fullPath)),selectKeys:_.map((e=>e.fullPath))})}),[e.pathname]),n.useEffect((()=>{const e=j.find((e=>"系统"===e.name)),_=e?.children?.find((e=>"后台管理系统"===e.name)),o=_?.children?.find((e=>"后台管理系统"===e.name));p(o?.children||[])}),[]);const F=n.useMemo((()=>{const _=(e,o,r=[])=>e.filter((e=>e.name&&!e.hideInMenu)).reduce(((e,n)=>{if(e)return e;const t=[...r,n];if(n.fullPath===o)return t;if(n.children?.length){const e=_(n.children,o,t);if(e)return e}return null}),null);return _(q,e.pathname)||[]}),[q,e.pathname]),M=(e,_=[])=>e.filter((e=>e.name&&!e.hideInMenu)).map((e=>{const o=K.selectKeys.includes(e.fullPath);return e.children?.filter((e=>e.name&&!e.hideInMenu)).length>0?{key:e.fullPath,icon:W(e,o),label:e.name,children:M(e.children,[..._,e])}:{key:e.fullPath,icon:W(e,o),label:e.name}})),S=[{key:"logout",label:"退出系统",icon:t.jsx(k,{}),onClick:()=>{w.admin.user.logout().then((o=>{o&&_(`/login?redirect=${encodeURIComponent(e.pathname+e.search)}`)}))}}];return t.jsx(i,{locale:l,theme:N,children:t.jsx("div",{style:{width:"100vw",height:"100vh"},children:t.jsxs("div",{className:z.background,ref:x,children:[t.jsxs("div",{className:z.header,children:[t.jsx("img",{className:z.logo,alt:"logo",src:"/logo.svg"}),t.jsx("span",{className:z.logotext,children:v.title}),t.jsx("div",{style:{flex:1}}),t.jsxs("div",{className:z.userview,children:[t.jsx("span",{className:z.version,children:"v1.0.0"}),t.jsx("button",{type:"button",className:z.screenEntry,title:"进入大屏",onClick:()=>_("/screen"),children:t.jsx(s,{})}),t.jsx(a,{menu:{items:S},children:t.jsxs("div",{className:z.userInfo,children:[t.jsx(c,{style:{backgroundColor:"transparent",border:"2px solid #d1d1d1"},icon:t.jsx(g,{})}),t.jsx("span",{style:{margin:"0 10px"},children:"admin"}),t.jsx(f,{})]})})]})]}),t.jsxs("div",{className:z.bottom,children:[t.jsxs("div",{className:z.slider,style:{width:C?64:240},children:[t.jsx("div",{className:z.menuWrap,children:t.jsx(d,{mode:"inline",inlineCollapsed:C,items:M(q),onSelect:e=>{_(e.key)},selectedKeys:K.selectKeys,openKeys:C?[]:K.openKeys,onOpenChange:e=>{E({...K,openKeys:e})}})}),t.jsxs("div",{className:z.sliderFooter,onClick:()=>I((e=>!e)),role:"button",tabIndex:0,children:[C?t.jsx(u,{}):t.jsx(m,{}),!C&&t.jsx("span",{className:z.collapseText,children:"收起菜单"})]})]}),t.jsxs("div",{className:z.right,children:[t.jsx("div",{className:z.route,children:t.jsx(h,{items:F.map((e=>({key:e.name,title:e.name,path:e.fullPath}))),className:z.breadcrumb,itemRender:P})}),t.jsx("div",{className:z.contentview,children:t.jsx(b,{})})]})]})]})})})}));const z={background:"_background_1qfg6_10",header:"_header_1qfg6_19",logo:"_logo_1qfg6_28",logotext:"_logotext_1qfg6_31",menus:"_menus_1qfg6_36",menublock:"_menublock_1qfg6_45",menublockimg:"_menublockimg_1qfg6_56",menublockselect:"_menublockselect_1qfg6_64",userview:"_userview_1qfg6_68",version:"_version_1qfg6_75",screenEntry:"_screenEntry_1qfg6_85",bottom:"_bottom_1qfg6_101",slider:"_slider_1qfg6_108",menuWrap:"_menuWrap_1qfg6_115",menuIcon:"_menuIcon_1qfg6_127",sliderFooter:"_sliderFooter_1qfg6_139",collapseText:"_collapseText_1qfg6_157",right:"_right_1qfg6_160",route:"_route_1qfg6_169",breadcrumb:"_breadcrumb_1qfg6_175",contentview:"_contentview_1qfg6_178"};x.locale(q),p.object}}}));
@@ -1 +1 @@
1
- import{r as c,u as g,e as f,j as o,O as w}from"./vendor-e7ea3a11.js";import{g as v,P as l}from"./index-2e42b180.js";const _="_background_16kac_10",m="_layoutheaderview_16kac_17",y="_headerbg_16kac_25",b="_layoutcontentview_16kac_31",u={background:_,layoutheaderview:m,headerbg:y,layoutcontentview:b};var h;const E=(h=l.screenWeb)==null?void 0:h.width;var d;const k=(d=l.screenWeb)==null?void 0:d.height,p=1600;function R(){const t=c.useRef(null);g();const a=f(),{width:s,height:i}=c.useMemo(()=>{const{routes:r}=v(a.pathname),n=r[r.length-1],e=n==null?void 0:n.meta;return e!=null&&e.width&&(e!=null&&e.height)?{width:e.width,height:e.height}:{width:E,height:k}},[a.pathname]);return c.useEffect(()=>{const r=new ResizeObserver(()=>{if(!t.current)return;const{parentElement:n}=t.current;if(!n)return;if(s<=p){t.current.style.transform="none";return}const e=n.offsetWidth/s;t.current.style.transform="scale(".concat(e,")")});return r.observe(t.current.parentElement),()=>{r.disconnect()}},[s,i]),o.jsx("div",{style:{width:"100vw",height:"100vh"},children:o.jsx("div",{className:u.background,style:{width:s,height:i},ref:t,children:o.jsx("div",{className:u.layoutcontentview,children:o.jsx(w,{})})})})}export{R as default};
1
+ import{r as c,u as g,e as f,j as o,O as w}from"./vendor-2663c204.js";import{g as v,P as l}from"./index-e4c9d42a.js";const _="_background_16kac_10",m="_layoutheaderview_16kac_17",y="_headerbg_16kac_25",b="_layoutcontentview_16kac_31",u={background:_,layoutheaderview:m,headerbg:y,layoutcontentview:b};var h;const E=(h=l.screenWeb)==null?void 0:h.width;var d;const k=(d=l.screenWeb)==null?void 0:d.height,p=1600;function R(){const t=c.useRef(null);g();const a=f(),{width:s,height:i}=c.useMemo(()=>{const{routes:r}=v(a.pathname),n=r[r.length-1],e=n==null?void 0:n.meta;return e!=null&&e.width&&(e!=null&&e.height)?{width:e.width,height:e.height}:{width:E,height:k}},[a.pathname]);return c.useEffect(()=>{const r=new ResizeObserver(()=>{if(!t.current)return;const{parentElement:n}=t.current;if(!n)return;if(s<=p){t.current.style.transform="none";return}const e=n.offsetWidth/s;t.current.style.transform="scale(".concat(e,")")});return r.observe(t.current.parentElement),()=>{r.disconnect()}},[s,i]),o.jsx("div",{style:{width:"100vw",height:"100vh"},children:o.jsx("div",{className:u.background,style:{width:s,height:i},ref:t,children:o.jsx("div",{className:u.layoutcontentview,children:o.jsx(w,{})})})})}export{R as default};
@@ -1 +1 @@
1
- System.register(["./vendor-legacy-a62a28c9.js","./index-legacy-8c7d1ee7.js"],(function(e,t){"use strict";var n,r,o,a,i,c,s;return{setters:[e=>{n=e.r,r=e.u,o=e.e,a=e.j,i=e.O},e=>{c=e.g,s=e.P}],execute:function(){var t=document.createElement("style");t.textContent="._background_16kac_10{display:flex;flex-direction:column;transform-origin:left top;background-color:#002241;background-size:100% 100%}._background_16kac_10 ._layoutheaderview_16kac_17{position:relative;display:flex;flex-direction:row;width:100%;height:120px;background-size:100% 100%}._background_16kac_10 ._layoutheaderview_16kac_17 ._headerbg_16kac_25{position:absolute;top:25px;left:50%;transform:translate(-50%)}._background_16kac_10 ._layoutcontentview_16kac_31{position:absolute;top:0;right:0;bottom:0;left:0;box-sizing:border-box}\n",document.head.appendChild(t),e("default",(function(){const e=n.useRef(null);r();const t=o(),{width:s,height:_}=n.useMemo((()=>{const{routes:e}=c(t.pathname),n=e[e.length-1],r=n?.meta;return r?.width&&r?.height?{width:r.width,height:r.height}:{width:u,height:h}}),[t.pathname]);return n.useEffect((()=>{const t=new ResizeObserver((()=>{if(!e.current)return;const{parentElement:t}=e.current;if(!t)return;if(s<=l)return void(e.current.style.transform="none");const n=t.offsetWidth/s;e.current.style.transform=`scale(${n})`}));return t.observe(e.current.parentElement),()=>{t.disconnect()}}),[s,_]),a.jsx("div",{style:{width:"100vw",height:"100vh"},children:a.jsx("div",{className:d.background,style:{width:s,height:_},ref:e,children:a.jsx("div",{className:d.layoutcontentview,children:a.jsx(i,{})})})})}));const d={background:"_background_16kac_10",layoutheaderview:"_layoutheaderview_16kac_17",headerbg:"_headerbg_16kac_25",layoutcontentview:"_layoutcontentview_16kac_31"},u=s.screenWeb?.width,h=s.screenWeb?.height,l=1600}}}));
1
+ System.register(["./vendor-legacy-2df23db3.js","./index-legacy-aebba3cb.js"],(function(e,t){"use strict";var n,r,o,a,i,c,s;return{setters:[e=>{n=e.r,r=e.u,o=e.e,a=e.j,i=e.O},e=>{c=e.g,s=e.P}],execute:function(){var t=document.createElement("style");t.textContent="._background_16kac_10{display:flex;flex-direction:column;transform-origin:left top;background-color:#002241;background-size:100% 100%}._background_16kac_10 ._layoutheaderview_16kac_17{position:relative;display:flex;flex-direction:row;width:100%;height:120px;background-size:100% 100%}._background_16kac_10 ._layoutheaderview_16kac_17 ._headerbg_16kac_25{position:absolute;top:25px;left:50%;transform:translate(-50%)}._background_16kac_10 ._layoutcontentview_16kac_31{position:absolute;top:0;right:0;bottom:0;left:0;box-sizing:border-box}\n",document.head.appendChild(t),e("default",(function(){const e=n.useRef(null);r();const t=o(),{width:s,height:_}=n.useMemo((()=>{const{routes:e}=c(t.pathname),n=e[e.length-1],r=n?.meta;return r?.width&&r?.height?{width:r.width,height:r.height}:{width:u,height:h}}),[t.pathname]);return n.useEffect((()=>{const t=new ResizeObserver((()=>{if(!e.current)return;const{parentElement:t}=e.current;if(!t)return;if(s<=l)return void(e.current.style.transform="none");const n=t.offsetWidth/s;e.current.style.transform=`scale(${n})`}));return t.observe(e.current.parentElement),()=>{t.disconnect()}}),[s,_]),a.jsx("div",{style:{width:"100vw",height:"100vh"},children:a.jsx("div",{className:d.background,style:{width:s,height:_},ref:e,children:a.jsx("div",{className:d.layoutcontentview,children:a.jsx(i,{})})})})}));const d={background:"_background_16kac_10",layoutheaderview:"_layoutheaderview_16kac_17",headerbg:"_headerbg_16kac_25",layoutcontentview:"_layoutcontentview_16kac_31"},u=s.screenWeb?.width,h=s.screenWeb?.height,l=1600}}}));
@@ -1 +1 @@
1
- import{a6 as m}from"./vendor-e7ea3a11.js";import"./base-8cbac341.js";import{L as p}from"./echarts-vendor-fdb2c14f.js";const x="#194475",h="#7bc8ff",f="#b8ddff",d="#194475",y="#7bc8ff",s="#b8ddff",S="#194475";function b(t){const n=[];for(let l=0;l<12;l++)n.push({type:"".concat(l+1,"月"),value:200*Math.random()});const r={dimensions:["type","value"],source:n},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:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:{name:"单位:%",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{color:f,fontSize:14,margin:10}},series:{name:"数值",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{borderRadius:[20,20,0,0],color:new p(0,1,0,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])},showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],color:"#e9ebf7"}},dataset:r};return m.merge(o,t),o}function g(t,n){const r=[];for(let e=0;e<12;e++)r.push({type:"".concat(e+1,"月"),...t.reduce((a,c,u)=>(a[c]=(200*Math.random()*(u%2===1?1:-1)).toFixed(2),a),{})});const o={dimensions:["type",...t],source:r},l={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:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,textStyle:{color:s},fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,textStyle:{color:f},fontSize:14,margin:10}},series:[],dataset:o},i=t.map(e=>({name:e,type:"bar",xAxisIndex:0,yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}}));return l.series=i,m.merge(l,n),l}function w(t,n){const r={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:s},splitLine:{show:!0},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{color:f,fontSize:14,margin:10}},yAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},series:{name:"合格率",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{borderRadius:[0,20,20,0],color:new p(0,0,1,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])},showBackground:!0,backgroundStyle:{borderRadius:[0,20,20,0],color:"#e9ebf7"}}};if(m.merge(r,n),!r.dataset){let o=[];t==null||t.forEach(l=>{o.push({type:l,value:(Math.random()*100).toFixed(2)})}),o.length===0&&(o=[{type:"克州",value:20},{type:"乌鲁木齐",value:30},{type:"超高压",value:80},{type:"昌吉",value:22},{type:"吐鲁番",value:20},{type:"奎屯",value:30},{type:"博尔塔拉",value:26},{type:"哈密",value:28}]),r.dataset={dimensions:["type","value"],source:o}}return r}const L=(t,n)=>{const r=[[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0)"}],[{offset:0,color:"rgba(255,255,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}],[{offset:0,color:"rgba(0,180,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}]],o={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:30,containLabel:!0},color:["#00ffab","#ffffff","#00b4ff"],xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:s},splitLine:{show:!0,lineStyle:{type:"dashed",color:S}},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,color:f,fontSize:14,margin:10}},series:[],animation:!0},l=[];if(t.forEach((i,e)=>{l.push({name:i,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}},areaStyle:{normal:{color:new p(0,0,0,1,r[e],!1)}}})}),o.series=l,m.merge(o,n),!o.dataset){const i=[];for(let e=0;e<10;e++){const a={time:e+1};t.forEach(c=>{a[c]=Math.random()*100}),i.push(a)}o.dataset={dimensions:["time",...t],source:i}}return o};function A(t=["预测误差","预测波动"],n={}){const r=["#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:l=>{const[{data:i={},dimensionNames:e=[]}]=l;return"".concat(i.name,"<br /><span>").concat(t[0],":").concat(i[e[0]],"<br />").concat(t[1],":").concat(i[e[1]])}},legend:{show:!1,textStyle:{color:s}},grid:{left:50,right:80,bottom:30,top:30,containLabel:!0},xAxis:{name:t[0],splitLine:{show:!1},axisLine:{lineStyle:{color:d},symbol:["none","arrow"]},axisTick:{show:!1},axisLabel:{show:!1}},yAxis:{name:t[1],nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x},symbol:["none","arrow"]},axisTick:{show:!1},axisLabel:{show:!1}},series:{name:"",type:"scatter",symbol:"circle",symbolSize:20,label:{show:!0,position:"top"},itemStyle:{color(l){let i=l.dataIndex;return i>=6&&(i-=6),r[i]}}}};return m.merge(o,n),o.dataset||(o.dataset={dimensions:["均方误差","平均绝对误差"],source:[{name:"专家修正",平均绝对误差:2.349,均方误差:2.333},{name:"智能AI算法",平均绝对误差:3.333,均方误差:2.333},{name:"自回归移动平均模型",平均绝对误差:4.333,均方误差:5.333}]}),o}function v(t){const n={title:{text:"",left:"center",top:"53%",padding:[24,0]},series:[{name:"",type:"pie",radius:["40%","60%"],label:{formatter:r=>{const{percent:o}=r;return"{black|".concat(r.name,"} {yellow|").concat(r.value,"} {blue|").concat(o,"%}")},padding:[0,-60],height:50,rich:{black:{color:"#333",align:"right",fontSize:14,padding:[4,0],borderColor:"red"},yellow:{color:"#ffc72b",fontSize:16,padding:[5,4],align:"center"},blue:{color:"#28c9db",fontSize:14,align:"center"}}},labelLine:{showAbove:!0,length:60,length2:60,maxSurfaceAngle:0,lineStyle:{color:"#0b5263"}}}]};return m.merge(n,t),n.series[0].data||(n.series[0].data=[{value:260,name:"测试1"},{value:103,name:"测试2"},{value:63,name:"测试3"},{value:53,name:"测试4"},{value:48,name:"测试5"},{value:233,name:"测试6"}]),n}function z(t=["容量","同期","上一周期"],n=["同比","环比","占总比重"],r={}){const o={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},color:["#00b4ff","#ffffff","#00ffab"],xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:[{name:"单位:千瓦时",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,color:f,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:s},min:-10,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,color:f,fontSize:14,margin:10}}],animation:!0,series:[]},l=[];if(t.forEach(i=>{l.push({name:i,type:"bar",yAxisIndex:0})}),n.forEach(i=>{l.push({name:i,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})}),o.series=l,m.merge(o,r),!o.dataset){const i=[];for(let e=0;e<30;e++){const a={time:e+1};t.forEach(c=>{a[c]=(Math.random()*500).toFixed(2)}),n.forEach(c=>{a[c]=(Math.random()*100).toFixed(2)}),i.push(a)}o.dataset={dimensions:["time",...t,...n],source:i}}return o}function k(t,n,r){const o=[];for(let a=0;a<10;a++){const c={time:a+1};t.forEach(u=>{c[u]=(Math.random()*500).toFixed(2)}),n.forEach(u=>{c[u]=(Math.random()*100).toFixed(2)}),o.push(c)}const l={dimensions:["time",...t,...n],source:o},i={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},color:["#00b4ff","#ffffff","#00ffab"],xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,textStyle:{color:s},fontSize:14,margin:10}},yAxis:[{name:"单位:万户",nameTextStyle:{color:f},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,textStyle:{color:f},fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:f},min:0,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,textStyle:{color:f},fontSize:14,margin:10}}],animation:!0,series:[],dataset:l},e=[];return t.forEach(a=>{e.push({name:a,type:"bar",barWidth:"30%",yAxisIndex:0,stack:!0})}),n.forEach(a=>{e.push({name:a,yAxisIndex:1,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}},areaStyle:{normal:{color:new p(0,0,0,1,[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0.8)"}],!1)}}})}),i.series=e,m.merge(i,r),i}function T(t,n){const r=[{name:"智能AI算法",value:[1.45,1.96]},{name:"专家修正",value:[2.39,3.81]},{name:"XGBoost",value:[3.84,4.26]}],o=()=>{let e=0;return t.forEach(a=>{e+=a.value[0]}),(e/t.length).toFixed(2)},l=()=>{let e=0;return t.forEach(a=>{e+=a.value[1]}),(e/t.length).toFixed(2)},i={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=>'<div style="border-bottom: 1px solid rgba(255,255,255,.3); font-size: 18px;padding-bottom: 7px;margin-bottom: 7px">'.concat(e.name,"</div><span>预测误差</span> : ").concat(e.data.value[0],"<br/><span>预测波动</span> : ").concat(e.data.value[1])},xAxis:{name:"预测误差",type:"value",scale:!0,splitLine:{show:!1},axisLine:{lineStyle:{color:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,textStyle:{color:s},fontSize:14,margin:10}},yAxis:{name:"预测波动",nameTextStyle:{color:f},type:"value",scale:!0,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,textStyle:{color:f},fontSize:14,margin:10}},series:[{type:"scatter",data:t||r,symbolSize:20,markLine:{label:{normal:{formatter(e){return e.name}}},lineStyle:{normal:{color:"#626c91",type:"solid",width:1},emphasis:{color:"#d9def7"}},data:[{xAxis:o(),name:"预测误差平均水平",label:{color:"red"}},{yAxis:l(),name:"预测波动平均水平",label:{color:"red"}}]}}]};return m.merge(i,n),i}function E(t=["容量","同期","上一周期"],n=["同比","环比","占总比重"],r={}){const o=[[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0)"}],[{offset:0,color:"rgba(255,255,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}],[{offset:0,color:"rgba(0,180,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}]],l={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10,rotate:60}},yAxis:[{name:"单位:千瓦时",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,color:f,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:s},min:0,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,color:f,fontSize:14,margin:10}}],color:["#00ffab","#ffffff","#00b4ff"],animation:!0,series:[]},i=[];if(t.forEach(e=>{i.push({name:e,type:"bar",showBackground:!1,yAxisIndex:0,itemStyle:{color:"#06dbff"}})}),n.forEach((e,a)=>{i.push({name:e,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:10,lineStyle:{width:2},itemStyle:{normal:{borderWidth:2}},areaStyle:{normal:{color:new p(0,0,0,1,o[a],!1)}}})}),l.series=i,m.merge(l,r),!l.dataset){const e=[];for(let a=0;a<10;a++){const c={time:a+1};t.forEach(u=>{c[u]=(Math.random()*500).toFixed(2)}),n.forEach(u=>{c[u]=(Math.random()*100).toFixed(2)}),e.push(c)}l.dataset={dimensions:["time",...t,...n],source:e}}return l}function B(t=["容量","同期","上一周期"],n=["同比","环比","占总比重"],r={}){const o={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},color:["#ffffff","#00b4ff","#00ffab"],grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:[{name:"单位:千瓦时",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,color:f,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:s},min:0,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,color:f,fontSize:14,margin:10}}],animation:!0,series:[]},l=[];if(t.forEach(i=>{l.push({name:i,type:"bar",yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:0,show:!0,color:"rgba(0,0,0,0)",borderColor:"#194475",borderWidth:1}})}),n.forEach(i=>{l.push({name:i,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}},lineStyle:{color:"#00ffab",width:2},itemStyle:{normal:{color:"#fff",borderColor:"#00ffab",borderWidth:2}},areaStyle:{normal:{color:new p(0,0,0,1,[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0.8)"}],!1)}}})}),o.series=l,m.merge(o,r),!o.dataset){const i=[];for(let e=0;e<10;e++){const a={time:e+1};t.forEach(c=>{a[c]=(Math.random()*500).toFixed(2)}),n.forEach(c=>{a[c]=(Math.random()*100).toFixed(2)}),i.push(a)}o.dataset={dimensions:["time",...t,...n],source:i}}return o}const O=Object.freeze(Object.defineProperty({__proto__:null,getBarAndBgLineOption:E,getBarAndLineOption:z,getBarStackAndLineOption:k,getBaseBarChartOption:b,getBaseBarRollbackChartOption:w,getBgBarAndLineOption:B,getLineChartOption:L,getMultiBarChartOption:g,getPieChartOption:v,getScatterChartOption:A,getScatterPlotOption:T},Symbol.toStringTag,{value:"Module"}));export{O as S,v as a,z as b,b as g};
1
+ import{a6 as m}from"./vendor-2663c204.js";import"./base-5bf689c3.js";import{L as p}from"./echarts-vendor-d6ce4b9c.js";const x="#194475",h="#7bc8ff",f="#b8ddff",d="#194475",y="#7bc8ff",s="#b8ddff",S="#194475";function b(t){const n=[];for(let l=0;l<12;l++)n.push({type:"".concat(l+1,"月"),value:200*Math.random()});const r={dimensions:["type","value"],source:n},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:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:{name:"单位:%",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{color:f,fontSize:14,margin:10}},series:{name:"数值",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{borderRadius:[20,20,0,0],color:new p(0,1,0,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])},showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],color:"#e9ebf7"}},dataset:r};return m.merge(o,t),o}function g(t,n){const r=[];for(let e=0;e<12;e++)r.push({type:"".concat(e+1,"月"),...t.reduce((a,c,u)=>(a[c]=(200*Math.random()*(u%2===1?1:-1)).toFixed(2),a),{})});const o={dimensions:["type",...t],source:r},l={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:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,textStyle:{color:s},fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,textStyle:{color:f},fontSize:14,margin:10}},series:[],dataset:o},i=t.map(e=>({name:e,type:"bar",xAxisIndex:0,yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}}));return l.series=i,m.merge(l,n),l}function w(t,n){const r={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:s},splitLine:{show:!0},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{color:f,fontSize:14,margin:10}},yAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},series:{name:"合格率",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{borderRadius:[0,20,20,0],color:new p(0,0,1,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])},showBackground:!0,backgroundStyle:{borderRadius:[0,20,20,0],color:"#e9ebf7"}}};if(m.merge(r,n),!r.dataset){let o=[];t==null||t.forEach(l=>{o.push({type:l,value:(Math.random()*100).toFixed(2)})}),o.length===0&&(o=[{type:"克州",value:20},{type:"乌鲁木齐",value:30},{type:"超高压",value:80},{type:"昌吉",value:22},{type:"吐鲁番",value:20},{type:"奎屯",value:30},{type:"博尔塔拉",value:26},{type:"哈密",value:28}]),r.dataset={dimensions:["type","value"],source:o}}return r}const L=(t,n)=>{const r=[[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0)"}],[{offset:0,color:"rgba(255,255,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}],[{offset:0,color:"rgba(0,180,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}]],o={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:30,containLabel:!0},color:["#00ffab","#ffffff","#00b4ff"],xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:s},splitLine:{show:!0,lineStyle:{type:"dashed",color:S}},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,color:f,fontSize:14,margin:10}},series:[],animation:!0},l=[];if(t.forEach((i,e)=>{l.push({name:i,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}},areaStyle:{normal:{color:new p(0,0,0,1,r[e],!1)}}})}),o.series=l,m.merge(o,n),!o.dataset){const i=[];for(let e=0;e<10;e++){const a={time:e+1};t.forEach(c=>{a[c]=Math.random()*100}),i.push(a)}o.dataset={dimensions:["time",...t],source:i}}return o};function A(t=["预测误差","预测波动"],n={}){const r=["#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:l=>{const[{data:i={},dimensionNames:e=[]}]=l;return"".concat(i.name,"<br /><span>").concat(t[0],":").concat(i[e[0]],"<br />").concat(t[1],":").concat(i[e[1]])}},legend:{show:!1,textStyle:{color:s}},grid:{left:50,right:80,bottom:30,top:30,containLabel:!0},xAxis:{name:t[0],splitLine:{show:!1},axisLine:{lineStyle:{color:d},symbol:["none","arrow"]},axisTick:{show:!1},axisLabel:{show:!1}},yAxis:{name:t[1],nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x},symbol:["none","arrow"]},axisTick:{show:!1},axisLabel:{show:!1}},series:{name:"",type:"scatter",symbol:"circle",symbolSize:20,label:{show:!0,position:"top"},itemStyle:{color(l){let i=l.dataIndex;return i>=6&&(i-=6),r[i]}}}};return m.merge(o,n),o.dataset||(o.dataset={dimensions:["均方误差","平均绝对误差"],source:[{name:"专家修正",平均绝对误差:2.349,均方误差:2.333},{name:"智能AI算法",平均绝对误差:3.333,均方误差:2.333},{name:"自回归移动平均模型",平均绝对误差:4.333,均方误差:5.333}]}),o}function v(t){const n={title:{text:"",left:"center",top:"53%",padding:[24,0]},series:[{name:"",type:"pie",radius:["40%","60%"],label:{formatter:r=>{const{percent:o}=r;return"{black|".concat(r.name,"} {yellow|").concat(r.value,"} {blue|").concat(o,"%}")},padding:[0,-60],height:50,rich:{black:{color:"#333",align:"right",fontSize:14,padding:[4,0],borderColor:"red"},yellow:{color:"#ffc72b",fontSize:16,padding:[5,4],align:"center"},blue:{color:"#28c9db",fontSize:14,align:"center"}}},labelLine:{showAbove:!0,length:60,length2:60,maxSurfaceAngle:0,lineStyle:{color:"#0b5263"}}}]};return m.merge(n,t),n.series[0].data||(n.series[0].data=[{value:260,name:"测试1"},{value:103,name:"测试2"},{value:63,name:"测试3"},{value:53,name:"测试4"},{value:48,name:"测试5"},{value:233,name:"测试6"}]),n}function z(t=["容量","同期","上一周期"],n=["同比","环比","占总比重"],r={}){const o={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},color:["#00b4ff","#ffffff","#00ffab"],xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:[{name:"单位:千瓦时",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,color:f,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:s},min:-10,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,color:f,fontSize:14,margin:10}}],animation:!0,series:[]},l=[];if(t.forEach(i=>{l.push({name:i,type:"bar",yAxisIndex:0})}),n.forEach(i=>{l.push({name:i,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})}),o.series=l,m.merge(o,r),!o.dataset){const i=[];for(let e=0;e<30;e++){const a={time:e+1};t.forEach(c=>{a[c]=(Math.random()*500).toFixed(2)}),n.forEach(c=>{a[c]=(Math.random()*100).toFixed(2)}),i.push(a)}o.dataset={dimensions:["time",...t,...n],source:i}}return o}function k(t,n,r){const o=[];for(let a=0;a<10;a++){const c={time:a+1};t.forEach(u=>{c[u]=(Math.random()*500).toFixed(2)}),n.forEach(u=>{c[u]=(Math.random()*100).toFixed(2)}),o.push(c)}const l={dimensions:["time",...t,...n],source:o},i={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},color:["#00b4ff","#ffffff","#00ffab"],xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,textStyle:{color:s},fontSize:14,margin:10}},yAxis:[{name:"单位:万户",nameTextStyle:{color:f},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,textStyle:{color:f},fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:f},min:0,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,textStyle:{color:f},fontSize:14,margin:10}}],animation:!0,series:[],dataset:l},e=[];return t.forEach(a=>{e.push({name:a,type:"bar",barWidth:"30%",yAxisIndex:0,stack:!0})}),n.forEach(a=>{e.push({name:a,yAxisIndex:1,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}},areaStyle:{normal:{color:new p(0,0,0,1,[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0.8)"}],!1)}}})}),i.series=e,m.merge(i,r),i}function T(t,n){const r=[{name:"智能AI算法",value:[1.45,1.96]},{name:"专家修正",value:[2.39,3.81]},{name:"XGBoost",value:[3.84,4.26]}],o=()=>{let e=0;return t.forEach(a=>{e+=a.value[0]}),(e/t.length).toFixed(2)},l=()=>{let e=0;return t.forEach(a=>{e+=a.value[1]}),(e/t.length).toFixed(2)},i={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=>'<div style="border-bottom: 1px solid rgba(255,255,255,.3); font-size: 18px;padding-bottom: 7px;margin-bottom: 7px">'.concat(e.name,"</div><span>预测误差</span> : ").concat(e.data.value[0],"<br/><span>预测波动</span> : ").concat(e.data.value[1])},xAxis:{name:"预测误差",type:"value",scale:!0,splitLine:{show:!1},axisLine:{lineStyle:{color:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,textStyle:{color:s},fontSize:14,margin:10}},yAxis:{name:"预测波动",nameTextStyle:{color:f},type:"value",scale:!0,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,textStyle:{color:f},fontSize:14,margin:10}},series:[{type:"scatter",data:t||r,symbolSize:20,markLine:{label:{normal:{formatter(e){return e.name}}},lineStyle:{normal:{color:"#626c91",type:"solid",width:1},emphasis:{color:"#d9def7"}},data:[{xAxis:o(),name:"预测误差平均水平",label:{color:"red"}},{yAxis:l(),name:"预测波动平均水平",label:{color:"red"}}]}}]};return m.merge(i,n),i}function E(t=["容量","同期","上一周期"],n=["同比","环比","占总比重"],r={}){const o=[[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0)"}],[{offset:0,color:"rgba(255,255,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}],[{offset:0,color:"rgba(0,180,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}]],l={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10,rotate:60}},yAxis:[{name:"单位:千瓦时",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,color:f,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:s},min:0,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,color:f,fontSize:14,margin:10}}],color:["#00ffab","#ffffff","#00b4ff"],animation:!0,series:[]},i=[];if(t.forEach(e=>{i.push({name:e,type:"bar",showBackground:!1,yAxisIndex:0,itemStyle:{color:"#06dbff"}})}),n.forEach((e,a)=>{i.push({name:e,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:10,lineStyle:{width:2},itemStyle:{normal:{borderWidth:2}},areaStyle:{normal:{color:new p(0,0,0,1,o[a],!1)}}})}),l.series=i,m.merge(l,r),!l.dataset){const e=[];for(let a=0;a<10;a++){const c={time:a+1};t.forEach(u=>{c[u]=(Math.random()*500).toFixed(2)}),n.forEach(u=>{c[u]=(Math.random()*100).toFixed(2)}),e.push(c)}l.dataset={dimensions:["time",...t,...n],source:e}}return l}function B(t=["容量","同期","上一周期"],n=["同比","环比","占总比重"],r={}){const o={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},color:["#ffffff","#00b4ff","#00ffab"],grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:d}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:y},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:[{name:"单位:千瓦时",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,color:f,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:s},min:0,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:x}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:h}},axisLabel:{interval:0,color:f,fontSize:14,margin:10}}],animation:!0,series:[]},l=[];if(t.forEach(i=>{l.push({name:i,type:"bar",yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:0,show:!0,color:"rgba(0,0,0,0)",borderColor:"#194475",borderWidth:1}})}),n.forEach(i=>{l.push({name:i,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}},lineStyle:{color:"#00ffab",width:2},itemStyle:{normal:{color:"#fff",borderColor:"#00ffab",borderWidth:2}},areaStyle:{normal:{color:new p(0,0,0,1,[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0.8)"}],!1)}}})}),o.series=l,m.merge(o,r),!o.dataset){const i=[];for(let e=0;e<10;e++){const a={time:e+1};t.forEach(c=>{a[c]=(Math.random()*500).toFixed(2)}),n.forEach(c=>{a[c]=(Math.random()*100).toFixed(2)}),i.push(a)}o.dataset={dimensions:["time",...t,...n],source:i}}return o}const O=Object.freeze(Object.defineProperty({__proto__:null,getBarAndBgLineOption:E,getBarAndLineOption:z,getBarStackAndLineOption:k,getBaseBarChartOption:b,getBaseBarRollbackChartOption:w,getBgBarAndLineOption:B,getLineChartOption:L,getMultiBarChartOption:g,getPieChartOption:v,getScatterChartOption:A,getScatterPlotOption:T},Symbol.toStringTag,{value:"Module"}));export{O as S,v as a,z as b,b as g};
@@ -1 +1 @@
1
- System.register(["./vendor-legacy-a62a28c9.js","./base-legacy-ee9fb316.js","./echarts-vendor-legacy-e99e5121.js"],(function(e,t){"use strict";var o,i;return{setters:[e=>{o=e.a6},null,e=>{i=e.L}],execute:function(){e({a:h,b:x,g:c});const t="#194475",l="#7bc8ff",a="#b8ddff",n="#194475",r="#7bc8ff",s="#b8ddff";function c(e){const c=[];for(let t=0;t<12;t++)c.push({type:`${t+1}月`,value:200*Math.random()});const h={dimensions:["type","value"],source:c},x={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:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:{name:"单位:%",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{color:a,fontSize:14,margin:10}},series:{name:"数值",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{borderRadius:[20,20,0,0],color:new i(0,1,0,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])},showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],color:"#e9ebf7"}},dataset:h};return o.merge(x,e),x}function h(e){const t={title:{text:"",left:"center",top:"53%",padding:[24,0]},series:[{name:"",type:"pie",radius:["40%","60%"],label:{formatter:e=>{const{percent:t}=e;return`{black|${e.name}} {yellow|${e.value}} {blue|${t}%}`},padding:[0,-60],height:50,rich:{black:{color:"#333",align:"right",fontSize:14,padding:[4,0],borderColor:"red"},yellow:{color:"#ffc72b",fontSize:16,padding:[5,4],align:"center"},blue:{color:"#28c9db",fontSize:14,align:"center"}}},labelLine:{showAbove:!0,length:60,length2:60,maxSurfaceAngle:0,lineStyle:{color:"#0b5263"}}}]};return o.merge(t,e),t.series[0].data||(t.series[0].data=[{value:260,name:"测试1"},{value:103,name:"测试2"},{value:63,name:"测试3"},{value:53,name:"测试4"},{value:48,name:"测试5"},{value:233,name:"测试6"}]),t}function x(e=["容量","同期","上一周期"],i=["同比","环比","占总比重"],c={}){const h={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},color:["#00b4ff","#ffffff","#00ffab"],xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:[{name:"单位:千瓦时",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,color:a,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:s},min:-10,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,color:a,fontSize:14,margin:10}}],animation:!0,series:[]},x=[];if(e.forEach((e=>{x.push({name:e,type:"bar",yAxisIndex:0})})),i.forEach((e=>{x.push({name:e,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})})),h.series=x,o.merge(h,c),!h.dataset){const t=[];for(let o=0;o<30;o++){const l={time:o+1};e.forEach((e=>{l[e]=(500*Math.random()).toFixed(2)})),i.forEach((e=>{l[e]=(100*Math.random()).toFixed(2)})),t.push(l)}h.dataset={dimensions:["time",...e,...i],source:t}}return h}const y=Object.freeze(Object.defineProperty({__proto__:null,getBarAndBgLineOption:function(e=["容量","同期","上一周期"],c=["同比","环比","占总比重"],h={}){const x=[[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0)"}],[{offset:0,color:"rgba(255,255,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}],[{offset:0,color:"rgba(0,180,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}]],y={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10,rotate:60}},yAxis:[{name:"单位:千瓦时",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,color:a,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:s},min:0,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,color:a,fontSize:14,margin:10}}],color:["#00ffab","#ffffff","#00b4ff"],animation:!0,series:[]},f=[];if(e.forEach((e=>{f.push({name:e,type:"bar",showBackground:!1,yAxisIndex:0,itemStyle:{color:"#06dbff"}})})),c.forEach(((e,t)=>{f.push({name:e,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:10,lineStyle:{width:2},itemStyle:{normal:{borderWidth:2}},areaStyle:{normal:{color:new i(0,0,0,1,x[t],!1)}}})})),y.series=f,o.merge(y,h),!y.dataset){const t=[];for(let o=0;o<10;o++){const i={time:o+1};e.forEach((e=>{i[e]=(500*Math.random()).toFixed(2)})),c.forEach((e=>{i[e]=(100*Math.random()).toFixed(2)})),t.push(i)}y.dataset={dimensions:["time",...e,...c],source:t}}return y},getBarAndLineOption:x,getBarStackAndLineOption:function(e,c,h){const x=[];for(let t=0;t<10;t++){const o={time:t+1};e.forEach((e=>{o[e]=(500*Math.random()).toFixed(2)})),c.forEach((e=>{o[e]=(100*Math.random()).toFixed(2)})),x.push(o)}const y={dimensions:["time",...e,...c],source:x},f={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},color:["#00b4ff","#ffffff","#00ffab"],xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,textStyle:{color:s},fontSize:14,margin:10}},yAxis:[{name:"单位:万户",nameTextStyle:{color:a},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,textStyle:{color:a},fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:a},min:0,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,textStyle:{color:a},fontSize:14,margin:10}}],animation:!0,series:[],dataset:y},m=[];return e.forEach((e=>{m.push({name:e,type:"bar",barWidth:"30%",yAxisIndex:0,stack:!0})})),c.forEach((e=>{m.push({name:e,yAxisIndex:1,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}},areaStyle:{normal:{color:new i(0,0,0,1,[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0.8)"}],!1)}}})})),f.series=m,o.merge(f,h),f},getBaseBarChartOption:c,getBaseBarRollbackChartOption:function(e,c){const h={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:s},splitLine:{show:!0},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{color:a,fontSize:14,margin:10}},yAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},series:{name:"合格率",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{borderRadius:[0,20,20,0],color:new i(0,0,1,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])},showBackground:!0,backgroundStyle:{borderRadius:[0,20,20,0],color:"#e9ebf7"}}};if(o.merge(h,c),!h.dataset){let t=[];e?.forEach((e=>{t.push({type:e,value:(100*Math.random()).toFixed(2)})})),0===t.length&&(t=[{type:"克州",value:20},{type:"乌鲁木齐",value:30},{type:"超高压",value:80},{type:"昌吉",value:22},{type:"吐鲁番",value:20},{type:"奎屯",value:30},{type:"博尔塔拉",value:26},{type:"哈密",value:28}]),h.dataset={dimensions:["type","value"],source:t}}return h},getBgBarAndLineOption:function(e=["容量","同期","上一周期"],c=["同比","环比","占总比重"],h={}){const x={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},color:["#ffffff","#00b4ff","#00ffab"],grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:[{name:"单位:千瓦时",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,color:a,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:s},min:0,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,color:a,fontSize:14,margin:10}}],animation:!0,series:[]},y=[];if(e.forEach((e=>{y.push({name:e,type:"bar",yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:0,show:!0,color:"rgba(0,0,0,0)",borderColor:"#194475",borderWidth:1}})})),c.forEach((e=>{y.push({name:e,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}},lineStyle:{color:"#00ffab",width:2},itemStyle:{normal:{color:"#fff",borderColor:"#00ffab",borderWidth:2}},areaStyle:{normal:{color:new i(0,0,0,1,[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0.8)"}],!1)}}})})),x.series=y,o.merge(x,h),!x.dataset){const t=[];for(let o=0;o<10;o++){const i={time:o+1};e.forEach((e=>{i[e]=(500*Math.random()).toFixed(2)})),c.forEach((e=>{i[e]=(100*Math.random()).toFixed(2)})),t.push(i)}x.dataset={dimensions:["time",...e,...c],source:t}}return x},getLineChartOption:(e,c)=>{const h=[[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0)"}],[{offset:0,color:"rgba(255,255,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}],[{offset:0,color:"rgba(0,180,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}]],x={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:30,containLabel:!0},color:["#00ffab","#ffffff","#00b4ff"],xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:s},splitLine:{show:!0,lineStyle:{type:"dashed",color:"#194475"}},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,color:a,fontSize:14,margin:10}},series:[],animation:!0},y=[];if(e.forEach(((e,t)=>{y.push({name:e,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}},areaStyle:{normal:{color:new i(0,0,0,1,h[t],!1)}}})})),x.series=y,o.merge(x,c),!x.dataset){const t=[];for(let o=0;o<10;o++){const i={time:o+1};e.forEach((e=>{i[e]=100*Math.random()})),t.push(i)}x.dataset={dimensions:["time",...e],source:t}}return x},getMultiBarChartOption:function(e,i){const c=[];for(let t=0;t<12;t++)c.push({type:`${t+1}月`,...e.reduce(((e,t,o)=>(e[t]=(200*Math.random()*(o%2==1?1:-1)).toFixed(2),e)),{})});const h={dimensions:["type",...e],source:c},x={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:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,textStyle:{color:s},fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,textStyle:{color:a},fontSize:14,margin:10}},series:[],dataset:h},y=e.map((e=>({name:e,type:"bar",xAxisIndex:0,yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}})));return x.series=y,o.merge(x,i),x},getPieChartOption:h,getScatterChartOption:function(e=["预测误差","预测波动"],i={}){const l=["#ffba00","#2759a4","#ff7e00","#6fbd6b","#50abdf","#7181d0","#ac77ce"],a={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,textStyle:{color:s}},grid:{left:50,right:80,bottom:30,top:30,containLabel:!0},xAxis:{name:e[0],splitLine:{show:!1},axisLine:{lineStyle:{color:n},symbol:["none","arrow"]},axisTick:{show:!1},axisLabel:{show:!1}},yAxis:{name:e[1],nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t},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),l[t]}}}};return o.merge(a,i),a.dataset||(a.dataset={dimensions:["均方误差","平均绝对误差"],source:[{name:"专家修正","平均绝对误差":2.349,"均方误差":2.333},{name:"智能AI算法","平均绝对误差":3.333,"均方误差":2.333},{name:"自回归移动平均模型","平均绝对误差":4.333,"均方误差":5.333}]}),a},getScatterPlotOption:function(e,i){const c={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=>`<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:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,textStyle:{color:s},fontSize:14,margin:10}},yAxis:{name:"预测波动",nameTextStyle:{color:a},type:"value",scale:!0,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,textStyle:{color:a},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:(()=>{let t=0;return e.forEach((e=>{t+=e.value[0]})),(t/e.length).toFixed(2)})(),name:"预测误差平均水平",label:{color:"red"}},{yAxis:(()=>{let t=0;return e.forEach((e=>{t+=e.value[1]})),(t/e.length).toFixed(2)})(),name:"预测波动平均水平",label:{color:"red"}}]}}]};return o.merge(c,i),c}},Symbol.toStringTag,{value:"Module"}));e("S",y)}}}));
1
+ System.register(["./vendor-legacy-2df23db3.js","./base-legacy-d3323277.js","./echarts-vendor-legacy-79597af6.js"],(function(e,t){"use strict";var o,i;return{setters:[e=>{o=e.a6},null,e=>{i=e.L}],execute:function(){e({a:h,b:x,g:c});const t="#194475",l="#7bc8ff",a="#b8ddff",n="#194475",r="#7bc8ff",s="#b8ddff";function c(e){const c=[];for(let t=0;t<12;t++)c.push({type:`${t+1}月`,value:200*Math.random()});const h={dimensions:["type","value"],source:c},x={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:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:{name:"单位:%",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{color:a,fontSize:14,margin:10}},series:{name:"数值",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{borderRadius:[20,20,0,0],color:new i(0,1,0,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])},showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],color:"#e9ebf7"}},dataset:h};return o.merge(x,e),x}function h(e){const t={title:{text:"",left:"center",top:"53%",padding:[24,0]},series:[{name:"",type:"pie",radius:["40%","60%"],label:{formatter:e=>{const{percent:t}=e;return`{black|${e.name}} {yellow|${e.value}} {blue|${t}%}`},padding:[0,-60],height:50,rich:{black:{color:"#333",align:"right",fontSize:14,padding:[4,0],borderColor:"red"},yellow:{color:"#ffc72b",fontSize:16,padding:[5,4],align:"center"},blue:{color:"#28c9db",fontSize:14,align:"center"}}},labelLine:{showAbove:!0,length:60,length2:60,maxSurfaceAngle:0,lineStyle:{color:"#0b5263"}}}]};return o.merge(t,e),t.series[0].data||(t.series[0].data=[{value:260,name:"测试1"},{value:103,name:"测试2"},{value:63,name:"测试3"},{value:53,name:"测试4"},{value:48,name:"测试5"},{value:233,name:"测试6"}]),t}function x(e=["容量","同期","上一周期"],i=["同比","环比","占总比重"],c={}){const h={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},color:["#00b4ff","#ffffff","#00ffab"],xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:[{name:"单位:千瓦时",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,color:a,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:s},min:-10,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,color:a,fontSize:14,margin:10}}],animation:!0,series:[]},x=[];if(e.forEach((e=>{x.push({name:e,type:"bar",yAxisIndex:0})})),i.forEach((e=>{x.push({name:e,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}}})})),h.series=x,o.merge(h,c),!h.dataset){const t=[];for(let o=0;o<30;o++){const l={time:o+1};e.forEach((e=>{l[e]=(500*Math.random()).toFixed(2)})),i.forEach((e=>{l[e]=(100*Math.random()).toFixed(2)})),t.push(l)}h.dataset={dimensions:["time",...e,...i],source:t}}return h}const y=Object.freeze(Object.defineProperty({__proto__:null,getBarAndBgLineOption:function(e=["容量","同期","上一周期"],c=["同比","环比","占总比重"],h={}){const x=[[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0)"}],[{offset:0,color:"rgba(255,255,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}],[{offset:0,color:"rgba(0,180,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}]],y={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10,rotate:60}},yAxis:[{name:"单位:千瓦时",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,color:a,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:s},min:0,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,color:a,fontSize:14,margin:10}}],color:["#00ffab","#ffffff","#00b4ff"],animation:!0,series:[]},f=[];if(e.forEach((e=>{f.push({name:e,type:"bar",showBackground:!1,yAxisIndex:0,itemStyle:{color:"#06dbff"}})})),c.forEach(((e,t)=>{f.push({name:e,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:10,lineStyle:{width:2},itemStyle:{normal:{borderWidth:2}},areaStyle:{normal:{color:new i(0,0,0,1,x[t],!1)}}})})),y.series=f,o.merge(y,h),!y.dataset){const t=[];for(let o=0;o<10;o++){const i={time:o+1};e.forEach((e=>{i[e]=(500*Math.random()).toFixed(2)})),c.forEach((e=>{i[e]=(100*Math.random()).toFixed(2)})),t.push(i)}y.dataset={dimensions:["time",...e,...c],source:t}}return y},getBarAndLineOption:x,getBarStackAndLineOption:function(e,c,h){const x=[];for(let t=0;t<10;t++){const o={time:t+1};e.forEach((e=>{o[e]=(500*Math.random()).toFixed(2)})),c.forEach((e=>{o[e]=(100*Math.random()).toFixed(2)})),x.push(o)}const y={dimensions:["time",...e,...c],source:x},f={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},color:["#00b4ff","#ffffff","#00ffab"],xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,textStyle:{color:s},fontSize:14,margin:10}},yAxis:[{name:"单位:万户",nameTextStyle:{color:a},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,textStyle:{color:a},fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:a},min:0,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,textStyle:{color:a},fontSize:14,margin:10}}],animation:!0,series:[],dataset:y},m=[];return e.forEach((e=>{m.push({name:e,type:"bar",barWidth:"30%",yAxisIndex:0,stack:!0})})),c.forEach((e=>{m.push({name:e,yAxisIndex:1,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}},areaStyle:{normal:{color:new i(0,0,0,1,[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0.8)"}],!1)}}})})),f.series=m,o.merge(f,h),f},getBaseBarChartOption:c,getBaseBarRollbackChartOption:function(e,c){const h={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:s},splitLine:{show:!0},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{color:a,fontSize:14,margin:10}},yAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},series:{name:"合格率",type:"bar",barWidth:"30%",xAxisIndex:0,yAxisIndex:0,itemStyle:{borderRadius:[0,20,20,0],color:new i(0,0,1,0,[{offset:0,color:"#67c8ff"},{offset:1,color:"#1158b9"}])},showBackground:!0,backgroundStyle:{borderRadius:[0,20,20,0],color:"#e9ebf7"}}};if(o.merge(h,c),!h.dataset){let t=[];e?.forEach((e=>{t.push({type:e,value:(100*Math.random()).toFixed(2)})})),0===t.length&&(t=[{type:"克州",value:20},{type:"乌鲁木齐",value:30},{type:"超高压",value:80},{type:"昌吉",value:22},{type:"吐鲁番",value:20},{type:"奎屯",value:30},{type:"博尔塔拉",value:26},{type:"哈密",value:28}]),h.dataset={dimensions:["type","value"],source:t}}return h},getBgBarAndLineOption:function(e=["容量","同期","上一周期"],c=["同比","环比","占总比重"],h={}){const x={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{show:!0,textStyle:{color:s}},color:["#ffffff","#00b4ff","#00ffab"],grid:{left:10,right:0,bottom:0,top:50,containLabel:!0},xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:[{name:"单位:千瓦时",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,color:a,fontSize:14,margin:10}},{name:"单位:%",nameTextStyle:{color:s},min:0,max:100,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,color:a,fontSize:14,margin:10}}],animation:!0,series:[]},y=[];if(e.forEach((e=>{y.push({name:e,type:"bar",yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:0,show:!0,color:"rgba(0,0,0,0)",borderColor:"#194475",borderWidth:1}})})),c.forEach((e=>{y.push({name:e,yAxisIndex:1,type:"line",showAllSymbol:!1,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}},lineStyle:{color:"#00ffab",width:2},itemStyle:{normal:{color:"#fff",borderColor:"#00ffab",borderWidth:2}},areaStyle:{normal:{color:new i(0,0,0,1,[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0.8)"}],!1)}}})})),x.series=y,o.merge(x,h),!x.dataset){const t=[];for(let o=0;o<10;o++){const i={time:o+1};e.forEach((e=>{i[e]=(500*Math.random()).toFixed(2)})),c.forEach((e=>{i[e]=(100*Math.random()).toFixed(2)})),t.push(i)}x.dataset={dimensions:["time",...e,...c],source:t}}return x},getLineChartOption:(e,c)=>{const h=[[{offset:0,color:"rgba(0,255,171, 0.8)"},{offset:1,color:"rgba(59,103,89,0)"}],[{offset:0,color:"rgba(255,255,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}],[{offset:0,color:"rgba(0,180,255, 0.8)"},{offset:1,color:"rgba(255,255,255, 0)"}]],x={title:{text:"",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{opacity:0}}},legend:{show:!0,textStyle:{color:s}},grid:{left:10,right:0,bottom:0,top:30,containLabel:!0},color:["#00ffab","#ffffff","#00b4ff"],xAxis:{splitLine:{show:!1},type:"category",axisLine:{lineStyle:{color:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,color:s,fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:s},splitLine:{show:!0,lineStyle:{type:"dashed",color:"#194475"}},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,color:a,fontSize:14,margin:10}},series:[],animation:!0},y=[];if(e.forEach(((e,t)=>{y.push({name:e,type:"line",showAllSymbol:!0,symbol:"circle",symbolSize:0,label:{show:!1,position:"top",textStyle:{color:"#148c90"}},areaStyle:{normal:{color:new i(0,0,0,1,h[t],!1)}}})})),x.series=y,o.merge(x,c),!x.dataset){const t=[];for(let o=0;o<10;o++){const i={time:o+1};e.forEach((e=>{i[e]=100*Math.random()})),t.push(i)}x.dataset={dimensions:["time",...e],source:t}}return x},getMultiBarChartOption:function(e,i){const c=[];for(let t=0;t<12;t++)c.push({type:`${t+1}月`,...e.reduce(((e,t,o)=>(e[t]=(200*Math.random()*(o%2==1?1:-1)).toFixed(2),e)),{})});const h={dimensions:["type",...e],source:c},x={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:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,textStyle:{color:s},fontSize:14,margin:10}},yAxis:{name:"单位:元",nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,textStyle:{color:a},fontSize:14,margin:10}},series:[],dataset:h},y=e.map((e=>({name:e,type:"bar",xAxisIndex:0,yAxisIndex:0,showBackground:!0,backgroundStyle:{borderRadius:[20,20,0,0],show:!0,color:"#e9ebf7"}})));return x.series=y,o.merge(x,i),x},getPieChartOption:h,getScatterChartOption:function(e=["预测误差","预测波动"],i={}){const l=["#ffba00","#2759a4","#ff7e00","#6fbd6b","#50abdf","#7181d0","#ac77ce"],a={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,textStyle:{color:s}},grid:{left:50,right:80,bottom:30,top:30,containLabel:!0},xAxis:{name:e[0],splitLine:{show:!1},axisLine:{lineStyle:{color:n},symbol:["none","arrow"]},axisTick:{show:!1},axisLabel:{show:!1}},yAxis:{name:e[1],nameTextStyle:{color:s},splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t},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),l[t]}}}};return o.merge(a,i),a.dataset||(a.dataset={dimensions:["均方误差","平均绝对误差"],source:[{name:"专家修正","平均绝对误差":2.349,"均方误差":2.333},{name:"智能AI算法","平均绝对误差":3.333,"均方误差":2.333},{name:"自回归移动平均模型","平均绝对误差":4.333,"均方误差":5.333}]}),a},getScatterPlotOption:function(e,i){const c={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=>`<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:n}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:r},alignWithLabel:!0},axisLabel:{interval:0,textStyle:{color:s},fontSize:14,margin:10}},yAxis:{name:"预测波动",nameTextStyle:{color:a},type:"value",scale:!0,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t}},axisTick:{show:!0,length:4,lineStyle:{width:4,color:l}},axisLabel:{interval:0,textStyle:{color:a},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:(()=>{let t=0;return e.forEach((e=>{t+=e.value[0]})),(t/e.length).toFixed(2)})(),name:"预测误差平均水平",label:{color:"red"}},{yAxis:(()=>{let t=0;return e.forEach((e=>{t+=e.value[1]})),(t/e.length).toFixed(2)})(),name:"预测波动平均水平",label:{color:"red"}}]}}]};return o.merge(c,i),c}},Symbol.toStringTag,{value:"Module"}));e("S",y)}}}));
@@ -1 +1 @@
1
- import{a3 as i,w as s}from"./vendor-e7ea3a11.js";import{P as _}from"./index-2e42b180.js";const{CancelToken:y}=i,b=y.source(),u=i.create({baseURL:"",timeoutErrorMessage:"网络出点小差,请稍等重试",withCredentials:!1,responseType:"json",cancelToken:b.token});u.interceptors.request.use(e=>e);u.interceptors.response.use(e=>{const t=_.request.ignoreContentTypes,r=e.headers["content-type"];return t.some(n=>r.includes(n))?e:e.data},e=>Promise.reject(e));const o=u,l=i.create({timeoutErrorMessage:"网络出点小差,请稍等重试",withCredentials:!1,responseType:"json"});l.interceptors.response.use(e=>e.data);const d="login_type",a="storage_usertoken",p=(e,t)=>{localStorage.setItem(d,e),e==="sso"?sessionStorage.setItem(a,t):e==="password"&&localStorage.setItem(a,t),c(t&&"Bearer ".concat(t))},S=()=>{switch(localStorage.getItem(d)){case"password":return localStorage.getItem(a);case"sso":return sessionStorage.getItem(a);default:return""}};function h(e){return o.post("/api/login",e).then(t=>t.code===200&&t.data?(p("password",t.data),!0):!1)}function O(e){return!e||Object.keys(e).length===0?Promise.resolve(!1):o.get("/api/ssologin",{params:e}).then(t=>t.code===200&&t.data?(p("sso",t.data),!0):!1)}function j(){return S()}function T(){return o.get("/api/user/islogin").then(e=>{var t,r;return{login:e.code===200&&((t=e.data)==null?void 0:t.login),permission:e.code===200&&((r=e.data)==null?void 0:r.permission)}})}function I(){return o.get("/api/user/captcha").then(e=>e.data||{captchaId:"",svg:""})}function v(){return o.get("/api/user/info").then(e=>e.code===200?{status:"SUCCESS",data:e.data}:{status:"FAIL"})}function M(){return o.post("/api/user/logout").then(e=>e.code===200).finally(()=>{localStorage.removeItem(a),c(null)})}const P=Object.freeze(Object.defineProperty({__proto__:null,getAuthorization:j,getCaptcha:I,getInfo:v,isLogin:T,login:h,logout:M,ssoLogin:O},Symbol.toStringTag,{value:"Module"}));function L(){return o.get("/api/user/captcha")}const Y=Object.freeze(Object.defineProperty({__proto__:null,getCaptcha:L},Symbol.toStringTag,{value:"Module"})),w=10*1024*1024;function $(e){const t=new FormData;return t.append("file",e),o.post("/api/upload",t,{headers:{"Content-Type":"multipart/form-data"}})}const z=Object.freeze(Object.defineProperty({__proto__:null,UPLOAD_MAX_SIZE:w,upload:$},Symbol.toStringTag,{value:"Module"}));function U(e){return o.post("/api/add",e)}function B(e){return o.get("/api/getList",{params:e})}function C(e){return o.put("/api/edit",e)}function A(e){return o.delete("/api/deleteById",{params:e})}function E(e,t){const r=new FormData;return r.append("file",e),o.post("/api/v1/import",r,t)}const q=Object.freeze(Object.defineProperty({__proto__:null,add:U,deleteById:A,getList:B,update:C,upload:E},Symbol.toStringTag,{value:"Module"}));function N(){return o.get("/api/ops/overview")}function F(e){return o.get("/api/ops/probe/".concat(e))}const R=Object.freeze(Object.defineProperty({__proto__:null,overview:N,probe:F},Symbol.toStringTag,{value:"Module"}));function D(e){return o.get("/api/getList",{params:e})}function x(e){return o.post("/api/add",e)}function k(e){return o.put("/api/edit",e)}function G(e){return o.delete("/api/deleteById",{params:{id:e}})}const K=Object.freeze(Object.defineProperty({__proto__:null,add:x,deleteById:G,edit:k,getList:D},Symbol.toStringTag,{value:"Module"}));function W(e){return o.get("/api/image/getList",{params:e})}function V(e){return o.post("/api/image/add",e)}function X(e){return o.put("/api/image/edit",e)}function Z(e){return o.delete("/api/image/deleteById",{params:{id:e}})}const H=Object.freeze(Object.defineProperty({__proto__:null,add:V,deleteById:Z,edit:X,getList:W},Symbol.toStringTag,{value:"Module"}));function J(e){return o.get("/api/user/list",{params:e})}function Q(e){return o.post("/api/user/create",e)}function ee(e){return o.put("/api/user/update",e)}function te(e){return o.delete("/api/user/delete",{params:{id:e}})}function oe(e){return o.post("/api/user/resetPassword",null,{params:{id:e}})}function re(e){return o.post("/api/user/toggleStatus",null,{params:{id:e}})}const ne=Object.freeze(Object.defineProperty({__proto__:null,createUser:Q,deleteUser:te,listUsers:J,resetUserPassword:oe,toggleUserStatus:re,updateUser:ee},Symbol.toStringTag,{value:"Module"}));function ae(e){return o.get("/api/audit/list",{params:e})}const se=Object.freeze(Object.defineProperty({__proto__:null,listAuditLogs:ae},Symbol.toStringTag,{value:"Module"})),f={user:P,captcha:Y,upload:z,test:q,ops:R,pageData:K,image:H,userManage:ne,auditLog:se},ie=e=>{let t="YYYYMM";switch(e){case 1:t="YYYYMMDD";break;case 2:t="YYYYMM";break;case 3:t="YYYY";break}return t};function ue(e,t=2){return Number.isInteger(e)?e.toString():e.toFixed(t)}const ce=(e,t)=>{let r=e.id?1/e.id:0,n=t.id?1/t.id:0;return e.sort<0?r+=-1e3-e.sort:e.sort>0&&(r+=20*1e3*(e.sort?1/e.sort:1)),t.sort<0?n+=-1e3-t.sort:t.sort>0&&(n+=20*1e3*(t.sort?1/t.sort:1)),n-r},le=e=>{if(e.data instanceof Blob){const t=e.headers["content-disposition"],g=(t==null?void 0:t.split(";")).find(m=>m.trim().startsWith("filename=")).trim().replace("filename=","");return{data:e.data,fileName:decodeURIComponent(g)}}return{}},de=Object.freeze(Object.defineProperty({__proto__:null,exportFile:le,formatNumber:ue,getTimeFormatter:ie,sort:ce},Symbol.toStringTag,{value:"Module"})),pe=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));o.defaults.baseURL=window.ENV.requestBaseUrl;o.defaults.validateStatus=e=>(e===401&&s.info("登录失效,请重新登录"),e>=200&&e<300);o.interceptors.response.use(e=>(e&&e.code!==void 0&&e.code!==200&&s.error(e.message||e.msg||"请求失败,请重试"),e),e=>{var t;s.error("".concat(e==null?void 0:e.message,"(").concat(decodeURIComponent((t=e.request)==null?void 0:t.responseURL),")"),5)});const c=e=>{const t=e&&(e.startsWith("Bearer ")?e:"Bearer ".concat(e));o.defaults.headers.Authorization=t,l.defaults.headers.Authorization=t};c(f.user.getAuthorization());const me={admin:f,common:de,mysql:pe};export{w as U,me as a};
1
+ import{a3 as i,w as s}from"./vendor-2663c204.js";import{P as _}from"./index-e4c9d42a.js";const{CancelToken:y}=i,b=y.source(),u=i.create({baseURL:"",timeoutErrorMessage:"网络出点小差,请稍等重试",withCredentials:!1,responseType:"json",cancelToken:b.token});u.interceptors.request.use(e=>e);u.interceptors.response.use(e=>{const t=_.request.ignoreContentTypes,r=e.headers["content-type"];return t.some(n=>r.includes(n))?e:e.data},e=>Promise.reject(e));const o=u,l=i.create({timeoutErrorMessage:"网络出点小差,请稍等重试",withCredentials:!1,responseType:"json"});l.interceptors.response.use(e=>e.data);const d="login_type",a="storage_usertoken",p=(e,t)=>{localStorage.setItem(d,e),e==="sso"?sessionStorage.setItem(a,t):e==="password"&&localStorage.setItem(a,t),c(t&&"Bearer ".concat(t))},S=()=>{switch(localStorage.getItem(d)){case"password":return localStorage.getItem(a);case"sso":return sessionStorage.getItem(a);default:return""}};function h(e){return o.post("/api/login",e).then(t=>t.code===200&&t.data?(p("password",t.data),!0):!1)}function O(e){return!e||Object.keys(e).length===0?Promise.resolve(!1):o.get("/api/ssologin",{params:e}).then(t=>t.code===200&&t.data?(p("sso",t.data),!0):!1)}function j(){return S()}function T(){return o.get("/api/user/islogin").then(e=>{var t,r;return{login:e.code===200&&((t=e.data)==null?void 0:t.login),permission:e.code===200&&((r=e.data)==null?void 0:r.permission)}})}function I(){return o.get("/api/user/captcha").then(e=>e.data||{captchaId:"",svg:""})}function v(){return o.get("/api/user/info").then(e=>e.code===200?{status:"SUCCESS",data:e.data}:{status:"FAIL"})}function M(){return o.post("/api/user/logout").then(e=>e.code===200).finally(()=>{localStorage.removeItem(a),c(null)})}const P=Object.freeze(Object.defineProperty({__proto__:null,getAuthorization:j,getCaptcha:I,getInfo:v,isLogin:T,login:h,logout:M,ssoLogin:O},Symbol.toStringTag,{value:"Module"}));function L(){return o.get("/api/user/captcha")}const Y=Object.freeze(Object.defineProperty({__proto__:null,getCaptcha:L},Symbol.toStringTag,{value:"Module"})),w=10*1024*1024;function $(e){const t=new FormData;return t.append("file",e),o.post("/api/upload",t,{headers:{"Content-Type":"multipart/form-data"}})}const z=Object.freeze(Object.defineProperty({__proto__:null,UPLOAD_MAX_SIZE:w,upload:$},Symbol.toStringTag,{value:"Module"}));function U(e){return o.post("/api/add",e)}function B(e){return o.get("/api/getList",{params:e})}function C(e){return o.put("/api/edit",e)}function A(e){return o.delete("/api/deleteById",{params:e})}function E(e,t){const r=new FormData;return r.append("file",e),o.post("/api/v1/import",r,t)}const q=Object.freeze(Object.defineProperty({__proto__:null,add:U,deleteById:A,getList:B,update:C,upload:E},Symbol.toStringTag,{value:"Module"}));function N(){return o.get("/api/ops/overview")}function F(e){return o.get("/api/ops/probe/".concat(e))}const R=Object.freeze(Object.defineProperty({__proto__:null,overview:N,probe:F},Symbol.toStringTag,{value:"Module"}));function D(e){return o.get("/api/getList",{params:e})}function x(e){return o.post("/api/add",e)}function k(e){return o.put("/api/edit",e)}function G(e){return o.delete("/api/deleteById",{params:{id:e}})}const K=Object.freeze(Object.defineProperty({__proto__:null,add:x,deleteById:G,edit:k,getList:D},Symbol.toStringTag,{value:"Module"}));function W(e){return o.get("/api/image/getList",{params:e})}function V(e){return o.post("/api/image/add",e)}function X(e){return o.put("/api/image/edit",e)}function Z(e){return o.delete("/api/image/deleteById",{params:{id:e}})}const H=Object.freeze(Object.defineProperty({__proto__:null,add:V,deleteById:Z,edit:X,getList:W},Symbol.toStringTag,{value:"Module"}));function J(e){return o.get("/api/user/list",{params:e})}function Q(e){return o.post("/api/user/create",e)}function ee(e){return o.put("/api/user/update",e)}function te(e){return o.delete("/api/user/delete",{params:{id:e}})}function oe(e){return o.post("/api/user/resetPassword",null,{params:{id:e}})}function re(e){return o.post("/api/user/toggleStatus",null,{params:{id:e}})}const ne=Object.freeze(Object.defineProperty({__proto__:null,createUser:Q,deleteUser:te,listUsers:J,resetUserPassword:oe,toggleUserStatus:re,updateUser:ee},Symbol.toStringTag,{value:"Module"}));function ae(e){return o.get("/api/audit/list",{params:e})}const se=Object.freeze(Object.defineProperty({__proto__:null,listAuditLogs:ae},Symbol.toStringTag,{value:"Module"})),f={user:P,captcha:Y,upload:z,test:q,ops:R,pageData:K,image:H,userManage:ne,auditLog:se},ie=e=>{let t="YYYYMM";switch(e){case 1:t="YYYYMMDD";break;case 2:t="YYYYMM";break;case 3:t="YYYY";break}return t};function ue(e,t=2){return Number.isInteger(e)?e.toString():e.toFixed(t)}const ce=(e,t)=>{let r=e.id?1/e.id:0,n=t.id?1/t.id:0;return e.sort<0?r+=-1e3-e.sort:e.sort>0&&(r+=20*1e3*(e.sort?1/e.sort:1)),t.sort<0?n+=-1e3-t.sort:t.sort>0&&(n+=20*1e3*(t.sort?1/t.sort:1)),n-r},le=e=>{if(e.data instanceof Blob){const t=e.headers["content-disposition"],g=(t==null?void 0:t.split(";")).find(m=>m.trim().startsWith("filename=")).trim().replace("filename=","");return{data:e.data,fileName:decodeURIComponent(g)}}return{}},de=Object.freeze(Object.defineProperty({__proto__:null,exportFile:le,formatNumber:ue,getTimeFormatter:ie,sort:ce},Symbol.toStringTag,{value:"Module"})),pe=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));o.defaults.baseURL=window.ENV.requestBaseUrl;o.defaults.validateStatus=e=>(e===401&&s.info("登录失效,请重新登录"),e>=200&&e<300);o.interceptors.response.use(e=>(e&&e.code!==void 0&&e.code!==200&&s.error(e.message||e.msg||"请求失败,请重试"),e),e=>{var t;s.error("".concat(e==null?void 0:e.message,"(").concat(decodeURIComponent((t=e.request)==null?void 0:t.responseURL),")"),5)});const c=e=>{const t=e&&(e.startsWith("Bearer ")?e:"Bearer ".concat(e));o.defaults.headers.Authorization=t,l.defaults.headers.Authorization=t};c(f.user.getAuthorization());const me={admin:f,common:de,mysql:pe};export{w as U,me as a};
@@ -1 +1 @@
1
- System.register(["./vendor-legacy-a62a28c9.js","./index-legacy-8c7d1ee7.js"],(function(e,t){"use strict";var r,o,n;return{setters:[e=>{r=e.a3,o=e.w},e=>{n=e.P}],execute:function(){const{CancelToken:t}=r,a=t.source(),s=r.create({baseURL:"",timeoutErrorMessage:"网络出点小差,请稍等重试",withCredentials:!1,responseType:"json",cancelToken:a.token});s.interceptors.request.use((e=>e)),s.interceptors.response.use((e=>{const t=n.request.ignoreContentTypes,r=e.headers["content-type"];return t.some((e=>r.includes(e)))?e:e.data}),(e=>Promise.reject(e)));const i=s,u=r.create({timeoutErrorMessage:"网络出点小差,请稍等重试",withCredentials:!1,responseType:"json"});u.interceptors.response.use((e=>e.data));const d="login_type",l="storage_usertoken",p=(e,t)=>{localStorage.setItem(d,e),"sso"===e?sessionStorage.setItem(l,t):"password"===e&&localStorage.setItem(l,t),y(t?`Bearer ${t}`:t)},c=Object.freeze(Object.defineProperty({__proto__:null,getAuthorization:function(){return(()=>{switch(localStorage.getItem(d)){case"password":return localStorage.getItem(l);case"sso":return sessionStorage.getItem(l);default:return""}})()},getCaptcha:function(){return i.get("/api/user/captcha").then((e=>e.data||{captchaId:"",svg:""}))},getInfo:function(){return i.get("/api/user/info").then((e=>200===e.code?{status:"SUCCESS",data:e.data}:{status:"FAIL"}))},isLogin:function(){return i.get("/api/user/islogin").then((e=>({login:200===e.code&&e.data?.login,permission:200===e.code&&e.data?.permission})))},login:function(e){return i.post("/api/login",e).then((e=>!(200!==e.code||!e.data||(p("password",e.data),0))))},logout:function(){return i.post("/api/user/logout").then((e=>200===e.code)).finally((()=>{localStorage.removeItem(l),y(null)}))},ssoLogin:function(e){return e&&0!==Object.keys(e).length?i.get("/api/ssologin",{params:e}).then((e=>!(200!==e.code||!e.data||(p("sso",e.data),0)))):Promise.resolve(!1)}},Symbol.toStringTag,{value:"Module"})),g=Object.freeze(Object.defineProperty({__proto__:null,getCaptcha:function(){return i.get("/api/user/captcha")}},Symbol.toStringTag,{value:"Module"})),f=e("U",10485760),m={user:c,captcha:g,upload:Object.freeze(Object.defineProperty({__proto__:null,UPLOAD_MAX_SIZE:f,upload:function(e){const t=new FormData;return t.append("file",e),i.post("/api/upload",t,{headers:{"Content-Type":"multipart/form-data"}})}},Symbol.toStringTag,{value:"Module"})),test:Object.freeze(Object.defineProperty({__proto__:null,add:function(e){return i.post("/api/add",e)},deleteById:function(e){return i.delete("/api/deleteById",{params:e})},getList:function(e){return i.get("/api/getList",{params:e})},update:function(e){return i.put("/api/edit",e)},upload:function(e,t){const r=new FormData;return r.append("file",e),i.post("/api/v1/import",r,t)}},Symbol.toStringTag,{value:"Module"})),ops:Object.freeze(Object.defineProperty({__proto__:null,overview:function(){return i.get("/api/ops/overview")},probe:function(e){return i.get(`/api/ops/probe/${e}`)}},Symbol.toStringTag,{value:"Module"})),pageData:Object.freeze(Object.defineProperty({__proto__:null,add:function(e){return i.post("/api/add",e)},deleteById:function(e){return i.delete("/api/deleteById",{params:{id:e}})},edit:function(e){return i.put("/api/edit",e)},getList:function(e){return i.get("/api/getList",{params:e})}},Symbol.toStringTag,{value:"Module"})),image:Object.freeze(Object.defineProperty({__proto__:null,add:function(e){return i.post("/api/image/add",e)},deleteById:function(e){return i.delete("/api/image/deleteById",{params:{id:e}})},edit:function(e){return i.put("/api/image/edit",e)},getList:function(e){return i.get("/api/image/getList",{params:e})}},Symbol.toStringTag,{value:"Module"})),userManage:Object.freeze(Object.defineProperty({__proto__:null,createUser:function(e){return i.post("/api/user/create",e)},deleteUser:function(e){return i.delete("/api/user/delete",{params:{id:e}})},listUsers:function(e){return i.get("/api/user/list",{params:e})},resetUserPassword:function(e){return i.post("/api/user/resetPassword",null,{params:{id:e}})},toggleUserStatus:function(e){return i.post("/api/user/toggleStatus",null,{params:{id:e}})},updateUser:function(e){return i.put("/api/user/update",e)}},Symbol.toStringTag,{value:"Module"})),auditLog:Object.freeze(Object.defineProperty({__proto__:null,listAuditLogs:function(e){return i.get("/api/audit/list",{params:e})}},Symbol.toStringTag,{value:"Module"}))},_=Object.freeze(Object.defineProperty({__proto__:null,exportFile:e=>{if(e.data instanceof Blob){const t=e.headers["content-disposition"],r=t?.split(";"),o=r.find((e=>e.trim().startsWith("filename="))).trim().replace("filename=","");return{data:e.data,fileName:decodeURIComponent(o)}}return{}},formatNumber:function(e,t=2){return Number.isInteger(e)?e.toString():e.toFixed(t)},getTimeFormatter:e=>{let t="YYYYMM";switch(e){case 1:t="YYYYMMDD";break;case 2:t="YYYYMM";break;case 3:t="YYYY"}return t},sort:(e,t)=>{let r=e.id?1/e.id:0,o=t.id?1/t.id:0;return e.sort<0?r+=-1e3-e.sort:e.sort>0&&(r+=2e4*(e.sort?1/e.sort:1)),t.sort<0?o+=-1e3-t.sort:t.sort>0&&(o+=2e4*(t.sort?1/t.sort:1)),o-r}},Symbol.toStringTag,{value:"Module"})),b=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));i.defaults.baseURL=window.ENV.requestBaseUrl,i.defaults.validateStatus=e=>(401===e&&o.info("登录失效,请重新登录"),e>=200&&e<300),i.interceptors.response.use((e=>(e&&void 0!==e.code&&200!==e.code&&o.error(e.message||e.msg||"请求失败,请重试"),e)),(e=>{o.error(`${e?.message}(${decodeURIComponent(e.request?.responseURL)})`,5)}));const y=e=>{const t=e?e.startsWith("Bearer ")?e:`Bearer ${e}`:e;i.defaults.headers.Authorization=t,u.defaults.headers.Authorization=t};y(m.user.getAuthorization()),e("a",{admin:m,common:_,mysql:b})}}}));
1
+ System.register(["./vendor-legacy-2df23db3.js","./index-legacy-aebba3cb.js"],(function(e,t){"use strict";var r,o,n;return{setters:[e=>{r=e.a3,o=e.w},e=>{n=e.P}],execute:function(){const{CancelToken:t}=r,a=t.source(),s=r.create({baseURL:"",timeoutErrorMessage:"网络出点小差,请稍等重试",withCredentials:!1,responseType:"json",cancelToken:a.token});s.interceptors.request.use((e=>e)),s.interceptors.response.use((e=>{const t=n.request.ignoreContentTypes,r=e.headers["content-type"];return t.some((e=>r.includes(e)))?e:e.data}),(e=>Promise.reject(e)));const i=s,u=r.create({timeoutErrorMessage:"网络出点小差,请稍等重试",withCredentials:!1,responseType:"json"});u.interceptors.response.use((e=>e.data));const d="login_type",l="storage_usertoken",p=(e,t)=>{localStorage.setItem(d,e),"sso"===e?sessionStorage.setItem(l,t):"password"===e&&localStorage.setItem(l,t),y(t?`Bearer ${t}`:t)},c=Object.freeze(Object.defineProperty({__proto__:null,getAuthorization:function(){return(()=>{switch(localStorage.getItem(d)){case"password":return localStorage.getItem(l);case"sso":return sessionStorage.getItem(l);default:return""}})()},getCaptcha:function(){return i.get("/api/user/captcha").then((e=>e.data||{captchaId:"",svg:""}))},getInfo:function(){return i.get("/api/user/info").then((e=>200===e.code?{status:"SUCCESS",data:e.data}:{status:"FAIL"}))},isLogin:function(){return i.get("/api/user/islogin").then((e=>({login:200===e.code&&e.data?.login,permission:200===e.code&&e.data?.permission})))},login:function(e){return i.post("/api/login",e).then((e=>!(200!==e.code||!e.data||(p("password",e.data),0))))},logout:function(){return i.post("/api/user/logout").then((e=>200===e.code)).finally((()=>{localStorage.removeItem(l),y(null)}))},ssoLogin:function(e){return e&&0!==Object.keys(e).length?i.get("/api/ssologin",{params:e}).then((e=>!(200!==e.code||!e.data||(p("sso",e.data),0)))):Promise.resolve(!1)}},Symbol.toStringTag,{value:"Module"})),g=Object.freeze(Object.defineProperty({__proto__:null,getCaptcha:function(){return i.get("/api/user/captcha")}},Symbol.toStringTag,{value:"Module"})),f=e("U",10485760),m={user:c,captcha:g,upload:Object.freeze(Object.defineProperty({__proto__:null,UPLOAD_MAX_SIZE:f,upload:function(e){const t=new FormData;return t.append("file",e),i.post("/api/upload",t,{headers:{"Content-Type":"multipart/form-data"}})}},Symbol.toStringTag,{value:"Module"})),test:Object.freeze(Object.defineProperty({__proto__:null,add:function(e){return i.post("/api/add",e)},deleteById:function(e){return i.delete("/api/deleteById",{params:e})},getList:function(e){return i.get("/api/getList",{params:e})},update:function(e){return i.put("/api/edit",e)},upload:function(e,t){const r=new FormData;return r.append("file",e),i.post("/api/v1/import",r,t)}},Symbol.toStringTag,{value:"Module"})),ops:Object.freeze(Object.defineProperty({__proto__:null,overview:function(){return i.get("/api/ops/overview")},probe:function(e){return i.get(`/api/ops/probe/${e}`)}},Symbol.toStringTag,{value:"Module"})),pageData:Object.freeze(Object.defineProperty({__proto__:null,add:function(e){return i.post("/api/add",e)},deleteById:function(e){return i.delete("/api/deleteById",{params:{id:e}})},edit:function(e){return i.put("/api/edit",e)},getList:function(e){return i.get("/api/getList",{params:e})}},Symbol.toStringTag,{value:"Module"})),image:Object.freeze(Object.defineProperty({__proto__:null,add:function(e){return i.post("/api/image/add",e)},deleteById:function(e){return i.delete("/api/image/deleteById",{params:{id:e}})},edit:function(e){return i.put("/api/image/edit",e)},getList:function(e){return i.get("/api/image/getList",{params:e})}},Symbol.toStringTag,{value:"Module"})),userManage:Object.freeze(Object.defineProperty({__proto__:null,createUser:function(e){return i.post("/api/user/create",e)},deleteUser:function(e){return i.delete("/api/user/delete",{params:{id:e}})},listUsers:function(e){return i.get("/api/user/list",{params:e})},resetUserPassword:function(e){return i.post("/api/user/resetPassword",null,{params:{id:e}})},toggleUserStatus:function(e){return i.post("/api/user/toggleStatus",null,{params:{id:e}})},updateUser:function(e){return i.put("/api/user/update",e)}},Symbol.toStringTag,{value:"Module"})),auditLog:Object.freeze(Object.defineProperty({__proto__:null,listAuditLogs:function(e){return i.get("/api/audit/list",{params:e})}},Symbol.toStringTag,{value:"Module"}))},_=Object.freeze(Object.defineProperty({__proto__:null,exportFile:e=>{if(e.data instanceof Blob){const t=e.headers["content-disposition"],r=t?.split(";"),o=r.find((e=>e.trim().startsWith("filename="))).trim().replace("filename=","");return{data:e.data,fileName:decodeURIComponent(o)}}return{}},formatNumber:function(e,t=2){return Number.isInteger(e)?e.toString():e.toFixed(t)},getTimeFormatter:e=>{let t="YYYYMM";switch(e){case 1:t="YYYYMMDD";break;case 2:t="YYYYMM";break;case 3:t="YYYY"}return t},sort:(e,t)=>{let r=e.id?1/e.id:0,o=t.id?1/t.id:0;return e.sort<0?r+=-1e3-e.sort:e.sort>0&&(r+=2e4*(e.sort?1/e.sort:1)),t.sort<0?o+=-1e3-t.sort:t.sort>0&&(o+=2e4*(t.sort?1/t.sort:1)),o-r}},Symbol.toStringTag,{value:"Module"})),b=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));i.defaults.baseURL=window.ENV.requestBaseUrl,i.defaults.validateStatus=e=>(401===e&&o.info("登录失效,请重新登录"),e>=200&&e<300),i.interceptors.response.use((e=>(e&&void 0!==e.code&&200!==e.code&&o.error(e.message||e.msg||"请求失败,请重试"),e)),(e=>{o.error(`${e?.message}(${decodeURIComponent(e.request?.responseURL)})`,5)}));const y=e=>{const t=e?e.startsWith("Bearer ")?e:`Bearer ${e}`:e;i.defaults.headers.Authorization=t,u.defaults.headers.Authorization=t};y(m.user.getAuthorization()),e("a",{admin:m,common:_,mysql:b})}}}));
@@ -1 +1 @@
1
- import{r as g,j as C}from"./vendor-e7ea3a11.js";import{u as M,i as v,a as E,b as w,c as _,d as O,e as R,f as y,g as H,h as I,j,k,l as N,m as z,n as B}from"./echarts-vendor-fdb2c14f.js";M([v,E,w,_,O,R,y,H,I,j,k,N,z]);const x={text:"操作处理中...",showSpinner:!1,textColor:"#9d9d9d",maskColor:"transparent",fontSize:"25px",fontWeight:"bold",fontFamily:"SourceHanSansCN"};function $(p){const{onLoad:h,chartOption:a,className:i,style:u,onEvents:s,chartOptionDeps:d,loading:f,onInit:e}=p,r=g.useRef(),n=g.useRef();return g.useEffect(()=>{const t=B(r.current);n.current=t,e==null||e(t),s&&s.forEach(l=>{t.on(l.eventName,m=>{var b;(b=l.eventCallback)==null||b.call(l,m,t)})});const c=new ResizeObserver(()=>{t.resize()});return c.observe(r.current),h==null||h(),()=>{c.disconnect(),t.dispose()}},[]),g.useEffect(()=>{n.current&&(n.current.off(),s&&s.forEach(t=>{n.current.on(t.eventName,c=>{var l;(l=t.eventCallback)==null||l.call(t,c,n.current)})}))},[s]),g.useEffect(()=>{f?n.current.showLoading(x):n.current.hideLoading()},[f]),g.useEffect(()=>a?(a.dataset&&(Array.isArray(a.dataset)?a.dataset.forEach(t=>{t.source||(t.source=[])}):a.dataset.source||(a.dataset.source=[])),n.current.setOption(a),()=>{n.current.clear()}):()=>{},d),C.jsx("div",{className:i,style:{height:"100%",width:"100%",...u},ref:r})}function D(){const p=Math.floor(Math.random()*256),h=Math.floor(Math.random()*256),a=Math.floor(Math.random()*256),i=u=>{const s=u.toString(16);return s.length===1?"0".concat(s):s};return"#".concat(i(p)).concat(i(h)).concat(i(a))}function L(p,h=.2){const a=e=>{const r=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),t=parseInt(e.slice(5,7),16);return{r,g:n,b:t}},i=(e,r,n)=>{const t=c=>c.toString(16).padStart(2,"0");return"#".concat(t(e)).concat(t(r)).concat(t(n))},u=(e,r,n)=>{const t=e.r+(r.r-e.r)*n,c=e.g+(r.g-e.g)*n,l=e.b+(r.b-e.b)*n;return{r:t,g:c,b:l}},s=a(p),f=u(s,{r:255,g:255,b:255},h);return i(f.r,f.g,f.b)}function T(p,h=.2){h=.4;const a=p.replace(/^#/,""),i=parseInt(a.slice(0,2),16)/255,u=parseInt(a.slice(2,4),16)/255,s=parseInt(a.slice(4,6),16)/255,d=Math.max(i,u,s),f=Math.min(i,u,s);let e,r,n=(d+f)/2;if(d===f)e=r=0;else{const o=d-f;switch(r=n>.5?o/(2-d-f):o/(d+f),d){case i:e=(u-s)/o+(u<s?6:0);break;case u:e=(s-i)/o+2;break;case s:e=(i-u)/o+4;break}e/=6}n=Math.min(1,n+h);const t=n<.5?n*(1+r):n+r-n*r,c=2*n-t,l=o=>(o<0&&(o+=1),o>1&&(o-=1),o<1/6?c+(t-c)*6*o:o<1/2?t:o<2/3?c+(t-c)*(2/3-o)*6:c),m=Math.round(l(e+1/3)*255),b=Math.round(l(e)*255),S=Math.round(l(e-1/3)*255);return"#".concat([m.toString(16).padStart(2,"0"),b.toString(16).padStart(2,"0"),S.toString(16).padStart(2,"0")].join(""))}$.defaultProps={chartOption:null,style:null,className:null,onLoad:null,onEvents:null,chartOptionDeps:null,loading:!1,onInit:null};const F=Object.freeze(Object.defineProperty({__proto__:null,DefaultLoadingOptions:x,HighlightHexColor:T,MixHexColor:L,RandomHexColor:D,default:$},Symbol.toStringTag,{value:"Module"}));export{$ as B,F as _};
1
+ import{r as g,j as C}from"./vendor-2663c204.js";import{u as M,i as v,a as E,b as w,c as _,d as O,e as R,f as y,g as H,h as I,j,k,l as N,m as z,n as B}from"./echarts-vendor-d6ce4b9c.js";M([v,E,w,_,O,R,y,H,I,j,k,N,z]);const x={text:"操作处理中...",showSpinner:!1,textColor:"#9d9d9d",maskColor:"transparent",fontSize:"25px",fontWeight:"bold",fontFamily:"SourceHanSansCN"};function $(p){const{onLoad:h,chartOption:a,className:i,style:u,onEvents:s,chartOptionDeps:d,loading:f,onInit:e}=p,r=g.useRef(),n=g.useRef();return g.useEffect(()=>{const t=B(r.current);n.current=t,e==null||e(t),s&&s.forEach(l=>{t.on(l.eventName,m=>{var b;(b=l.eventCallback)==null||b.call(l,m,t)})});const c=new ResizeObserver(()=>{t.resize()});return c.observe(r.current),h==null||h(),()=>{c.disconnect(),t.dispose()}},[]),g.useEffect(()=>{n.current&&(n.current.off(),s&&s.forEach(t=>{n.current.on(t.eventName,c=>{var l;(l=t.eventCallback)==null||l.call(t,c,n.current)})}))},[s]),g.useEffect(()=>{f?n.current.showLoading(x):n.current.hideLoading()},[f]),g.useEffect(()=>a?(a.dataset&&(Array.isArray(a.dataset)?a.dataset.forEach(t=>{t.source||(t.source=[])}):a.dataset.source||(a.dataset.source=[])),n.current.setOption(a),()=>{n.current.clear()}):()=>{},d),C.jsx("div",{className:i,style:{height:"100%",width:"100%",...u},ref:r})}function D(){const p=Math.floor(Math.random()*256),h=Math.floor(Math.random()*256),a=Math.floor(Math.random()*256),i=u=>{const s=u.toString(16);return s.length===1?"0".concat(s):s};return"#".concat(i(p)).concat(i(h)).concat(i(a))}function L(p,h=.2){const a=e=>{const r=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),t=parseInt(e.slice(5,7),16);return{r,g:n,b:t}},i=(e,r,n)=>{const t=c=>c.toString(16).padStart(2,"0");return"#".concat(t(e)).concat(t(r)).concat(t(n))},u=(e,r,n)=>{const t=e.r+(r.r-e.r)*n,c=e.g+(r.g-e.g)*n,l=e.b+(r.b-e.b)*n;return{r:t,g:c,b:l}},s=a(p),f=u(s,{r:255,g:255,b:255},h);return i(f.r,f.g,f.b)}function T(p,h=.2){h=.4;const a=p.replace(/^#/,""),i=parseInt(a.slice(0,2),16)/255,u=parseInt(a.slice(2,4),16)/255,s=parseInt(a.slice(4,6),16)/255,d=Math.max(i,u,s),f=Math.min(i,u,s);let e,r,n=(d+f)/2;if(d===f)e=r=0;else{const o=d-f;switch(r=n>.5?o/(2-d-f):o/(d+f),d){case i:e=(u-s)/o+(u<s?6:0);break;case u:e=(s-i)/o+2;break;case s:e=(i-u)/o+4;break}e/=6}n=Math.min(1,n+h);const t=n<.5?n*(1+r):n+r-n*r,c=2*n-t,l=o=>(o<0&&(o+=1),o>1&&(o-=1),o<1/6?c+(t-c)*6*o:o<1/2?t:o<2/3?c+(t-c)*(2/3-o)*6:c),m=Math.round(l(e+1/3)*255),b=Math.round(l(e)*255),S=Math.round(l(e-1/3)*255);return"#".concat([m.toString(16).padStart(2,"0"),b.toString(16).padStart(2,"0"),S.toString(16).padStart(2,"0")].join(""))}$.defaultProps={chartOption:null,style:null,className:null,onLoad:null,onEvents:null,chartOptionDeps:null,loading:!1,onInit:null};const F=Object.freeze(Object.defineProperty({__proto__:null,DefaultLoadingOptions:x,HighlightHexColor:T,MixHexColor:L,RandomHexColor:D,default:$},Symbol.toStringTag,{value:"Module"}));export{$ as B,F as _};