浏览代码

添加 配额管理

dusenyao 3 年之前
父节点
当前提交
9253e2fc55

+ 84 - 114
package-lock.json

@@ -9,7 +9,7 @@
       "version": "0.1.0",
       "dependencies": {
         "axios": "^0.26.0",
-        "core-js": "^3.21.0",
+        "core-js": "^3.21.1",
         "element-ui": "^2.15.6",
         "js-cookie": "^3.0.1",
         "normalize.css": "^8.0.1",
@@ -19,7 +19,7 @@
         "vuex": "^3.6.2"
       },
       "devDependencies": {
-        "@babel/core": "^7.17.2",
+        "@babel/core": "^7.17.5",
         "@babel/eslint-parser": "^7.17.0",
         "@babel/preset-env": "^7.16.11",
         "@rushstack/eslint-patch": "^1.1.0",
@@ -36,19 +36,18 @@
         "babel-plugin-dynamic-import-node": "^2.3.3",
         "eslint": "^7.32.0",
         "eslint-plugin-prettier": "^4.0.0",
-        "eslint-plugin-vue": "^8.4.1",
+        "eslint-plugin-vue": "^8.5.0",
         "html-webpack-plugin": "^5.3.1",
-        "postcss": "^8.4.6",
+        "postcss": "^8.4.7",
         "postcss-html": "^1.3.0",
         "prettier": "2.5.1",
-        "sass": "^1.49.7",
+        "sass": "^1.49.9",
         "sass-loader": "^10.2.1",
         "script-ext-html-webpack-plugin": "^2.1.5",
-        "stylelint": "14.4.0",
+        "stylelint": "^14.5.3",
         "stylelint-config-prettier": "^9.0.3",
         "stylelint-config-recess-order": "^3.0.0",
         "stylelint-config-recommended-vue": "^1.3.0",
-        "stylelint-config-sass-guidelines": "^9.0.1",
         "stylelint-config-standard-scss": "^3.0.0",
         "stylelint-declaration-block-no-ignored-properties": "^2.5.0",
         "stylelint-webpack-plugin": "^3.1.0",
@@ -96,20 +95,20 @@
       }
     },
     "node_modules/@babel/core": {
-      "version": "7.17.2",
-      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.2.tgz",
-      "integrity": "sha512-R3VH5G42VSDolRHyUO4V2cfag8WHcZyxdq5Z/m8Xyb92lW/Erm/6kM+XtRFGf3Mulre3mveni2NHfEUws8wSvw==",
+      "version": "7.17.5",
+      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.5.tgz",
+      "integrity": "sha512-/BBMw4EvjmyquN5O+t5eh0+YqB3XXJkYD2cjKpYtWOfFy4lQ4UozNSmxAcWT8r2XtZs0ewG+zrfsqeR15i1ajA==",
       "dev": true,
       "dependencies": {
-        "@ampproject/remapping": "^2.0.0",
+        "@ampproject/remapping": "^2.1.0",
         "@babel/code-frame": "^7.16.7",
-        "@babel/generator": "^7.17.0",
+        "@babel/generator": "^7.17.3",
         "@babel/helper-compilation-targets": "^7.16.7",
         "@babel/helper-module-transforms": "^7.16.7",
         "@babel/helpers": "^7.17.2",
-        "@babel/parser": "^7.17.0",
+        "@babel/parser": "^7.17.3",
         "@babel/template": "^7.16.7",
-        "@babel/traverse": "^7.17.0",
+        "@babel/traverse": "^7.17.3",
         "@babel/types": "^7.17.0",
         "convert-source-map": "^1.7.0",
         "debug": "^4.1.0",
@@ -166,9 +165,9 @@
       }
     },
     "node_modules/@babel/generator": {
-      "version": "7.17.0",
-      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.0.tgz",
-      "integrity": "sha512-I3Omiv6FGOC29dtlZhkfXO6pgkmukJSlT26QjVvS1DGZe/NzSVCPG41X0tS21oZkJYlovfj9qDWgKP+Cn4bXxw==",
+      "version": "7.17.3",
+      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz",
+      "integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==",
       "dev": true,
       "dependencies": {
         "@babel/types": "^7.17.0",
@@ -532,9 +531,9 @@
       }
     },
     "node_modules/@babel/parser": {
-      "version": "7.17.0",
-      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.0.tgz",
-      "integrity": "sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw==",
+      "version": "7.17.3",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz",
+      "integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==",
       "dev": true,
       "bin": {
         "parser": "bin/babel-parser.js"
@@ -1792,18 +1791,18 @@
       }
     },
     "node_modules/@babel/traverse": {
-      "version": "7.17.0",
-      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.0.tgz",
-      "integrity": "sha512-fpFIXvqD6kC7c7PUNnZ0Z8cQXlarCLtCUpt2S1Dx7PjoRtCFffvOkHHSom+m5HIxMZn5bIBVb71lhabcmjEsqg==",
+      "version": "7.17.3",
+      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz",
+      "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==",
       "dev": true,
       "dependencies": {
         "@babel/code-frame": "^7.16.7",
-        "@babel/generator": "^7.17.0",
+        "@babel/generator": "^7.17.3",
         "@babel/helper-environment-visitor": "^7.16.7",
         "@babel/helper-function-name": "^7.16.7",
         "@babel/helper-hoist-variables": "^7.16.7",
         "@babel/helper-split-export-declaration": "^7.16.7",
-        "@babel/parser": "^7.17.0",
+        "@babel/parser": "^7.17.3",
         "@babel/types": "^7.17.0",
         "debug": "^4.1.0",
         "globals": "^11.1.0"
@@ -7145,9 +7144,9 @@
       }
     },
     "node_modules/core-js": {
-      "version": "3.21.0",
-      "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.0.tgz",
-      "integrity": "sha512-YUdI3fFu4TF/2WykQ2xzSiTQdldLB4KVuL9WeAy5XONZYt5Cun/fpQvctoKbCgvPhmzADeesTk/j2Rdx77AcKQ==",
+      "version": "3.21.1",
+      "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.1.tgz",
+      "integrity": "sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig==",
       "hasInstallScript": true,
       "funding": {
         "type": "opencollective",
@@ -8957,9 +8956,9 @@
       }
     },
     "node_modules/eslint-plugin-vue": {
-      "version": "8.4.1",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.4.1.tgz",
-      "integrity": "sha512-nmWOhNmDx9TZ+yP9ZhezTkZUupSHsYA2TocRm+efPSXMOyFrVczVlaIuQcLBjCtI8CbkBiUQ3VcyQsjlIhDrhA==",
+      "version": "8.5.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.5.0.tgz",
+      "integrity": "sha512-i1uHCTAKOoEj12RDvdtONWrGzjFm/djkzqfhmQ0d6M/W8KM81mhswd/z+iTZ0jCpdUedW3YRgcVfQ37/J4zoYQ==",
       "dev": true,
       "dependencies": {
         "eslint-utils": "^3.0.0",
@@ -14643,9 +14642,9 @@
       }
     },
     "node_modules/nanoid": {
-      "version": "3.3.0",
-      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.0.tgz",
-      "integrity": "sha512-JzxqqT5u/x+/KOFSd7JP15DOo9nOoHpx6DYatqIHUW2+flybkm+mdcraotSQR5WcnZr+qhGVh8Ted0KdfSMxlg==",
+      "version": "3.3.1",
+      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz",
+      "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==",
       "dev": true,
       "bin": {
         "nanoid": "bin/nanoid.cjs"
@@ -15727,12 +15726,12 @@
       }
     },
     "node_modules/postcss": {
-      "version": "8.4.6",
-      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.6.tgz",
-      "integrity": "sha512-OovjwIzs9Te46vlEx7+uXB0PLijpwjXGKXjVGGPIGubGpq7uh5Xgf6D6FiJ/SzJMBosHDp6a2hiXOS97iBXcaA==",
+      "version": "8.4.7",
+      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.7.tgz",
+      "integrity": "sha512-L9Ye3r6hkkCeOETQX6iOaWZgjp3LL6Lpqm6EtgbKrgqGGteRMNb9vzBfRL96YOSu8o7x3MfIH9Mo5cPJFGrW6A==",
       "dev": true,
       "dependencies": {
-        "nanoid": "^3.2.0",
+        "nanoid": "^3.3.1",
         "picocolors": "^1.0.0",
         "source-map-js": "^1.0.2"
       },
@@ -18828,9 +18827,9 @@
       }
     },
     "node_modules/sass": {
-      "version": "1.49.7",
-      "resolved": "https://registry.npmjs.org/sass/-/sass-1.49.7.tgz",
-      "integrity": "sha512-13dml55EMIR2rS4d/RDHHP0sXMY3+30e1TKsyXaSz3iLWVoDWEoboY8WzJd5JMnxrRHffKO3wq2mpJ0jxRJiEQ==",
+      "version": "1.49.9",
+      "resolved": "https://registry.npmjs.org/sass/-/sass-1.49.9.tgz",
+      "integrity": "sha512-YlYWkkHP9fbwaFRZQRXgDi3mXZShslVmmo+FVK3kHLUELHHEYrCmL1x6IUjC7wLS6VuJSAFXRQS/DxdsC4xL1A==",
       "dev": true,
       "dependencies": {
         "chokidar": ">=3.0.0 <4.0.0",
@@ -20111,15 +20110,15 @@
       }
     },
     "node_modules/stylelint": {
-      "version": "14.4.0",
-      "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.4.0.tgz",
-      "integrity": "sha512-F6H2frcmdpB5ZXPjvHKSZRmszuYz7bsbl2NXyE+Pn+1P6PMD3dYMKjXci6yEzj9+Yf2ZinxBMaXYvSzYjaHtog==",
+      "version": "14.5.3",
+      "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.5.3.tgz",
+      "integrity": "sha512-omHETL+kGHR+fCXFK1SkZD/A+emCP9esggAdWEl8GPjTNeyRYj+H6uetRDcU+7E451zwWiUYGVAX+lApsAZgsQ==",
       "dev": true,
       "dependencies": {
         "balanced-match": "^2.0.0",
         "colord": "^2.9.2",
         "cosmiconfig": "^7.0.1",
-        "css-functions-list": "^3.0.0",
+        "css-functions-list": "^3.0.1",
         "debug": "^4.3.3",
         "execall": "^2.0.0",
         "fast-glob": "^3.2.11",
@@ -20156,7 +20155,7 @@
         "svg-tags": "^1.0.0",
         "table": "^6.8.0",
         "v8-compile-cache": "^2.3.0",
-        "write-file-atomic": "^4.0.0"
+        "write-file-atomic": "^4.0.1"
       },
       "bin": {
         "stylelint": "bin/stylelint.js"
@@ -20287,24 +20286,6 @@
       "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
       "dev": true
     },
-    "node_modules/stylelint-config-sass-guidelines": {
-      "version": "9.0.1",
-      "resolved": "https://registry.npmjs.org/stylelint-config-sass-guidelines/-/stylelint-config-sass-guidelines-9.0.1.tgz",
-      "integrity": "sha512-N06PsVsrgKijQ3YT5hqKA7x3NUkgELTRI1cbWMqcYiCGG6MjzvNk6Cb5YYA1PrvrksBV76BvY9P9bAswojVMqA==",
-      "dev": true,
-      "dependencies": {
-        "postcss-scss": "^4.0.2",
-        "stylelint-order": "^5.0.0",
-        "stylelint-scss": "^4.0.0"
-      },
-      "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "peerDependencies": {
-        "postcss": "^8.3.3",
-        "stylelint": "^14.0.1"
-      }
-    },
     "node_modules/stylelint-config-standard": {
       "version": "24.0.0",
       "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-24.0.0.tgz",
@@ -23721,20 +23702,20 @@
       "dev": true
     },
     "@babel/core": {
-      "version": "7.17.2",
-      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.2.tgz",
-      "integrity": "sha512-R3VH5G42VSDolRHyUO4V2cfag8WHcZyxdq5Z/m8Xyb92lW/Erm/6kM+XtRFGf3Mulre3mveni2NHfEUws8wSvw==",
+      "version": "7.17.5",
+      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.5.tgz",
+      "integrity": "sha512-/BBMw4EvjmyquN5O+t5eh0+YqB3XXJkYD2cjKpYtWOfFy4lQ4UozNSmxAcWT8r2XtZs0ewG+zrfsqeR15i1ajA==",
       "dev": true,
       "requires": {
-        "@ampproject/remapping": "^2.0.0",
+        "@ampproject/remapping": "^2.1.0",
         "@babel/code-frame": "^7.16.7",
-        "@babel/generator": "^7.17.0",
+        "@babel/generator": "^7.17.3",
         "@babel/helper-compilation-targets": "^7.16.7",
         "@babel/helper-module-transforms": "^7.16.7",
         "@babel/helpers": "^7.17.2",
-        "@babel/parser": "^7.17.0",
+        "@babel/parser": "^7.17.3",
         "@babel/template": "^7.16.7",
-        "@babel/traverse": "^7.17.0",
+        "@babel/traverse": "^7.17.3",
         "@babel/types": "^7.17.0",
         "convert-source-map": "^1.7.0",
         "debug": "^4.1.0",
@@ -23773,9 +23754,9 @@
       }
     },
     "@babel/generator": {
-      "version": "7.17.0",
-      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.0.tgz",
-      "integrity": "sha512-I3Omiv6FGOC29dtlZhkfXO6pgkmukJSlT26QjVvS1DGZe/NzSVCPG41X0tS21oZkJYlovfj9qDWgKP+Cn4bXxw==",
+      "version": "7.17.3",
+      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz",
+      "integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==",
       "dev": true,
       "requires": {
         "@babel/types": "^7.17.0",
@@ -24049,9 +24030,9 @@
       }
     },
     "@babel/parser": {
-      "version": "7.17.0",
-      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.0.tgz",
-      "integrity": "sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw==",
+      "version": "7.17.3",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz",
+      "integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==",
       "dev": true
     },
     "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {
