飘泊客 4 months ago
parent ed5b3626d2
commit 7f719aaabb

Binary file not shown.

@ -434,7 +434,7 @@
</el-form-item> </el-form-item>
<el-form-item label="评论天数"> <el-form-item label="评论天数">
<i class="el-icon-edit" /> <i class="el-icon-edit" />
<span class="ml-5 mr-5"><</span> <span class="ml-5 mr-5">&lt;</span>
<el-input v-model="taskDetail.commentDay" type="Number" style="width:90px" /> <el-input v-model="taskDetail.commentDay" type="Number" style="width:90px" />
<i class="el-icon-warning-outline blue ml-5" /> <i class="el-icon-warning-outline blue ml-5" />
<span class="fs-12">默认值0为不限制</span> <span class="fs-12">默认值0为不限制</span>
@ -502,13 +502,13 @@
<div class="u-flex"> <div class="u-flex">
<div> <div>
<i class="el-icon-refresh" /> <i class="el-icon-refresh" />
<span class="fs-12">单号执行搜索次数<span class="ml-5 mr-5"><</span></span> <span class="fs-12">单号执行搜索次数<span class="ml-5 mr-5">&lt;</span></span>
<el-input v-model="taskDetail.searchNum" type="Number" style="width:70px" /> <el-input v-model="taskDetail.searchNum" type="Number" style="width:70px" />
<span class="fs-12 ml-5 ">/</span> <span class="fs-12 ml-5 ">/</span>
</div> </div>
<div class="ml-10"> <div class="ml-10">
<i class="el-icon-date" /> <i class="el-icon-date" />
<span class="fs-12">单号随机搜索时间间隔<span class="ml-5 mr-5"><</span></span> <span class="fs-12">单号随机搜索时间间隔<span class="ml-5 mr-5">&lt;</span></span>
<el-input v-model="taskDetail.searchInterval" type="Number" style="width:70px" /> <el-input v-model="taskDetail.searchInterval" type="Number" style="width:70px" />
<span class="fs-12 ml-5">分钟</span> <span class="fs-12 ml-5">分钟</span>
</div> </div>
@ -524,7 +524,7 @@
<div class="u-flex"> <div class="u-flex">
<div> <div>
<i class="el-icon-refresh" /> <i class="el-icon-refresh" />
<span class="fs-12">单号执行评论次数<span class="ml-5 mr-5"><</span></span> <span class="fs-12">单号执行评论次数<span class="ml-5 mr-5">&lt;</span></span>
<el-input v-model="taskDetail.commentNum" type="Number" style="width:70px" /> <el-input v-model="taskDetail.commentNum" type="Number" style="width:70px" />
<span class="fs-12 ml-5">/</span> <span class="fs-12 ml-5">/</span>
</div> </div>

@ -1,105 +1,105 @@
<template> <template>
<div class="dashboard-container"> <div class="dashboard-container">
<div class="dashboard-editor-container"> <div class="dashboard-editor-container">
<panel-group @handleSetLineChartData="handleSetLineChartData" /> <panel-group @handleSetLineChartData="handleSetLineChartData" />
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;"> <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
<line-chart :chart-data="lineChartData" /> <line-chart :chart-data="lineChartData" />
</el-row> </el-row>
<el-row :gutter="32"> <el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8"> <el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper"> <div class="chart-wrapper">
<radar-chart /> <radar-chart />
</div> </div>
</el-col> </el-col>
<el-col :xs="24" :sm="24" :lg="8"> <el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper"> <div class="chart-wrapper">
<pie-chart /> <pie-chart />
</div> </div>
</el-col> </el-col>
<el-col :xs="24" :sm="24" :lg="8"> <el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper"> <div class="chart-wrapper">
<bar-chart /> <bar-chart />
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import GithubCorner from '@/components/GithubCorner' // import GithubCorner from '@/components/GithubCorner'
import PanelGroup from './dashboard/PanelGroup' import PanelGroup from './dashboard/PanelGroup'
import LineChart from './dashboard/LineChart' import LineChart from './dashboard/LineChart'
import RadarChart from '@/components/Echarts/RadarChart' import RadarChart from '@/components/Echarts/RadarChart'
import PieChart from '@/components/Echarts/PieChart' import PieChart from '@/components/Echarts/PieChart'
import BarChart from '@/components/Echarts/BarChart' import BarChart from '@/components/Echarts/BarChart'
const lineChartData = { const lineChartData = {
newVisitis: { newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165], expectedData: [100, 120, 161, 134, 105, 160, 165],
actualData: [120, 82, 91, 154, 162, 140, 145] actualData: [120, 82, 91, 154, 162, 140, 145]
}, },
messages: { messages: {
expectedData: [200, 192, 120, 144, 160, 130, 140], expectedData: [200, 192, 120, 144, 160, 130, 140],
actualData: [180, 160, 151, 106, 145, 150, 130] actualData: [180, 160, 151, 106, 145, 150, 130]
}, },
purchases: { purchases: {
expectedData: [80, 100, 121, 104, 105, 90, 100], expectedData: [80, 100, 121, 104, 105, 90, 100],
actualData: [120, 90, 100, 138, 142, 130, 130] actualData: [120, 90, 100, 138, 142, 130, 130]
}, },
shoppings: { shoppings: {
expectedData: [130, 140, 141, 142, 145, 150, 160], expectedData: [130, 140, 141, 142, 145, 150, 160],
actualData: [120, 82, 91, 154, 162, 140, 130] actualData: [120, 82, 91, 154, 162, 140, 130]
} }
} }
export default { export default {
name: 'Dashboard', name: 'Dashboard',
components: { components: {
GithubCorner, // GithubCorner,
PanelGroup, PanelGroup,
LineChart, LineChart,
RadarChart, RadarChart,
PieChart, PieChart,
BarChart BarChart
}, },
data() { data() {
return { return {
lineChartData: lineChartData.newVisitis lineChartData: lineChartData.newVisitis
} }
}, },
methods: { methods: {
handleSetLineChartData(type) { handleSetLineChartData(type) {
this.lineChartData = lineChartData[type] this.lineChartData = lineChartData[type]
} }
} }
} }
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
.dashboard-editor-container { .dashboard-editor-container {
padding: 32px; padding: 32px;
background-color: rgb(240, 242, 245); background-color: rgb(240, 242, 245);
position: relative; position: relative;
.github-corner { .github-corner {
position: absolute; position: absolute;
top: 0; top: 0;
border: 0; border: 0;
right: 0; right: 0;
} }
.chart-wrapper { .chart-wrapper {
background: #fff; background: #fff;
padding: 16px 16px 0; padding: 16px 16px 0;
margin-bottom: 32px; margin-bottom: 32px;
} }
} }
@media (max-width:1024px) { @media (max-width:1024px) {
.chart-wrapper { .chart-wrapper {
padding: 8px; padding: 8px;
} }
} }
</style> </style>

