From 4a8d8a5f49321d9597251e7ba69bf39f78baa51b Mon Sep 17 00:00:00 2001 From: litian <2804272236@qq.com> Date: 星期二, 18 三月 2025 11:42:07 +0800 Subject: [PATCH] tijiao --- src/views/system/roleManage.vue | 166 +++ src/assets/js/toolClass.js | 165 --- package-lock.json | 444 ++++++++++ src/plugin/axios/index.ts | 14 src/components/TreeMenu.vue | 304 ++++++ src/assets/images/icon/fullScreen.png | 0 src/assets/images/icon/halfScreen.png | 0 src/layout/components/header.vue | 38 src/views/simulation/autonomousFunction/index.vue | 14 src/layout/pageLayout.vue | 22 src/views/simulation/testSimulation/detail.vue | 508 +++++++++++ src/styles/global.less | 136 ++ src/views/system/index.vue | 16 /dev/null | 14 src/views/simulation/index.vue | 16 src/views/system/userManage.vue | 176 ++++ src/assets/js/middleGround/tool.js | 13 src/views/simulation/realTimeSimulation/index.vue | 14 src/views/model/index.vue | 18 src/views/simulation/testSimulation/index.vue | 238 +++++ src/router/index.ts | 148 ++- src/views/simulation/testSimulation/testReport.vue | 130 ++ src/App.vue | 35 23 files changed, 2,274 insertions(+), 355 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2485b94..015b4cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,18 @@ { - "name": "my-vue-app", + "name": "model", "version": "0.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "my-vue-app", + "name": "model", "version": "0.0.0", + "license": "MIT", "dependencies": { "@element-plus/icons-vue": "^2.3.1", + "axios": "^1.6.2", "element-plus": "^2.5.6", + "spark-md5": "^3.0.2", "vue": "^3.4.21", "vue-router": "^4.3.0" }, @@ -951,6 +954,44 @@ "resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz", "integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==" }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/axios": { + "version": "1.8.1", + "resolved": "https://registry.npmmirror.com/axios/-/axios-1.8.1.tgz", + "integrity": "sha512-NN+fvwH/kV01dYUQ3PTOZns4LWtWhOFCAhQ/pHb88WQ1hNe5V/dvFwc4VJcDL11LT9xSX0QtsR8sWUuyOuOq7g==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/copy-anything": { "version": "2.0.6", "resolved": "https://registry.npmmirror.com/copy-anything/-/copy-anything-2.0.6.tgz", @@ -972,6 +1013,27 @@ "version": "1.11.13", "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz", "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==" + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/element-plus": { "version": "2.9.5", @@ -1022,6 +1084,47 @@ "errno": "cli.js" } }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/esbuild": { "version": "0.21.5", "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.21.5.tgz", @@ -1070,6 +1173,39 @@ "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", @@ -1084,12 +1220,102 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true, "optional": true + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/iconv-lite": { "version": "0.6.3", @@ -1217,6 +1443,14 @@ "node": ">=6" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/memoize-one": { "version": "6.0.0", "resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz", @@ -1233,6 +1467,25 @@ }, "engines": { "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" } }, "node_modules/nanoid": { @@ -1325,6 +1578,11 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/prr": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz", @@ -1411,6 +1669,11 @@ "engines": { "node": ">=0.10.0" } + }, + "node_modules/spark-md5": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/spark-md5/-/spark-md5-3.0.2.tgz", + "integrity": "sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw==" }, "node_modules/tslib": { "version": "2.8.1", @@ -2046,6 +2309,38 @@ "resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz", "integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==" }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "axios": { + "version": "1.8.1", + "resolved": "https://registry.npmmirror.com/axios/-/axios-1.8.1.tgz", + "integrity": "sha512-NN+fvwH/kV01dYUQ3PTOZns4LWtWhOFCAhQ/pHb88WQ1hNe5V/dvFwc4VJcDL11LT9xSX0QtsR8sWUuyOuOq7g==", + "requires": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "requires": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, "copy-anything": { "version": "2.0.6", "resolved": "https://registry.npmmirror.com/copy-anything/-/copy-anything-2.0.6.tgz", @@ -2064,6 +2359,21 @@ "version": "1.11.13", "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz", "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "requires": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + } }, "element-plus": { "version": "2.9.5", @@ -2100,6 +2410,35 @@ "optional": true, "requires": { "prr": "~1.0.1" + } + }, + "es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==" + }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + }, + "es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "requires": { + "es-errors": "^1.3.0" + } + }, + "es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "requires": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" } }, "esbuild": { @@ -2143,6 +2482,22 @@ "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" }, + "follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==" + }, + "form-data": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "mime-types": "^2.1.12" + } + }, "fsevents": { "version": "2.3.3", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", @@ -2150,12 +2505,69 @@ "dev": true, "optional": true }, + "function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" + }, + "get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "requires": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + } + }, + "get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "requires": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + } + }, + "gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==" + }, "graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true, "optional": true + }, + "has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==" + }, + "has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "requires": { + "has-symbols": "^1.0.3" + } + }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "requires": { + "function-bind": "^1.1.2" + } }, "iconv-lite": { "version": "0.6.3", @@ -2240,6 +2652,11 @@ "semver": "^5.6.0" } }, + "math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==" + }, "memoize-one": { "version": "6.0.0", "resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz", @@ -2251,6 +2668,19 @@ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "dev": true, "optional": true + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } }, "nanoid": { "version": "3.3.8", @@ -2300,6 +2730,11 @@ "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, "prr": { "version": "1.0.1", @@ -2370,6 +2805,11 @@ "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz", "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==" }, + "spark-md5": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/spark-md5/-/spark-md5-3.0.2.tgz", + "integrity": "sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw==" + }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz", diff --git a/src/App.vue b/src/App.vue index a03c67c..4cf5450 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,31 +1,8 @@ -<script setup lang="ts"> -import { ref } from "vue"; -import Header from "./layout/Header.vue"; -import TreeMenu from "./components/TreeMenu.vue"; -import { ElConfigProvider } from "element-plus"; -import zhCn from "element-plus/es/locale/lang/zh-cn"; - -const menuItem = ref("/"); - -const handMenu = (key: string) => { - menuItem.value = key; -}; -</script> - <template> - <el-config-provider :locale="zhCn"> - <el-container class="common-layout"> - <el-header height="60px"> - <Header @selectMenu="handMenu" /> - </el-header> - <el-container> - <el-aside width="240px"> - <TreeMenu :menuItem="menuItem" /> - </el-aside> - <el-main> - <RouterView /> - </el-main> - </el-container> - </el-container> - </el-config-provider> + <RouterView /> </template> + +<script setup lang="ts"> + +</script> +<style></style> diff --git a/src/assets/images/icon/fullScreen.png b/src/assets/images/icon/fullScreen.png new file mode 100644 index 0000000..a0b9207 --- /dev/null +++ b/src/assets/images/icon/fullScreen.png Binary files differ diff --git a/src/assets/images/icon/halfScreen.png b/src/assets/images/icon/halfScreen.png new file mode 100644 index 0000000..f3a391e --- /dev/null +++ b/src/assets/images/icon/halfScreen.png Binary files differ diff --git a/src/assets/js/middleGround/tool.js b/src/assets/js/middleGround/tool.js index 0f5fbfa..009140a 100644 --- a/src/assets/js/middleGround/tool.js +++ b/src/assets/js/middleGround/tool.js @@ -1,9 +1,5 @@ import { requestCtx, appId } from "@/assets/js/config.js"; -import defaultImg from "@/assets/images/default-book-img.png"; -import defaultBookFair from "@/assets/images/default-bookFair.png" import bookCover from "@/assets/images/book-cover.png"; -import courseIcon from "@/assets/images/courseIcon.png"; -import textBookIcon from "@/assets/images/textBookIcon.png"; import moment from "moment"; // 澶勭悊鍒楄〃鏌ヨ缁撴灉 export function handleQueryResourceListData({ @@ -428,15 +424,8 @@ if (md5) { src = requestCtx + `/file/GetPreViewImage?md5=${md5}`; } else { - if(storeInfo == 'jsek_bookFair') { - // return defaultBookFair; - return - }else if(storeInfo == `defaultGoodsStore${appId}`){ + if(storeInfo == `defaultGoodsStore${appId}`){ return bookCover; - }else if(storeInfo == 'jsek_digitalCourses'){ - return courseIcon; - }else if(storeInfo == 'jsek_digitalTextbooks'){ - return textBookIcon; }else{ return "" } diff --git a/src/assets/js/toolClass.js b/src/assets/js/toolClass.js index de71bbc..d80ffcd 100644 --- a/src/assets/js/toolClass.js +++ b/src/assets/js/toolClass.js @@ -1,6 +1,5 @@ import SparkMD5 from 'spark-md5' import { getPublicImage } from '@/assets/js/middleGround/tool.js' -// import moment from "moment"; var tool = { secondToTime(second) { @@ -71,70 +70,6 @@ } } -// 澶勭悊璁㈠崟璁板綍 -// export function setOrderList(res) { -// // 鑾峰彇褰撳墠骞翠唤鐨勫紑濮嬫椂闂� -// let currentTimestamp = moment().startOf("year"); -// let arr = []; -// for (let i = 0; i < res.length; i++) { -// const item = res[i]; -// // 鍙戠エ鐘舵�佷负瀹℃牳涓垨鑰呭鏍稿け璐ワ紝灏唅tem閫変腑鐘舵�佽缃�変腑銆� -// // UI鎺у埗绂佺敤锛堟樉绀虹殑鏁堟灉涓� 閫変腑骞朵笖绂佺敤锛� -// if (item.invoiceInfo) { -// item.checked = true; -// } else { -// item.checked = false; -// } -// // 鍒ゆ柇鏄惁瓒呭嚭鐢宠鍙戠エ鐨勬棩鏈� -// item.exceedingTheSpecifiedTime = moment(item.createDate).isBefore( -// currentTimestamp -// ); -// if (item.saleMethodLinks.length > 0) { -// let itemName = null; -// let itemIcon = null; -// let cmsItemList = null; -// try { -// cmsItemList = item.saleMethodLinks[0].orderSaleMethod.cmsItemList[0]; -// } catch (error) { -// cmsItemList = null; -// } -// if (cmsItemList && cmsItemList.icon) { -// itemName = cmsItemList.name; -// itemIcon = cmsItemList.icon; -// } else { -// itemName = item.saleMethodLinks[0].orderSaleMethod.product.name; -// itemIcon = item.saleMethodLinks[0].orderSaleMethod.product.icon; -// } -// item.saleMethodLinks[0].title = itemName; -// item.saleMethodLinks[0].icon = getPublicImage(itemIcon); -// } else { -// const itemIcon = require("@/assets/images/bookCity/place_img.png"); -// const saleMethodLink = []; -// const obj = { -// icon: itemIcon, -// orderSaleMethod: { -// price: item.payPrice, -// }, -// }; -// saleMethodLink.push(obj); -// item.saleMethodLinks = saleMethodLink; -// } -// if (item.state == "Success") { -// item.CustomState = "鏀粯鎴愬姛"; -// } -// if (item.state == "Cancel") { -// item.CustomState = "鍙栨秷鏀粯"; -// } -// if (item.state == "WaitPay") { -// item.CustomState = "绛夊緟鏀粯"; -// } -// if (item.state == "WaitDeliver") { -// item.CustomState = "姝e湪鏀粯"; -// } -// arr.push(item); -// } -// return arr; -// } //澶勭悊琛ㄥ崟鎻愪氦鏁版嵁 export function worksData(res) { @@ -354,106 +289,7 @@ }) } -// 澶勭悊鏃堕棿锛岀敤浜庢樉绀洪煶瑙嗛褰撳墠鏃堕棿 -// export function realFormatSecond(time) { -// let duration = parseInt(time); -// let minute = parseInt(duration / 60); -// let sec = (duration % 60) + ""; -// let isM0 = ":"; -// if (minute == 0) { -// minute = "00"; -// } else if (minute < 10) { -// minute = "0" + minute; -// } -// if (sec.length == 1) { -// sec = "0" + sec; -// } -// return minute + isM0 + sec; -// } -// export function parseHtml(content) { -// const tagReg = -// /<\/?div[^>]*>|<\/?span[^>]*>|<\/?table[^>]*>|<\/?th[^>]*>|<\/?thead>|<\/?tbody>|<\/?tr>|<\/?td[^>]*>|<br[^>]*>|<\/?p[^>]*>|<\/?sub>|<\/?sup>|<\/?font[^>]*>|<img[^>]*>|<\/?a[^>]*>|\n|\\n/gi; -// const escapeReg = -// /&(lt|gt|le|ge|nbsp|amp|quot|times|Alpha|Beta|Gamma|Delta|Epsilon|Zeta|Eta|Theta|Iota|Kappa|Lambda|MU|NU|Xi|Omicron|Pi|Rho|Sigma|Tau|Upsilon|Phi|Chi|Psi|Omega|alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigmaf|sigma|tau|upsilon|phi|chi|psi|omega|thetasym|upsih|piv|circ|tilde|ndash|permil|lsquo|rsquo|ldquo|rdquo|prime);/gi; -// const escapeElements = { -// lt: "<", -// gt: ">", -// le: "鈮�", -// ge: "鈮�", -// nbsp: " ", -// amp: "&", -// quot: '""', -// times: "脳", -// Alpha: "螒", -// Beta: "螔", -// Gamma: "螕", -// Delta: "螖", -// Epsilon: "螘", -// Zeta: "螙", -// Eta: "螚", -// Theta: "螛", -// Iota: "螜", -// Kappa: "螝", -// Lambda: "螞", -// Mu: "螠", -// Nu: "螡", -// Xi: "螢", -// Omicron: "螣", -// Pi: "螤", -// Rho: "巍", -// Sigma: "危", -// Tau: "韦", -// Upsilon: "违", -// Phi: "桅", -// Chi: "围", -// Psi: "唯", -// Omega: "惟", -// alpha: "伪", -// beta: "尾", -// gamma: "纬", -// delta: "未", -// epsilon: "蔚", -// zeta: "味", -// eta: "畏", -// theta: "胃", -// iota: "喂", -// kappa: "魏", -// lambda: "位", -// mu: "渭", -// nu: "谓", -// xi: "尉", -// omicron: "慰", -// pi: "蟺", -// rho: "蟻", -// sigmaf: "蟼", -// sigma: "蟽", -// tau: "蟿", -// upsilon: "蠀", -// phi: "蠁", -// chi: "蠂", -// psi: "蠄", -// omega: "蠅", -// thetasym: "蠎", -// upsih: "蠏", -// piv: "蠔", -// circ: "藛", -// tilde: "藴", -// ndash: "鈥�", -// permil: "鈥�", -// lsquo: "鈥�", -// rsquo: "鈥�", -// ldquo: "鈥�", -// rdquo: "鈥�", -// prime: "鈥�", -// }; -// const contentWithoutTag = content.replace(tagReg, ""); -// const contentWithOnlyOneSpace = contentWithoutTag.replace(/ {2,}/g, " "); -// return contentWithOnlyOneSpace.replace( -// escapeReg, -// (all, t) => escapeElements[t] -// ); -// } export default { ...tool, @@ -463,5 +299,4 @@ UpdateworksDataBytool, getPublicImage, worksData - // parseHtml, } diff --git a/src/components/TreeMenu.vue b/src/components/TreeMenu.vue index 41ed582..86ea3bf 100644 --- a/src/components/TreeMenu.vue +++ b/src/components/TreeMenu.vue @@ -1,34 +1,92 @@ <template> - <div class="tree-menu"> - <div class="topMenu"> - <span class="topMenu-title">妯″瀷搴�</span> - <div class="btnGroup"> - <el-icon class="icon1"><FolderAdd /></el-icon> - <el-icon class="icon2"><Edit /></el-icon> - <el-icon class="icon3"><Delete /></el-icon> + <div class="tree-menu-box"> + <div class="flex"> + <div class="tree-menu"> + <div class="topMenu"> + <span class="topMenu-title">{{ menuName }}</span> + <div class="btnGroup" v-if="props.menuItem == 'model'"> + <el-icon class="icon1" @click="addBtn"><FolderAdd /></el-icon> + <el-icon class="icon2" @click="editBtn"><Edit /></el-icon> + <el-icon class="icon3" @click="delBtn"><Delete /></el-icon> + </div> + </div> + <el-tree + ref="treeRef" + :data="filteredData" + :props="defaultProps" + :filter-node-method="filterNode" + default-expand-all + @node-click="handleNodeClick" + > + <template #default="{ node, data }"> + <span class="custom-tree-node"> + <el-icon v-if="data.icon"><component :is="data.icon" /></el-icon> + <span>{{ node.label }}</span> + </span> + </template> + </el-tree> + </div> + <div class="tree-menu" v-if="props.menuItem == 'systemManage'"> + <div class="topMenu"> + <span class="topMenu-title">{{ systemMenuName }}</span> + <div class="btnGroup"> + <el-icon class="icon1" @click="addBtn"><FolderAdd /></el-icon> + <el-icon class="icon2" @click="editBtn"><Edit /></el-icon> + <el-icon class="icon3" @click="delBtn"><Delete /></el-icon> + </div> + </div> + <el-tree + ref="treeRef" + :data="systemData" + :props="defaultProps" + :filter-node-method="filterNode1" + default-expand-all + @node-click="systemClick" + > + <template #default="{ node, data }"> + <span class="custom-tree-node"> + <el-icon v-if="data.icon"><component :is="data.icon" /></el-icon> + <span>{{ node.label }}</span> + </span> + </template> + </el-tree> </div> </div> - <el-tree - ref="treeRef" - :data="filteredData" - :props="defaultProps" - :filter-node-method="filterNode" - default-expand-all - @node-click="handleNodeClick" - > - <template #default="{ node, data }"> - <span class="custom-tree-node"> - <el-icon v-if="data.icon"><component :is="data.icon" /></el-icon> - <span>{{ node.label }}</span> - </span> - </template> - </el-tree> </div> + <el-dialog + v-model="dialogFormVisible" + :title="dialogTitle" + width="500" + @close="closeDialog(formRef)" + > + <el-form :model="form" ref="formRef" :rules="formRules" label-width="140px"> + <el-form-item label="鍚嶇О" prop="name"> + <el-input v-model="form.name" autocomplete="off" placeholder="璇疯緭鍏�" style="width: 240px"/> + </el-form-item> + <el-form-item label="鎻忚堪"> + <el-input + v-model="form.description" + style="width: 240px" + :rows="2" + type="textarea" + placeholder="璇疯緭鍏�" + /> + </el-form-item> + </el-form> + <template #footer> + <div class="dialog-footer"> + <el-button @click="closeDialog(formRef)">鍙栨秷</el-button> + <el-button type="primary" @click="submitBtn(formRef)"> 纭畾 </el-button> + </div> + </template> + </el-dialog> </template> <script setup lang="ts"> -import { ref, watch, defineProps } from "vue"; +import { ref, reactive, defineProps, onMounted } from "vue"; import { useRouter } from "vue-router"; +import type { FormInstance, FormRules} from "element-plus"; +import { ElMessage, ElMessageBox } from 'element-plus' import { Document, FolderOpened } from "@element-plus/icons-vue"; const router = useRouter(); @@ -36,13 +94,21 @@ const props = defineProps<{ menuItem: string; }>(); - +const menuName = ref("妯″瀷搴�"); +const filteredData = ref(); +const systemMenuName = ref(""); +const systemData = ref(); +const selectData = ref() interface TreeNode { label: string; path?: string; icon?: string; children?: TreeNode[]; } +const defaultProps = { + children: "children", + label: "label", +}; const modelTreeData = ref<TreeNode[]>([ { @@ -68,41 +134,199 @@ }, ]); -const defaultProps = { - children: "children", - label: "label", -}; +const visualSimulationTreeData = ref<TreeNode[]>([ + { + label: "娴嬭瘯浠跨湡", + path: "/testSimulation", + icon: "Document", + }, + { + label: "瀹炴椂浠跨湡", + path: "realTimeSimulation", + icon: "Document", + }, + { + label: "鑷富鍔熻兘", + path: "/autonomousFunction", + icon: "Document", + }, +]); -const filteredData = ref(modelTreeData.value); +const systemManageTreeData = ref<TreeNode[]>([ + { + label: "鏈烘瀯鐢ㄦ埛", + path: "/userManage", + icon: "Document", + }, + { + label: "瑙掕壊鏉冮檺绠$悊", + path: "/roleManage", + icon: "Document", + }, +]); + +const systemTreeData = ref<TreeNode[]>([ + { + label: "501", + path: "", + icon: "Document", + children: [ + { + label: "涓�瀹�", + path: "", + icon: "", + }, + { + label: "浜屽", + path: "", + icon: "", + }, + { + label: "涓夊", + path: "", + icon: "", + }, + ], + }, +]); +const systemTreeData1 = ref<TreeNode[]>([ + { + label: "绯荤粺绠$悊鍛�", + path: "", + icon: "", + }, + { + label: "妯″瀷绠$悊鍛�", + path: "", + icon: "", + }, + { + label: "娴嬭瘯浜哄憳", + path: "", + icon: "", + }, + { + label: "鎶ュ憡鏌ョ湅浜哄憳", + path: "", + icon: "", + }, +]); + +const dialogFormVisible = ref(false); +const dialogTitle = ref() +const formRef = ref<FormInstance>(); +const form = reactive({ + name: "", + description: "", +}); + +interface formInfo { + name: string; +} +const formRules = reactive<FormRules<formInfo>>({ + name: [{ required: true, message: "鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }], +}); + +onMounted(() => { + console.log(props.menuItem, "123"); + if (props.menuItem == "model") { + filteredData.value = modelTreeData.value; + menuName.value = "妯″瀷搴�"; + } else if (props.menuItem == "simulation") { + menuName.value = "鍙鍖栦豢鐪�"; + filteredData.value = visualSimulationTreeData.value; + } else if (props.menuItem == "systemManage") { + menuName.value = "绯荤粺绠$悊"; + filteredData.value = systemManageTreeData.value; + } else { + filteredData.value = []; + } + systemMenuName.value = systemManageTreeData.value[0].label; +}); const filterNode = (value: string, data: TreeNode) => { if (!value) return true; return data.label.toLowerCase().includes(value.toLowerCase()); }; +const filterNode1 = (value: string, data: TreeNode) => { + if (!value) return true; + return data.label.toLowerCase().includes(value.toLowerCase()); +}; + const handleNodeClick = (data: TreeNode) => { + console.log(data, 12); + selectData.value = data if (data.path) { + systemMenuName.value = data.label; + if (data.path == "/userManage") { + systemData.value = systemTreeData.value; + } else if (data.path == "/roleManage") { + systemData.value = systemTreeData1.value; + } router.push(data.path); } }; -watch( - () => props.menuItem, - (value) => { - if (value == "/" || value == "/model") { - filteredData.value = modelTreeData.value; - } else { - filteredData.value = [] +//娣诲姞鐩綍 +const addBtn = () => { + dialogTitle.value = '娣诲姞' + dialogFormVisible.value = true; +}; +const submitBtn = async (formEl: FormInstance | undefined) => { + if (!formEl) return; + await formEl.validate((valid, fields) => { + if (valid) { } - } -); + }); +}; +const closeDialog = (formEl: FormInstance | undefined) => { + if (!formEl) return; + formEl.resetFields(); + dialogFormVisible.value = false; +}; + +const editBtn =() =>{ + dialogTitle.value = '缂栬緫' + form.name = selectData.value.label + dialogFormVisible.value = true; + +} + +const delBtn =()=>{ + ElMessageBox.confirm( + '纭畾瑕佸垹闄ら�変腑鐨勬暟鎹�?', + 'Warning', + { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning', + } + ) + .then(() => { + console.log() + + }) + .catch(() => { + + }) +} + +const systemClick = (data: TreeNode) => {}; </script> <style lang="less" scoped> -.tree-menu { +.tree-menu-box { height: 100%; background-color: #fff; - + .flex { + height: 100%; + } +} +.tree-menu { + width: 260px; + height: 100%; + border-right: 1px solid #e9eef3; :deep(.el-tree) { padding: 10px; } diff --git a/src/layout/Header.vue b/src/layout/components/header.vue similarity index 61% rename from src/layout/Header.vue rename to src/layout/components/header.vue index afb41ba..38dcd1c 100644 --- a/src/layout/Header.vue +++ b/src/layout/components/header.vue @@ -8,25 +8,47 @@ mode="horizontal" :default-active="activeIndex" class="header-menu" - @select="handleSelect" router > - <el-menu-item index="/">妯″瀷绠$悊</el-menu-item> - <el-menu-item index="/simulation-config">鍙鍖栦豢鐪�</el-menu-item> - <el-menu-item index="/system/user">绯荤粺绠$悊</el-menu-item> + <!-- <el-menu-item index="/">妯″瀷绠$悊</el-menu-item> + <el-menu-item index="/simulation">鍙鍖栦豢鐪�</el-menu-item> + <el-menu-item index="/systemManage">绯荤粺绠$悊</el-menu-item> --> + <el-menu-item + v-for="(item,index) in navList" + :key="item.path" + :index="item.path" + @click="handleSelect(item.path, index)" + >{{ item.name }}</el-menu-item + > </el-menu> </div> </template> <script setup lang="ts"> import { ref, defineEmits } from "vue"; +import { useRoute, useRouter } from "vue-router"; +const router = useRouter(); +const route = useRoute(); const activeIndex = ref("/"); -const emit = defineEmits(["selectMenu"]); +const navList = ref([ + { + name: "妯″瀷绠$悊", + path: "/model", + }, + { + name: "鍙鍖栦豢鐪�", + path: "/simulation", + }, + { + name: "绯荤粺绠$悊", + path: "/systemManage", + }, +]); -const handleSelect = (key: string) => { - activeIndex.value = key; - emit("selectMenu", key); +const handleSelect = (path: string) => { + activeIndex.value = path; + router.push(path); }; </script> diff --git a/src/layout/pageLayout.vue b/src/layout/pageLayout.vue new file mode 100644 index 0000000..12ef503 --- /dev/null +++ b/src/layout/pageLayout.vue @@ -0,0 +1,22 @@ +<template> + <div class="common-layout"> + <el-config-provider :locale="zhCn"> + <el-container> + <el-header> + <Header class="header"></Header> + </el-header> + <el-main> + <RouterView /> + </el-main> + </el-container> + </el-config-provider> + </div> +</template> +<script setup lang="ts"> +import { ref, watch, provide, onMounted } from "vue"; +import { RouterView, useRouter } from "vue-router"; +import zhCn from "element-plus/es/locale/lang/zh-cn"; +import Header from "./components/header.vue"; +const router = useRouter(); +</script> +<style lang="less" scoped></style> diff --git a/src/plugin/axios/index.ts b/src/plugin/axios/index.ts index 36703ce..7a09db5 100644 --- a/src/plugin/axios/index.ts +++ b/src/plugin/axios/index.ts @@ -1,6 +1,5 @@ import axios from 'axios' import myConfig from '@/assets/js/config.js' -import toolClass from '@/assets/js/toolClass.js' import router from '@/router' // 鍒涘缓 axios 瀹炰緥 const service = axios.create({ @@ -59,18 +58,7 @@ // } // }) const url = window.location.hash.slice(1) - console.log(url, 'url') - if (url.includes('showLogin=1')) { - router.push(url) - } else { - // router.push(url) - if (url.includes('?')) { - console.log(url.includes('?')) - router.push(url) - } else { - router.push(url + '?showLogin=1') - } - } + router.push(url) } else { if (error.response && error.response.data && error.response.data.error) { console.error(error.response.data.error.msg) diff --git a/src/router/index.ts b/src/router/index.ts index a5a6f34..ef3039c 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,58 +1,118 @@ -import { createRouter, createWebHistory } from 'vue-router' +import { createRouter, createWebHistory } from "vue-router"; +import PageLayout from '../layout/pageLayout.vue' const router = createRouter({ history: createWebHistory(), routes: [ { - path: '/', - redirect: '/model' - }, - { - path: '/model', - name: 'model', - redirect: '/model/landerModel', - component: () => import('../views/model/index.vue'), + path: "/", + component: PageLayout, + redirect: "/model", children: [ { - path: '/model/landerModel', - name: 'landerModel', - component: () => import('../views/model/children/landerModel.vue') + path: "/model", + name: "model", + redirect: "/model/landerModel", + component: () => import("../views/model/index.vue"), + children: [ + { + path: "/model/landerModel", + name: "landerModel", + component: () => import("../views/model/children/landerModel.vue"), + }, + { + path: "/model/roverModel", + name: "roverModel", + component: () => import("../views/model/children/roverModel.vue"), + }, + { + path: "/model/leapMachineModel", + name: "leapMachineModel", + component: () => + import("../views/model/children/leapMachineModel.vue"), + }, + ], }, { - path: '/model/roverModel', - name: 'roverModel', - component: () => import('../views/model/children/roverModel.vue') + path: "/simulation", + name: "simulation", + component: () => import("../views/simulation/index.vue"), + redirect: "/testSimulation", + meta: { + name: '娴嬭瘯浠跨湡' + }, + children: [ + { + path: "/testSimulation", + name: "testSimulation", + component: () => + import("../views/simulation/testSimulation/index.vue"), + }, + { + path: "/testSimulation/detail", + name: "testSimulation-detail", + component: () => + import("../views/simulation/testSimulation/detail.vue"), + }, + { + path: "/testSimulation/testReport", + name: "testReport", + component: () => + import("../views/simulation/testSimulation/testReport.vue"), + }, + { + path: "/realTimeSimulation", + name: "realTimeSimulation", + meta: { + name: '瀹炴椂浠跨湡' + }, + component: () => + import("../views/simulation/realTimeSimulation/index.vue"), + }, + { + path: "/autonomousFunction", + name: "autonomousFunction", + meta: { + name: '鑷富鍔熻兘' + }, + component: () => + import("../views/simulation/autonomousFunction/index.vue"), + }, + ], }, + { - path: '/model/leapMachineModel', - name: 'leapMachineModel', - component: () => import('../views/model/children/leapMachineModel.vue') + path: "/systemManage", + name: "systemManage", + meta: { + name: '绯荤粺绠$悊' + }, + component: () => import("../views/system/index.vue"), + redirect: "/userManage", + children: [ + { + path: "/userManage", + name: "userManage", + meta: { + name: '鐢ㄦ埛绠$悊' + }, + component: () => + import("../views/system/userManage.vue"), + }, + { + path: "/roleManage", + name: "roleManage", + meta: { + name: '瑙掕壊绠$悊' + }, + component: () => + import("../views/system/roleManage.vue"), + }, + ] }, - ] - }, - - { - path: '/simulation-config', - name: 'simulationConfig', - component: () => import('../views/simulation/Config.vue') - }, - { - path: '/simulation-result', - name: 'simulationResult', - component: () => import('../views/simulation/Result.vue') - }, - { - path: '/simulation-test', - name: 'simulationTest', - component: () => import('../views/simulation/test.vue') - }, - { - path: '/system/user', - name: 'systemUser', - component: () => import('../views/system/User.vue') - }, - + ], + } ] -}) +}); -export default router \ No newline at end of file +export default router; diff --git a/src/styles/global.less b/src/styles/global.less index 70a99a1..3950f8c 100644 --- a/src/styles/global.less +++ b/src/styles/global.less @@ -11,6 +11,44 @@ margin: 0; padding: 0; height: 100%; + width: 100%; +} +div, +span, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +a, +img, +strong, +sub, +sup, +ol, +ul, +li, +form, +label, +table, +tbody, +tfoot, +thead, +tr, +th, +td, +canvas, +audio, +video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + /* vertical-align: baseline; */ } // 娣峰叆 @@ -48,18 +86,10 @@ color: #535bf2; } -html, -body { - margin: 0; - display: flex; - place-items: center; - width: 100%; - height: 100%; -} - h1 { font-size: 3.2em; line-height: 1.1; + margin:0; } button { @@ -91,12 +121,11 @@ width: 100%; height: 100%; margin: 0 auto; - text-align: center; + // text-align: center; } /* 寮曞叆 Element Plus 鐨勫熀纭�鏍峰紡 */ - .common-layout { width: 100%; @@ -104,7 +133,7 @@ } .common-layout .el-container { - height: calc(100% - 60px); + height: 100%; } .el-header { @@ -113,17 +142,40 @@ line-height: 60px; } -.el-aside { - background-color: #D3DCE6; - color: #333; -} - .el-main { background-color: #E9EEF3; color: #333; - padding: 10px !important; + padding: 0 !important; + box-sizing: border-box; + flex: auto; + +} +.pageContainer{ + display: flex; + width: 100%; + height: 100%; + // background-color: #fff; + padding-top: 10px; box-sizing: border-box; } +.menuBox{ + box-sizing: border-box; + +} +.contentBox{ + flex:1 1; + box-sizing: border-box; + overflow: hidden; + padding:10px; + background-color: #fff; +} + +.el-table__header{ + thead .el-table__cell{ + background:#f1f1f1; + } +} + .mb-4 { margin-bottom: 16px; @@ -147,4 +199,50 @@ button { background-color: #f9f9f9; } -} \ No newline at end of file +} + +//鑷畾涔� +ul { + list-style: none; + margin:0 +} + +.flex{ + display: flex; +} +/* 鍨傜洿灞呬腑 */ +.ai-c { + align-items: center; +} + +/* 涓よ竟瀵归綈 */ +.jc-sb { + justify-content: space-between; +} +.hover{ + cursor: pointer; + +} + +::-webkit-scrollbar { + width: 10px; + height: 10px; +} + +::-webkit-scrollbar-track-piece { + background-color: rgba(0, 0, 0, 0.2); + -webkit-border-radius: 6px; +} + +::-webkit-scrollbar-thumb:vertical { + height: 5px; + background-color: rgba(125, 125, 125, 0.7); + -webkit-border-radius: 6px; +} + +::-webkit-scrollbar-thumb:horizontal { + width: 5px; + background-color: rgba(125, 125, 125, 0.7); + -webkit-border-radius: 6px; +} + diff --git a/src/views/model/index.vue b/src/views/model/index.vue index 7ee031c..96aed70 100644 --- a/src/views/model/index.vue +++ b/src/views/model/index.vue @@ -1,16 +1,16 @@ <template> - <div class="modelContainer"> - <RouterView /> + <div class="pageContainer"> + <div class="menuBox"> + <treeMenu :menuItem="menuItem"/> + </div> + <div class="contentBox"><RouterView /></div> </div> </template> <script setup lang="ts"> +import { ref} from "vue"; +import treeMenu from "@/components/treeMenu.vue"; +const menuItem = ref('model') </script> -<style lang="less" scoped> -.modelContainer { - width: 100%; - height: 100%; - background-color: #fff; -} -</style> \ No newline at end of file +<style lang="less" scoped></style> diff --git a/src/views/simulation/Config.vue b/src/views/simulation/Config.vue deleted file mode 100644 index 724c456..0000000 --- a/src/views/simulation/Config.vue +++ /dev/null @@ -1,14 +0,0 @@ -<template> - <div class="simulation-config"> - <h2>浠跨湡閰嶇疆</h2> - </div> -</template> - -<script setup lang="ts"> -</script> - -<style lang="less" scoped> -.simulation-config { - padding: 20px; -} -</style> \ No newline at end of file diff --git a/src/views/simulation/Result.vue b/src/views/simulation/Result.vue deleted file mode 100644 index 2391a7a..0000000 --- a/src/views/simulation/Result.vue +++ /dev/null @@ -1,14 +0,0 @@ -<template> - <div class="simulation-result"> - <h2>浠跨湡缁撴灉</h2> - </div> -</template> - -<script setup lang="ts"> -</script> - -<style lang="less" scoped> -.simulation-result { - padding: 20px; -} -</style> \ No newline at end of file diff --git a/src/views/simulation/Test.vue b/src/views/simulation/Test.vue deleted file mode 100644 index da6de3f..0000000 --- a/src/views/simulation/Test.vue +++ /dev/null @@ -1,14 +0,0 @@ -<template> - <div class="permission-manage"> - <h2>浠跨湡娴嬭瘯</h2> - </div> -</template> - -<script setup lang="ts"> -</script> - -<style lang="less" scoped> -.permission-manage { - padding: 20px; -} -</style> \ No newline at end of file diff --git a/src/views/simulation/autonomousFunction/index.vue b/src/views/simulation/autonomousFunction/index.vue new file mode 100644 index 0000000..8c39c17 --- /dev/null +++ b/src/views/simulation/autonomousFunction/index.vue @@ -0,0 +1,14 @@ +<template> + <div class="simulation-config"> + <h2>鑷富绠$悊</h2> + </div> + </template> + + <script setup lang="ts"> + </script> + + <style lang="less" scoped> + .simulation-config { + padding: 20px; + } + </style> \ No newline at end of file diff --git a/src/views/simulation/index.vue b/src/views/simulation/index.vue new file mode 100644 index 0000000..32b198b --- /dev/null +++ b/src/views/simulation/index.vue @@ -0,0 +1,16 @@ +<template> + <div class="pageContainer"> + <div class="menuBox"> + <treeMenu :menuItem="menuItem"/> + </div> + <div class="contentBox"><RouterView /></div> + </div> +</template> + +<script setup lang="ts"> +import { ref} from "vue"; +import treeMenu from "@/components/treeMenu.vue"; +const menuItem = ref('simulation') +</script> + +<style lang="less" scoped></style> \ No newline at end of file diff --git a/src/views/simulation/realTimeSimulation/index.vue b/src/views/simulation/realTimeSimulation/index.vue new file mode 100644 index 0000000..44d0995 --- /dev/null +++ b/src/views/simulation/realTimeSimulation/index.vue @@ -0,0 +1,14 @@ +<template> + <div class="simulation-config"> + <h2>瀹炴椂浠跨湡</h2> + </div> +</template> + + <script setup lang="ts"> + </script> + + <style lang="less" scoped> + .simulation-config { + padding: 20px; + } + </style> \ No newline at end of file diff --git a/src/views/simulation/testSimulation/detail.vue b/src/views/simulation/testSimulation/detail.vue new file mode 100644 index 0000000..a2f7589 --- /dev/null +++ b/src/views/simulation/testSimulation/detail.vue @@ -0,0 +1,508 @@ +<template> + <div class="simulation-result"> + <div style="width: 100%; height: 100%; background: #fff" id="myDiv"> + <div class="titleBox"> + <div class="name"> + <span>{{ name }}浠跨湡</span> + <img + src="@/assets/images/icon/fullScreen.png" + @click="enlargeDiv('true')" + v-if="enlarge" + /> + <img + src="@/assets/images/icon/halfScreen.png" + @click="enlargeDiv('false')" + v-else + /> + </div> + <div class="back hover" @click="goBack"> + <el-icon ><ArrowLeftBold /></el-icon>杩斿洖 + </div> + </div> + <div class="flex bodyBox"> + <div class="modelBox"></div> + <div class="shadowBox"> + <div id="shadowX"> + <div class="title"> + <span>X杞存姇褰�</span> + <img + src="@/assets/images/icon/fullScreen.png" + @click="enlargeXDiv('true')" + v-if="enlargeX" + /> + <img + src="@/assets/images/icon/halfScreen.png" + @click="enlargeXDiv('false')" + v-else + /> + </div> + <div class="shadowX-body"></div> + </div> + <div id="shadowY"> + <div class="title"> + <span>Y杞存姇褰�</span> + <img + src="@/assets/images/icon/fullScreen.png" + @click="enlargeYDiv('true')" + v-if="enlargeY" + /> + <img + src="@/assets/images/icon/halfScreen.png" + @click="enlargeYDiv('false')" + v-else + /> + </div> + <div class="shadowY-body"></div> + </div> + <div id="shadowZ"> + <div class="title"> + <span>Z杞存姇褰�</span> + <img + src="@/assets/images/icon/fullScreen.png" + @click="enlargeZDiv('true')" + v-if="enlargeZ" + /> + <img + src="@/assets/images/icon/halfScreen.png" + @click="enlargeZDiv('false')" + v-else + /> + </div> + <div class="shadowZ-body"></div> + </div> + </div> + </div> + <div class="flex operateBox" id="operateBox"> + <div id="instruct"> + <div class="title jc-sb"> + <div class="title"> + <span>鎸囦护</span> + <img + src="@/assets/images/icon/fullScreen.png" + @click="enlargeInstructDiv('true')" + v-if="enlargeI" + /> + <img + src="@/assets/images/icon/halfScreen.png" + @click="enlargeInstructDiv('false')" + v-else + /> + </div> + <div class="upBold"> + <el-icon @click="operateBoxDiv('true')" v-if="operate" + ><ArrowUpBold + /></el-icon> + <el-icon @click="operateBoxDiv('false')" v-else + ><ArrowDownBold + /></el-icon> + </div> + </div> + <div class="instruct-body"> + <div class="instruct-list"> + <div v-for="(item, index) in instructList" :key="index"> + >{{ item }} + </div> + </div> + <div class="inputBox"> + <el-input + v-model="instructContent" + placeholder="璇疯緭鍏ユ寚浠�" + @keyup.enter="setInstruct" + /> + </div> + </div> + </div> + <div id="resize"></div> + <div id="log"> + <div class="title jc-sb"> + <div class="title"> + <span>鏃ュ織</span> + <img + src="@/assets/images/icon/fullScreen.png" + @click="enlargeLogDiv('true')" + v-if="enlargeL" + /> + <img + src="@/assets/images/icon/halfScreen.png" + @click="enlargeLogDiv('false')" + v-else + /> + </div> + <div class="upBold"> + <el-icon @click="operateBoxDiv('true')" v-if="operate" + ><ArrowUpBold + /></el-icon> + <el-icon @click="operateBoxDiv('false')" v-else + ><ArrowDownBold + /></el-icon> + </div> + </div> + <div class="log-body"> + <div class="log-list"> + <div v-for="(item, index) in instructList" :key="index"> + >{{ item }} + </div> + </div> + </div> + </div> + </div> + </div> + </div> + <el-dialog v-model="reportDialogForm" title="鐢熸垚娴嬭瘯鎶ュ憡" width="500"> + <el-form :model="reportInfo"> + <el-form-item label="鎶ュ憡鍚嶇О" label-width="100px"> + <el-input v-model="reportInfo.reportName" autocomplete="off" /> + </el-form-item> + <el-form-item label="娴嬭瘯鏃堕棿" label-width="100px"> + <el-input v-model="reportInfo.testTime" autocomplete="off" disabled/> + </el-form-item> + </el-form> + <template #footer> + <div class="dialog-footer"> + <el-button @click="reportDialogForm = false">鍚�</el-button> + <el-button type="primary" @click="reportDialogForm = false"> + 鏄� + </el-button> + </div> + </template> + </el-dialog> +</template> + +<script setup lang="ts"> +import { ref, reactive,onMounted } from "vue"; +const name = ref("椋炶穬鍣ㄦ暣妯″瀷"); +const reportDialogForm = ref(false) +const reportInfo = reactive({ + reportName:'', + testTime: '', +}) +const enlarge = ref(true); +const enlargeX = ref(true); +const enlargeY = ref(true); +const enlargeZ = ref(true); +const enlargeI = ref(true); +const enlargeL = ref(true); +const instructContent = ref(""); +const operate = ref(true); +const instructList = ref([]); +const logList = ref([]); + +const goBack =()=>{ + var time = new Date(Date.now()); + var year = time.getFullYear(); + var month = time.getMonth()+1; + var day = time.getDate(); + var hour = time.getHours(); + var minute = time.getMinutes(); + var second = time.getSeconds(); + reportInfo.testTime = year+'-'+(month<10?'0'+month:month)+'-'+(day<10?'0'+day:day)+' '+(hour<10?'0'+hour:hour)+':'+(minute<10?'0'+minute:minute)+':'+(second<10?'0'+second:second) + reportDialogForm.value = true + +} + + +const enlargeDiv = (state) => { + let divStyle = document.getElementById("myDiv"); + if (state == "true") { + enlarge.value = false; + let screenWidth = window.innerWidth; // 鑾峰彇灞忓箷瀹藉害 + let screenHeight = window.innerHeight; // 鑾峰彇灞忓箷楂樺害 + divStyle.style.width = screenWidth + "px"; // 璁剧疆瀹藉害涓哄睆骞曞搴� + divStyle.style.height = screenHeight + "px"; // 璁剧疆楂樺害涓哄睆骞曢珮搴� + divStyle.style.left = "0"; // 璁剧疆宸﹁竟璺濅负0锛屼娇鍏朵粠灞忓箷宸︿晶寮�濮� + divStyle.style.top = "0"; // 璁剧疆椤堕儴杈硅窛涓�0锛屼娇鍏朵粠灞忓箷椤堕儴寮�濮� + divStyle.style.position = "fixed"; // 浣跨敤fixed瀹氫綅锛岀‘淇濊鐩栨暣涓睆骞� + } else { + enlarge.value = true; + divStyle.style.width = "100%"; // 杩樺師瀹藉害 + divStyle.style.height = "100%"; // 杩樺師楂樺害 + divStyle.style.left = ""; // 娓呴櫎宸﹁竟璺� + divStyle.style.top = ""; // 娓呴櫎椤堕儴杈硅窛 + divStyle.style.position = ""; // 娓呴櫎瀹氫綅灞炴�� + } +}; +const enlargeXDiv = (state) => { + let divStyle = document.getElementById("shadowX"); + if (state == "true") { + enlargeX.value = false; + let screenWidth = window.innerWidth; + let screenHeight = window.innerHeight; + divStyle.style.width = screenWidth + "px"; + divStyle.style.height = screenHeight + "px"; + divStyle.style.left = "0"; + divStyle.style.top = "0"; + divStyle.style.position = "fixed"; + } else { + enlargeX.value = true; + divStyle.style.width = "100%"; + divStyle.style.height = "calc((100% - 6px) / 3)"; + divStyle.style.left = ""; + divStyle.style.top = ""; + divStyle.style.position = ""; + } +}; +const enlargeYDiv = (state) => { + let divStyle = document.getElementById("shadowY"); + if (state == "true") { + enlargeY.value = false; + let screenWidth = window.innerWidth; + let screenHeight = window.innerHeight; + divStyle.style.width = screenWidth + "px"; + divStyle.style.height = screenHeight + "px"; + divStyle.style.left = "0"; + divStyle.style.top = "0"; + divStyle.style.position = "fixed"; + } else { + enlargeY.value = true; + divStyle.style.width = "100%"; + divStyle.style.height = "calc((100% - 6px) / 3)"; + divStyle.style.left = ""; + divStyle.style.top = ""; + divStyle.style.position = ""; + } +}; +const enlargeZDiv = (state) => { + let divStyle = document.getElementById("shadowZ"); + if (state == "true") { + enlargeZ.value = false; + let screenWidth = window.innerWidth; + let screenHeight = window.innerHeight; + divStyle.style.width = screenWidth + "px"; + divStyle.style.height = screenHeight + "px"; + divStyle.style.left = "0"; + divStyle.style.top = "0"; + divStyle.style.position = "fixed"; + } else { + enlargeZ.value = true; + divStyle.style.width = "100%"; + divStyle.style.height = "calc((100% - 6px) / 3)"; + divStyle.style.left = ""; + divStyle.style.top = ""; + divStyle.style.position = ""; + } +}; +const enlargeInstructDiv = (state) => { + let divStyle = document.getElementById("instruct"); + if (state == "true") { + enlargeI.value = false; + let screenWidth = window.innerWidth; + let screenHeight = window.innerHeight; + divStyle.style.width = screenWidth + "px"; + divStyle.style.height = screenHeight + "px"; + divStyle.style.left = "0"; + divStyle.style.top = "0"; + divStyle.style.position = "fixed"; + } else { + enlargeI.value = true; + divStyle.style.width = "100%"; + divStyle.style.height = "100%"; + divStyle.style.left = ""; + divStyle.style.top = ""; + divStyle.style.position = ""; + } +}; +const enlargeLogDiv = (state) => { + let divStyle = document.getElementById("log"); + if (state == "true") { + enlargeL.value = false; + let screenWidth = window.innerWidth; + let screenHeight = window.innerHeight; + divStyle.style.width = screenWidth + "px"; + divStyle.style.height = screenHeight + "px"; + divStyle.style.left = "0"; + divStyle.style.top = "0"; + divStyle.style.position = "fixed"; + } else { + enlargeL.value = true; + divStyle.style.width = "100%"; + divStyle.style.height = "100%"; + divStyle.style.left = ""; + divStyle.style.top = ""; + divStyle.style.position = ""; + } +}; + +const operateBoxDiv = (state) => { + let divStyle = document.getElementById("operateBox"); + if (state == "true") { + operate.value = false; + divStyle.style.width = "100%"; + divStyle.style.height = "calc(100% - 36px)"; + divStyle.style.left = "0"; + divStyle.style.top = "36px"; + divStyle.style.position = "absolute"; + } else { + operate.value = true; + divStyle.style.height = "calc(100% - 36px - 70%)"; + divStyle.style.left = ""; + divStyle.style.top = ""; + divStyle.style.position = ""; + } +}; + +const setInstruct = () => { + console.log(instructContent.value); + instructList.value.push(instructContent.value); + logList.value.push(instructContent.value); + instructContent.value = ""; +}; + + +onMounted(() => { + handleResize(); +}); +//鎸囦护鏃ュ織妗嗗搴︽嫋鎷� +const handleResize = () => { + let operateDom = document.getElementById("operateBox"); + let instructDom = document.getElementById("instruct"); + let logDom = document.getElementById("log"); + let resizeDom = document.getElementById("resize"); + + for (let i = 0; i < resizeDom.length; i++) { + // 榧犳爣鎸変笅浜嬩欢 + console.log(1) + resizeDom[i].onmousedown = function (e) { + //棰滆壊鏀瑰彉鎻愰啋 + resizeDom[i].style.background = '#f0f2f5' + var startX = e.clientX + resizeDom[i].left = resizeDom[i].offsetLeft + // 榧犳爣鎷栧姩浜嬩欢 + document.onmousemove = function (e) { + console.log(2) + var endX = e.clientX + var moveLen = resizeDom[i].left + (endX - startX) // 锛坋ndx-startx锛�=绉诲姩鐨勮窛绂汇�俽esize[i].left+绉诲姩鐨勮窛绂�=宸﹁竟鍖哄煙鏈�鍚庣殑瀹藉害 + var maxT = operateDom[i].clientWidth - resizeDom[i].offsetWidth // 瀹瑰櫒瀹藉害 - 宸﹁竟鍖哄煙鐨勫搴� = 鍙宠竟鍖哄煙鐨勫搴� + + if (moveLen < 200) moveLen = 200 // 宸﹁竟鍖哄煙鐨勬渶灏忓搴︿负32px + if (moveLen > maxT - 200) moveLen = maxT - 200 //鍙宠竟鍖哄煙鏈�灏忓搴︿负150px + + resizeDom[i].style.left = moveLen // 璁剧疆宸︿晶鍖哄煙鐨勫搴� + for (let j = 0; j < instructDom.length; j++) { + instructDom[j].style.width = moveLen + 'px' + logDom[j].style.width = operateDom[i].clientWidth - moveLen - 10 + 'px' + } + } + // 榧犳爣鏉惧紑浜嬩欢 + document.onmouseup = function (evt) { + //棰滆壊鎭㈠ + resizeDom[i].style.background = '#f0f2f5' + document.onmousemove = null + document.onmouseup = null + resizeDom[i].releaseCapture && resizeDom[i].releaseCapture() //褰撲綘涓嶅湪闇�瑕佺户缁幏寰楅紶鏍囨秷鎭氨瑕佸簲璇ヨ皟鐢≧eleaseCapture()閲婃斁鎺� + } + resizeDom[i].setCapture && resizeDom[i].setCapture() //璇ュ嚱鏁板湪灞炰簬褰撳墠绾跨▼鐨勬寚瀹氱獥鍙i噷璁剧疆榧犳爣鎹曡幏 + return false + } + } +}; +</script> + +<style lang="less" scoped> +.simulation-result { + width: 100%; + height: 100%; + position: relative; +} +.titleBox { + height: 36px; + line-height: 36px; + background: #409eff; + position: relative; + .name { + display: flex; + justify-content: center; /* 姘村钩灞呬腑 */ + align-items: center; + img { + margin-left: 10px; + } + } + .back { + position: absolute; + left: 10px; + top: 0; + display: flex; + align-items: center; + color: #ffffff; + } +} +.title { + background: #409eff; + height: 36px; + display: flex; + align-items: center; + padding: 0 10px; + img { + margin-left: 10px; + } +} +.bodyBox { + height: 70%; + .modelBox { + width: 60%; + border: 1px solid #f1f1f1; + } + .shadowBox { + width: 40%; + } + #shadowX, + #shadowY, + #shadowZ { + background: #fff; + height: calc((100% - 6px) / 3); + border: 1px solid #f1f1f1; + } +} +.operateBox { + height: calc(100% - 36px - 70%); + box-sizing: border-box; + overflow: hidden; + #instruct, + #log { + background: #fff; + border: 1px solid #f1f1f1; + width: calc((100% - 4px) / 2); + height: 100%; + box-sizing: border-box; + float: left; + } + #resize { + width: 3px; + position: relative; + cursor: col-resize; + background-size: cover; + background-position: center; + &:hover { + background: #45a3ff; + } + } + + .upBold { + display: flex; + align-items: center; + color: #fff; + } + + .instruct-body { + height: calc(100% - 36px); + position: relative; + .instruct-list { + height: calc(100% - 52px); + overflow-y: auto; + padding: 10px; + } + .inputBox { + width: 100%; + position: absolute; + bottom: 0; + } + } + .log-body { + height: calc(100% - 36px); + .log-list { + height: calc(100% - 20px); + overflow-y: auto; + padding: 10px; + } + } +} +</style> diff --git a/src/views/simulation/testSimulation/index.vue b/src/views/simulation/testSimulation/index.vue new file mode 100644 index 0000000..3b62d17 --- /dev/null +++ b/src/views/simulation/testSimulation/index.vue @@ -0,0 +1,238 @@ +<template> + <div class="simulation-index"> + <div class="flex ai-c"> + <el-select v-model="aircraftActive" placeholder="Select" style="width: 140px"> + <el-option + v-for="item in aircraftList" + :key="item.id" + :label="item.name" + :value="item.id" + /> + </el-select> + <ul class="flex tabs"> + <li + v-for="item in modelTypeList" + :key="item.id" + @click="handleClick(item)" + :class="item.id == modelTypeActive ? 'activeItem' : 'item'" + > + {{ item.name }} + </li> + </ul> + </div> + <div class="page-box"> + <div class="search"> + <el-input + v-model="searchValue" + style="width: 400px" + placeholder="璇疯緭鍏ユ悳绱㈠叧閿瓧" + > + <template #suffix> + <el-icon class="el-input__icon"><search /></el-icon> + </template> + </el-input> + </div> + <div class="list"> + <div class="model-body" v-loading="listLoading"> + <el-row :gutter="20" v-if="modelDataList.length > 0"> + <el-col + :span="6" + v-for="(item, index) in modelDataList" + :key="index" + > + <div class="model-body-box"> + <div class="model-img"> + <img :src="item.icon" alt="" /> + </div> + <div class="model-info"> + <h1 class="model-title" :title="item.name"> + {{ item.name }} + </h1> + <p class="flex jc-sb"> + <span class="attribute hover" @click="gotoDetail(item)">灞炴��</span> + <span class="report hover" @click="gotoReport(item)">娴嬭瘯鎶ュ憡</span> + <span class="simulation hover" @click="gotoSimulation(item)">浠跨湡</span> + </p> + </div> + </div> + </el-col> + </el-row> + <div v-if="modelDataList.length == 0"> + <el-empty :image-size="140" /> + </div> + </div> + </div> + </div> + </div> + <el-dialog + v-model="detailDialogVisible" + title="灞炴��" + width="500" + :before-close="handleClose" + > + <div> + <div>鍚嶇О锛氬贰瑙嗗櫒鏁存ā鍨�</div> + <div>灏哄锛氬贰瑙嗗櫒鏁存ā鍨�</div> + </div> + + </el-dialog> +</template> + +<script setup lang="ts"> +import { ref, onMounted } from "vue"; +import { useRouter, useRoute } from 'vue-router' +const router = useRouter() +const route = useRoute() + +const aircraftList = ref([]); +const aircraftActive = ref('1') +const modelTypeList = ref([ + { + name: "鐫�闄嗗櫒", + id: "2", + }, + { + name: "宸¤鍣�", + id: "3", + }, + { + name: "椋炶穬鍣�", + id: "4", + }, +]); +const modelTypeActive = ref("3"); +const searchValue = ref(); +const modelDataList = ref([]); +const listLoading = ref(false); +const detailDialogVisible = ref(false) +onMounted(() => { + getAircraftList(); + getModelData(); +}); + +const getAircraftList = () => { + let list = [ + { + name: "瀚﹀ē涓冨彿", + id: "1", + }, + { + name: "鍏朵粬鍨嬪彿", + id: "2", + }, + ]; + aircraftList.value = list; +}; + +const handleClick = (item) => { + modelTypeActive.value = item.id +}; +const getModelData = () => { + listLoading.value = true; + let list = [ + { + name: "宸¤鍣ㄦ暣妯″瀷", + icon: "", + id: "1", + }, + { + name: "澶╃嚎", + icon: "", + id: "2", + }, + { + name: "澶槼缈�", + icon: "", + id: "3", + }, + ]; + modelDataList.value = list; + listLoading.value = false; +}; + + +//鏌ョ湅灞炴�� +const gotoDetail = () => { + detailDialogVisible.value = true +}; +const handleClose = () =>{ + detailDialogVisible.value = false +} +//鏌ョ湅娴嬭瘯鎶ュ憡 +const gotoReport = (item) => { + router.push({ + name: 'testReport', + query: { + id: item.id + } + }) +}; +//鎵撳紑浠跨湡 +const gotoSimulation = (item) => { + router.push({ + name: 'testSimulation-detail', + query: { + id: item.id + } + }) +}; + +</script> + +<style lang="less" scoped> +.simulation-index { + padding: 20px; +} +.tabs{ + margin-left: 40px; + li{ + width:60px; + text-align: center; + padding: 5px 0; + margin:0 15px; + cursor: pointer; + } + .activeItem{ + border-bottom:2px solid #1890ff; + } +} +.page-box{ + margin-top: 20px; +} +.list { + margin-top: 20px; + .model-body-box { + border: 1px solid #f1f1f1; + .model-img { + height: 240px; + + img { + width: 100%; + height: 100%; + object-fit: contain; + } + } + + .model-info { + height: 80px; + padding: 20px; + .model-title { + font-size: 16px; + } + p { + line-height: 30px; + font-size: 16px; + } + .attribute { + color: #1890ff; + } + .report { + color: #1fbc1f; + } + .simulation { + color: #ee1818; + } + } + } +} +</style> diff --git a/src/views/simulation/testSimulation/testReport.vue b/src/views/simulation/testSimulation/testReport.vue new file mode 100644 index 0000000..0f05b0d --- /dev/null +++ b/src/views/simulation/testSimulation/testReport.vue @@ -0,0 +1,130 @@ +<template> + <div class="permission-manage"> + <div class="titleBox"> + <div class="name"> + <span>{{ name }}娴嬭瘯鎶ュ憡</span> + </div> + <div class="back"><el-icon><ArrowLeftBold /></el-icon>杩斿洖</div> + </div> + <div class="page-box"> + <div class="search flex"> + <el-date-picker + v-model="testTime" + type="date" + placeholder="閫夋嫨鏃ユ湡" + /> + <el-input + v-model="searchValue" + + placeholder="璇疯緭鍏ユ悳绱㈠叧閿瓧" + class="searchInput" + > + <template #suffix> + <el-icon class="el-input__icon"><search /></el-icon> + </template> + </el-input> + </div> + <div class="list"> + <div> + <el-table :data="tableData" border :default-sort="{ prop: 'date', order: 'descending' }" style="width: 100%"> + <el-table-column prop="index" label="搴忓彿" width="60"/> + <el-table-column prop="name" label="娴嬭瘯鍚嶇О" /> + <el-table-column prop="model" label="娴嬭瘯妯″瀷" /> + <el-table-column prop="time" label="娴嬭瘯鏃堕棿" sortable /> + <el-table-column prop="operator" label="娴嬭瘯浜�"/> + <el-table-column label="鎿嶄綔"> + <template #default="scope"> + <el-button + size="small" + @click="getDetail(scope.row)" + > + 鏌ョ湅 + </el-button> + </template> + </el-table-column> + </el-table> + </div> + + </div> + + </div> + </div> +</template> + +<script setup lang="ts"> +import { ref, onMounted } from "vue"; +const name = ref('椋炶穬鍣ㄦ暣妯″瀷') +const testTime = ref() +const searchValue = ref() +const tableData = ref([]) + +onMounted(() => { + getReportData(); +}); + +const getReportData =()=>{ + let list=[ + { + index: 1, + name:'', + model:'', + time:'', + operator:'', + }, + { + index: 2, + name:'', + model:'', + time:'', + operator:'', + }, + { + index: 3, + name:'', + model:'', + time:'', + operator:'', + }, + ] + tableData.value = list +} + +const getDetail =(row)=>{ + +} + +</script> + +<style lang="less" scoped> +.testReport { + padding: 20px; +} +.titleBox{ + height:36px; + line-height: 36px; + background:#409eff; + position: relative; + .name{ + text-align:center; + } + .back{ + position:absolute; + left:10px; + top: 0; + display: flex; + align-items: center; + color:#ffffff; + } + +} +.page-box{ + padding: 20px; + .searchInput{ + width:220px; + margin-left:20px; + } + .list{ + margin-top:20px; + } +} +</style> \ No newline at end of file diff --git a/src/views/system/User.vue b/src/views/system/User.vue deleted file mode 100644 index 1f11920..0000000 --- a/src/views/system/User.vue +++ /dev/null @@ -1,14 +0,0 @@ -<template> - <div class="user-manage"> - <h2>鐢ㄦ埛绠$悊</h2> - </div> -</template> - -<script setup lang="ts"> -</script> - -<style lang="less" scoped> -.user-manage { - padding: 20px; -} -</style> \ No newline at end of file diff --git a/src/views/system/index.vue b/src/views/system/index.vue new file mode 100644 index 0000000..a13528e --- /dev/null +++ b/src/views/system/index.vue @@ -0,0 +1,16 @@ +<template> + <div class="pageContainer"> + <div class="menuBox"> + <treeMenu :menuItem="menuItem"/> + </div> + <div class="contentBox"><RouterView /></div> + </div> +</template> + +<script setup lang="ts"> +import { ref} from "vue"; +import treeMenu from "@/components/treeMenu.vue"; +const menuItem = ref('systemManage') +</script> + +<style lang="less" scoped></style> \ No newline at end of file diff --git a/src/views/system/roleManage.vue b/src/views/system/roleManage.vue new file mode 100644 index 0000000..d455c20 --- /dev/null +++ b/src/views/system/roleManage.vue @@ -0,0 +1,166 @@ +<template> + <div class="user-manage"> + <div> + <ul class="flex tabs"> + <li + v-for="item in tabList" + :key="item.value" + @click="handleClick(item)" + :class="item.value == tabActive ? 'activeItem' : 'item'" + > + {{ item.lable }} + </li> + </ul> + </div> + <div class="list"> + <div> + <el-tree + :data="dataList" + show-checkbox + node-key="id" + default-expand-all + :props="defaultProps" + /> + + </div> + + </div> + </div> +</template> + +<script setup lang="ts"> +import { ref, onMounted } from "vue"; + +const tabList = ref([ + { + lable:'鑿滃崟/鍔熻兘璁块棶鏉冮檺', + value:'menu' + + }, + { + lable:'妯″瀷璁块棶鏉冮檺', + value:'model' + } +]) +const tabActive = ref('menu') +const dataList = ref([]) + +onMounted(() => { + getData(); +}); + +const defaultProps = { + children: 'children', + label: 'name', +} + +const getData = () =>{ + let list = [ + { + name:'妯″瀷绠$悊', + sysType:'cmsFolder', + productLinkPath:'111', + children:[ + { + name:'鏂板鍨嬪彿', + sysType:'cmsItem', + productLinkPath:'211', + }, + { + name:'缂栬緫鍨嬪彿', + sysType:'cmsItem', + productLinkPath:'212', + }, + { + name:'鍒犻櫎鍨嬪彿', + sysType:'cmsItem', + productLinkPath:'213', + }, + { + name:'鏂板妯″瀷', + sysType:'cmsItem', + productLinkPath:'214', + },{ + name:'鍒犻櫎妯″瀷', + sysType:'cmsItem', + productLinkPath:'215', + },{ + name:'鍒犻櫎妯″瀷', + sysType:'cmsItem', + productLinkPath:'216', + } + ] + + }, + { + name:'鍙鍖栦豢鐪�', + sysType:'cmsFolder', + productLinkPath:'112', + children:[ + { + name:'娴嬭瘯浠跨湡', + sysType:'cmsFolder', + productLinkPath:'221', + children:[ + { + name:'妫�绱㈡ā鍨�', + sysType:'cmsItem', + productLinkPath:'231', + + }, + { + name:'妯″瀷棰勮', + sysType:'cmsItem', + productLinkPath:'232', + }, + { + name:'妯″瀷灞炴�ф煡鐪�', + sysType:'cmsItem', + productLinkPath:'233', + }, + { + name:'妯″瀷浠跨湡', + sysType:'cmsItem', + productLinkPath:'234', + }, + { + name:'娴嬭瘯鎶ュ憡', + sysType:'cmsItem', + productLinkPath:'235', + }, + ] + }, + { + name:'娴嬭瘯鎶ュ憡', + sysType:'cmsFolder', + productLinkPath:'221', + }, + ] + + } + ] + dataList.value = list + +} +const handleClick = (item) => { + tabActive.value = item.value +}; +</script> + +<style lang="less" scoped> +.user-manage { + padding: 20px; +} +.tabs{ + li{ + width:140px; + text-align: center; + padding: 5px 0; + margin:0 15px; + cursor: pointer; + } + .activeItem{ + border-bottom:2px solid #1890ff; + } +} +</style> diff --git a/src/views/system/userManage.vue b/src/views/system/userManage.vue new file mode 100644 index 0000000..3d69e2f --- /dev/null +++ b/src/views/system/userManage.vue @@ -0,0 +1,176 @@ +<template> + <div class="user-manage"> + <div class="flex jc-sb ai-c"> + <div class="addBox"> + <el-icon><Plus /></el-icon> + <span>鏂板缓</span> + </div> + <div class="search"> + <el-input + v-model="searchValue" + style="width: 400px" + placeholder="璇疯緭鍏ユ悳绱㈠叧閿瓧" + > + <template #suffix> + <el-icon class="el-input__icon"><search /></el-icon> + </template> + </el-input> + </div> + </div> + <div class="list"> + <el-table + :data="tableData" + row-key="id" + border + style="width: 100%" + class="roverTable" + > + <el-table-column prop="index" label="搴忓彿" width="60" /> + <el-table-column prop="userName" label="鐢ㄦ埛濮撳悕" /> + <el-table-column prop="name" label="鐢ㄦ埛鍚�" /> + <el-table-column prop="state" label="鐘舵��" /> + <el-table-column prop="role" label="绫诲瀷" /> + <el-table-column prop="creatTime" label="鍒涘缓鏃堕棿" /> + <el-table-column label="鎿嶄綔" width="220" > + <template #default="scope"> + <el-button size="small" @click="update(scope.row)"> + 缂栬緫 + </el-button> + <el-button size="small" @click="goDisable(scope.row)"> + 绂佺敤 + </el-button> + <el-button size="small" @click="goDelete(scope.row)"> + 鍒犻櫎 + </el-button> + </template> + </el-table-column> + </el-table> + </div> + <div class="rover-pagination-block"> + <el-pagination + v-model:current-page="currentPage" + :page-size="pageSize" + :background="background" + layout="total, prev, pager, next" + :total="100" + @current-change="handleCurrentChange" + /> + </div> + </div> +</template> + +<script setup lang="ts"> +import { ref, onMounted } from "vue"; +import { ElMessage, ElMessageBox } from 'element-plus' + +const searchValue = ref(); +const tableData = ref([]); +// 鍒嗛〉 +const currentPage = ref(4); +const pageSize = ref(100); +const background = ref(true); + +onMounted(() => { + getUserData(); +}); + +const getUserData =() =>{ + let list=[ + { + index: 1, + userName:'', + name:'', + state:'', + role:'', + creatTime:'', + }, + { + index: 2, + userName:'', + name:'', + state:'', + role:'', + creatTime:'', + }, + { + index: 3, + userName:'', + name:'', + state:'', + role:'', + creatTime:'', + }, + ] + tableData.value = list + +} + +const handleCurrentChange = (val: number) => { + console.log(`current page: ${val}`); +}; + +// 缂栬緫 +const update = (row) =>{ + +} +//绂佺敤 +const goDisable = (row) =>{ + ElMessageBox.confirm( + '纭畾瑕佺鐢ㄨ鐢ㄦ埛?', + 'Warning', + { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning', + } + ) + .then(() => { + console.log(row) + + }) + .catch(() => { + + }) + +} +//鍒犻櫎 +const goDelete = () =>{ + ElMessageBox.confirm( + '纭畾瑕佸垹闄よ鐢ㄦ埛?', + 'Warning', + { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning', + } + ) + .then(() => { + console.log(row) + }) + .catch(() => { + + }) +} +</script> + +<style lang="less" scoped> +.user-manage { + padding: 20px; +} +.addBox { + display: flex; + align-items: center; + color: #409eff; +} +.list{ + margin-top:20px; +} +.rover-pagination-block { + height: 60px; + display: flex; + justify-content: flex-end; + background-color: #fff; + padding: 0 10px; + box-sizing: border-box; + } +</style> -- Gitblit v1.9.1