feat:terminal 支持上传下载 (70%)

This commit is contained in:
zhangyu
2022-11-18 00:18:59 +08:00
parent 392297c1ab
commit e34e2d7cfe
16 changed files with 787 additions and 89 deletions

View File

@@ -1401,7 +1401,7 @@
}, },
"@mapbox/geojson-rewind": { "@mapbox/geojson-rewind": {
"version": "0.5.2", "version": "0.5.2",
"resolved": "https://registry.npmmirror.com/@mapbox/geojson-rewind/-/geojson-rewind-0.5.2.tgz", "resolved": "https://registry.npmjs.org/@mapbox/geojson-rewind/-/geojson-rewind-0.5.2.tgz",
"integrity": "sha512-tJaT+RbYGJYStt7wI3cq4Nl4SXxG8W7JDG5DMJu97V25RnbNg3QtQtf+KD+VLjNpWKYsRvXDNmNrBgEETr1ifA==", "integrity": "sha512-tJaT+RbYGJYStt7wI3cq4Nl4SXxG8W7JDG5DMJu97V25RnbNg3QtQtf+KD+VLjNpWKYsRvXDNmNrBgEETr1ifA==",
"requires": { "requires": {
"get-stream": "^6.0.1", "get-stream": "^6.0.1",
@@ -1410,24 +1410,24 @@
"dependencies": { "dependencies": {
"get-stream": { "get-stream": {
"version": "6.0.1", "version": "6.0.1",
"resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-6.0.1.tgz", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
"integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="
}, },
"minimist": { "minimist": {
"version": "1.2.6", "version": "1.2.6",
"resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.6.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
} }
} }
}, },
"@mapbox/jsonlint-lines-primitives": { "@mapbox/jsonlint-lines-primitives": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmmirror.com/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz", "resolved": "https://registry.npmjs.org/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz",
"integrity": "sha512-rY0o9A5ECsTQRVhv7tL/OyDpGAoUB4tTvLiW1DSzQGq4bvTPhNw1VpSNjDJc5GFZ2XuyOtSWSVN05qOtcD71qQ==" "integrity": "sha512-rY0o9A5ECsTQRVhv7tL/OyDpGAoUB4tTvLiW1DSzQGq4bvTPhNw1VpSNjDJc5GFZ2XuyOtSWSVN05qOtcD71qQ=="
}, },
"@mapbox/mapbox-gl-supported": { "@mapbox/mapbox-gl-supported": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmmirror.com/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-2.0.1.tgz", "resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-2.0.1.tgz",
"integrity": "sha512-HP6XvfNIzfoMVfyGjBckjiAOQK9WfX0ywdLubuPMPv+Vqf5fj0uCbgBQYpiqcWZT6cbyyRnTSXDheT1ugvF6UQ==" "integrity": "sha512-HP6XvfNIzfoMVfyGjBckjiAOQK9WfX0ywdLubuPMPv+Vqf5fj0uCbgBQYpiqcWZT6cbyyRnTSXDheT1ugvF6UQ=="
}, },
"@mapbox/node-pre-gyp": { "@mapbox/node-pre-gyp": {
@@ -1604,22 +1604,22 @@
}, },
"@mapbox/point-geometry": { "@mapbox/point-geometry": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmmirror.com/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz",
"integrity": "sha512-6j56HdLTwWGO0fJPlrZtdU/B13q8Uwmo18Ck2GnGgN9PCFyKTZ3UbXeEdRFh18i9XQ92eH2VdtpJHpBD3aripQ==" "integrity": "sha512-6j56HdLTwWGO0fJPlrZtdU/B13q8Uwmo18Ck2GnGgN9PCFyKTZ3UbXeEdRFh18i9XQ92eH2VdtpJHpBD3aripQ=="
}, },
"@mapbox/tiny-sdf": { "@mapbox/tiny-sdf": {
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://registry.npmmirror.com/@mapbox/tiny-sdf/-/tiny-sdf-2.0.5.tgz", "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-2.0.5.tgz",
"integrity": "sha512-OhXt2lS//WpLdkqrzo/KwB7SRD8AiNTFFzuo9n14IBupzIMa67yGItcK7I2W9D8Ghpa4T04Sw9FWsKCJG50Bxw==" "integrity": "sha512-OhXt2lS//WpLdkqrzo/KwB7SRD8AiNTFFzuo9n14IBupzIMa67yGItcK7I2W9D8Ghpa4T04Sw9FWsKCJG50Bxw=="
}, },
"@mapbox/unitbezier": { "@mapbox/unitbezier": {
"version": "0.0.1", "version": "0.0.1",
"resolved": "https://registry.npmmirror.com/@mapbox/unitbezier/-/unitbezier-0.0.1.tgz", "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.1.tgz",
"integrity": "sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw==" "integrity": "sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw=="
}, },
"@mapbox/vector-tile": { "@mapbox/vector-tile": {
"version": "1.3.1", "version": "1.3.1",
"resolved": "https://registry.npmmirror.com/@mapbox/vector-tile/-/vector-tile-1.3.1.tgz", "resolved": "https://registry.npmjs.org/@mapbox/vector-tile/-/vector-tile-1.3.1.tgz",
"integrity": "sha512-MCEddb8u44/xfQ3oD+Srl/tNcQoqTw3goGk2oLsrFxOTc3dUp+kAnby3PvAeeBYSMSjSPD1nd1AJA6W49WnoUw==", "integrity": "sha512-MCEddb8u44/xfQ3oD+Srl/tNcQoqTw3goGk2oLsrFxOTc3dUp+kAnby3PvAeeBYSMSjSPD1nd1AJA6W49WnoUw==",
"requires": { "requires": {
"@mapbox/point-geometry": "~0.1.0" "@mapbox/point-geometry": "~0.1.0"
@@ -1627,7 +1627,7 @@
}, },
"@mapbox/whoots-js": { "@mapbox/whoots-js": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmmirror.com/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz", "resolved": "https://registry.npmjs.org/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz",
"integrity": "sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q==" "integrity": "sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q=="
}, },
"@riophae/vue-treeselect": { "@riophae/vue-treeselect": {
@@ -1745,7 +1745,7 @@
}, },
"@types/geojson": { "@types/geojson": {
"version": "7946.0.10", "version": "7946.0.10",
"resolved": "https://registry.npmmirror.com/@types/geojson/-/geojson-7946.0.10.tgz", "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.10.tgz",
"integrity": "sha512-Nmh0K3iWQJzniTuPRcJn5hxXkfB1T1pgB89SBig5PlJQU5yocazeu4jATJlaA0GYFKWMqDdvYemoSnF2pXgLVA==" "integrity": "sha512-Nmh0K3iWQJzniTuPRcJn5hxXkfB1T1pgB89SBig5PlJQU5yocazeu4jATJlaA0GYFKWMqDdvYemoSnF2pXgLVA=="
}, },
"@types/istanbul-lib-coverage": { "@types/istanbul-lib-coverage": {
@@ -1781,12 +1781,12 @@
}, },
"@types/mapbox__point-geometry": { "@types/mapbox__point-geometry": {
"version": "0.1.2", "version": "0.1.2",
"resolved": "https://registry.npmmirror.com/@types/mapbox__point-geometry/-/mapbox__point-geometry-0.1.2.tgz", "resolved": "https://registry.npmjs.org/@types/mapbox__point-geometry/-/mapbox__point-geometry-0.1.2.tgz",
"integrity": "sha512-D0lgCq+3VWV85ey1MZVkE8ZveyuvW5VAfuahVTQRpXFQTxw03SuIf1/K4UQ87MMIXVKzpFjXFiFMZzLj2kU+iA==" "integrity": "sha512-D0lgCq+3VWV85ey1MZVkE8ZveyuvW5VAfuahVTQRpXFQTxw03SuIf1/K4UQ87MMIXVKzpFjXFiFMZzLj2kU+iA=="
}, },
"@types/mapbox__vector-tile": { "@types/mapbox__vector-tile": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmmirror.com/@types/mapbox__vector-tile/-/mapbox__vector-tile-1.3.0.tgz", "resolved": "https://registry.npmjs.org/@types/mapbox__vector-tile/-/mapbox__vector-tile-1.3.0.tgz",
"integrity": "sha512-kDwVreQO5V4c8yAxzZVQLE5tyWF+IPToAanloQaSnwfXmIcJ7cyOrv8z4Ft4y7PsLYmhWXmON8MBV8RX0Rgr8g==", "integrity": "sha512-kDwVreQO5V4c8yAxzZVQLE5tyWF+IPToAanloQaSnwfXmIcJ7cyOrv8z4Ft4y7PsLYmhWXmON8MBV8RX0Rgr8g==",
"requires": { "requires": {
"@types/geojson": "*", "@types/geojson": "*",
@@ -1796,7 +1796,7 @@
}, },
"@types/pbf": { "@types/pbf": {
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmmirror.com/@types/pbf/-/pbf-3.0.2.tgz", "resolved": "https://registry.npmjs.org/@types/pbf/-/pbf-3.0.2.tgz",
"integrity": "sha512-EDrLIPaPXOZqDjrkzxxbX7UlJSeQVgah3i0aA4pOSzmK9zq3BIh7/MZIQxED7slJByvKM4Gc6Hypyu2lJzh3SQ==" "integrity": "sha512-EDrLIPaPXOZqDjrkzxxbX7UlJSeQVgah3i0aA4pOSzmK9zq3BIh7/MZIQxED7slJByvKM4Gc6Hypyu2lJzh3SQ=="
}, },
"@types/q": { "@types/q": {
@@ -4333,7 +4333,7 @@
}, },
"clipboard": { "clipboard": {
"version": "2.0.11", "version": "2.0.11",
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz", "resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz",
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==", "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
"requires": { "requires": {
"good-listener": "^1.2.2", "good-listener": "^1.2.2",
@@ -5281,7 +5281,7 @@
}, },
"csscolorparser": { "csscolorparser": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmmirror.com/csscolorparser/-/csscolorparser-1.0.3.tgz", "resolved": "https://registry.npmjs.org/csscolorparser/-/csscolorparser-1.0.3.tgz",
"integrity": "sha512-umPSgYwZkdFoUrH5hIq5kf0wPSXiro51nPw0j2K/c83KflkPSTBGMz6NJvMB+07VlL0y7VPo6QJcDjcgKTTm3w==" "integrity": "sha512-umPSgYwZkdFoUrH5hIq5kf0wPSXiro51nPw0j2K/c83KflkPSTBGMz6NJvMB+07VlL0y7VPo6QJcDjcgKTTm3w=="
}, },
"cssesc": { "cssesc": {
@@ -6512,7 +6512,7 @@
}, },
"delegate": { "delegate": {
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", "resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
}, },
"delegates": { "delegates": {
@@ -6753,7 +6753,7 @@
}, },
"earcut": { "earcut": {
"version": "2.2.4", "version": "2.2.4",
"resolved": "https://registry.npmmirror.com/earcut/-/earcut-2.2.4.tgz", "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz",
"integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==" "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ=="
}, },
"easings-css": { "easings-css": {
@@ -8654,7 +8654,7 @@
}, },
"geojson-vt": { "geojson-vt": {
"version": "3.2.1", "version": "3.2.1",
"resolved": "https://registry.npmmirror.com/geojson-vt/-/geojson-vt-3.2.1.tgz", "resolved": "https://registry.npmjs.org/geojson-vt/-/geojson-vt-3.2.1.tgz",
"integrity": "sha512-EvGQQi/zPrDA6zr6BnJD/YhwAkBP8nnJ9emh3EnHQKVMfg/MRVtPbMYdgVy/IaEmn4UfagD2a6fafPDL5hbtwg==" "integrity": "sha512-EvGQQi/zPrDA6zr6BnJD/YhwAkBP8nnJ9emh3EnHQKVMfg/MRVtPbMYdgVy/IaEmn4UfagD2a6fafPDL5hbtwg=="
}, },
"get-caller-file": { "get-caller-file": {
@@ -8706,7 +8706,7 @@
}, },
"gl-matrix": { "gl-matrix": {
"version": "3.4.3", "version": "3.4.3",
"resolved": "https://registry.npmmirror.com/gl-matrix/-/gl-matrix-3.4.3.tgz", "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.3.tgz",
"integrity": "sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA==" "integrity": "sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA=="
}, },
"glob": { "glob": {
@@ -8851,7 +8851,7 @@
}, },
"good-listener": { "good-listener": {
"version": "1.2.2", "version": "1.2.2",
"resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", "resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==", "integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
"requires": { "requires": {
"delegate": "^3.1.2" "delegate": "^3.1.2"
@@ -11365,7 +11365,7 @@
}, },
"kdbush": { "kdbush": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/kdbush/-/kdbush-3.0.0.tgz", "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-3.0.0.tgz",
"integrity": "sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew==" "integrity": "sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew=="
}, },
"keyv": { "keyv": {
@@ -11723,7 +11723,7 @@
}, },
"maplibre-gl": { "maplibre-gl": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmmirror.com/maplibre-gl/-/maplibre-gl-2.2.0.tgz", "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-2.2.0.tgz",
"integrity": "sha512-5LB7ROIxvBADPa4PmU2j+mp0jG5IIbEidCOyZEXVbEriluMJn0hz28vszVb4Cr2IA4YQ9cnERqjHaf33MHIRBQ==", "integrity": "sha512-5LB7ROIxvBADPa4PmU2j+mp0jG5IIbEidCOyZEXVbEriluMJn0hz28vszVb4Cr2IA4YQ9cnERqjHaf33MHIRBQ==",
"requires": { "requires": {
"@mapbox/geojson-rewind": "^0.5.2", "@mapbox/geojson-rewind": "^0.5.2",
@@ -12274,7 +12274,7 @@
}, },
"murmurhash-js": { "murmurhash-js": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmmirror.com/murmurhash-js/-/murmurhash-js-1.0.0.tgz", "resolved": "https://registry.npmjs.org/murmurhash-js/-/murmurhash-js-1.0.0.tgz",
"integrity": "sha512-TvmkNhkv8yct0SVBSy+o8wYzXjE4Zz3PCesbfs8HiCXXdcTuocApFv11UWlNFWKYsP2okqrhb7JNlSm9InBhIw==" "integrity": "sha512-TvmkNhkv8yct0SVBSy+o8wYzXjE4Zz3PCesbfs8HiCXXdcTuocApFv11UWlNFWKYsP2okqrhb7JNlSm9InBhIw=="
}, },
"mv": { "mv": {
@@ -13230,7 +13230,7 @@
}, },
"pbf": { "pbf": {
"version": "3.2.1", "version": "3.2.1",
"resolved": "https://registry.npmmirror.com/pbf/-/pbf-3.2.1.tgz", "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz",
"integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==",
"requires": { "requires": {
"ieee754": "^1.1.12", "ieee754": "^1.1.12",
@@ -15670,7 +15670,7 @@
}, },
"potpack": { "potpack": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmmirror.com/potpack/-/potpack-1.0.2.tgz", "resolved": "https://registry.npmjs.org/potpack/-/potpack-1.0.2.tgz",
"integrity": "sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ==" "integrity": "sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ=="
}, },
"preload": { "preload": {
@@ -15819,7 +15819,7 @@
}, },
"protocol-buffers-schema": { "protocol-buffers-schema": {
"version": "3.6.0", "version": "3.6.0",
"resolved": "https://registry.npmmirror.com/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz",
"integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==" "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw=="
}, },
"proxy-addr": { "proxy-addr": {
@@ -15941,7 +15941,7 @@
}, },
"quickselect": { "quickselect": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmmirror.com/quickselect/-/quickselect-2.0.0.tgz", "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz",
"integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw=="
}, },
"quill": { "quill": {
@@ -16436,7 +16436,7 @@
}, },
"resolve-protobuf-schema": { "resolve-protobuf-schema": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz", "resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz",
"integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==", "integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==",
"requires": { "requires": {
"protocol-buffers-schema": "^3.3.1" "protocol-buffers-schema": "^3.3.1"
@@ -16927,7 +16927,7 @@
}, },
"select": { "select": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", "resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz",
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
}, },
"select-hose": { "select-hose": {
@@ -17974,7 +17974,7 @@
}, },
"supercluster": { "supercluster": {
"version": "7.1.5", "version": "7.1.5",
"resolved": "https://registry.npmmirror.com/supercluster/-/supercluster-7.1.5.tgz", "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-7.1.5.tgz",
"integrity": "sha512-EulshI3pGUM66o6ZdH3ReiFcvHpM3vAigyK+vcxdjpJyEbIIrtbmBdY23mGgnI24uXiGFvrGq9Gkum/8U7vJWg==", "integrity": "sha512-EulshI3pGUM66o6ZdH3ReiFcvHpM3vAigyK+vcxdjpJyEbIIrtbmBdY23mGgnI24uXiGFvrGq9Gkum/8U7vJWg==",
"requires": { "requires": {
"kdbush": "^3.0.0" "kdbush": "^3.0.0"
@@ -18446,7 +18446,7 @@
}, },
"tiny-emitter": { "tiny-emitter": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", "resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
}, },
"tinycolor2": { "tinycolor2": {
@@ -18456,13 +18456,13 @@
}, },
"tinyqueue": { "tinyqueue": {
"version": "2.0.3", "version": "2.0.3",
"resolved": "https://registry.npmmirror.com/tinyqueue/-/tinyqueue-2.0.3.tgz", "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-2.0.3.tgz",
"integrity": "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA==" "integrity": "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA=="
}, },
"tmp": { "tmp": {
"version": "0.0.29", "version": "0.0.29",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.29.tgz", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.29.tgz",
"integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", "integrity": "sha512-89PTqMWGDva+GqClOqBV9s3SMh7MA3Mq0pJUdAoHuF65YoE7O0LermaZkVfT5/Ngfo18H4eYiyG7zKOtnEbxsw==",
"dev": true, "dev": true,
"requires": { "requires": {
"os-tmpdir": "~1.0.1" "os-tmpdir": "~1.0.1"
@@ -19139,7 +19139,7 @@
}, },
"vt-pbf": { "vt-pbf": {
"version": "3.1.3", "version": "3.1.3",
"resolved": "https://registry.npmmirror.com/vt-pbf/-/vt-pbf-3.1.3.tgz", "resolved": "https://registry.npmjs.org/vt-pbf/-/vt-pbf-3.1.3.tgz",
"integrity": "sha512-2LzDFzt0mZKZ9IpVF2r69G9bXaP2Q2sArJCmcCgvfTdCCZzSyz4aCLoQyUilu37Ll56tCblIZrXFIjNUpGIlmA==", "integrity": "sha512-2LzDFzt0mZKZ9IpVF2r69G9bXaP2Q2sArJCmcCgvfTdCCZzSyz4aCLoQyUilu37Ll56tCblIZrXFIjNUpGIlmA==",
"requires": { "requires": {
"@mapbox/point-geometry": "0.1.0", "@mapbox/point-geometry": "0.1.0",
@@ -19154,7 +19154,7 @@
}, },
"vue-clipboard2": { "vue-clipboard2": {
"version": "0.3.3", "version": "0.3.3",
"resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz", "resolved": "https://registry.npmmirror.com/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz",
"integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==", "integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==",
"requires": { "requires": {
"clipboard": "^2.0.0" "clipboard": "^2.0.0"

View File

@@ -126,7 +126,21 @@
background: #000 !important; background: #000 !important;
left: -2px; left: -2px;
} }
.right-tip {
position: absolute;
left: 9px;
top: -8px;
padding: 0 6px;
line-height: 15px;
height: 15px;
background-color: #ba3939;
opacity: .9;
border-radius: 7px;
color: white;
font-size: 6px;
}
} }
.shell-service-max { .shell-service-max {
height: 100%; height: 100%;
position: fixed !important; position: fixed !important;
@@ -275,4 +289,5 @@ div.sp-header{
.custom-footer { .custom-footer {
box-shadow: none; box-shadow: none;
} }
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -5,6 +5,55 @@
"css_prefix_text": "nz-icon-", "css_prefix_text": "nz-icon-",
"description": "", "description": "",
"glyphs": [ "glyphs": [
{
"icon_id": "32660007",
"name": "Folder ",
"font_class": "Folder",
"unicode": "e7ad",
"unicode_decimal": 59309
},
{
"icon_id": "32660008",
"name": "File",
"font_class": "File",
"unicode": "e7ae",
"unicode_decimal": 59310
},
{
"icon_id": "32659266",
"name": "file transfer",
"font_class": "a-filetransfer",
"unicode": "e7a7",
"unicode_decimal": 59303
},
{
"icon_id": "32659269",
"name": "reconnect",
"font_class": "reconnect",
"unicode": "e7a8",
"unicode_decimal": 59304
},
{
"icon_id": "32659270",
"name": "upper level",
"font_class": "a-upperlevel",
"unicode": "e7a9",
"unicode_decimal": 59305
},
{
"icon_id": "32659271",
"name": "new folder",
"font_class": "a-newfolder",
"unicode": "e7aa",
"unicode_decimal": 59306
},
{
"icon_id": "32659272",
"name": "SFTP",
"font_class": "SFTP",
"unicode": "e7ab",
"unicode_decimal": 59307
},
{ {
"icon_id": "586976", "icon_id": "586976",
"name": "map-sankey", "name": "map-sankey",

File diff suppressed because one or more lines are too long

View File

@@ -8,15 +8,18 @@
</style> </style>
<template> <template>
<div :id="'ternimalContainer'+idIndex" class="console"> <div :id="'ternimalContainer'+idIndex" class="console">
<div style="display: flex;width: 100%; justify-content: space-between"> <div style="display: flex;width: 100%; justify-content: space-between;background: #101010;box-shadow: 0 1px 0 0 #303030;">
<span style="color: #fff">{{userName}}</span> <span style="color: #fff">
<div class="active-icon green-bg"></div>
{{userName}}
</span>
<span style="color: #fff"> <span style="color: #fff">
<i class="nz-icon nz-icon-clock"></i> <i class="nz-icon nz-icon-reconnect" style="margin-right: 22px"></i>
<i class="nz-icon nz-icon-projectTopology" @click="fileDirectoryShow = !fileDirectoryShow"></i> <i class="nz-icon nz-icon-SFTP" style="margin-right: 22px" @click="fileDirectoryShow = !fileDirectoryShow"></i>
</span> </span>
</div> </div>
<div :id="'terminal'+idIndex" ></div> <div :id="'terminal'+idIndex" ></div>
<fileDirectory :uuid="terminal.uuid" v-if="fileDirectoryShow" style="height: 80%;position: absolute;bottom: 0;background: #1E1E1E;box-shadow: 5px 0 3px 0 #5E5E5E;width: 100%"/> <fileDirectory :uuid="terminal.uuid" v-if="fileDirectoryShow" @close="fileDirectoryShow=false" style=""/>
</div> </div>
</template> </template>
<script> <script>
@@ -189,7 +192,9 @@ export default {
authPinTip: this.$loadsh.get(this.terminal, 'custom.authPinTip', '') authPinTip: this.$loadsh.get(this.terminal, 'custom.authPinTip', '')
} }
this.$post('/terminal/login', params).then(res => { this.$post('/terminal/login', params).then(res => {
// this.terminal.uuid = res.data.uuid this.terminal.uuid = res.data.uuid
this.userName = res.data.authUsername + '@' + res.data.host
this.host = res.data.host
this.create() this.create()
}) })
}, },

View File

@@ -1,44 +1,220 @@
<template> <template>
<div> <div class="fileDirectory">
<div style="display: flex;width: 100%; justify-content: space-between"> <div class="file-directory-header">
<span>Sftp {{fileDirectory}}</span> <span style="color: #fff">SFTP <span style="color: #B7B7B7">{{fileDirectory}}</span></span>
<span style="color: #fff"> <span style="color: #fff">
<i class="nz-icon nz-icon-clock"></i> <i class="nz-icon nz-icon-a-newfolder" @click="newFolderBoxShow = true"></i>
<i class="nz-icon nz-icon-projectTopology"></i> <i class="nz-icon nz-icon-upload" @click="uploadFile"></i>
<i class="nz-icon nz-icon-close" @click="$emit('close')"></i>
</span> </span>
</div> </div>
<div class="file-directory-content"> <div class="file-directory-content">
<div v-for="(item,index) in fileList" :key="index"> <div v-if="fileDirectory !== '/'" @click="backFileDirectory" class="file-item"><i class="nz-icon nz-icon-a-upperlevel"/>上一级</div>
<i class="nz-icon" :class="selIcon(item.name)"/> <div v-for="(item,index) in fileList" :key="index" class="file-item" @click="selectFile(item)">
{{item.name}} <span>
<i class="nz-icon" :class="selIcon(item)"/>
{{item.name}}
</span>
<span>
<i class="nz-icon nz-icon-download1" v-if="!item.isDir" @click="downloadFile(item)"></i>
<i class="nz-icon nz-icon-delete" v-if="!item.isDir" @click="delFile(item)"></i>
</span>
</div> </div>
</div> </div>
<el-dialog
title='新建文件夹'
:visible.sync="newFolderBoxShow"
:modal-append-to-body="false"
:append-to-body="false"
width="30%"
>
<div>
<el-input v-model="folder" size="small"/>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="newFolder(false)"> </el-button>
<el-button type="primary" @click="newFolder(true)"> </el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'fileDirectory', name: 'fileDirectory',
props: {
uuid: {}
},
data () { data () {
return { return {
fileDirectory: '/', fileDirectory: '/',
fileList: [] fileList: [],
newFolderBoxShow: false,
folder: ''
} }
}, },
mounted () {
this.init()
},
methods: { methods: {
selIcon (name) { init () {
const hz = name.split('.')[1] this.getSftpPath(this.fileDirectory)
switch (hz) { },
case 'txt' : selectFile (item) {
return 'nz-icon-txt' if (item.isDir) {
default: const path = this.fileDirectory == '/' ? '' : this.fileDirectory
return 'nz-icon-txt' this.getSftpPath(path + '/' + item.name)
} }
},
newFolder (flag) {
if (!flag) {
this.newFolderBoxShow = false
this.folder = ''
return
}
const path = this.fileDirectory == '/' ? '' : this.fileDirectory
const params = {
uuid: this.uuid,
path: path + '/' + this.folder
}
this.$post('/terminal/sftp/mkdir', params).then(res => {
console.log(res)
this.newFolderBoxShow = false
this.getSftpPath(this.fileDirectory)
})
},
backFileDirectory () {
const arr = this.fileDirectory.split('/')
arr.pop()
console.log(arr, this.fileDirectory.split('/').pop())
const path = arr.join('/')
console.log(path)
this.getSftpPath(path || '/')
},
getSftpPath (path) {
const params = {
uuid: this.uuid,
path: path
}
this.$post('/terminal/sftp/ls', params).then(res => {
this.fileDirectory = res.data.path
this.fileList = res.data.list
console.log(res)
})
},
uploadFile () {
const params = {
uuid: this.uuid,
path: this.fileDirectory,
myId: 'upload' + this.uuid + new Date().getTime(),
type: 'upload',
isStart: false,
isFinish: false,
importFileList: [],
total: '',
speed: '',
fileLength: '',
startTime: '',
cancel: '',
axios: ''
}
this.$store.dispatch('uploadFile', params)
},
downloadFile (item) {
const path = this.fileDirectory == '/' ? '' : this.fileDirectory
const params = {
...item,
uuid: this.uuid,
path: path + '/' + item.name,
myId: 'download' + this.uuid + new Date().getTime(),
type: 'download',
isStart: false,
isFinish: false,
total: '',
speed: '',
fileLength: '',
startTime: '',
cancel: '',
axios: ''
}
this.$store.dispatch('dispatchAddFileList', params)
},
delFile (item) {
const params = {
uuid: this.uuid,
path: this.fileDirectory + '/' + item.name
}
this.$post('/terminal/sftp/rm', params).then(res => {
if (res.code == 200) {
this.getSftpPath(this.fileDirectory)
} else {
this.$message.error(res.msg)
}
})
},
selIcon (item) {
// console.log(item)
const hz = item.name.split('.')[1]
if (item.isDir) {
return 'nz-icon-Folder colorFA901C'
}
if (item.isReg) {
return 'nz-icon-File'
}
return 'nz-icon-File'
} }
} }
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.fileDirectory {
height: 80%;
position: absolute;
bottom: 0;
background: #1E1E1E;
box-shadow: 5px 0 3px 0 #5E5E5E;
width: 100%;
z-index: 10;
/deep/ .el-menu::-webkit-scrollbar-thumb {
background-color: #fff;
border-radius: 3px;
}
/deep/ .el-menu::-webkit-scrollbar-thumb:hover {
background-color: #fff;
border-radius: 3px;
}
.file-directory-header{
display: flex;
width: 100%;
justify-content: space-between;
padding: 0 10px;
background: #1E1E1E;
box-sizing: border-box;
color: #ffffff;
i {
margin-right: 22px;
}
}
.file-directory-content{
height: calc(100% - 26px);
overflow: auto;
}
.file-item{
font-family: Roboto-Regular;
font-size: 14px;
color: #B7B7B7;
line-height: 21px;
font-weight: 400;
margin-top: 8px;
}
.file-item:hover{
background: rgba(255,134,0,0.50);
font-family: Roboto-Regular;
font-size: 14px;
color: #FF9230;
line-height: 21px;
font-weight: 400;
}
}
</style> </style>

View File

@@ -0,0 +1,341 @@
<template>
<div>
<!-- 显示进度-->
<div class="file-state-panel" v-show="fileStateBox" :style="{'top': position.top + 'px', right: '10px'}">
<div class="file-state-panel-header">
<span class="file-state-panel-title">File transfers</span>
<i class="nz-icon nz-icon-delete"></i>
</div>
<div class="file-state-panel-content" v-if="fileList.length">
<div v-for="item in fileList" :key="item.myId" class="file-state-panel-item">
<div class="item-icon"> <i class="nz-icon" :class="{'nz-icon-upload':item.type === 'upload','nz-icon-download1':item.type === 'download'}"/></div>
<div class="item-progress">
<div class="item-progress-top text-ellipsis">{{item.name}}</div>
<div class="item-progress-middle">
<el-progress :show-text="false" :percentage="(item.fileLength/item.total) * 100" :color="customColorMethod"></el-progress>
</div>
<div class="item-progress-bottom">
<span>{{bytes(item.total, 0, 0)}}</span>
<span>{{item.speed}}</span>
</div>
</div>
<div class="item-state">
<i v-if="item.isFinish" class="nz-icon nz-icon-check" @click="removeRecord(item)"/>
<i v-else class="nz-icon nz-icon-close" @click="removeRecord(item)"/>
</div>
</div>
</div>
<div v-else class="file-nodata">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div class="table-no-data__title">No results found</div>
</div>
</div>
<!-- 上传文件-->
<div style="display: none">
<el-upload
:ref="'upload'"
:auto-upload="false"
:on-change="importChange"
:multiple="false"
:file-list="importFileList"
action=""
class="upload-demo"
drag>
</el-upload>
</div>
</div>
</template>
<script>
import axios from 'axios'
import chartDataFormat from '@/components/chart/chartDataFormat'
export default {
name: 'fileListState',
computed: {
fileList () {
return this.$store.getters.getFileList
},
uploadItem () {
return this.$store.getters.getUploadItem
}
},
data () {
return {
myFileList: [],
importFileList: [],
position: {
top: 10,
right: 0
},
fileStateBox: false
}
},
watch: {
fileList: {
immediate: true,
handler (n) {
n.forEach(item => {
console.log(item.isStart)
if (!item.isStart) {
item.total = 1
item.fileLength = 0
item.startTime = new Date().getTime()
item.speed = '0b/s'
if (item.type === 'download') {
item.isStart = true
this.download(item)
}
if (item.type === 'upload') {
item.isStart = true
this.upload(item)
}
}
})
}
},
uploadItem: {
handler (n) {
if (n && n.myId) {
console.log(this.$refs.upload)
this.$refs.upload.$children[0].$refs.input.click()
}
}
}
},
methods: {
bytes: chartDataFormat.getUnit(7).compute,
customColorMethod (percentage) {
if (percentage < 100) {
return '#3B92F1'
} else {
return '#21BF9A'
}
},
download (item) {
const self = this
const CancelToken = axios.CancelToken
item.cancel = CancelToken.source()
item.startTime = new Date().getTime()
const params = {
uuid: item.uuid,
path: item.path
}
axios.post('/terminal/sftp/download', {
...params
}, {
responseType: 'blob',
cancelToken: item.cancel.token,
onDownloadProgress: function (progressEvent) {
// 处理原生进度事件
item.total = progressEvent.total
item.fileLength = progressEvent.loaded
item.speed = item.fileLength / ((new Date().getTime() - item.startTime) / 1000)
item.speed = self.bytes(item.speed, 0 , 0) + '/s'
// this.$set(this.fileList, 0,item)
}
}).then(res => {
item.isFinish = true
if (window.navigator.msSaveOrOpenBlob) {
// 兼容ie11
const blobObject = new Blob([res.data])
window.navigator.msSaveOrOpenBlob(blobObject, item.name)
} else {
const url = URL.createObjectURL(new Blob([res.data]))
const a = document.createElement('a')
document.body.appendChild(a) // 此处增加了将创建的添加到body当中
a.href = url
a.download = item.name
a.target = '_blank'
a.click()
a.remove() // 将a标签移除
}
}, error => {
const $self = this
const reader = new FileReader()
reader.onload = function (event) {
const responseText = reader.result
const exception = JSON.parse(responseText)
if (exception.message) {
$self.$message.error(exception.message)
} else {
console.error(error)
}
}
reader.readAsText(error.response.data)
})
},
importChange (file, fileList) {
if (fileList.length > 0) {
this.uploadItem.importFileList = [fileList[fileList.length - 1]]
}
if (this.uploadItem.importFileList.length) {
this.$store.dispatch('dispatchAddFileList', this.uploadItem)
}
},
removeRecord (item) {
if (!item.isFinish) {
item.cancel.cancel('operation canceled by the user.')
}
this.$store.dispatch('dispatchDelFileList', item)
},
upload (item) {
const self = this
const CancelToken = axios.CancelToken
item.cancel = CancelToken.source()
const form = new FormData()
const importFile = item.importFileList[0]
item.name = importFile.name
form.append('file', importFile.raw)
form.append('uuid', item.uuid)
form.append('path', item.path)
axios({
url: '/terminal/sftp/upload',
method: 'PUT',
headers: { 'Content-Type': 'multipart/form-data' },
data: form,
cancelToken: item.cancel.token,
onUploadProgress: function (progressEvent) {
// 处理原生进度事件
item.total = progressEvent.total
item.fileLength = progressEvent.loaded
item.speed = item.fileLength / ((new Date().getTime() - item.startTime) / 1000)
item.speed = self.bytes(item.speed, 0, 0) + '/s'
}
}).then(response => {
console.log(response)
item.isFinish = true
if (response.code == 200) {
this.$message.success(response.msg)
// todo 上传成功后 刷新对应terminal
} else {
this.$message.error(response.msg)
}
})
},
fileStateShow (flag, type) {
this.fileStateBox = flag
if (flag) {
// if (type === 'top') {
// this.position = {
// top: '',
// right: ''
// }
// } else {
// this.position = {
// top: '',
// right: ''
// }
// }
}
}
}
}
</script>
<style scoped lang="scss">
.file-state-panel{
position: absolute;
z-index: 10;
right:0;
top:-100px;
max-height: 194px;
min-width: 96px;
width: 308px;
background: #222329;
box-shadow: 1px 1px 4px -1px #1E1E1E;
border-radius: 2px;
/deep/ .file-state-panel-content::-webkit-scrollbar-thumb {
background-color: #fff;
border-radius: 3px;
}
/deep/ .file-state-panel-content::-webkit-scrollbar-thumb:hover {
background-color: #fff;
border-radius: 3px;
}
.file-state-panel-header{
height: 48px;
background: #222329;
box-shadow: 0 1px 0 0 #19191C;
padding: 0 20px;
line-height: 48px;
}
.file-state-panel-title{
font-size: 14px;
color: #E7EAED;
letter-spacing: 0;
font-weight: 500;
}
.file-state-panel-content {
min-height: 50px;
max-height: 146px;
line-height: 48px;
width: 100%;
overflow-y: auto;
.file-state-panel-item{
height: 48px;
width: 100%;
box-sizing: border-box;
padding: 12px 14px 0px 20px;
display: flex;
justify-content: space-around;
.item-icon{
width: 28px;
height: 28px;
background: #19191C;
border-radius: 2px;
color: #fff;
display: flex;
justify-items: center;
justify-content: center;
align-items: center;
flex-shrink:0;
}
.item-progress{
width: calc(100% - 86px);
flex: 1;
margin: 0 10px;
display: flex;
flex-direction: column;
.item-progress-top{
width: 100%;
color: #fff;
height: 15px;
line-height: 15px;
font-size: 12px;
font-weight: 400;
}
.item-progress-middle{
}
.item-progress-bottom{
display: flex;
justify-content: space-between;
font-size: 10px;
color: #B7B7B7;
line-height: 12px;
font-weight: 400;
}
}
.item-state{
flex-shrink:0;
width: 28px;
height: 28px;
color: #fff;
line-height: 28px;
}
}
}
.file-nodata{
text-align: center;
color: #b7b7b7;
padding-top: 20px;
padding-bottom: 15px;
.table-no-data__title{
text-align: center;
color: #b7b7b7;
}
}
}
</style>

View File

@@ -59,13 +59,17 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div class="console-icon"> <div class="console-icon">
<div class="console-title-icon" style='right: 106px;display: inline;' @click="showFileState">
<i class="nz-icon nz-icon-a-filetransfer" :title="$t('guide.webTerminal')"></i>
<span v-show="fileList.length>0" class="right-tip">{{fileList.length<=99?fileList.length:'99+'}}</span>
</div>
<i @click="minScreen" class="nz-icon nz-icon-minus console-title-icon" style='right: 76px;' :title="$t('overall.shrink')"></i> <i @click="minScreen" class="nz-icon nz-icon-minus console-title-icon" style='right: 76px;' :title="$t('overall.shrink')"></i>
<i @click="fullScreen" class="el-icon-full-screen console-title-icon" style='right: 46px;' v-if="!isFullScreen" :title="$t('dashboard.screen')"></i> <i @click="fullScreen" class="el-icon-full-screen console-title-icon" style='right: 46px;' v-if="!isFullScreen" :title="$t('dashboard.screen')"></i>
<i @click="exitFullScreen" class="nz-icon nz-icon-exit-full-screen console-title-icon" style='right: 46px;' v-else :title="$t('dashboard.screen.exit')"></i> <i @click="exitFullScreen" class="nz-icon nz-icon-exit-full-screen console-title-icon" style='right: 46px;' v-else :title="$t('dashboard.screen.exit')"></i>
<i @click="closeConsole" class="nz-icon nz-icon-close console-title-icon" style='right: 16px;' :title="$t('overall.close')"></i> <i @click="closeConsole" class="nz-icon nz-icon-close console-title-icon" style='right: 16px;' :title="$t('overall.close')"></i>
</div> </div>
</div> </div>
<fileListState v-clickoutside="hideFileState" ref="fileListState"/>
<div > <div >
<el-dialog :modal-append-to-body='false' :show-close="true" :title="uploadBox.title" :visible.sync="uploadBox.showUpload" @close="closeDialog" class="nz-dialog" width="500px" > <el-dialog :modal-append-to-body='false' :show-close="true" :title="uploadBox.title" :visible.sync="uploadBox.showUpload" @close="closeDialog" class="nz-dialog" width="500px" >
<div > <div >
@@ -255,16 +259,21 @@
<script> <script>
import Console from './console' import Console from './console'
import fileListState from './fileListState'
import uuidv1 from 'uuid/v1' import uuidv1 from 'uuid/v1'
import axios from 'axios' import axios from 'axios'
import { host, port } from '@/components/common/js/validate' import { host, port } from '@/components/common/js/validate'
export default { export default {
name: 'webSSH', name: 'webSSH',
components: { components: {
'my-console': Console 'my-console': Console,
fileListState
}, },
computed: { computed: {
language () { return this.$store.getters.getLanguage } language () { return this.$store.getters.getLanguage },
fileList () {
return this.$store.getters.getFileList
},
}, },
data () { data () {
const termFontSize = parseInt(localStorage.getItem('termFontSize')) const termFontSize = parseInt(localStorage.getItem('termFontSize'))
@@ -969,6 +978,14 @@ export default {
authProtocolPort: '', authProtocolPort: '',
authProtocol: 1 authProtocol: 1
} }
},
showFileState () {
let type = 'top'
console.log( this.$refs.fileListState)
this.$refs.fileListState.fileStateShow(true, type)
},
hideFileState () {
this.$refs.fileListState.fileStateShow(false)
} }
}, },
watch: { watch: {

View File

@@ -17,14 +17,16 @@ const removePending = (config) => {
} }
axios.interceptors.request.use( axios.interceptors.request.use(
config => { config => {
const source = CancelToken.source() // 申明CancelToken,也可new CancelToken.source()实例一个 if (!config.cancelToken) {
config.cancelToken = source.token // 将实例对象的token赋予该请求 const source = CancelToken.source() // 申明CancelToken,也可new CancelToken.source()实例一个
const id = getUUID() // 添加唯一识别id 在请求完成时清除requestsArr config.cancelToken = source.token // 将实例对象的token赋予该请求
config.id = id const id = getUUID() // 添加唯一识别id 在请求完成时清除requestsArr
requestsArr.push({ config.id = id
id, requestsArr.push({
cancel: source.cancel id,
}) // 将该实例添加到队列中 cancel: source.cancel
}) // 将该实例添加到队列中
}
const token = localStorage.getItem('nz-token') const token = localStorage.getItem('nz-token')
if (token) { if (token) {
config.headers.Authorization = token // 请求头token config.headers.Authorization = token // 请求头token

View File

@@ -2,13 +2,15 @@ import Vue from 'vue'
import Vuex from 'vuex' import Vuex from 'vuex'
import user from './user' import user from './user'
import panel from './panel' import panel from './panel'
import terminalFile from './terminalFile'
// import topology from './topology' // import topology from './topology'
Vue.use(Vuex) Vue.use(Vuex)
const store = new Vuex.Store({ const store = new Vuex.Store({
modules: { modules: {
user, user,
panel panel,
terminalFile
}, },
state: { state: {
/* 监听对象变化,用于顶部菜单与底部内容的同步 */ /* 监听对象变化,用于顶部菜单与底部内容的同步 */

View File

@@ -0,0 +1,44 @@
const terminalFile = {
state: {
fileList: [],
uploadItem: {}
},
mutations: {
setFileList (state, arr) {
state.fileList = arr
},
addFileList (state, item) {
console.log(item)
state.fileList.push(item)
},
delFileList (state, item) {
state.fileList = state.fileList.filter(file => file.myId !== item.myId)
},
setUploadItem (state, item) {
state.uploadItem = item
}
},
getters: {
getFileList (state) {
return state.fileList
},
getUploadItem (state) {
return state.uploadItem
}
},
actions: {
dispatchFileList (store, arr) {
store.commit('setFileList', arr)
},
dispatchAddFileList (store, item) {
store.commit('addFileList', item)
},
dispatchDelFileList (store, item) {
store.commit('delFileList', item)
},
uploadFile (store, item) {
store.commit('setUploadItem', item)
}
}
}
export default terminalFile