@@ -24905,18 +24886,18 @@
       }
     },
     "@babel/traverse": {
-      "version": "7.17.0",
-      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.0.tgz",
-      "integrity": "sha512-fpFIXvqD6kC7c7PUNnZ0Z8cQXlarCLtCUpt2S1Dx7PjoRtCFffvOkHHSom+m5HIxMZn5bIBVb71lhabcmjEsqg==",
+      "version": "7.17.3",
+      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz",
+      "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==",
       "dev": true,
       "requires": {
         "@babel/code-frame": "^7.16.7",
-        "@babel/generator": "^7.17.0",
+        "@babel/generator": "^7.17.3",
         "@babel/helper-environment-visitor": "^7.16.7",
         "@babel/helper-function-name": "^7.16.7",
         "@babel/helper-hoist-variables": "^7.16.7",
         "@babel/helper-split-export-declaration": "^7.16.7",
-        "@babel/parser": "^7.17.0",
+        "@babel/parser": "^7.17.3",
         "@babel/types": "^7.17.0",
         "debug": "^4.1.0",
         "globals": "^11.1.0"
@@ -29296,9 +29277,9 @@
       }
     },
     "core-js": {
-      "version": "3.21.0",
-      "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.0.tgz",
-      "integrity": "sha512-YUdI3fFu4TF/2WykQ2xzSiTQdldLB4KVuL9WeAy5XONZYt5Cun/fpQvctoKbCgvPhmzADeesTk/j2Rdx77AcKQ=="
+      "version": "3.21.1",
+      "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.1.tgz",
+      "integrity": "sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig=="
     },
     "core-js-compat": {
       "version": "3.20.3",
@@ -30983,9 +30964,9 @@
       }
     },
     "eslint-plugin-vue": {
-      "version": "8.4.1",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.4.1.tgz",
-      "integrity": "sha512-nmWOhNmDx9TZ+yP9ZhezTkZUupSHsYA2TocRm+efPSXMOyFrVczVlaIuQcLBjCtI8CbkBiUQ3VcyQsjlIhDrhA==",
+      "version": "8.5.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.5.0.tgz",
+      "integrity": "sha512-i1uHCTAKOoEj12RDvdtONWrGzjFm/djkzqfhmQ0d6M/W8KM81mhswd/z+iTZ0jCpdUedW3YRgcVfQ37/J4zoYQ==",
       "dev": true,
       "requires": {
         "eslint-utils": "^3.0.0",
@@ -35211,9 +35192,9 @@
       }
     },
     "nanoid": {
-      "version": "3.3.0",
-      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.0.tgz",
-      "integrity": "sha512-JzxqqT5u/x+/KOFSd7JP15DOo9nOoHpx6DYatqIHUW2+flybkm+mdcraotSQR5WcnZr+qhGVh8Ted0KdfSMxlg==",
+      "version": "3.3.1",
+      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz",
+      "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==",
       "dev": true
     },
     "nanomatch": {
@@ -36093,12 +36074,12 @@
       "dev": true
     },
     "postcss": {
-      "version": "8.4.6",
-      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.6.tgz",
-      "integrity": "sha512-OovjwIzs9Te46vlEx7+uXB0PLijpwjXGKXjVGGPIGubGpq7uh5Xgf6D6FiJ/SzJMBosHDp6a2hiXOS97iBXcaA==",
+      "version": "8.4.7",
+      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.7.tgz",
+      "integrity": "sha512-L9Ye3r6hkkCeOETQX6iOaWZgjp3LL6Lpqm6EtgbKrgqGGteRMNb9vzBfRL96YOSu8o7x3MfIH9Mo5cPJFGrW6A==",
       "dev": true,
       "requires": {
-        "nanoid": "^3.2.0",
+        "nanoid": "^3.3.1",
         "picocolors": "^1.0.0",
         "source-map-js": "^1.0.2"
       }
@@ -38511,9 +38492,9 @@
       }
     },
     "sass": {
-      "version": "1.49.7",
-      "resolved": "https://registry.npmjs.org/sass/-/sass-1.49.7.tgz",
-      "integrity": "sha512-13dml55EMIR2rS4d/RDHHP0sXMY3+30e1TKsyXaSz3iLWVoDWEoboY8WzJd5JMnxrRHffKO3wq2mpJ0jxRJiEQ==",
+      "version": "1.49.9",
+      "resolved": "https://registry.npmjs.org/sass/-/sass-1.49.9.tgz",
+      "integrity": "sha512-YlYWkkHP9fbwaFRZQRXgDi3mXZShslVmmo+FVK3kHLUELHHEYrCmL1x6IUjC7wLS6VuJSAFXRQS/DxdsC4xL1A==",
       "dev": true,
       "requires": {
         "chokidar": ">=3.0.0 <4.0.0",
@@ -39563,15 +39544,15 @@
       }
     },
     "stylelint": {
-      "version": "14.4.0",
-      "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.4.0.tgz",
-      "integrity": "sha512-F6H2frcmdpB5ZXPjvHKSZRmszuYz7bsbl2NXyE+Pn+1P6PMD3dYMKjXci6yEzj9+Yf2ZinxBMaXYvSzYjaHtog==",
+      "version": "14.5.3",
+      "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.5.3.tgz",
+      "integrity": "sha512-omHETL+kGHR+fCXFK1SkZD/A+emCP9esggAdWEl8GPjTNeyRYj+H6uetRDcU+7E451zwWiUYGVAX+lApsAZgsQ==",
       "dev": true,
       "requires": {
         "balanced-match": "^2.0.0",
         "colord": "^2.9.2",
         "cosmiconfig": "^7.0.1",
-        "css-functions-list": "^3.0.0",
+        "css-functions-list": "^3.0.1",
         "debug": "^4.3.3",
         "execall": "^2.0.0",
         "fast-glob": "^3.2.11",
@@ -39608,7 +39589,7 @@
         "svg-tags": "^1.0.0",
         "table": "^6.8.0",
         "v8-compile-cache": "^2.3.0",
-        "write-file-atomic": "^4.0.0"
+        "write-file-atomic": "^4.0.1"
       },
       "dependencies": {
         "@nodelib/fs.stat": {
@@ -39865,17 +39846,6 @@
         }
       }
     },