@ -1,270 +1,270 @@
<template> <template>
<div class="login" :style="'background-image:url(' + Background + ');'"> <div class="login" :style="'background-image:url(' + Background + ');'">
<el-form <el-form
ref="loginForm" ref="loginForm"
:model="loginForm" :model="loginForm"
:rules="loginRules" :rules="loginRules"
label-position="left" label-position="left"
label-width="0px" label-width="0px"
class="login-form" class="login-form"
> >
<h3 class="title"> <h3 class="title">
CDP 后台管理系统 CDP 后台管理系统
</h3> </h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
v-model="loginForm.username" v-model="loginForm.username"
type="text" type="text"
auto-complete="off" auto-complete="off"
placeholder="账号" placeholder="账号"
> >
<svg-icon <svg-icon
slot="prefix" slot="prefix"
icon-class="user" icon-class="user"
class="el-input__icon input-icon" class="el-input__icon input-icon"
/> />
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input <el-input
v-model="loginForm.password" v-model="loginForm.password"
type="password" type="password"
auto-complete="off" auto-complete="off"
placeholder="密码" placeholder="密码"
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin"
> >
<svg-icon <svg-icon
slot="prefix" slot="prefix"
icon-class="password" icon-class="password"
class="el-input__icon input-icon" class="el-input__icon input-icon"
/> />
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code"> <el-form-item prop="code">
<el-input <el-input
v-model="loginForm.code" v-model="loginForm.code"
auto-complete="off" auto-complete="off"
placeholder="验证码" placeholder="验证码"
style="width: 63%" style="width: 63%"
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin"
> >
<svg-icon <svg-icon
slot="prefix" slot="prefix"
icon-class="validCode" icon-class="validCode"
class="el-input__icon input-icon" class="el-input__icon input-icon"
/> />
</el-input> </el-input>
<div class="login-code"> <div class="login-code">
<img :src="codeUrl" @click="getCode" /> <img :src="codeUrl" @click="getCode" />
</div> </div>
</el-form-item> </el-form-item>
<el-checkbox v-model="loginForm.rememberMe" style="margin:0 0 25px 0;"> <el-checkbox v-model="loginForm.rememberMe" style="margin:0 0 25px 0;">
记住我 记住我
</el-checkbox> </el-checkbox>
<el-form-item style="width:100%;"> <el-form-item style="width:100%;">
<el-button <el-button
:loading="loading" :loading="loading"
size="medium" size="medium"
type="primary" type="primary"
style="width:100%;" style="width:100%;"
@click.native.prevent="handleLogin" @click.native.prevent="handleLogin"
> >
<span v-if="!loading"> </span> <span v-if="!loading"> </span>
<span v-else> ...</span> <span v-else> ...</span>
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 底部 --> <!-- 底部 -->
<div v-if="$store.state.settings.showFooter" id="el-login-footer"> <div v-if="$store.state.settings.showFooter" id="el-login-footer">
<span v-html="$store.state.settings.footerTxt" /> <span v-html="$store.state.settings.footerTxt" />
<span> </span> <span> </span>
<a href="http://www.beian.miit.gov.cn" target="_blank">{{ <a href="http://www.beian.miit.gov.cn" target="_blank">{{
$store.state.settings.caseNumber $store.state.settings.caseNumber
}}</a> }}</a>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { encrypt } from "@/utils/rsaEncrypt"; import { encrypt } from '@/utils/rsaEncrypt'
import Config from "@/settings"; import Config from '@/settings'
import { getCodeImg } from "@/api/login"; import { getCodeImg } from '@/api/login'
import Cookies from "js-cookie"; import Cookies from 'js-cookie'
import Background from "@/assets/images/background.jpg"; import Background from '@/assets/images/background.jpg'
export default { export default {
name: "Login", name: 'Login',
data() { data() {
return { return {
Background: Background, Background: Background,
codeUrl: "", codeUrl: '',
cookiePass: "", cookiePass: '',
loginForm: { loginForm: {
username: "", username: '',
password: "", password: '',
rememberMe: false, rememberMe: false,
code: "", code: '',
uuid: "" uuid: ''
}, },
loginRules: { loginRules: {
username: [ username: [
{ required: true, trigger: "blur", message: "用户名不能为空" } { required: true, trigger: 'blur', message: '用户名不能为空' }
], ],
password: [ password: [
{ required: true, trigger: "blur", message: "密码不能为空" } { required: true, trigger: 'blur', message: '密码不能为空' }
], ],
code: [{ required: true, trigger: "change", message: "验证码不能为空" }] code: [{ required: true, trigger: 'change', message: '验证码不能为空' }]
}, },
loading: false, loading: false,
redirect: undefined redirect: undefined
}; }
}, },
watch: { watch: {
$route: { $route: {
handler: function(route) { handler: function(route) {
this.redirect = route.query && route.query.redirect; this.redirect = route.query && route.query.redirect
}, },
immediate: true immediate: true
} }
}, },
created() { created() {
// //
this.getCode(); this.getCode()
// Cookie // Cookie
this.getCookie(); this.getCookie()
// token // token
this.point(); this.point()
}, },
methods: { methods: {
getCode() { getCode() {
getCodeImg().then(res => { getCodeImg().then(res => {
this.codeUrl = res.img; this.codeUrl = res.img
this.loginForm.uuid = res.uuid; this.loginForm.uuid = res.uuid
}); })
}, },
getCookie() { getCookie() {
const username = Cookies.get("username"); const username = Cookies.get('username')
let password = Cookies.get("password"); let password = Cookies.get('password')
const rememberMe = Cookies.get("rememberMe"); const rememberMe = Cookies.get('rememberMe')
// cookie // cookie
this.cookiePass = password === undefined ? "" : password; this.cookiePass = password === undefined ? '' : password
password = password === undefined ? this.loginForm.password : password; password = password === undefined ? this.loginForm.password : password
this.loginForm = { this.loginForm = {
username: username === undefined ? this.loginForm.username : username, username: username === undefined ? this.loginForm.username : username,
password: password, password: password,
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe), rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
code: "" code: ''
}; }
}, },
handleLogin() { handleLogin() {
this.$refs.loginForm.validate(valid => { this.$refs.loginForm.validate(valid => {
const user = { const user = {
username: this.loginForm.username, username: this.loginForm.username,
password: this.loginForm.password, password: this.loginForm.password,
rememberMe: this.loginForm.rememberMe, rememberMe: this.loginForm.rememberMe,
code: this.loginForm.code, code: this.loginForm.code,
uuid: this.loginForm.uuid uuid: this.loginForm.uuid
}; }
Cookies.set("password", user.password, { Cookies.set('password', user.password, {
expires: Config.passCookieExpires expires: Config.passCookieExpires
}); })
// if (user.password !== this.cookiePass) { // if (user.password !== this.cookiePass) {
user.password = encrypt(user.password); user.password = encrypt(user.password)
// } // }
if (valid) { if (valid) {
this.loading = true; this.loading = true
if (user.rememberMe) { if (user.rememberMe) {
// cookies // cookies
Cookies.set("username", user.username, { Cookies.set('username', user.username, {
expires: Config.passCookieExpires expires: Config.passCookieExpires
}); })
// Cookies.set("password", user.password, { // Cookies.set("password", user.password, {
// expires: Config.passCookieExpires // expires: Config.passCookieExpires
// }); // });
Cookies.set("rememberMe", user.rememberMe, { Cookies.set('rememberMe', user.rememberMe, {
expires: Config.passCookieExpires expires: Config.passCookieExpires
}); })
} else { } else {
Cookies.remove("username"); Cookies.remove('username')
Cookies.remove("password"); Cookies.remove('password')
Cookies.remove("rememberMe"); Cookies.remove('rememberMe')
} }
// login // login
this.$store this.$store
.dispatch("Login", user) .dispatch('Login', user)
.then(() => { .then(() => {
this.loading = false; this.loading = false
this.$router.push({ path: this.redirect || "/" }); this.$router.push({ path: this.redirect || '/' })
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false
this.getCode(); this.getCode()
}); })
} else { } else {
console.log("error submit!!"); console.log('error submit!!')
return false; return false
} }
}); })
}, },
point() { point() {
const point = Cookies.get("point") !== undefined; const point = Cookies.get('point') !== undefined
if (point) { if (point) {
this.$notify({ this.$notify({
title: "提示", title: '提示',
message: "当前登录状态已过期,请重新登录!", message: '当前登录状态已过期,请重新登录!',
type: "warning", type: 'warning',
duration: 5000 duration: 5000
}); })
Cookies.remove("point"); Cookies.remove('point')
} }
} }
} }
}; }
</script> </script>
<style rel="stylesheet/scss" lang="scss"> <style rel="stylesheet/scss" lang="scss">
.login { .login {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100%; height: 100%;
background-size: cover; background-size: cover;
} }
.title { .title {
margin: 0 auto 30px auto; margin: 0 auto 30px auto;
text-align: center; text-align: center;
color: #707070; color: #707070;
} }
.login-form { .login-form {
border-radius: 6px; border-radius: 6px;
background: #ffffff; background: #ffffff;
width: 385px; width: 385px;
padding: 25px 25px 5px 25px; padding: 25px 25px 5px 25px;
.el-input { .el-input {
height: 38px; height: 38px;
input { input {
height: 38px; height: 38px;
} }
} }
.input-icon { .input-icon {
height: 39px; height: 39px;
width: 14px; width: 14px;
margin-left: 2px; margin-left: 2px;
} }
} }
.login-tip { .login-tip {
font-size: 13px; font-size: 13px;
text-align: center; text-align: center;
color: #bfbfbf; color: #bfbfbf;
} }
.login-code { .login-code {
width: 33%; width: 33%;
display: inline-block; display: inline-block;
height: 38px; height: 38px;
float: right; float: right;
img { img {
cursor: pointer; cursor: pointer;
vertical-align: middle; vertical-align: middle;
} }
} }
</style> </style>

Loading…
Cancel
Save