diff --git a/README.md b/README.md deleted file mode 100644 index 04510b7..0000000 --- a/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# dc3-web - -## 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/). diff --git a/babel.config.js b/babel.config.js index e955840..3f453d4 100644 --- a/babel.config.js +++ b/babel.config.js @@ -2,4 +2,4 @@ module.exports = { presets: [ '@vue/cli-plugin-babel/preset' ] -} +}; diff --git a/dc3/Dockerfile b/dc3/Dockerfile index 5656015..77d26d6 100644 --- a/dc3/Dockerfile +++ b/dc3/Dockerfile @@ -14,7 +14,7 @@ # limitations under the License. # -FROM nginx:1.17.6 +FROM nginx:1.17.9 MAINTAINER pnoker pnokers.icloud.com RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime @@ -22,4 +22,4 @@ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime COPY ./dc3/ssl/ /etc/ssl/ COPY ./dc3/nginx/ /etc/nginx/ COPY ./dist/ /usr/share/nginx/html/ -COPY ./dc3/conf.crt/ /etc/nginx/conf.crt/ \ No newline at end of file +COPY ./dc3/conf.crt/ /etc/nginx/conf.crt/ diff --git a/dc3/docker-compose.yml b/dc3/docker-compose.yml index 5d1ba9b..8648bc1 100644 --- a/dc3/docker-compose.yml +++ b/dc3/docker-compose.yml @@ -10,14 +10,13 @@ services: ports: - 8000:80 - 443:443 - container_name: dc3.web - hostname: dc3.com + container_name: dc3-web + hostname: dc3-web networks: dc3net: aliases: - - dc3.web + - dc3-web networks: dc3net: driver: 'bridge' -... diff --git a/postcss.config.js b/postcss.config.js index 961986e..59ea1f3 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,5 +1,5 @@ module.exports = { - plugins: { - autoprefixer: {} - } -} + plugins: { + autoprefixer: {} + } +}; diff --git a/public/img/bg/403.svg b/public/img/bg/403.svg deleted file mode 100644 index 610f136..0000000 --- a/public/img/bg/403.svg +++ /dev/null @@ -1,508 +0,0 @@ - - - - Group 9 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/img/bg/404.svg b/public/img/bg/404.svg deleted file mode 100644 index 5531d05..0000000 --- a/public/img/bg/404.svg +++ /dev/null @@ -1,314 +0,0 @@ - - - - Group 4 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/img/bg/500.svg b/public/img/bg/500.svg deleted file mode 100644 index de723b1..0000000 --- a/public/img/bg/500.svg +++ /dev/null @@ -1,208 +0,0 @@ - - - - Group 4 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index e08b655..0271b14 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,15 +6,7 @@ diff --git a/src/components/error-page/403.vue b/src/components/error-page/403.vue deleted file mode 100644 index 6b4bf9c..0000000 --- a/src/components/error-page/403.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - - diff --git a/src/components/error-page/404.vue b/src/components/error-page/404.vue deleted file mode 100644 index 11a2be8..0000000 --- a/src/components/error-page/404.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - - diff --git a/src/components/error-page/500.vue b/src/components/error-page/500.vue deleted file mode 100644 index 9ccfda5..0000000 --- a/src/components/error-page/500.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - - diff --git a/src/components/error-page/style.scss b/src/components/error-page/style.scss deleted file mode 100644 index c41c163..0000000 --- a/src/components/error-page/style.scss +++ /dev/null @@ -1,35 +0,0 @@ -.error-page { - background: #f0f2f5; - margin-top: -30px; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - - .img { - margin-right: 80px; - height: 360px; - width: 100%; - max-width: 430px; - background-repeat: no-repeat; - background-position: 50% 50%; - background-size: contain; - } - - .content { - h1 { - color: #434e59; - font-size: 72px; - font-weight: 600; - line-height: 72px; - margin-bottom: 24px; - } - - .desc { - color: rgba(0, 0, 0, 0.45); - font-size: 20px; - line-height: 28px; - margin-bottom: 16px; - } - } -} \ No newline at end of file diff --git a/src/components/iframe/main.vue b/src/components/iframe/main.vue deleted file mode 100644 index e675457..0000000 --- a/src/components/iframe/main.vue +++ /dev/null @@ -1,129 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/config/env.js b/src/config/env.js deleted file mode 100644 index e51c2ae..0000000 --- a/src/config/env.js +++ /dev/null @@ -1,21 +0,0 @@ -// 配置编译环境和线上环境之间的切换 - -let baseUrl = ''; -let iconfontVersion = ['567566_pwc3oottzol', '1066523_v8rsbcusj5q']; -let iconfontUrl = `//at.alicdn.com/t/font_$key.css`; -let codeUrl = `${baseUrl}/code` -const env = process.env -if (env.NODE_ENV == 'development') { - baseUrl = ``; // 开发环境地址 -} else if (env.NODE_ENV == 'production') { - baseUrl = ``; //生产环境地址 -} else if (env.NODE_ENV == 'test') { - baseUrl = ``; //测试环境地址 -} -export { - baseUrl, - iconfontUrl, - iconfontVersion, - codeUrl, - env -} diff --git a/src/config/error.js b/src/config/error.js deleted file mode 100644 index 8c0c75a..0000000 --- a/src/config/error.js +++ /dev/null @@ -1,25 +0,0 @@ -import Vue from 'vue'; -import store from '../store/store' - -Vue.config.errorHandler = function (err, vm, info) { - - Vue.nextTick(() => { - store.commit('ADD_LOGS', { - type: 'error', - message: err.message, - stack: err.stack, - info - }) - if (process.env.NODE_ENV === 'development') { - console.group('>>>>>> 错误信息 >>>>>>') - console.log(info) - console.groupEnd(); - console.group('>>>>>> Vue 实例 >>>>>>') - console.log(vm) - console.groupEnd(); - console.group('>>>>>> Error >>>>>>') - console.log(err) - console.groupEnd(); - } - }) -} \ No newline at end of file diff --git a/src/config/permission.js b/src/config/permission.js index b3a6c2f..c0f2c1f 100644 --- a/src/config/permission.js +++ b/src/config/permission.js @@ -12,7 +12,6 @@ router.beforeEach((to, from, next) => { next({path: '/'}) } else { //如果用户信息为空则获取用户信息,获取用户信息失败,跳转到登录页 - console.log(store.getters.token); if (store.getters.token.length === 0) { store.dispatch('FedLogOut').then(() => { next({path: '/login'}) diff --git a/src/lang/en.js b/src/lang/en.js deleted file mode 100644 index e69de29..0000000 diff --git a/src/lang/index.js b/src/lang/index.js deleted file mode 100644 index 126efbd..0000000 --- a/src/lang/index.js +++ /dev/null @@ -1,26 +0,0 @@ -import Vue from 'vue' -import VueI18n from 'vue-i18n' -import elementEnLocale from 'element-ui/lib/locale/lang/en' // element-ui lang -import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN' // element-ui lang -import enLocale from './en' -import zhLocale from './zh' -import {getStore} from '../util/store' - -Vue.use(VueI18n); -const messages = { - en: { - ...enLocale, - ...elementEnLocale - }, - zh: { - ...zhLocale, - ...elementZhLocale - } -} - -const i18n = new VueI18n({ - locale: getStore({name: 'language'}) || 'zh', - messages -}); - -export default i18n \ No newline at end of file diff --git a/src/lang/zh.js b/src/lang/zh.js deleted file mode 100644 index e69de29..0000000 diff --git a/src/mixins/color.js b/src/mixins/color.js deleted file mode 100644 index 6d2cee9..0000000 --- a/src/mixins/color.js +++ /dev/null @@ -1,168 +0,0 @@ -import { mapGetters } from "vuex"; -const version = require("element-ui/package.json").version; // element-ui version from node_modules -const ORIGINAL_THEME = "#409EFF"; // default color -export default function () { - return { - data() { - return { - themeVal: ORIGINAL_THEME - } - }, - created() { - this.themeVal = this.colorName; - }, - watch: { - themeVal(val, oldVal) { - this.$store.commit("SET_COLOR_NAME", val); - this.updateTheme(val, oldVal); - } - }, - computed: { - ...mapGetters(["colorName"]) - }, - methods: { - updateTheme(val, oldVal) { - if (typeof val !== "string") return; - const head = document.getElementsByTagName("head")[0]; - const themeCluster = this.getThemeCluster(val.replace("#", "")); - const originalCluster = this.getThemeCluster(oldVal.replace("#", "")); - const getHandler = (variable, id) => { - return () => { - const originalCluster = this.getThemeCluster( - ORIGINAL_THEME.replace("#", "") - ); - const newStyle = this.updateStyle( - this[variable], - originalCluster, - themeCluster - ); - - let styleTag = document.getElementById(id); - if (!styleTag) { - styleTag = document.createElement("style"); - styleTag.setAttribute("id", id); - head.appendChild(styleTag); - } - styleTag.innerText = newStyle; - }; - }; - - const chalkHandler = getHandler("chalk", "chalk-style"); - - if (!this.chalk) { - const url = `https://unpkg.com/element-ui@${version}/lib/theme-chalk/index.css`; - this.getCSSString(url, chalkHandler, "chalk"); - } else { - chalkHandler(); - } - - const link = [].slice.call( - document.getElementsByTagName("head")[0].getElementsByTagName("link") - ); - for (let i = 0; i < link.length; i++) { - const style = link[i]; - if (style.href.includes('css')) { - this.getCSSString(style.href, innerText => { - const originalCluster = this.getThemeCluster( - ORIGINAL_THEME.replace("#", "") - ); - const newStyle = this.updateStyle( - innerText, - originalCluster, - themeCluster - ); - let styleTag = document.getElementById(i); - if (!styleTag) { - styleTag = document.createElement("style"); - styleTag.id = i; - styleTag.innerText = newStyle; - head.appendChild(styleTag); - } - }); - } - } - - const styles = [].slice.call(document.querySelectorAll("style")) - - styles.forEach(style => { - const { - innerText - } = style; - if (typeof innerText !== "string") return; - style.innerText = this.updateStyle( - innerText, - originalCluster, - themeCluster - ); - }); - }, - updateStyle(style, oldCluster, newCluster) { - let newStyle = style; - oldCluster.forEach((color, index) => { - newStyle = newStyle.replace(new RegExp(color, "ig"), newCluster[index]); - }); - return newStyle; - }, - - getCSSString(url, callback, variable) { - const xhr = new XMLHttpRequest(); - xhr.onreadystatechange = () => { - if (xhr.readyState === 4 && xhr.status === 200) { - if (variable) { - this[variable] = xhr.responseText.replace(/@font-face{[^}]+}/, ""); - } - callback(xhr.responseText); - } - }; - xhr.open("GET", url); - xhr.send(); - }, - - getThemeCluster(theme) { - const tintColor = (color, tint) => { - let red = parseInt(color.slice(0, 2), 16); - let green = parseInt(color.slice(2, 4), 16); - let blue = parseInt(color.slice(4, 6), 16); - - if (tint === 0) { - // when primary color is in its rgb space - return [red, green, blue].join(","); - } else { - red += Math.round(tint * (255 - red)); - green += Math.round(tint * (255 - green)); - blue += Math.round(tint * (255 - blue)); - - red = red.toString(16); - green = green.toString(16); - blue = blue.toString(16); - - return `#${red}${green}${blue}`; - } - }; - - const shadeColor = (color, shade) => { - let red = parseInt(color.slice(0, 2), 16); - let green = parseInt(color.slice(2, 4), 16); - let blue = parseInt(color.slice(4, 6), 16); - - red = Math.round((1 - shade) * red); - green = Math.round((1 - shade) * green); - blue = Math.round((1 - shade) * blue); - - red = red.toString(16); - green = green.toString(16); - blue = blue.toString(16); - - return `#${red}${green}${blue}`; - }; - - const clusters = [theme]; - for (let i = 0; i <= 9; i++) { - clusters.push(tintColor(theme, Number((i / 10).toFixed(2)))); - } - clusters.push(shadeColor(theme, 0.1)); - return clusters; - } - } - } -} \ No newline at end of file diff --git a/src/page/index/top/index.vue b/src/page/index/top/index.vue deleted file mode 100644 index 4067ad1..0000000 --- a/src/page/index/top/index.vue +++ /dev/null @@ -1,168 +0,0 @@ - - - - diff --git a/src/page/index/top/top-color.vue b/src/page/index/top/top-color.vue deleted file mode 100644 index ab433c0..0000000 --- a/src/page/index/top/top-color.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - - - diff --git a/src/page/index/top/top-lang.vue b/src/page/index/top/top-lang.vue deleted file mode 100644 index e3e4b65..0000000 --- a/src/page/index/top/top-lang.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - - diff --git a/src/page/index/top/top-lock.vue b/src/page/index/top/top-lock.vue deleted file mode 100644 index 48ff32c..0000000 --- a/src/page/index/top/top-lock.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - - - diff --git a/src/page/index/top/top-logs.vue b/src/page/index/top/top-logs.vue deleted file mode 100644 index d80f2d4..0000000 --- a/src/page/index/top/top-logs.vue +++ /dev/null @@ -1,43 +0,0 @@ - - - - - diff --git a/src/page/index/top/top-menu.vue b/src/page/index/top/top-menu.vue deleted file mode 100644 index f92d474..0000000 --- a/src/page/index/top/top-menu.vue +++ /dev/null @@ -1,75 +0,0 @@ - - - \ No newline at end of file diff --git a/src/page/index/top/top-search.vue b/src/page/index/top/top-search.vue deleted file mode 100644 index 40efd97..0000000 --- a/src/page/index/top/top-search.vue +++ /dev/null @@ -1,128 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/page/index/top/top-theme.vue b/src/page/index/top/top-theme.vue deleted file mode 100644 index b2713c2..0000000 --- a/src/page/index/top/top-theme.vue +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - diff --git a/src/page/login/authredirect.vue b/src/page/login/authredirect.vue deleted file mode 100644 index 15cbce1..0000000 --- a/src/page/login/authredirect.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - diff --git a/src/page/login/codelogin.vue b/src/page/login/codelogin.vue deleted file mode 100644 index dfd8061..0000000 --- a/src/page/login/codelogin.vue +++ /dev/null @@ -1,133 +0,0 @@ - - - - - diff --git a/src/page/login/index.vue b/src/page/login/index.vue deleted file mode 100644 index 39aa552..0000000 --- a/src/page/login/index.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/page/login/thirdlogin.vue b/src/page/login/thirdlogin.vue deleted file mode 100644 index eda4d96..0000000 --- a/src/page/login/thirdlogin.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - - - diff --git a/src/page/login/userlogin.vue b/src/page/login/userlogin.vue deleted file mode 100644 index 61495c2..0000000 --- a/src/page/login/userlogin.vue +++ /dev/null @@ -1,115 +0,0 @@ - - - - - diff --git a/src/router/axios.js b/src/router/axios.js deleted file mode 100644 index 759ea4a..0000000 --- a/src/router/axios.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * 全站http配置 - * - * axios参数说明 - * isSerialize是否开启form表单提交 - * isToken是否需要token - */ -import axios from 'axios' -import store from '../store/store'; -import router from '../router/router' -import website from '../config/website'; - -import nprogress from 'nprogress' -import 'nprogress/nprogress.css' -import {Message} from 'element-ui' -import {serialize} from '../util/util' -import {getToken} from '../util/auth' -import {Base64} from 'js-base64'; - -axios.defaults.timeout = 10000; -//返回其他状态吗 -axios.defaults.validateStatus = function (status) { - return status >= 200 && status <= 500; // 默认的 -}; - -//跨域请求,允许保存cookie -axios.defaults.withCredentials = true; -// nprogress Configuration -nprogress.configure({ - showSpinner: false -}); - -//http request拦截 -axios.interceptors.request.use(config => { - nprogress.start();// start progress bar - const meta = (config.meta || {}); - const isToken = meta.isToken === false; - config.headers['Authorization'] = `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`; - if (getToken() && !isToken) { - config.headers['Blade-Auth'] = 'bearer ' + getToken() // 让每个请求携带token--['Authorization']为自定义key 请根据实际情况自行修改 - } - //headers中配置serialize为true开启序列化 - if (config.method === 'post' && meta.isSerialize === true) { - config.data = serialize(config.data); - } - return config -}, error => { - return Promise.reject(error) -}); - -//http response拦截 -axios.interceptors.response.use(res => { - nprogress.done(); - const status = res.data.code || 200; - const statusWhiteList = website.statusWhiteList || []; - const message = res.data.msg || '未知错误'; - //如果在白名单里则自行catch逻辑处理 - if (statusWhiteList.includes(status)) return Promise.reject(res); - //如果是401则跳转到登录页面 - if (status === 401) store.dispatch('FedLogOut').then(() => router.push({path: '/login'})); - // 如果请求为非200否者默认统一处理 - if (status !== 200) { - Message({ - message: message, - type: 'error' - }); - return Promise.reject(new Error(message)) - } - return res; -}, error => { - nprogress.done(); - return Promise.reject(new Error(error)); -}); - -export default axios; diff --git a/src/router/page/index.js b/src/router/page/index.js deleted file mode 100644 index 1033358..0000000 --- a/src/router/page/index.js +++ /dev/null @@ -1,50 +0,0 @@ -export default [{ - path: '/login', - name: '登录页', - component: () => - import( /* webpackChunkName: "page" */ '@/page/login/index'), - meta: { - keepAlive: true, - isTab: false, - isAuth: false - } -}, - { - path: '/404', - component: () => - import( /* webpackChunkName: "page" */ '@/components/error-page/404'), - name: '404', - meta: { - keepAlive: true, - isTab: false, - isAuth: false - } - - }, - { - path: '/403', - component: () => - import( /* webpackChunkName: "page" */ '@/components/error-page/403'), - name: '403', - meta: { - keepAlive: true, - isTab: false, - isAuth: false - } - }, - { - path: '/500', - component: () => - import( /* webpackChunkName: "page" */ '@/components/error-page/500'), - name: '500', - meta: { - keepAlive: true, - isTab: false, - isAuth: false - } - }, - { - path: '*', - redirect: '/404' - } -] \ No newline at end of file diff --git a/src/router/views/index.js b/src/router/views/index.js index 162ffaf..ceb829d 100644 --- a/src/router/views/index.js +++ b/src/router/views/index.js @@ -83,27 +83,6 @@ export default [ isAuth: true }, component: () => import('@/views/point/PointValue') - }, { - name: 'alarm', - path: '/alarm', - meta: { - isAuth: true - }, - component: () => import('@/views/Alarm') - }, { - name: 'video', - path: '/video', - meta: { - isAuth: true - }, - component: () => import('@/views/Video') - }, { - name: 'about', - path: '/about', - meta: { - isAuth: true - }, - component: () => import('@/views/About') } ] } diff --git a/src/store/modules/common.js b/src/store/modules/common.js index b3c4190..9f9aaae 100644 --- a/src/store/modules/common.js +++ b/src/store/modules/common.js @@ -1,10 +1,10 @@ import website from '@/config/website' const common = { - state: { website: website, }, mutations: {} }; -export default common \ No newline at end of file + +export default common diff --git a/src/store/modules/logs.js b/src/store/modules/logs.js deleted file mode 100644 index fdf959d..0000000 --- a/src/store/modules/logs.js +++ /dev/null @@ -1,43 +0,0 @@ -import {getStore, setStore} from '../../util/store' -import {dateFormat} from '../../util/date' -import {sendLogs} from '../../api/user' - -const logs = { - state: { - logsList: getStore({name: 'logsList'}) || [], - }, - actions: { - //发送错误日志 - SendLogs({state, commit}) { - return new Promise((resolve, reject) => { - sendLogs(state.logsList).then(() => { - commit('CLEAR_LOGS'); - resolve(); - }).catch(error => { - reject(error) - }) - }) - }, - }, - mutations: { - ADD_LOGS: (state, {type, message, stack, info}) => { - state.logsList.push(Object.assign({ - url: window.location.href, - time: dateFormat(new Date()) - }, { - type, - message, - stack, - info: info.toString() - })) - setStore({name: 'logsList', content: state.logsList}) - }, - CLEAR_LOGS: (state) => { - state.logsList = []; - setStore({name: 'logsList', content: state.logsList}) - } - } - -}; - -export default logs; \ No newline at end of file diff --git a/src/store/modules/tags.js b/src/store/modules/tags.js deleted file mode 100644 index ecb9a80..0000000 --- a/src/store/modules/tags.js +++ /dev/null @@ -1,73 +0,0 @@ -import {getStore, setStore} from '../../util/store' -import {diff} from '../../util/util' -import website from '../../config/website' - -const isFirstPage = website.isFirstPage; -const tagWel = website.fistPage; -const tagObj = { - label: '', //标题名称 - value: '', //标题的路径 - params: '', //标题的路径参数 - query: '', //标题的参数 - meta: {},//额外参数 - group: [], //分组 -} - -//处理首个标签 -function setFistTag(list) { - if (list.length == 1) { - list[0].close = false; - } else { - list.forEach(ele => { - if (ele.value === tagWel.value && isFirstPage === false) { - ele.close = false - } else { - ele.close = true - } - }) - } -} - - -const navs = { - state: { - tagList: getStore({name: 'tagList'}) || [], - tag: getStore({name: 'tag'}) || tagObj, - tagWel: tagWel - }, - actions: {}, - mutations: { - ADD_TAG: (state, action) => { - state.tag = action; - setStore({name: 'tag', content: state.tag, type: 'session'}) - if (state.tagList.some(ele => diff(ele, action))) return - state.tagList.push(action) - setFistTag(state.tagList); - setStore({name: 'tagList', content: state.tagList, type: 'session'}) - }, - DEL_TAG: (state, action) => { - state.tagList = state.tagList.filter(item => { - return !diff(item, action); - }) - setFistTag(state.tagList); - setStore({name: 'tagList', content: state.tagList, type: 'session'}) - }, - DEL_ALL_TAG: (state) => { - state.tagList = [state.tagWel]; - setStore({name: 'tagList', content: state.tagList, type: 'session'}) - }, - DEL_TAG_OTHER: (state) => { - state.tagList = state.tagList.filter(item => { - if (item.value === state.tag.value) { - return true; - } else if (!website.isFirstPage && item.value === website.fistPage.value) { - return true; - } - }) - setFistTag(state.tagList); - setStore({name: 'tagList', content: state.tagList, type: 'session'}) - }, - } -}; - -export default navs \ No newline at end of file diff --git a/src/styles/animate/vue-transition.scss b/src/styles/animate/vue-transition.scss deleted file mode 100644 index c73902c..0000000 --- a/src/styles/animate/vue-transition.scss +++ /dev/null @@ -1,65 +0,0 @@ -// 过渡动画 横向渐变 -.fade-transverse-leave-active, -.fade-transverse-enter-active { - transition: all .5s; -} - -.fade-transverse-enter { - opacity: 0; - transform: translateX(-30px); -} - -.fade-transverse-leave-to { - opacity: 0; - transform: translateX(30px); -} - -// 过渡动画 缩放渐变 -.fade-scale-leave-active, -.fade-scale-enter-active { - transition: all .5s; -} - -.fade-scale-enter { - opacity: 0; - transform: scale(1.2); -} - -.fade-scale-leave-to { - opacity: 0; - transform: scale(0.8); -} - -@-webkit-keyframes animate-cloud { - from { - background-position: 600px 100%; - } - to { - background-position: 0 100%; - } - } - @-moz-keyframes animate-cloud { - from { - background-position: 600px 100%; - } - to { - background-position: 0 100%; - } - } - @-ms-keyframes animate-cloud { - from { - background-position: 600px 100%; - } - to { - background-position: 0 100%; - } - } - @-o-keyframes animate-cloud { - from { - background-position: 600px 100%; - } - to { - background-position: 0 100%; - } - } - \ No newline at end of file diff --git a/src/styles/common.scss b/src/styles/common.scss deleted file mode 100644 index 82a1d0b..0000000 --- a/src/styles/common.scss +++ /dev/null @@ -1,28 +0,0 @@ -// 全局变量 -@import './variables.scss'; -// ele样式覆盖 -@import './element-ui.scss'; -// 顶部右侧显示 -@import './top.scss'; -// 导航标签 -@import './tags.scss'; -// 工具类函数 -@import './mixin.scss'; -// 侧面导航栏 -@import './sidebar.scss'; -// 动画 -@import './animate/vue-transition.scss'; -//主题 -@import './theme/index.scss'; -//适配 -@import './media.scss'; -//通用配置 -@import './normalize.scss'; - -a{ - text-decoration: none; - color:#333; -} -*{ - outline: none; -} \ No newline at end of file diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss deleted file mode 100644 index 71f33c5..0000000 --- a/src/styles/element-ui.scss +++ /dev/null @@ -1,71 +0,0 @@ -.el-dropdown-menu__item { - font-size: 12px !important; - line-height: 28px !important; -} -.el-card.is-always-shadow { - box-shadow: none; - border: none !important; -} - -.el-scrollbar__view { - height: 100%; -} - -.el-menu--horizontal { - border-bottom: none !important; -} - -.el-menu { - border-right: none !important; -} - -.el-menu--display, -.el-menu--display+.el-submenu__icon-arrow { - display: none; -} - - - -.el-message__icon, -.el-message__content { - display: inline-block; -} - -.el-date-editor .el-range-input, -.el-date-editor .el-range-separator { - height: auto; - overflow: hidden; -} - -.el-dialog__wrapper { - z-index: 2048; -} - -.el-scrollbar__wrap { - overflow-x: hidden; -} - -.el-col { - margin-bottom: 8px; -} - -.el-main { - padding: 0 !important; -} -.el-dropdown-menu__item--divided:before, .el-menu, .el-menu--horizontal>.el-menu-item:not(.is-disabled):focus, .el-menu--horizontal>.el-menu-item:not(.is-disabled):hover, .el-menu--horizontal>.el-submenu .el-submenu__title:hover { - background-color:transparent; -} - - -.el-dropdown-menu__item--divided:before, .el-menu, .el-menu--horizontal>.el-menu-item:not(.is-disabled):focus, .el-menu--horizontal>.el-menu-item:not(.is-disabled):hover, .el-menu--horizontal>.el-submenu .el-submenu__title:hover{ - background-color: transparent !important; -} - -.el-card__header { - padding: 6px 18px !important; -} - -.el-card__body { - padding: 16px !important; -} - diff --git a/src/styles/login.scss b/src/styles/login.scss deleted file mode 100644 index 98df885..0000000 --- a/src/styles/login.scss +++ /dev/null @@ -1,163 +0,0 @@ -.login-container { - display: flex; - align-items: center; - position: relative; - width: 100%; - height: 100%; - margin: 0 auto; - background: url("http://www.17sucai.com/preview/242158/2015-01-10/%E7%99%BB%E5%BD%95/images/cloud.jpg") - 0 bottom repeat-x #049ec4; - animation: animate-cloud 20s linear infinite; -} -.login-weaper { - margin: 0 auto; - width: 1000px; - box-shadow: -4px 5px 10px rgba(0, 0, 0, 0.4); - .el-input-group__append { - border: none; - } -} - -.login-left, -.login-border { - position: relative; - min-height: 500px; - align-items: center; - display: flex; -} -.login-left { - border-top-left-radius: 5px; - border-bottom-left-radius: 5px; - justify-content: center; - flex-direction: column; - background-color: #409EFF; - color: #fff; - float: left; - width: 50%; - position: relative; -} -.login-left .img { - width: 140px; -} -.login-time { - position: absolute; - left: 25px; - top: 25px; - width: 100%; - color: #fff; - font-weight: 200; - opacity: 0.9; - font-size: 18px; - overflow: hidden; -} -.login-left .title { - margin-top: 60px; - text-align: center; - color: #fff; - font-weight: 300; - letter-spacing: 2px; - font-size: 25px; -} - -.login-border { - border-left: none; - border-top-right-radius: 5px; - border-bottom-right-radius: 5px; - color: #fff; - background-color: #fff; - width: 50%; - float: left; - box-sizing: border-box; -} -.login-main { - margin: 0 auto; - width: 65%; - box-sizing: border-box; -} -.login-main > h3 { - margin-bottom: 20px; -} -.login-main > p { - color: #76838f; -} -.login-title { - color: #333; - margin-bottom: 40px; - font-weight: 500; - font-size: 22px; - text-align: center; - letter-spacing: 4px; -} -.login-menu { - margin-top: 40px; - width: 100%; - text-align: center; - a { - color: #999; - font-size: 12px; - margin: 0px 8px; - } -} -.login-submit { - width: 100%; - height: 45px; - border: 1px solid #409EFF; - background: none; - font-size: 18px; - letter-spacing: 2px; - font-weight: 300; - color: #409EFF; - cursor: pointer; - margin-top: 30px; - font-family: "neo"; - transition: 0.25s; -} -.login-form { - margin: 10px 0; - i { - color: #333; - } - .el-form-item__content { - width: 100%; - } - .el-form-item { - margin-bottom: 12px; - } - .el-input { - input { - padding-bottom: 10px; - text-indent: 5px; - background: transparent; - border: none; - border-radius: 0; - color: #333; - border-bottom: 1px solid rgb(235, 237, 242); - } - .el-input__prefix { - i { - padding: 0 5px; - font-size: 16px !important; - } - } - } -} -.login-code { - display: flex; - align-items: center; - justify-content: space-around; - margin: 0 0 0 10px; -} -.login-code-img { - margin-top: 2px; - width: 100px; - height: 38px; - background-color: #fdfdfd; - border: 1px solid #f0f0f0; - color: #333; - font-size: 14px; - font-weight: bold; - letter-spacing: 5px; - line-height: 38px; - text-indent: 5px; - text-align: center; -} \ No newline at end of file diff --git a/src/styles/media.scss b/src/styles/media.scss deleted file mode 100644 index 44bede4..0000000 --- a/src/styles/media.scss +++ /dev/null @@ -1,165 +0,0 @@ -.avue-left, -.avue-header, -.avue-top, -.avue-logo, -.avue-layout -.login-logo, -.avue-main { - transition: all .3s; -} -.avue-contail { - width: 100%; - height: 100%; - background: #f0f2f5; - background-size: 100%; - background-repeat: no-repeat; -} - - -.avue-left { - position: fixed; - left: 0; - top: 0; - width: 240px; - height: 100%; - z-index: 1025; -} - -.avue--collapse { - .avue-left, - .avue-logo { - width: 60px; - } - .avue-header { - padding-left: 60px; - } - .avue-main { - width: calc(100% - 60px); - left: 60px; - } -} - -.avue-header { - padding-left: 240px; - width: 100%; - background-color: #fff; - box-sizing: border-box; -} - -.avue-main { - position: absolute; - left: 240px; - padding: 0; - padding-bottom: 20px; - width: calc(100% - 240px); - height: calc(100% - 70px); - box-sizing: border-box; - overflow: hidden; -} - -.avue-view { - padding-bottom: 22px; - width: 100%; - box-sizing: border-box; -} - -.avue-footer { - margin: 0 auto; - padding: 0 22px; - width: 1300px; - display: flex; - align-items: center; - justify-content: space-between; - .logo { - margin-left: -50px; - } - .copyright { - color: #666; - line-height: 1.5; - font-size: 12px; - } -} - -.avue-shade { - position: fixed; - display: none; - width: 100%; - height: 100%; - left: 0; - right: 0; - top: 0; - bottom: 0; - background-color: rgba(0, 0, 0, .3); - z-index: 1024; - &--show { - display: block; - } -} - -@media screen and (max-width: 992px) { - $width: 240px; - // ele的自适应 - .el-dialog, - .el-message-box { - width: 98% !important; - } - //登录页面 - .login-left { - display: none !important; - } - .login-logo { - padding-top: 30px !important; - margin-left: -30px; - } - .login-weaper{ - margin: 0 auto; - width: 96% !important; - } - .login-border { - border-radius: 5px; - padding: 40px; - margin: 0 auto; - float: none !important; - width: 100% !important; - } - .login-main { - width: 100% !important; - } - //主框架 - .avue-tags { - display: none; - } - .avue-left, - .avue-logo { - left: -$width; - } - .avue-main { - left: 0; - width: 100%; - } - .avue-header { - margin-bottom: 15px; - padding-left: 15px; - } - .top-bar__item { - display: none; - } - .avue--collapse { - .avue-left, - .avue-logo { - width: $width; - left: 0; - } - .avue-main { - left: $width; - width: 100%; - } - .avue-header { - padding: 0; - transform: translate3d(230px, 0, 0); - } - .avue-shade { - display: block; - } - } -} \ No newline at end of file diff --git a/src/styles/mixin.scss b/src/styles/mixin.scss deleted file mode 100644 index 0523edd..0000000 --- a/src/styles/mixin.scss +++ /dev/null @@ -1,73 +0,0 @@ -@mixin clearfix { - &:after { - content: ""; - display: table; - clear: both; - } -} - -@mixin scrollBar { - ::-webkit-scrollbar-track-piece { - background-color: transparent; - } - ::-webkit-scrollbar { - width: 7px; - height: 7px; - background-color: transparent; - } - ::-webkit-scrollbar-thumb { - border-radius: 5px; - background-color: hsla(220, 4%, 58%, .3); - } -} - -@mixin radius($width, $size, $color) { - width: $width; - height: $width; - line-height: $width; - border-radius: $width; - text-align: center; - border-width: $size; - border-style: solid; - border-color: $color; -} - -@mixin relative { - position: relative; - width: 100%; - height: 100%; -} - -@mixin pct($pct) { - width: #{$pct}; - position: relative; - margin: 0 auto; -} - -@mixin triangle($width, $height, $color, $direction) { - $width: $width/2; - $color-border-style: $height solid $color; - $transparent-border-style: $width solid transparent; - height: 0; - width: 0; - @if $direction==up { - border-bottom: $color-border-style; - border-left: $transparent-border-style; - border-right: $transparent-border-style; - } - @else if $direction==right { - border-left: $color-border-style; - border-top: $transparent-border-style; - border-bottom: $transparent-border-style; - } - @else if $direction==down { - border-top: $color-border-style; - border-left: $transparent-border-style; - border-right: $transparent-border-style; - } - @else if $direction==left { - border-right: $color-border-style; - border-top: $transparent-border-style; - border-bottom: $transparent-border-style; - } -} \ No newline at end of file diff --git a/src/styles/normalize.scss b/src/styles/normalize.scss deleted file mode 100644 index e51d268..0000000 --- a/src/styles/normalize.scss +++ /dev/null @@ -1,502 +0,0 @@ -/*! normalize.css v2.1.2 | MIT License | git.io/normalize */ -/* -/*! 我就是自己看看,然后翻译下下,让大家看看 */ - -/* ========================================================================== - HTML5 display definitions - - HTML5 新增元素定义 - - ========================================================================== */ - -/** - * Correct `block` display not defined in IE 8/9. - * - * 修正IE 8/9 中未定义的块级元素。 - */ - - article, - aside, - details, - figcaption, - figure, - footer, - header, - hgroup, - main, - nav, - section, - summary { - display: block; - } - - /** - * Correct `inline-block` display not defined in IE 8/9. - * - * 修正在 IE 8/9 中未定义的 'inline-block' 元素。 - */ - - audio, - canvas, - video { - display: inline-block; - } - - /** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - * - * 阻止现在浏览器显示未定义 control 播放控件的 'audio' 声音元素。 - * 删除 IOS 5 设备中显示的多余的高度。 - */ - - audio:not([controls]) { - display: none; - height: 0; - } - - /** - * Address styling not present in IE 8/9. - * - * 处理 IE 8/9 中不存在的样式。 - */ - - [hidden] { - display: none; - } - - /* ========================================================================== - Base - - 基本设置 - ========================================================================== */ - - /** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. - * - * 1. 设置默认字体类型为 sans-serif. - * 2. 当用户放大或缩小页面时不改变字体大小。 - */ - - html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ - } - - /** - * Remove default margin. - * - * 删除默认边距。 - */ - - body { - margin: 0; - } - - /* ========================================================================== - Links - - 链接 - ========================================================================== */ - - /** - * Address `outline` inconsistency between Chrome and other browsers. - * - * 处理 Chrome 与其它浏览器中关于 'outline' 的不一致性。 - */ - - a:focus { - outline: thin dotted; - } - - /** - * Improve readability when focused and also mouse hovered in all browsers. - * - * 为所有浏览器改善当激活或悬停在元素上时元素内容的可读性。 - */ - - a:active, - a:hover { - outline: 0; - } - - /* ========================================================================== - Typography - - 排版 - ========================================================================== */ - - /** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari 5, and Chrome. - * - * 处理多变的 'h1' 字体大小及其在 Firefox 4+, Safari 5, 及 Chrome时浏览器中的 - * 'section' 与 'article' 元素中的边距。 - */ - - h1 { - font-size: 2em; - margin: 0.67em 0; - } - - /** - * Address styling not present in IE 8/9, Safari 5, and Chrome. - * - * 处理在 IE 8/9, Safari 5, 及 Chrome 没有的样式。 - */ - - abbr[title] { - border-bottom: 1px dotted; - } - - /** - * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. - * - * 处理 Firefox 4+, Safari 5, 及 Chrome 中默认的 'bolder' 样式为 'bold'. - */ - - b, - strong { - font-weight: bold; - } - - /** - * Address styling not present in Safari 5 and Chrome. - * - * 处理在 Safari 5 和 Chrome 没有的样式。 - */ - - dfn { - font-style: italic; - } - - /** - * Address differences between Firefox and other browsers. - * - * 处理 Firefox 与其它浏览器的差异。 - */ - - hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; - } - - /** - * Address styling not present in IE 8/9. - * - * 处理在 IE 8/9 中没有的样式。 - */ - - mark { - background: #ff0; - color: #000; - } - - /** - * Correct font family set oddly in Safari 5 and Chrome. - * - * 修正确 Safari 5 和 Chrome 中古怪的默认字体。 - */ - - code, - kbd, - pre, - samp { - font-family: monospace, serif; - font-size: 1em; - } - - /** - * Improve readability of pre-formatted text in all browsers. - * - * 为所有浏览器改善预格式化文本的可读性。 - */ - - pre { - white-space: pre-wrap; - } - - /** - * Set consistent quote types. - * - * 设置一致的引用格式。 - */ - - q { - quotes: "\201C" "\201D" "\2018" "\2019"; - } - - /** - * Address inconsistent and variable font size in all browsers. - * - * 处理所有浏览器中字体大小的不一致性[译者注:原文直译为:处理所有 - * 浏览器中的不一致和多变的字体大小]。 - */ - - small { - font-size: 80%; - } - - /** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - * - * 阻止所有浏览器中 'sub' 和 'sup' 元素影响 'line-height'. - * [译者注:就是不让上标与下标影响行高。] - */ - - sub, - sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - sup { - top: -0.5em; - } - - sub { - bottom: -0.25em; - } - - /* ========================================================================== - Embedded content - - 嵌入的内容 - ========================================================================== */ - - /** - * Remove border when inside `a` element in IE 8/9. - * - * 删除 IE 8/9 中当内容位于 'a' 中出现的边框。 - */ - - img { - border: 0; - } - - /** - * Correct overflow displayed oddly in IE 9. - * - * 修正 IE 9 中显示古怪的溢出内容。 - */ - - svg:not(:root) { - overflow: hidden; - } - - /* ========================================================================== - Figures - - Figure 图像/图表/代码等 - ========================================================================== */ - - /** - * Address margin not present in IE 8/9 and Safari 5. - * - * 处理在 IE 8/9 和 Safari 5 没有的边距。 - */ - - figure { - margin: 0; - } - - /* ========================================================================== - Forms - ========================================================================== */ - - /** - * Define consistent border, margin, and padding. - * - * 定义一致的边框、外边距及内边距。 - */ - - fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; - } - - /** - * 1. Correct `color` not being inherited in IE 8/9. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - * 1. 修正在 IE 8/9 中没有继承的 'color'. - * - * [译者注:说是修正颜色嘛,可下面没有关于颜色的呀,这也行?求大神解释!] - * 2. 去掉内边距,避免当用户清空表单组时认为出错了。 - */ - - legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ - } - - /** - * 1. Correct font family not being inherited in all browsers. - * 2. Correct font size not being inherited in all browsers. - * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. - * - * 1. 修正所有浏览器中未被继承的字体类型。 - * 2. 修正所有浏览器中未被继承的字体大小。 - * 3. 处理 Firefox 4+, Safari 5, 及 Chrome 中默认设置不同的外边距。 - */ - - button, - input, - select, - textarea { - font-family: inherit; /* 1 */ - font-size: 100%; /* 2 */ - margin: 0; /* 3 */ - } - - /** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - * - * 处理 Firefox 4+ 中的客户端样式表里使用 '!important' 设置的 'line-height'. - */ - - button, - input { - line-height: normal; - } - - /** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. - * Correct `select` style inheritance in Firefox 4+ and Opera. - * - * 处理 'button' 和 'select' 的 'text-transform' 继承的不一致性。 - * 所有其它表单控件元素不继承 'text-transform' 的值。 - * 修正 Chrome, Safari 5+, 及 IE 8+ 中 'button' 的继承样式。 - * 修正 Firefox 4+ 和 Opera 中 'select' 的继承样式。 - */ - - button, - select { - text-transform: none; - } - - /** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - * - * 1. 避免 Android 4.0.* 中 WebKit 的一个bug, 防止 'audio' 与 'video' 的播放控件失效。 - * 2. 修正 iOS 中不可点击的 'input' 样式。 - * 3. 改善图片类型的 'input' 等光标样式的可用性与一致性。 - */ - - button, - html input[type="button"], /* 1 */ - input[type="reset"], - input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ - } - - /** - * Re-set default cursor for disabled elements. - * - * 重置不可用元素的默认光标样式。 - */ - - button[disabled], - html input[disabled] { - cursor: default; - } - - /** - * 1. Address box sizing set to `content-box` in IE 8/9. - * 2. Remove excess padding in IE 8/9. - * - * 1. 处理 IE 8/9 中设置为 'content-box' 的盒子模型。 - * 2. 删除 IE 8/9 中多余的内边距。 - */ - - input[type="checkbox"], - input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ - } - - /** - * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome - * (include `-moz` to future-proof). - * - * 1. 处理 Safari 5 和 Chrome 中默认设置为 'appearance' 的 'searchfield'. - * 2. 处理 Safari 5 和 Chrome 中默认设置为 'box-sizing' 的 'border-box' - * (包括不会过时的 '-moz'). - */ - - input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; - } - - /** - * Remove inner padding and search cancel button in Safari 5 and Chrome - * on OS X. - * - * 删除 Safari 5 和 OS X 上的 Chrome 中的输入框上的内边距和搜索取消按钮。 - */ - - input[type="search"]::-webkit-search-cancel-button, - input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; - } - - /** - * Remove inner padding and border in Firefox 4+. - * - * 删除 Firefox 4+ button 与 input 上的内边距。 - */ - - button::-moz-focus-inner, - input::-moz-focus-inner { - border: 0; - padding: 0; - } - - /** - * 1. Remove default vertical scrollbar in IE 8/9. - * 2. Improve readability and alignment in all browsers. - * - * 1. 删除 IE8/9 中默认的垂直滚动条。 - * 2. 改善所有浏览器中的可读性并使文本垂直对齐。 - */ - - textarea { - overflow: auto; /* 1 */ - vertical-align: top; /* 2 */ - } - - /* ========================================================================== - Tables - - 表格 - ========================================================================== */ - - /** - * Remove most spacing between table cells. - * - * 删除表格里单元格间的间距。 - */ - - table { - border-collapse: collapse; - border-spacing: 0; - } - \ No newline at end of file diff --git a/src/styles/sidebar.scss b/src/styles/sidebar.scss deleted file mode 100644 index 96edd24..0000000 --- a/src/styles/sidebar.scss +++ /dev/null @@ -1,90 +0,0 @@ - - -.el-menu--popup{ - .el-menu-item{ - background-color: #20222a; - i{ - margin-right: 5px; - } - i,span{ - color:hsla(0,0%,100%,.7); - } - &:hover{ - i,span{ - color:#fff; - } - } - &.is-active { - background-color: rgba(0,0,0,.8); - &:before { - content: ''; - top: 0; - left: 0; - bottom: 0; - width: 4px; - background: #409eff; - position: absolute; - } - i,span{ - color:#fff; - } - } - } - -} -.avue-sidebar { - user-select: none; - position: relative; - padding-top: 60px; - height: 100%; - position: relative; - background-color: #20222a; - transition: width .2s; - box-sizing: border-box; - box-shadow: 2px 0 6px rgba(0,21,41,.35); - &--tip{ - width:90%; - height: 140px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 5px; - position: absolute; - top:5px; - left:5%; - color:#ccc; - z-index: 2; - text-align: center; - font-size: 14px; - background-color: rgba(0,0,0,.4); - } - .el-menu-item,.el-submenu__title{ - i{ - margin-right: 5px; - } - i,span{ - color:hsla(0,0%,100%,.7); - } - &:hover{ - background: transparent; - i,span{ - color:#fff; - } - } - &.is-active { - &:before { - content: ''; - top: 0; - left: 0; - bottom: 0; - width: 4px; - background: #409eff; - position: absolute; - } - background-color: rgba(0,0,0,.8); - i,span{ - color:#fff; - } - } - } -} \ No newline at end of file diff --git a/src/styles/tags.scss b/src/styles/tags.scss deleted file mode 100644 index 283be5e..0000000 --- a/src/styles/tags.scss +++ /dev/null @@ -1,92 +0,0 @@ - - -.avue-tags { - user-select: none; - position: relative; - padding: 0 10px; - margin-bottom: 10px; - box-sizing: border-box; - overflow: hidden; - border-top: 1px solid #f6f6f6; - background-color: #fff; - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); - .el-tabs--card>.el-tabs__header { - margin: 0; - } - .el-tabs--card>.el-tabs__header .el-tabs__nav, - .el-tabs--card>.el-tabs__header .el-tabs__item, - .el-tabs--card>.el-tabs__header { - border: none; - } - .el-tabs--card>.el-tabs__header .el-tabs__item:first-child { - border-left-width: 1px - } - .el-tabs--card>.el-tabs__header .el-tabs__item { - margin: 0 3px; - height: 40px; - line-height:40px; - font-size: 13px; - font-weight: normal; - color: #ccc; - &.is-active { - color: #409EFF; - border-bottom: 3px solid #409EFF; - } - } - .el-tabs__nav-prev, - .el-tabs__nav-next { - width: 20px; - line-height: 34px; - font-size: 18x; - text-align: center; - } - &__box { - position: relative; - box-sizing: border-box; - padding-right: 106px; - width: 100%; - &--close { - .el-tabs__item { - &:first-child { - padding: 0 20px !important; - .el-icon-close { - display: none; - } - } - } - } - } - &__contentmenu{ - position: fixed; - width:120px; - background-color: #fff; - z-index:1024; - border-radius: 5px; - box-shadow: 1px 2px 10px #ccc; - .item{ - cursor: pointer; - font-size: 14px; - padding: 8px 20px 8px 15px; - color: #606266; - &:first-child{ - border-top-left-radius: 5px; - border-top-right-radius: 5px; - } - &:last-child{ - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; - } - &:hover{ - background-color: #409EFF; - color:#fff; - } - } - } - &__menu { - position: absolute !important; - top: 3px; - right: 0; - padding: 1px 0 0 15px; - box-sizing: border-box; - } -} \ No newline at end of file diff --git a/src/styles/theme/d2.scss b/src/styles/theme/d2.scss deleted file mode 100644 index 479fc0f..0000000 --- a/src/styles/theme/d2.scss +++ /dev/null @@ -1,57 +0,0 @@ -.theme-d2 { - .avue-logo{ - color: #409EFF; - background-color: #ebf1f6; - box-shadow: none; - .avue-logo_title{ - font-size: 22px; - font-weight: 400; - } - } - .avue-top{ - background-color: #ebf1f6; - box-shadow: none; - } - .avue-main{ - padding: 0 5px; - } - .avue-tags{ - margin-left: 6px; - padding: 0; - border: 1px solid #e4e7ed; - border-radius: 3px; - background-color: #ebf1f6; - box-shadow: none; - .el-tabs__item{ - border-left: 1px solid #cfd7e5 !important; - margin: 0 !important; - background-color: rgba(0,0,0,.03) !important; - color: #606266 !important; - font-size: 14px !important; - font-weight: 500 !important; - &:first-child{ - border-left: none !important; - } - } - .is-active{ - border-bottom:1px solid #fff !important; - background-color: #fff !important; - color: #409EFF !important; - } - } - .avue-sidebar{ - background-color: #ebf1f6; - box-shadow: none; - .el-menu-item,.el-submenu__title{ - i,span{ - color:#606266 - } - &:hover,&.is-active{ - background: hsla(0,0%,100%,.5); - i,span{ - color: #409EFF; - } - } - } - } -} \ No newline at end of file diff --git a/src/styles/theme/hey.scss b/src/styles/theme/hey.scss deleted file mode 100644 index cc4a4fe..0000000 --- a/src/styles/theme/hey.scss +++ /dev/null @@ -1,45 +0,0 @@ -.theme-hey{ - .avue-sidebar{ - background-color: #fff; - box-shadow: 0 1px 4px rgba(0,21,41,.08); - .el-menu-item,.el-submenu__title{ - i,span{ - color: rgba(49,58,70,.8); - } - &:hover{ - background: transparent; - i,span{ - color:#409eff; - } - } - &.is-active { - &:before { - left:auto; - right: 0 ; - } - background-color: #f0f6ff; - i,span{ - color:#409eff; - } - } - } - } - .avue-logo{ - background-color: #fff; - box-shadow: none; - .avue-logo_title{ - color:#409eff; - font-size: 24px; - } - } - .avue-tags{ - background: #f3f6f8; - .el-tabs__item{ - color: rgba(0,0,0,.65) !important; - } - .is-active{ - background-color: #fff; - border-bottom: none !important; - } - } -} \ No newline at end of file diff --git a/src/styles/theme/index.scss b/src/styles/theme/index.scss deleted file mode 100644 index 4356e78..0000000 --- a/src/styles/theme/index.scss +++ /dev/null @@ -1,15 +0,0 @@ -// 白色主题 -@import './white.scss'; - -// 炫酷主题 -@import './star.scss'; - - -// d2主题 -@import './d2.scss'; - -//iview -@import './iview.scss'; - -//heyui -@import './hey.scss'; diff --git a/src/styles/theme/iview.scss b/src/styles/theme/iview.scss deleted file mode 100644 index 1c6a844..0000000 --- a/src/styles/theme/iview.scss +++ /dev/null @@ -1,79 +0,0 @@ -.theme-iview { - .avue-logo{ - background: #001529; - box-shadow: none; - text-align: center; - .avue-logo_title{ - div{ - border-top-left-radius: 5px; - border-top-right-radius: 5px; - border-bottom-left-radius: 3px; - border-bottom-right-radius: 3px; - font-size: 22px; - color:#fff; - font-weight: 500; - margin: 10px auto; - width: 180px; - height: 45px; - background-color: #409EFF; - } - } - } - .avue-tags{ - padding: 3px 5px 5px 0; - background: #f0f0f0; - box-shadow: inset 0 0 3px 2px hsla(0,0%,39.2%,.1); - .is-active{ - &:before{ - background: #409EFF !important; - } - } - .el-tabs__item{ - padding: 0 15px !important; - position: relative; - height: 32px !important; - line-height:32px !important; - border: 1px solid #e8eaec!important; - color: #515a6e!important; - background: #fff!important; - border-radius: 3px; - &:before{ - content:''; - display: inline-block; - width: 12px; - height: 12px; - margin-right:10px; - border-radius: 50%; - background: #e8eaec; - } - } - } - - .avue-sidebar{ - background: #001529; - .el-menu-item{ - &.is-active { - background-color: #000c17; - &:before { - display: none; - } - i,span{ - color:#409EFF; - } - } - } - .el-submenu{ - .el-menu-item{ - &.is-active { - background-color: #409EFF; - &:before { - display: none; - } - i,span{ - color:#fff; - } - } - } - } - } -} \ No newline at end of file diff --git a/src/styles/theme/star.scss b/src/styles/theme/star.scss deleted file mode 100644 index b593fb2..0000000 --- a/src/styles/theme/star.scss +++ /dev/null @@ -1,92 +0,0 @@ -.theme-star { - .avue-contail { - background-image: url("/img/bg/star-squashed.jpg"); - background-size: 100% 100%; - } - .avue-logo{ - color: #fff; - } - .avue-header, - .avue-logo, - .tags-container { - background-color: transparent; - } - .el-card,.error-page { - opacity: .9; - } - .avue-tabs { - padding: 0 20px ; - } - .avue-tags{ - background-color: transparent; - border-top: none; - } - .avue-top{ - .avue-breadcrumb{ - color:#fff; - } - .el-menu-item{ - i,span{ - color:#fff; - } - &.is-active{ - background-color: rgba(0,0,0,.4) - } - } - .el-dropdown{ - color:#fff; - } - } - .avue-sidebar{ - box-shadow: 2px 0 6px rgba(0, 21, 41, 0.15); - background-color:transparent; - .el-menu-item,.el-submenu__title{ - i,span{ - color:#fff - } - &:hover{ - background: transparent; - i,span{ - color:#409EFF; - } - } - &.is-active { - background-color: rgba(0,0,0,.4); - i,span{ - color:#fff; - } - } - } - } - - .top-search { - .el-input__inner{ - color: #333; - } - input::-webkit-input-placeholder, - textarea::-webkit-input-placeholder { - /* WebKit browsers */ - color: #fff; - } - input:-moz-placeholder, - textarea:-moz-placeholder { - /* Mozilla Firefox 4 to 18 */ - color: #fff; - } - input::-moz-placeholder, - textarea::-moz-placeholder { - /* Mozilla Firefox 19+ */ - color: #fff; - } - input:-ms-input-placeholder, - textarea:-ms-input-placeholder { - /* Internet Explorer 10+ */ - color: #fff; - } - } - .top-bar__item { - i { - color: #fff; - } - } -} \ No newline at end of file diff --git a/src/styles/theme/white.scss b/src/styles/theme/white.scss deleted file mode 100644 index ed81bc2..0000000 --- a/src/styles/theme/white.scss +++ /dev/null @@ -1,120 +0,0 @@ -.theme-white { - .el-menu--popup{ - .el-menu-item{ - background-color: #fff; - i,span{ - color:#666; - } - &:hover{ - i,span{ - color:#333; - } - } - &.is-active { - background-color: #409EFF; - &:before { - content: ''; - top: 0; - left: 0; - bottom: 0; - width: 4px; - background: #409eff; - position: absolute; - } - i,span{ - color:#fff; - } - } - } - } - .avue-header, - .avue-logo, - .tags-container { - background-color: #409EFF; - } - .avue-sidebar--tip{ - background-color:transparent; - color:#333; - } - .el-dropdown{ - color:#fff; - } - .avue-logo_title{ - font-weight: 400; - color:#fff; - } - .logo_title, - .avue-breadcrumb - { - color: #fff ; - i { - color: #fff; - } - } - .avue-top{ - .el-menu-item { - i, - span { - color: #fff ; - } - &:hover { - i, - span { - color: #fff ; - } - } - } - } - .avue-sidebar{ - box-shadow: 2px 0 6px rgba(0, 21, 41, 0.15); - background-color: #fff; - padding-top: 70px; - .el-menu-item,.el-submenu__title{ - i,span{ - color:#666 - } - &:hover{ - background: transparent; - i,span{ - color:#333; - } - } - &.is-active { - background-color: #409EFF; - i,span{ - color:#fff; - } - } - } - } - .top-search { - .el-input__inner{ - color: #333; - } - input::-webkit-input-placeholder, - textarea::-webkit-input-placeholder { - /* WebKit browsers */ - color: #fff; - } - input:-moz-placeholder, - textarea:-moz-placeholder { - /* Mozilla Firefox 4 to 18 */ - color: #fff; - } - input::-moz-placeholder, - textarea::-moz-placeholder { - /* Mozilla Firefox 19+ */ - color: #fff; - } - input:-ms-input-placeholder, - textarea:-ms-input-placeholder { - /* Internet Explorer 10+ */ - color: #fff; - } - } - .top-bar__item { - i { - color: #fff; - } - } -} \ No newline at end of file diff --git a/src/styles/top.scss b/src/styles/top.scss deleted file mode 100644 index a39bb81..0000000 --- a/src/styles/top.scss +++ /dev/null @@ -1,102 +0,0 @@ -.avue-top { - padding: 0 20px; - position: relative; - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); - color: rgba(0, 0, 0, .65); - font-size: 28px; - height: 64px; - box-sizing: border-box; - white-space: nowrap; - .el-menu-item{ - i,span{ - font-size: 13px; - } - } -} -.avue-breadcrumb { - height: 100%; - i{ - font-size: 30px !important; - } - &--active { - transform:rotate(90deg); - } -} - -.top-menu { - box-sizing: border-box; - .el-menu-item { - padding: 0 10px; - border:none !important; - } -} - -.top-search { - line-height: 64px; - position: absolute !important; - left: 20px; - top:0; - width: 400px !important; - .el-input__inner { - font-size: 13px; - border: none; - background-color: transparent; - } -} - -.top-bar__img { - margin: 0 8px 0 5px; - padding: 2px; - width: 30px; - height: 30px; - border-radius: 100%; - box-sizing: border-box; - border: 1px solid #eee; - vertical-align: middle; -} - -.top-bar__left, -.top-bar__right { - height: 64px; - position: absolute; - top: 0; - i{ - line-height: 64px; - } -} - -.top-bar__left { - left: 20px; -} - -.top-bar__right { - right: 20px; - display: flex; - align-items: center; -} - -.top-bar__item { - position: relative; - display: inline-block; - height: 64px; - margin:0 10px; - font-size: 16px; - &--show { - display: inline-block !important; - } - .el-badge__content.is-fixed{ - top:12px; - right: 5px; - } -} - -.top-bar__title { - height: 100%; - padding:0 40px; - box-sizing: border-box; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - font-size: inherit; - font-weight: 400; -} diff --git a/src/styles/variables.scss b/src/styles/variables.scss deleted file mode 100644 index 219e4a7..0000000 --- a/src/styles/variables.scss +++ /dev/null @@ -1,2 +0,0 @@ -//main -$mainBg: #409eff; diff --git a/src/views/About.vue b/src/views/About.vue deleted file mode 100644 index 9f1ea80..0000000 --- a/src/views/About.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - diff --git a/src/views/Alarm.vue b/src/views/Alarm.vue deleted file mode 100644 index 3fa2807..0000000 --- a/src/views/Alarm.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/src/views/Video.vue b/src/views/Video.vue deleted file mode 100644 index 6de73ef..0000000 --- a/src/views/Video.vue +++ /dev/null @@ -1,23 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/device/Device.vue b/src/views/device/Device.vue index 787d43b..174b88b 100644 --- a/src/views/device/Device.vue +++ b/src/views/device/Device.vue @@ -58,7 +58,7 @@ message: '请输入 2~32 位字长的设备名称', trigger: 'blur' }, { - pattern: /^[A-Za-z0-9\u4e00-\u9fa5]+$/, + pattern: /^[A-Za-z0-9\u4e00-\u9fa5][A-Za-z0-9\u4e00-\u9fa5-_]*$/, message: '请输入 正确格式的设备名称' } ] diff --git a/src/views/driver/DriverAttribute.vue b/src/views/driver/DriverAttribute.vue index 86dbf15..12b7f75 100644 --- a/src/views/driver/DriverAttribute.vue +++ b/src/views/driver/DriverAttribute.vue @@ -61,7 +61,7 @@ message: '请输入 2~32 位字长的显示名称', trigger: 'blur' }, { - pattern: /^[A-Za-z0-9\u4e00-\u9fa5]+$/, + pattern: /^[A-Za-z0-9\u4e00-\u9fa5][A-Za-z0-9\u4e00-\u9fa5-_]*$/, message: '请输入 正确格式的显示名称' } ] @@ -82,7 +82,7 @@ message: '请输入 2~32 位字长的属性名称', trigger: 'blur' }, { - pattern: /^[A-Za-z0-9\u4e00-\u9fa5]+$/, + pattern: /^[A-Za-z0-9\u4e00-\u9fa5][A-Za-z0-9\u4e00-\u9fa5-_]*$/, message: '请输入 正确格式的属性名称' } ] diff --git a/src/views/driver/DriverInfo.vue b/src/views/driver/DriverInfo.vue index d8f3d4a..7c228c5 100644 --- a/src/views/driver/DriverInfo.vue +++ b/src/views/driver/DriverInfo.vue @@ -76,7 +76,14 @@ }, { label: '内容', prop: 'value', - span: 12 + span: 12, + rules: [ + { + required: true, + message: '请输入 内容', + trigger: 'blur' + } + ] }, { label: '备注', prop: 'description', diff --git a/src/views/group/Group.vue b/src/views/group/Group.vue index 6b5d4a6..72fa87f 100644 --- a/src/views/group/Group.vue +++ b/src/views/group/Group.vue @@ -58,7 +58,7 @@ message: '请输入 2~32 位字长的分组名称', trigger: 'blur' }, { - pattern: /^[A-Za-z0-9\u4e00-\u9fa5]+$/, + pattern: /^[A-Za-z0-9\u4e00-\u9fa5][A-Za-z0-9\u4e00-\u9fa5-_]*$/, message: '请输入 正确格式的分组名称' } ] diff --git a/src/views/login/Login.vue b/src/views/login/Login.vue index 581171a..1bb8e7b 100644 --- a/src/views/login/Login.vue +++ b/src/views/login/Login.vue @@ -10,7 +10,7 @@