Compare commits

..

10 Commits

  1. 1
      README.md
  2. 25
      public/index.html
  3. 30
      src/api/index.js
  4. BIN
      src/assets/img/index/customer.png
  5. BIN
      src/assets/img/index/index0.png
  6. BIN
      src/assets/img/index/sug.png
  7. BIN
      src/assets/img/index/tel-1.png
  8. BIN
      src/assets/img/index/tel-2.png
  9. BIN
      src/assets/img/index/tel.png
  10. BIN
      src/assets/img/index/top-1.png
  11. BIN
      src/assets/img/index/top.png
  12. BIN
      src/assets/img/index/wechat-1.png
  13. BIN
      src/assets/img/index/wechat.png
  14. 15
      src/layouts/footer/index.vue
  15. 42
      src/layouts/header/index.vue
  16. 6
      src/libs/util.js
  17. 220
      src/pages/account/login/index.vue
  18. 16
      src/pages/data/list/index.vue
  19. 186
      src/pages/index/list/index.vue
  20. 2
      src/pages/role/list/index.vue
  21. 119
      src/pages/screen/list/index.vue
  22. 2
      src/pages/user/list/index.vue
  23. 63
      src/plugins/requests/index.js
  24. 18
      src/setting.js
  25. 13
      src/store/modules/user.js
  26. 3
      vue.config.js

@ -0,0 +1 @@
# 数据前瞻平台前端

@ -1,11 +1,25 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"> <meta name="keywords" content="数据前瞻,数据平台,金融数据,宏观数据,行业经济数据" />
<link rel="stylesheet" href="//at.alicdn.com/t/font_830376_qzecyukz0s.css"> <meta
<title>数据前瞻</title> name="description"
content="数据前瞻涵盖股票数据,期货数据,债券数据,期权数据,利率数据,公募数据和宏观数据,拥有超40年的历史数据,可为您解读、预测、分析,模拟市场趋势、经济周期和世界事件影响提供必要的数据支持。我们的数据均来源于各大专业财经权威网站和数据官方发布平台,并经过专业的数据分类和整理,可让用户轻松便捷地搜索并批量下载到自己研究所需的数据,极大地减轻自己搜索整理数据的时间,提高研究效率, 从而高效的输出研究成果。"
/>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="//at.alicdn.com/t/font_830376_qzecyukz0s.css" />
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement('script');
hm.src = 'https://hm.baidu.com/hm.js?26fbe82e56d2f1aeeb09fe697c4434d5';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<title>数据前瞻——准确、海量、易用的财经数据平台</title>
</head> </head>
<body> <body>
<noscript> <noscript>
@ -14,5 +28,4 @@
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </body>
</html> </html>

