第一次提交
This commit is contained in:
23
.gitignore
vendored
Normal file
23
.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
/dist
|
||||||
|
|
||||||
|
|
||||||
|
# local env files
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Log files
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
24
README.md
Normal file
24
README.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# api_test
|
||||||
|
|
||||||
|
## Project setup
|
||||||
|
```
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compiles and hot-reloads for development
|
||||||
|
```
|
||||||
|
npm run serve
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compiles and minifies for production
|
||||||
|
```
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Lints and fixes files
|
||||||
|
```
|
||||||
|
npm run lint
|
||||||
|
```
|
||||||
|
|
||||||
|
### Customize configuration
|
||||||
|
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||||
5
babel.config.js
Normal file
5
babel.config.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
module.exports = {
|
||||||
|
presets: [
|
||||||
|
'@vue/cli-plugin-babel/preset'
|
||||||
|
]
|
||||||
|
}
|
||||||
202
npminstall-debug.log
Normal file
202
npminstall-debug.log
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
{
|
||||||
|
root: 'C:\\Users\\lenovo\\Desktop\\接口测试\\api_test',
|
||||||
|
registry: 'https://registry.npmmirror.com',
|
||||||
|
pkgs: [
|
||||||
|
{
|
||||||
|
name: '',
|
||||||
|
version: 'element-plus/icons-vue',
|
||||||
|
type: 'git',
|
||||||
|
alias: undefined,
|
||||||
|
arg: [Result]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
production: false,
|
||||||
|
cacheStrict: false,
|
||||||
|
cacheDir: 'C:\\Users\\lenovo\\.npminstall_tarball',
|
||||||
|
env: {
|
||||||
|
npm_config_registry: 'https://registry.npmmirror.com',
|
||||||
|
npm_config_argv: '{"remain":[],"cooked":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\lenovo\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com","element-plus/icons-vue"],"original":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\lenovo\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com","element-plus/icons-vue"]}',
|
||||||
|
npm_config_user_agent: 'npminstall/7.9.0 npm/? node/v18.16.0 win32 x64',
|
||||||
|
npm_config_cache: 'C:\\Users\\lenovo\\.npminstall_tarball',
|
||||||
|
NODE: 'D:\\nodejs\\node.exe',
|
||||||
|
npm_node_execpath: 'D:\\nodejs\\node.exe',
|
||||||
|
npm_execpath: 'C:\\Users\\nvm\\v18.16.0\\node_modules\\cnpm\\node_modules\\npminstall\\bin\\install.js',
|
||||||
|
npm_config_userconfig: 'C:\\Users\\lenovo\\.cnpmrc',
|
||||||
|
npm_config_disturl: 'https://cdn.npmmirror.com/binaries/node',
|
||||||
|
npm_config_r: 'https://registry.npmmirror.com',
|
||||||
|
COREPACK_NPM_REGISTRY: 'https://registry.npmmirror.com',
|
||||||
|
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
||||||
|
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
||||||
|
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
|
||||||
|
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
|
||||||
|
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
|
||||||
|
CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip',
|
||||||
|
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
|
||||||
|
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
|
||||||
|
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
|
||||||
|
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
|
||||||
|
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
|
||||||
|
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
|
||||||
|
PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
|
||||||
|
PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
|
||||||
|
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
|
||||||
|
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
|
||||||
|
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
|
||||||
|
RE2_DOWNLOAD_SKIP_PATH: 'true',
|
||||||
|
PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma',
|
||||||
|
npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
|
||||||
|
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
|
||||||
|
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
|
||||||
|
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
|
||||||
|
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs',
|
||||||
|
npm_rootpath: 'C:\\Users\\lenovo\\Desktop\\接口测试\\api_test',
|
||||||
|
INIT_CWD: 'C:\\Users\\lenovo\\Desktop\\接口测试\\api_test'
|
||||||
|
},
|
||||||
|
binaryMirrors: {
|
||||||
|
ENVS: {
|
||||||
|
COREPACK_NPM_REGISTRY: 'https://registry.npmmirror.com',
|
||||||
|
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
||||||
|
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
||||||
|
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
|
||||||
|
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
|
||||||
|
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
|
||||||
|
CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip',
|
||||||
|
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
|
||||||
|
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
|
||||||
|
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
|
||||||
|
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
|
||||||
|
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
|
||||||
|
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
|
||||||
|
PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
|
||||||
|
PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
|
||||||
|
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
|
||||||
|
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
|
||||||
|
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
|
||||||
|
RE2_DOWNLOAD_SKIP_PATH: 'true',
|
||||||
|
PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma',
|
||||||
|
npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
|
||||||
|
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
|
||||||
|
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
|
||||||
|
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
|
||||||
|
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs'
|
||||||
|
},
|
||||||
|
'@ali/s2': { host: 'https://cdn.npmmirror.com/binaries/looksgood-s2' },
|
||||||
|
sharp: { replaceHostFiles: [Array], replaceHostMap: [Object] },
|
||||||
|
'@tensorflow/tfjs-node': {
|
||||||
|
replaceHostFiles: [Array],
|
||||||
|
replaceHostRegExpMap: [Object],
|
||||||
|
replaceHostMap: [Object]
|
||||||
|
},
|
||||||
|
cypress: {
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/cypress',
|
||||||
|
newPlatforms: [Object]
|
||||||
|
},
|
||||||
|
'utf-8-validate': {
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/utf-8-validate/v{version}'
|
||||||
|
},
|
||||||
|
xprofiler: {
|
||||||
|
remote_path: './xprofiler/v{version}/',
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries'
|
||||||
|
},
|
||||||
|
leveldown: { host: 'https://cdn.npmmirror.com/binaries/leveldown/v{version}' },
|
||||||
|
couchbase: { host: 'https://cdn.npmmirror.com/binaries/couchbase/v{version}' },
|
||||||
|
gl: { host: 'https://cdn.npmmirror.com/binaries/gl/v{version}' },
|
||||||
|
sqlite3: {
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/sqlite3',
|
||||||
|
remote_path: 'v{version}'
|
||||||
|
},
|
||||||
|
'@journeyapps/sqlcipher': { host: 'https://cdn.npmmirror.com/binaries' },
|
||||||
|
grpc: {
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries',
|
||||||
|
remote_path: '{name}/v{version}'
|
||||||
|
},
|
||||||
|
'grpc-tools': { host: 'https://cdn.npmmirror.com/binaries' },
|
||||||
|
wrtc: {
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries',
|
||||||
|
remote_path: '{name}/v{version}'
|
||||||
|
},
|
||||||
|
fsevents: { host: 'https://cdn.npmmirror.com/binaries/fsevents' },
|
||||||
|
nodejieba: { host: 'https://cdn.npmmirror.com/binaries/nodejieba' },
|
||||||
|
canvas: { host: 'https://cdn.npmmirror.com/binaries/canvas' },
|
||||||
|
'skia-canvas': { host: 'https://cdn.npmmirror.com/binaries/skia-canvas' },
|
||||||
|
'flow-bin': {
|
||||||
|
replaceHost: 'https://github.com/facebook/flow/releases/download/v',
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/flow/v'
|
||||||
|
},
|
||||||
|
'jpegtran-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/jpegtran-bin'
|
||||||
|
},
|
||||||
|
'cwebp-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/cwebp-bin'
|
||||||
|
},
|
||||||
|
'zopflipng-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/zopflipng-bin'
|
||||||
|
},
|
||||||
|
'optipng-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/optipng-bin'
|
||||||
|
},
|
||||||
|
mozjpeg: {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/mozjpeg-bin'
|
||||||
|
},
|
||||||
|
gifsicle: {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/gifsicle-bin'
|
||||||
|
},
|
||||||
|
'pngquant-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/pngquant-bin',
|
||||||
|
replaceHostMap: [Object]
|
||||||
|
},
|
||||||
|
'pngcrush-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/pngcrush-bin'
|
||||||
|
},
|
||||||
|
'jpeg-recompress-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/jpeg-recompress-bin'
|
||||||
|
},
|
||||||
|
'advpng-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/advpng-bin'
|
||||||
|
},
|
||||||
|
'pngout-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/pngout-bin'
|
||||||
|
},
|
||||||
|
'jpegoptim-bin': {
|
||||||
|
replaceHost: [Array],
|
||||||
|
host: 'https://cdn.npmmirror.com/binaries/jpegoptim-bin'
|
||||||
|
},
|
||||||
|
argon2: { host: 'https://cdn.npmmirror.com/binaries/argon2' },
|
||||||
|
'ali-zeromq': { host: 'https://cdn.npmmirror.com/binaries/ali-zeromq' },
|
||||||
|
'ali-usb_ctl': { host: 'https://cdn.npmmirror.com/binaries/ali-usb_ctl' },
|
||||||
|
'gdal-async': { host: 'https://cdn.npmmirror.com/binaries/node-gdal-async' }
|
||||||
|
},
|
||||||
|
forbiddenLicenses: null,
|
||||||
|
flatten: false,
|
||||||
|
proxy: undefined,
|
||||||
|
prune: false,
|
||||||
|
disableFallbackStore: false,
|
||||||
|
workspacesMap: Map(0) {},
|
||||||
|
enableWorkspace: false,
|
||||||
|
workspaceRoot: 'C:\\Users\\lenovo\\Desktop\\接口测试\\api_test',
|
||||||
|
isWorkspaceRoot: true,
|
||||||
|
isWorkspacePackage: false,
|
||||||
|
offline: false,
|
||||||
|
strictSSL: true,
|
||||||
|
ignoreScripts: false,
|
||||||
|
foregroundScripts: false,
|
||||||
|
ignoreOptionalDependencies: false,
|
||||||
|
detail: false,
|
||||||
|
forceLinkLatest: false,
|
||||||
|
trace: false,
|
||||||
|
engineStrict: false,
|
||||||
|
registryOnly: false,
|
||||||
|
client: false,
|
||||||
|
autoFixVersion: [Function: autoFixVersion]
|
||||||
|
}
|
||||||
50
package.json
Normal file
50
package.json
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"name": "api_test",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"serve": "vue-cli-service serve",
|
||||||
|
"build": "vue-cli-service build",
|
||||||
|
"lint": "vue-cli-service lint"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@element-plus/icons": "^0.0.11",
|
||||||
|
"@element-plus/icons-vue": "^2.1.0",
|
||||||
|
"axios": "^1.4.0",
|
||||||
|
"core-js": "^3.8.3",
|
||||||
|
"element-plus": "^1.0.2-beta.28",
|
||||||
|
"vue": "^3.2.13"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.12.16",
|
||||||
|
"@babel/eslint-parser": "^7.12.16",
|
||||||
|
"@vue/cli-plugin-babel": "~5.0.0",
|
||||||
|
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||||
|
"@vue/cli-service": "~5.0.0",
|
||||||
|
"eslint": "^7.32.0",
|
||||||
|
"eslint-plugin-vue": "^8.0.3",
|
||||||
|
"sass": "1.55.0",
|
||||||
|
"sass-loader": "13.2.0",
|
||||||
|
"vue-cli-plugin-element-plus": "~0.0.13"
|
||||||
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"root": true,
|
||||||
|
"env": {
|
||||||
|
"node": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"plugin:vue/vue3-essential",
|
||||||
|
"eslint:recommended"
|
||||||
|
],
|
||||||
|
"parserOptions": {
|
||||||
|
"parser": "@babel/eslint-parser"
|
||||||
|
},
|
||||||
|
"rules": {}
|
||||||
|
},
|
||||||
|
"browserslist": [
|
||||||
|
"> 1%",
|
||||||
|
"last 2 versions",
|
||||||
|
"not dead",
|
||||||
|
"not ie 11"
|
||||||
|
]
|
||||||
|
}
|
||||||
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
17
public/index.html
Normal file
17
public/index.html
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
|
<title>星卡系统服务监控服务平台</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>
|
||||||
|
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||||
|
</noscript>
|
||||||
|
<div id="app"></div>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
264
src/App.vue
Normal file
264
src/App.vue
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
<template>
|
||||||
|
<div class="api_test_container flex ac jc column">
|
||||||
|
<video autoplay muted loop poster="./assets/poster.png">
|
||||||
|
<source src="./assets/bg.mp4" type="video/mp4">
|
||||||
|
</video>
|
||||||
|
<div class="api_test_title_container flex column ac">
|
||||||
|
<div class="api_test_title">星卡系统服务监控服务平台</div>
|
||||||
|
<el-row>
|
||||||
|
<el-button v-if="!bombType" @click="dialogVisible = true;" class="api_test_title_buttom" type="primary" plain>{{
|
||||||
|
'开始探测' }}</el-button>
|
||||||
|
<el-button v-else @click="bomb" class="api_test_title_buttom" type="primary">{{ 'STOP' }}</el-button>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div class="api_test_table">
|
||||||
|
<el-table :row-class-name="tableRowClassName" :data="tableData" style="width: 100%">
|
||||||
|
<el-table-column min-width="180" prop="serverName" label="服务" />
|
||||||
|
<el-table-column min-width="600" prop="requestAddress" label="请求地址" />
|
||||||
|
<el-table-column min-width="180" prop="requestTime" label="访问时间/毫秒" />
|
||||||
|
<el-table-column min-width="180" prop="status" label="请求状态">
|
||||||
|
<template #default="scope">
|
||||||
|
<!-- <el-button v-if="scope.row.status=='成功'" type="success" :icon="Check" circle /> -->
|
||||||
|
<el-button :type="scope.row.status == '' ? 'warning' : scope.row.status == 'success' ? 'success' : 'danger'"
|
||||||
|
size="small">{{ scope.row.status || 'ready' }}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<el-dialog v-model="dialogVisible" show-close title="configure" width="30%">
|
||||||
|
<el-form>
|
||||||
|
<el-form-item label="isRobotization">
|
||||||
|
<el-switch v-model="isRobotization" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="interval">
|
||||||
|
<el-input-number v-model="interval" :min="0" :max="100000" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-button @click="bomb" type="success">START</el-button>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import axios from "axios";
|
||||||
|
import { ref, onMounted } from "vue";
|
||||||
|
import apiList from './static/apiList.json'
|
||||||
|
onMounted(() => {
|
||||||
|
axiosInit();
|
||||||
|
apiListInit();
|
||||||
|
})
|
||||||
|
let bombType = ref(false);
|
||||||
|
let tableData = ref([]);
|
||||||
|
let dialogVisible = ref(false);
|
||||||
|
let isRobotization = ref(false);
|
||||||
|
let interval = ref(1000);
|
||||||
|
const clear = () => {
|
||||||
|
tableData.value.forEach(item => {
|
||||||
|
item.requestTime = ''
|
||||||
|
item.status = ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const apiListInit = () => {
|
||||||
|
tableData.value = apiList
|
||||||
|
}
|
||||||
|
const axiosInit = () => {
|
||||||
|
axios.interceptors.request.use(
|
||||||
|
config => {
|
||||||
|
config.metadata = { startTime: new Date() }
|
||||||
|
return config;
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
axios.interceptors.response.use(
|
||||||
|
response => {
|
||||||
|
response.config.metadata.endTime = new Date();
|
||||||
|
response.duration = response.config.metadata.endTime - response.config.metadata.startTime;
|
||||||
|
return response;
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
const tableRowClassName = ({ row }) => {
|
||||||
|
if (row.status == '失败') {
|
||||||
|
return 'warning-row'
|
||||||
|
} else if (row.status == '成功') {
|
||||||
|
return 'success-row'
|
||||||
|
} else {
|
||||||
|
return 'xxx'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const delayed = async (index) => {
|
||||||
|
if (!bombType.value) {
|
||||||
|
clear();
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let selectIndex = index == undefined ? 0 : index;
|
||||||
|
await axios.get(tableData.value[selectIndex].requestAddress.split('http://www.xingoil.com')[1]).then(res => {
|
||||||
|
tableData.value[selectIndex].status = 'success';
|
||||||
|
tableData.value[selectIndex].requestTime = res.duration
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
tableData.value[selectIndex].status = 'fail';
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
selectIndex = selectIndex + 1;
|
||||||
|
let isStop = selectIndex + 1 <= tableData.value.length;
|
||||||
|
if (isStop) {
|
||||||
|
delayed(selectIndex)
|
||||||
|
} else {
|
||||||
|
if (isRobotization.value) {
|
||||||
|
// clear();
|
||||||
|
delayed();
|
||||||
|
} else {
|
||||||
|
bombType.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, interval.value);
|
||||||
|
}
|
||||||
|
const bomb = () => {
|
||||||
|
dialogVisible.value = false;
|
||||||
|
clear();
|
||||||
|
if (bombType.value) {
|
||||||
|
bombType.value = false;
|
||||||
|
} else {
|
||||||
|
bombType.value = true
|
||||||
|
delayed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* 表格内背景颜色 */
|
||||||
|
.el-table th {
|
||||||
|
background-color: transparent !important;
|
||||||
|
backdrop-filter: blur(14px);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table tr {
|
||||||
|
background-color: transparent !important;
|
||||||
|
backdrop-filter: blur(14px);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table {
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: #16c869 !important;
|
||||||
|
backdrop-filter: blur(14px);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xxx {
|
||||||
|
background-color: transparent !important;
|
||||||
|
backdrop-filter: blur(14px);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 去除底部白线 */
|
||||||
|
.el-table::before {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style lang="scss">
|
||||||
|
video {
|
||||||
|
position: absolute;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warning-row {
|
||||||
|
background-color: #F56C6C !important;
|
||||||
|
color: #F56C6C !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.success-row {
|
||||||
|
background-color: #f0f9eb !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table::before {
|
||||||
|
height: 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table thead {
|
||||||
|
color: #ffffff !important;
|
||||||
|
font-weight: 600 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table th.is-leaf,
|
||||||
|
.el-table td {
|
||||||
|
border-bottom: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api_test_table {
|
||||||
|
margin-top: 20px;
|
||||||
|
padding: 0 100px;
|
||||||
|
background-color: transparent;
|
||||||
|
border-radius: 20px;
|
||||||
|
backdrop-filter: blur(14px);
|
||||||
|
// border: solid 1px #b2e8c1;
|
||||||
|
box-shadow: 5px 5px 10px 0px #4ae6d9;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-button--primary.is-plain {
|
||||||
|
color: #4ae6d9 !important;
|
||||||
|
border-color: #4ae6d9 !important;
|
||||||
|
background-color: #4ae6d993 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-button--primary.is-plain:hover,
|
||||||
|
.el-button--primary.is-plain:focus {
|
||||||
|
background: #4ae6d9 !important;
|
||||||
|
border-color: #4ae6d9 !important;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api_test_title {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-size: 30px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #f0f9eb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.column {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jc {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ac {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app {
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api_test_container {
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
BIN
src/assets/bg.mp4
Normal file
BIN
src/assets/bg.mp4
Normal file
Binary file not shown.
BIN
src/assets/logo.png
Normal file
BIN
src/assets/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
BIN
src/assets/poster.png
Normal file
BIN
src/assets/poster.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 MiB |
58
src/components/HelloWorld.vue
Normal file
58
src/components/HelloWorld.vue
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<template>
|
||||||
|
<div class="hello">
|
||||||
|
<h1>{{ msg }}</h1>
|
||||||
|
<p>
|
||||||
|
For a guide and recipes on how to configure / customize this project,<br>
|
||||||
|
check out the
|
||||||
|
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||||
|
</p>
|
||||||
|
<h3>Installed CLI Plugins</h3>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||||
|
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
||||||
|
</ul>
|
||||||
|
<h3>Essential Links</h3>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||||
|
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||||
|
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||||
|
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||||
|
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||||
|
</ul>
|
||||||
|
<h3>Ecosystem</h3>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||||
|
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||||
|
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||||
|
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||||
|
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'HelloWorld',
|
||||||
|
props: {
|
||||||
|
msg: String
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||||
|
<style scoped>
|
||||||
|
h3 {
|
||||||
|
margin: 40px 0 0;
|
||||||
|
}
|
||||||
|
ul {
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
li {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 10px;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: #42b983;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
11
src/element-variables.scss
Normal file
11
src/element-variables.scss
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/*
|
||||||
|
Write your variables here. All available variables can be
|
||||||
|
found in element-plus/packages/theme-chalk/src/common/var.scss.
|
||||||
|
For example, to overwrite the theme color:
|
||||||
|
*/
|
||||||
|
$--color-primary: hotpink;
|
||||||
|
|
||||||
|
/* icon font path, required */
|
||||||
|
$--font-path: '~element-plus/lib/theme-chalk/fonts';
|
||||||
|
|
||||||
|
@import "~element-plus/packages/theme-chalk/src/index";
|
||||||
11
src/main.js
Normal file
11
src/main.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import { createApp } from 'vue'
|
||||||
|
import App from './App.vue'
|
||||||
|
import installElementPlus from './plugins/element'
|
||||||
|
// 如果您正在使用CDN引入,请删除下面一行。
|
||||||
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||||||
|
const app = createApp(App)
|
||||||
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||||||
|
app.component(key, component)
|
||||||
|
}
|
||||||
|
installElementPlus(app)
|
||||||
|
app.mount('#app')
|
||||||
7
src/plugins/element.js
Normal file
7
src/plugins/element.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import ElementPlus from 'element-plus'
|
||||||
|
import '../element-variables.scss'
|
||||||
|
import locale from 'element-plus/lib/locale/lang/zh-cn'
|
||||||
|
|
||||||
|
export default (app) => {
|
||||||
|
app.use(ElementPlus, { locale })
|
||||||
|
}
|
||||||
74
src/static/apiList.json
Normal file
74
src/static/apiList.json
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"serverName": "用户服务",
|
||||||
|
"requestAddress": "http://www.xingoil.com/adminapi/oil-user/exploringActivity/success",
|
||||||
|
"requestTime": "",
|
||||||
|
"status": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serverName": "油站服务",
|
||||||
|
"requestAddress": "http://www.xingoil.com/adminapi/oil-site/exploringActivity/success",
|
||||||
|
"requestTime": "",
|
||||||
|
"status": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serverName": "open-api",
|
||||||
|
"requestAddress": "http://www.xingoil.com/openapi/oil-open-api/exploringActivity/success",
|
||||||
|
"requestTime": "",
|
||||||
|
"status": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serverName": "字典服务",
|
||||||
|
"requestAddress": "http://www.xingoil.com/adminapi/oil-electric-energy/exploringActivity/success",
|
||||||
|
"requestTime": "",
|
||||||
|
"status": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serverName": "权限服务",
|
||||||
|
"requestAddress": "http://www.xingoil.com/adminapi/oil-identity/exploringActivity/success",
|
||||||
|
"requestTime": "",
|
||||||
|
"status": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serverName": "日志服务",
|
||||||
|
"requestAddress": "http://www.xingoil.com/adminapi/oil-mongo-log/exploringActivity/success",
|
||||||
|
"requestTime": "",
|
||||||
|
"status": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serverName": "oss服务",
|
||||||
|
"requestAddress": "http://www.xingoil.com/adminapi/oil-oss/exploringActivity/success",
|
||||||
|
"requestTime": "",
|
||||||
|
"status": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serverName": "三方支付服务",
|
||||||
|
"requestAddress": "http://www.xingoil.com/adminapi/oil-pay/exploringActivity/success",
|
||||||
|
"requestTime": "",
|
||||||
|
"status": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serverName": "油批服务",
|
||||||
|
"requestAddress": "http://www.xingoil.com/adminapi/oil-refinery/exploringActivity/success",
|
||||||
|
"requestTime": "",
|
||||||
|
"status": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serverName": "短信服务",
|
||||||
|
"requestAddress": "http://www.xingoil.com/adminapi/oil-sms/exploringActivity/success",
|
||||||
|
"requestTime": "",
|
||||||
|
"status": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serverName": "task服务",
|
||||||
|
"requestAddress": "http://www.xingoil.com/adminapi/oil-task/exploringActivity/success",
|
||||||
|
"requestTime": "",
|
||||||
|
"status": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serverName": "官网服务",
|
||||||
|
"requestAddress": "http://www.xingoil.com/api/oil-website/exploringActivity/success",
|
||||||
|
"requestTime": "",
|
||||||
|
"status": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
8
vue.config.js
Normal file
8
vue.config.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
const { defineConfig } = require('@vue/cli-service')
|
||||||
|
module.exports = defineConfig({
|
||||||
|
transpileDependencies: true,
|
||||||
|
publicPath: '/monitor',
|
||||||
|
devServer: {
|
||||||
|
proxy: 'http://uat.xingoil.com'
|
||||||
|
}
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user