Compare commits

..

No commits in common. '7f18b9980106039538b1f93bce07aab320b1d1f3' and '84c8412fe9149284cd0dd3557301a6063218296c' have entirely different histories.

  1. 31
      src/layouts/footer/index.vue
  2. 173
      src/pages/account/login/index.vue
  3. 166
      src/pages/screen/list/index.vue
  4. 94
      src/plugins/requests/index.js
  5. 4
      src/setting.js
  6. 3
      vue.config.js

@ -9,23 +9,22 @@
<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>联系人金经理 15218726836</span> <span>联系人郭经理 17671782660</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" <a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">粤ICP备20072679号</a>
target="_blank">粤ICP备20072679号</a>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data () { data() {
return { return {
}; };
}, },
mounted () { mounted(){
}, },
methods: { methods: {
@ -34,31 +33,31 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.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;
text-align: center; text-align: center;
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;
} }
} }
} }
} }
</style> </style>

@ -4,42 +4,63 @@
<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 }" <li v-for="(item,index) in tabList"
@click="typeClick(item)">{{ item.label }}</li> :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">
<el-form-item class="school-select" prop="schoolId"> <el-form-item class="school-select"
prop="schoolId">
<label class="label school"></label> <label class="label school"></label>
<el-select v-model="form.schoolId" clearable filterable placeholder="请选择学校"> <el-select v-model="form.schoolId"
<el-option v-for="(item, i) in schoolList" :key="i" :label="item.schoolName" clearable
filterable
placeholder="请选择学校">
<el-option v-for="(item, i) in schoolList"
:key="i"
:label="item.schoolName"
:value="item.schoolId"></el-option> :value="item.schoolId"></el-option>
</el-select> </el-select>
</el-form-item> </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="'请输入学号/工号'" <el-input v-model.trim="form.workNumber"
:placeholder="'请输入学号/工号'"
@keyup.enter.native="submit"></el-input> @keyup.enter.native="submit"></el-input>
</el-form-item> </el-form-item>
</div> </div>
<!-- 手机号登录 --> <!-- 手机号登录 -->
<el-form-item v-show="form.distinguish === 1" prop="account"> <el-form-item v-show="form.distinguish === 1"
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>
</el-form-item> </el-form-item>
<template v-if="form.distinguish === 2"> <template v-if="form.distinguish === 2">
<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>
</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>
<div class="ver-code"> <div class="ver-code">
<el-input v-model="form.code" placeholder="请输入验证码" maxlength="6" <el-input v-model="form.code"
placeholder="请输入验证码"
maxlength="6"
@keyup.enter.native="submit"></el-input> @keyup.enter.native="submit"></el-input>
<el-button type="text" @click="sendPhoneCodeLogin" :disabled="phoneDisabledLogin">{{ phoneBtnTextLogin <el-button type="text"
}} @click="sendPhoneCodeLogin"
:disabled="phoneDisabledLogin">{{ phoneBtnTextLogin }}
</el-button> </el-button>
</div> </div>
</el-form-item> </el-form-item>
@ -47,54 +68,88 @@
<template v-if="form.distinguish !== 2"> <template v-if="form.distinguish !== 2">
<el-form-item prop="password"> <el-form-item prop="password">
<label class="password label"></label> <label class="password label"></label>
<el-input type="password" placeholder="请输入密码" v-model.trim="form.password" @keyup.enter.native="submit"> <el-input 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 placeholder="请输入验证码" v-model.trim="form.code" @keyup.enter.native="submit"> <el-input 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 v-show="!form.distinguish"
class="default-check">
<el-checkbox v-model="setDefault">设置为默认学校</el-checkbox> <el-checkbox v-model="setDefault">设置为默认学校</el-checkbox>
</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>
</div> </div>
</div> </div>
<el-dialog title="绑定手机号" :visible.sync="phoneVisible" :close-on-click-modal="false" width="576px"> <el-dialog title="绑定手机号"
:visible.sync="phoneVisible"
:close-on-click-modal="false"
width="576px">
<p class="tips">依据国家政策法规需绑定手机号进行网络实名才可登录使用本平台</p> <p class="tips">依据国家政策法规需绑定手机号进行网络实名才可登录使用本平台</p>
<el-form label-width="60px"> <el-form label-width="60px">
<el-form-item label="手机号"> <el-form-item label="手机号">
<el-input placeholder="请输入手机号" v-model="phone" maxlength="11" @change="phoneChange"></el-input> <el-input placeholder="请输入手机号"
v-model="phone"
maxlength="11"
@change="phoneChange"></el-input>
</el-form-item> </el-form-item>
<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"
<el-button style="top: 1px" type="text" @click="sendPhoneCode(1)" placeholder="请输入验证码"
:disabled="binding === '' || phoneDisabled">{{ phoneBtnText }}</el-button> maxlength="6"></el-input>
<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>
<span slot="footer" class="dialog-footer"> <span slot="footer"
<el-button size="small" @click="phoneVisible = false"> </el-button> class="dialog-footer">
<el-button size="small" type="primary" @click="phoneSubmit"> </el-button> <el-button size="small"
@click="phoneVisible = false"> </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" <el-dialog title="请选择您要登录的用户"
:visible.sync="userVisible"
:close-on-click-modal="false"
custom-class="user-dia"
width="500px"> 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}"
<span>{{ user.schoolName }}{{ user.userName }}{{ user.workNumber }}{{ user.isEnable ? '' : '(已禁用)' }}</span> v-for="(user, i) in users"
:key="i"
@click="chooseUser(user)">
<span>{{ user.schoolName }}{{ user.userName }}{{ user.workNumber }}{{ user.isEnable ? '' : '(已禁用)'}}</span>
<i class="el-icon-right"></i> <i class="el-icon-right"></i>
</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" <el-dialog :visible.sync="infoVisible"
:close-on-click-modal="false"
:show-close="false"
custom-class="info-dia"
width="400px"> width="400px">
<div class="info-header"> <div class="info-header">
<i class="el-icon-warning"></i> <i class="el-icon-warning"></i>
@ -103,20 +158,26 @@
<div class="info-wrap"> <div class="info-wrap">
<p class="tips">该手机号已与以下用户绑定</p> <p class="tips">该手机号已与以下用户绑定</p>
<ul class="users"> <ul class="users">
<li v-for="(user, i) in infos" :key="i"> <li v-for="(user, i) in infos"
:key="i">
<span>{{ user.userName }}{{ user.schoolName }}</span> <span>{{ user.userName }}{{ user.schoolName }}</span>
</li> </li>
</ul> </ul>
<div class="info-footer"> <div class="info-footer">
<el-button size="small" type="primary" @click="bindPhone">是本人继续绑定</el-button> <el-button size="small"
<el-button class="unbind" size="small" @click="unbindPhone">不是本人解绑以上用户并绑定新用户</el-button> type="primary"
@click="bindPhone">是本人继续绑定</el-button>
<el-button class="unbind"
size="small"
@click="unbindPhone">不是本人解绑以上用户并绑定新用户</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<div class="footer"> <div class="footer">
<div class="copyright"> <div class="copyright">
<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>
</div> </div>
@ -479,17 +540,14 @@ export default {
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);
@ -499,14 +557,12 @@ 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-between;
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;
@ -514,30 +570,25 @@ 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;
@ -545,11 +596,9 @@ export default {
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;
@ -559,15 +608,12 @@ export default {
border: 1px solid #e1e6f2; border: 1px solid #e1e6f2;
border-radius: 4px !important; border-radius: 4px !important;
} }
.default-check { .default-check {
text-align: right; text-align: right;
} }
.el-select { .el-select {
width: 100%; width: 100%;
} }
.label { .label {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
@ -577,39 +623,32 @@ 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;
@ -622,37 +661,31 @@ 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: 0.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;
@ -664,33 +697,27 @@ 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;
@ -699,46 +726,38 @@ 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;

@ -1,10 +1,7 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<!-- 全屏 --> <!-- 全屏 -->
<img class="full" <img class="full" src="@/assets/img/screen/full.png" alt="" @click="fullScreen">
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">
@ -37,13 +34,10 @@
<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" <img src="@/assets/img/screen/t_1.png" alt="">
alt="">
中国宏观杠杆率 中国宏观杠杆率
</div> </div>
<div id="chart1" <div id="chart1" class="chart" style="height: 280px;"></div>
class="chart"
style="height: 280px;"></div>
</div> </div>
<div class="item"> <div class="item">
<div class="t_line_box"> <div class="t_line_box">
@ -63,13 +57,10 @@
<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" <img src="@/assets/img/screen/t_2.png" alt="">
alt="">
新增信贷数据 新增信贷数据
</div> </div>
<div id="chart5" <div id="chart5" class="chart t_btn9" style="height: 280px;"></div>
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">
@ -89,8 +80,7 @@
<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" <img src="@/assets/img/screen/t_7.png" alt="">
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">
@ -103,13 +93,10 @@
</thead> </thead>
</table> </table>
</div> </div>
<div class="main_table" <div class="main_table" ref="tableWrap" style="height: 196px;margin-top: 0;overflow: auto">
ref="tableWrap"
style="height: 196px;margin-top: 0;overflow: auto">
<table> <table>
<tbody> <tbody>
<tr v-for="(item, i) in goodsSell" <tr v-for="(item, i) in goodsSell" :key="i">
:key="i">
<td width="70%">{{ item.hct }}</td> <td width="70%">{{ item.hct }}</td>
<td>{{ item.rcpi }}</td> <td>{{ item.rcpi }}</td>
</tr> </tr>
@ -119,8 +106,7 @@
</div> </div>
</div> </div>
<div class="middle"> <div class="middle">
<div class="item" <div class="item" style="height: 350px">
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>
@ -142,8 +128,7 @@
<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" <img src="@/assets/img/screen/t_3.png" alt="">
alt="">
中国GDP年率报告 中国GDP年率报告
</div> </div>
<div class="main_table"> <div class="main_table">
@ -156,14 +141,11 @@
</thead> </thead>
</table> </table>
</div> </div>
<div class="main_table" <div class="main_table" ref="gdpList" style="max-height: 260px;margin-top: 0;overflow: auto;">
ref="gdpList"
style="max-height: 260px;margin-top: 0;overflow: auto;">
<table> <table>
<tbody> <tbody>
<template v-for="(item, i) in gdps"> <template v-for="(item, i) in gdps">
<tr v-if="item.value != '0'" <tr v-if="item.value != '0'" :key="i">
:key="i">
<td width="50%">{{ item.date_index }}</td> <td width="50%">{{ item.date_index }}</td>
<td width="50%">${{ item.value }}</td> <td width="50%">${{ item.value }}</td>
</tr> </tr>
@ -172,8 +154,7 @@
</table> </table>
</div> </div>
</div> </div>
<div class="item" <div class="item" style="height: 520px;">
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>
@ -195,24 +176,15 @@
<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" <img src="@/assets/img/screen/t_3.png" alt="">
alt="">
主要央行利率 主要央行利率
</div> </div>
<div class="earth"> <div class="earth">
<img class="lbx" <img class="lbx" src="@/assets/img/screen/lbx.png" alt="">
src="@/assets/img/screen/lbx.png" <img class="jt" src="@/assets/img/screen/jt.png" alt="">
alt=""> <img class="map" src="@/assets/img/screen/map.png" 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" <div class="chart" id="chart7" style="height: 500px"></div>
id="chart7"
style="height: 500px"></div>
</div> </div>
</div> </div>
<div class="right"> <div class="right">
@ -238,13 +210,10 @@
<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" <img src="@/assets/img/screen/t_4.png" alt="">
alt="">
全国税收收入 全国税收收入
</div> </div>
<div id="chart3" <div id="chart3" class="echart t_btn7" style="height: 280px;"></div>
class="echart t_btn7"
style="height: 280px;"></div>
</div> </div>
<div class="item"> <div class="item">
<!--左上边框--> <!--左上边框-->
@ -268,12 +237,10 @@
<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" <img src="@/assets/img/screen/t_5.png" alt="">
alt="">
央行货币当局资产负债 央行货币当局资产负债
</div> </div>
<div id="chart4" <div id="chart4" style="height: 280px;"></div>
style="height: 280px;"></div>
</div> </div>
<div class="item"> <div class="item">
<div class="t_line_box"> <div class="t_line_box">
@ -293,13 +260,10 @@
<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" <img src="@/assets/img/screen/t_7.png" alt="">
alt="">
以美元计算进口年率 以美元计算进口年率
</div> </div>
<div id="chart6" <div id="chart6" class="chart" style="height: 270px;"></div>
class="chart"
style="height: 270px;"></div>
</div> </div>
</div> </div>
</div> </div>
@ -314,7 +278,7 @@ import SockJS from 'sockjs-client'
import Stomp from 'stompjs' import Stomp from 'stompjs'
import map from './map' import map from './map'
export default { export default {
data () { data() {
return { return {
stompClientMarket: null, stompClientMarket: null,
stompClient: null, stompClient: null,
@ -323,32 +287,32 @@ export default {
gdps: [] gdps: []
} }
}, },
mounted () { mounted() {
this.getList() this.getList()
this.renderChart() this.renderChart()
this.renderMap() this.renderMap()
}, },
methods: { methods: {
// gdp // gdp
getList () { getList() {
this.$get(`${this.api.visualPreview}?tableName=hg_zg_gm_zhongguogdpnianlvbaogao&tableId=17`).then(({ comment, data }) => { this.$get(`${this.api.visualPreview}?tableName=hg_zg_gm_zhongguogdpnianlvbaogao&tableId=17`).then(({ comment, data }) => {
this.gdps = data this.gdps = data
}).catch(res => { }) }).catch(res => {})
}, },
// //
getCrypto () { getCrypto() {
this.$get(`${this.api.getTopList}`).then(res => { this.$get(`${this.api.getTopList}`).then(res => {
this.userCount = res.totalCount this.userCount = res.totalCount
}).catch(res => { }) }).catch(res => {})
}, },
// websocket // websocket
connect () { connect() {
const socket = new SockJS(`${Setting.cryptoBaseURL}currency/websocket`) //广 const socket = new SockJS(`${Setting.cryptoBaseURL}currency/websocket`) //广
// STOMP // STOMP
this.stompClientMarket = new Stomp.over(socket) this.stompClientMarket = new Stomp.over(socket)
this.stompClientMarket.debug = null this.stompClientMarket.debug = null
var this_ = this var this_ = this
this.stompClientMarket.connect({}, function (event) { this.stompClientMarket.connect({}, function(event) {
// //
if (this_.subObjMarket == null) { if (this_.subObjMarket == null) {
this_.subscribeMarket() this_.subscribeMarket()
@ -359,7 +323,7 @@ export default {
}); });
}, },
// //
subscribeMarket () { subscribeMarket() {
const this_ = this const this_ = this
this.subObjMarket = this.stompClientMarket.subscribe( this.subObjMarket = this.stompClientMarket.subscribe(
this_.api.market, this_.api.market,
@ -378,11 +342,11 @@ export default {
} }
); );
}, },
disconnect () { disconnect() {
this.stompClient && this.stompClient.disconnect() this.stompClient && this.stompClient.disconnect()
}, },
// //
fullScreen () { fullScreen() {
// //
if (document.fullscreenElement || if (document.fullscreenElement ||
document.mozFullScreenElement || document.mozFullScreenElement ||
@ -403,10 +367,10 @@ export default {
} }
}, },
// //
renderChart () { renderChart() {
const animateChart = (chart, option, data, num = 6) => { const animateChart = (chart, option, data, num = 6) => {
// //
if (option.dataZoom[0].endValue == data.length) { if (option.dataZoom[0].endValue == data.length ) {
option.dataZoom[0].endValue = num option.dataZoom[0].endValue = num
option.dataZoom[0].startValue = 0 option.dataZoom[0].startValue = 0
} }
@ -438,7 +402,7 @@ export default {
}, },
legend: { legend: {
data: comment.map(e => e.comment), data: comment.map(e => e.comment),
textStyle: { textStyle:{
color: '#fff' color: '#fff'
}, },
top: '8%' top: '8%'
@ -459,7 +423,7 @@ export default {
endValue: 6 // 6 endValue: 6 // 6
} }
], ],
color: ['#6188e9', '#9032f3', '#a57de3', '#4BF0FF', '#44AFF0', '#4E82FF', '#584BFF', '#BE4DFF', '#F845F1'], color: ['#6188e9','#9032f3','#a57de3','#4BF0FF','#44AFF0','#4E82FF','#584BFF','#BE4DFF','#F845F1'],
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap: ['20%', '20%'], boundaryGap: ['20%', '20%'],
@ -495,7 +459,7 @@ export default {
setInterval(function () { setInterval(function () {
animateChart(chart[0], option, series) animateChart(chart[0], option, series)
}, 1500) }, 1500)
}).catch(res => { }) }).catch(res => {})
// //
this.$get(`${this.api.visualPreview}?tableName=hg_zg_jr_quanguoshuishoushouru&tableId=33`).then(res => { this.$get(`${this.api.visualPreview}?tableName=hg_zg_jr_quanguoshuishoushouru&tableId=33`).then(res => {
@ -533,10 +497,10 @@ export default {
} }
} }
}, },
color: ['#4BF0FF', '#44AFF0', '#4E82FF', '#584BFF', '#BE4DFF', '#F845F1'], color: ['#4BF0FF','#44AFF0','#4E82FF','#584BFF','#BE4DFF','#F845F1'],
legend: { legend: {
data: ['税收收入合计'], data: ['税收收入合计'],
textStyle: { textStyle:{
color: '#fff' color: '#fff'
}, },
top: '8%' top: '8%'
@ -578,7 +542,7 @@ export default {
setInterval(function () { setInterval(function () {
animateChart(chart[1], option, data) animateChart(chart[1], option, data)
}, 1500) }, 1500)
}).catch(res => { }) }).catch(res => {})
// //
this.$get(`${this.api.previewData}?tableName=hg_zg_jr_guojilvyouwaihuishourugoucheng&tableId=52`).then(res => { this.$get(`${this.api.previewData}?tableName=hg_zg_jr_guojilvyouwaihuishourugoucheng&tableId=52`).then(res => {
@ -619,7 +583,7 @@ export default {
//[0, 360] //[0, 360]
// startAngle: 0, // startAngle: 0,
// //
radius: '45%', radius : '45%',
// //
center: ['50%', '65%'], center: ['50%', '65%'],
// //
@ -628,7 +592,7 @@ export default {
// roseType: 'radius', // roseType: 'radius',
// false // false
// avoidLabelOverlap: false, // avoidLabelOverlap: false,
color: ['#065aab', '#066eab', '#0682ab', '#0696ab', '#06a0ab', '#06b4ab', '#06c8ab', '#06dcab', '#06f0ab'], color: ['#065aab', '#066eab', '#0682ab', '#0696ab', '#06a0ab','#06b4ab','#06c8ab','#06dcab','#06f0ab'],
label: { label: {
normal: { normal: {
show: true, show: true,
@ -650,7 +614,7 @@ export default {
data: series data: series
}] }]
}) })
}).catch(res => { }) }).catch(res => {})
// //
this.$get(`${this.api.previewData}?tableName=hg_zg_jr_yanghanghuobidangjuzichanfuzhai&tableId=55`).then(res => { this.$get(`${this.api.previewData}?tableName=hg_zg_jr_yanghanghuobidangjuzichanfuzhai&tableId=55`).then(res => {
@ -810,7 +774,7 @@ export default {
setInterval(function () { setInterval(function () {
animateChart(chart[3], option, data, 3) animateChart(chart[3], option, data, 3)
}, 1500) }, 1500)
}).catch(res => { }) }).catch(res => {})
// //
this.$get(`${this.api.previewData}?tableName=hg_zg_jr_shangpinlingshoujiagezhishu&tableId=60`).then(res => { this.$get(`${this.api.previewData}?tableName=hg_zg_jr_shangpinlingshoujiagezhishu&tableId=60`).then(res => {
@ -824,7 +788,7 @@ export default {
}) })
}) })
this.goodsSell = [...goodsSell, ...goodsSell] this.goodsSell = [...goodsSell, ...goodsSell]
}).catch(res => { }) }).catch(res => {})
// //
this.$get(`${this.api.previewData}?tableName=hg_zg_jr_xinzengxindaishuju&tableId=34`).then(res => { this.$get(`${this.api.previewData}?tableName=hg_zg_jr_xinzengxindaishuju&tableId=34`).then(res => {
@ -970,7 +934,7 @@ export default {
setInterval(function () { setInterval(function () {
animateChart(chart[4], option, data, 3) animateChart(chart[4], option, data, 3)
}, 1500) }, 1500)
}).catch(res => { }) }).catch(res => {})
// //
this.$get(`${this.api.visualPreview}?tableName=hg_zg_my_yimeiyuanjisuanjinkounianlv&tableId=22`).then(res => { this.$get(`${this.api.visualPreview}?tableName=hg_zg_my_yimeiyuanjisuanjinkounianlv&tableId=22`).then(res => {
@ -1075,7 +1039,7 @@ export default {
setInterval(function () { setInterval(function () {
animateChart(chart[5], option, data) animateChart(chart[5], option, data)
}, 1500) }, 1500)
}).catch(res => { }) }).catch(res => {})
this.scrollTable() this.scrollTable()
@ -1087,20 +1051,20 @@ export default {
}) })
}, },
// //
async renderMap () { async renderMap() {
// idname // idname
const param = [ const param = [
{ tableId: 2, tableName: 'll_yh_usa' }, {tableId: 2, tableName: 'll_yh_usa'},
{ tableId: 3, tableName: 'll_yh_euro' }, {tableId: 3, tableName: 'll_yh_euro'},
{ tableId: 4, tableName: 'll_yh_newzealand' }, {tableId: 4, tableName: 'll_yh_newzealand'},
{ tableId: 5, tableName: 'll_yh_china' }, {tableId: 5, tableName: 'll_yh_china'},
{ tableId: 6, tableName: 'll_yh_switzerland' }, {tableId: 6, tableName: 'll_yh_switzerland'},
{ tableId: 7, tableName: 'll_yh_english' }, {tableId: 7, tableName: 'll_yh_english'},
{ tableId: 8, tableName: 'll_yh_australia' }, {tableId: 8, tableName: 'll_yh_australia'},
{ tableId: 9, tableName: 'll_yh_japan' }, {tableId: 9, tableName: 'll_yh_japan'},
{ tableId: 10, tableName: 'll_yh_russia' }, {tableId: 10, tableName: 'll_yh_russia'},
{ tableId: 11, tableName: 'll_yh_india' }, {tableId: 11, tableName: 'll_yh_india'},
{ tableId: 12, tableName: 'll_yh_brazil' } {tableId: 12, tableName: 'll_yh_brazil'}
] ]
this.$post(this.api.multipleTablePreview, param).then(res => { this.$post(this.api.multipleTablePreview, param).then(res => {
// //
@ -1255,10 +1219,10 @@ export default {
index = -1 index = -1
} }
}, 2000) }, 2000)
}).catch(res => { }) }).catch(res => {})
}, },
// //
scrollTable () { scrollTable() {
const dom = this.$refs.tableWrap const dom = this.$refs.tableWrap
const dom1 = this.$refs.gdpList const dom1 = this.$refs.gdpList
setInterval(() => { setInterval(() => {
@ -1274,5 +1238,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>

@ -1,5 +1,5 @@
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'
@ -18,43 +18,43 @@ 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) {
Util.errorMsg('账号被禁用,已强制退出,有疑问请联系管理员') util.errorMsg('账号被禁用,已强制退出,有疑问请联系管理员')
setTimeout(() => { setTimeout(() => {
store.dispatch('user/logout') store.dispatch('user/logout')
}, 1500) }, 1500)
} }
}).catch(res => { }) }).catch(res => {})
} }
// 请求拦截器 // 请求拦截器
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
if (routeSchoolId) routeSchoolId = atob(decodeURI(routeSchoolId)) if(routeSchoolId) routeSchoolId = atob(decodeURI(routeSchoolId))
// 如果store里没有schoolId,则取url里的schoolId,从用户跳转到后台的时候因为加载顺序的问题会出现这个情况,所以要做这个处理 // 如果store里没有schoolId,则取url里的schoolId,从用户跳转到后台的时候因为加载顺序的问题会出现这个情况,所以要做这个处理
if (storeSchoolId || routeSchoolId) config.headers.schoolId = storeSchoolId ? storeSchoolId : routeSchoolId if(storeSchoolId || routeSchoolId) config.headers.schoolId = storeSchoolId ? storeSchoolId : routeSchoolId
clearTimeout(checkTimer) clearTimeout(checkTimer)
check && checkDisabled() check && checkDisabled()
checkTimer = setTimeout(() => { checkTimer = setTimeout(() => {
check = true check = true
}, 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'})
} }
}) })
return Promise.reject(err) return Promise.reject(err)
@ -64,26 +64,12 @@ service.interceptors.request.use(config => {
service.interceptors.response.use( service.interceptors.response.use(
response => { response => {
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) { }else if(res.status == 30001) {
// 账号互踢 return Promise.resolve(res).catch(e => {})
if (!logouted) { }else if(!res.status){
Util.local.remove(Setting.storeKey) return Promise.resolve(res).catch(e => {})
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) {
return Promise.resolve(res).catch(e => { })
} else if (!res.status) {
return Promise.resolve(res).catch(e => { })
} else if (res.status === 10008) { } else if (res.status === 10008) {
Message.error({ Message.error({
message: res.message, message: res.message,
@ -91,8 +77,8 @@ service.interceptors.response.use(
duration: 1500 duration: 1500
}) })
return Promise.reject(res) 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)
@ -107,9 +93,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'
@ -117,16 +103,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传过去,登录成功后跳转需要访问的页面
@ -141,11 +127,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)
@ -153,9 +139,9 @@ service.interceptors.response.use(
} }
); );
function get (url, params) { function get(url, params){
return new Promise((resolve, reject) => { return new Promise((resolve, reject) =>{
service.get(url, { params: params }).then(res => { service.get(url, {params: params}).then(res => {
resolve(res) resolve(res)
}).catch(err => { }).catch(err => {
reject(err) reject(err)
@ -163,9 +149,9 @@ function get (url, params) {
}) })
} }
function post (url, params) { function post(url, params){
return new Promise((resolve, reject) => { return new Promise((resolve, reject) =>{
service.post(url, params).then(res => { service.post(url,params).then(res => {
resolve(res) resolve(res)
}).catch(err => { }).catch(err => {
reject(err.data) reject(err.data)
@ -173,8 +159,8 @@ function post (url, params) {
}) })
} }
function del (url, params) { function del(url, params){
return new Promise((resolve, reject) => { return new Promise((resolve, reject) =>{
service.delete(url, { service.delete(url, {
params params
}).then(res => { }).then(res => {
@ -185,8 +171,8 @@ function del (url, params) {
}) })
} }
function put (url, params) { function put(url, params){
return new Promise((resolve, reject) => { return new Promise((resolve, reject) =>{
service.put(url, { service.put(url, {
params params
}).then(res => { }).then(res => {
@ -196,4 +182,4 @@ function put (url, params) {
}) })
}) })
} }
export { get, post, del, put } export { get,post,del,put }

@ -11,8 +11,8 @@ const url = location.host
const dev = process.env.NODE_ENV === 'development' // 本地 const dev = process.env.NODE_ENV === 'development' // 本地
let host = `${location.origin}/` let host = `${location.origin}/`
if (dev) { if (dev) {
host = 'https://www.dataforward.cn/' host = 'http://121.37.12.51/'
// host = 'http://192.168.31.217:9000/' // host = 'http://192.168.31.51:9000/'
} }
const Setting = { const Setting = {

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