-    "stylelint-config-sass-guidelines": {
-      "version": "9.0.1",
-      "resolved": "https://registry.npmjs.org/stylelint-config-sass-guidelines/-/stylelint-config-sass-guidelines-9.0.1.tgz",
-      "integrity": "sha512-N06PsVsrgKijQ3YT5hqKA7x3NUkgELTRI1cbWMqcYiCGG6MjzvNk6Cb5YYA1PrvrksBV76BvY9P9bAswojVMqA==",
-      "dev": true,
-      "requires": {
-        "postcss-scss": "^4.0.2",
-        "stylelint-order": "^5.0.0",
-        "stylelint-scss": "^4.0.0"
-      }
-    },
     "stylelint-config-standard": {
       "version": "24.0.0",
       "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-24.0.0.tgz",

+ 6 - 7
package.json

@@ -11,7 +11,7 @@
   },
   "dependencies": {
     "axios": "^0.26.0",
-    "core-js": "^3.21.0",
+    "core-js": "^3.21.1",
     "element-ui": "^2.15.6",
     "js-cookie": "^3.0.1",
     "normalize.css": "^8.0.1",
@@ -21,7 +21,7 @@
     "vuex": "^3.6.2"
   },
   "devDependencies": {
-    "@babel/core": "^7.17.2",
+    "@babel/core": "^7.17.5",
     "@babel/eslint-parser": "^7.17.0",
     "@babel/preset-env": "^7.16.11",
     "@rushstack/eslint-patch": "^1.1.0",
@@ -38,19 +38,18 @@
     "babel-plugin-dynamic-import-node": "^2.3.3",
     "eslint": "^7.32.0",
     "eslint-plugin-prettier": "^4.0.0",
-    "eslint-plugin-vue": "^8.4.1",
+    "eslint-plugin-vue": "^8.5.0",
     "html-webpack-plugin": "^5.3.1",
-    "postcss": "^8.4.6",
+    "postcss": "^8.4.7",
     "postcss-html": "^1.3.0",
     "prettier": "2.5.1",
-    "sass": "^1.49.7",
+    "sass": "^1.49.9",
     "sass-loader": "^10.2.1",
     "script-ext-html-webpack-plugin": "^2.1.5",
-    "stylelint": "14.4.0",
+    "stylelint": "^14.5.3",
     "stylelint-config-prettier": "^9.0.3",
     "stylelint-config-recess-order": "^3.0.0",
     "stylelint-config-recommended-vue": "^1.3.0",
-    "stylelint-config-sass-guidelines": "^9.0.1",
     "stylelint-config-standard-scss": "^3.0.0",
     "stylelint-declaration-block-no-ignored-properties": "^2.5.0",
     "stylelint-webpack-plugin": "^3.1.0",

+ 15 - 0
src/api/list.js

@@ -74,3 +74,18 @@ export function PageQueryOrgQuotaList(data) {
     data
   });
 }
