Просмотр исходного кода

修改广场界面,添加登录注册

chillqi 3 лет назад
Родитель
Сommit
cdf9c2a091

+ 18 - 89
package-lock.json

@@ -10,7 +10,7 @@
       "dependencies": {
         "@vitejs/plugin-vue": "^1.10.2",
         "axios": "^0.21.1",
-        "echarts": "^5.3.2",
+        "echarts": "^5.4.2",
         "echarts-gl": "^2.0.9",
         "element-plus": "1.0.2-beta.52",
         "vue": "^3.1.2",
@@ -68,7 +68,6 @@
       "cpu": [
         "loong64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -302,12 +301,12 @@
       "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ=="
     },
     "node_modules/echarts": {
-      "version": "5.4.1",
-      "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.4.1.tgz",
-      "integrity": "sha512-9ltS3M2JB0w2EhcYjCdmtrJ+6haZcW6acBolMGIuf01Hql1yrIV01L1aRj7jsaaIULJslEP9Z3vKlEmnJaWJVQ==",
+      "version": "5.4.2",
+      "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.4.2.tgz",
+      "integrity": "sha512-2W3vw3oI2tWJdyAz+b8DuWS0nfXtSDqlDmqgin/lfzbkB01cuMEN66KWBlmur3YMp5nEDEEt5s23pllnAzB4EA==",
       "dependencies": {
         "tslib": "2.3.0",
-        "zrender": "5.4.1"
+        "zrender": "5.4.3"
       }
     },
     "node_modules/echarts-gl": {
@@ -347,7 +346,6 @@
       "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"
@@ -386,7 +384,6 @@
       "cpu": [
         "x64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "android"
@@ -402,7 +399,6 @@
       "cpu": [
         "arm64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "android"
@@ -418,7 +414,6 @@
       "cpu": [
         "x64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "darwin"
@@ -434,7 +429,6 @@
       "cpu": [
         "arm64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "darwin"
@@ -450,7 +444,6 @@
       "cpu": [
         "x64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "freebsd"
@@ -466,7 +459,6 @@
       "cpu": [
         "arm64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "freebsd"
@@ -482,7 +474,6 @@
       "cpu": [
         "ia32"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -498,7 +489,6 @@
       "cpu": [
         "x64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -514,7 +504,6 @@
       "cpu": [
         "arm"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -530,7 +519,6 @@
       "cpu": [
         "arm64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -546,7 +534,6 @@
       "cpu": [
         "mips64el"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -562,7 +549,6 @@
       "cpu": [
         "ppc64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -578,7 +564,6 @@
       "cpu": [
         "riscv64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -594,7 +579,6 @@
       "cpu": [
         "s390x"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -610,7 +594,6 @@
       "cpu": [
         "x64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "netbsd"
@@ -626,7 +609,6 @@
       "cpu": [
         "x64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "openbsd"
@@ -642,7 +624,6 @@
       "cpu": [
         "x64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "sunos"
@@ -658,7 +639,6 @@
       "cpu": [
         "ia32"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "win32"
@@ -674,7 +654,6 @@
       "cpu": [
         "x64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "win32"
@@ -690,7 +669,6 @@
       "cpu": [
         "arm64"
       ],
-      "dev": true,
       "optional": true,
       "os": [
         "win32"
@@ -721,7 +699,6 @@
       "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": [
@@ -734,14 +711,12 @@
     "node_modules/function-bind": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
-      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
-      "dev": true
+      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
     },
     "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"
       },
@@ -753,7 +728,6 @@
       "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"
       }
@@ -795,8 +769,7 @@
     "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==",
-      "dev": true
+      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
     },
     "node_modules/picocolors": {
       "version": "1.0.0",
@@ -830,7 +803,6 @@
       "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",
@@ -844,7 +816,6 @@
       "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"
       },
@@ -886,7 +857,6 @@
       "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"
       }
@@ -900,7 +870,6 @@
       "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",
@@ -1014,9 +983,9 @@
       }
     },
     "node_modules/zrender": {
-      "version": "5.4.1",
-      "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.1.tgz",
-      "integrity": "sha512-M4Z05BHWtajY2241EmMPHglDQAJ1UyHQcYsxDNzD9XLSkPDqMq4bB28v9Pb4mvHnVQ0GxyTklZ/69xCFP6RXBA==",
+      "version": "5.4.3",
+      "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.3.tgz",
+      "integrity": "sha512-DRUM4ZLnoaT0PBVvGBDO9oWIDBKFdAVieNWxWwK0niYzJCMwGchRk21/hsE+RKkIveH3XHCyvXcJDkgLVvfizQ==",
       "dependencies": {
         "tslib": "2.3.0"
       }
@@ -1049,7 +1018,6 @@
       "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": {
@@ -1107,7 +1075,8 @@
     "@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=="
+      "integrity": "sha512-/QJ0Z9qfhAFtKRY+r57ziY4BSbGUTGsPRMpB/Ron3QPwBZM4OZAZHdTa4a8PafCwU5DTatXG8TMDoP8z+oDqJw==",
+      "requires": {}
     },
     "@vue/compiler-core": {
       "version": "3.2.47",
@@ -1258,16 +1227,6 @@
       "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": {
@@ -1298,7 +1257,6 @@
       "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",
@@ -1327,140 +1285,120 @@
       "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": {
@@ -1477,20 +1415,17 @@
       "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==",
-      "dev": true
+      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
     },
     "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"
       }
@@ -1499,7 +1434,6 @@
       "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"
       }
@@ -1535,8 +1469,7 @@
     "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==",
-      "dev": true
+      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
     },
     "picocolors": {
       "version": "1.0.0",
@@ -1567,7 +1500,6 @@
       "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",
@@ -1578,7 +1510,6 @@
       "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"
       }
@@ -1606,8 +1537,7 @@
     "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==",
-      "dev": true
+      "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="
     },
     "tslib": {
       "version": "2.3.0",
@@ -1618,7 +1548,6 @@
       "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",
@@ -1693,9 +1622,9 @@
       }
     },
     "zrender": {
-      "version": "5.4.1",
-      "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.1.tgz",
-      "integrity": "sha512-M4Z05BHWtajY2241EmMPHglDQAJ1UyHQcYsxDNzD9XLSkPDqMq4bB28v9Pb4mvHnVQ0GxyTklZ/69xCFP6RXBA==",
+      "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"
       }

+ 6 - 5
src/api/_prefix.js

@@ -1,10 +1,11 @@
 //总api模块
 export const API_MODULE = '/api'
-export const NEW_API_MODULE= '/newapi'
 
+//用户模块
+export const USER_MODULE= `${API_MODULE}/user`
 //文件模块
 export const FILE_MODULE= `${API_MODULE}/files`
-export const SQUARE_MODULE= `${NEW_API_MODULE}/square`
+export const SQUARE_MODULE= `${API_MODULE}/square`
 //ml模块
 export const ML_MODULE= `${API_MODULE}/ml`
 export const CONFIG_MODULE = `${ML_MODULE}/configs`
@@ -20,9 +21,9 @@ export const ANALYSIS_PIPELINE_MODULE = `${ANALYSIS_MODULE}/pipelines`
 
 //待整理
 export const PIC_MODULE= `${API_MODULE}/picture`
-export const POST_MODULE=`${NEW_API_MODULE}/posts`
-export const COMMENT_MODULE=`${NEW_API_MODULE}/comment`
-export const MAIL_MODULE=`${NEW_API_MODULE}/mail`
+//export const POST_MODULE=`${NEW_API_MODULE}/posts`
+//export const COMMENT_MODULE=`${NEW_API_MODULE}/comment`
+//export const MAIL_MODULE=`${NEW_API_MODULE}/mail`
 export const MOCK=`https://www.fastmock.site/mock/bf3861ab0686afc109db950891639c79/api`
 
 

+ 0 - 54
src/api/comment.js

@@ -1,54 +0,0 @@
-import {COMMENT_MODULE} from "./_prefix";
-
-export const submitComment = payload => {
-    console.log(payload);
-    //id,
-    const {userId, postId, content} = payload;
-
-    // return axios.post(`${COMMENT_MODULE}/create`, {
-    //     userId, postId, content
-    // }).then(res => {
-    //     return res.data;
-    // });
-    return Promise.resolve({
-        "success": true,
-        "message": "success",
-        "object": {}
-    })
-}
-export const getComment = payload => {
-    // console.log("getAllConfig",payload);
-    const {userId} = payload;
-    // return axios.get(`${COMMENT_MODULE}/getComment/{userId}`).then(res => {
-    //     return res.data;
-    // });
-    return Promise.resolve({
-        "success":true,
-        "message":"success",
-        "object": [
-            {
-                "commentId":1,
-                "postId":1,
-                "userId":1,
-                "content":"决策树参数调整至0.8效果获取会更好",
-                "time":"2022.3.15"
-            },
-            {
-                "commentId":1,
-                "postId":1,
-                "userId":1,
-                "content":"试了贴主的配置效果确实不错,点赞!",
-                "time":"2022.3.15"
-            },
-            {
-                "commentId":1,
-                "postId":1,
-                "userId":1,
-                "content":"贴主可以试试把训练测试比调整至0.66",
-                "time":"2022.3.15"
-            }
-        ]
-
-
-    })
-}

+ 0 - 80
src/api/file.js

@@ -128,84 +128,4 @@ 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": ""
-    // })
-}
-
-export const shareFile = (userId,fileId) => {
-
 }

+ 0 - 57
src/api/mail.js

@@ -1,57 +0,0 @@
-import {MAIL_MODULE} from "./_prefix";
-
-export const sendMail = payload => {
-    console.log(payload);
-    //id,
-    // const {fromUserId, toUserId, title,content} = payload;
-    //
-    // return axios.post(`${MAIL_MODULE}/send`, {
-    //     fromUserId, toUserId, title,content
-    // }).then(res => {
-    //     return res.data;
-    // });
-    return Promise.resolve({
-        "success": true,
-        "message": "success",
-        "object": {}
-    })
-}
-
-export const getUserMail = payload => {
-    // console.log("getAllConfig",payload);
-    // const {userId} = payload;
-    // return axios.get(`${MAIL_MODULE}/getUserMail/{userId}`).then(res => {
-    //     return res.data;
-    // });
-    return Promise.resolve({
-        "success": true,
-        "message": "success",
-        "object": [{
-            "mailId": 1,
-            "fromUserId": 1,
-            "toUserId":1,
-            "title":"title",
-            "content":" 在预实验中,我发现在保持纸牌水平飞出的前提下,不进行旋转的纸牌只能前进很短距离,而一旦使纸牌开始旋转,纸牌飞行距离明显增加且飞牌时用力越大,纸牌前进距离越长。分析现象得出猜想:在纸牌水平飞行过程中,饶自身轴旋转可以显著减小其飞行时所受到的空气阻力,从而保持稳定的飞行状态,运动更长距离。\n" +
-                "  查阅文献得到:与子弹需旋转射出的原理类似,因为空气是流体,纸牌在旋转过程中厚度切割空气,带动其薄边周围的空气旋转,使得空气与纸牌相对速度减小,由流体力学空气阻力公式(经验公式)F=C * A * V^2可知,纸牌前进所受的空气阻力减小。同时由于陀螺效应,纸牌较好地保持其旋转方向,保持其薄边迎风,减轻由于阻力干扰导致纸牌飞行晃动从而增大迎风面积,使纸牌更好保持其稳定的飞行状态。",
-            "time":"2022.3.15"
-        },
-            {
-                "mailId": 2,
-                "fromUserId": 1,
-                "toUserId":1,
-                "title":"关于您帖子“使用决策树预测交通数据帖子的询问”",
-                "content":"请问您的帖子所使用的数据是否是交通局MMM后台检测系统导出的数据?我在导出选项选择2与您导出的数据格式不同,请问您的导出参数是多少?",
-                "time":"2022.3.15"
-            },
-            {
-                "mailId": 3,
-                "fromUserId": 1,
-                "toUserId":1,
-                "title":"title",
-                "content":"这是一个内容",
-                "time":"2022.3.15"
-            }
-
-        ]
-    })
-}

+ 184 - 184
src/api/posts.js

@@ -1,184 +1,184 @@
-import axios from 'axios';
-import {CONFIG_MODULE, POST_MODULE} from "./_prefix";
-import {getAllModel} from "./model";
-
-
-export const getPostByPostId = payload => {
-    // console.log("getAllConfig",payload);
-    const {userId, postId} = payload;
-    //return axios.get(`${POST_MODULE}/getPost/{postId}/{userId}`).then(res => {
-    //     let modelId=res.data.object.shareModelList[0]
-    //     let postUserId=res.data.object.userId
-    //     let allModels=getAllModel(postUserId)
-    //     for(let i=0;i<allModels.length;i++){
-    //         if(modelId==allModels[i].modelId){
-    //             res.data.object["configId"]=allModels[i].configId
-    //         }
-    //     }
-    //     return res.data;
-    // });
-
-    return Promise.resolve({
-        "success":true,
-        "message":"success",
-        "object": {
-            "postId":1,
-            "userId":1,
-            "configId":1,
-            "title":"决策树分析交通数据预测事故",
-            "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
-            "updateTime":"2022.10.30",
-            "praise":15,
-            "comment_num":8,
-            "shareFileList":[1],
-            "shareModelList":["1","2"]
-        }
-    })
-}
-export const getUserCollection = payload => {
-    // console.log("getAllConfig",payload);
-    const {userId} = payload;
-    // return axios.get(`${POST_MODULE}/getUserCollection/{userId}`).then(res => {
-    //     return res.data;
-    // });
-    return Promise.resolve({
-        "success":true,
-        "message":"success",
-        "object":[{
-            "postId":1,
-            "userId":1,
-            "title":"我的收藏",
-            "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
-            "updateTime":"2022.10.30",
-            "praise":15,
-            "comment_num":8},
-            {
-                "postId":2,
-                "userId":1,
-                "title":"决策树分析交通数据预测事故",
-                "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
-                "updateTime":"2022.10.30",
-                "praise":15,
-                "comment_num":8}]
-    })
-}
-export const collection = payload => {
-    // console.log("getAllConfig",payload);
-    const {userId,postId} = payload;
-    // return axios.get(`${POST_MODULE}/collection/{userId}/{postId}`).then(res => {
-    //     return res.data;
-    // });
-    return Promise.resolve({
-        "success":true,
-        "message":"success",
-        "object":{}
-    })
-}
-export const getUserPost = payload => {
-    // console.log("getAllConfig",payload);
-    const {userId} = payload;
-    // return axios.get(`${POST_MODULE}/getUserPost/{userId}`).then(res => {
-    //     return res.data;
-    // });
-    return Promise.resolve({
-        "success":true,
-        "message":"success",
-        "object":[{
-            "postId":1,
-            "userId":1,
-            "title":"我的帖子",
-            "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
-            "updateTime":"2022.10.30",
-            "praise":15,
-            "comment_num":8},
-            {
-                "postId":2,
-                "userId":1,
-                "title":"决策树分析交通数据预测事故",
-                "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
-                "updateTime":"2022.10.30",
-                "praise":15,
-                "comment_num":8}]
-    })
-}
-
-/**
- *  搜索帖子列表 POST /add
- * @param {*} payload
- * @returns
- */
-export const searchPost = payload => {
-    console.log(payload);
-    //id,
-    const {userId, keyword, flagList} = payload;
-
-    // return axios.post(`${POST_MODULE}/searchPost`, {
-    //     userId,keyword,flagList
-    // }).then(res => {
-    //     return res.data;
-    // });
-
-
-    return Promise.resolve({
-        "success":true,
-        "message":"success",
-        "object":[{
-            "postId":1,
-            "userId":1,
-            "title":"决策树分析交通数据预测事故",
-            "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
-            "updateTime":"2022.10.30",
-            "praise":15,
-            "comment_num":8},
-            {
-                "postId":2,
-                "userId":1,
-                "title":"随即森林分析交通数据预测事故",
-                "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
-                "updateTime":"2022.10.30",
-                "praise":2,
-                "comment_num":3},
-            // {
-            //     "postId":3,
-            //     "userId":1,
-            //     "title":"决策树分析交通数据预测事故",
-            //     "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
-            //     "updateTime":"2022.10.30",
-            //     "praise":15,
-            //     "comment_num":8},
-            // {
-            //     "postId":4,
-            //     "userId":1,
-            //     "title":"决策树分析交通数据预测事故",
-            //     "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
-            //     "updateTime":"2022.10.30",
-            //     "praise":15,
-            //     "comment_num":8},
-            // {
-            //     "postId":5,
-            //     "userId":1,
-            //     "title":"决策树分析交通数据预测事故",
-            //     "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
-            //     "updateTime":"2022.10.30",
-            //     "praise":15,
-            //     "comment_num":8},
-            // {
-            //     "postId":6,
-            //     "userId":1,
-            //     "title":"决策树分析交通数据预测事故",
-            //     "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
-            //     "updateTime":"2022.10.30",
-            //     "praise":15,
-            //     "comment_num":8},
-            // {
-            //     "postId":7,
-            //     "userId":1,
-            //     "title":"决策树分析交通数据预测事故",
-            //     "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
-            //     "updateTime":"2022.10.30",
-            //     "praise":15,
-            //     "comment_num":8}
-            ]
-    })
-
-}
+// import axios from 'axios';
+// import {CONFIG_MODULE, POST_MODULE} from "./_prefix";
+// import {getAllModel} from "./model";
+//
+//
+// export const getPostByPostId = payload => {
+//     // console.log("getAllConfig",payload);
+//     const {userId, postId} = payload;
+//     //return axios.get(`${POST_MODULE}/getPost/{postId}/{userId}`).then(res => {
+//     //     let modelId=res.data.object.shareModelList[0]
+//     //     let postUserId=res.data.object.userId
+//     //     let allModels=getAllModel(postUserId)
+//     //     for(let i=0;i<allModels.length;i++){
+//     //         if(modelId==allModels[i].modelId){
+//     //             res.data.object["configId"]=allModels[i].configId
+//     //         }
+//     //     }
+//     //     return res.data;
+//     // });
+//
+//     return Promise.resolve({
+//         "success":true,
+//         "message":"success",
+//         "object": {
+//             "postId":1,
+//             "userId":1,
+//             "configId":1,
+//             "title":"决策树分析交通数据预测事故",
+//             "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
+//             "updateTime":"2022.10.30",
+//             "praise":15,
+//             "comment_num":8,
+//             "shareFileList":[1],
+//             "shareModelList":["1","2"]
+//         }
+//     })
+// }
+// export const getUserCollection = payload => {
+//     // console.log("getAllConfig",payload);
+//     const {userId} = payload;
+//     // return axios.get(`${POST_MODULE}/getUserCollection/{userId}`).then(res => {
+//     //     return res.data;
+//     // });
+//     return Promise.resolve({
+//         "success":true,
+//         "message":"success",
+//         "object":[{
+//             "postId":1,
+//             "userId":1,
+//             "title":"我的收藏",
+//             "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
+//             "updateTime":"2022.10.30",
+//             "praise":15,
+//             "comment_num":8},
+//             {
+//                 "postId":2,
+//                 "userId":1,
+//                 "title":"决策树分析交通数据预测事故",
+//                 "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
+//                 "updateTime":"2022.10.30",
+//                 "praise":15,
+//                 "comment_num":8}]
+//     })
+// }
+// export const collection = payload => {
+//     // console.log("getAllConfig",payload);
+//     const {userId,postId} = payload;
+//     // return axios.get(`${POST_MODULE}/collection/{userId}/{postId}`).then(res => {
+//     //     return res.data;
+//     // });
+//     return Promise.resolve({
+//         "success":true,
+//         "message":"success",
+//         "object":{}
+//     })
+// }
+// export const getUserPost = payload => {
+//     // console.log("getAllConfig",payload);
+//     const {userId} = payload;
+//     // return axios.get(`${POST_MODULE}/getUserPost/{userId}`).then(res => {
+//     //     return res.data;
+//     // });
+//     return Promise.resolve({
+//         "success":true,
+//         "message":"success",
+//         "object":[{
+//             "postId":1,
+//             "userId":1,
+//             "title":"我的帖子",
+//             "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
+//             "updateTime":"2022.10.30",
+//             "praise":15,
+//             "comment_num":8},
+//             {
+//                 "postId":2,
+//                 "userId":1,
+//                 "title":"决策树分析交通数据预测事故",
+//                 "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
+//                 "updateTime":"2022.10.30",
+//                 "praise":15,
+//                 "comment_num":8}]
+//     })
+// }
+//
+// /**
+//  *  搜索帖子列表 POST /add
+//  * @param {*} payload
+//  * @returns
+//  */
+// export const searchPost = payload => {
+//     console.log(payload);
+//     //id,
+//     const {userId, keyword, flagList} = payload;
+//
+//     // return axios.post(`${POST_MODULE}/searchPost`, {
+//     //     userId,keyword,flagList
+//     // }).then(res => {
+//     //     return res.data;
+//     // });
+//
+//
+//     return Promise.resolve({
+//         "success":true,
+//         "message":"success",
+//         "object":[{
+//             "postId":1,
+//             "userId":1,
+//             "title":"决策树分析交通数据预测事故",
+//             "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
+//             "updateTime":"2022.10.30",
+//             "praise":15,
+//             "comment_num":8},
+//             {
+//                 "postId":2,
+//                 "userId":1,
+//                 "title":"随即森林分析交通数据预测事故",
+//                 "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
+//                 "updateTime":"2022.10.30",
+//                 "praise":2,
+//                 "comment_num":3},
+//             // {
+//             //     "postId":3,
+//             //     "userId":1,
+//             //     "title":"决策树分析交通数据预测事故",
+//             //     "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
+//             //     "updateTime":"2022.10.30",
+//             //     "praise":15,
+//             //     "comment_num":8},
+//             // {
+//             //     "postId":4,
+//             //     "userId":1,
+//             //     "title":"决策树分析交通数据预测事故",
+//             //     "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
+//             //     "updateTime":"2022.10.30",
+//             //     "praise":15,
+//             //     "comment_num":8},
+//             // {
+//             //     "postId":5,
+//             //     "userId":1,
+//             //     "title":"决策树分析交通数据预测事故",
+//             //     "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
+//             //     "updateTime":"2022.10.30",
+//             //     "praise":15,
+//             //     "comment_num":8},
+//             // {
+//             //     "postId":6,
+//             //     "userId":1,
+//             //     "title":"决策树分析交通数据预测事故",
+//             //     "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
+//             //     "updateTime":"2022.10.30",
+//             //     "praise":15,
+//             //     "comment_num":8},
+//             // {
+//             //     "postId":7,
+//             //     "userId":1,
+//             //     "title":"决策树分析交通数据预测事故",
+//             //     "content":"通过a、b字段预测c字段,使用决策树模型,选了两个效果较好的模型供大家参考",
+//             //     "updateTime":"2022.10.30",
+//             //     "praise":15,
+//             //     "comment_num":8}
+//             ]
+//     })
+//
+// }

+ 16 - 1
src/api/square.js

@@ -1,5 +1,5 @@
 import {axios} from '../utils/request'
-import {SQUARE_MODULE} from "./_prefix";
+import {FILE_MODULE, SQUARE_MODULE} from "./_prefix";
 
 export const sharedFileList = userId => {
     return axios.get(`${SQUARE_MODULE}/sharedFileList`, {
@@ -23,4 +23,19 @@ export const sharedModelList = userId => {
     )
 }
 
+export const shareFile = (userId,fileId) => {
+    return axios.post(`${SQUARE_MODULE}/shareFile`, {
+        userId, fileId
+    }).then( res => {
+        return res;
+    });
+}
+
+export const shareModel = (userId,modelId) => {
+    return axios.post(`${SQUARE_MODULE}/shareModel`, {
+        userId, modelId
+    }).then( res => {
+        return res;
+    });
+}
 

+ 22 - 0
src/api/user.js

@@ -0,0 +1,22 @@
+import {axios} from '../utils/request'
+import {USER_MODULE} from "./_prefix";
+
+export const register = payload => {
+    const {userName, password, organization} = payload;
+    return axios.post(`${USER_MODULE}/register`, {
+        userName, password, organization
+    }).then(res => {
+            return res;
+        }
+    )
+}
+
+export const login = payload => {
+    const {userName, password, organization} = payload;
+    return axios.post(`${USER_MODULE}/login`, {
+        userName, password, organization
+    }).then(res => {
+            return res;
+        }
+    )
+}

BIN
src/assets/img/bg.jpg


BIN
src/assets/img/user.png


+ 0 - 73
src/components/Comments.vue

@@ -1,73 +0,0 @@
-<template>
-    <div :style="{'width': width + 'px'} ">
-        <h4 style="margin-bottom: 40px; padding-left: 20px; border-left: 3px solid #52A8FF;">所有评论</h4>
-        <el-empty v-show="!commentList.length" :image-size="100" description="暂无评论"></el-empty>
-        <div class="comment" v-for="comment in commentList" :key="comment.userId" >
-            <div class="header">
-                <div class="avatar">
-                    <el-avatar size="large" icon="el-icon-user" ></el-avatar>
-                </div>
-                <div class="right">
-                    <div class="time">   {{comment.time}}  </div>
-                </div>
-            </div>
-            <div class="content">
-          {{comment.content}}
-            </div>
-        </div>
-    </div>
-</template>
-<script>
-export default {
-    name: "",
-    props: {
-        commentList: Array,
-        width: Number
-    },
-    data() {
-        return {
-        }
-    },
-    methods: {
-    }
-}
-</script>
-
-<style scoped>
-.comment {
-    
-    margin-bottom: 8px;
-}
-
-.header {
-    
-    display: flex;
-    align-items: center;
-  background-color: #eeeeee;
-
-}
-
-.avatar {
-    float: left;
-    margin-right: 10px;
-    color: red;
-}
-.right {
-    float: left;
-}
-
-.userName {
-    color: #303133;
-}
-
-.time {
-    font-size: 14px;
-    color: #606266;
-
-}
-
-.content {
-    color: #000000;
-    background-color: #ffffff;
-}
-</style>

+ 4 - 22
src/components/Header.vue

@@ -8,25 +8,9 @@
         <div class="logo">轻量级AI平台</div>
         <div class="header-right">
             <div class="header-user-con">
-              <div>
-                <router-link :to="{path:'/square'}">
-                  <el-button  style="float: right;margin-right: 15px;margin-top: 1px"  type="danger"   round>
-                    广场
-                  </el-button>
-                </router-link>
-              </div>
-                <!-- 消息中心 -->
-                <div class="btn-bell">
-                    <el-tooltip effect="dark" :content="message?`有${message}条未读消息`:`消息中心`" placement="bottom">
-                        <router-link to="/message">
-                          <i class="el-icon-message" style="color: #53a8ff;"></i>
-                        </router-link>
-                    </el-tooltip>
-                    <span class="btn-bell-badge" v-if="message"></span>
-                </div>
                 <!-- 用户头像 -->
                 <div class="user-avator">
-                    <img src="../assets/img/img.jpg" />
+                    <img src="../assets/img/user.png" />
                 </div>
                 <!-- 用户名下拉菜单 -->
                 <el-dropdown class="user-name" trigger="click" @command="handleCommand">
@@ -39,8 +23,7 @@
                             <a href="https://github.com/lin-xin/vue-manage-system" target="_blank">
                                 <el-dropdown-item>项目仓库</el-dropdown-item>
                             </a>
-                            <el-dropdown-item command="user">个人中心</el-dropdown-item>
-                            <el-dropdown-item divided command="loginout">退出登录</el-dropdown-item>
+                            <el-dropdown-item command="loginout">退出登录</el-dropdown-item>
                         </el-dropdown-menu>
                     </template>
                 </el-dropdown>
@@ -149,9 +132,7 @@ export default {
 .btn-bell .el-icon-bell {
     color: #fff;
 }
-.user-name {
-    margin-left: 10px;
-}
+
 .user-avator {
     margin-left: 20px;
 }
@@ -160,6 +141,7 @@ export default {
     width: 40px;
     height: 40px;
     border-radius: 50%;
+    margin-right: 10px;
 }
 .el-dropdown-link {
     color: #fff;

+ 7 - 6
src/components/Sidebar.vue

@@ -136,16 +136,17 @@ export default {
 
             {
                 icon: "el-icon-office-building",
-                index: "/newSquare",
+                index: "/square",
                 title: "数据广场",
             },
 
-          {
-              icon: "el-icon-user",
-              index: "/user",
-              title: "个人中心",
-          },
           //  无用组件
+          // {
+          //     icon: "el-icon-user",
+          //     index: "/user",
+          //     title: "个人中心",
+          // },
+
           // {
           //   icon: "el-icon-lx-calendar",
           //   index: "3",

+ 0 - 49
src/components/WriteComment.vue

@@ -1,49 +0,0 @@
-  <template>
-    <div :style="{'width': width + 'px'}" class="container" style="border-color: white">
-          <el-input v-model="describe" placeholder="输入你的评论" style="margin-top: 20px" type="textarea"></el-input>
-      <el-button type="primary"    @click="submit" style="margin-top: 20px" round>发表<i class="el-icon-upload el-icon--right"></i></el-button>
-    </div>
-</template>
-<script>
-import { submitComment } from "../api/comment.js"
-
-export default {
-    name: "",
-    data() {
-        return {
-            describe: "",
-            colors: ['#99A9BF', '#F7BA2A', '#FF9900'],
-        }
-    },
-    props: {
-        width: Number,
-        postId: Number
-    },
-    methods: {
-        submit() {
-            if (!this.describe) {
-                this.$message.warning('请填写评价')
-                return
-            }
-
-            submitComment({
-                userId: 0,
-                content: this.describe,
-                postId: this.postId
-            }).then(res => {
-                if (res.success === 0) {
-                    this.$message.success('发表成功!')
-                    
-                }
-                else {
-                    this.$message.error(res.message)
-                }
-            })
-        }
-    }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 16 - 35
src/router/index.js

@@ -1,15 +1,10 @@
 import {createRouter, createWebHashHistory} from "vue-router";
 import Home from "../views/Home.vue";
-import squareLayout from "../views/Square.vue";
 
 const routes = [
     {
         path: '/',
-        redirect: '/fileList'
-    },
-    {
-        path: '/square',
-        component: squareLayout,
+        redirect: '/login'
     },
     {
         path: "/",
@@ -137,14 +132,6 @@ const routes = [
                 },
                 component: () => import ( /* webpackChunkName: "form" */ "../views/unused/BaseForm.vue")
             },
-            {
-                path: "/message",
-                name: "message",
-                meta: {
-                    title: '我的消息'
-                },
-                component: () => import ( /* webpackChunkName: "message" */ "../views/user/Message.vue")
-            },
             {
                 path: "/upload",
                 name: "upload",
@@ -154,20 +141,12 @@ const routes = [
                 component: () => import ( /* webpackChunkName: "upload" */ "../views/file/Upload.vue")
             },
             {
-                path: "/newSquare",
-                name: "newSquare",
+                path: "/square",
+                name: "square",
                 meta: {
                     title: '数据广场'
                 },
-                component: () => import ( /* webpackChunkName: "upload" */ "../views/newSquare.vue")
-            },
-            {
-                path: '/user',
-                name: 'user',
-                meta: {
-                    title: '个人中心'
-                },
-                component: () => import (/* webpackChunkName: "user" */ '../views/user/User.vue')
+                component: () => import ( /* webpackChunkName: "upload" */ "../views/Square.vue")
             },
             {
                 path:'/dllearning',
@@ -287,16 +266,18 @@ const router = createRouter({
 router.beforeEach((to, from, next) => {
     document.title = `${to.meta.title} | vue-manage-system`;
     const role = localStorage.getItem('ms_username');
-    if (!role && to.path !== '/login') {
-        next('/login');
-    } else if (to.meta.permission) {
-        // 如果是管理员权限则可进入,这里只是简单的模拟管理员权限而已
-        role === 'admin'
-            ? next()
-            : next('/403');
-    } else {
-        next();
-    }
+
+    // if (!role && to.path !== '/login') {
+    //     next('/login');
+    // } else if (to.meta.permission) {
+    //     // 如果是管理员权限则可进入,这里只是简单的模拟管理员权限而已
+    //     role === 'admin'
+    //         ? next()
+    //         : next('/403');
+    // } else {
+    //     next();
+    // }
+    next();
 });
 
 export default router;

+ 300 - 502
src/views/Square.vue

@@ -1,516 +1,314 @@
 <template>
-  <el-container style="height:100%; background: url(src/assets/img/earth.jpg)" direction="vertical">
-    <v-header style="height: 70px" @getCollection="getCollection()" @getMine="getMine()"></v-header>
-
-    <el-main>
-      <div class="el-menu-demo" >
-        <el-menu :default-active="activeIndex" mode="horizontal" @select="handleSelect"
-                 background-color="transparent" text-color="#fff" active-text-color="#ffd04b">
-          <el-menu-item index="1">数据</el-menu-item>
-          <el-menu-item index="2">模型</el-menu-item>
-        </el-menu>
-      </div>
-
-      <div class="grid-content">
-        <el-input placeholder="请输入内容" v-model="input" class="searchClass">
-          <template #append>
-            <el-button icon="el-icon-search" @click="handleSearch"/>
-          </template>
-        </el-input>
-      </div>
-
-      <div class="postList">
-        <div style="" v-for="(post, index) in postList" :key="post.postId"
-             v-show="index >= (currentPage-1)*8 && index < currentPage*4">
-          <el-card shadow="hover"
-                   style="height: 120px; margin-bottom: 10px; border-radius: 10px; background-color: #262626">
-            <div class="taskTitle">
-              <span style="font-size: 18px; font-weight: bold;color: #eeeeee">{{ post.title }}</span>
-            </div>
-            <div class="desciption">
-              <div class="ellipsis-line" style="font-size: 14px; width: 800px; float: left; color: #dbd0d0; margin-top: 10px">
-                {{ post.content }}
-              </div>
-              <div style="font-size: 5px; width: 150px; float: left; color: #dbd0d0; margin-top: 10px">
-                <i class="el-icon-thumb" style="color: white ;"></i>
-                {{ post.praise }}
-                <i class="el-icon-chat-line-round" style="color: white"></i>
-                {{ post.comment_num }}
-                <i class="el-icon-time" style="color: white ;"></i>
-                {{ post.updateTime }}
-              </div>
-              <el-button style="float: right;" size="small" type="warning" @click="handlePostDetail(post.postId)"
-                         round>查看详情
-              </el-button>
-            </div>
-
-          </el-card>
+    <div>
+        <div class="crumbs">
+            <el-breadcrumb separator="/">
+                <el-breadcrumb-item><i class="el-icon-office-building"></i> 数据广场</el-breadcrumb-item>
+            </el-breadcrumb>
         </div>
-        <el-pagination
-                layout="prev, pager, next"
-                :total="pages"
-                style="float: right; margin-top: 10px; padding-bottom: 20px;"
-                :current-page.sync="currentPage"
-                background>
-        </el-pagination>
-      </div>
-    </el-main>
-
-  </el-container>
-  <el-dialog :title="title" v-model="collectionDetailVisble" min-width="30%" width="66%" style="">
-    <span style="font-size: 18px; font-weight: bold;color: black;">{{ currentPost.content }}</span>
-    <el-form ref="formRef" label-width="120px">
-      <el-form-item label="模型类型名:" >
-        {{config.modelTypeName}}
-      </el-form-item>
-      <el-form-item label="模型描述:" >
-        {{config.modelDes}}
-      </el-form-item>
-      <el-form-item label="模型详情:" >
-        {{}}
-      </el-form-item>
-      <el-form-item label="特征字段:" >
-        <el-table :data="tableData" border class="table"  ref="fieldTable" header-cell-class-name="table-header" @selection-change="">
-          <el-table-column label="字段名" width="120%">
-            <template #default="scope"><span>{{ scope.row.fieldName }}</span></template>
-          </el-table-column>
-          <el-table-column label="别名">
-            <template #default="scope">{{ scope.row.aliasName }}</template>
-          </el-table-column>
-          <el-table-column label="描述">
-            <template #default="scope">{{ scope.row.fieldDes }}</template>
-          </el-table-column>
-          <el-table-column label="取值类型">
-            <template #default="scope">{{ scope.row.fieldType }}</template>
-          </el-table-column>
-          <el-table-column label="分布类型">
-            <template #default="scope">{{ scope.row.conOrDis }}</template>
-          </el-table-column>
-          <el-table-column label="空值率">
-            <template #default="scope">{{ scope.row.nullsRatio }}</template>
-          </el-table-column>
-
-          <el-table-column label="值域" width="150%">
-            <template #default="scope">{{ scope.row.valueInfo }}</template>
-          </el-table-column>
-        </el-table>
-      </el-form-item>
-
-      <el-form-item label="模型列表:" >
-        <el-table :data="modelData" border class="table" ref="fieldTable" header-cell-class-name="table-header" @selection-change="">
-          <el-table-column label="模型名" width="150%">
-            <template #default="scope"><span>{{ scope.row.modelName }}</span></template>
-          </el-table-column>
-          <el-table-column label="模型类别" width="150%">
-            <template #default="scope">{{ scope.row.modelDetailName }}</template>
-          </el-table-column>
-          <el-table-column label="训练结果">
-            <template #default="scope" >
-              <div v-if="scope.row.trainedStatus===-1">accuracy:0.87</div>
-              <div v-else="">已训练</div></template>
-          </el-table-column>
-        </el-table>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary"  @click="">添加到我的配置</el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-collapse >
-      <el-collapse-item name="1" title="评论">
-        <div style="margin-top: 20px;border:2px solid #a6a9ad;box-shadow: 0 0 5px rgba(0,0,0,.1);padding: 5px;">
-          <v-write-comment :width="500" :post-id="currentPost.postId" style="margin-left: 250px" >
-          </v-write-comment>
-          <v-comments :comment-list="commentList" :width="800" style="margin-top: 5px;margin-left: 160px"></v-comments>
-        </div>
-      </el-collapse-item>
-      <el-collapse-item title="写信给作者————更加快捷" name="2">
-        <div style="width: 600px;margin-left: 250px">
-          <el-input
-                  type="textarea"
-                  autosize
-                  placeholder="标题"
-                  v-model="mailTitle">
-          </el-input>
-          <div style="margin: 20px 0;"></div>
-          <el-input
-                  type="textarea"
-                  :autosize="{ minRows: 3, maxRows: 5}"
-                  placeholder="正文"
-                  v-model="mailContent">
-          </el-input>
-          <el-button type="danger" icon="el-icon-message" big circle style="margin-left: 600px;" @click="sendMailTo()"></el-button>
-        </div>
-      </el-collapse-item>
-    </el-collapse>
-
-    <template #footer>
-                <span class="dialog-footer">
-                    <el-button @click="detailVisble = false">取 消</el-button>
-                    <el-button type="primary" @click="saveEdit">确 定</el-button>
-                </span>
-    </template>
-  </el-dialog>
-  <el-dialog :title="title" v-model=" squareDetailVisble" min-width="30%" width="66%" style="">
-    <span style="font-size: 18px; font-weight: bold;color: black;">{{ currentPost.content }}</span>
-    <el-form ref="formRef" label-width="120px">
-      <el-form-item label="模型类型名:" >
-        {{config.modelTypeName}}
-      </el-form-item>
-      <el-form-item label="模型描述:" >
-        {{config.modelDes}}
-      </el-form-item>
-      <el-form-item label="模型详情:" >
-        {{}}
-      </el-form-item>
-      <el-form-item label="特征字段:" >
-        <el-table :data="tableData" border class="table"  ref="fieldTable" header-cell-class-name="table-header" @selection-change="">
-          <el-table-column label="字段名" width="120%">
-            <template #default="scope"><span>{{ scope.row.fieldName }}</span></template>
-          </el-table-column>
-          <el-table-column label="别名">
-            <template #default="scope">{{ scope.row.aliasName }}</template>
-          </el-table-column>
-          <el-table-column label="描述">
-            <template #default="scope">{{ scope.row.fieldDes }}</template>
-          </el-table-column>
-          <el-table-column label="取值类型">
-            <template #default="scope">{{ scope.row.fieldType }}</template>
-          </el-table-column>
-          <el-table-column label="分布类型">
-            <template #default="scope">{{ scope.row.conOrDis }}</template>
-          </el-table-column>
-          <el-table-column label="空值率">
-            <template #default="scope">{{ scope.row.nullsRatio }}</template>
-          </el-table-column>
 
-          <el-table-column label="值域" width="150%">
-            <template #default="scope">{{ scope.row.valueInfo }}</template>
-          </el-table-column>
-        </el-table>
-      </el-form-item>
-
-      <el-form-item label="模型列表:" >
-        <el-table :data="modelData" border class="table" ref="fieldTable" header-cell-class-name="table-header" @selection-change="">
-          <el-table-column label="模型名" width="150%">
-            <template #default="scope"><span>{{ scope.row.modelName }}</span></template>
-          </el-table-column>
-          <el-table-column label="模型类别" width="150%">
-            <template #default="scope">{{ scope.row.modelDetailName }}</template>
-          </el-table-column>
-          <el-table-column label="训练结果">
-            <template #default="scope" >
-              <div v-if="scope.row.trainedStatus===-1">accuracy:0.87</div>
-              <div v-else="">已训练</div></template>
-          </el-table-column>
-        </el-table>
-      </el-form-item>
-    </el-form>
-    <v-comments :comment-list="commentList" :width="800" style="margin-top: 20px;border:2px solid #a6a9ad;box-shadow: 0 0 5px rgba(0,0,0,.1);padding: 5px;"></v-comments>
-    <template #footer>
-                <span class="dialog-footer">
-                    <el-button @click="detailVisble = false">取 消</el-button>
-                    <el-button type="primary" @click="collect(currentPost.postId)">收藏</el-button>
-                </span>
-    </template>
-  </el-dialog>
+        <el-tabs type="border-card" class="main">
+            <el-tab-pane label="共享文件">
+                <div v-for="index in sharedFileList" :key="index.id">
+                    <el-card shadow="hover"
+                             style="margin-bottom: 10px; border-radius: 5px; border-color: #606266; color: #606266">
+                        <el-row style="align-items: center">
+                            <el-col :span="12">
+                                <div>
+                                    <span style="font-size: 18px; font-weight: bold">{{ index.fileName }}</span>
+                                </div>
+                                <div style="align-items: center">
+                                    <div style="font-size: 5px; float: left; margin-top: 10px; margin-bottom: 10px">
+                                        <i class="el-icon-thumb"></i>
+                                        {{ index.fileUri }}
+                                        <i class="el-icon-user" style="margin-left: 5px"></i>
+                                        {{ index.userId }}
+                                        <i class="el-icon-time" style="margin-left: 5px"></i>
+                                        {{ index.uploadTime }}
+                                    </div>
+                                </div>
+                            </el-col>
+                            <el-col :span="12" style="text-align: right">
+                                <el-button style="margin-left: 10px" type="warning" size="small" @click="handleCollectFile(index.id)"
+                                >收藏文件
+                                </el-button>
+                            </el-col>
+                        </el-row>
+                        <el-table :data="index.fileFieldList" border size="small">
+                            <el-table-column label="序号">
+                                <template #default="scope">{{ scope.row.id}}</template>
+                            </el-table-column>
+                            <el-table-column label="字段名">
+                                <template #default="scope">{{ scope.row.fieldName}}</template>
+                            </el-table-column>
+                            <el-table-column label="空值率">
+                                <template #default="scope">{{ scope.row.nullRate }}</template>
+                            </el-table-column>
+                            <el-table-column label="数据类型">
+                                <template #default="scope">{{ scope.row.dataType }}</template>
+                            </el-table-column>
+                        </el-table>
+                    </el-card>
+                </div>
+            </el-tab-pane>
+
+            <el-tab-pane label="共享模型">
+                <div v-for="index in sharedModelList" :key="index.id">
+                    <el-card shadow="hover"
+                             style="margin-bottom: 10px; border-radius: 5px; border-color: #606266; color: #606266">
+                        <el-row style="align-items: center">
+                            <el-col :span="12">
+                                <div>
+                                    <span style="font-size: 18px; font-weight: bold">{{ index.modelName }}</span>
+                                </div>
+                                <div style="align-items: center">
+                                    <div style="font-size: 5px; float: left; margin-top: 10px; margin-bottom: 10px">
+                                        <i class="el-icon-thumb"></i>
+                                        {{ index.modelUri }}
+                                        <i class="el-icon-user" style="margin-left: 5px"></i>
+                                        {{ index.userId }}
+                                    </div>
+                                </div>
+                            </el-col>
+                            <el-col :span="12" style="text-align: right">
+                                <el-button style="margin-left: 10px" type="warning" size="small" @click="handleCollectModel(index.id)"
+                                >收藏模型
+                                </el-button>
+                            </el-col>
+                        </el-row>
+                        <el-descriptions border size="small" :column="2">
+                            <el-descriptions-item label="配置名">{{index.configId}}</el-descriptions-item>
+                            <el-descriptions-item label="机器学习算法">{{index.machineLearningAlgorithm}}</el-descriptions-item>
+                            <el-descriptions-item label="训练参数">{{transTrainParams(index.trainParams)}}</el-descriptions-item>
+                            <el-descriptions-item label="训练状态">{{index.trainingState}}</el-descriptions-item>
+                            <el-descriptions-item label="训练结果">{{transTrainParams(index.trainResultMap)}}</el-descriptions-item>
+                        </el-descriptions>
+                    </el-card>
+                </div>
+            </el-tab-pane>
+
+            <el-tab-pane label="已收藏文件">
+                <div v-for="index in collectFileList" :key="index.id">
+                    <el-card shadow="hover"
+                             style="margin-bottom: 10px; border-radius: 5px; border-color: #606266; color: #606266">
+                        <el-row style="align-items: center">
+                            <el-col :span="12">
+                                <div>
+                                    <span style="font-size: 18px; font-weight: bold">{{ index.fileName }}</span>
+                                </div>
+                                <div style="align-items: center">
+                                    <div style="font-size: 5px; float: left; margin-top: 10px; margin-bottom: 10px">
+                                        <i class="el-icon-thumb"></i>
+                                        {{ index.fileUri }}
+                                        <i class="el-icon-user" style="margin-left: 5px"></i>
+                                        {{ index.userId }}
+                                        <i class="el-icon-time" style="margin-left: 5px"></i>
+                                        {{ index.uploadTime }}
+                                    </div>
+                                </div>
+                            </el-col>
+                            <el-col :span="12" style="text-align: right">
+                            </el-col>
+                        </el-row>
+                        <el-table :data="index.fileFieldList" border size="small">
+                            <el-table-column label="序号">
+                                <template #default="scope">{{ scope.row.id}}</template>
+                            </el-table-column>
+                            <el-table-column label="字段名">
+                                <template #default="scope">{{ scope.row.fieldName}}</template>
+                            </el-table-column>
+                            <el-table-column label="空值率">
+                                <template #default="scope">{{ scope.row.nullRate }}</template>
+                            </el-table-column>
+                            <el-table-column label="数据类型">
+                                <template #default="scope">{{ scope.row.dataType }}</template>
+                            </el-table-column>
+                        </el-table>
+                    </el-card>
+                </div>
+            </el-tab-pane>
+
+            <el-tab-pane label="已收藏模型">
+                <div v-for="index in collectModelList" :key="index.id">
+                    <el-card shadow="hover"
+                             style="margin-bottom: 10px; border-radius: 5px; border-color: #606266; color: #606266">
+                        <el-row style="align-items: center">
+                            <el-col :span="12">
+                                <div>
+                                    <span style="font-size: 18px; font-weight: bold">{{ index.modelName }}</span>
+                                </div>
+                                <div style="align-items: center">
+                                    <div style="font-size: 5px; float: left; margin-top: 10px; margin-bottom: 10px">
+                                        <i class="el-icon-thumb"></i>
+                                        {{ index.modelUri }}
+                                        <i class="el-icon-user" style="margin-left: 5px"></i>
+                                        {{ index.userId }}
+                                    </div>
+                                </div>
+                            </el-col>
+                            <el-col :span="12" style="text-align: right">
+                            </el-col>
+                        </el-row>
+                        <el-descriptions border size="small" :column="2">
+                            <el-descriptions-item label="配置名">{{index.configId}}</el-descriptions-item>
+                            <el-descriptions-item label="机器学习算法">{{index.machineLearningAlgorithm}}</el-descriptions-item>
+                            <el-descriptions-item label="训练参数">{{transTrainParams(index.trainParams)}}</el-descriptions-item>
+                            <el-descriptions-item label="训练状态">{{index.trainingState}}</el-descriptions-item>
+                            <el-descriptions-item label="训练结果">{{transTrainParams(index.trainResultMap)}}</el-descriptions-item>
+                        </el-descriptions>
+                    </el-card>
+                </div>
+            </el-tab-pane>
+        </el-tabs>
+    </div>
 </template>
 
 <script>
-  import vHeader from "../components/SquareHeader.vue";
-  import {searchPost, getPostByPostId, getUserCollection, getUserPost,collection} from "../api/posts";
-  import {getComment} from "../api/comment";
-  import {sendMail} from "../api/mail";
-  import {ref, reactive} from "vue";
-  import {getFileDetail} from "../api/file";
-  import vComments from "../components/Comments.vue"
-  import vWriteComment from "../components/WriteComment.vue"
-  import {getOneConfig} from "../api/config";
-
-  export default {
-    setup() {
-      const collectionDetailVisble = ref(false);
-      const squareDetailVisble = ref(false);
-      const tableData = ref([])
-      return {collectionDetailVisble, tableData, squareDetailVisble};
-    },
-    components: {
-      vHeader, vComments,
-      vWriteComment
-    },
-    data() {
-      return {
-        input: '',
-        select: '',
-        src: "src/assets/img/earth.jpg",
-        fit: 'cover',
-        postList: [
-          {
-            postId: 1,
-            title: "111",
-            content: "123456789",
-            praise: 5,
-            comment_num: 10,
-            updateTime: null,
-          }
-        ],
-        currentPage: 1,
-        title: "12121",
-        currentPost: null,
-        commentList: [],
-        currentState: 0,
-        mailTitle:"",
-        mailContent:"",
-        config: null,
-        modelData:null,
-        activeIndex: 1
-      };
-    },
-
-    methods: {
-      sendMailTo(){
-        sendMail({"title":this.mailTitle,"fromUserId":1,"toUserId":this.currentPost.userId,"content":this.mailContent}).then(res=>{
-          if(res.success){
-            this.$message({
-              message: '发送成功!',
-              type: 'success'
-            });
-            this.mailContent=""
-            this.mailTitle=""
-          }
-          else{
-            this.$message({
-              message: '发送失败!',
-              type: 'fail'
-            });
-          }
-        })
-      },
-      collect(postId){
-        collection({"userId":1,"postId":postId}).then(res =>
-        {
-          if(res.success){
-            this.$message({
-              message: '收藏成功!',
-              type: 'success'
-            });
-          }
-        })
-      },
-      handleSearch() {
-        console.log("doing")
-        searchPost({
-          keyword: this.input,
-          flagList: "",
-          userId: 0
-        }).then(res => {
-          this.postList = res.object
-          console.log(this.postList)
-          this.currentState = 0
-        })
-      },
-      handleCollectionDetail(postId) {
-        const data = ref([])
-        getPostByPostId({"postId": postId}).then(res => {
-          const postDetail = res.object
-          const fileId = postDetail.shareFileList[0]
-          this.currentPost = postDetail
-          this.title = postDetail.title
-
-          getComment({"userId": 1}).then(res => {
-            if (fileId != null) {
-              getOneConfig({"configId":this.currentPost.configId}).then(res => {
-                this.config=res.data
-                data.value=res.data.featureList
-                this.modelData=res.data.modelInfos
-                for (var i = 0; i < data.value.length; i++) {
-                  if (data.value[i].conOrDis === 1) {
-                    data.value[i].conOrDis = "连续值"
-                  } else {
-                    data.value[i].conOrDis = "离散值"
-                  }
+    import {sharedFileList, sharedModelList} from "../api/square";
+
+    export default {
+        name: "newSquare",
+
+        mounted() {
+            this.getSharedFileList();
+            this.getSharedModelList();
+        },
+
+        data() {
+            return {
+                sharedFileList: [
+                    {
+                        id: 1,
+                        fileName: '123',
+                        uploadTime: '2023/4/19',
+                        userId: 1,
+                        fileUri: 'http://www.ai.com',
+                        fileFieldList: [
+                            {
+                                id: 1,
+                                fieldName: '1',
+                                nullRate: '2%',
+                                dataType: 'Number',
+                            }
+                        ]
+                    }
+                ],
+
+                sharedModelList: [
+                    {
+                        id: 1,
+                        modelName: 'abc',
+                        userId: 1,
+                        modelUri: 'http://www.ai.com',
+                        configId: 1,
+                        machineLearningAlgorithm: 'DECISION_TREE_CLASSIFICATION',
+                        trainParams: [
+                            {
+                                key: 'abc',
+                                value: 'int'
+                            },
+                            {
+                                key: 'abc1',
+                                value: 'int1'
+                            }
+                        ],
+                        trainingState: '未训练',
+                        trainResultMap: [
+                            {
+                                key: 'abc',
+                                value: 'int'
+                            }
+                        ],
+                    }
+                ],
+
+                collectFileList: [
+                    {
+                        id: 1,
+                        fileName: '123',
+                        uploadTime: '2023/4/19',
+                        userId: 1,
+                        fileUri: 'http://www.ai.com',
+                        fileFieldList: [
+                            {
+                                id: 1,
+                                fieldName: '1',
+                                nullRate: '2%',
+                                dataType: 'Number',
+                            }
+                        ]
+                    }
+                ],
+
+                collectModelList: [
+                    {
+                        id: 1,
+                        modelName: 'abc',
+                        userId: 1,
+                        modelUri: 'http://www.ai.com',
+                        configId: 1,
+                        machineLearningAlgorithm: 'DECISION_TREE_CLASSIFICATION',
+                        trainParams: [
+                            {
+                                key: 'abc',
+                                value: 'int'
+                            },
+                            {
+                                key: 'abc1',
+                                value: 'int1'
+                            }
+                        ],
+                        trainingState: '未训练',
+                        trainResultMap: [
+                            {
+                                key: 'abc',
+                                value: 'int'
+                            }
+                        ],
+                    }
+                ],
+            };
+        },
+
+        methods: {
+            getSharedFileList() {
+                sharedFileList({
+                    "userId": localStorage.getItem("userId")
+                }).then(res => {
+                    this.sharedFileList = res.list;
+                })
+
+            },
+
+            getSharedModelList() {
+                sharedModelList({
+                    "userId": localStorage.getItem("userId")
+                }).then(res => {
+                    this.sharedModelList = res.list;
+                })
+
+            },
+
+            handleCollectFile(fileId) {
+
+            },
+            handleCollectModel(fileId) {
+
+            },
+            transTrainParams(trainParams) {
+                let result = '';
+                for (let i of trainParams) {
+                    result += (i.key + ': ' + i.value + ', ');
                 }
-                this.tableData = data
-                console.log(data)
-                console.log("fileId=" + fileId)
-                this.collectionDetailVisble = true
-              })
+                result = result.substring(0, result.length - 2);
+                return result;
             }
-            this.commentList = res.object
-            console.log(this.commentList)
-          })
 
-        })
-      },
-      handleSearchDetail(postId) {
-        const data = ref([])
-        getPostByPostId({"postId": postId}).then(res => {
-          const postDetail = res.object
-          const fileId = postDetail.shareFileList[0]
-          this.currentPost = postDetail
-          this.title = postDetail.title
-          getComment({"userId": 1}).then(res => {
-            if (fileId != null) {
-              getOneConfig({"configId":this.currentPost.configId}).then(res => {
-                this.config=res.data
-                data.value=res.data.featureList
-                this.modelData=res.data.modelInfos
-                for (var i = 0; i < data.value.length; i++) {
-                  if (data.value[i].conOrDis === 1) {
-                    data.value[i].conOrDis = "连续值"
-                  } else {
-                    data.value[i].conOrDis = "离散值"
-                  }
-                }
-                this.tableData = data
-                this.squareDetailVisble = true
-                console.log(data)
-                console.log("fileId=" + fileId)
-              })
-            }
-            this.commentList = res.object
-            console.log(this.commentList)
-          })
-        })
-      },
-
-      handlePostDetail(postId) {
-        console.log("ddd")
-        if (this.currentState == 1) {
-          this.handleCollectionDetail(postId)
-        }
-        if (this.currentState == 0) {
-          this.handleSearchDetail(postId)
         }
-
-      },
-
-      getCollection() {
-        getUserCollection({userId: 0}).then(
-                res => {
-                  this.postList = res.object
-                  console.log(this.postList)
-                  this.currentState = 1
-                }
-        )
-      },
-      getMine() {
-        getUserPost({userId: 0}).then(
-                res => {
-                  this.postList = res.object
-                  console.log(this.postList)
-                  this.currentState = 2
-                }
-        )
-      }
     }
-  }
-
-
 </script>
 
-<style>
-  .header {
-    color: #fff;
-
-  }
-
-  .el-dialog__title {
-    font-size: 26px !important;
-    font-weight: bold;
-    color: black
-  }
-
-  .searchClass {
-    border: 1px solid #262626;
-    border-radius: 20px;
-    background: #1f1e1e;
-    height: 50px;
-  }
-
-  .searchClass .el-input-group__prepend {
-    border: none;
-    background-color: transparent;
-    padding: 0 10px 0 30px;
-  }
-
-  .searchClass .el-input-group__append {
-    border: none;
-    background-color: transparent;
-  }
-
-  .searchClass .el-input__inner {
-    height: 50px;
-    line-height: 36px;
-    border: none;
-    background-color: transparent;
-  }
-
-  .searchClass .el-icon-search {
-    font-size: 16px;
-  }
-
-  .searchClass .centerClass {
-    height: 100%;
-    line-height: 100%;
-    display: inline-block;
-    vertical-align: middle;
-    text-align: right;
-  }
-
-  .searchClass .line {
-    width: 1px;
-    height: 26px;
-    background-color: #262626;
-    margin-left: 14px;
-  }
-
-  .searchClass:hover {
-    border: 1px solid #262626;
-    background: #262626;
-  }
-
-  .searchClass:hover .line {
-    background-color: #D5E3E8;
-  }
-
-  .searchClass:hover .el-icon-search {
-    color: #ffd04b;
-    font-size: 16px;
-  }
-
-  .el-col {
-    border-radius: 30px
-  }
-
-  .el-menu-demo {
-    width: 46%;
-    margin-left: 27%;
-  }
-
-  .grid-content {
-    border-radius: 4px;
-    min-height: 36px;
-    width: 50%;
-    margin-left: 25%;
-  }
-
-  .el-menu-demo .el-menu-item:hover{
-    color: #ffd04b !important;
-    background: linear-gradient(270deg, transparent, transparent)!important;
-  }
-
-  /*.el-input__inner{*/
-  /*  border-radius: 30px!important;*/
-  /*  border-color: #262626!important;*/
-  /*  background-color: #606266!important;*/
-  /*  height: 50px!important;*/
-
-  /*}*/
-
-  .postList {
-    margin-top: 40px;
-    width: 70%;
-    margin-left: 15%;
-  }
+<style scoped>
+.dialogClass {
+    width: 80%;
+}
 </style>

+ 3 - 0
src/views/file/FileDetail.vue

@@ -2,6 +2,9 @@
   <div>
     <div class="crumbs">
       <el-breadcrumb separator="/">
+        <el-breadcrumb-item  :to="{ path: '/fileList' }">
+          <i class="el-icon-lx-file"></i> 我的文件
+        </el-breadcrumb-item>
         <el-breadcrumb-item>
           <i class="el-icon-lx-cascades"></i> 文件详情
         </el-breadcrumb-item>

+ 6 - 28
src/views/file/FileList.vue

@@ -6,11 +6,7 @@
       </el-breadcrumb>
     </div>
 
-    <div class="container" v-if="ms_username === ''">
-      请<el-button>登录</el-button>后查看!
-    </div>
-
-    <div class="container" v-if="ms_username !== ''">
+    <div class="container">
       <router-link to="/upload">
         <el-button type="primary" size="large">上传文件</el-button>
       </router-link>
@@ -88,6 +84,7 @@
 <script>
 import {ref, reactive,onMounted} from "vue";
 import {deleteFile, GetAllFile} from "../../api/file";
+import {shareFile} from "../../api/square";
 import {useRouter} from "vue-router";
 import {ElMessage} from "element-plus";
 
@@ -143,29 +140,23 @@ export default {
     const handleShareDialog = (fileId)=>{
       toShareFileId=fileId;
       console.log("handleShareDialog:"+fileId)
-      //ElMessage.info("要删除的文件Id fileId:"+fileId)
     }
 
-    const handleFileShare = (fileId)=>{
-      console.log("fileId:"+toShareFileId)
-      shareFile(toDeleteFileId).then(res=>{
-        if(res.status===200){
+    const handleFileShare = ()=>{
+      shareFile(toShareFileId).then(res=>{
+        if(res.msg === '成功'){
           ElMessage.success("分享成功!")
           getFileList(userId);
         }
         else{
-          ElMessage.error("删除失败!错误码:"+res.status)
+          ElMessage.error("分享失败!错误码:"+res.status)
         }
       })
     }
 
-
     //打开提示确认删除的对话框,将fileId保存下来
     const handleDeleteDialog = (fileId)=>{
       toDeleteFileId=fileId;
-      console.log("handleDeleteDialog")
-      console.log("fileId:"+fileId)
-      ElMessage.info("要删除的文件Id fileId:"+fileId)
     }
 
     //删除对应文件
@@ -182,17 +173,6 @@ export default {
       })
     };
 
-    //todo:调用删除图片的接口,后面再做吧
-    const handlePicDelete = (index) => {
-      console.log("handlePicDelete")
-      console.log(index)
-    };
-    //todo:获取图片详情,把要查看的图片id传参
-    const handlePicDetail=(index)=>{
-      console.log("handlePicDetail")
-      console.log(index)
-    }
-
     //初始化
     onMounted(() => {
       getFileList(userId);
@@ -215,8 +195,6 @@ export default {
       handleFileDetail,
       handleFileShare,
       handleFileDelete,
-      handlePicDetail,
-      handlePicDelete,
       getFileList,
     };
   },

+ 4 - 2
src/views/file/Upload.vue

@@ -2,10 +2,12 @@
   <div>
     <div class="crumbs">
       <el-breadcrumb separator="/">
+        <el-breadcrumb-item  :to="{ path: '/fileList' }">
+          <i class="el-icon-lx-file"></i> 我的文件
+        </el-breadcrumb-item>
         <el-breadcrumb-item>
-          <i class="el-icon-lx-calendar"></i> 表单
+          <i class="el-icon-lx-calendar"></i> 文件上传
         </el-breadcrumb-item>
-        <el-breadcrumb-item>文件上传</el-breadcrumb-item>
       </el-breadcrumb>
     </div>
 

+ 27 - 0
src/views/ml/ModelList.vue

@@ -70,6 +70,8 @@
             <div v-else>
               <el-button type="text" icon="el-icon-lock" style="color: gray">暂未成功训练</el-button>
             </div>
+            <el-button type="text" icon="el-icon-user" class="yellow"
+                       @click="handleShare(scope.$index, scope.row)">分享</el-button>
             <el-button type="text" icon="el-icon-delete" class="red"
                        @click="handleDelete(scope.$index, scope.row)">删除</el-button>
 
@@ -152,6 +154,7 @@ import {useRoute, useRouter} from "vue-router";
 import {deleteModel} from "../../api/model";
 import {getOneConfig} from "../../api/config";
 import {addPipeline} from "../../api/pipeline";
+import {shareModel} from "../../api/square";
 
 export default {
   name: "model",
@@ -392,6 +395,30 @@ export default {
        // const fileId=useform.file
      };
 
+    const handleShare = (index) => {
+      // 二次确认分享
+      ElMessageBox.confirm("确定要分享到广场吗?", "提示", {
+        type: "warning",
+      })
+              .then(() => {
+                // ElMessage.success("删除成功");
+                // tableData.value.splice(index, 1);
+                console.log("分享");
+                let idx=tableData.value[index].modelId;
+                console.log(idx);
+                shareModel(idx
+                ).then(res=>{
+                  //console.log("deleteres",res);
+                  if(res.status===200){
+                    location.reload();
+                  }
+                });
+
+              })
+              .catch(() => {});
+    };
+
+
     // 删除操作(单个)
     const handleDelete = (index) => {
       // 二次确认删除

+ 0 - 309
src/views/newSquare.vue

@@ -1,309 +0,0 @@
-<template>
-    <div>
-        <div class="crumbs">
-            <el-breadcrumb separator="/">
-                <el-breadcrumb-item><i class="el-icon-office-building"></i> 数据广场</el-breadcrumb-item>
-            </el-breadcrumb>
-        </div>
-
-        <el-tabs type="border-card" class="main">
-            <el-tab-pane label="共享文件">
-                <div v-for="index in sharedFileList" :key="index.id">
-                    <el-card shadow="hover"
-                             style="margin-bottom: 10px; border-radius: 5px; border-color: #606266; color: #606266">
-                        <el-row style="align-items: center">
-                            <el-col :span="12">
-                                <div>
-                                    <span style="font-size: 18px; font-weight: bold">{{ index.fileName }}</span>
-                                </div>
-                                <div style="align-items: center">
-                                    <div style="font-size: 5px; float: left; margin-top: 10px; margin-bottom: 10px">
-                                        <i class="el-icon-thumb"></i>
-                                        {{ index.fileUri }}
-                                        <i class="el-icon-user" style="margin-left: 5px"></i>
-                                        {{ index.userId }}
-                                        <i class="el-icon-time" style="margin-left: 5px"></i>
-                                        {{ index.uploadTime }}
-                                    </div>
-                                </div>
-                            </el-col>
-                            <el-col :span="12" style="text-align: right">
-                                <el-button style="margin-left: 10px" type="warning" size="small" @click="handleCollectFile(index.id)"
-                                >收藏文件
-                                </el-button>
-                            </el-col>
-                        </el-row>
-                        <el-table :data="index.fileFieldList" border size="small">
-                            <el-table-column label="序号">
-                                <template #default="scope">{{ scope.row.id}}</template>
-                            </el-table-column>
-                            <el-table-column label="字段名">
-                                <template #default="scope">{{ scope.row.fieldName}}</template>
-                            </el-table-column>
-                            <el-table-column label="空值率">
-                                <template #default="scope">{{ scope.row.nullRate }}</template>
-                            </el-table-column>
-                            <el-table-column label="数据类型">
-                                <template #default="scope">{{ scope.row.dataType }}</template>
-                            </el-table-column>
-                        </el-table>
-                    </el-card>
-                </div>
-            </el-tab-pane>
-
-            <el-tab-pane label="共享模型">
-                <div v-for="index in sharedModelList" :key="index.id">
-                    <el-card shadow="hover"
-                             style="margin-bottom: 10px; border-radius: 5px; border-color: #606266; color: #606266">
-                        <el-row style="align-items: center">
-                            <el-col :span="12">
-                                <div>
-                                    <span style="font-size: 18px; font-weight: bold">{{ index.modelName }}</span>
-                                </div>
-                                <div style="align-items: center">
-                                    <div style="font-size: 5px; float: left; margin-top: 10px; margin-bottom: 10px">
-                                        <i class="el-icon-thumb"></i>
-                                        {{ index.modelUri }}
-                                        <i class="el-icon-user" style="margin-left: 5px"></i>
-                                        {{ index.userId }}
-                                    </div>
-                                </div>
-                            </el-col>
-                            <el-col :span="12" style="text-align: right">
-                                <el-button style="margin-left: 10px" type="warning" size="small" @click="handleCollectModel(index.id)"
-                                >收藏模型
-                                </el-button>
-                            </el-col>
-                        </el-row>
-                        <el-descriptions border size="small" :column="2">
-                            <el-descriptions-item label="配置名">{{index.configId}}</el-descriptions-item>
-                            <el-descriptions-item label="机器学习算法">{{index.machineLearningAlgorithm}}</el-descriptions-item>
-                            <el-descriptions-item label="训练参数">{{transTrainParams(index.trainParams)}}</el-descriptions-item>
-                            <el-descriptions-item label="训练状态">{{index.trainingState}}</el-descriptions-item>
-                            <el-descriptions-item label="训练结果">{{transTrainParams(index.trainResultMap)}}</el-descriptions-item>
-                        </el-descriptions>
-                    </el-card>
-                </div>
-            </el-tab-pane>
-
-            <el-tab-pane label="已收藏文件">
-                <div v-for="index in collectFileList" :key="index.id">
-                    <el-card shadow="hover"
-                             style="margin-bottom: 10px; border-radius: 5px; border-color: #606266; color: #606266">
-                        <el-row style="align-items: center">
-                            <el-col :span="12">
-                                <div>
-                                    <span style="font-size: 18px; font-weight: bold">{{ index.fileName }}</span>
-                                </div>
-                                <div style="align-items: center">
-                                    <div style="font-size: 5px; float: left; margin-top: 10px; margin-bottom: 10px">
-                                        <i class="el-icon-thumb"></i>
-                                        {{ index.fileUri }}
-                                        <i class="el-icon-user" style="margin-left: 5px"></i>
-                                        {{ index.userId }}
-                                        <i class="el-icon-time" style="margin-left: 5px"></i>
-                                        {{ index.uploadTime }}
-                                    </div>
-                                </div>
-                            </el-col>
-                            <el-col :span="12" style="text-align: right">
-                            </el-col>
-                        </el-row>
-                        <el-table :data="index.fileFieldList" border size="small">
-                            <el-table-column label="序号">
-                                <template #default="scope">{{ scope.row.id}}</template>
-                            </el-table-column>
-                            <el-table-column label="字段名">
-                                <template #default="scope">{{ scope.row.fieldName}}</template>
-                            </el-table-column>
-                            <el-table-column label="空值率">
-                                <template #default="scope">{{ scope.row.nullRate }}</template>
-                            </el-table-column>
-                            <el-table-column label="数据类型">
-                                <template #default="scope">{{ scope.row.dataType }}</template>
-                            </el-table-column>
-                        </el-table>
-                    </el-card>
-                </div>
-            </el-tab-pane>
-
-            <el-tab-pane label="已收藏模型">
-                <div v-for="index in collectModelList" :key="index.id">
-                    <el-card shadow="hover"
-                             style="margin-bottom: 10px; border-radius: 5px; border-color: #606266; color: #606266">
-                        <el-row style="align-items: center">
-                            <el-col :span="12">
-                                <div>
-                                    <span style="font-size: 18px; font-weight: bold">{{ index.modelName }}</span>
-                                </div>
-                                <div style="align-items: center">
-                                    <div style="font-size: 5px; float: left; margin-top: 10px; margin-bottom: 10px">
-                                        <i class="el-icon-thumb"></i>
-                                        {{ index.modelUri }}
-                                        <i class="el-icon-user" style="margin-left: 5px"></i>
-                                        {{ index.userId }}
-                                    </div>
-                                </div>
-                            </el-col>
-                            <el-col :span="12" style="text-align: right">
-                            </el-col>
-                        </el-row>
-                        <el-descriptions border size="small" :column="2">
-                            <el-descriptions-item label="配置名">{{index.configId}}</el-descriptions-item>
-                            <el-descriptions-item label="机器学习算法">{{index.machineLearningAlgorithm}}</el-descriptions-item>
-                            <el-descriptions-item label="训练参数">{{transTrainParams(index.trainParams)}}</el-descriptions-item>
-                            <el-descriptions-item label="训练状态">{{index.trainingState}}</el-descriptions-item>
-                            <el-descriptions-item label="训练结果">{{transTrainParams(index.trainResultMap)}}</el-descriptions-item>
-                        </el-descriptions>
-                    </el-card>
-                </div>
-            </el-tab-pane>
-        </el-tabs>
-    </div>
-</template>
-
-<script>
-    import {sharedFileList} from "../api/square";
-
-    export default {
-        name: "newSquare",
-
-        mounted() {
-            this.getSharedFileList();
-            this.getSharedModelList();
-        },
-
-        data() {
-            return {
-                sharedFileList: [
-                    {
-                        id: 1,
-                        fileName: '123',
-                        uploadTime: '2023/4/19',
-                        userId: 1,
-                        fileUri: 'http://www.ai.com',
-                        fileFieldList: [
-                            {
-                                id: 1,
-                                fieldName: '1',
-                                nullRate: '2%',
-                                dataType: 'Number',
-                            }
-                        ]
-                    }
-                ],
-
-                sharedModelList: [
-                    {
-                        id: 1,
-                        modelName: 'abc',
-                        userId: 1,
-                        modelUri: 'http://www.ai.com',
-                        configId: 1,
-                        machineLearningAlgorithm: 'DECISION_TREE_CLASSIFICATION',
-                        trainParams: [
-                            {
-                                key: 'abc',
-                                value: 'int'
-                            },
-                            {
-                                key: 'abc1',
-                                value: 'int1'
-                            }
-                        ],
-                        trainingState: '未训练',
-                        trainResultMap: [
-                            {
-                                key: 'abc',
-                                value: 'int'
-                            }
-                        ],
-                    }
-                ],
-
-                collectFileList: [
-                    {
-                        id: 1,
-                        fileName: '123',
-                        uploadTime: '2023/4/19',
-                        userId: 1,
-                        fileUri: 'http://www.ai.com',
-                        fileFieldList: [
-                            {
-                                id: 1,
-                                fieldName: '1',
-                                nullRate: '2%',
-                                dataType: 'Number',
-                            }
-                        ]
-                    }
-                ],
-
-                collectModelList: [
-                    {
-                        id: 1,
-                        modelName: 'abc',
-                        userId: 1,
-                        modelUri: 'http://www.ai.com',
-                        configId: 1,
-                        machineLearningAlgorithm: 'DECISION_TREE_CLASSIFICATION',
-                        trainParams: [
-                            {
-                                key: 'abc',
-                                value: 'int'
-                            },
-                            {
-                                key: 'abc1',
-                                value: 'int1'
-                            }
-                        ],
-                        trainingState: '未训练',
-                        trainResultMap: [
-                            {
-                                key: 'abc',
-                                value: 'int'
-                            }
-                        ],
-                    }
-                ],
-            };
-        },
-
-        methods: {
-            getSharedFileList() {
-                sharedFileList({
-                    "userId": localStorage.getItem("userId")
-                }).then(res => {
-                    this.sharedFileList = res.list;
-                })
-
-            },
-
-            getSharedModelList() {
-
-            },
-
-            handleCollectFile(fileId) {
-
-            },
-            handleCollectModel(fileId) {
-
-            },
-            transTrainParams(trainParams) {
-                let result = '';
-                for (let i of trainParams) {
-                    result += (i.key + ': ' + i.value + ', ');
-                }
-                result = result.substring(0, result.length - 2);
-                return result;
-            }
-
-        }
-    }
-</script>
-
-<style scoped>
-.dialogClass {
-    width: 80%;
-}
-</style>

+ 110 - 30
src/views/user/Login.vue

@@ -1,70 +1,135 @@
 <template>
     <div class="login-wrap">
         <div class="ms-login">
-            <div class="ms-title">后台管理系统</div>
-            <el-form :model="param" :rules="rules" ref="login" label-width="0px" class="ms-content">
+            <div class="ms-title">轻量级AI大数据系统</div>
+
+            <el-form :model="param" :rules="rules" ref="login" label-width="0px" class="ms-content"
+            v-if="this.loginOrRegister === 0">
+                <el-form-item prop="organization">
+                    <el-select v-model="param.organization" placeholder="请选择机构" style="width: 300px">
+                        <el-option value="1" label="南京大学软件学院"></el-option>
+                        <el-option value="2" label="南京大学商学院"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item prop="username">
+                    <el-input v-model="param.username" placeholder="请输入用户名">
+                        <template #prepend>
+                            <el-button icon="el-icon-user"></el-button>
+                        </template>
+                    </el-input>
+                </el-form-item>
+                <el-form-item prop="password">
+                    <el-input type="password" placeholder="请输入密码" v-model="param.password"
+                        @keyup.enter="submitLoginForm()">
+                        <template #prepend>
+                            <el-button icon="el-icon-lock"></el-button>
+                        </template>
+                    </el-input>
+                </el-form-item>
+                <div class="login-btn">
+                    <el-button type="primary" @click="submitLoginForm()">登录</el-button>
+                </div>
+                <el-button type="text" class="login-tips" @click="loginOrRegister = 1">
+                    没有账号,去注册
+                </el-button>
+            </el-form>
+
+            <el-form :model="param" :rules="rules" ref="register" label-width="0px" class="ms-content"
+                     v-if="this.loginOrRegister === 1">
+                <el-form-item prop="organization">
+                    <el-select v-model="param.organization" placeholder="请选择机构" style="width: 300px">
+                        <el-option value="1" label="南京大学软件学院"></el-option>
+                        <el-option value="2" label="南京大学商学院"></el-option>
+                    </el-select>
+                </el-form-item>
                 <el-form-item prop="username">
-                    <el-input v-model="param.username" placeholder="username">
+                    <el-input v-model="param.username" placeholder="请输入用户名">
                         <template #prepend>
                             <el-button icon="el-icon-user"></el-button>
                         </template>
                     </el-input>
                 </el-form-item>
                 <el-form-item prop="password">
-                    <el-input type="password" placeholder="password" v-model="param.password"
-                        @keyup.enter="submitForm()">
+                    <el-input type="password" placeholder="请输入密码" v-model="param.password"
+                              @keyup.enter="submitRegisterForm()">
                         <template #prepend>
                             <el-button icon="el-icon-lock"></el-button>
                         </template>
                     </el-input>
                 </el-form-item>
                 <div class="login-btn">
-                    <el-button type="primary" @click="submitForm()">登录</el-button>
+                    <el-button type="primary" @click="submitRegisterForm()">注册</el-button>
                 </div>
-                <p class="login-tips">Tips : 用户名和密码随便填。</p>
+                <el-button type="text" class="login-tips" @click="loginOrRegister = 0">
+                    已有账号,去登录
+                </el-button>
             </el-form>
         </div>
     </div>
 </template>
 
 <script>
-import { ref, reactive } from "vue";
+import { reactive } from "vue";
 import { useStore } from "vuex";
 import { useRouter } from "vue-router";
 import { ElMessage } from "element-plus";
+import {login, register} from "../../api/user";
 
 export default {
     setup() {
         const router = useRouter();
-        const param = reactive({
-            username: "admin",
-            password: "123123",
+        let param = reactive({
+            username: "",
+            password: "",
+            organization: ""
         });
 
         const rules = {
             username: [
                 {
                     required: true,
-                    message: "请输入用户名",
+                    message: "用户名不得为空",
                     trigger: "blur",
                 },
             ],
             password: [
-                { required: true, message: "请输入密码", trigger: "blur" },
+                {
+                    required: true,
+                    message: "密码不得为空",
+                    trigger: "blur"
+                },
             ],
+            organization: [
+                {
+                    required: true,
+                    message: "机构不得为空",
+                    trigger: "blur"
+                },
+            ],
+        };
+
+        const submitLoginForm = () => {
+           login(param).then(res => {
+               if (res.msg === '成功') {
+                   ElMessage.success("登录成功");
+                   localStorage.setItem("ms_username", param.username);
+                   router.push("/");
+               } else {
+                   ElMessage.success("登录失败");
+               }
+           })
         };
-        const login = ref(null);
-        const submitForm = () => {
-            login.value.validate((valid) => {
-                if (valid) {
-                    ElMessage.success("登录成功");
+
+        const submitRegisterForm = () => {
+            register(param).then(res => {
+                if (res.msg === '成功') {
+                    ElMessage.success("注册成功");
                     localStorage.setItem("ms_username", param.username);
                     router.push("/");
                 } else {
-                    ElMessage.error("登录成功");
-                    return false;
+                    ElMessage.success("注册失败");
                 }
-            });
+            })
         };
 
         const store = useStore();
@@ -73,11 +138,23 @@ export default {
         return {
             param,
             rules,
-            login,
-            submitForm,
+            //login,
+            submitLoginForm,
+            submitRegisterForm
         };
     },
+
+    data() {
+        return {
+            loginOrRegister: 0
+        }
+    },
+
+    methods: {
+
+    }
 };
+
 </script>
 
 <style scoped>
@@ -85,7 +162,7 @@ export default {
     position: relative;
     width: 100%;
     height: 100%;
-    background-image: url(../../assets/img/login-bg.jpg);
+    background-image: url(../../assets/img/bg.jpg);
     background-size: 100%;
 }
 .ms-title {
@@ -98,16 +175,17 @@ export default {
 }
 .ms-login {
     position: absolute;
-    left: 50%;
-    top: 50%;
-    width: 350px;
-    margin: -190px 0 0 -175px;
+    margin-left: 35%;
+    margin-top: 100px;
+    width: 30%;
+
     border-radius: 5px;
     background: rgba(255, 255, 255, 0.3);
     overflow: hidden;
 }
 .ms-content {
-    padding: 30px 30px;
+    padding: 35px 35px;
+    width: 300px;
 }
 .login-btn {
     text-align: center;
@@ -117,9 +195,11 @@ export default {
     height: 36px;
     margin-bottom: 10px;
 }
+
 .login-tips {
     font-size: 12px;
     line-height: 30px;
     color: #fff;
+    margin-left: 60%;
 }
-</style>
+</style>

+ 0 - 215
src/views/user/Message.vue

@@ -1,215 +0,0 @@
-<template>
-    <div class="">
-        <div class="crumbs">
-            <el-breadcrumb separator="/">
-                <el-breadcrumb-item><i class="el-icon-lx-copy"></i> tab选项卡</el-breadcrumb-item>
-            </el-breadcrumb>
-        </div>
-        <div class="container">
-            <el-tabs v-model="message">
-                <el-tab-pane :label="`未读消息(${state.unread.length})`" name="first">
-                    <el-table :data="state.unread" :show-header="false" style="width: 100%" @row-click="handleMailDetail">
-                        <el-table-column>
-                            <template #default="scope">
-                                <span class="message-title">{{scope.row.title}}</span>
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="time" width="180"></el-table-column>
-                        <el-table-column width="120">
-                            <template #default="scope">
-                                <el-button size="small" @click="handleRead(scope.$index)">标为已读</el-button>
-                            </template>
-                        </el-table-column>
-                    </el-table>
-                    <div class="handle-row">
-                        <el-button type="primary">全部标为已读</el-button>
-                    </div>
-                </el-tab-pane>
-                <el-tab-pane :label="`已读消息(${state.read.length})`" name="second">
-                    <template v-if="message === 'second'">
-                        <el-table :data="state.read" :show-header="false" style="width: 100%">
-                            <el-table-column>
-                                <template #default="scope">
-                                    <span class="message-title">{{scope.row.title}}</span>
-                                </template>
-                            </el-table-column>
-                            <el-table-column prop="date" width="150"></el-table-column>
-                            <el-table-column width="120">
-                                <template #default="scope">
-                                    <el-button type="danger" @click="handleDel(scope.$index)">删除</el-button>
-                                </template>
-                            </el-table-column>
-                        </el-table>
-                        <div class="handle-row">
-                            <el-button type="danger">删除全部</el-button>
-                        </div>
-                    </template>
-                </el-tab-pane>
-                <el-tab-pane :label="`回收站(${state.recycle.length})`" name="third">
-                    <template v-if="message === 'third'">
-                        <el-table :data="state.recycle" :show-header="false" style="width: 100%">
-                            <el-table-column>
-                                <template #default="scope">
-                                    <span class="message-title">{{scope.row.title}}</span>
-                                </template>
-                            </el-table-column>
-                            <el-table-column prop="date" width="150"></el-table-column>
-                            <el-table-column width="120">
-                                <template #default="scope">
-                                    <el-button @click="handleRestore(scope.$index)">还原</el-button>
-                                </template>
-                            </el-table-column>
-                        </el-table>
-                        <div class="handle-row">
-                            <el-button type="danger">清空回收站</el-button>
-                        </div>
-                    </template>
-                </el-tab-pane>
-            </el-tabs>
-        </div>
-    </div>
-  <el-dialog :title="title" v-model=" mailDetailVisible" min-width="30%" width="44%" style="">
-    <div style="width: 70%;margin-left: 100px;font-size: 18px; font-weight: bold;color: black;">{{ content }}</div>
-    <div><span style="font-size: 10px; color: black;margin-top: 40px;margin-left: 700px">{{ time }}</span></div>
-
-    <div style="width: 450px;margin-left: 100px;margin-top: 50px;box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);padding: 20px">
-      <span style="font-size: 18px; font-weight: bold;color: black;margin-bottom: 20px">回信</span>
-      <el-input
-          type="textarea"
-          autosize
-          placeholder="标题"
-          v-model="mailTitle">
-      </el-input>
-      <div style="margin: 20px 0;"></div>
-      <el-input
-          type="textarea"
-          :autosize="{ minRows: 3, maxRows: 5}"
-          placeholder="正文"
-          v-model="mailContent">
-      </el-input>
-      <el-button type="danger" icon="el-icon-message" big circle style="margin-left: 400px;margin-top: 30px" @click="sendMailTo( )"></el-button>
-    </div>
-    <template #footer>
-                <span class="dialog-footer">
-                    <el-button @click="mailDetailVisible = false">取 消</el-button>
-                    <el-button type="primary" @click="">确定</el-button>
-                </span>
-    </template>
-  </el-dialog>
-</template>
-
-<script>
-import { ref, reactive } from "vue";
-import {getUserMail, sendMail} from "../../api/mail";
-import { ElMessage, ElMessageBox } from "element-plus";
-export default {
-    name: "message",
-    setup() {
-        const title=ref("");
-        const content=ref("");
-        const time=ref("");
-        const message = ref("first");
-        const mailDetailVisible=ref(false)
-      const userId=ref()
-      const fromUserId=ref()
-      const mailTitle=ref("")
-      const mailContent=ref("")
-      const sendMailTo=()=>{
-        sendMail({"title":mailTitle,"fromUserId":userId.value,"toUserId":fromUserId.value,"content":mailContent}).then(res=>{
-          if(res.success){
-
-            ElMessage.success("发送成功!")
-            mailContent.value=""
-            mailTitle.value=""
-          }
-          else{
-            ElMessage.error("发送失败!")
-          }
-        })
-      }
-        const state = reactive({
-            unread: [
-                {
-                    date: "2018-04-19 20:00:00",
-                    title: "【系统通知】该系统将于今晚凌晨2点到5点进行升级维护",
-                },
-                {
-                    date: "2018-04-19 21:00:00",
-                    title: "今晚12点整发大红包,先到先得",
-                },
-            ],
-            read: [
-                {
-                    date: "2018-04-19 20:00:00",
-                    title: "【系统通知】该系统将于今晚凌晨2点到5点进行升级维护",
-                },
-            ],
-            recycle: [
-                {
-                    date: "2018-04-19 20:00:00",
-                    title: "【系统通知】该系统将于今晚凌晨2点到5点进行升级维护",
-                },
-            ],
-        });
-        const handleMailDetail=(row, column, event)=>{
-          console.log(row)
-          title.value=row.title
-          content.value=row.content
-          time.value=row.time
-          fromUserId.value=row.fromUserId
-          userId.value=row.toUserId
-          mailDetailVisible.value=true
-        }
-
-        const handleGetMail=()=>{
-          getUserMail({"userId":1}).then(res=>{
-            state.unread=res.object
-          })
-        }
-        handleGetMail();
-        const handleRead = (index) => {
-            const item = state.unread.splice(index, 1);
-            console.log(item);
-            state.read = item.concat(state.read);
-        };
-        const handleDel = (index) => {
-            const item = state.read.splice(index, 1);
-            state.recycle = item.concat(state.recycle);
-        };
-        const handleRestore = (index) => {
-            const item = state.recycle.splice(index, 1);
-            state.read = item.concat(state.read);
-        };
-
-        return {
-            message,
-            state,
-          title,
-          content,
-          time,
-          mailDetailVisible,
-            handleRead,
-            handleDel,
-            handleRestore,
-          handleGetMail,
-          handleMailDetail,
-          fromUserId,
-          userId,
-          sendMailTo,
-          mailTitle,
-          mailContent
-        };
-    },
-};
-
-</script>
-
-<style>
-.message-title {
-    cursor: pointer;
-}
-.handle-row {
-    margin-top: 30px;
-}
-</style>
-