@ -3,19 +3,20 @@ const host = Setting.apiBaseURL
export default { export default {
// 登录注册 // 登录注册
logins: `users/users/user/login`, logins: `users/users/user/login`,
verification: `${host}users/users/user/captcha`, verification: `${host}users/users/user/captcha`,
sendPhoneVerificationCode: `users/users/user/sendPhoneVerificationCode`, sendPhoneVerificationCode: `users/users/user/sendPhoneVerificationCode`,
getToken: `users/users/user/getToken`, getToken: `users/users/user/getToken`,
getOtherAccountByPhone: `users/users/user/getOtherAccountByPhone`, getOtherAccountByPhone: `users/users/user/getOtherAccountByPhone`,
unbindAccounts: `users/users/user/unbindAccounts`, unbindAccounts: `users/users/user/unbindAccounts`,
logout: `users/users/user/logout`,
// 加密货币 // 加密货币
market: `/topic/market`, market: `/topic/market`,
getTopList: `${Setting.cryptoBaseURL}currency/market/getTopList`, getTopList: `${Setting.cryptoBaseURL}currency/market/getTopList`,
platformLogList: `nakadai/log/platformLogList`, platformLogList: `nakadai/nakadai/log/platformLogList`,
logNotification: `nakadai/log/logNotification`, logNotification: `nakadai/nakadai/log/logNotification`,
// 公用接口 // 公用接口
queryProvince: `nakadai/nakadai/province/queryProvince`, queryProvince: `nakadai/nakadai/province/queryProvince`,
queryCity: `nakadai/nakadai/city/queryCity`, queryCity: `nakadai/nakadai/city/queryCity`,
@ -36,10 +37,10 @@ export default {
// 用户管理 // 用户管理
saveUser: `users/users/data/user/save`, saveUser: `users/users/data/user/save`,
getDetailByAccount: `occupationlab/architecture/getDetailByAccount`, getDetailByAccount: `occupationlab/occupationlab/architecture/getDetailByAccount`,
getUserList: `users/users/data/user/getUserList`, getUserList: `users/users/data/user/getUserList`,
getUserTotalBySchoolId: `users/users/data/user/getUserTotalBySchoolId`, getUserTotalBySchoolId: `users/users/data/user/getUserTotalBySchoolId`,
checkAccount:`occupationlab/architecture/checkWorkNumOrAccount`, checkAccount: `occupationlab/occupationlab/architecture/checkWorkNumOrAccount`,
getDetail: `users/users/data/user/getDetail`, getDetail: `users/users/data/user/getDetail`,
modifyUser: `users/users/data/user/modify`, modifyUser: `users/users/data/user/modify`,
export_failure: `${host}users/users/data/user/export_failure`, export_failure: `${host}users/users/data/user/export_failure`,
@ -50,25 +51,24 @@ export default {
unbindMobilePhone: `users/users/userAccount/unbindMobilePhone`, unbindMobilePhone: `users/users/userAccount/unbindMobilePhone`,
bindPhoneOrEmail: `users/users/userAccount/bindPhoneOrEmail`, bindPhoneOrEmail: `users/users/userAccount/bindPhoneOrEmail`,
examinePassword: `users/users/userAccount/examinePassword`, examinePassword: `users/users/userAccount/examinePassword`,
isClient: `${host}users/users/user/isClient`,
deleteProfile: `users/users/userInfo/deleteProfile`, deleteProfile: `users/users/userInfo/deleteProfile`,
checkEmailOrPhone: `occupationlab/architecture/checkEmailOrPhone`, checkEmailOrPhone: `occupationlab/occupationlab/architecture/checkEmailOrPhone`,
accountIsDisabled: `users/users/user/accountIsDisabled`, accountIsDisabled: `users/users/user/accountIsDisabled`,
userTemplate: `http://39.108.250.202/template/%E6%95%B0%E6%8D%AE%E5%B9%B3%E5%8F%B0%E7%94%A8%E6%88%B7%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`, userTemplate: `http://121.37.12.51/template/%E6%95%B0%E6%8D%AE%E5%B9%B3%E5%8F%B0%E7%94%A8%E6%88%B7%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`,
// 角色管理 // 角色管理
batchRemove:`users/role/batchRemove`, batchRemove: `users/users/role/batchRemove`,
getRole:`users/role/obtainDetails`, getRole: `users/users/role/obtainDetails`,
getName: `data/data/role/getName`, getName: `data/data/role/getName`,
listRole:`users/role/list`, listRole: `users/users/role/list`,
removeRole: `data/data/role/remove`, removeRole: `data/data/role/remove`,
saveOrUpdate:`users/role/saveOrUpdate`, saveOrUpdate: `users/users/role/saveOrUpdate`,
getPermissions:`users/user-role/getUserRolesPermissionMenu`, getPermissions: `users/users/user-role/getUserRolesPermissionMenu`,
// 权限菜单管理 // 权限菜单管理
doAssign: `data/data/permission/doAssign`, doAssign: `data/data/permission/doAssign`,
queryAllMenus: `users/users/permission/queryAllMenus`, queryAllMenus: `users/users/permission/queryAllMenus`,
savePer:`users/user-role/rolePermissionService`, savePer: `users/users/user-role/rolePermissionService`,
toAssign: `data/data/permission/toAssign`, toAssign: `data/data/permission/toAssign`,
// 表展示 // 表展示
@ -83,7 +83,7 @@ export default {
downloadAgain: `data/data/downloadAgain`, downloadAgain: `data/data/downloadAgain`,
isDownload: `data/data/product/isDownload`, isDownload: `data/data/product/isDownload`,
getTableTime: `data/data/tableTime/getTableTime`, getTableTime: `data/data/tableTime/getTableTime`,
getLevel: `data/category/getLevel`, getLevel: `data/data/category/getLevel`,
multipleTablePreview: `data/data/multipleTablePreview`, multipleTablePreview: `data/data/multipleTablePreview`,
// 数据操作记录 // 数据操作记录

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 919 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 B

@ -8,12 +8,13 @@
<template> <template>
<div class="footer"> <div class="footer">
<div class="info"> <div class="info">
<span class="m-r-20">客服邮箱service@huorantech.cn</span> <!-- <span class="m-r-20">客服邮箱service@huorantech.cn</span> -->
<span>联系人孙经理 18565785395</span> <span>联系人金经理 15218726836</span>
</div> </div>
<div class="copyright"> <div class="copyright">
<span>© Copyright 2021 Dataforward 数据前瞻</span> <span>© Copyright 2021 Dataforward 数据前瞻</span>
<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">粤ICP备20072679号</a> <a href="https://beian.miit.gov.cn/#/Integrated/index"
target="_blank">粤ICP备20072679号</a>
</div> </div>
</div> </div>
</template> </template>
@ -36,12 +37,12 @@ export default {
.footer { .footer {
padding: 17px 0 9px; padding: 17px 0 9px;
text-align: center; text-align: center;
background-color: #0F1D2E; background-color: #0f1d2e;
.info { .info {
margin-bottom: 7px; margin-bottom: 7px;
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
color: #D7DFE7; color: #d7dfe7;
} }
.copyright { .copyright {
font-size: 12px; font-size: 12px;
@ -49,10 +50,10 @@ export default {
line-height: 17px; line-height: 17px;
span { span {
margin-right: 20px; margin-right: 20px;
color: #757F8A; color: #757f8a;
} }
a { a {
color:#757F8A; color: #757f8a;
font-size: 12px; font-size: 12px;
&:hover { &:hover {
color: #c7c7c7; color: #c7c7c7;

@ -29,16 +29,19 @@
</div> </div>
</div> </div>
<el-dialog title="修改密码" :visible.sync="passwordVisible" :close-on-click-modal="false" :append-to-body="true" @close="closePassword" width="30%"> <el-dialog title="修改密码" :visible.sync="passwordVisible" :close-on-click-modal="false" :append-to-body="true"
@close="closePassword" width="30%">
<el-form ref="passwordForm" label-width="82px"> <el-form ref="passwordForm" label-width="82px">
<el-form-item label="原密码"> <el-form-item label="原密码">
<el-input type="password" v-model="passwordForm.password" placeholder="请输入原密码"></el-input> <el-input type="password" v-model="passwordForm.password" placeholder="请输入原密码"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="新密码"> <el-form-item label="新密码">
<el-input type="password" v-model="passwordForm.newPassword" placeholder="请输入新密码" @keyup.enter.native="editPassword"></el-input> <el-input type="password" v-model="passwordForm.newPassword" placeholder="请输入新密码"
@keyup.enter.native="editPassword"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="确认新密码"> <el-form-item label="确认新密码">
<el-input type="password" v-model="passwordForm.reNewPassword" placeholder="请确认新密码" @keyup.enter.native="editPassword"></el-input> <el-input type="password" v-model="passwordForm.reNewPassword" placeholder="请确认新密码"
@keyup.enter.native="editPassword"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -114,10 +117,6 @@ export default {
avatar: userInfo.userAvatars, avatar: userInfo.userAvatars,
userName: userInfo.userName userName: userInfo.userName
}) })
//
userInfo.userName || this.$get(this.api.isClient).then(res => {
res.customerName && this.setInfo({userName: res.customerName})
}).catch(res => {})
}).catch(err => { }) }).catch(err => { })
}, },
hideSetting () { hideSetting () {
@ -195,6 +194,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
$height: 64px; $height: 64px;
.header { .header {
z-index: 10; z-index: 10;
position: fixed; position: fixed;
@ -204,6 +204,7 @@ $height: 64px;
height: $height; height: $height;
background-color: #fff; background-color: #fff;
box-shadow: 0px 0px 6px 0px rgba(178, 178, 178, 0.32); box-shadow: 0px 0px 6px 0px rgba(178, 178, 178, 0.32);
.inner { .inner {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -212,6 +213,7 @@ $height: 64px;
padding: 0 80px 0 10px; padding: 0 80px 0 10px;
margin: 0 auto; margin: 0 auto;
} }
.logo { .logo {
position: absolute; position: absolute;
top: 0; top: 0;
@ -236,6 +238,7 @@ $height: 64px;
padding: 7px 20px; padding: 7px 20px;
margin: 0 auto; margin: 0 auto;
background-color: #fff; background-color: #fff;
input { input {
width: 195px; width: 195px;
margin-left: 10px; margin-left: 10px;
@ -243,26 +246,41 @@ $height: 64px;
color: #333; color: #333;
background-color: transparent; background-color: transparent;
border: 0; border: 0;
&::-webkit-input-placeholder{color: #999}
&::-moz-placeholder{color: #999} &::-webkit-input-placeholder {
&:-moz-placeholder{color: #999} color: #999
}
&::-moz-placeholder {
color: #999
}
&:-moz-placeholder {
color: #999
}
&:focus { &:focus {
outline: none; outline: none;
} }
} }
.remove { .remove {
cursor: pointer; cursor: pointer;
} }
.search-icon { .search-icon {
width: 18px; width: 18px;
} }
} }
.action { .action {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
.icon { .icon {
cursor: pointer; cursor: pointer;
} }
.user-wrap { .user-wrap {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
@ -271,6 +289,7 @@ $height: 64px;
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
.username { .username {
margin-left: 10px; margin-left: 10px;
color: #000; color: #000;
@ -279,13 +298,16 @@ $height: 64px;
} }
} }
} }
.login { .login {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
opacity: .9; opacity: .9;
} }
span { span {
margin-left: 5px; margin-left: 5px;
color: #666; color: #666;

@ -121,15 +121,15 @@ const util = {
}, },
// 成功提示 // 成功提示
successMsg(message,duration = 1500) { successMsg(message,duration = 1500) {
return Message.success({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration}) return Message.success({message,showClose: true,duration})
}, },
// 警告提示 // 警告提示
warningMsg(message,duration = 1500) { warningMsg(message,duration = 1500) {
return Message.warning({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration}) return Message.warning({message,showClose: true,duration})
}, },
// 错误提示 // 错误提示
errorMsg(message,duration = 1500) { errorMsg(message,duration = 1500) {
return Message.error({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration}) return Message.error({message,showClose: true,duration})
}, },
} }

@ -4,20 +4,16 @@
<div class="form"> <div class="form">
<h6 class="title">欢迎使用请登录</h6> <h6 class="title">欢迎使用请登录</h6>
<ul class="tab"> <ul class="tab">
<li v-for="(item,index) in tabList" :key="index" :class="{active: form.distinguish == item.id}" @click="typeClick(item)">{{item.label}}</li> <li v-for="(item, index) in tabList" :key="index" :class="{ active: form.distinguish == item.id }"
@click="typeClick(item)">{{ item.label }}</li>
</ul> </ul>
<el-form :model="form" :rules="rules" ref="form" style="margin-top: 20px"> <el-form :model="form" :rules="rules" ref="form" style="margin-top: 20px">
<!-- 学号工号 --> <!-- 学号工号 -->
<div v-show="!form.distinguish"> <div v-show="!form.distinguish && !verCodeLogin" class="items">
<el-form-item class="school-select" prop="schoolId">
<label class="label school"></label>
<el-select v-model="form.schoolId" clearable filterable placeholder="请选择学校">
<el-option v-for="(item, i) in schoolList" :key="i" :label="item.schoolName" :value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<el-form-item class="flex-1" prop="workNumber"> <el-form-item class="flex-1" prop="workNumber">
<label class="label account"></label> <label class="label account"></label>
<el-input v-model.trim="form.workNumber" :placeholder="'请输入学号/工号'" @keyup.enter.native="submit"></el-input> <el-input v-model.trim="form.workNumber" placeholder="请输入学号/工号/手机号/邮箱"
@keyup.enter.native="submit"></el-input>
</el-form-item> </el-form-item>
</div> </div>
<!-- 手机号登录 --> <!-- 手机号登录 -->
@ -25,7 +21,7 @@
<label class="label account"></label> <label class="label account"></label>
<el-input v-model.trim="form.account" placeholder="请输入账号" @keyup.enter.native="submit"></el-input> <el-input v-model.trim="form.account" placeholder="请输入账号" @keyup.enter.native="submit"></el-input>
</el-form-item> </el-form-item>
<template v-if="form.distinguish === 2"> <template v-if="verCodeLogin">
<el-form-item prop="account"> <el-form-item prop="account">
<label class="label account"></label> <label class="label account"></label>
<el-input v-model.trim="form.account" placeholder="请输入手机号/邮箱" @keyup.enter.native="submit"></el-input> <el-input v-model.trim="form.account" placeholder="请输入手机号/邮箱" @keyup.enter.native="submit"></el-input>
@ -33,36 +29,30 @@
<el-form-item prop="code"> <el-form-item prop="code">
<label class="label code"></label> <label class="label code"></label>
<div class="ver-code"> <div class="ver-code">
<el-input v-model="form.code" placeholder="请输入验证码" maxlength="6" @keyup.enter.native="submit"></el-input> <el-input v-model="form.code" placeholder="请输入验证码" maxlength="6"
<el-button type="text" @click="sendPhoneCodeLogin" :disabled="phoneDisabledLogin">{{ phoneBtnTextLogin }} @keyup.enter.native="submit"></el-input>
<el-button type="text" @click="sendPhoneCodeLogin" :disabled="phoneDisabledLogin">{{ phoneBtnTextLogin
}}
</el-button> </el-button>
</div> </div>
</el-form-item> </el-form-item>
</template> </template>
<template v-if="form.distinguish !== 2"> <template v-else>
<el-form-item prop="password"> <el-form-item prop="password">
<label class="password label"></label> <label class="password label"></label>
<el-input <el-input type="password" placeholder="请输入密码" v-model.trim="form.password" @keyup.enter.native="submit">
type="password"
placeholder="请输入密码"
v-model.trim="form.password"
@keyup.enter.native="submit"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code"> <el-form-item prop="code">
<label class="label code"></label> <label class="label code"></label>
<el-input <el-input placeholder="请输入验证码" v-model.trim="form.code" @keyup.enter.native="submit">
placeholder="请输入验证码"
v-model.trim="form.code"
@keyup.enter.native="submit"
>
</el-input> </el-input>
<img @click="getVerImg" :src="verificationIMG" class="ver-img" alt=""> <img @click="getVerImg" :src="verificationIMG" class="ver-img" alt="">
</el-form-item> </el-form-item>
</template> </template>
<div v-show="!form.distinguish" class="default-check"> <div class="bottom">
<el-checkbox v-model="setDefault">设置为默认学校</el-checkbox> <el-link :underline="false" type="primary" @click="switchType">{{ verCodeLogin ? '密码' : '验证码' }}登录</el-link>
<el-link :underline="false" type="primary" @click="toAccount">没有账号点击申请</el-link>
</div> </div>
<el-button class="submit" type="primary" @click="submit">登录</el-button> <el-button class="submit" type="primary" @click="submit">登录</el-button>
</el-form> </el-form>
@ -78,7 +68,9 @@
<el-form-item label="验证码"> <el-form-item label="验证码">
<div class="ver-code"> <div class="ver-code">
<el-input v-model="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input> <el-input v-model="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input>
<el-button style="top: 1px" type="text" @click="sendPhoneCode(1)" :disabled="binding === '' || phoneDisabled">{{phoneBtnText}}</el-button> <el-button style="top: 1px" type="text" @click="sendPhoneCode(1)"
:disabled="binding === '' || phoneDisabled">{{
phoneBtnText }}</el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -87,7 +79,8 @@
<el-button size="small" type="primary" @click="phoneSubmit"> </el-button> <el-button size="small" type="primary" @click="phoneSubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="请选择您要登录的用户" :visible.sync="userVisible" :close-on-click-modal="false" custom-class="user-dia" width="500px"> <el-dialog title="请选择您要登录的用户" :visible.sync="userVisible" :close-on-click-modal="false" custom-class="user-dia"
width="500px">
<p class="tips">该手机号已绑定以下用户信息</p> <p class="tips">该手机号已绑定以下用户信息</p>
<ul class="users"> <ul class="users">
<li :class="{ isEnable: !user.isEnable }" v-for="(user, i) in users" :key="i" @click="chooseUser(user)"> <li :class="{ isEnable: !user.isEnable }" v-for="(user, i) in users" :key="i" @click="chooseUser(user)">
@ -96,7 +89,8 @@
</li> </li>
</ul> </ul>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="infoVisible" :close-on-click-modal="false" :show-close="false" custom-class="info-dia" width="400px"> <el-dialog :visible.sync="infoVisible" :close-on-click-modal="false" :show-close="false" custom-class="info-dia"
width="400px">
<div class="info-header"> <div class="info-header">
<i class="el-icon-warning"></i> <i class="el-icon-warning"></i>
提示 提示
@ -136,36 +130,30 @@ export default {
tabList: [ tabList: [
{ {
id: 0, id: 0,
label: '学号/工号登录' label: '学生/老师登录'
}, { }, {
id: 1, id: 1,
label: '学校管理员登录' label: '学校管理员登录'
}, {
id: 2,
label: '手机号/邮箱'
} }
], ],
setDefault: !!util.local.get(schoolIdKey), // id
verificationIMG: '', verificationIMG: '',
schoolList: [], schoolList: [],
form: { form: {
schoolId: '',
workNumber: '', workNumber: '',
account: '', account: '', //
password: '', password: '',
code: '', // code: '', //
random: '', // random: '', //
distinguish: 0, // ,1,2 platform: Setting.platformId,
type: 2, // 0-> 1-> 2-> distinguish: 0,
platform: Setting.platformId
}, },
rules: { rules: {
schoolId: [{ required: true, message: "请选择学校", trigger: "change" }], workNumber: [{ required: true, message: "请输入学号/工号/手机号/邮箱", trigger: "blur" }],
workNumber: [{ required: true, message: "请输入学生学号", trigger: "blur" }],
account: [{ required: false, message: "请输入账号", trigger: "blur" }], account: [{ required: false, message: "请输入账号", trigger: "blur" }],
password: [{ required: true, message: "请输入密码", trigger: "blur" }], password: [{ required: true, message: "请输入密码", trigger: "blur" }],
code: [{ required: true, message: "请输入验证码", trigger: "blur" }] code: [{ required: true, message: "请输入验证码", trigger: "blur" }]
}, },
verCodeLogin: false,
phoneDisabledLogin: false, phoneDisabledLogin: false,
phoneTimerLogin: null, phoneTimerLogin: null,
phoneBtnTextLogin: '发送验证码', phoneBtnTextLogin: '发送验证码',
@ -188,7 +176,6 @@ export default {
}, },
components: { vHead, vFooter }, components: { vHead, vFooter },
mounted () { mounted () {
this.getSchool()
this.getVerImg() this.getVerImg()
}, },
methods: { methods: {
@ -198,27 +185,17 @@ export default {
...mapActions('user', [ ...mapActions('user', [
'login', 'setCustomer' 'login', 'setCustomer'
]), ]),
// id //
setSchool(list) { handleRule () {
this.schoolList = list const type = this.form.distinguish
// id const rules = this.rules
const schoolId = util.local.get(schoolIdKey) rules.workNumber[0].required = !type && !this.verCodeLogin
if (schoolId) this.form.schoolId = schoolId rules.account[0].required = (!type && this.verCodeLogin) || type
}, this.rules.account[0].message = type ?
// '请输入账号' :
getSchool() { this.verCodeLogin ?
const schoolList = util.local.get('schoolList') '请输入手机号/邮箱' :
if (schoolList && schoolList.length) { '请输入学号/工号/手机号/邮箱'
this.setSchool(schoolList)
} else {
this.$get(this.api.querySchool, {
provinceId: '',
cityId: ''
}).then(({ list }) => {
this.setSchool(list)
util.local.set('schoolList', list)
}).catch(res => {})
}
}, },
// //
typeClick (tab) { typeClick (tab) {
@ -237,14 +214,7 @@ export default {
platform: form.platform platform: form.platform
} }
this.$refs.form.clearValidate() this.$refs.form.clearValidate()
// this.handleRule()
const rules = this.rules
rules.schoolId[0].required = id === 0
rules.workNumber[0].required = id === 0
rules.account[0].required = !!id
this.rules.account[0].message = id === 1 ?
'请输入账号' :
'请输入手机号/邮箱'
}, },
// //
chooseUser (user) { chooseUser (user) {
@ -282,11 +252,7 @@ export default {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
const form = JSON.parse(JSON.stringify(this.form)) const form = JSON.parse(JSON.stringify(this.form))
const { distinguish } = form if (this.verCodeLogin) form.distinguish = 2
if (!form.distinguish && this.setDefault) util.local.set(schoolIdKey, form.schoolId) //
if (util.local.get(schoolIdKey) && !this.setDefault) util.local.remove(schoolIdKey) // id
if (distinguish) form.schoolId = ''
if (!distinguish) form.distinguish = 1
this.$post(this.api.logins, form).then(({ status, data, message }) => { this.$post(this.api.logins, form).then(({ status, data, message }) => {
// //
if (status == 30001) { if (status == 30001) {
@ -294,23 +260,23 @@ export default {
this.getVerImg() this.getVerImg()
form.code = '' form.code = ''
} else if (status == 200) { } else if (status == 200) {
const accounts = data.userAccounts
// //
if (data instanceof Array) { if (accounts instanceof Array) {
// this.users = accounts
if (data.length === 1) {
this.chooseUser(data[0])
} else {
this.users = data
this.userVisible = true this.userVisible = true
}
} else { } else {
this.token = data.token this.token = data.token
this.setLogin() this.setLogin()
} }
} else { } else {
form.code = ''
util.errorMsg(message) util.errorMsg(message)
} }
}).catch(res => {}) }).catch(res => {
this.getVerImg()
form.code = ''
})
} }
}) })
}, },
@ -322,16 +288,27 @@ export default {
// //
verifyPhone (phone) { verifyPhone (phone) {
if (!phone) { if (!phone) {
util.warningMsg("请输入手机号") this.$message.error("请输入手机号")
return false return false
} }
if (!/^1[3456789]\d{9}$/.test(phone) && !/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(phone)) { if (!/^1[3456789]\d{9}$/.test(phone) && !/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(phone)) {
util.warningMsg("请输入正确的手机号/邮箱") this.$message.error("请输入正确的手机号/邮箱")
return false return false
} }
return true return true
}, },
//
switchType () {
this.verCodeLogin = !this.verCodeLogin
this.$refs.form.clearValidate()
this.handleRule()
},
//
toAccount () {
this.accountVisible = true
},
// //
phoneCountdownLogin () { phoneCountdownLogin () {
let count = 60 let count = 60
@ -457,6 +434,7 @@ export default {
const { workNumber, schoolId } = this.form const { workNumber, schoolId } = this.form
if (this.binding) { if (this.binding) {
this.$post(this.api.bindPhoneOrEmail, { this.$post(this.api.bindPhoneOrEmail, {
mark: 2,
phone, phone,
types: 2, types: 2,
code: phoneCode, code: phoneCode,
@ -479,16 +457,19 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.wrap { .wrap {
min-height: 100%; min-height: 100%;
background-color: #F3F6FA; background-color: #f3f6fa;
} }
.ver-code { .ver-code {
position: relative; position: relative;
.el-button { .el-button {
position: absolute; position: absolute;
top: 10px; top: 10px;
right: 10px; right: 10px;
} }
} }
.login { .login {
min-height: calc(100vh - 70px); min-height: calc(100vh - 70px);
padding-top: calc((100vh - 611px) / 2); padding-top: calc((100vh - 611px) / 2);
@ -498,12 +479,14 @@ export default {
url(../../../assets/img/shapes/shape4.png) (right 50%) / auto no-repeat, url(../../../assets/img/shapes/shape4.png) (right 50%) / auto no-repeat,
url(../../../assets/img/shapes/shape5.png) (right 80%) / auto no-repeat, url(../../../assets/img/shapes/shape5.png) (right 80%) / auto no-repeat,
url(../../../assets/img/shapes/shape6.png) (right bottom) / auto no-repeat; url(../../../assets/img/shapes/shape6.png) (right bottom) / auto no-repeat;
.tab { .tab {
display: flex; display: flex;
justify-content: space-between; justify-content: space-around;
align-items: center; align-items: center;
margin-bottom: 24px; margin-bottom: 24px;
border-bottom: 2px solid #E1E6F2; border-bottom: 2px solid #e1e6f2;
li { li {
padding: 18px 0; padding: 18px 0;
margin-bottom: -1px; margin-bottom: -1px;
@ -511,50 +494,62 @@ export default {
color: #555; color: #555;
cursor: pointer; cursor: pointer;
border-bottom: 4px solid transparent; border-bottom: 4px solid transparent;
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
&.active { &.active {
color: $main-color;; color: $main-color;
border-bottom-color: $main-color; border-bottom-color: $main-color;
} }
} }
} }
.items { .items {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.form { .form {
width: 436px; width: 436px;
padding: 38px 38px 60px; padding: 38px 38px 60px;
margin: 0 auto 0; margin: 0 auto 0;
border-radius: 6px; border-radius: 6px;
background-color: #fff; background-color: #fff;
.title { .title {
margin-bottom: 25px; margin-bottom: 25px;
font-size: 26px; font-size: 26px;
color: #0B1D30; color: #0b1d30;
letter-spacing: 4px; letter-spacing: 4px;
} }
} }
/deep/.el-form-item { /deep/.el-form-item {
margin-bottom: 20px; margin-bottom: 20px;
} }
/deep/.el-input__inner { /deep/.el-input__inner {
position: relative; position: relative;
height: 52px; height: 52px;
padding: 0 20px 0 34px; padding: 0 20px 0 34px;
line-height: 50px; line-height: 50px;
background-color: #FBFBFB; background-color: #fbfbfb;
border: 1px solid #E1E6F2; border: 1px solid #e1e6f2;
border-radius: 4px !important; border-radius: 4px !important;
} }
.default-check {
text-align: right; .bottom {
display: flex;
justify-content: space-between;
} }
.el-select { .el-select {
width: 100%; width: 100%;
} }
.label { .label {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
@ -564,32 +559,39 @@ export default {
height: 18px; height: 18px;
background: url(../../../assets/img/login/account.png) 0 0/100% 100% no-repeat; background: url(../../../assets/img/login/account.png) 0 0/100% 100% no-repeat;
} }
.school { .school {
background-image: url(../../../assets/img/login/school.png); background-image: url(../../../assets/img/login/school.png);
} }
.workNumber { .workNumber {
width: 17px; width: 17px;
background-image: url(../../../assets/img/login/workNumber.png); background-image: url(../../../assets/img/login/workNumber.png);
} }
.password { .password {
top: 18px; top: 18px;
background-image: url(../../../assets/img/login/password.png); background-image: url(../../../assets/img/login/password.png);
} }
.code { .code {
top: 18px; top: 18px;
background-image: url(../../../assets/img/login/code.png); background-image: url(../../../assets/img/login/code.png);
} }
.ver-img { .ver-img {
position: absolute; position: absolute;
top: 1px; top: 1px;
right: 1px; right: 1px;
} }
/deep/.el-form-item__error { /deep/.el-form-item__error {
top: 105%; top: 105%;
left: auto; left: auto;
right: 0; right: 0;
color: #FFA94E; color: #ffa94e;
} }
.submit { .submit {
width: 100%; width: 100%;
height: 48px; height: 48px;
@ -602,31 +604,37 @@ export default {
border: 0; border: 0;
} }
} }
.copyright { .copyright {
padding: 18px 0; padding: 18px 0;
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
background-color: #F3F6FA; background-color: #f3f6fa;
a { a {
color:#B1B4B8; color: #b1b4b8;
font-size: 12px; font-size: 12px;
&:hover { &:hover {
opacity: .8; opacity: 0.8;
} }
} }
} }
.tips { .tips {
margin: 0 0 10px 5px; margin: 0 0 10px 5px;
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
color: #666; color: #666;
} }
/deep/.user-dia { /deep/.user-dia {
.tips { .tips {
margin-bottom: 20px; margin-bottom: 20px;
text-align: center; text-align: center;
color: #666; color: #666;
} }
.users { .users {
li { li {
display: flex; display: flex;
@ -638,27 +646,33 @@ export default {
font-size: 14px; font-size: 14px;
background-color: #ebeef5; background-color: #ebeef5;
cursor: pointer; cursor: pointer;
&.isEnable { &.isEnable {
color: #c0c4cc; color: #c0c4cc;
background-color: #f5f7fa; background-color: #f5f7fa;
cursor: not-allowed; cursor: not-allowed;
} }
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
&:hover { &:hover {
background-color: #d3e0ff; background-color: #d3e0ff;
} }
i { i {
font-size: 16px; font-size: 16px;
} }
} }
} }
} }
/deep/.info-dia { /deep/.info-dia {
.el-dialog__header { .el-dialog__header {
border-bottom: 0; border-bottom: 0;
} }
.info-header { .info-header {
position: absolute; position: absolute;
top: 20px; top: 20px;
@ -667,38 +681,46 @@ export default {
font-size: 16px; font-size: 16px;
color: #333; color: #333;
} }
.el-icon-warning { .el-icon-warning {
margin-right: 10px; margin-right: 10px;
color: #e6a23c; color: #e6a23c;
font-size: 24px; font-size: 24px;
} }
.info-wrap { .info-wrap {
padding: 10px 33px; padding: 10px 33px;
} }
.users { .users {
max-height: 125px; max-height: 125px;
margin-top: 20px; margin-top: 20px;
overflow: auto; overflow: auto;
li { li {
margin: 5px; margin: 5px;
font-size: 14px; font-size: 14px;
color: #333; color: #333;
} }
} }
.info-footer { .info-footer {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
// align-items: center; // align-items: center;
margin-top: 20px; margin-top: 20px;
} }
.el-button { .el-button {
width: 142px; width: 142px;
} }
.unbind { .unbind {
white-space: normal; white-space: normal;
line-height: 1.6; line-height: 1.6;
} }
} }
@media (max-height: 680px) { @media (max-height: 680px) {
.wrap .login { .wrap .login {
padding: 40px 0; padding: 40px 0;

@ -18,17 +18,17 @@
<div class="source"><img src="@/assets/img/data2.png" alt=""> 数据来源{{dataSource}}</div> <div class="source"><img src="@/assets/img/data2.png" alt=""> 数据来源{{dataSource}}</div>
<div class="page-content"> <div class="page-content">
<el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="id" highlight-current-row @current-change="previewCurrentChange"> <el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="id" highlight-current-row @current-change="previewCurrentChange">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="showName" label="数据表名称" min-width="300" align="center" :show-overflow-tooltip="true"></el-table-column> <el-table-column prop="showName" label="数据表名称" min-width="220" align="center" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="dataTotal" label="数据总量" width="90" align="center"></el-table-column> <el-table-column prop="dataTotal" label="数据总量" width="90" align="center"></el-table-column>
<el-table-column prop="timeRange" label="起止时间" width="220" align="center"></el-table-column> <el-table-column prop="timeRange" label="起止时间" width="175" align="center"></el-table-column>
<el-table-column prop="dataSize" label="数据大小" width="90" align="center"> <el-table-column prop="dataSize" label="数据大小" width="90" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.dataSize}}M {{scope.row.dataSize}}M
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="updateTime" label="更新时间" width="170" align="center"></el-table-column> <el-table-column prop="updateTime" label="更新时间" width="155" align="center"></el-table-column>
<el-table-column label="操作" width="200" align="center"> <el-table-column label="操作" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="preview(scope.row)" v-auth>预览</el-button> <el-button type="text" @click="preview(scope.row)" v-auth>预览</el-button>
<el-button type="text" @click="download(scope.row)" v-auth>下载</el-button> <el-button type="text" @click="download(scope.row)" v-auth>下载</el-button>
@ -487,7 +487,8 @@ export default {
display: flex; display: flex;
padding-bottom: 20px !important; padding-bottom: 20px !important;
/deep/.left{ /deep/.left{
height: calc(100vh - 166px); width: 239px;
height: calc(100vh - 190px);
margin-right: 20px; margin-right: 20px;
overflow: auto; overflow: auto;
&::-webkit-scrollbar { &::-webkit-scrollbar {
@ -553,8 +554,7 @@ export default {
} }
} }
.right{ .right{
flex: 1; width: calc(100% - 260px);
max-width: calc(100% - 220px);
.page{ .page{
margin-bottom: 20px; margin-bottom: 20px;
.source { .source {

@ -1,12 +1,13 @@
<template> <template>
<div class="wrap" :class="{index: !keyword, result: keyword}"> <div class="wrap index" :class="{result: keyword}">
<img class="screen" src="@/assets/img/index/index0.png" alt="首页">
<div class="banner"> <div class="banner">
<video class="video" ref="video" autoplay muted loop> <video class="video" ref="video" autoplay muted loop>
<source src="@/assets/video/sky.mp4" type="video/mp4"> <source src="@/assets/video/sky.mp4" type="video/mp4">
您的浏览器不支持 video 标签 您的浏览器不支持 video 标签
</video> </video>
<div class="banner-inner"> <div class="banner-inner">
<div class="title" v-if="!keyword">准确多元海量数据</div> <div class="banner-title">准确多元海量数据</div>
<div class="search-wrap"> <div class="search-wrap">
<div class="search"> <div class="search">
<input ref="keyword" v-model="keyword" type="text" placeholder="请输入关键词"> <input ref="keyword" v-model="keyword" type="text" placeholder="请输入关键词">
@ -24,22 +25,22 @@
</div> </div>
<div class="list-wrap" v-if="keyword"> <div class="list-wrap" v-if="keyword">
<div class="tips"> <div class="tips">
<p class="result"><img src="@/assets/img/index/search.png" alt=""> 搜索结果</p> <p class="result-title"><img src="@/assets/img/index/search.png" alt=""> 搜索结果</p>
<p class="num">搜索完成共有{{total}}个结果匹配</p> <p class="num">搜索完成共有{{total}}个结果匹配</p>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center"> <el-table :data="listData" class="table" ref="table" stripe header-align="center">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="showName" label="数据表名称" align="center" :show-overflow-tooltip="true"></el-table-column> <el-table-column prop="showName" label="数据表名称" align="center" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="timeRange" label="起止日期" width="220" align="center"></el-table-column> <el-table-column prop="timeRange" label="起止日期" width="180" align="center"></el-table-column>
<el-table-column prop="dataTotal" label="数据总量" align="center"></el-table-column> <el-table-column prop="dataTotal" label="数据总量" width="90" align="center"></el-table-column>
<el-table-column prop="dataSize" label="数据大小" align="center"> <el-table-column prop="dataSize" label="数据大小" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.dataSize}}M {{scope.row.dataSize}}M
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="更新时间" align="center"></el-table-column> <el-table-column prop="createTime" label="更新时间" width="155" align="center"></el-table-column>
<el-table-column label="操作" width="180"> <el-table-column label="操作" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="preview(scope.row)">预览</el-button> <el-button type="text" @click="preview(scope.row)">预览</el-button>
<el-button type="text" @click="download(scope.row)">下载</el-button> <el-button type="text" @click="download(scope.row)">下载</el-button>
@ -231,6 +232,40 @@
<el-button size="small" type="primary" @click="confirmDown">确定</el-button> <el-button size="small" type="primary" @click="confirmDown">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<div class="tool">
<div class="item wechat"></div>
<div class="popup wechat-popup">
<p class="tips">微信扫码添加职站售前咨询</p>
<p class="des">提供付费咨询及解决方案</p>
<img width="150" src="@/assets/img/index/customer.png" alt="">
</div>
<div class="item tel"></div>
<div class="popup tel-popup">
<div class="tel-inner">
<div class="line">
<div>
<img class="icon" src="@/assets/img/index/tel-2.png" alt="">
</div>
<div class="text">
<p class="title">售前咨询</p>
<p class="tel-num" style="margin-bottom: 5px">刘老师</p>
<p class="tel-num">18019930142</p>
</div>
</div>
<div class="line">
<div>
<img class="icon" src="@/assets/img/index/sug.png" alt="">
</div>
<div class="text">
<p class="title" @click="toQues">咨询建议与反馈</p>
<p class="des">您的每一条建议声音我们都认真对待</p>
</div>
</div>
</div>
</div>
<div class="item topping" @click="topping"></div>
</div>
</div> </div>
</template> </template>
@ -346,15 +381,13 @@ export default {
}, },
// //
getHot(){ getHot(){
this.$get(this.api.queryDatabaseInfo).then(res => { this.$get(this.api.queryDatabaseInfo).then(({ data }) => {
let list = res.data
list.map(n => n.download)
// //
list.sort((a,b) => { data.sort((a,b) => {
return b.download - a.download return b.downloads - a.downloads
}) })
// //
this.hotData = list.slice(0,3) this.hotData = data.slice(0,3)
}).catch(res => {}) }).catch(res => {})
}, },
initData(){ initData(){
@ -375,7 +408,7 @@ export default {
// , // ,
if(this.token){ if(this.token){
if (this.routes.find(e => e.path === '/data/list')) { if (this.routes.find(e => e.path === '/data/list')) {
this.$router.push(`/data?typeId=${row.categoryTwoId}`) this.$router.push(`/data?typeId=${row.secondId}`)
} else { } else {
this.keyword = row.categoryTwo this.keyword = row.categoryTwo
} }
@ -390,6 +423,15 @@ export default {
this.active = i this.active = i
document.querySelector(`#part${i}`).scrollIntoView() document.querySelector(`#part${i}`).scrollIntoView()
}, },
//
topping() {
document.documentElement.scrollTop = 0
document.body.scrollTop = 0
},
//
toQues() {
window.open('https://www.wjx.cn/vm/wB0RcMm.aspx')
},
preview(row) { preview(row) {
// //
if(this.token){ if(this.token){
@ -572,6 +614,10 @@ export default {
.wrap{ .wrap{
position: relative; position: relative;
background-color: #F3F6FA; background-color: #F3F6FA;
.screen {
position: absolute;
top: -1000px;
}
.banner{ .banner{
position: relative; position: relative;
height: 518px; height: 518px;
@ -586,7 +632,7 @@ export default {
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
} }
.title{ .banner-title{
margin-bottom: 37px; margin-bottom: 37px;
font-size: 45px; font-size: 45px;
color: #fff; color: #fff;
@ -654,12 +700,11 @@ export default {
} }
} }
&.result{ &.result{
.banner{
padding: 46px 0;
}
.tips{ .tips{
margin-bottom: 22px; margin-bottom: 22px;
.result{ .result-title{
display: flex;
align-items: center;
margin: 30px 0 10px; margin: 30px 0 10px;
font-size: 17px; font-size: 17px;
color: $main-color; color: $main-color;
@ -998,4 +1043,103 @@ export default {
overflow: auto; overflow: auto;
} }
} }
.tool {
z-index: 10;
position: fixed;
bottom: 100px;
right: 30px;
.item {
width: 45px;
height: 45px;
margin-bottom: 10px;
border: 1px solid #e5e5e5;
cursor: pointer;
}
.wechat {
background: #fff url(../../../assets/img/index/wechat.png) center center/auto no-repeat;
&:hover {
background-image: url(../../../assets/img/index/wechat-1.png);
background-color: #006EFF;
& + .popup {
display: block;
}
}
}
.tel {
background: #fff url(../../../assets/img/index/tel.png) center center/auto no-repeat;
&:hover {
background-image: url(../../../assets/img/index/tel-1.png);
background-color: #006EFF;
& + .popup {
display: block;
}
}
}
.topping {
background: #fff url(../../../assets/img/index/top.png) center center/auto no-repeat;
&:hover {
background-image: url(../../../assets/img/index/top-1.png);
background-color: #006EFF;
}
}
.popup {
position: absolute;
display: none;
}
.wechat-popup {
top: -100px;
left: -230px;
padding: 20px;
text-align: center;
background-color: #fff;
box-shadow: 0px 0px 7px 0px rgba(203, 203, 203, 0.55);
.tips {
font-size: 14px;
}
.des {
margin: 5px 0 15px;
font-size: 12px;
color: #333;
}
}
.tel-popup {
top: -10px;
left: -250px;
width: 250px;
border-right: 20px solid transparent;
&:hover {
display: block;
}
.tel-inner {
padding: 20px;
background-color: #fff;
box-shadow: 0px 0px 7px 0px rgba(203, 203, 203, 0.55);
}
.line {
display: flex;
&:first-child {
margin-bottom: 20px;
}
}
.text {
margin-left: 15px;
}
.title {
margin-bottom: 5px;
font-size: 14px;
cursor: pointer;
&:hover {
color: #006EFF;
}
}
.tel-num {
font-size: 12px;
color: #006EFF;
}
.des {
font-size: 12px;
color: #686868;
}
}
}
</style> </style>

@ -117,7 +117,7 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
this.$get(`${this.api.listRole}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=${Setting.platformId}`).then(res => { this.$get(`${this.api.listRole}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=${Setting.platformId}&port=0`).then(res => {
this.listData = res.rolePage.records this.listData = res.rolePage.records
this.total = res.rolePage.total this.total = res.rolePage.total
if(!this.listData.length && this.total){ if(!this.listData.length && this.total){

@ -1,7 +1,10 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<!-- 全屏 --> <!-- 全屏 -->
<img class="full" src="@/assets/img/screen/full.png" alt="" @click="fullScreen"> <img class="full"
src="@/assets/img/screen/full.png"
alt=""
@click="fullScreen">
<!--header--> <!--header-->
<div class="header"> <div class="header">
<div class="bg_header"> <div class="bg_header">
@ -34,10 +37,13 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_1.png" alt=""> <img src="@/assets/img/screen/t_1.png"
alt="">
中国宏观杠杆率 中国宏观杠杆率
</div> </div>
<div id="chart1" class="chart" style="height: 280px;"></div> <div id="chart1"
class="chart"
style="height: 280px;"></div>
</div> </div>
<div class="item"> <div class="item">
<div class="t_line_box"> <div class="t_line_box">
@ -57,10 +63,13 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_2.png" alt=""> <img src="@/assets/img/screen/t_2.png"
alt="">
新增信贷数据 新增信贷数据
</div> </div>
<div id="chart5" class="chart t_btn9" style="height: 280px;"></div> <div id="chart5"
class="chart t_btn9"
style="height: 280px;"></div>
</div> </div>
<div class="item"> <div class="item">
<div class="t_line_box"> <div class="t_line_box">
@ -80,7 +89,8 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_7.png" alt=""> <img src="@/assets/img/screen/t_7.png"
alt="">
{{ goodsSell.length ? goodsSell[0].operation_time.substr(0, 4) : 2021 }}年商品零售价格指数 {{ goodsSell.length ? goodsSell[0].operation_time.substr(0, 4) : 2021 }}年商品零售价格指数
</div> </div>
<div class="main_table"> <div class="main_table">
@ -93,10 +103,13 @@
</thead> </thead>
</table> </table>
</div> </div>
<div class="main_table" ref="tableWrap" style="height: 196px;margin-top: 0;overflow: auto"> <div class="main_table"
ref="tableWrap"
style="height: 196px;margin-top: 0;overflow: auto">
<table> <table>
<tbody> <tbody>
<tr v-for="(item, i) in goodsSell" :key="i"> <tr v-for="(item, i) in goodsSell"
:key="i">
<td width="70%">{{ item.hct }}</td> <td width="70%">{{ item.hct }}</td>
<td>{{ item.rcpi }}</td> <td>{{ item.rcpi }}</td>
</tr> </tr>
@ -106,7 +119,8 @@
</div> </div>
</div> </div>
<div class="middle"> <div class="middle">
<div class="item" style="height: 350px"> <div class="item"
style="height: 350px">
<!--左上边框--> <!--左上边框-->
<div class="t_line_box"> <div class="t_line_box">
<i class="t_l_line"></i> <i class="t_l_line"></i>
@ -128,31 +142,38 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_3.png" alt=""> <img src="@/assets/img/screen/t_3.png"
加密货币行情 alt="">
中国GDP年率报告
</div> </div>
<div class="main_table"> <div class="main_table">
<table> <table>
<thead> <thead>
<tr> <tr>
<th width="30%">币种</th> <th width="50%">时间</th>
<th width="25%">最新价</th> <th width="50%">年率</th>
<th width="25%">24H成交量</th>
<th>24H涨跌</th>
</tr> </tr>
</thead> </thead>
</table>
</div>
<div class="main_table"
ref="gdpList"
style="max-height: 260px;margin-top: 0;overflow: auto;">
<table>
<tbody> <tbody>
<tr v-for="(item, i) in cryptoList" :key="i"> <template v-for="(item, i) in gdps">
<td>{{ item.currencyPair }}</td> <tr v-if="item.value != '0'"
<td>${{ item.amount }}</td> :key="i">
<td>{{ parseInt(item.total) }}M</td> <td width="50%">{{ item.date_index }}</td>
<td><p :class="['percent', {fall: item.percent < 0}]">{{ (item.percent * 100).toFixed(2) }}%</p></td> <td width="50%">${{ item.value }}</td>
</tr> </tr>
</template>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
<div class="item" style="height: 520px;"> <div class="item"
style="height: 520px;">
<!--左上边框--> <!--左上边框-->
<div class="t_line_box"> <div class="t_line_box">
<i class="t_l_line"></i> <i class="t_l_line"></i>
@ -174,15 +195,24 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_3.png" alt=""> <img src="@/assets/img/screen/t_3.png"
alt="">
主要央行利率 主要央行利率
</div> </div>
<div class="earth"> <div class="earth">
<img class="lbx" src="@/assets/img/screen/lbx.png" alt=""> <img class="lbx"
<img class="jt" src="@/assets/img/screen/jt.png" alt=""> src="@/assets/img/screen/lbx.png"
<img class="map" src="@/assets/img/screen/map.png" alt=""> alt="">
<img class="jt"
src="@/assets/img/screen/jt.png"
alt="">
<img class="map"
src="@/assets/img/screen/map.png"
alt="">
</div> </div>
<div class="chart" id="chart7" style="height: 500px"></div> <div class="chart"
id="chart7"
style="height: 500px"></div>
</div> </div>
</div> </div>
<div class="right"> <div class="right">
@ -208,10 +238,13 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_4.png" alt=""> <img src="@/assets/img/screen/t_4.png"
alt="">
全国税收收入 全国税收收入
</div> </div>
<div id="chart3" class="echart t_btn7" style="height: 280px;"></div> <div id="chart3"
class="echart t_btn7"
style="height: 280px;"></div>
</div> </div>
<div class="item"> <div class="item">
<!--左上边框--> <!--左上边框-->
@ -235,10 +268,12 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_5.png" alt=""> <img src="@/assets/img/screen/t_5.png"
alt="">
央行货币当局资产负债 央行货币当局资产负债
</div> </div>
<div id="chart4" style="height: 280px;"></div> <div id="chart4"
style="height: 280px;"></div>
</div> </div>
<div class="item"> <div class="item">
<div class="t_line_box"> <div class="t_line_box">
@ -258,10 +293,13 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_7.png" alt=""> <img src="@/assets/img/screen/t_7.png"
alt="">
以美元计算进口年率 以美元计算进口年率
</div> </div>
<div id="chart6" class="chart" style="height: 270px;"></div> <div id="chart6"
class="chart"
style="height: 270px;"></div>
</div> </div>
</div> </div>
</div> </div>
@ -281,15 +319,22 @@ export default {
stompClientMarket: null, stompClientMarket: null,
stompClient: null, stompClient: null,
goodsSell: [], goodsSell: [],
cryptoList: [] cryptoList: [],
gdps: []
} }
}, },
mounted () { mounted () {
this.connect() this.getList()
this.renderChart() this.renderChart()
this.renderMap() this.renderMap()
}, },
methods: { methods: {
// gdp
getList () {
this.$get(`${this.api.visualPreview}?tableName=hg_zg_gm_zhongguogdpnianlvbaogao&tableId=17`).then(({ comment, data }) => {
this.gdps = data
}).catch(res => { })
},
// //
getCrypto () { getCrypto () {
this.$get(`${this.api.getTopList}`).then(res => { this.$get(`${this.api.getTopList}`).then(res => {
@ -1215,9 +1260,13 @@ export default {
// //
scrollTable () { scrollTable () {
const dom = this.$refs.tableWrap const dom = this.$refs.tableWrap
const dom1 = this.$refs.gdpList
setInterval(() => { setInterval(() => {
dom.scrollTop += 1 dom.scrollTop += 1
if (dom.clientHeight + dom.scrollTop === dom.scrollHeight) dom.scrollTop = 0 if (dom.clientHeight + dom.scrollTop === dom.scrollHeight) dom.scrollTop = 0
dom1.scrollTop += 1
if (dom1.clientHeight + dom1.scrollTop === dom1.scrollHeight) dom1.scrollTop = 0
}, 30) }, 30)
} }
} }
@ -1225,5 +1274,5 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "../../../styles/page/screen.scss"; @import '../../../styles/page/screen.scss';
</style> </style>

@ -310,7 +310,7 @@ export default {
}, },
// //
getRole(){ getRole(){
this.$get(`${this.api.listRole}?page=1&size=1000&name=&platformId=${Setting.platformId}`).then(res => { this.$get(`${this.api.listRole}?page=1&size=1000&name=&platformId=${Setting.platformId}&port=0`).then(res => {
const list = res.rolePage.records const list = res.rolePage.records
this.roleList = list this.roleList = list
}).catch(res => {}) }).catch(res => {})

@ -1,9 +1,10 @@
import axios from 'axios' import axios from 'axios'
import util from '@/libs/util' import Util from '@/libs/util'
import router from '@/router/index' import router from '@/router/index'
import Setting from '@/setting' import Setting from '@/setting'
import store from '@/store' import store from '@/store'
import api from '@/api' import api from '@/api'
import { Message } from 'element-ui'
const baseURL = Setting.apiBaseURL const baseURL = Setting.apiBaseURL
const service = axios.create({ const service = axios.create({
@ -17,17 +18,24 @@ let check = true
let checkTimer = null let checkTimer = null
// 检测账号是否被禁用,如果禁用则提示并退出登录 // 检测账号是否被禁用,如果禁用则提示并退出登录
function checkDisabled () { function checkDisabled () {
const token = util.local.get(Setting.tokenKey) const token = Util.local.get(Setting.tokenKey)
if (!token) return false if (!token) return false
check = false check = false
axios.get(baseURL + api.accountIsDisabled + '?token=' + token, { axios.get(baseURL + api.accountIsDisabled + '?token=' + token, {
token: util.local.get(Setting.tokenKey), token: Util.local.get(Setting.tokenKey),
headers: { headers: {
token token
} }
}).then(res => { }).then(res => {
if (res.data) { if (res.data.code === 401) {
util.errorMsg('账号被禁用,已强制退出,有疑问请联系管理员') Util.local.remove(Setting.storeKey)
Util.local.remove(Setting.tokenKey)
Util.errorMsg(res.data.msg.includes('顶') ? '您的账号已在其他设备登录,您已被迫下线!' : '登录过期,请重新登录!')
setTimeout(() => {
location.reload()
}, 1500)
} else if (res.data) {
Util.errorMsg('账号被禁用,已强制退出,有疑问请联系管理员')
setTimeout(() => { setTimeout(() => {
store.dispatch('user/logout') store.dispatch('user/logout')
}, 1500) }, 1500)
@ -36,7 +44,7 @@ function checkDisabled () {
} }
// 请求拦截器 // 请求拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
let token = util.local.get(Setting.tokenKey) let token = Util.local.get(Setting.tokenKey)
if (token) config.headers.token = token if (token) config.headers.token = token
let storeSchoolId = store.state.user.schoolId let storeSchoolId = store.state.user.schoolId
let routeSchoolId = router.app._route.query.schoolId let routeSchoolId = router.app._route.query.schoolId
@ -50,7 +58,7 @@ service.interceptors.request.use(config => {
}, 2000) }, 2000)
return config return config
}, err => { }, err => {
util.errorMsg({ Util.errorMsg({
message: '退出登陆', message: '退出登陆',
onClose: function () { onClose: function () {
router.push({ name: '/login' }) router.push({ name: '/login' })
@ -65,12 +73,33 @@ service.interceptors.response.use(
const res = response.data const res = response.data
if (res.status == 200) { if (res.status == 200) {
return Promise.resolve(res).catch(e => { }) return Promise.resolve(res).catch(e => { })
} else if (res.code === 401) {
// 账号互踢
if (!logouted) {
Util.local.remove(Setting.storeKey)
Util.local.remove(Setting.tokenKey)
Util.errorMsg(res.msg.includes('顶') ? '您的账号已在其他设备登录,您已被迫下线!' : '登录过期,请重新登录!')
setTimeout(() => {
router.replace({
path: '/login'
})
logouted = 0
}, 1500)
logouted = 1
}
} else if (res.status == 30001) { } else if (res.status == 30001) {
return Promise.resolve(res).catch(e => { }) return Promise.resolve(res).catch(e => { })
} else if (!res.status) { } else if (!res.status) {
return Promise.resolve(res).catch(e => { }) return Promise.resolve(res).catch(e => { })
} else if (res.status === 10008) {
Message.error({
message: res.message,
showClose: true,
duration: 1500
})
return Promise.reject(res)
} else { } else {
util.errorMsg(res.message) Util.errorMsg(res.message)
res.message === '该账号无权限!' && setTimeout(() => { res.message === '该账号无权限!' && setTimeout(() => {
store.dispatch('user/logout') store.dispatch('user/logout')
}, 1500) }, 1500)
@ -85,9 +114,9 @@ service.interceptors.response.use(
// 未登录则跳转登录页面,并携带当前页面的路径 // 未登录则跳转登录页面,并携带当前页面的路径
// 在登录成功后返回当前页面,这一步需要在登录页操作。 // 在登录成功后返回当前页面,这一步需要在登录页操作。
case 401: case 401:
util.local.remove(Setting.storeKey) Util.local.remove(Setting.storeKey)
util.local.remove(Setting.tokenKey) Util.local.remove(Setting.tokenKey)
util.errorMsg('登录过期,请重新登录') Util.errorMsg('登录过期,请重新登录')
setTimeout(() => { setTimeout(() => {
router.replace({ router.replace({
path: '/login' path: '/login'
@ -95,16 +124,16 @@ service.interceptors.response.use(
}, 1000) }, 1000)
break break
case 500: case 500:
util.errorMsg('网络错误') Util.errorMsg('网络错误')
break break
// 403 token过期 // 403 token过期
// 登录过期对用户进行提示 // 登录过期对用户进行提示
// 清除本地token和清空vuex中token对象 // 清除本地token和清空vuex中token对象
// 跳转登录页面 // 跳转登录页面
case 403: case 403:
util.local.remove(Setting.storeKey) Util.local.remove(Setting.storeKey)
util.local.remove(Setting.tokenKey) Util.local.remove(Setting.tokenKey)
util.errorMsg('登录过期,请重新登录') Util.errorMsg('登录过期,请重新登录')
// 清除token // 清除token
// store.commit('loginSuccess', null); // store.commit('loginSuccess', null);
// 跳转登录页面,并将要浏览的页面fullPath传过去,登录成功后跳转需要访问的页面 // 跳转登录页面,并将要浏览的页面fullPath传过去,登录成功后跳转需要访问的页面
@ -119,11 +148,11 @@ service.interceptors.response.use(
break break
// 404请求不存在 // 404请求不存在
case 404: case 404:
util.errorMsg('网络请求不存在!') Util.errorMsg('网络请求不存在!')
break break
// 其他错误,直接抛出错误提示 // 其他错误,直接抛出错误提示
default: default:
util.errorMsg(error.response.data.message) Util.errorMsg(error.response.data.message)
Promise.reject(res) Promise.reject(res)
} }
return Promise.reject(error.response) return Promise.reject(error.response)

@ -7,7 +7,13 @@
* 业务配置 * 业务配置
* */ * */
const env = process.env.NODE_ENV; const url = location.host
const dev = process.env.NODE_ENV === 'development' // 本地
let host = `${location.origin}/`
if (dev) {
host = 'https://www.dataforward.cn/'
// host = 'http://192.168.31.51:9000/'
}
const Setting = { const Setting = {
/** /**
@ -21,11 +27,11 @@ const Setting = {
showProgressBar: true, showProgressBar: true,
/** /**
* 接口地址 * 接口地址
* 测试http://39.108.250.202:9000 * 测试http://121.37.12.51
* 正式http://www.dataforward.cn:9000 * 正式https://www.dataforward.cn
* */ * */
// apiBaseURL: env === 'development' ? 'http://192.168.31.151:9000' : 'http://39.108.250.202:9000', // apiBaseURL: env === 'development' ? 'http://192.168.31.151:9000' : 'http://121.37.12.51',
apiBaseURL: env === 'development' ? 'http://192.168.31.151:9000/' : `${location.origin}:9000/`, apiBaseURL: host,
// 加密货币接口地址 // 加密货币接口地址
cryptoBaseURL: `http://159.138.53.111/`, cryptoBaseURL: `http://159.138.53.111/`,
// 接口请求返回错误时,弹窗的持续时间,单位:秒 // 接口请求返回错误时,弹窗的持续时间,单位:秒
@ -47,7 +53,7 @@ const Setting = {
/** /**
* 默认密码 * 默认密码
*/ */
initialPassword: '111aaa', initialPassword: '1122aa',
/** /**
* 所属平台1->职站 2->数据平台 3->中台 * 所属平台1->职站 2->数据平台 3->中台
*/ */

@ -9,7 +9,7 @@
import Setting from '@/setting' import Setting from '@/setting'
import util from '@/libs/util' import util from '@/libs/util'
import {post,get,del,put} from '@/plugins/requests/index.js' import { post, get } from '@/plugins/requests/index.js'
import api from '@/api' import api from '@/api'
/** /**
@ -60,13 +60,6 @@ export default {
if (res.status == 200) { if (res.status == 200) {
util.local.set(Setting.tokenKey, res.data.token, 43200000) util.local.set(Setting.tokenKey, res.data.token, 43200000)
util.successMsg('登录成功') util.successMsg('登录成功')
get(api.isClient).then(res => {
commit('SET_CUSTOMER',res.customer)
const userName = res.customerName
userName && commit('SET_INFO', {
userName
})
}).catch(res => {})
post(api.getSchoolIdByToken).then(res => { post(api.getSchoolIdByToken).then(res => {
commit('SET_INFO', res) commit('SET_INFO', res)
}).catch(res => { }) }).catch(res => { })
@ -88,10 +81,14 @@ export default {
}, },
logout ({ commit, state, dispatch }) { logout ({ commit, state, dispatch }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
post(api.logout).then(() => {
util.local.remove(Setting.storeKey) util.local.remove(Setting.storeKey)
util.local.remove(Setting.tokenKey) util.local.remove(Setting.tokenKey)
location.reload() location.reload()
resolve() resolve()
}).catch(error => {
reject(error)
})
}) })
}, },
setAvatar ({ state, commit }, avatar) { setAvatar ({ state, commit }, avatar) {

@ -14,5 +14,6 @@ module.exports = {
  assetsDir: Setting.assetsDir,   assetsDir: Setting.assetsDir,
devServer: { devServer: {
port: 8092 port: 8092
} },
productionSourceMap: false,
} }
Loading…
Cancel
Save