+
+/**
+ * 分页查询机构配额调整记录列表
+ * @param { Object } data
+ */
+export function PageQueryOrgQuotaAdjustRecordList(data) {
+  let params = getRequestParameter('live_quota_manager-PageQueryOrgQuotaAdjustRecordList');
+
+  return request({
+    method: 'post',
+    url: process.env.VUE_APP_FileServer,
+    params,
+    data
+  });
+}

+ 30 - 0
src/api/org.js

@@ -89,3 +89,33 @@ export function GetDistributablePopedomList_OrgManager(data) {
     data
   });
 }
+
+/**
+ * 调整机构配额
+ * @param { Object } data
+ */
+export function AdjustOrgQuota(data) {
+  let params = getRequestParameter('live_quota_manager-AdjustOrgQuota');
+
+  return request({
+    method: 'post',
+    url: process.env.VUE_APP_FileServer,
+    params,
+    data
+  });
+}
+
+/**
+ * 分页查询机构直播使用记录
+ * @param { Object } data
+ */
+export function PageQueryOrgLiveUsedRecordList(data) {
+  let params = getRequestParameter('live_quota_manager-PageQueryOrgLiveUsedRecordList');
+
+  return request({
+    method: 'post',
+    url: process.env.VUE_APP_FileServer,
+    params,
+    data
+  });
+}

