Commit 34aaa244 authored by 黎博's avatar 黎博

修改整体布局,新增顶部标签

parent cfee4b27
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>QA测试平台</title><link rel="shortcut icon" href=/QA.png><link href=/static/css/app.16753b9f8d96e83ccd15ff314ce8180a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.090b07b418bb795587ca.js></script><script type=text/javascript src=/static/js/app.f0f25f64f6f5d27ba96f.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>QA测试平台</title><link rel="shortcut icon" href=/QA.png><link href=/static/css/app.32f7b082ccc73f3df2e422449b4c1d95.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.909444d096fe38757b25.js></script><script type=text/javascript src=/static/js/app.0bb873840083e050a2c7.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"version":3,"sources":["webpack:///webpack/bootstrap c1fb8a9d5902d4e591d6"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,IAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.2ae2e69a05c33dfc65f8.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap c1fb8a9d5902d4e591d6"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap 81f9862f6676ead0c327"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,IAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.2ae2e69a05c33dfc65f8.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 81f9862f6676ead0c327"],"sourceRoot":""}
\ No newline at end of file
......@@ -15379,6 +15379,11 @@
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
"dev": true
},
"vuex": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
"integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw=="
},
"w3c-hr-time": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz",
......
......@@ -20,7 +20,8 @@
"less": "^3.11.1",
"vue": "^2.5.2",
"vue-json-editor": "^1.4.3",
"vue-router": "^3.0.1"
"vue-router": "^3.0.1",
"vuex": "^3.6.2"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
......
......@@ -7,6 +7,7 @@ import router from './router'
import echarts from 'echarts'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import store from './store/store'
import {
Container,
Header,
......@@ -84,6 +85,7 @@ Vue.use(Radio)
new Vue({
el: '#app',
router,
store,
components: { App },
template: '<App/>'
})
import Vue from 'vue'
import Router from 'vue-router'
import Index from '../views/Index/Index'
import Login from '../views/Login/Login'
import Index from '../views/index/Index'
// import Login from '../views/login/Login'
import Main from '../views/Main'
import Home from '../views/Home'
import XyqbGenLoanData from '../views/Xyqb/GenLoanData'
import XyqbGetLoanData from '../views/Xyqb/GetLoanData'
import VccGetData from '../views/Vcc/GetData'
import VccGenData from '../views/Vcc/GenData'
import VccCheckData from '../views/Vcc/CheckData'
import Mock from '../views/Mock/Mock'
// import Home from '../views/Home'
import Home from '../views/layout/Home'
import XyqbGenLoanData from '../views/xyqb/GenLoanData'
import XyqbGetLoanData from '../views/xyqb/GetLoanData'
import VccGetData from '../views/vcc/GetData'
import VccGenData from '../views/vcc/GenData'
import VccCheckData from '../views/vcc/CheckData'
import Mock from '../views/mock/Mock'
import kdspDecrypt from '../views/effect/KdspDecrypt'
import JenkinsBuildInfo from '../views/effect/JenkinsBuildInfo'
import LoginWhiteList from '../views/effect/LoginWhiteList'
......@@ -27,12 +28,13 @@ const router = new Router({
'path': '/index',
component: Index
},
{
'path': '/login',
component: Login
},
// {
// 'path': '/login',
// component: Login
// },
{
'path': '/home',
'redirect': '/main',
component: Home,
children: [
{
......
const state = {
nav: [], // 左侧导航栏数据
isCollapse: false, // 是否收缩左侧导航栏 false为展开 true为收缩
asideTitle: [
{
title: '主页',
path: '/main',
activeIndex: 0
}
], // 存储点击左侧导航栏后的导航名,作为标题显示头
crumbs: [
'测试平台', '主页'
], // 存储面包屑
activeIndex: 0, // 当前活跃的标题下标
count: 0 // 下标增值变量
}
const getters = {
CollapseState: state => {
return state.isCollapse
},
AsideTitle: state => {
return state.asideTitle
},
active: state => {
return state.activeIndex
},
Count: state => {
return state.count
},
Crumbs: state => {
return state.crumbs
},
Navs: state => {
return state.nav
}
}
const mutations = {
setCollapse(state, payload) {
state.isCollapse = payload
},
setAside(state, values) {
state.asideTitle.push(values)
},
delOrAddAside(state, value) {
state.asideTitle = value
},
setActiveIndex(state, value) {
state.activeIndex = value
},
setCount(state, value) {
state.count = value
},
setCrumbs(state, crumbs) {
state.crumbs = crumbs
},
setNav(state, values) {
state.nav = values
}
}
const actions = {
setNavs(context, nav) {
context.commit('setNav', nav)
}
}
export default {
namespaced: true,
state,
getters,
mutations,
actions
}
import Vue from 'vue'
import Vuex from 'vuex'
import header from './modules/header'
Vue.use(Vuex)
export default new Vuex.Store({
modules: {
header
}
})
<template>
<div>
<!-- 头部导航栏 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<!-- <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item>Mock</el-breadcrumb-item>
<el-breadcrumb-item>Mock列表</el-breadcrumb-item>
</el-breadcrumb>
</el-breadcrumb> -->
<el-card>
<div class="filter">
......
<template>
<div>
<!-- 头部导航栏 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<!-- <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item>消费分期</el-breadcrumb-item>
<el-breadcrumb-item>查询单个数据</el-breadcrumb-item>
</el-breadcrumb>
</el-breadcrumb> -->
<el-card>
<div class="filter">
......@@ -73,6 +73,7 @@ export default {
if (this.queryInfo.phoneNo.length !== 11) {
return this.$message.error('手机号长度不对!')
}
this.queryInfo.namespace = window.sessionStorage.getItem('env')
queryUserData(this.queryInfo).then((resp) => {
if (resp.data.code === 500) {
return this.$message.error(resp.data.data)
......
<template>
<div>
<!-- 面包屑导航栏 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<!-- <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item>消费分期</el-breadcrumb-item>
<el-breadcrumb-item>生成新数据</el-breadcrumb-item>
</el-breadcrumb>
</el-breadcrumb> -->
<!-- 卡片区域 -->
<el-card>
......@@ -101,6 +101,7 @@ export default {
}
}
var formData = new FormData()
this.genDataParams.namespace = window.sessionStorage.getItem('env')
formData.set('namespace', this.genDataParams.namespace)
formData.set('phoneNo', this.genDataParams.phoneNo)
formData.set('channel', this.genDataParams.channel)
......
<template>
<div>
<!-- 头部导航栏 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<!-- <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item>消费分期</el-breadcrumb-item>
<el-breadcrumb-item>获取特定数据</el-breadcrumb-item>
</el-breadcrumb>
</el-breadcrumb> -->
<el-card>
<div class="filter">
......@@ -111,6 +111,7 @@ export default {
},
// 查询vcc数据
searchVccData() {
this.queryInfo.namespace = window.sessionStorage.getItem('env')
this.queryInfo.pageNum = 1
this.queryInfo.pageSize = 10
this.getVccData()
......
<template>
<div>
<!-- 头部导航栏 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<!-- <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item>现金分期</el-breadcrumb-item>
<el-breadcrumb-item>生成新数据</el-breadcrumb-item>
</el-breadcrumb>
</el-breadcrumb> -->
<!-- 卡片视图 -->
<el-card>
<div class="filter">
......
<template>
<div>
<!-- 头部导航栏 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<!-- <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item>现金分期</el-breadcrumb-item>
<el-breadcrumb-item>已有数据查询</el-breadcrumb-item>
</el-breadcrumb>
</el-breadcrumb> -->
<!-- 卡片视图 -->
<el-card>
......
<template>
<div>
<!-- 头部导航栏 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<!-- <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item>小工具</el-breadcrumb-item>
<el-breadcrumb-item>构建记录</el-breadcrumb-item>
</el-breadcrumb>
</el-breadcrumb> -->
<el-card>
<div class="filter">
<!-- job下拉框 -->
......
<template>
<div>
<!-- 头部导航栏 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<!-- <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item>小工具</el-breadcrumb-item>
<el-breadcrumb-item>kdsp解密</el-breadcrumb-item>
</el-breadcrumb>
</el-breadcrumb> -->
<el-card>
<p>请输入待解密的数据:</p>
......
<template>
<div>
<!-- 头部导航栏 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<!-- <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item>小工具</el-breadcrumb-item>
<el-breadcrumb-item>登录白名单</el-breadcrumb-item>
</el-breadcrumb>
</el-breadcrumb> -->
<el-card>
<div class="addWhiteList">
......@@ -73,6 +73,7 @@ export default {
methods: {
// 添加登录白名单
addToWhiteList() {
this.whiteListParam.namespace = window.sessionStorage.getItem('env')
if (this.whiteListParam.key === '') {
return this.$message.error('设备或手机号不能为空!')
}
......@@ -89,6 +90,7 @@ export default {
},
// 获取登录信息列表
getLoginInfoList() {
this.loginInfoQueryParam.namespace = window.sessionStorage.getItem('env')
getLoginInfoList(this.loginInfoQueryParam).then((resp) => {
this.loginInfoList = resp.data.data.list
this.totalNum = resp.data.data.total
......
<template>
<el-container class="body">
<el-aside width="230px">
<Aside></Aside>
</el-aside>
<el-container class="main">
<el-header>
<Header></Header>
</el-header>
<el-main>
<AsideTitle></AsideTitle>
<!--页面的展示-->
<transition
name="compAnimate"
appear
>
<keep-alive>
<router-view :style="{marginTop: '55px'}"></router-view>
</keep-alive>
</transition>
</el-main>
</el-container>
</el-container>
</template>
<script>
import Aside from './leftAside/Aside'
import Header from './rightMain/Header'
import AsideTitle from './rightMain/AsideTitle'
import Crumbs from './rightMain/Crumbs'
import { mapGetters } from 'vuex'
export default {
name: 'Home',
computed: {
...mapGetters({
getCollapseState: 'header/CollapseState',
getNavs: 'header/Navs',
getAsideTitle: 'header/AsideTitle',
getCount: 'header/Count'
})
},
watch: {
$route: function (to) {
this.createTabs(to.path)
}
},
methods: {
/**
* 动态添加标题标签函数
* path:当前点击左侧导航的path
* 1.首先会处理welcome(首页)页,welcome页已在vuex中初始化了,所以,当用户再次点击时,直接定位到首页即可
* 2.如果不是首页,则会通过当前导航的path去和左侧导航数据比对,如果path相等存入vuex asideTitle
* 3.如果vuex的asideTitle已有数据,再次点击时,只定位,不新增
* 注意:vuex中的count(标题标签的增值变量,可以保证每次添加的标题标签不重复,作用于后面的标题标签定位),count每次进来都需要自增,保证唯一,默认为0
* vuex中的asideTitle格式:
* {
title: '主控制台', // title name
path: '/welcome', //title the path
activeIndex: 0 //default value
}
*
* */
createTabs(path) {
if (path !== '/main') {
let asideItem = {}
// 得到当前点击的左侧导航的名字,存入vuex的header/asideTitle中
let nav = this.getNavs.nav
for (let i = 0; i < nav.length; i++) {
const parentTitle = nav[i].title
// 判断是否存在子导航,如果存在则取子导航的名字,如果没有,则取当前的导航名字
if (nav[i].child) {
for (let j = 0; j < nav[i].child.length; j++) {
if (nav[i].child[j].path === path) {
const childTitle = nav[i].child[j].title
// 判断vuex中是否已经存在当前标题,如果存在则不处理,否则添加入vuex中
let result = this.getAsideTitle.filter((item) => {
return item.title === nav[i].child[j].title
})
if (result.length === 0) {
// 添加标题标签
let count = this.getCount
count++
this.$store.commit('header/setCount', count)
asideItem.title = nav[i].child[j].title
asideItem.path = nav[i].child[j].path
asideItem.activeIndex = count
this.$store.commit('header/setAside', asideItem)
this.$store.commit('header/setActiveIndex', count)
this.setCrumbs(parentTitle, childTitle)
return
} else {
// 定位到当前标题标签
if (nav[i].child[j].path === path) {
let result = this.getAsideTitle.filter((item) => {
return item.title === nav[i].child[j].title
})
this.$store.commit(
'header/setActiveIndex',
result[0].activeIndex
)
this.setCrumbs(parentTitle, childTitle)
}
}
}
}
} else {
if (nav[i].path === path) {
// 判断vuex中是否已经存在当前标题,如果存在则不处理,否则添加入vuex中
let result = this.getAsideTitle.filter((item) => {
return item.title === nav[i].title
})
const childTitle = nav[i].title
// 添加标题标签
if (result.length === 0) {
let count = this.getCount
count++
this.$store.commit('header/setCount', count)
asideItem.title = nav[i].title
asideItem.path = nav[i].path
asideItem.activeIndex = count
this.$store.commit('header/setAside', asideItem)
this.$store.commit('header/setActiveIndex', count)
this.setCrumbs(childTitle, '')
return
} else {
// 定位到当前标题标签
if (nav[i].path === path) {
let result = this.getAsideTitle.filter((item) => {
return item.title === nav[i].title
})
this.$store.commit(
'header/setActiveIndex',
result[0].activeIndex
)
this.setCrumbs(childTitle, '')
}
}
}
}
}
} else {
this.$store.commit('header/setActiveIndex', 0)
this.setCrumbs('测试平台', '主页')
}
},
setCrumbs(pt, ct) {
let crumbs = []
crumbs.push(pt, ct)
this.$store.commit('header/setCrumbs', crumbs)
}
},
components: {
Aside,
Header,
AsideTitle,
Crumbs
}
}
</script>
<style lang="less" scoped>
.body {
height: 100%;
}
.main {
height: 100%;
}
.el-aside {
background-color: #525e7d;
height: 100%;
}
.el-header {
padding: 0;
}
/*组件过渡动画*/
.compAnimate-enter {
opacity: 0;
transform: translateY(-60px);
}
.compAnimate-leave-to {
opacity: 0;
}
.compAnimate-enter-active {
transition: all 0.8s ease-in-out;
}
.compAnimate-leave-active {
transition: all 0.2s ease;
}
</style>
<template>
<div style="height: 100%">
<div class="head">
<img src="../../../assets/image/logo.png" alt />
<span>量测试平台</span>
</div>
<!-- <div
class="menu-toggle"
@click="toggle_collapse"
>|||</div> -->
<!-- 左侧菜单栏 -->
<el-menu :collapse="getCollapseState" :collapse-transition="false" background-color="#525E7D" text-color="#fff" active-text-color="#ffd04b" router :default-active="activePath">
<!-- 一级菜单:w -->
<el-submenu :index="item.id + ''" v-for="item in nav" :key="item.id">
<template slot="title">
<i :class="item.icon"></i>
<span>{{ item.title }}</span>
</template>
<!-- 二级菜单 -->
<el-menu-item :index="subItem.path" v-for="subItem in item.child" :key="subItem.path" @click="saveNavState(subItem.path)">
<template slot="title">
<i :class="subItem.icon"></i>
<span>{{ subItem.title }}</span>
</template>
</el-menu-item>
</el-submenu>
</el-menu>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import menu from './menu.json'
export default {
name: 'Aside',
data() {
return {
nav: [], // 左侧导航数据数组
defaultOpen: ['0'],
// 激活的菜单
activePath: ''
}
},
methods: {
getNav() {
this.nav = menu.menu
this.$store.dispatch('header/setNavs', {
nav: this.nav
})
},
toggle_collapse() {
if (this.getCollapseState === false) {
this.$store.commit('header/setCollapse', true)
} else {
this.$store.commit('header/setCollapse', false)
}
},
// 保存链接的激活状态
saveNavState(activePath) {
this.activePath = activePath
window.sessionStorage.setItem('activePath', activePath)
}
},
computed: {
activeNav() {
// 当前激活的导航
return this.$route.path
},
...mapGetters({
getCollapseState: 'header/CollapseState'
})
},
created() {
this.getNav()
}
}
</script>
<style lang="less" scoped>
.head {
width: 230px;
line-height: 60px;
text-align: center;
display: flex;
> img {
height: 34px;
width: 70px;
margin: 16px 0px 0px 10px;
}
> span {
font-size: 22px;
color: #3F9EFF;
margin-left: 15px;
}
}
.el-menu {
border-right: none;
}
.menu-toggle {
background-color: rgb(44, 46, 46);
font-size: 10px;
line-height: 20px;
color: beige;
text-align: center;
letter-spacing: 0.2em;
}
</style>
{
"menu": [
{
"id": 1,
"icon": "el-icon-money",
"title": "现金分期",
"child": [
{
"id": 1,
"title": "现金捞",
"icon": "el-icon-watermelon",
"path": "/xyqb/getLoanData"
},
{
"id": 2,
"title": "现金造",
"icon": "el-icon-cherry",
"path": "/xyqb/genLoanData"
}
]
},
{
"id": 2,
"icon": "el-icon-s-shop",
"title": "消费分期",
"child": [
{
"id": 1,
"title": "消金查",
"icon": "el-icon-pear",
"path": "/vcc/checkData"
},
{
"id": 2,
"title": "消金捞",
"icon": "el-icon-grape",
"path": "/vcc/getData"
},
{
"id": 3,
"title": "消金造",
"icon": "el-icon-apple",
"path": "/vcc/genData"
}
]
},
{
"id": 3,
"title": "Mock",
"icon": "el-icon-s-marketing",
"child": [
{
"id": 1,
"title": "mock",
"icon": "el-icon-pear",
"path": "/mock/list"
}
]
},
{
"id": 4,
"title": "小工具",
"icon": "el-icon-s-opportunity",
"child": [
{
"id": 1,
"title": "kdsp解密",
"icon": "el-icon-bicycle",
"path": "/effect/kdsp/decrypt"
},
{
"id": 2,
"title": "构建记录",
"icon": "el-icon-wallet",
"path": "/effect/jenkins/build"
},
{
"id": 3,
"title": "登录白名单",
"icon": "el-icon-coffee",
"path": "/effect/whitelist"
}
]
}
]
}
\ No newline at end of file
<template>
<div class="titleNavBox">
<el-tag
v-for="(item, index) in getAsideTitle"
:key="index"
ref="tag"
:active-index="item.activeIndex"
:class="{title: true, active: (active === item.activeIndex)?true:false, marginR: (index != getAsideTitle.length - 1)}"
@click="toUrl(item.path, item.activeIndex)"
@close="closeTag(item.title, item.activeIndex)"
:closable="(item.title == '主页')? false : true"
>
{{item.title}}
</el-tag>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
name: 'AsideTitle',
data() {
return {
navWidth: '', // 标题导航条宽度
pageWidth: '', // 页面宽度
isShow: false,
mouseR: false, // 是否渲染鼠标右键事件
clientX: '',
clientY: ''
}
},
computed: {
...mapGetters({
getAsideTitle: 'header/AsideTitle',
active: 'header/active',
getCollapseState: 'header/CollapseState',
getCrumbs: 'header/Crumbs',
getNavs: 'header/Navs'
})
},
methods: {
/*
* 点击导航标题,跳转到对应的导航页面
* path: 当前标题的导航路径
* index:当前标题标签的活跃下标
* */
toUrl(path, index) {
// 跳转路由
// this.$store.commit('header/setActiveIndex', index)
this.$router.push({
path: path
})
// 匹配到左侧导航数据,存入vuex/header/crumbs
let parentTitle
let childTitle
const nav = this.getNavs.nav
for (let i = 0; i < nav.length; i++) {
parentTitle = nav[i].title
if (nav[i].child) {
for (let j = 0; j < nav[i].child.length; j++) {
if (nav[i].child[j].path === path) {
childTitle = nav[i].child[j].title
// crumbs.push({
// parentTitle: parentTitle,
// childTitle: childTitle
// })
this.setCrumbs(parentTitle, childTitle)
// this.$store.commit('header/setCrumbs', crumbs)
return
}
}
} else {
parentTitle = nav[i].title
this.setCrumbs(parentTitle, childTitle)
return
}
}
},
setCrumbs(pt, ct) {
let crumbs = []
crumbs.push(pt, ct)
this.$store.commit('header/setCrumbs', crumbs)
},
/*
* 删除当前标题函数
* title: 当前被删除的标题标签
* index: 当前被删除的标题标签的下标
* */
closeTag(title, index) {
/*
*1.判断当前被删除标题标签下标是否是正则活跃的下标,如果是则
* 判断当前被删除的标题标签右侧是否有标题标签,如果有,
* 删除当前标题标签后,下一个被活跃的标题为其右侧的标题标签,否则,为其左侧的标题标签
* 否则,直接删除即可
* */
if (index === this.active) {
for (let i = 0; i < this.getAsideTitle.length; i++) {
if (this.getAsideTitle[i].activeIndex === index) {
// 判断下一个活跃的标题标签
let nextIndex =
this.getAsideTitle[i + 1] || this.getAsideTitle[i - 1]
this.$store.commit('header/setActiveIndex', nextIndex.activeIndex)
// 跳转到路径
const activePath = nextIndex.path
this.$router.push({
path: activePath
})
}
}
}
/*
* 得到除了当前被删除的标题标签外的所有标题标签
* */
let result = this.getAsideTitle.filter((item) => {
return item.title !== title
})
this.$store.commit('header/delOrAddAside', result)
},
/*
* 左侧滚动
* */
toLeft() {
this.$nextTick(function () {
this.move('left')
})
},
/*
* 右侧滚动
* */
toRight() {
this.$nextTick(function () {
this.move('right')
})
},
/*
* 是否显示左右滚动按钮 当标题导航宽度大于(当前页面宽度 - 左侧导航栏宽度)时显示左右滚动按钮,否则隐藏
* */
showBtn() {
this.$nextTick(function () {
// 页面长度----页面宽度-左侧导航栏
if (this.getCollapseState === false) {
this.pageWidth = document.documentElement.clientWidth - 200
} else {
this.pageWidth = document.documentElement.clientWidth - 64
}
// 标题导航宽度
// this.navWidth = this.$el.querySelector('.titleNav').scrollWidth
// 如果标题导航超出页面宽度 则显示方向键 否则隐藏
if (this.navWidth >= this.pageWidth) {
this.isShow = true
// this.$el.querySelector('.titleNav').style.right = '20px'
} else {
this.isShow = false
}
})
},
/*
* 移动函数,移动距离为当前可滚动距离的三分之一
* */
move(direction) {
if (direction === 'left') {
let num = 0
num += (this.navWidth - this.pageWidth + 40) / 3
this.$el.querySelector('.titleNav').scrollLeft -= num
} else {
let num = 0
num += (this.navWidth - this.pageWidth + 40) / 3
this.$el.querySelector('.titleNav').scrollLeft += num
}
},
/*
* 鼠标右键事件,阻止浏览器默认的右键事件,弹出关闭标题标签的选项
* */
mouseRight(event) {
// 渲染右键功能
this.mouseR = true
// 获得当前鼠标点击右键的X, y轴坐标 传递给子组件做初始化位置
this.clientX = event.clientX
this.clientY = event.clientY
},
// 关闭右键功能
closeRightF(state) {
this.mouseR = state
}
},
mounted() {
/**
* 监听页面是否执行刷新,如果刷新则把当前的标题标签存入vuex中,供刷新后重新渲染
* */
let _this = this
window.addEventListener('beforeunload', (e) => {
sessionStorage.setItem(
'titleItem',
JSON.stringify({
titleItem: _this.getAsideTitle,
activeIndex: _this.active,
crumbs: _this.getCrumbs
})
)
})
/*
* 监听窗口的变化,如果条件符合,显示左右方向滚动按钮
* */
window.addEventListener('resize', function () {
_this.showBtn()
})
/*
* 监听整个页面的点击事件,如果mouseR(标题导航打开右键功能时)关闭这个功能
* */
window.addEventListener('click', function () {
_this.mouseR = false
})
},
updated() {
this.showBtn()
},
created() {
this.showBtn()
// 读取刷新前存储在session域中的数据,然后存入vuex中
let loadBeforeRes = JSON.parse(sessionStorage.getItem('titleItem'))
if (loadBeforeRes !== null) {
if (
loadBeforeRes.titleItem !== null &&
(loadBeforeRes.activeIndex !== null || loadBeforeRes.activeIndex !== '')
) {
this.$store.commit('header/delOrAddAside', loadBeforeRes.titleItem)
// 过滤出session缓存数据中activeIndex最大值,并赋值给最新的增值下标变量(header/count)
const maxResult = this.getAsideTitle.reduce((pre, las) =>
pre.id > las.id ? pre : las
)
this.$store.commit('header/setActiveIndex', loadBeforeRes.activeIndex)
// 设置增值变量为缓存的最大值,防止增值变量从0开始自增
this.$store.commit('header/setCount', maxResult.activeIndex)
this.$store.commit('header/setCrumbs', loadBeforeRes.crumbs)
}
}
}
}
</script>
<style lang="less" scoped>
.title {
position: relative;
cursor: pointer;
background-color: #d9d9d9;
color: #4d4d4d;
border: 0px;
padding-left: 20px;
font-size: 14px;
box-shadow: 1px 1px 1px 1px #999999;
}
.active:before {
content: ' ';
width: 8px;
height: 8px;
background-color: #00cc00;
/*opacity: 0.5;*/
border-radius: 5px;
z-index: 1000;
position: absolute;
top: 50%;
left: 5px;
transform: translateY(-50%);
}
.active {
background-color: #2954a3;
color: #ffffff;
}
.marginR {
margin-right: 6px;
}
[leftIcon],
[rightIcon] {
position: absolute;
cursor: pointer;
height: 42px;
line-height: 42px;
margin-top: -5px;
z-index: 500;
}
[leftIcon] {
left: 0;
top: 6px;
box-shadow: 2px 0 5px 0 #bfbfbf;
}
[rightIcon] {
right: 0;
top: 6px;
box-shadow: 0 2px 5px 0 #bfbfbf;
}
.titleNavBox {
position: absolute;
height: 42px;
width: 100%;
z-index: 200;
// box-shadow: 0 1px 3px 0 #595959;
}
</style>
<template>
<el-breadcrumb
separator-class="el-icon-arrow-right"
class="crumbs"
crumbs
>
<transition-group
name="list"
tag="span"
>
<template v-for="item in crumbs">
<el-breadcrumb-item
v-if="item != ''"
class="list"
:key="String(item)"
>{{item}}</el-breadcrumb-item>
</template>
</transition-group>
</el-breadcrumb>
</template>
<script>
export default {
name: 'Crumbs',
props: {
crumbs: Array
}
}
</script>
<style lang="less" scoped>
.crumbs[crumbs] {
left: 50px;
width: 400px;
max-width: 500px;
height: 60px;
line-height: 60px;
text-align: left;
margin-left: 10px;
}
.list-enter,
.list-leave-to {
/*transform: translateX(30px);*/
opacity: 0;
}
.list-enter-active {
transition: all 1s ease;
}
.el-breadcrumb /deep/ .el-breadcrumb__inner {
color: #fff;
}
</style>
<template>
<el-header>
<div class="left">
<Crumbs :crumbs="getCrumbs"></Crumbs>
</div>
<div class="right">
<!-- <el-tag>当前环境:{{ env }}</el-tag> -->
<el-select v-model="env" @change="envChange" placeholder="请选择环境">
<el-option v-for="item in envList" :key="item.key" :label="item.desc" :value="item.key">
</el-option>
</el-select>
<el-button type="primary" @click="logout">退出</el-button>
</div>
</el-header>
</template>
<script>
import { getNamespaceList } from '@/api/getXyqbData/'
import Crumbs from './Crumbs'
import { mapGetters } from 'vuex'
export default {
name: 'Header',
data() {
return {
envList: [],
env: window.sessionStorage.getItem('env')
}
},
computed: {
...mapGetters({
getCollapseState: 'header/CollapseState',
getCrumbs: 'header/Crumbs'
})
},
methods: {
getEnvList() {
getNamespaceList().then((resp) => {
this.envList = resp.data.data
})
},
envChange(newEnv) {
window.sessionStorage.setItem('env', newEnv) // 重新设置session里的值
this.$router.go(0) // 刷新页面
},
logout() {
window.sessionStorage.clear()
this.$router.push('/')
},
isOpen() {
// 判断左侧栏是否展开或收缩
if (this.getCollapseState === false) {
this.$store.commit('header/setCollapse', true)
this.$notify({
title: '成功',
message: '关闭左侧导航栏',
type: 'success',
duration: 1000
})
} else {
this.$store.commit('header/setCollapse', false)
this.$notify({
title: '成功',
message: '打开左侧导航栏',
type: 'success',
duration: 1000
})
}
}
},
created() {
this.getEnvList()
},
components: {
Crumbs
}
}
</script>
<style lang="less" scoped>
.el-header {
background-color: #525e7d;
color: #333;
display: flex;
justify-content: space-between;
}
.right {
display: flex;
margin: 10px 20px 0 0;
> .el-tag {
margin-top: 5px;
margin-right: 15px;
}
> .el-button {
height: 40px;
}
> .el-select {
width: 150px;
margin-right: 20px;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment