Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	package-lock.json
#	src/api/file.js
chillqi 3 éve
szülő
commit
c46fede45c

+ 89 - 18
package-lock.json

@@ -10,7 +10,7 @@
       "dependencies": {
         "@vitejs/plugin-vue": "^1.10.2",
         "axios": "^0.21.1",
-        "echarts": "^5.4.2",
+        "echarts": "^5.3.2",
         "echarts-gl": "^2.0.9",
         "element-plus": "1.0.2-beta.52",
         "vue": "^3.1.2",
@@ -68,6 +68,7 @@
       "cpu": [
         "loong64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -301,12 +302,12 @@
       "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ=="
     },
     "node_modules/echarts": {
-      "version": "5.4.2",
-      "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.4.2.tgz",
-      "integrity": "sha512-2W3vw3oI2tWJdyAz+b8DuWS0nfXtSDqlDmqgin/lfzbkB01cuMEN66KWBlmur3YMp5nEDEEt5s23pllnAzB4EA==",
+      "version": "5.4.1",
+      "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.4.1.tgz",
+      "integrity": "sha512-9ltS3M2JB0w2EhcYjCdmtrJ+6haZcW6acBolMGIuf01Hql1yrIV01L1aRj7jsaaIULJslEP9Z3vKlEmnJaWJVQ==",
       "dependencies": {
         "tslib": "2.3.0",
-        "zrender": "5.4.3"
+        "zrender": "5.4.1"
       }
     },
     "node_modules/echarts-gl": {
@@ -346,6 +347,7 @@
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz",
       "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==",
+      "dev": true,
       "hasInstallScript": true,
       "bin": {
         "esbuild": "bin/esbuild"
@@ -384,6 +386,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "android"
@@ -399,6 +402,7 @@
       "cpu": [
         "arm64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "android"
@@ -414,6 +418,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "darwin"
@@ -429,6 +434,7 @@
       "cpu": [
         "arm64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "darwin"
@@ -444,6 +450,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "freebsd"
@@ -459,6 +466,7 @@
       "cpu": [
         "arm64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "freebsd"
@@ -474,6 +482,7 @@
       "cpu": [
         "ia32"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -489,6 +498,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -504,6 +514,7 @@
       "cpu": [
         "arm"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -519,6 +530,7 @@
       "cpu": [
         "arm64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -534,6 +546,7 @@
       "cpu": [
         "mips64el"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -549,6 +562,7 @@
       "cpu": [
         "ppc64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -564,6 +578,7 @@
       "cpu": [
         "riscv64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -579,6 +594,7 @@
       "cpu": [
         "s390x"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -594,6 +610,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "netbsd"
@@ -609,6 +626,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "openbsd"
@@ -624,6 +642,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "sunos"
@@ -639,6 +658,7 @@
       "cpu": [
         "ia32"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "win32"
@@ -654,6 +674,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "win32"
@@ -669,6 +690,7 @@
       "cpu": [
         "arm64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "win32"
@@ -699,6 +721,7 @@
       "version": "2.3.2",
       "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
       "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+      "dev": true,
       "hasInstallScript": true,
       "optional": true,
       "os": [
@@ -711,12 +734,14 @@
     "node_modules/function-bind": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
-      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+      "dev": true
     },
     "node_modules/has": {
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
       "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+      "dev": true,
       "dependencies": {
         "function-bind": "^1.1.1"
       },
@@ -728,6 +753,7 @@
       "version": "2.11.0",
       "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
       "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
+      "dev": true,
       "dependencies": {
         "has": "^1.0.3"
       }
@@ -769,7 +795,8 @@
     "node_modules/path-parse": {
       "version": "1.0.7",
       "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
-      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
+      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+      "dev": true
     },
     "node_modules/picocolors": {
       "version": "1.0.0",
@@ -803,6 +830,7 @@
       "version": "1.22.1",
       "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
       "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
+      "dev": true,
       "dependencies": {
         "is-core-module": "^2.9.0",
         "path-parse": "^1.0.7",
@@ -816,6 +844,7 @@
       "version": "2.77.3",
       "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.3.tgz",
       "integrity": "sha512-/qxNTG7FbmefJWoeeYJFbHehJ2HNWnjkAFRKzWN/45eNBBF/r8lo992CwcJXEzyVxs5FmfId+vTSTQDb+bxA+g==",
+      "dev": true,
       "bin": {
         "rollup": "dist/bin/rollup"
       },
@@ -857,6 +886,7 @@
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
       "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+      "dev": true,
       "engines": {
         "node": ">= 0.4"
       }
@@ -870,6 +900,7 @@
       "version": "2.9.15",
       "resolved": "https://registry.npmjs.org/vite/-/vite-2.9.15.tgz",
       "integrity": "sha512-fzMt2jK4vQ3yK56te3Kqpkaeq9DkcZfBbzHwYpobasvgYmP2SoAr6Aic05CsB4CzCZbsDv4sujX3pkEGhLabVQ==",
+      "dev": true,
       "dependencies": {
         "esbuild": "^0.14.27",
         "postcss": "^8.4.13",
@@ -983,9 +1014,9 @@
       }
     },
     "node_modules/zrender": {
-      "version": "5.4.3",
-      "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.3.tgz",
-      "integrity": "sha512-DRUM4ZLnoaT0PBVvGBDO9oWIDBKFdAVieNWxWwK0niYzJCMwGchRk21/hsE+RKkIveH3XHCyvXcJDkgLVvfizQ==",
+      "version": "5.4.1",
+      "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.1.tgz",
+      "integrity": "sha512-M4Z05BHWtajY2241EmMPHglDQAJ1UyHQcYsxDNzD9XLSkPDqMq4bB28v9Pb4mvHnVQ0GxyTklZ/69xCFP6RXBA==",
       "dependencies": {
         "tslib": "2.3.0"
       }
@@ -1018,6 +1049,7 @@
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz",
       "integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==",
+      "dev": true,
       "optional": true
     },
     "@intlify/core-base": {
@@ -1075,8 +1107,7 @@
     "@vitejs/plugin-vue": {
       "version": "1.10.2",
       "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-1.10.2.tgz",
-      "integrity": "sha512-/QJ0Z9qfhAFtKRY+r57ziY4BSbGUTGsPRMpB/Ron3QPwBZM4OZAZHdTa4a8PafCwU5DTatXG8TMDoP8z+oDqJw==",
-      "requires": {}
+      "integrity": "sha512-/QJ0Z9qfhAFtKRY+r57ziY4BSbGUTGsPRMpB/Ron3QPwBZM4OZAZHdTa4a8PafCwU5DTatXG8TMDoP8z+oDqJw=="
     },
     "@vue/compiler-core": {
       "version": "3.2.47",
@@ -1227,6 +1258,16 @@
       "requires": {
         "tslib": "2.3.0",
         "zrender": "5.4.3"
+      },
+      "dependencies": {
+        "zrender": {
+          "version": "5.4.3",
+          "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.3.tgz",
+          "integrity": "sha512-DRUM4ZLnoaT0PBVvGBDO9oWIDBKFdAVieNWxWwK0niYzJCMwGchRk21/hsE+RKkIveH3XHCyvXcJDkgLVvfizQ==",
+          "requires": {
+            "tslib": "2.3.0"
+          }
+        }
       }
     },
     "echarts-gl": {
@@ -1257,6 +1298,7 @@
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz",
       "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==",
+      "dev": true,
       "requires": {
         "@esbuild/linux-loong64": "0.14.54",
         "esbuild-android-64": "0.14.54",
@@ -1285,120 +1327,140 @@
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz",
       "integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==",
+      "dev": true,
       "optional": true
     },
     "esbuild-android-arm64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz",
       "integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==",
+      "dev": true,
       "optional": true
     },
     "esbuild-darwin-64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz",
       "integrity": "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==",
+      "dev": true,
       "optional": true
     },
     "esbuild-darwin-arm64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz",
       "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==",
+      "dev": true,
       "optional": true
     },
     "esbuild-freebsd-64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz",
       "integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==",
+      "dev": true,
       "optional": true
     },
     "esbuild-freebsd-arm64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz",
       "integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-32": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz",
       "integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz",
       "integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-arm": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz",
       "integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-arm64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz",
       "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-mips64le": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz",
       "integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-ppc64le": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz",
       "integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-riscv64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz",
       "integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-s390x": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz",
       "integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==",
+      "dev": true,
       "optional": true
     },
     "esbuild-netbsd-64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz",
       "integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==",
+      "dev": true,
       "optional": true
     },
     "esbuild-openbsd-64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz",
       "integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==",
+      "dev": true,
       "optional": true
     },
     "esbuild-sunos-64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz",
       "integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==",
+      "dev": true,
       "optional": true
     },
     "esbuild-windows-32": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz",
       "integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==",
+      "dev": true,
       "optional": true
     },
     "esbuild-windows-64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz",
       "integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==",
+      "dev": true,
       "optional": true
     },
     "esbuild-windows-arm64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz",
       "integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==",
+      "dev": true,
       "optional": true
     },
     "estree-walker": {
@@ -1415,17 +1477,20 @@
       "version": "2.3.2",
       "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
       "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+      "dev": true,
       "optional": true
     },
     "function-bind": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
-      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+      "dev": true
     },
     "has": {
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
       "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+      "dev": true,
       "requires": {
         "function-bind": "^1.1.1"
       }
@@ -1434,6 +1499,7 @@
       "version": "2.11.0",
       "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
       "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
+      "dev": true,
       "requires": {
         "has": "^1.0.3"
       }
@@ -1469,7 +1535,8 @@
     "path-parse": {
       "version": "1.0.7",
       "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
-      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
+      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+      "dev": true
     },
     "picocolors": {
       "version": "1.0.0",
@@ -1500,6 +1567,7 @@
       "version": "1.22.1",
       "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
       "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
+      "dev": true,
       "requires": {
         "is-core-module": "^2.9.0",
         "path-parse": "^1.0.7",
@@ -1510,6 +1578,7 @@
       "version": "2.77.3",
       "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.3.tgz",
       "integrity": "sha512-/qxNTG7FbmefJWoeeYJFbHehJ2HNWnjkAFRKzWN/45eNBBF/r8lo992CwcJXEzyVxs5FmfId+vTSTQDb+bxA+g==",
+      "dev": true,
       "requires": {
         "fsevents": "~2.3.2"
       }
@@ -1537,7 +1606,8 @@
     "supports-preserve-symlinks-flag": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
-      "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="
+      "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+      "dev": true
     },
     "tslib": {
       "version": "2.3.0",
@@ -1548,6 +1618,7 @@
       "version": "2.9.15",
       "resolved": "https://registry.npmjs.org/vite/-/vite-2.9.15.tgz",
       "integrity": "sha512-fzMt2jK4vQ3yK56te3Kqpkaeq9DkcZfBbzHwYpobasvgYmP2SoAr6Aic05CsB4CzCZbsDv4sujX3pkEGhLabVQ==",
+      "dev": true,
       "requires": {
         "esbuild": "^0.14.27",
         "fsevents": "~2.3.2",
@@ -1622,9 +1693,9 @@
       }
     },
     "zrender": {
-      "version": "5.4.3",
-      "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.3.tgz",
-      "integrity": "sha512-DRUM4ZLnoaT0PBVvGBDO9oWIDBKFdAVieNWxWwK0niYzJCMwGchRk21/hsE+RKkIveH3XHCyvXcJDkgLVvfizQ==",
+      "version": "5.4.1",
+      "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.1.tgz",
+      "integrity": "sha512-M4Z05BHWtajY2241EmMPHglDQAJ1UyHQcYsxDNzD9XLSkPDqMq4bB28v9Pb4mvHnVQ0GxyTklZ/69xCFP6RXBA==",
       "requires": {
         "tslib": "2.3.0"
       }

+ 7 - 7
src/api/analysisConfig.js

@@ -7,10 +7,10 @@ import {axios} from '../utils/request'
  * @returns
  */
 export const addAnalysisConfig = payload => {
-    const { fileId, userId, configName, chosenColumns} = payload;
-    // return axios.post(`${MOCK}/ml/configs`, {
-    return axios.post(`${MOCK}/analysis/configs`, {
-        fileId, userId, configName, chosenColumns
+    const { fileInfoId, userId, configName, chosenColumns} = payload;
+    return axios.post(`${ANALYSIS_CONFIG_MODULE}`, {
+    // return axios.post(`${MOCK}/analysis/configs`, {
+        fileInfoId, userId, configName, chosenColumns
     }).then(res => {
         return res;
     });
@@ -22,9 +22,9 @@ export const addAnalysisConfig = payload => {
  * @returns
  */
 export const getAnalysisConfig = payload => {
-    const {uid} = payload;
-    // return axios.get(`${ANALYSIS_CONFIG_MODULE}?userId=${uid}`).then(res => {
-        return axios.get(`${MOCK}/analysis/configs/all/:userId`).then(res => {
+    const {userId} = payload;
+    return axios.get(`${ANALYSIS_CONFIG_MODULE}/all/${userId}`).then(res => {
+        // return axios.get(`${MOCK}/analysis/configs/all/:userId`).then(res => {
         return res;
     });
 }

+ 34 - 21
src/api/config.js

@@ -11,16 +11,16 @@ import {MOCK} from "./_prefix";
  */
 export const addConfig = payload => {
   const { fileInfoId, userId, learningType, configName, features, label} = payload;
-  // return axios.post(`${CONFIG_MODULE}`, {
-  //   fileInfoId, userId, learningType ,configName ,features, label
-  // }).then(res => {
-  //   return res;
-  // });
-  return axios.post(`${MOCK}/ml/configs`, {
+  return axios.post(`${CONFIG_MODULE}`, {
     fileInfoId, userId, learningType ,configName ,features, label
   }).then(res => {
     return res;
   });
+  // return axios.post(`${MOCK}/ml/configs`, {
+  //   fileInfoId, userId, learningType ,configName ,features, label
+  // }).then(res => {
+  //   return res;
+  // });
 }
 
 
@@ -31,11 +31,15 @@ export const addConfig = payload => {
  * @returns
  */
 export const getAllConfig = payload => {
-  const {uid} = payload;
-  // return axios.get(`${CONFIG_MODULE}/get/all?userId=${uid}`).then(res => {
-  //   return res;
-    return axios.get(`${MOCK}/ml/configs:useId=1`).then(res => {
-      return res;
+  const {userId} = payload;
+  return axios.get(`${CONFIG_MODULE}`,{
+    params:{
+      userId: userId
+    }
+  }).then(res => {
+    return res;
+  //   return axios.get(`${MOCK}/ml/configs:useId=1`).then(res => {
+  //     return res;
   });
 }
 
@@ -61,11 +65,15 @@ export const getAllNew = payload => {
  * @returns
  */
 export const getOneConfig = payload => {
-  const { configId } = payload;
-  // return axios.get(`${CONFIG_MODULE}/get/one/config?configId=${configId}`).then(res => {
-  //   return res;});
-  return axios.get(`${MOCK}/ml/configs/:configId`).then(res => {
+  const { configId, userId } = payload;
+  return axios.get(`${CONFIG_MODULE}/${configId}`,{
+    params:{
+      userId: userId
+    }
+  }).then(res => {
     return res;});
+  // return axios.get(`${MOCK}/ml/configs/:configId`).then(res => {
+  //   return res;});
 }
 
 /**
@@ -89,12 +97,17 @@ export const changeConfig = payload => {
  * @param {*} payload
  * @returns
  */
-export const deleteConfig = configId => {
-  // return axios.get(`${CONFIG_MODULE}/delete?configId=${configId}`).then(res => {
-  //   return res;
-    return axios.delete(`${MOCK}/ml/configs/${configId}`).then(res => {
-      return res;
-  });
+export const deleteConfig = payload => {
+  const {configId, userId} = payload
+  return axios.delete(`${CONFIG_MODULE}/${configId}`,{
+    params:{
+      userId: userId
+    }
+  }).then(res => {
+    return res;
+  //   return axios.delete(`${MOCK}/ml/configs/${configId}`).then(res => {
+  //     return res;
+   });
 }
 
 /**

+ 120 - 46
src/api/file.js

@@ -23,32 +23,6 @@ export const UploadFile = payload => {
     })
 }
 
-/**
- * ({
-        url: `${FILE_MODULE}/upload`,
-        method: 'post',
-        data: payload,
-        "Process-Data": false,// 告诉axios不要去处理发送的数据(重要参数)
-        "Content-Type": false,   // 告诉axios不要去设置Content-Type请求头
-    }).then(res => {
-        return res.data
-    });
- */
-
-
-//    return axios.post(`${FILE_MODULE}/upload`,
-//         payload,
-//  {
-//             headers:{
-//                 'Content-Type': "multipart/form-data",
-//                 // 'Content-Type': "false",
-//                 // 'Process-Data': 'false',
-//             }
-//         }
-
- //    ).then(res => {
- //        return res.data;
- //    });
 
 /**
  *  获得文件列表 GET /get/all
@@ -56,17 +30,17 @@ export const UploadFile = payload => {
  * @returns
  */
 export const GetAllFile = userId => {
-    // return axios.get(`${FILE_MODULE}`, {
-    //     params:{
-    //         userId: userId
-    //     }
-    // }).then( res => {
-    //     return res;
-    // });
-    return axios.get(`${MOCK}/files:userId=1`, {
-        }).then( res => {
-            return res;
-        });
+    return axios.get(`${FILE_MODULE}`, {
+        params:{
+            userId: userId
+        }
+    }).then( res => {
+        return res;
+    });
+    // return axios.get(`${MOCK}/files:userId=1`, {
+    //     }).then( res => {
+    //         return res;
+    //     });
 }
 
 // 直接返回数据
@@ -86,13 +60,18 @@ export const GetAllFile = userId => {
  * @param {*} fileId 文件Id
  * @returns
  */
-export const getFileDetail = fileId => {
-    // return axios.get(`${FILE_MODULE}/${fileId}`).then( res => {
-    //     return res;
-    // })
-    return axios.get(`${MOCK}/files/:fileInfoId`).then( res => {
+export const getFileDetail = payload => {
+    const {fileInfoId, userId} = payload;
+    return axios.get(`${FILE_MODULE}/${fileInfoId}`,{
+        params:{
+            userId: userId
+        }
+    }).then( res => {
         return res;
     })
+    // return axios.get(`${MOCK}/files/:fileInfoId`).then( res => {
+    //     return res;
+    // })
 }
 
 /**
@@ -101,12 +80,12 @@ export const getFileDetail = fileId => {
  * @returns
  */
 export const deleteFile = fileId => {
-    // return axios.delete(`${FILE_MODULE}/${fileId}`).then( res => {
-    //         return res;
-    // });
-    return axios.delete(`${MOCK}/files/:fileInfoId`).then( res => {
+    return axios.delete(`${FILE_MODULE}/${fileId}`).then( res => {
         return res;
     });
+    // return axios.delete(`${MOCK}/files/:fileInfoId`).then( res => {
+    //     return res;
+    // });
 }
 
 /**
@@ -128,4 +107,99 @@ export const analysisFile = (fieldIds,funcId) => {
     return axios.get(url).then(res => {
         return res;
     });
+    // if (funcId==1){
+    //     return Promise.resolve({
+    //         "timestamp": 1649561125585,
+    //         "status": 200,
+    //         "data": {
+    //             "105_statistical": {
+    //                 "R": 330.0,
+    //                 "L": 424.0
+    //             },
+    //             "105_distribution": {
+    //                 "R": 0.4376657824933687,
+    //                 "L": 0.5623342175066314
+    //             }
+    //         }
+    //     });
+    // }
+    // if (funcId==2){
+    //     return Promise.resolve({
+    //         "timestamp": 1649561125585,
+    //         "status": 200,
+    //         "data":{
+    //             "103": [
+    //                 79.0,
+    //                 737.0,
+    //                 753.0],
+    //             "104": [
+    //                 3.16,
+    //                 29.48,
+    //                 30.12],
+    //             "108": [
+    //                 20.0,
+    //                 291.0,
+    //                 318.0]
+    //         }
+    //     });
+    // }
+    // if (funcId==3){
+    //     return Promise.resolve({
+    //         "timestamp": 1649561321298,
+    //         "status": 200,
+    //         "data": {
+    //             "frame_index": {
+    //                 "max": 89992.0,
+    //                 "variance": 6.474726567563616E8,
+    //                 "mean": 45439.82360742705,
+    //                 "stddev": 25445.484014975264
+    //             }
+    //         }
+    //     })
+    // }
+    // if (funcId==4){
+    //     return Promise.resolve({
+    //         "timestamp": 1649561409955,
+    //         "status": 200,
+    //         "data": {
+    //             "103": {
+    //                 "skewness": -0.010820149962232854,
+    //                 "kurtosis": -1.0998405481091291
+    //             }
+    //         }
+    //     })
+    // }
+    // if (funcId==5){
+    //     return Promise.resolve({
+    //         "timestamp": 1649561470265,
+    //         "status": 200,
+    //         "data": {
+    //             "Corr": 0.9999999999999994
+    //         }
+    //     })
+    // }
+    // return Promise.resolve({
+    //     "timestamp": 1649561470265,
+    //     "status": 400,
+    //     "data": ""
+    // })
+}
+
+/**
+ *  获得文件描述信息 GET /get/detail
+ * @param {*} fileId 文件Id
+ * @returns
+ */
+export const getFileDescribe = payload => {
+    const {fileInfoId, userId} = payload;
+    return axios.get(`${FILE_MODULE}/describe/${fileInfoId}`,{
+        params:{
+            userId: userId
+        }
+    }).then( res => {
+        return res;
+    })
+    // return axios.get(`${MOCK}/files/:fileInfoId`).then( res => {
+    //     return res;
+    // })
 }

+ 20 - 22
src/api/model.js

@@ -9,7 +9,8 @@ import {MOCK} from "./_prefix";
  */
 export const addModel = async payload => {
     const {configId, userId, modelName, machineLearningAlgorithm, trainParams} = payload;
-    const res = await axios.post(`${MOCK}/ml/models`, {
+    // const res = await axios.post(`${MOCK}/ml/models`, {
+    const res = await axios.post(`${MODEL_MODULE}`, {
         configId,
         userId,
         modelName,
@@ -50,8 +51,12 @@ export const deleteModel=async modelId=>{
      */
     export const getAllModel = async payload => {
         const{ userId } = payload;
-        // const res = await axios.get(`${MODEL_MODULE}/get/all`, {params: {userId: userId}})
-        const res = await axios.get(`${MOCK}/ml/models:userId=1`)
+        const res = await axios.get(`${MODEL_MODULE}`, {
+            params: {
+                userId: userId
+            }
+        })
+        // const res = await axios.get(`${MOCK}/ml/models:userId=1`)
         return res
     }
 /**
@@ -60,9 +65,9 @@ export const deleteModel=async modelId=>{
  * @returns
  */
 export const getModelByConfigId = async payload => {
-    const{ config } = payload;
-    // const res = await axios.get(`${MODEL_MODULE}/get/all`, {params: {userId: userId}})
-    const res = await axios.get(`${MOCK}/ml/models/configs/:configId`)
+    const{ configId,userId } = payload;
+    const res = await axios.get(`${MODEL_MODULE}/configs/${configId}`, {params: {userId: userId}})
+    // const res = await axios.get(`${MOCK}/ml/models/configs/:configId`)
     return res
 }
 
@@ -117,29 +122,22 @@ export const getOneModel = async payload => {
         return res;
     }
     /**
-     * 训练 GET /model/train
+     * 训练 POST /model/train
      * @param modelId
      * @returns
      */
     export const train = async payload=>{
-        const { modelId } = payload;
-        // const res=await axios.get(`${MODEL_MODULE}/train`,{params:{modelId:modelId}});
-        const res=await axios.get(`${MOCK}/ml/models/:modelId/train`);
-        return res;
-    }
-    /**
-     * 使用模型预测 GET /model/use
-     * @param modelId
-     * @param fileId
-     * @returns
-     */
-    export const use = async data=>{
-        const {modelId,fileId}=data;
-        // const res=await axios.get(`${MODEL_MODULE}/use?fileId=${fileId}&modelId=${modelId}`);
-        const res=await axios.post(`${MOCK}/ml/predictions/predict:modelId=1&fileInfoId=2`);
+        const { modelId, userId } = payload;
+        const res=await axios.post(`${MODEL_MODULE}/${modelId}/train?userId=1`,{
+            params:{
+                userId: userId
+            }
+        });
+        // const res=await axios.get(`${MOCK}/ml/models/:modelId/train`);
         return res;
     }
 
 
 
 
+

+ 18 - 3
src/api/prediction.js

@@ -2,15 +2,30 @@ import {axios} from '../utils/request'
 import {MODEL_MODULE, PREDICTION_MODULE} from "./_prefix";
 import {MOCK} from "./_prefix";
 
+
+/**
+ * 使用模型预测 POST /model/use
+ * @param modelId
+ * @param fileId
+ * @returns
+ */
+export const use = async payload =>{
+    const {modelId, fileInfoId, userId}=payload;
+    const res=await axios.post(
+        `${PREDICTION_MODULE}/predict?modelId=${modelId}&fileInfoId=${fileInfoId}&userId=${userId}`
+    );
+    // const res=await axios.post(`${MOCK}/ml/predictions/predict:modelId=1&fileInfoId=2`);
+    return res;
+}
 /**
  * 获取某一个模型下的预测结果 GET
  * @param userId
  * @returns
  */
 export const getPrediction = async payload => {
-    const{ modelId } = payload;
-    // const res = await axios.get(`${MODEL_MODULE}/get/all`, {params: {userId: userId}})
-    const res = await axios.get(`${MOCK}/ml/predictions/models/:modelId`)
+    const{ modelId, userId } = payload;
+     const res = await axios.get(`${PREDICTION_MODULE}/models/${modelId}`, {params: {userId: userId}})
+    // const res = await axios.get(`${MOCK}/ml/predictions/models/:modelId`)
     return res
 }
 

+ 11 - 0
src/api/utils.js

@@ -5,4 +5,15 @@ import {MOCK} from "./_prefix";
 export const getEnum = () => {
     const res = axios.get(`${API_MODULE}/hello/enum`)
     return res
+}
+export const downloadFile = (payload) => {
+    const {fileUri} =payload
+    const res =axios.get(`${API_MODULE}/download?fileUri=${fileUri}`,{
+            headers:{
+                'Content-Type': "multipart/form-data;"
+                // 'Content-Type': "false",
+                // 'Process-Data': 'false',
+            }
+    })
+    return res
 }

+ 17 - 3
src/views/analysis/Analysis.vue

@@ -14,7 +14,7 @@
         header-cell-class-name="table-header"
     >
       <el-table-column prop="configName" label="配置名"></el-table-column>
-      <el-table-column prop="fileId" label="文件id"></el-table-column>
+      <el-table-column prop="fileInfoId" label="文件id"></el-table-column>
       <el-table-column label="查看历史分析">
         <template #default="scope">
           <el-button type="text" icon="el-icon-circle-check" class="yellow"
@@ -36,6 +36,10 @@
       </el-table-column>
 
     </el-table>
+    <div class="pagination">
+      <el-pagination background layout="total, prev, pager, next" :current-page="query.pageIndex"
+                     :page-size="query.pageSize" :total="pageTotal" @current-change="handlePageChange"></el-pagination>
+    </div>
 
     <el-dialog title="新建统计分析配置" v-model="analysisVisible" width="50%">
       <el-form label-width="150px">
@@ -118,6 +122,12 @@ import {addAnalysisPipeline} from "../../api/analysisPipeline";
 export default {
   name: "Analysis",
   setup(){
+    const query = reactive({
+      file: "",
+      name: "",
+      pageIndex: 1,
+      pageSize: 10,
+    });
     const tableData = ref([]);
     const pageTotal = ref(0);
     let analysisVisible = ref(false);
@@ -185,9 +195,12 @@ export default {
 
     const getPage=()=> {
       getAnalysisConfig({
-        uid: 1
+        userId: 1
       }).then(res => {
-        tableData.value = res.result.configVOList;
+        console.log(res.result)
+        tableData.value = res.result;
+        console.log(tableData.value)
+        pageTotal.value = tableData.value.length
       })
     };
     getPage();
@@ -273,6 +286,7 @@ export default {
     }
 
     return{
+      query,
       tableData,
       pageTotal,
       analysisVisible,

+ 16 - 6
src/views/analysis/AnalysisConfig.vue

@@ -14,7 +14,7 @@
           header-cell-class-name="table-header"
       >
         <el-table-column prop="configName" label="配置名"></el-table-column>
-        <el-table-column prop="fileId" label="文件id"></el-table-column>
+        <el-table-column prop="fileInfoId" label="文件id"></el-table-column>
         <el-table-column prop="chosenColumns" label="选中字段"></el-table-column>
         <el-table-column label="操作" width="180" align="center">
           <template #default="scope">
@@ -28,7 +28,10 @@
           </template>
         </el-table-column>
       </el-table>
-
+      <div class="pagination">
+        <el-pagination background layout="total, prev, pager, next" :current-page="query.pageIndex"
+                       :page-size="query.pageSize" :total="pageTotal" @current-change="handlePageChange"></el-pagination>
+      </div>
 
     </div>
 
@@ -36,22 +39,28 @@
 </template>
 
 <script>
-import {ref} from "vue";
+import {reactive, ref} from "vue";
 import {deleteAnalysisConfig, getAnalysisConfig} from "../../api/analysisConfig";
 import {ElMessage, ElMessageBox} from "element-plus";
 
 export default {
   name: "AnalysisConfig",
   setup(){
+    const query = reactive({
+      file: "",
+      name: "",
+      pageIndex: 1,
+      pageSize: 10,
+    });
     const tableData = ref([]);
     const pageTotal = ref(0);
 
     const getPage=()=> {
       getAnalysisConfig({
-        uid: 1
+        userId: 1
       }).then(res => {
-        console.log("res",res);
-        tableData.value = res.result.configVOList;
+        tableData.value = res.result;
+        pageTotal.value = tableData.value.length
       })
     };
     getPage();
@@ -75,6 +84,7 @@ export default {
 
 
     return{
+      query,
       tableData,
       pageTotal,
       getPage,

+ 14 - 0
src/views/analysis/AnalysisPipeline.vue

@@ -27,6 +27,10 @@
           </template>
         </el-table-column>
       </el-table>
+      <div class="pagination">
+        <el-pagination background layout="total, prev, pager, next" :current-page="query.pageIndex"
+                       :page-size="query.pageSize" :total="pageTotal" @current-change="handlePageChange"></el-pagination>
+      </div>
     </div>
     <el-dialog
         v-model="usePipelineVisible"
@@ -84,6 +88,13 @@ export default {
   name: "AnalysisPipeline",
 
   setup(){
+    const query = reactive({
+      file: "",
+      name: "",
+      pageIndex: 1,
+      pageSize: 10,
+    });
+    const pageTotal = ref(0);
     const tableData = ref();
     let usePipelineVisible = ref(false)
     let useForm = reactive({
@@ -111,6 +122,7 @@ export default {
       })
       getAllAnalysisPipeline({uid}).then(res =>{
         tableData.value = res.result.analysisPipelineVOList
+        pageTotal.value = tableData.value.length
       })
     }
     getPage()
@@ -338,6 +350,8 @@ export default {
     }
 
     return{
+      query,
+      pageTotal,
       tableData,
       usePipelineVisible,
       useForm,

+ 0 - 1
src/views/file/FileAnalysis.vue

@@ -30,7 +30,6 @@
 
 <script>
 import {ref} from "vue";
-import {analysisFile} from "../../api/file";
 import {ElMessageBox} from "element-plus";
 import {useRoute} from "vue-router";
 import {useRouter} from "vue-router";

+ 21 - 211
src/views/file/FileDetail.vue

@@ -29,8 +29,8 @@
                 @selection-change="handleSelectChange"
       >
         <el-table-column width="50" type="selection"></el-table-column>
-        <el-table-column label="字段id">
-          <template #default="scope"><span>{{ scope.row.id }}</span></template>
+        <el-table-column label="序号">
+          <template #default="scope"><span>{{ scope.$index + 1 }}</span></template>
         </el-table-column>
         <el-table-column label="字段名">
           <template #default="scope"><span>{{ scope.row.fieldName }}</span></template>
@@ -53,19 +53,10 @@
         <el-form-item label="配置名" required>
           <el-input v-model="analysisConfName"></el-input>
         </el-form-item>
-<!--        <el-form-item label="分析方法" required>-->
-<!--          <el-select v-model="form.type" placeholder="分析方法" class="handle-select mr10" @change="changeMethodMsg">-->
-<!--            <el-option key="1" label="数据分布" value="1"></el-option>-->
-<!--            <el-option key="2" label="散点图" value="2"></el-option>-->
-<!--            <el-option key="3" label="数据统计" value="3"></el-option>-->
-<!--            <el-option key="4" label="偏度-峰度" value="4"></el-option>-->
-<!--            <el-option key="5" label="皮尔森相关系数" value="5"></el-option>-->
-<!--          </el-select>-->
-<!--        </el-form-item>-->
         <el-alert type="info"
                   show-icon style="height: 40px;">{{methodMsg.valueOf()}}</el-alert>
         <el-form-item label="方法和字段要求" required>
-          <text>皮尔森相关系数需要两个int/double字段,散点图可以传入2-3个字段,其他的方法只需一个字段。除了数据分布可以传入string字段,其他方法请传入int/double字段</text>
+          <text>皮尔森相关系数需要2个int/double字段,散点图可以传入2个字段,其他的方法只需一个字段。除了数据分布可以传入string字段,其他方法请传入int/double字段</text>
         </el-form-item>
         <el-form-item label="已选择字段" required>
           <el-table :data="selectData" border class="table"  header-cell-class-name="table-header" >
@@ -83,54 +74,12 @@
       </template>
     </el-dialog>
 
-    <!--数理函数分析结果-->
-    <el-dialog title="数理函数分析结果" v-model="resultVisible" width="50%">
-      <el-form label-width="120px">
-        <el-form-item label="分析方法" required>
-            {{ AnalysisMethodName[parseInt(form.type)-1] }}
-        </el-form-item>
-        <el-form-item label="已选择字段" required>
-          <el-table :data="selectData" border class="table"  header-cell-class-name="table-header" >
-            <el-table-column label="字段名">
-              <template #default="scope"><span>{{ scope.row.fieldName }}</span></template>
-            </el-table-column>
-          </el-table>
-        </el-form-item>
-        <el-form-item label="分析结果" required>
-          <el-table :data="analysisData" border class="table"  header-cell-class-name="table-header" >
-            <el-table-column label="分析指标" prop="attribute">
-              <template #default="scope"><span>{{ scope.row.attribute }}</span></template>
-            </el-table-column>
-            <el-table-column label="指标数值" prop="value">
-              <template #default="scope"><span>{{ scope.row.value }}</span></template>
-            </el-table-column>
-          </el-table>
-        </el-form-item>
-      </el-form>
-      <template #footer>
-                <span class="dialog-footer">
-                    <el-button @click="resultVisible = false">取 消</el-button>
-                </span>
-      </template>
-    </el-dialog>
-
     <el-dialog title="新建AI模型配置" v-model="configCreate" width="50%">
       <el-form label-width="120px">
         <el-form-item label="配置名" required>
           <el-input v-model="form.name"></el-input>
         </el-form-item>
-<!--        <el-form-item label="模型类别" required>-->
-<!--          <el-select v-model="form.type" placeholder="模型类别" class="handle-select mr10" @change="selectModelTypeChange">-->
-<!--            <el-option key="1" label="逻辑回归" value="1"></el-option>-->
-<!--            <el-option key="2" label="决策树" value="2"></el-option>-->
-<!--            <el-option key="3" label="随机森林" value="3"></el-option>-->
-<!--            <el-option key="4" label="梯度提升决策树" value="4"></el-option>-->
-<!--            <el-option key="5" label="K-均值" value="5"></el-option>-->
-<!--            <el-option key="6" label="多层感知器分类器" value="6"></el-option>-->
-<!--            <el-option key="7" label="朴素贝叶斯" value="7"></el-option>-->
-<!--            <el-option key="8" label="随机森林回归" value="8"></el-option>-->
-<!--          </el-select>-->
-<!--        </el-form-item>-->
+
         <el-form-item label="模型类别" required>
           <el-select v-model="form.type" placeholder="学习类型" class="handle-select mr10">
             <el-option key="1" label="监督学习" value="SUPERVISED_LEARNING"></el-option>
@@ -149,13 +98,6 @@
             </el-table-column>
           </el-table>
         </el-form-item>
-<!--        <el-form-item label="标签字段" v-if="labelTip===1">-->
-<!--          <el-table :data="selectData" border class="table" header-cell-class-name="table-header">-->
-<!--            <el-table-column label="字段名">-->
-<!--              <template #default="scope"><span>{{ scope.row.fieldName }}</span></template>-->
-<!--            </el-table-column>-->
-<!--          </el-table>-->
-<!--        </el-form-item>-->
 
       </el-form>
       <template #footer>
@@ -169,13 +111,11 @@
 </template>
 
 <script>
-import {ref, reactive, getCurrentInstance, onMounted} from "vue";
+import {ref, reactive} from "vue";
 import { ElMessage, ElMessageBox } from "element-plus";
-import { fetchData } from "../../api";
-import {getFileDetail,analysisFile} from "../../api/file";
+import {getFileDescribe, getFileDetail} from "../../api/file";
 import {useRoute}from "vue-router";
 import {useRouter}from "vue-router";
-import { toRaw } from '@vue/reactivity'
 import {addConfig,getFeatureSelection} from "../../api/config";
 import {addAnalysisConfig} from "../../api/analysisConfig";
 
@@ -194,16 +134,6 @@ export default {
     let fileId;
     let AnalysisMethodName=["数据分布","散点图","数据统计","偏度-峰度","皮尔森相关系数"];
 
-    //TODO
-    let fieldNameList=[]; //字段名
-    let aliasList=[];   //别名
-    let descList=[];      //描述
-    let aList=[];   //取值类型
-    let bList=[];   //分布类型
-    let cList=[];   //空值率
-    let dList=[];
-
-
     const tableData = ref([]);
     const selectData = ref([]);
     let analysisData=reactive([])
@@ -218,30 +148,23 @@ export default {
     const getData = () => {
       const route=useRoute()
       if(route.query.fileId!=null) {
-        getFileDetail(route.query.fileId).then(res => {
-          tableData.value = res.result.fileFieldList;
+        const payload ={
+          fileInfoId: route.query.fileId,
+          userId: 1
+        }
+        getFileDetail(payload).then(res => {
+          tableData.value = res.result.fileFields;
+          pageTotal.value = tableData.value.length
           fileId=route.query.fileId
         })
+        // getFileDescribe(payload).then(res=>{
+        //   console.log("describe: "+JSON.stringify(res.result))
+        // })
       }
 
     };
     getData();
 
-    const getFeature=()=>{
-      if(selectData.value.length===0){ElMessage.error("请先选择目标字段");return;}
-      if(selectData.value.length>1){ElMessage.error("目标字段仅可选择一个");return;}
-      getFeatureSelection({"fileId":fileId,"fieldName":selectData.value[0].fieldName}).then(
-          res=>{
-            console.log(res)
-            res=res.data
-            for(let i=0;i<res.length;i++){
-              selectData.value.unshift(res[i])
-            }
-            createConfig()
-          }
-
-      )
-    }
     // 查询操作
     const handleSearch = () => {
       query.pageIndex = 1;
@@ -253,32 +176,15 @@ export default {
       getData();
     };
 
-    // 删除操作
-    const handleDelete = (index) => {
-      // 二次确认删除
-      ElMessageBox.confirm("确定要删除吗?", "提示", {
-        type: "warning",
-      })
-          .then(() => {
-            ElMessage.success("删除成功");
-            tableData.value.splice(index, 1);
-            //todo:
-          })
-          .catch(() => {});
-    };
-
     // 表格编辑时弹窗和保存
     let analysisVisible = ref(false);
     let form = reactive({
       name: "",
       type: "",
       needLabel: "",
-      // classification:"",
-      // feature:"",
     });
     let analysisConfName = ref();
 
-    let idx = -1;
     const handleAnalysis = () => {
       if (selectData.value.length<1){
         ElMessage.warning("至少选择一个字段!");
@@ -288,16 +194,17 @@ export default {
     };
     const createAnalysisConfig = () => {
       const payload={
-        fileId:selectData.value[0].fileInfoId,
+        fileInfoId:selectData.value[0].fileInfoId,
         userId:1,
-        configName:analysisConfName,
+        configName:analysisConfName.value,
         chosenColumns:[],
       }
         for(let i=0;i<selectData.value.length;i++){
           payload.chosenColumns.push(selectData.value[i].fieldName);
         }
-        console.log(payload)
+        console.log("p"+JSON.stringify(payload))
       addAnalysisConfig(payload).then(res=>{
+        console.log("r"+JSON.stringify(res))
         if(res.msg === '成功') {
           ElMessage.success(`已成功生成配置`);
           analysisVisible.value = false;
@@ -306,111 +213,19 @@ export default {
       })
     };
 
-    const changeMethodMsg=(value)=>{
-      console.log(value)
-      if(value===1){
-        methodMsg.value="数据分布无特殊限制"
-      }else if(value===2){
-        methodMsg.value="散点图可以传入2-3个int/double字段"
-      }else if(value===3){
-        methodMsg.value="请传入1个int/double字段"
-      }else if(value===4){
-        methodMsg.value="请传入1个int/double字段"
-      }else if(value===5){
-        methodMsg.value="请传入2个int/double字段"
-      }
-    }
-    const startAnalysis = () => {
-      analysisVisible.value = false;
-      //todo: 数理分析相关
-
-      console.log(form.type);
-      console.log(toRaw(selectData.value));
-      let selectList=[];
-      let fieldIds=[];
-      for (var i=0; i<selectData.value.length;i++){
-        //selectList.push(JSON.parse(JSON.stringify(selectData.value[i])))
-        fieldIds.push(selectData.value[i].id);
-        //console.log(selectData.value[i].id)
-        //console.log(selectData.value[i])
-        //console.log(JSON.parse(JSON.stringify(selectData.value[i])))
-      }
-      //console.log(selectList)
-      console.log(fieldIds);
-      if (form.type=="1"||form.type=="2"){
-        router.push({
-          path:"/FileAnalysis",
-          query:{
-            fieldIds:JSON.stringify(fieldIds),
-            funcId:form.type
-          }
-        });
-        return ;
-      };
-      analysisFile(JSON.stringify(fieldIds),form.type).then(res=>{
-        console.log(res.data)
-        if (res.status!=200){
-          ElMessageBox.confirm("分析产生错误,请检查您的分析方法和字段选择是否合理", "错误", {
-            type: "error",
-          })
-              .then(()=>{
-
-              })
-              .catch(() => {});
-        }else{
-          analysisData.length=0
-          console.log(form.type);
-          switch (form.type){
-            case "1":
-              break;
-            case "2":
-              break;
-            case "3":
-              analysisData.push({attribute:"最大值",value:res.data.frame_index.max});
-              analysisData.push({attribute:"方差",value:res.data.frame_index.variance});
-              analysisData.push({attribute:"平均值",value:res.data.frame_index.mean});
-              analysisData.push({attribute:"标准方差",value:res.data.frame_index.stddev});
-              console.log(analysisData)
-              break;
-            case "4":
-              analysisData.push({attribute:"偏度",value:res.data[fieldIds[0]].skewness});
-              analysisData.push({attribute:"峰度",value:res.data[fieldIds[0]].kurtosis});
-              console.log(analysisData)
-              break;
-            case "5":
-              analysisData.push({attribute:"皮尔森相关系数",value:res.data.Corr});
-              console.log(analysisData)
-              break;
-          }
-
-          resultVisible.value=true;
-        }
-      });
-
-    };
     let resultVisible= ref(false);
     let featureTip=ref(0);
     let labelTip = ref(0);
 
-    const selectModelTypeChange=(selectValue)=>{
-      if(selectValue==="8")featureTip.value=2;
-      else featureTip.value=1;
-    }
-    // const selectLabelChange=(selectValue)=>{
-    //   if(selectValue === "SUPERVISED_LEARNING") labelTip.value=1;
-    //   else labelTip.value=2;
-    // }
     const configCreate = ref(false);
     const createConfig =() => {
       if (selectData.value.length<=1){
         ElMessage.warning("至少选择两个字段!");
         return ;
       }
-      const fieldTable = ref(null)
       configCreate.value = true;
     };
     const saveConfig=()=>{
-      const route=useRoute()
       const payload={
         fileInfoId:selectData.value[0].fileInfoId,
         userId:1,
@@ -454,22 +269,17 @@ export default {
       configCreate,
       createConfig,
       saveConfig,
-      getFeature,
       selectData,
       analysisData,
       featureTip,
       labelTip,
       methodMsg,
-      selectModelTypeChange,
-      //selectLabelChange,
+      getData,
       createAnalysisConfig,
       handleSelectChange,
       handleSearch,
       handlePageChange,
-      handleDelete,
       handleAnalysis,
-      startAnalysis,
-      changeMethodMsg,
       handleFileSelect,
     };
   },

+ 5 - 4
src/views/file/FileList.vue

@@ -28,12 +28,12 @@
                 <!----------------------------获取文件详细信息、跳转到响应页面;删除文件------------------------------->
                 <div style="display:flex; width: 100%;">
                   <el-button size="small" style="margin-right: 10px"
-                             @click="handleFileDetail(scope.row.fileId)">查看</el-button>
+                             @click="handleFileDetail(scope.row.id)">查看</el-button>
                   <el-button size="small" type="warning" style="margin-right: 10px"
-                             @click="handleShareDialog(scope.row.fileId);shareDialogVisible=true">分享</el-button>
+                             @click="handleShareDialog(scope.row.id);shareDialogVisible=true">分享</el-button>
                   <!--  scope.$index 是数组下标,这里再传一个fileId             handleFileDelete(scope.$index,scope.row.fileId)   -->
                   <el-button size="small" type="danger"
-                             @click="handleDeleteDialog(scope.row.fileId);deleteDialogVisible=true">删除</el-button>
+                             @click="handleDeleteDialog(scope.row.id);deleteDialogVisible=true">删除</el-button>
                 </div>
               </template>
             </el-table-column>
@@ -116,7 +116,8 @@ export default {
     const getFileList=(userId)=>{
       GetAllFile(userId).then(res=>{
         if(res.msg === '成功'){
-          state.fileList=res.result.fileInfoVOList;
+          console.log(res)
+          state.fileList=res.result;
           console.log(state.fileList)
         }
         else{

+ 76 - 111
src/views/ml/ConfigDetail.vue

@@ -13,7 +13,12 @@
         <div class="form-box" >
           <el-form ref="formRef" label-width="120px">
             <el-form-item label="学习类型:" >
-              {{config.learningType}}
+              <div v-if="config.learningType === 'SUPERVISED_LEARNING'">
+                监督学习
+              </div>
+              <div v-else-if="config.learningType === 'UNSUPERVISED_LEARNING'">
+                非监督学习
+              </div>
             </el-form-item>
             <el-form-item label="特征字段:" >
               {{config.features}}
@@ -34,8 +39,8 @@
               </el-table-column>
               <el-table-column label="训练状态">
                 <template #default="scope" >
-                  <div v-if="scope.row.trainingState==='UNTRAINED'">未训练</div>
-                  <div v-else-if="scope.row.trainingState==='TRAINING'">训练中</div>
+                  <div v-if="scope.row.trainingState==='WAITING'">未训练</div>
+                  <div v-else-if="scope.row.trainingState==='ON_GOING'">训练中</div>
                   <div v-else-if="scope.row.trainingState==='SUCCESS'">训练成功</div>
                   <div v-else="">训练失败</div>
                 </template>
@@ -64,43 +69,31 @@
 
 
           <el-dialog title="新建模型" v-model="modelVisiable" width="30%">
-            <el-form label-width="120px">
+            <el-form >
               <el-form-item label="模型名称" required>
                 <el-input v-model="form.modelName"></el-input>
               </el-form-item>
-              <el-form-item label="算法名称" required>
-                <el-select v-model="form.machineLearningAlgorithm" placeholder="请选择一个算法" class="handle-select mr10">
-                  <el-option key="1" label="逻辑回归" value="LOGISTIC_REGRESSION_CLASSIFICATION"></el-option>
-                  <el-option key="2" label="决策树" value="DECISION_TREE_CLASSIFICATION"></el-option>
-                  <el-option key="3" label="梯度提升树分类" value="GRADIENT_BOOSTED_TREE_CLASSIFICATION"></el-option>
-                  <el-option key="4" label="多层感知器分类" value="MULTI_LAYER_PERCEPTRON_CLASSIFICATION"></el-option>
-                  <el-option key="5" label="朴素贝叶斯分类" value="NAIVE_BAYES_CLASSIFICATION"></el-option>
-                  <el-option key="6" label="随机森林分类" value="RANDOM_FOREST_CLASSIFICATION"></el-option>
-                  <el-option key="7" label="随机森林回归" value="RANDOM_FOREST_REGRESSION"></el-option>
-                  <el-option key="8" label="K均值聚类" value="K_MEANS_CLUSTERING"></el-option>
+              <el-form-item label="选择算法" required>
+                <el-select
+                    v-model="form.machineLearningAlgorithm"
+                    placeholder="请选择一个算法"
+                    value-key="self"
+                >
+                  <el-option
+                      v-for="(item,index) in enumList"
+                      :key="index"
+                      :label="item.algorithmName"
+                      :value="item"
+                  />
                 </el-select>
               </el-form-item>
-              <el-form-item label="MaxIter" v-model="showMaxIter" v-if="judgeAlgorithmType() === 1">
-                <el-input v-model="form.trainParams.MaxIter"></el-input>
-              </el-form-item>
-              <el-form-item label="RegParam" v-model="showRegParam" v-if="judgeAlgorithmType() === 1">
-                <el-input v-model="form.trainParams.RegParam"></el-input>
-              </el-form-item>
-              <el-form-item label="ElasticNetParam" v-model="showElasticNetParam" v-if="judgeAlgorithmType() === 1">
-                <el-input v-model="form.trainParams.ElasticNetParam"></el-input>
-              </el-form-item>
-              <el-form-item label="Category" v-model="showCategory" v-if="judgeAlgorithmType() === 3">
-                <el-input v-model="form.trainParams.Category"></el-input>
-              </el-form-item>
-              <el-form-item label="DataSetOccupy" v-model="showTrainingDataSetOccupy" v-if="judgeAlgorithmType() === 3">
-                <el-input v-model="form.trainParams.TrainingDataSetOccupy"></el-input>
-              </el-form-item>
-              <el-form-item label="NumOfCluster" v-model="showNumOfCluster" v-if="judgeAlgorithmType() === 2">
-                <el-input v-model="form.trainParams.NumOfCluster"></el-input>
-              </el-form-item>
-              <el-form-item label="Seed" v-model="showSeed" v-if="judgeAlgorithmType() === 2">
-                <el-input v-model="form.trainParams.Seed"></el-input>
-              </el-form-item>
+                <div v-for="(item,index) in form.machineLearningAlgorithm.trainParamEnums" :key="index">
+                  <el-tooltip  :content="item.description" placement="left-start" >
+                    <el-form-item :label="item.paramName">
+                      <el-input v-model="form.trainParams[index]" ></el-input>
+                    </el-form-item>
+                  </el-tooltip>
+                </div>
 
             </el-form>
             <template #footer>
@@ -112,16 +105,11 @@
           </el-dialog>
           </div>
         </div>
-
-
 <!--      <div class="pagination">-->
 <!--        <el-pagination background layout="total, prev, pager, next" :current-page="query.pageIndex"-->
 <!--                       :page-size="query.pageSize" :total="pageTotal" @current-change="handlePageChange"></el-pagination>-->
 <!--      </div>-->
 
-
-
-
     </div>
 
 
@@ -150,17 +138,6 @@ export default {
       pageSize: 10,
     });
     const fileId=ref(1);
-    //new TODO
-    //TODO
-    const fieldNameList=[]; //字段名
-    const aliasList=[];   //别名
-    const descList=[];      //描述
-    const aList=[];   //取值类型
-    const bList=[];   //分布类型
-    const cList=[];   //空值率
-    const dList=[];
-
-
     const tableData = ref([]);
     const selectData = ref([]);
     const pageTotal = ref(0);
@@ -175,56 +152,52 @@ export default {
     const showNumOfCluster=ref(false);
     const showSeed=ref(false);
 
-    // let form = reactive({
-    //   modelTypeId:"",
-    //   configId:route.query.configId,
-    //   fileInfoId:"",
-    //   modelName:"",
-    //   MaxIter:"",
-    //   RegParam:"",
-    //   ElasticNetParam:"",
-    //   Category:"",
-    //   TrainingDataSetOccupy:"",
-    //   NumOfCluster:"",
-    //   Seed:"",
-    // });
+    let enumList = ref([])
+
     let form = reactive({
       configId: route.query.configId,
       modelName: "",
-      machineLearningAlgorithm: "",
-      trainParams: {},
+      machineLearningAlgorithm: '',
+      trainParams: [],
     });
     // 获取表格数据
 
     const getData = () => {
-      // console.log("queryId",route.query.configId);
       if(route.query.configId!=null) {
-        getOneConfig({configId:route.query.configId}).then(res => {
-          // console.log("configdetail",route.query.configId);
+        const payload ={
+          configId: route.query.configId,
+          userId: 1
+        }
+        getOneConfig(payload).then(res => {
           config.value=res.result;
-          // form.modelTypeId=config.value.learningType;
-          // if (form.modelTypeId==='1') {
-          //   showMaxIter.value = true;
-          //   showRegParam.value = true;
-          //   showElasticNetParam.value = true;
-          // }else if (form.modelTypeId==='5') {
-          //   showNumOfCluster.value=true;
-          //   showSeed.value=true;
-          // }else {
-          //   showCategory.value=true;
-          //   showTrainingDataSetOccupy.value=true;
-          // }
-          // console.log("form",form);
           tableData.value = res.result.features;
-        });
-        getModelByConfigId({configId:route.query.configId}).then(res =>{
-          modelData.value=res.result.modelVOList;
+          getEnum().then(ress=>{
+            if (res.result.learningType === 'SUPERVISED_LEARNING'){
+              const tempArr = ress.result[0]
+              for (let j =0; j<tempArr.machineLearningAlgorithmTypeEnum.length;j++){
+                for (let k =0; k<tempArr.machineLearningAlgorithmTypeEnum[j].machineLearningAlgorithmEnums.length;k++){
+                  enumList.value.push(tempArr.machineLearningAlgorithmTypeEnum[j].machineLearningAlgorithmEnums[k])
+                }
+              }
+            }
+            else {
+              const tempArr = ress.result[1]
+              for (let j =0; j<tempArr.machineLearningAlgorithmTypeEnum.length;j++){
+                for (let k =0; k<tempArr.machineLearningAlgorithmTypeEnum[j].machineLearningAlgorithmEnums.length;k++){
+                  enumList.value.push(tempArr.machineLearningAlgorithmTypeEnum[j].machineLearningAlgorithmEnums[k])
+                }
+              }
+            }
+          })
+        })
+        const payloadModel={
+          configId:route.query.configId,
+          userId: 1
+        }
+        getModelByConfigId(payloadModel).then(res =>{
+          modelData.value=res.result;
         })
-        // getEnum().then(res=>{
-        //   console.log("enum: "+res)
-        // })
       }
-
     };
     getData();
 
@@ -256,29 +229,23 @@ export default {
         configId:form.configId,
         userId: 1,
         modelName:form.modelName,
-        machineLearningAlgorithm: form.machineLearningAlgorithm,
+        machineLearningAlgorithm: form.machineLearningAlgorithm.self,
         trainParams:{}
       }
-      const arg1={
-        MaxIter:form.trainParams.MaxIter,
-        RegParam:form.trainParams.RegParam,
-        ElasticNetParam:form.trainParams.ElasticNetParam
-      }
-      const arg3={
-        Category:form.trainParams.Category,
-        TrainingDataSetOccupy:form.trainParams.TrainingDataSetOccupy
-      }
-      const arg4={
-        NumOfCluster:form.trainParams.NumOfCluster,
-        Seed:form.trainParams.Seed
+      console.log(form.trainParams)
+      let key_arr=[]
+      let l = form.machineLearningAlgorithm.trainParamEnums.length
+      for (let i = 0;i<l;i++){
+          key_arr.push(form.machineLearningAlgorithm.trainParamEnums[i].self)
       }
-      if (judgeAlgorithmType() === 1){
-        payload.trainParams=arg1;
-      }else if (judgeAlgorithmType() === 5){
-        payload.trainParams=arg4;
-      }else{
-        payload.trainParams=arg3;
+      let param_obj={}
+      for (let i=0;i<l;i++){
+        let temp = key_arr[i]
+        param_obj[temp]=form.trainParams[i]
       }
+      payload.trainParams = param_obj
+      console.log("payload"+JSON.stringify(payload))
+
       addModel(payload).then(res=>{
         console.log(res)
         if(res.msg === '成功') {
@@ -289,7 +256,6 @@ export default {
 
 
     };
-    let idx = -1;
     const handleEdit = () => {
       editVisible.value = true;
     };
@@ -317,6 +283,7 @@ export default {
       form,
       fileId,
       showMaxIter,
+      enumList,
       saveModel,
 
       showRegParam,
@@ -333,8 +300,6 @@ export default {
       handlePageChange,
       createModel,
       handleEdit,
-
-
     };
   },
 };

+ 95 - 226
src/views/ml/ConfigList.vue

@@ -23,12 +23,6 @@
                 </el-select>
                 <el-input v-model="query.name" placeholder="配置名" class="handle-input mr10"></el-input>
                 <el-button type="primary" icon="el-icon-search" @click="handleSearch">搜索</el-button>
-<!--              <router-link to="modelList">-->
-<!--              <el-button type="success" icon="el-icon-plus"  style="position: absolute;right: 25em">所有配置</el-button>-->
-<!--              </router-link>-->
-<!--                <el-button type="success" icon="el-icon-plus" @click="handleEdit(tableData.length,0)" style="position: absolute;right: 15em">添加配置</el-button>-->
-<!--                <el-button type="danger" icon="el-icon-minus" @click="handleBatchDelete" style="position: absolute;right: 5em">批量删除</el-button>-->
-<!--            </div>-->
             </div>
             <el-table
                 :data="tableData" border class="table" ref="multipleTable"
@@ -38,9 +32,16 @@
             >
                 <el-table-column prop="configName" label="配置名"></el-table-column>
                 <el-table-column label="学习类型">
-                    <template #default="scope">{{ scope.row.learningType }}</template>
+                    <template #default="scope">
+                      <div v-if="scope.row.learningType === 'SUPERVISED_LEARNING'">
+                        监督学习
+                      </div>
+                      <div v-else-if="scope.row.learningType === 'UNSUPERVISED_LEARNING'">
+                        非监督学习
+                      </div>
+                    </template>
                 </el-table-column>
-              <el-table-column prop="fileInfoId" label="文件id"></el-table-column>
+              <el-table-column prop="fileName" label="文件名"></el-table-column>
                 <el-table-column label="特征字段">
                     <template #default="scope">{{ scope.row.features }}</template>
                 </el-table-column>
@@ -49,7 +50,6 @@
               </el-table-column>
                 <el-table-column label="操作" width="180" align="center">
                     <template #default="scope">
-
                       <router-link :to="{path:'/ConfigDetail',query:{configId:scope.row.id}}">
                         <el-button type="text" icon="el-icon-view" >查看详情
                         </el-button>
@@ -65,52 +65,6 @@
             </div>
         </div>
 
-        <!-- 编辑弹出框 -->
-        <el-dialog title="编辑" v-model="editVisible" min-width="30%">
-            <el-form label-width="150px">
-                <el-form-item label="配置名称" required>
-                    <el-input v-model="form.name"></el-input>
-                </el-form-item>
-                <el-form-item label="训练文件" required>
-                    <el-input v-model="form.file"></el-input>
-                </el-form-item>
-                <el-form-item label="选择模型类别" required>
-                  <el-radio-group v-model="modelSty.resource">
-                  <el-radio label="分类"></el-radio>
-                  <el-radio label="聚类"></el-radio>
-                  <el-radio label="回归"></el-radio>
-                  <el-radio label="自动化分类器"></el-radio>
-                  </el-radio-group>
-                </el-form-item>
-
-                <el-form-item label="特征选择方式" required>
-<!--                    <el-checkbox v-for="f in featureList" :key="f" :label="f"></el-checkbox>-->
-                  <el-radio-group v-model="featureSty.resource">
-                    <el-radio label="手动选择"></el-radio>
-                    <el-radio label="自动选择"></el-radio>
-                  </el-radio-group>
-                </el-form-item>
-
-<!--              <el-form-item label="单选框" prop="resource">-->
-<!--                <el-radio-group v-model="form.resource">-->
-<!--                  <el-radio label="步步高"></el-radio>-->
-<!--                  <el-radio label="小天才"></el-radio>-->
-<!--                  <el-radio label="imoo"></el-radio>-->
-<!--                </el-radio-group>-->
-<!--              </el-form-item>-->
-
-                <el-form-item label="选择特征字段" required>
-                  <el-alert type="info" description="您下列选择的第一个字段为分类模型的目标字段"
-                            show-icon style="height: 40px;"></el-alert>
-                </el-form-item>
-            </el-form>
-            <template #footer>
-                <span class="dialog-footer">
-                    <el-button @click="editVisible = false">取 消</el-button>
-                    <el-button type="primary" @click="saveEdit">确 定</el-button>
-                </span>
-            </template>
-        </el-dialog>
     </div>
 </template>
 
@@ -120,196 +74,111 @@ import { ElMessage, ElMessageBox } from "element-plus";
 import { fetchData } from "../../api";
 import {addConfig, deleteConfig, getAllConfig} from "../../api/config";
 import {useRouter} from "vue-router";
+import {getFileDetail} from "../../api/file";
 
 export default {
-    name: "config",
-    //训练特征
-  // data(){
-  //     return{
-  //       form:{
-  //         name:"",
-  //         file:"",
-  //       }
-  //     }
-  // },
+  name: "config",
   setup() {
-    const featureSty = reactive({
-
-      resource: "小天才",
-
-    });
-    const modelSty = reactive({
-
-      resource: "小天才",
-
+    const query = reactive({
+        file: "",
+        name: "",
+        pageIndex: 1,
+        pageSize: 10,
     });
-        const query = reactive({
-            file: "",
-            name: "",
-            pageIndex: 1,
-            pageSize: 10,
-        });
 
-        //new TODO
-        const typeList=["所有","分类","聚类","回归","自动分类器"];
-        const featureList=["所有","手动选择","自动选择"];
-        const multipleSelection =ref([]);
+    const multipleSelection =ref([]);
 
-        // const tableData = ref([]);
-    const tableData = ref([
-      ]);
+    const tableData = ref([]);
 
-        const pageTotal = ref(0);
-        // 获取表格数据
+    const pageTotal = ref(0);
 
     const getpage=()=> {
-      getAllConfig({
-        uid: 1
-      }).then(res => {
-        tableData.value = res.result.configVOList;
-        // for (let i=0;i<tableData.value.length;i++){
-        //   tableData.value[i].name=[];
-        //   for (let j=0;j<tableData.value[i].featureList.length-1;j++){
-        //     tableData.value[i].name.push(tableData.value[i].featureList[j].fieldName);
-        //   }
-        //   tableData.value[i].target=tableData.value[i].featureList[tableData.value[i].featureList.length-1].fieldName;
-        // }
+      const payload ={
+        userId: 1
+      }
+      getAllConfig(payload).then(res => {
+        tableData.value = res.result;
+        pageTotal.value = tableData.value.length
+        for (let i in tableData.value){
+          const filePayload={
+            userId: 1,
+            fileInfoId: tableData.value[i].fileInfoId
+          }
+          getFileDetail(filePayload).then(fileRes=>{
+            tableData.value[i].fileName = fileRes.result.fileName
+          })
+        }
       })
     };
      getpage();
 
-
-
     // 查询操作
-        const handleSearch = () => {
-            query.pageIndex = 1;
-            getData();
-        };
-        // 分页导航
-        const handlePageChange = (val) => {
-            query.pageIndex = val;
-            getData();
-        };
-
-        // 删除操作(单个)
-        const handleDelete = (index) => {
-            // 二次确认删除
-            ElMessageBox.confirm("确定要删除吗?", "提示", {
-                type: "warning",
-            })
-                .then(() => {
-                    // ElMessage.success("删除成功");
-                    // tableData.value.splice(index, 1);
-                  let idx=tableData.value[index].id;
-                  console.log(idx);
-                  deleteConfig(idx
-                  ).then(res=>{
-                    //console.log("deleteres",res);
-                    if(res.msg === '成功'){
-                      ElMessage.success("删除成功!")
-                      //location.reload();
-                      getpage();
-                    }
-                  });
-
-                })
-                .catch(() => {});
-        };
-
-        //TODO
-        const handleSelectionChange = (val) => {
-          multipleSelection.value = val
-        };
-
-        //TODO 批量删除
-        const handleBatchDelete =()=>{
-          // 二次确认
-          if(multipleSelection.value.length<=0){
-            ElMessageBox.alert("请先勾选要删除的模型", '提示', {
-              confirmButtonText: '好的'
-            })
-          }
-          else{
-            ElMessageBox.confirm("确定要删除这些模型吗?", "提示", {
+      const handleSearch = () => {
+          query.pageIndex = 1;
+          getpage();
+      };
+      // 分页导航
+      const handlePageChange = (val) => {
+          query.pageIndex = val;
+          getpage();
+      };
+
+      // 删除操作(单个)
+      const handleDelete = (index) => {
+          // 二次确认删除
+          ElMessageBox.confirm("确定要删除吗?", "提示", {
               type: "warning",
-            })
-                .then(() => {
-                  let idList=[];
-                  for(let i=0;i<multipleSelection.value.length;i++){
-                    let id=multipleSelection.value[i]['id'];
-                    idList.push(id);
-                  }
-                  idList.sort();
-                  console.log(idList);
-                  for (let i = idList[idList.length-1]; i >=0 ; i--) {
-                    tableData.value.splice(i,1);
+          })
+              .then(() => {
+                let idx=tableData.value[index].id;
+                console.log(idx);
+                const payload ={
+                  configId: idx,
+                  userId: 1
+                }
+                deleteConfig(payload
+                ).then(res=>{
+                  if(res.msg === '成功'){
+                    ElMessage.success("删除成功!")
+                    //location.reload();
+                    getpage();
                   }
-                  ElMessage.success("删除成功");
-                })
-                .catch(() => {});
-          }
-        };
-
-        const getConfigDetail=(row,column,event)=>{
-          var configId=row.configId;
-         let router=useRouter()
-          router.push(`/ConfigDetail?configId=${configId}`)
-        }
-        // 表格编辑时弹窗和保存
-        const editVisible = ref(false);
-        let form = reactive({
-            name: "",
-            file: "",
-          // classification:"",
-          // feature:"",
-        });
-        let idx = -1;
-        const handleEdit = (index, row) => {
-            idx = index;
-            Object.keys(form).forEach((item) => {
-                form[item] = row[item];
-            });
-            editVisible.value = true;
-        };
-
-        const saveEdit = () => {
-            editVisible.value = false;
-            // ElMessage.success(`修改第 ${idx + 1} 行成功`);
-            // Object.keys(form).forEach((item) => {
-            //     tableData.value[idx][item] = form[item];
-            // });
-          // console.log("here",featureSty.resource);
-          // const { , ,confName , fieldIds} = payload;
-
-          addConfig({
-            fileInfoId:form.file,
-            userId:0,
-            modelTypeId:modelSty.resource,
-            confName:form.name,
-            fieldIds:featureSty.resource
-            }).then(res=>{
-              console.log(res);
-            });
-        };
-
-        return {
-            query,
-            tableData,
-            pageTotal,
-            editVisible,
-            form,
-            handleSearch,
-            handlePageChange,
-            handleDelete,
+                });
+
+              })
+              .catch(() => {});
+      };
+
+      //TODO
+      const handleSelectionChange = (val) => {
+        multipleSelection.value = val
+      };
+
+      const getConfigDetail=(row,column,event)=>{
+        var configId=row.configId;
+       let router=useRouter()
+        router.push(`/ConfigDetail?configId=${configId}`)
+      }
+      // 表格编辑时弹窗和保存
+      const editVisible = ref(false);
+      let form = reactive({
+          name: "",
+          file: "",
+      });
+
+      return {
+          query,
+          tableData,
+          pageTotal,
+          editVisible,
+          form,
+          handleSearch,
+          handlePageChange,
+          handleDelete,
           handleSelectionChange,
-            handleBatchDelete,
-            handleEdit,
-            saveEdit,
           getConfigDetail,
-            featureSty,
-          modelSty,
           getpage,
-        };
+      };
     },
 };
 </script>

+ 14 - 0
src/views/ml/MLPipeline.vue

@@ -34,6 +34,10 @@
         </template>
       </el-table-column>
     </el-table>
+    <div class="pagination">
+      <el-pagination background layout="total, prev, pager, next" :current-page="query.pageIndex"
+                     :page-size="query.pageSize" :total="pageTotal" @current-change="handlePageChange"></el-pagination>
+    </div>
   </div>
 
   <el-dialog
@@ -74,6 +78,13 @@ import {GetAllFile} from "../../api/file";
 export default {
   name: "MLPipeline",
   setup(){
+    const query = reactive({
+      file: "",
+      name: "",
+      pageIndex: 1,
+      pageSize: 10,
+    });
+    const pageTotal = ref(0);
     const tableData = ref();
     let usePipelineVisible = ref(false)
     let useForm = reactive({
@@ -90,6 +101,7 @@ export default {
       })
       getAllPipeline({uid}).then(res =>{
         tableData.value = res.result.pipeLineVOList
+        pageTotal.value = tableData.value.length
       })
     }
     getPage()
@@ -167,6 +179,8 @@ export default {
     }
 
     return{
+      query,
+      pageTotal,
       tableData,
       usePipelineVisible,
       useForm,

+ 19 - 10
src/views/ml/ModelList.vue

@@ -148,7 +148,8 @@
 <script>
 import { ref, reactive } from "vue";
 import { ElMessage, ElMessageBox } from "element-plus";
-import {getAllModel, getOneModel, train, use} from "../../api/model";
+import {getAllModel, getOneModel, train} from "../../api/model";
+import {use} from "../../api/prediction";
 import {GetAllFile} from "../../api/file";
 import {useRoute, useRouter} from "vue-router";
 import {deleteModel} from "../../api/model";
@@ -234,12 +235,12 @@ export default {
     const getpage=()=> {
       const uid=1;
       GetAllFile(uid).then(res=>{
-        fileList.value=res.result.fileInfoVOList;
+        fileList.value=res.result;
       })
       getAllModel({
          userId: uid
       }).then(res => {
-        tableData.value = res.result.modelVOList;
+        tableData.value = res.result;
         pageTotal.value=tableData.value.length
         for(let i=0;i<tableData.value.length;i++) {
           const reg=new RegExp("\"","g");
@@ -284,9 +285,12 @@ export default {
             instance.confirmButtonText = '训练中...'
             let idx=modelId;
             console.log("modelId: "+idx);
-            train({
-              modelId: idx
-            }).then(res=>{
+            const payload={
+              modelId: idx,
+              userId: 1,
+            }
+            console.log(payload)
+            train(payload).then(res=>{
               instance.confirmButtonLoading = false
               console.log("train_res: ",res);
               if (res.msg === '成功')
@@ -315,12 +319,16 @@ export default {
           }
         },
       })
+      // setTimeout(() => {
+      //   ElMessageBox.close()  //重要
+      //   ElMessage.error("超时!")
+      // }, 100000);
     };
     const modelRes=ref();
     const resVisible = ref(false);
     const handleTrainRes = (index) => {
       const reg=new RegExp("\"","g");
-     modelRes.value= ((JSON.stringify(tableData.value[index].trainResultMap)+"")
+     modelRes.value= ((JSON.stringify(tableData.value[index].trainResults)+"")
             .replace(reg,"")
             .replace("{","")
             .replace("}","")
@@ -347,9 +355,10 @@ export default {
         //todo模型使用
      const useModel = (fileId) => {
       useModelVisible.value=false;
-       let data={
+       let payload={
         modelId:usemodelId.value,
-         fileId:fileId
+         fileInfoId:fileId,
+         userId: 1,
        }
        ElMessageBox( {
          title: "确定要预测吗?",
@@ -360,7 +369,7 @@ export default {
            if (action === 'confirm') {
              instance.confirmButtonLoading = true
              instance.confirmButtonText = '预测中...'
-             use(data).then(res=>{
+             use(payload).then(res=>{
                instance.confirmButtonLoading = false
                console.log("predic_res: ",res);
                if (res.msg === '成功')

+ 55 - 12
src/views/ml/PredictionList.vue

@@ -15,19 +15,32 @@
     >
       <el-table-column prop="modelId" label="模型id"></el-table-column>
       <el-table-column prop="createdTime" label="创建时间"></el-table-column>
-      <el-table-column prop="precitionState" label="预测状态"></el-table-column>
+      <el-table-column prop="predictionState" label="预测状态"></el-table-column>
       <el-table-column prop="finishTime" label="完成时间"></el-table-column>
 
       <el-table-column label="操作" width="180" align="center">
         <template #default="scope">
             <el-button type="text" icon="el-icon-download"
-                       @click="handleDownload(scope.row.predictedFileDownloadingUri)">下载
+                       @click="handleDownload(scope.row.predictionFileDownloadingUri)">下载
             </el-button>
         </template>
       </el-table-column>
     </el-table>
   </div>
 
+  <el-dialog v-model="downloadVisible" title="下载预测结果" width="30%">
+    <el-form width="300px">
+      <el-form-item label="文件名称" required>
+        <el-input v-model="fileName"></el-input>
+      </el-form-item>
+    </el-form>
+    <template #footer>
+          <span class="dialog-footer">
+            <el-button @click="downloadVisible = false">取消</el-button>
+            <el-button type="primary" @click="download" style="margin-left: 10px"> 下载 </el-button>
+          </span>
+    </template>
+  </el-dialog>
 
 </div>
 </template>
@@ -36,6 +49,7 @@
 import {getPrediction} from "../../api/prediction";
 import {useRoute} from "vue-router";
 import {ref} from "vue";
+import {downloadFile} from "../../api/utils";
 
 export default {
   name: "PredictionList",
@@ -44,28 +58,57 @@ export default {
     const tableData = ref([]);
 
     const getPage = () => {
-      getPrediction({modelId: route.query.modelId}).then(res => {
-        tableData.value=res.result.PredictionVOList;
+      const payload={
+        modelId: route.query.modelId ,
+        userId: 1
+      }
+      getPrediction(payload).then(res => {
+        tableData.value=res.result;
       })
     }
     getPage();
+    let fileName = ref('')
+    let downloadUri = ref()
+    let downloadVisible = ref(false)
 
     const handleDownload=(url)=>{
-      const a = document.createElement('a')
-      a.href = url
-      //a.download = res.success.fileName // 下载后文件名
-      a.style.display = 'none'
-      document.body.appendChild(a)
-      a.click() // 点击下载
-      document.body.removeChild(a)
+      downloadVisible.value =true
+      downloadUri.value = url
+    }
+    const download = () =>{
+      const payload={
+        fileUri: downloadUri.value
+      }
+      downloadFile(payload).then(data=>{
+        downloadVisible.value = false
+        let file = new Blob(["\ufeff" + data], { type: 'text/csv'});
+        if (window.navigator.msSaveOrOpenBlob)
+            // IE10+
+          window.navigator.msSaveOrOpenBlob(file, fileName.value);
+        else {
+          // Others
+          let a = document.createElement("a"),
+              url = URL.createObjectURL(file);
+          a.href = url;
+          a.download = fileName.value;
+          document.body.appendChild(a);
+          a.click();
+          setTimeout(function() {
+            document.body.removeChild(a);
+            window.URL.revokeObjectURL(url);
+          }, 0);
+        }
+      })
     }
-
 
     return {
       route,
       tableData,
+      fileName,
+      downloadVisible,
       getPage,
       handleDownload,
+      download,
     };
   },
 }