+ 2 - 6
src/layouts/components/LayoutHeader.vue

@@ -207,12 +207,8 @@ export default {
         background-color: #0085ff;
       }
 
-      .home-page {
-        color: #848b91;
-
-        ~ a {
-          margin-left: 8px;
-        }
+      a:not(:last-child) {
+        color: #858b91;
       }
     }
   }

+ 9 - 3
src/router/index.js

@@ -194,7 +194,7 @@ const routes = [
   {
     path: '/quota',
     component: Layout,
-    meta: { title: '配额管理' },
+    meta: { title: '配额管理', path: '/quota' },
     redirect: '/quota/index',
     children: [
       {
@@ -202,8 +202,14 @@ const routes = [
         component: () => import('@/views/quota')
       },
       {
-        path: 'usageRecord',
-        component: () => import('@/views/quota/UsageRecord.vue')
+        path: 'usageRecord/:orgId/:orgName',
+        component: () => import('@/views/quota/UsageRecord.vue'),
+        meta: { title: '' },
+        props: true,
+        beforeEnter: ({ meta, params }, from, next) => {
+          meta.title = params.orgName;
+          next();
+        }
       }
     ]
   },

+ 20 - 0
src/styles/common.scss

@@ -0,0 +1,20 @@
+// 不换行,显示省略号
+.nowrap-ellipsis {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.container {
+  width: 1000px;
+  height: 100%;
+  margin: 0 auto;
+}
+
+.t-right {
+  text-align: right;
+}
+
+.operation {
+  cursor: pointer;
+}

+ 1 - 10
src/styles/index.scss

@@ -1,6 +1,7 @@
 @import './variables';
 @import './mixin';
 @import './element-ui';
+@import './common';
 
 body {
   height: 100%;
@@ -52,13 +53,3 @@ a:hover {
   text-decoration: none;
   cursor: pointer;
 }
-
-.container {
-  width: 1000px;
-  height: 100%;
-  margin: 0 auto;
-}
-
-.t-right {
-  text-align: right;
-}

+ 17 - 0
src/utils/validate.js

@@ -2,3 +2,20 @@ export function validNull(str) {
   let data = str && str !== '' ? str.trim() : '';
   return Boolean(data);
 }
+
+/**
+ * @description 只允许输入两位小数
+ * @param { String } value
+ * @returns { Number }
+ */
+export function twoDecimal(value) {
+  if (!value) {
+    return '';
+  }
+  let val = value;
+  val = val.replace(/[^\d.]/g, ''); // 清除"数字"和"."以外的字符
+  val = val.replace(/\.{2,}/g, '.'); // 只保留第一个 "." 清除多余的
+  val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.');
+  val = val.replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); // 只能输入两位小数
+  return val;
+}

+ 232 - 0
src/views/quota/SetQuota.vue

@@ -0,0 +1,232 @@
+<template>
+  <el-dialog width="646px" title="设置配额" :visible="visible" :before-close="close" :close-on-click-modal="false">
+    <div class="quota-set">
+      <div>
+        <span class="quota-set-label">当前余额:</span>
+        <div>{{ org_quota_lave }}小时</div>
+      </div>
+      <div>
+        <span class="quota-set-label">设置配额:</span>
+        <div class="quota-option-two">
+          <el-input v-model="quota_add" @input="setQuota">
+            <el-select slot="prepend" v-model="quota_multiply" class="set-quota" size="small">
+              <el-option v-for="{ value, label } in quota_options" :key="value" :label="label" :value="value" />
+            </el-select>
+          </el-input>
+          <span>&nbsp;小时</span>
+        </div>
+      </div>
+      <div>
+        <span class="quota-set-label">修改原因:</span>
+        <div>
+          <el-input v-model="memo" class="textarea" type="textarea" resize="none" rows="4" />
+        </div>
+      </div>
+      <div class="quota-button">
+        <span class="quota-set-label"></span>
+        <div>
+          <el-button class="confrim" @click="adjustOrgQuota">确认</el-button>
+        </div>
+      </div>
+    </div>
+    <div class="quota-list">
+      <div class="quota-list-title">修改记录:</div>
+      <el-table :data="data_list">
+        <el-table-column prop="operate_time" label="操作时间" width="150" />
+        <el-table-column prop="quota_lave_adjust_pre" label="修改前" width="122" />
+        <el-table-column prop="quota_lave_adjust_after" label="修改后" width="122" />
+        <el-table-column prop="quota_add" label="操作记录" width="122">
+          <template slot-scope="{ row }">
+            <span>{{ row.quota_add > 0 ? '增加' : '减少' }} {{ Math.abs(row.quota_add) }} 小时</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="operator_name" label="操作人" />
+      </el-table>
+      <div class="quota-list-pagination">
+        <div>共 {{ total_count }} 项记录</div>
+        <el-pagination
+          background
+          :page-size="page_capacity"
+          layout="prev, pager, next"
+          :total="total_count"
+          :current-page="cur_page"
+          @prev-click="changePage"
+          @next-click="changePage"
+          @current-change="changePage"
+        />
+      </div>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import { AdjustOrgQuota } from '@/api/org';
+import { PageQueryOrgQuotaAdjustRecordList } from '@/api/list';
+import { twoDecimal } from '@/utils/validate';
+
+export default {
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    orgId: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      form: {},
+      data_list: [],
+      org_quota_lave: 0,
+      quota_multiply: 1,
+      quota_add: 0,
+      quota_options: [
+        {
+          value: 1,
+          label: '增加'
+        },
+        {
+          value: -1,
+          label: '减少'
+        }
+      ],
+      page_capacity: 5,
+      cur_page: 1,
+      total_count: 0,
+      memo: ''
+    };
+  },
+  watch: {
+    orgId(newVal) {
+      if (!newVal) return;
+      this.pageQueryOrgQuotaAdjustRecordList();
+    },
+    visible(newVal) {
+      if (newVal) return;
+      this.org_quota_lave = 0;
+      this.quota_add = 0;
+      this.quota_multiply = 1;
+      this.data_list = [];
+      this.cur_page = 1;
+      this.total_count = 0;
+      this.memo = '';
+    }
+  },
+  methods: {
+    pageQueryOrgQuotaAdjustRecordList() {
+      PageQueryOrgQuotaAdjustRecordList({
+        org_id: this.orgId,
+        page_capacity: this.page_capacity,
+        cur_page: this.cur_page
+      }).then(({ total_count, cur_page, org_quota_lave, data_list }) => {
+        this.total_count = total_count;
+        this.cur_page = cur_page;
+        this.org_quota_lave = org_quota_lave;
+        this.data_list = data_list;
+      });
+    },
+
+    adjustOrgQuota() {
+      AdjustOrgQuota({ org_id: this.orgId, quota_add: this.quota_add * this.quota_multiply, memo: this.memo }).then(
+        () => {
+          this.$message.success('调整机构配额成功');
+          this.pageQueryOrgQuotaAdjustRecordList();
+        }
+      );
+    },
+
+    setQuota(val) {
+      this.quota_add = twoDecimal(val);
+    },
+
+    changePage(newPage) {
+      this.cur_page = newPage;
+      this.pageQueryOrgQuotaAdjustRecordList();
+    },
+
+    close() {
+      this.$emit('update:visible', false);
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.quota-set {
+  > div {
+    display: flex;
+    padding: 8px 0;
+
+    ::v-deep .textarea textarea {
+      width: 280px;
+    }
+
+    ::v-deep .el-input-group__prepend {
+      background-color: #fff;
+    }
+
+    .quota-option-two {
+      .el-input {
+        width: 150px;
+      }
+    }
+
+    .set-quota {
+      width: 80px;
+    }
+  }
+
+  .quota-button .el-button {
+    color: #fff;
+    background-color: #597ef7;
+  }
+
+  &-label {
+    width: 76px;
+  }
+}
+
+.quota-list {
+  border-top: 1px solid #f0f0f0;
+
+  &-title {
+    padding: 8px 0;
+    color: #000;
+  }
+
+  .el-table {
+    ::v-deep th.el-table__cell {
+      padding: 5px 0;
+      color: #333;
+      background-color: #f5f5f5;
+    }
+  }
+
+  &-pagination {
+    display: flex;
+    justify-content: space-between;
+    padding: 2px 24px 0;
+    line-height: 28px;
+    background-color: #f5f5f5;
+
+    .el-pagination {
+      line-height: 28px;
+    }
+
+    ::v-deep .el-pager {
+      li {
+        min-width: 24px;
+        height: 24px;
+        padding: 0;
+        line-height: 24px;
+
+        &:not(.disabled).active {
+          background-color: #597ef7;
+        }
+      }
+    }
+  }
+}
+</style>

+ 107 - 2
src/views/quota/UsageRecord.vue

@@ -1,12 +1,90 @@
 <template>
-  <div class="usage-record"></div>
+  <div class="usage-record">
+    <div class="quota-info">
+      <span class="quota-info-item">{{ orgName }}</span>
+      <span class="quota-info-item">当前余额:{{ org_quota_used }}小时</span>
+      <span class="quota-info-item">累计使用:{{ org_quota_lave }}小时</span>
+    </div>
+    <div class="usage-record-list">
+      <div class="title">使用记录</div>
+
+      <el-table :data="data_list">
+        <el-table-column prop="teacher_name" label="教师" width="120" />
+        <el-table-column prop="course_name" label="课程名称" width="157" />
+        <el-table-column prop="task_name" label="任务名称" width="157" />
+        <el-table-column prop="person_count" label="直播人数" width="96" />
+        <el-table-column prop="duration" label="直播时长" width="96" />
+        <el-table-column prop="duration_1v1_online" label="1v1" width="96" />
+        <el-table-column prop="duration_1vm_online" label="1v多" width="96" />
+        <el-table-column prop="use_time" label="使用时间" />
+      </el-table>
+    </div>
+
+    <el-pagination
+      background
+      :page-sizes="[10, 20, 30, 40, 50]"
+      :page-size="page_capacity"
+      layout="prev, pager, next, total, sizes, jumper"
+      :total="total_count"
+      :current-page="cur_page"
+      @prev-click="changePage"
+      @next-click="changePage"
+      @current-change="changePage"
+      @size-change="changePageSize"
+    />
+  </div>
 </template>
 
 <script>
+import { PageQueryOrgLiveUsedRecordList } from '@/api/org';
+
 export default {
   name: 'UsageRecord',
+  props: {
+    orgId: {
+      type: String,
+      default: ''
+    },
+    orgName: {
+      type: String,
+      default: ''
+    }
+  },
   data() {
-    return {};
+    return {
+      org_quota_lave: 0,
+      org_quota_used: 0,
+      data_list: [],
+      page_capacity: 10,
+      total_count: 0,
+      cur_page: 1
+    };
+  },
+  created() {
+    this.pageQueryOrgQuotaAdjustRecordList();
+  },
+  methods: {
+    pageQueryOrgQuotaAdjustRecordList() {
+      PageQueryOrgLiveUsedRecordList({
+        org_id: this.orgId,
+        page_capacity: this.page_capacity,
+        cur_page: this.cur_page
+      }).then(({ total_count, cur_page, org_quota_lave, org_quota_used, data_list }) => {
+        this.total_count = total_count;
+        this.cur_page = cur_page;
+        this.org_quota_lave = org_quota_lave;
+        this.org_quota_used = org_quota_used;
+        this.data_list = data_list;
+      });
+    },
+    changePage(newPage) {
+      this.cur_page = newPage;
+      this.pageQueryOrgQuotaAdjustRecordList();
+    },
+    changePageSize(pageSize) {
+      this.page_capacity = pageSize;
+      this.pageQueryOrgQuotaAdjustRecordList();
+    }
   }
 };
 </script>
@@ -17,5 +95,32 @@ export default {
 .usage-record {
   @include container;
   @include pagination;
+
+  .quota-info {
+    padding-top: 26px;
+    font-size: 18px;
+    font-weight: bold;
+    color: #000;
+
+    &-item {
+      margin-right: 24px;
+    }
+  }
+
+  &-list {
+    @include list;
+
+    padding: 24px;
+
+    .title {
+      margin-bottom: 16px;
+      font-weight: bold;
+      color: #000;
+    }
+
+    ::v-deep .el-table th.el-table__cell {
+      color: #000;
+    }
+  }
 }
 </style>

+ 42 - 8
src/views/quota/index.vue

@@ -2,14 +2,26 @@
   <div class="quota">
     <div class="quota-list">
       <el-table :data="data_list">
-        <el-table-column prop="org_name" label="机构" width="500" />
+        <el-table-column label="机构" width="500">
+          <template slot-scope="{ row }">
+            <router-link :to="`/quota/usageRecord/${row.org_id}/${row.org_name}`">
+              {{ row.org_name }}
+            </router-link>
+          </template>
+        </el-table-column>
         <el-table-column prop="quota_lave" label="剩余配额" width="160" />
         <el-table-column prop="quota_used" label="累计已用" width="160" />
-        <el-table-column prop="quota_status" label="状态" width="160" />
-        <el-table-column label="操作">
+        <el-table-column prop="quota_status" label="状态" width="160">
+          <template slot-scope="{ row }">
+            <span :style="{ color: row.quota_status ? '#CA0000' : '#019319' }">
+              {{ row.quota_status ? '已停用' : '使用中' }}
+            </span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" fixed="right">
           <template slot-scope="{ row }">
-            <span>设置配额</span>
-            <span>{{ row.quota_status ? '停用' : '启用' }}</span>
+            <span class="set-quota operation" @click="setQuota(row.org_id)">设置配额</span>
+            <span class="operation" @click="setStatus(row.org_id)">{{ row.quota_status ? '停用' : '启用' }}</span>
           </template>
         </el-table-column>
       </el-table>
@@ -27,20 +39,26 @@
       @current-change="changePage"
       @size-change="changePageSize"
     />
+
+    <set-quota :visible.sync="visible" :org-id="curOrgId" />
   </div>
 </template>
 
 <script>
 import { PageQueryOrgQuotaList } from '@/api/list';
+import SetQuota from './SetQuota.vue';
 
 export default {
   name: 'QuotaList',
+  components: { SetQuota },
   data() {
     return {
       data_list: [],
       page_capacity: 10,
       total_count: 0,
-      cur_page: 1
+      cur_page: 1,
+      visible: false,
+      curOrgId: ''
     };
   },
   created() {
@@ -61,6 +79,15 @@ export default {
     changePageSize(pageSize) {
       this.page_capacity = pageSize;
       this.pageQueryOrgQuotaList();
+    },
+
+    setQuota(org_id) {
+      this.visible = true;
+      this.curOrgId = org_id;
+    },
+
+    setStatus(org_id) {
+      console.log(org_id);
     }
   }
 };
@@ -72,6 +99,7 @@ export default {
 .quota {
   @include container;
   @include pagination;
+  @include dialog;
 
   padding: 24px 0 46px;
 
@@ -80,8 +108,14 @@ export default {
 
     padding: 0 32px;
 
-    ::v-deep .el-table th.el-table__cell {
-      color: #000;
+    .el-table {
+      .set-quota {
+        margin-right: 12px;
+      }
+
+      ::v-deep th.el-table__cell {
+        color: #000;
+      }
     }
   }
 }

+ 2 - 2
stylelint.config.js

@@ -2,7 +2,6 @@ module.exports = {
   defaultSeverity: 'warning',
   extends: [
     'stylelint-config-standard-scss',
-    'stylelint-config-sass-guidelines',
     'stylelint-config-recess-order',
     'stylelint-config-prettier',
     'stylelint-config-recommended-vue'
@@ -46,6 +45,7 @@ module.exports = {
     'selector-no-qualifying-type': [true, { ignore: ['attribute', 'class', 'id'] }],
     // 为类选择器指定一个模式
     'selector-class-pattern': null,
-    'declaration-colon-newline-after': null
+    'declaration-colon-newline-after': null,
+    'value-keyword-case': ['lower', { ignoreFunctions: ['optimizeLegibility'], camelCaseSvgKeywords: true }]
   }
 };