Commit ec500278 authored by 王奇's avatar 王奇

权限与修改

parent 3113ec2e
......@@ -4109,7 +4109,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
......@@ -4130,12 +4131,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -4150,17 +4153,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -4277,7 +4283,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
......@@ -4289,6 +4296,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -4303,6 +4311,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -4310,12 +4319,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
......@@ -4334,6 +4345,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -4414,7 +4426,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
......@@ -4426,6 +4439,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -4511,7 +4525,8 @@
"safe-buffer": {
"version": "5.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -4547,6 +4562,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -4566,6 +4582,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -4609,12 +4626,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
......@@ -11719,7 +11738,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
......@@ -11740,12 +11760,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -11760,17 +11782,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -11887,7 +11912,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
......@@ -11899,6 +11925,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -11913,6 +11940,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -11920,12 +11948,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
......@@ -11944,6 +11974,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -12024,7 +12055,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
......@@ -12036,6 +12068,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -12121,7 +12154,8 @@
"safe-buffer": {
"version": "5.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -12157,6 +12191,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -12176,6 +12211,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -12219,12 +12255,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
......
......@@ -13,20 +13,23 @@
<template slot="title">网站监控</template>
<el-menu-item :index="`/monitor/${index}`" v-for="(item, index) in platInfo" :key="item.platform">{{item.platform}}</el-menu-item>
</el-submenu>
<el-submenu index="2" v-if="environment=='inside'">
<el-submenu index="2" v-if="environment=='inside'" v-show="permission_read[6]">
<template slot="title">币种监控</template>
<el-menu-item index="/monitor/BTY">BTY</el-menu-item>
<el-menu-item index="/monitor/YCC">YCC</el-menu-item>
</el-submenu>
<el-menu-item index="/monitor/account" v-if="environment=='inside'">
<el-menu-item index="/monitor/account" v-if="environment=='inside'" v-show="permission_read[6]">
<span slot="title">银行账户</span>
</el-menu-item>
<el-menu-item index="/monitor/coinRecharge" v-if="environment=='inside'">
<el-menu-item index="/monitor/coinRecharge" v-if="environment=='inside'" v-show="permission_read[6]">
<span slot="title">币种充提统计</span>
</el-menu-item>
<el-menu-item index="/monitor/currency" v-if="environment=='inside'">
<el-menu-item index="/monitor/currency" v-if="environment=='inside'" v-show="permission_read[6]">
<span slot="title">币种波动统计</span>
</el-menu-item>
<el-menu-item index="/monitor/adminSet" v-if="environment=='inside'" v-show="permission_read[6]">
<span slot="title">管理员设置</span>
</el-menu-item>
</el-menu>
</div>
</template>
......@@ -36,6 +39,8 @@
export default {
data(){
return{
permission_read:[],
permission_control:[],
active: '',
environment:sessionStorage.getItem('environment'),
}
......@@ -43,6 +48,8 @@
props: ['platInfo'],
created() {
this.active = this.$route.path.split('/').splice(0,3).join('/');
this.permission_read= parseInt(localStorage.getItem("permission_read")).toString(2).split("")
this.permission_control=parseInt(localStorage.getItem("permission_control")).toString(2).split("")
},
methods: {
navClick(index) {
......
......@@ -23,6 +23,10 @@ const Api = {
UpdateRobotConfig: originUrl + '/updateRobotConfig', //修改机器人配置接口
transferStatusChange: originUrl + '/updateTransferStatus', //充提状态开关
changeStatus: originUrl + '/changeStatus', //修改机器人运行状态
countWave: originUrl + '/countWave', //查询波动统计列表
runRobotConfig: originUrl + '/runRobotConfig', //查询机器人运行配置
countWaveExcel:originUrl + '/countWaveExcel', //波动导出
CountWaveRange:originUrl + '/countWaveRange', //查询波动范围统计
}
export default Api;
......@@ -30,6 +30,12 @@ const router = new Router({
},
},
{
path: '/monitor/adminSet',
component: function(resolve){
require(['../views/AdminSet.vue'],resolve);
},
},
{
path: '/monitor/account',
component: function(resolve){
require(['../views/account.vue'],resolve);
......
<template>
<div class="divHeader">
<div class="lineHeader">
<div class="divTitle">所有机器人</div>
<div class="titleButton">
<el-button type="primary" @click="dialogVisible=true">添加管理员</el-button>
</div>
</div>
<!-- 主体框 -->
<div class="aminBox">
<div>
<!-- 通过机器人搜索框 -->
<div class="emailInput">
<el-input v-model="emailMessage" placeholder="通过邮箱搜索">
<el-button @click="searchByEmail" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<el-table
:header-cell-style="{background:'#EFF1F3',color:'#808080'}"
:data="tableData"
stripe
style="width: 100%">
<el-table-column
width="250"
label="管理员邮箱">
<template slot-scope="scope">
<span>{{ scope.row.email }}</span>
</template>
</el-table-column>
<el-table-column
label="管理权限"
>
<template slot-scope="scope">
<i class="iconfont" :class=" 'icon-'+scope.row.coin+'3'"></i>
<span>{{ scope.row.power}}</span>
</template>
</el-table-column>
<el-table-column
width="150"
label="设置日期">
<template slot-scope="scope">
<span>{{ scope.row.date }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
width="150">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="editAdminPower(scope.row)">编辑</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页查询 -->
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10, 20, 30]"
:page-size="pageSize"
layout="total, prev, pager, next, sizes"
:total="listCount">
</el-pagination>
</div>
</div>
<!-- 添加管理员弹窗 -->
<el-dialog
title="添加管理员"
:visible.sync="dialogVisible"
width="880px"
:before-close="handleClose">
<div class="adminDialog">
<div class="adminDivOne">管理员邮箱</div>
<div class="adminDivTwo">
<el-input v-model="adminEmail" placeholder="请输入邮箱"></el-input>
</div>
</div>
<div class="adminPower">
<div class="powerOne">管理权限</div>
<div class="powerTwo">
<el-checkbox-group v-model="checkedList" label="机器人总开关" border>
<el-checkbox label="机器人总开关" border></el-checkbox>
<el-checkbox label="机器人冲提开关" border></el-checkbox>
<el-checkbox label="机器人配置" border></el-checkbox>
</el-checkbox-group>
</div>
</div>
<span slot="footer" class="dialog-footer">
<div class="dialogButton">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</div>
</span>
</el-dialog>
<!-- 编辑管理员弹窗 -->
<el-dialog
title="编辑管理员"
:visible.sync="dialogVisible2"
width="880px"
:before-close="handleClose">
<div class="adminDialog">
<div class="adminDivOne">管理员邮箱</div>
<div class="adminDivTwo">
<el-input v-model="adminEmailEdit" label="adminEmailEdit" placeholder="请输入邮箱"></el-input>
</div>
</div>
<div class="adminPower">
<div class="powerOne">管理权限</div>
<div class="powerTwo">
<el-checkbox-group v-model="editCheckedList" label="机器人总开关" border>
<el-checkbox label="机器人总开关" border></el-checkbox>
<el-checkbox label="机器人冲提开关" border></el-checkbox>
<el-checkbox label="机器人配置" border></el-checkbox>
</el-checkbox-group>
</div>
</div>
<span slot="footer" class="dialog-footer">
<div class="dialogButton">
<el-button @click="dialogVisible2 = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible2 = false">确 定</el-button>
</div>
</span>
</el-dialog>
</div>
</template>
<script>
import axios from 'axios';
import ApiConfig from "../config/api-config";
export default {
data() {
return{
tableData:[
{
email:"343641834@qq.com",
power:"机器人总开关,机器人关闭",
date:"2019-11-11"
}
],
adminEmailEdit:"343641834@qq.com",//编辑管理员权限
checkedList:["机器人总开关"],
editCheckedList:[],
adminEmail:"",
dialogVisible:false,
dialogVisible2:false,
emailMessage:"",
pageSize: 10, //分页,每页数量
currentPage: 1,//当前页
listCount: 0,
};
},
mounted() {
},
created() {
},
methods :{
// 编辑管理员权限
editAdminPower(rowData){
this.adminEmailEdit=rowData.email
// this.editCheckedList=rowData.power
console.log("行数据", this.editCheckedList)
this.dialogVisible2=true
},
//弹窗前确认
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
},
// 通过邮箱搜索
searchByEmail(){
alert("搜索邮箱")
},
//分页
handleSizeChange(val) {
this.pageSize = val;
this.currentPage = 1;
this.getRechargeList();
},
handleCurrentChange(val) {
this.currentPage = val;
this.getRechargeList(val+'');
},
},
}
</script>
<style scoped>
/* 管理员弹窗样式 */
.adminDialog{
display: flex;
height: 40px;
align-items: center;
.adminDivOne{
margin-left: 60px;
font-size: 14px;
color: #333333;
}
.adminDivTwo{
margin-left: 10px;
width: 670px;
}
}
/* 管理员权限 */
.adminPower{
display: flex;
align-items: center;
margin-top: 10px;
.powerOne{
margin-left: 75px;
font-size: 14px;
color: #333333;
}
.powerTwo{
margin-left: 10px;
}
}
.emailInput{
float:right;
width: 260px;
height: 40px;
margin-bottom:20px;
}
.aminBox{
background: rgba(255,255,255,1);
border-radius: 4px;
border: 1px solid rgba(119,146,167,1);
padding: 10px 20px 20px 20px;
height: 500px;
}
.lineHeader{
height: 80px;
text-align: center;
}
.divHeader{
margin: 20px 20px 20px 20px;
}
.divTitle {
height: 40px;
line-height: 40px;
float:left;
display:inline;
font-size: 18px;
color: #333333;
}
.titleButton{
float:right;
}
</style>
<style >
/* 饿了么样式覆盖 */
.el-button--primary {
color: #fff;
background-color: #7792A7;
border-color: #7792A7;
}
/* 覆盖弹窗title文字样式 */
.el-dialog__header {
text-align: center;
}
/* 覆盖多选框样式 */
.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
background-color: #7792A7;
border-color: #7792A7;
}
.el-checkbox__input.is-checked+.el-checkbox__label {
color: #7792A7;
}
.el-checkbox.is-bordered.is-checked {
border-color: #7792A7;
}
</style>
\ No newline at end of file
......@@ -256,8 +256,10 @@ export default {
localStorage["username"] = this.loginEmail;
localStorage["token"] =res.data.data.token
sessionStorage.setItem("isLogin",true);
console.log(res)
console.log("登录返回信息",res)
sessionStorage.setItem("environment",res.data.data.class);
localStorage.setItem("permission_control",res.data.data.permission_control)
localStorage.setItem("permission_read",res.data.data.permission_read)
this.$router.push({
path:'/monitor/home'
})
......
......@@ -5,12 +5,23 @@
<i class="el-icon-arrow-left"></i>
<span>返回</span>
</div>
<!-- 机器人配置 -->
<el-button
v-show="permission_read[1]"
class="fr update-button"
@click.native.prevent="clickUpdate"
type="primary"
size="small">
修改配置
size="middle">
机器人配置
</el-button>
<!-- 运行配置 -->
<el-button
v-show="permission_read[4]"
class="fr update-button"
@click.native.prevent="runningConfig"
type="primary"
size="middle">
运行配置
</el-button>
</div>
<el-row :gutter="20" class="operation-area">
......@@ -18,7 +29,7 @@
<div class="dashboard"
:class="[(robotDetailInfo.base_status==='abnormal' ||robotDetailInfo.coin_status==='abnormal' || robotDetailInfo.profit_status === 'abnormal') ? 'abnormal' : robotDetailInfo.status || 'normal']">
<div class="chart-box">
<p class="title" v-if="environment=='inside'">今日盈亏</p>
<p class="title" v-if="environment=='inside'">今日波动</p>
<p class="data"
:class="robotInfo.today_profit && robotInfo.today_profit.indexOf('-')!== -1 ? 'lose' : 'gain'"
v-if="environment=='inside'"
......@@ -28,12 +39,12 @@
<p v-show="robotInfo.status==='normal'" class="type" :class="{'inside':environment=='inside','outside':environment=='outside'}">正在运行</p>
<p v-show="robotInfo.status==='stop'" class="type" :class="{'inside':environment=='inside','outside':environment=='outside'}">停止运行</p>
<p v-if="environment=='inside'">
<span class="result">盈亏</span>
<span class="result">波动</span>
<span class="data"
:class="robotInfo.all_profit && robotInfo.all_profit.indexOf('-')!== -1 ? 'lose' : 'gain'">{{robotInfo.all_profit}}</span>
</p>
</div>
<div class="switch">
<div class="switch" v-show="permission_read[0]">
<span v-show="robotInfo.status==='normal'">关闭</span>
<span v-show="!robotInfo.status==='normal'">开启</span>
<el-switch
......@@ -67,7 +78,7 @@
<span>交易所</span>
<span>{{robotInfo.platform}}</span>
</p>
<p v-if="environment=='inside'">
<p v-if="environment=='inside'" v-show="!permission_read[6]">
<span>行情</span>
<span>{{ticketInfo.price}}{{robotDetailInfo.base}}</span>
<span class="cny">≈¥{{ticketInfo.value}}</span>
......@@ -83,9 +94,9 @@
<div class="handle">
<span class="coin-name">{{robotInfo.coin}}</span>
<template v-if="environment=='inside'">
<button class="button" :class="robotInfo.transfer_status" :disabled="robotInfo.transfer_status==='close'" @click="clickRecharge(robotInfo.coin)">充币</button>
<button class="button" :class="robotInfo.transfer_status" :disabled="robotInfo.transfer_status==='close'" @click="clickWithdraw(robotInfo.coin)">提币</button>
<div class="switch">
<button class="button" :class="robotInfo.transfer_status" :disabled="robotInfo.transfer_status==='close'" @click="clickRecharge(robotInfo.coin)" v-show="permission_read[2]">充币</button>
<button class="button" :class="robotInfo.transfer_status" :disabled="robotInfo.transfer_status==='close'" @click="clickWithdraw(robotInfo.coin)" v-show="permission_read[2]">提币</button>
<div class="switch" v-show="permission_read[3]">
<span v-show="robotInfo.transfer_status==='open'">关闭</span>
<span v-show="robotInfo.transfer_status==='close'">开启</span>
<el-switch
......@@ -123,9 +134,9 @@
<div class="handle">
<span class="coin-name">{{robotInfo.base}}</span>
<template v-if="environment=='inside'">
<button class="button" :class="robotInfo.transfer_status" :disabled="robotInfo.transfer_status==='close'" @click="clickRecharge(robotInfo.base)">充币</button>
<button class="button" :class="robotInfo.transfer_status" :disabled="robotInfo.transfer_status==='close'" @click="clickWithdraw(robotInfo.base)">提币</button>
<div class="switch">
<button class="button" :class="robotInfo.transfer_status" :disabled="robotInfo.transfer_status==='close'" @click="clickRecharge(robotInfo.base)" v-show="permission_read[1]">充币</button>
<button class="button" :class="robotInfo.transfer_status" :disabled="robotInfo.transfer_status==='close'" @click="clickWithdraw(robotInfo.base)" v-show="permission_read[1]">提币</button>
<div class="switch" v-show="permission_read[2]">
<span v-show="robotInfo.transfer_status==='open'">关闭</span>
<span v-show="robotInfo.transfer_status==='close'">开启</span>
<el-switch
......@@ -294,6 +305,29 @@
</div>
</el-col>
</el-row>
<!-- 标签-->
<ul class="classify-overview">
<li class="normal" :class="{ 'filter' : robotStatus === 'normal'}">
<p>{{robotInfo.coin_wave}}({{robotInfo.coin_wave_percent}})</p>
<p>≈¥{{robotInfo.coin_wave*robotInfo.coin_ticker}}</p>
<p>目标币今日波动({{robotInfo.coin}})</p>
</li>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'stop'}" >
<p>{{robotInfo.base_wave}}({{robotInfo.base_wave_percent}})</p>
<p>≈¥{{robotInfo.base_wave*robotInfo.base_ticker}}</p>
<p>基础币今日波动({{robotInfo.base}})</p>
</li>
<li class="stop" :class="{ 'filter' : robotStatus === 'coin_wave'}" >
<p>{{robotInfo.coin_fee}}</p>
<p>≈¥{{robotInfo.coin_fee*robotInfo.coin_ticker}}</p>
<p>今日手续费({{robotInfo.coin}})</p>
</li>
<li class="stop" :class="{ 'filter' : robotStatus === 'base_wave'}" >
<p>{{robotInfo.base_fee}}</p>
<p>≈¥{{robotInfo.base_fee*robotInfo.base_ticker}}</p>
<p>今日手续费({{robotInfo.base}})</p>
</li>
</ul>
<!--充提记录-->
<div class="record-box" v-loading="Loading" element-loading-text="正在刷新数据">
<div class="title-box clearfix">
......@@ -526,9 +560,9 @@
:total="total">
</el-pagination>
</div>
<!-- 修改配置弹框 -->
<!-- 修改机器人配置弹框 -->
<el-dialog
title="修改配置"
title="机器人配置"
:visible.sync="dialogFormVisible2"
:before-close="handleClose"
:close-on-click-modal = "false"
......@@ -546,10 +580,10 @@
<p>账户地址:<span>{{updateRobotConfig.account}}</span></p>
<p>目标币种:<span>{{updateRobotConfig.coin}}</span></p>
<p>基础币种:<span>{{updateRobotConfig.base}}</span></p>
<p>目标币标准:<span>{{updateRobotConfig.coin_normal}}</span></p>
<p>基础币标准:<span>{{updateRobotConfig.base_normal}}</span></p>
<p>盈亏范围<span>{{updateRobotConfig.profit_range}}</span></p>
<p>币数量范围:<span>{{updateRobotConfig.amount_range}}</span></p>
<p>目标币余额标准:<span>{{updateRobotConfig.coin_normal}}</span></p>
<p>基础币余额标准:<span>{{updateRobotConfig.base_normal}}</span></p>
<p>余额范围比例<span>{{updateRobotConfig.profit_range}}</span></p>
<p>波动范围比例:<span>{{updateRobotConfig.wave_range}}</span></p>
<p>交易所:<span>{{updateRobotConfig.platform}}</span></p>
<p>标签:<span>{{updateRobotConfig.tag}}</span></p>
</el-card>
......@@ -569,17 +603,17 @@
<el-form-item label="基础币种" label-width="120px">
<el-input v-model="updateRobotConfig.base" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="目标币标准" label-width="120px">
<el-form-item label="目标币余额标准" label-width="120px">
<el-input v-model="updateRobotConfig.coin_normal" type="number"></el-input>
</el-form-item>
<el-form-item label="基础币标准" label-width="120px">
<el-form-item label="基础币余额标准" label-width="120px">
<el-input v-model="updateRobotConfig.base_normal" type="number"></el-input>
</el-form-item>
<el-form-item label="盈亏范围" label-width="120px">
<el-form-item label="余额范围比例" label-width="120px">
<el-input v-model="updateRobotConfig.profit_range" type="number"></el-input>
</el-form-item>
<el-form-item label="币数量范围" label-width="120px">
<el-input v-model="updateRobotConfig.amount_range" type="number"></el-input>
<el-form-item label="波动范围比例" label-width="120px">
<el-input v-model="updateRobotConfig.wave_range" type="number"></el-input>
</el-form-item>
<el-form-item label="交易所" label-width="120px">
<el-input v-model="updateRobotConfig.platform" :disabled="true"></el-input>
......@@ -596,6 +630,24 @@
<el-button type="primary" @click="sureNext('2')">确 定</el-button>
</div>
</el-dialog>
<!-- 修改运行配置 -->
<el-dialog
title="运行配置"
:visible.sync="dialogVisible3"
width="50%"
center
:before-close="handleClose">
<div class="thirdDialog">
<!-- <span>{{runConfig.msg}}</span> -->
<div class="thirdDialogInput">
<el-input v-model="config_param" placeholder="这里是运行参数配置的内容" type="textarea" ></el-input>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible3 = false">取 消</el-button>
<el-button type="primary" @click="editParamConfig()" class="trueButton">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
......@@ -607,6 +659,11 @@
export default {
data() {
return {
config_param:'',
robotStatus: '', //机器人状态
dialogVisible3:false,
permission_read:[],
permission_control:[],
environment:sessionStorage.getItem('environment'),
robotBankList: JSON.parse(sessionStorage.getItem('robotBankList')),
robotDetailInfo: JSON.parse(sessionStorage.getItem('robotDetailInfo')),
......@@ -663,12 +720,26 @@
/*修改配置弹框参数*/
dialogFormVisible2:false,//充值弹框
innerVisible2: false,//确认弹框
}
},
created() {
this.init();
this.permission_read= parseInt(localStorage.getItem("permission_read")).toString(2).split("")
this.permission_control=parseInt(localStorage.getItem("permission_control")).toString(2).split("")
console.log("可视权限",this.permission_read)
console.log("控制权限",this.permission_control)
},
methods: {
// handleClose(done) {
// this.$confirm('确认关闭?')
// .then(_ => {
// done();
// })
// .catch(_ => {});
// },
//页面初始化
init() {
this.robotDetailInfo = JSON.parse(sessionStorage.getItem('robotDetailInfo'));
......@@ -711,6 +782,7 @@
if (res.data.code === 200) {
// console.log(res.data.data);
this.robotInfo = res.data.data[0];
console.log("机器人信息",this.robotInfo)
this.transfer_status = Boolean(res.data.data[0].transfer_status === 'open')
}
}).catch(error => {
......@@ -732,6 +804,7 @@
axios.post(ApiConfig.GetRobotConfig, params).then( res => {
if(res.data.code === 200) {
this.robotConfig = res.data.data;
console.log("机器人配置",this.robotConfig)
}
})
},
......@@ -1048,6 +1121,57 @@
this.updateRobotConfig = Object.assign({},this.robotConfig);
this.dialogFormVisible2 = true;
},
// 查询运行配置
runningConfig(){
var params={
account:this.robotInfo.account,
coin:this.robotInfo.coin,
base:this.robotInfo.base,
control_type:"monitor_state",
// config_param:,
}
axios.post(ApiConfig.runRobotConfig,params).then( res => {
if (res.status === 200) {
this.runConfig=res.data
if(res.data.data){
this.config_param=res.data.data.config_param
}
this.dialogVisible3 = true;
// this.robotList = res.data.data;
}
}).catch( error => {
this.$notify({
title: '错误',
message: "服务器崩溃啦,请稍后再试",
type: 'error',
duration:'2000',
});
})
},
//修改运行配置
editParamConfig(){
var params={
account:this.robotInfo.account,
coin:this.robotInfo.coin,
base:this.robotInfo.base,
control_type:"monitor_action",
config_param:this.config_param ,
}
axios.post(ApiConfig.runRobotConfig,params).then( res => {
if(res.status===200){
console.log("修改配置",res);
this.dialogVisible3=false
}
}).catch( error => {
this.$notify({
title: '错误',
message: "服务器崩溃啦,请稍后再试",
type: 'error',
duration:'2000',
});
})
},
//弹框确认修改
sure_recharge1(){
this.transferok = true;
......@@ -1216,6 +1340,74 @@
</script>
<style scoped>
/* 运行配置弹窗 */
.thirdDialog{
height: 400px;
.thirdDialogInput{
height: 400px;
border-radius:4px;
border:1px solid rgba(224,224,224,1);
}
}
/* 顶部标签 */
.classify-overview {
margin-top: 20px;
height: 100px;
display:flex;
justify-content:space-between;
li {
cursor: pointer;
position: relative;
float: left;
width: 28.8%;
height: 100px;
margin-right: 1.5%;
text-align: center;
box-sizing: border-box;
border-radius:4px;
padding-top: 16px;
&:last-child {
margin-right: 0;
}
p {
font-size:12px;
&:first-child {
font-size:24px;
/* margin-bottom: 13px; */
}
}
}
li.normal {
background:rgba(241,250,244,1);
border:1px solid rgba(166,216,186,1);
color:rgba(76,171,115,1);
}
li.stop {
background:rgba(239,243,245,1);
border:1px solid rgba(199,217,225,1);
color:rgba(121,130,134,1);
}
li.abnormal {
background:rgba(248,243,243,1);
border:1px solid rgba(236,184,184,1);
color:rgba(217,120,120,1);
}
li.filter {
height: 120px;
top: -10px;
color: #fff;
&.normal {
background-color: rgba(76,171,115,1);
}
&.stop {
background-color:rgba(121,130,134,1);
}
&.abnormal {
background-color: rgba(217,120,120,1);
}
}
}
.detail-box {
overflow: hidden;
}
......@@ -1511,8 +1703,17 @@
</style>
<style>
/*select组件样式覆盖*/
.el-textarea__inner {
height: 400px;
}
.trueButton{
background-color: #7792A7;
border-color: #7792A7;
}
.detail-box {
.record-box .el-button, .el-button.update-button{
margin-left: 5px;
background: rgba(119, 146, 167, 1);
border: none;
}
......
......@@ -77,12 +77,14 @@
label="操作">
<template slot-scope="scope">
<el-button
v-show="permission_read[2]"
@click.native.prevent="clickRecharge(scope.row.coin)"
type="primary"
size="small">
充值
</el-button>
<el-button
v-show="permission_read[5]"
@click.native.prevent="clickUpdate(scope.row.coin)"
type="primary"
size="small">
......@@ -326,6 +328,8 @@
export default {
data() {
return {
permission_read:[],
permission_control:[],
username: localStorage.getItem('username'),
robotBankList: JSON.parse(sessionStorage.getItem('robotBankList')),
robotAdminList: JSON.parse(sessionStorage.getItem('robotAdminList')),
......@@ -364,6 +368,9 @@
},
created() {
this.init();
this.permission_read= parseInt(localStorage.getItem("permission_read")).toString(2).split("")
this.permission_control=parseInt(localStorage.getItem("permission_control")).toString(2).split("")
console.log(this.permission_control)
},
mounted () {
// prevent click outside event with popupItem.
......
......@@ -43,8 +43,8 @@
</div>
<div class="count-box">
<div class="fl">
<el-button type="primary" @click="exportExcel" size="mini">导出当前页</el-button>
<el-button type="primary" @click="exportExcel('all')" size="mini">导出所有</el-button>
<el-button type="primary" @click="exportExcel" size="mini" v-show="this.permission_control[5]">导出当前页</el-button>
<el-button type="primary" @click="exportExcel('all')" size="mini" v-show="this.permission_control[5]">导出所有</el-button>
</div>
<!--隐藏的下载表格按钮-->
<a id="download" href="" target="blank" hidden download></a>
......@@ -106,6 +106,8 @@
export default {
data() {
return {
permission_read:[],
permission_control:[],
coinRechargeList: [],
listCount: 0,
Loading: false,
......@@ -131,6 +133,10 @@
ClickOutside
},
created() {
this.permission_read= parseInt(localStorage.getItem("permission_read")).toString(2).split("")
this.permission_control=parseInt(localStorage.getItem("permission_control")).toString(2).split("")
console.log("可视权限",this.permission_read)
console.log("控制权限",this.permission_control)
this.webs = this.webs.length === 0 && sessionStorage.getItem('webs') ? JSON.parse(sessionStorage.getItem('webs')) : this.webs;
this.checkedWeb = this.webs[0];
for (let item of JSON.parse(sessionStorage.getItem('platInfo'))) {
......
<template>
<div class="overview">
<div class="overview-title">
<span>币种波动统计</span>
<span>所有机器人</span>
</div>
<ul class="classify-overview">
<li class="normal" :class="{ 'filter' : robotStatus === 'normal'}" @click="statusFilter('normal')">
......@@ -12,19 +12,19 @@
<p>{{robotStatusList.status_stop}}</p>
<p>停止运行(台)</p>
</li>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'profit'}" @click="statusFilter('profit')" v-if="environment=='inside'">
<p>{{robotStatusList.profit_status_abnormal}}</p>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'coin_wave'}" @click="statusFilter('coin_wave')">
<p>{{robotStatusList.coin_wave_status_abnormal}}</p>
<p>目标币今日波动异常(台)</p>
</li>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'coin'}" @click="statusFilter('coin')">
<p>{{robotStatusList.coin_status_abnormal}}</p>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'base_wave'}" @click="statusFilter('base_wave')">
<p>{{robotStatusList.base_wave_status_abnormal}}</p>
<p>基础币今日波动异常(台)</p>
</li>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'base'}" @click="statusFilter('base')">
<p>{{robotStatusList.base_status_abnormal}}</p>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'coin'}" @click="statusFilter('coin')">
<p>{{robotStatusList.coin_status_abnormal}}</p>
<p>目标币余额异常(台)</p>
</li>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'balance'}" @click="statusFilter('balance')">
<li class="abnormal" :class="{ 'filter' : robotStatus === 'base'}" @click="statusFilter('base')">
<p>{{robotStatusList.base_status_abnormal}}</p>
<p>基础币余额异常(台)</p>
</li>
......@@ -32,34 +32,65 @@
<!-- 当日波动统计 -->
<div class="record-box">
<div class="boxTitle">
<div class="title-box clearfix">
<span class="title">当日波动统计</span>
<div class="record-title">
<span class="subtitle">当日波动统计</span>
</div>
<div class="boxTitle">
<!-- 三种过滤方式 -->
<!-- 通过机器人搜索框 -->
<div class="robotInput">
<el-input v-model="robotAccount" placeholder="通过机器人UID、账户地址搜索">
<el-button @click="searchByAccount" slot="append" icon="el-icon-search"></el-button>
<el-input v-model="robotAccountOne" placeholder="通过机器人UID、账户地址搜索">
<el-button @click="searchByAccountOne" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<!-- 交易所筛选 -->
<div>
<div ref="selectBar" class="select-bar clearfix" v-show="!robotStatus" v-click-outside="clickFoldExchange">
<div class="select-bar-content exchange" :class="{'unfold' : !foldExchange}">
<span class="title">交易所</span>
<div class="fr">
<span class="ellipsis" v-show="webs.length>1 && foldExchange">...</span>
<span class="amount">{{checkedWebs.length}}</span>
<i class="fold-button"
:class="{'el-icon-caret-left' : foldExchange, 'el-icon-caret-bottom' : !foldExchange}"
v-show="webs.length>1"
@click="clickFoldExchange('web')"></i>
</div>
<el-checkbox-button :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全部</el-checkbox-button>
<el-checkbox-group v-model="checkedWebs" @change="handleCheckedChange">
<el-checkbox-button v-for="web in webs" :label="web" :key="web">{{web}}</el-checkbox-button>
</el-checkbox-group>
</div>
<!-- 币种筛选 -->
<div>
<div class="select-bar-content currency" :class="{'unfold' : !foldExchange0}">
<span class="title">币种</span>
<div class="fr">
<span class="ellipsis" v-show="currencies.length>1 && foldExchange0">...</span>
<span class="amount">{{checkedCurrencies.length}}</span>
<i class="fold-button"
:class="{'el-icon-caret-left' : foldExchange0, 'el-icon-caret-bottom' : !foldExchange0}"
v-show="currencies.length>1"
@click="clickFoldExchange('currency')"></i>
</div>
<el-checkbox-button :indeterminate="isIndeterminate0" v-model="checkAll0" @change="handleCheckAllChange0">全部</el-checkbox-button>
<el-checkbox-group v-model="checkedCurrencies" @change="handleCheckedChange0">
<el-checkbox-button v-for="currency in currencies" :label="currency" :key="currency">{{currency}}</el-checkbox-button>
</el-checkbox-group>
</div>
</div>
</div>
<!-- 隐藏的下载表格按钮 -->
<a id="download" href="" target="blank" hidden download></a>
<!-- 阶段统计和导出以及日期框 -->
<div>
<el-button type="primary">阶段统计</el-button>
<el-button type="primary">导出当前</el-button>
<el-button type="primary">导出所有</el-button>
<div class="threeButton">
<el-button type="primary" @click="dialogVisible=true">阶段统计</el-button>
<el-button type="primary" @click="exportCurrency()">导出当前</el-button>
<el-button type="primary" @click="exportCurrency('all')">导出所有</el-button>
<el-date-picker
v-model="selectTime"
type="daterange"
value-format="yyyy-MM-dd"
align="right"
unlink-panels
range-separator="至"
......@@ -68,58 +99,134 @@
</el-date-picker>
</div>
<el-table
v-loading="Loading"
:header-cell-style="{background:'#EFF1F3',color:'#808080'}"
:data="tableData"
stripe
style="width: 100%">
<el-table-column
width="150"
width="250"
label="机器人UID">
<template slot-scope="scope">
<span>{{ scope.row.coin_id }}</span>
<span>{{ scope.row.uid }}</span>
</template>
</el-table-column>
<el-table-column
label="目标币当日波动量(比例)"
>
label="目标币当日波动量(比例)">
<template slot-scope="scope">
<i class="iconfont" :class=" 'icon-'+scope.row.coin+'3'"></i>
<span>{{ scope.row.coin }}</span>
<span>{{ scope.row.coin_wave }}{{scope.row.coin}}{{scope.row.coin_wave_percent.slice(1)}})≈¥{{Number(scope.row.coin_wave)*Number(scope.row.coin_wave_ticker)}}</span>
</template>
</el-table-column>
<el-table-column
label="基础币当日波动量(比例)">
<template slot-scope="scope">
<span>{{ scope.row.active }}</span>
<span>{{ scope.row.base_wave }}{{scope.row.base}}{{scope.row.base_wave_percent.slice(1)}})≈¥{{Number(scope.row.base_wave)*Number(scope.row.base_wave_ticker)}}</span>
</template>
</el-table-column>
<el-table-column
label="当日手续费"
width="150">
label="目标币当日手续费"
width="180">
<template slot-scope="scope">
<span>{{ scope.row.records || 0 }}</span>
<span>{{ scope.row.coin_fee || 0 }}{{scope.row.coin}}</span>
</template>
</el-table-column>
<el-table-column
label="当日手续费"
width="150">
label="基础币当日手续费"
width="180">
<template slot-scope="scope">
<span>{{ scope.row.min_amount }}</span>
<span>{{ scope.row.base_fee }}{{scope.row.base}}</span>
</template>
</el-table-column>
<el-table-column
label="日期"
width="150">
width="180">
<template slot-scope="scope">
<span>{{ scope.row.recharge_amount }}</span>
<span>{{ scope.row.date_time }}</span>
</template>
</el-table-column>
</el-table>
<!-- 分页查询 -->
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page=currentPage
:page-sizes="[10, 20, 30]"
:page-size=pageSize
layout="total, prev, pager, next, sizes"
:total="listCount">
</el-pagination>
</div>
<!-- <p v-if="robotList.length<1" class="no-data">暂无数据</p> -->
<!-- 波动弹窗 -->
<el-dialog
title="阶段波动统计"
:visible.sync="dialogVisible"
width="880px"
:before-close="handleClose">
<div class="dialogTitle">
<div class="robotReacher">
<el-input v-model="robotAccount" placeholder="通过机器人UID、账户地址搜索">
<el-button @click="searchByAccount" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<div class="robotDate">
<el-date-picker
v-model="dilogSelectTime"
value-format="yyyy-MM-dd"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
<div>
<el-button type="primary" @click="statisticsMessage">统计</el-button>
</div>
</div>
<div class="symbolDiv" v-show="haveSymbol.length>0">
<div class="symbolTitle">交易对</div>
<el-radio-group v-model="symbolCheckList" size="small">
<el-radio-button v-for="symbolDouble in haveSymbol" :label="symbolDouble" :key="symbolDouble">{{symbolDouble}}</el-radio-button>
</el-radio-group>
</div>
<div class="statisMessage" v-show="!haveStatistical">请输入你想统计的机器人和时间</div>
<div class="statisMessageBigDiv" v-show="haveStatistical">
<div class="statisMessageDivOne">
<div class="firstChild">{{statisticalMessage.coin_wave}}({{statisticalMessage.coin_wave_percent}})</div>
<div class="secondChild">≈¥{{statisticalMessage.coin_wave*statisticalMessage.coin_wave_ticker}}</div>
<div class="thirdChild">目标币总波动({{statisticalMessage.coin}})</div>
</div>
<div class="statisMessageDivTwo">
<div class="firstChild">{{statisticalMessage.base_wave}}({{statisticalMessage.base_wave_percent}})</div>
<div class="secondChild">≈¥{{statisticalMessage.base_wave*statisticalMessage.base_wave_ticker}}</div>
<div class="thirdChild">基础币总波动({{statisticalMessage.base}})</div>
</div>
</div>
<div class="statisMessageBigDiv" v-show="haveStatistical">
<div class="statisMessageDivThree">
<div class="firstChild">{{statisticalMessage.coin_fee}}</div>
<div class="secondChild">≈¥{{statisticalMessage.coin_fee*statisticalMessage.coin_fee_ticker}}</div>
<div class="thirdChild">总手续费({{statisticalMessage.coin}})</div>
</div>
<div class="statisMessageDivFour">
<div class="firstChild">{{statisticalMessage.base_fee}}</div>
<div class="secondChild">≈¥{{statisticalMessage.base_fee*statisticalMessage.base_fee_ticker}}</div>
<div class="thirdChild">总手续费({{statisticalMessage.base}})</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<div class="dialogButton">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</div>
<p v-if="robotList === null" class="no-data">暂无数据</p>
</span>
</el-dialog>
</div>
</template>
<script>
import Bus from '../assets/js/bus'
import axios from 'axios';
......@@ -128,7 +235,18 @@
export default {
data() {
return {
selectTime:"", //筛选时间
robotAccountOne:"",
haveStatistical:false,
symbolCheckList:"",
haveSymbol:[],
tableData:[],
statisticalMessage:[],//统计的条件
dialogVisible:false,//弹窗
pageSize: 10, //分页,每页数量
currentPage: 1,//当前页
listCount: 20,
selectTime:[], //筛选时间
dilogSelectTime:"",//弹窗中时间筛选
environment:sessionStorage.getItem('environment'),
robotAccount: '',//通过机器人账户搜索
_robotAccount: '',//说明通过机器人账户搜索成功
......@@ -146,7 +264,6 @@
},//筛选机器人参数
robotList: [],//符合条件的机器人列表
robotDetailInfo: '',
subtitle: '所有机器人', //副标题
checkAll: false, //交易所筛选
checkedWebs: [],
webs: [],
......@@ -163,9 +280,7 @@
pairs: [],
isIndeterminate1: true,
foldExchange1: true,
showWebFilter: false,//是否显示交易所过滤
showCurrencyFilter: false,//是否显示币种过滤
showPairFilter: false,//是否显示交易对过滤
};
},
props: ['platInfo'],
......@@ -179,9 +294,11 @@
ClickOutside
},
created() {
console.log("控制权限",localStorage.getItem("permission_control"))
this.webs = this.webs.length === 0 && sessionStorage.getItem('webs') ? JSON.parse(sessionStorage.getItem('webs')) : this.webs;
this.currencies = this.currencies.length === 0 && sessionStorage.getItem('currencies') ? JSON.parse(sessionStorage.getItem('currencies')) : this.currencies;
this.init();
this.getWaveList()
Bus.$on('refresh', ()=>{
this.robotAccount = this._robotAccount ='';
this.checkAll = false;
......@@ -213,40 +330,6 @@
const RoutePath = this.$route.path;
const RouteParam = RoutePath.split('/')[2];
var StatusParams = {platform: '', coin: ''};//预警状态查询入参
switch (RouteParam) {
case 'home':
this.checkedPairs = [];
this.showWebFilter = this.showCurrencyFilter = true;
this.showPairFilter = false;
this.RobotListParams.coin = [];
this.RobotListParams.platform = [];
break;
case 'BTY':
case 'YCC':
this.checkedPairs = [];
this.checkedCurrencies = [];
this.showWebFilter = true;
this.showCurrencyFilter = this.showPairFilter = false;
StatusParams.coin = RouteParam;
this.RobotListParams.coin = [RouteParam];
this.RobotListParams.platform = [];
break;
default:
this.checkedWebs = [];
this.checkedCurrencies = [];
this.showPairFilter = true;
this.showWebFilter = this.showCurrencyFilter = false;
var index = +RouteParam;
this.pairs = JSON.parse(sessionStorage.getItem('platInfo'))[index].symbol;
if(type !== 'back') {
this.checkedPairs = [];
}
this.platform = JSON.parse(sessionStorage.getItem('platInfo'))[index].platform;
StatusParams.platform = this.platform;
this.RobotListParams.platform = [this.platform];
this.RobotListParams.coin = [];
break;
}
this.getRobotStatus(StatusParams);
if (type === 'back') {
let Coin = RouteParam === 'BTY' || RouteParam === 'YCC' ? [RouteParam] : [];
......@@ -275,20 +358,198 @@
this.getRobotList(this.RobotListParams);
}
},
//机器人预警状态查询
// 筛选
clickFoldExchange(type) {
switch (type) {
case 'web':
this.foldExchange = !this.foldExchange;
break;
case 'currency':
this.foldExchange0 = !this.foldExchange0;
break;
case 'pair':
this.foldExchange1 = !this.foldExchange1;
break;
default:
this.foldExchange = this.foldExchange0 = this.foldExchange1 = true;
break
}
},
//波动范围统计
statisticsMessage(){
let params={
account:this.robotAccount,
symbol:this.symbolCheckList,
min_date_time:this.dilogSelectTime[0],
max_date_time:this.dilogSelectTime[1]
}
axios.post(ApiConfig.CountWaveRange,params).then( res => {
if (res.data.code === 200) {
this.statisticalMessage=res.data.data
this.haveStatistical=true
}
}).catch( error => {
this.$notify({
title: '错误',
message: "服务器崩溃啦,请稍后再试",
type: 'error',
duration:'2000',
});
})
},
//获取波动列表
getWaveList(){
let params={
page:this.currentPage.toString(),
size:this.pageSize.toString(),
platform:this.checkedWebs,
coin:this.checkedCurrencies,
account:this.robotAccountOne,
min_date_time:this.selectTime==''?'':this.selectTime[0].toString(),
max_date_time:this.selectTime==''?'':this.selectTime[1].toString()
}
axios.post(ApiConfig.countWave,params).then( res => {
if (res.data.code === 200) {
this.listCount=res.data.data.count
this.tableData=res.data.data.list
console.log("列表数据",this.tableData)
}
})
},
//'='拼接key和value
toQueryPair(key, value) {
if (typeof value == 'undefined') {
console.log(key)
return;
}
return key + '=' + (value === null ? '' : String(value));
},
//'&'拼接,数组将value转换成','连接的string
toQueryString(obj) {
var ret = [];
for (var key in obj) {
var values = obj[key];
// key = encodeURIComponent(key);
if (values && values.constructor == Array) {//数组
var queryValues = values.join(',');
ret.push(this.toQueryPair(key, queryValues));
} else { //字符串
ret.push(this.toQueryPair(key, values));
}
}
return ret.join('&');
},
// 导出当前波动列表
exportCurrency(type){
let params = {
platform: "",
coin: "",
min_date_time:"",
max_date_time: ""
}
if (type !== 'all') {
Object.assign(params, {
page: this.currentPage,
size: this.pageSize,
})
}
let downloadHref = document.getElementById('download');
const href = ApiConfig.countWaveExcel + '?' + this.toQueryString(params);
downloadHref.setAttribute('href', href);
downloadHref.click();
},
//交易所过滤
handleCheckAllChange(val) {
this.robotAccount = this._robotAccount ='';
this.checkedWebs = val ? this.webs : [];
this.isIndeterminate = false;
this.currencies = JSON.parse(sessionStorage.getItem('currencies'));
this.checkedCurrencies = [];
this.checkAll0 = false;
let ListParams = this.RobotListParams;
ListParams.platform = [];
const RoutePath = this.$route.params.name;
ListParams.coin = RoutePath === 'BTY' || RoutePath === 'YCC' ? [RoutePath] : [];
this.getRobotList(ListParams);
},
handleCheckedChange(value) {
this.robotAccount = this._robotAccount ='';
let checkedCount = value.length;
this.checkAll = checkedCount === this.webs.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.webs.length;
//动态筛选币种
if (value.length === 0) {
this.currencies = this.allCurrencies;
}else {
this.currencies = [];
for (let item of value) {
for (let platItem of this.platInfo) {
if (platItem.platform === item) {
this.currencies = [...new Set(this.currencies.concat(platItem.coin))];
}
}
}
}
this.checkedCurrencies = this.currencies;
this.checkAll0 = true;
//筛选符合条件的机器人
let ListParams = this.RobotListParams;
ListParams.platform = value;
const RoutePath = this.$route.params.name;
ListParams.coin = RoutePath === 'BTY' || RoutePath === 'YCC' ? [RoutePath] : [];
this.getRobotList(ListParams);
},
//币种过滤
handleCheckAllChange0(val) {
this.robotAccount = this._robotAccount ='';
this.checkedCurrencies = val ? this.currencies : [];
this.isIndeterminate0 = false;
let ListParams = this.RobotListParams;
ListParams.platform = this.checkedWebs;
ListParams.coin = [];
this.getRobotList(ListParams);
},
handleCheckedChange0(value) {
this.robotAccount = this._robotAccount ='';
let checkedCount = value.length;
this.checkAll0 = checkedCount === this.currencies.length;
this.isIndeterminate0 = checkedCount > 0 && checkedCount < this.currencies.length;
let ListParams = this.RobotListParams;
ListParams.platform = this.checkedWebs;
ListParams.coin = value;
this.getRobotList(ListParams);
},
//弹窗前确认
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
},
//分页
handleSizeChange(val) {
this.pageSize = val;
this.currentPage = 1;
// this.getRechargeList();
},
handleCurrentChange(val) {
this.currentPage = val;
// this.getRechargeList(val+'');
},
// 机器人预警状态查询
getRobotStatus(params) {
axios.post(ApiConfig.GetRobotStatus,params).then( res => {
if (res.data.code === 200) {
// console.log(res.data)
this.robotStatusList = res.data.data;
}
})
},
//获取符合筛选条件的机器人列表
getRobotList(params) {
axios.post(ApiConfig.GetMatchRobots,params).then( res => {
if (res.data.code === 200) {
// console.log(res.data.data);
this.robotList = res.data.data;
}
}).catch( error => {
......@@ -306,62 +567,78 @@
this.robotStatus = status;
this.subtitle = status === 'normal' ? '正在运行机器人' :
(status === 'stop' ? '停止运行机器人' :
(status === 'profit' ? '盈利异常机器人' :
(status === 'coin' ? '目标币异常机器人' :
(status === 'base' ? '基础币异常机器人':'所有机器人'))));
//筛选机器人参数
const path = this.$route.params.name;
let Coin = path === 'BTY' || path === 'YCC' ? [path] : [];
let Platform = (path!=='home'&&path!=='BTY'&&path !== 'YCC') ? [this.platform] : [];
var ListParams = {
class: "robot", //账户级别
coin: Coin, //目标币种,用于首页里的筛选和币种监控 可选参数
symbol: [], //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数
platform: Platform, //交易所种类 可选参数
};
if (status==='normal' || status==='stop') {
ListParams.status = status;
}else {
ListParams.abnormal = status;
(status === 'coin_wave' ? '目标币今日波动异常机器人' :
(status === 'base_wave' ? '基础币今日波动异常机器人' :
(status === 'coin' ? '目标币余额异常机器人' :
(status === 'base' ? '基础币余额异常机器人':'所有机器人')))));
//筛选b波动参数
var params={}
if(status!="normal"&&status!="stop"){
params={
page:this.currentPage.toString(),
size:this.pageSize.toString(),
platform:this.checkedWebs,
coin:this.checkedCurrencies,
account:this.robotAccountOne,
min_date_time:this.selectTime==''?'':this.selectTime[0].toString(),
max_date_time:this.selectTime==''?'':this.selectTime[1].toString(),
abnormal:status
}
this.getRobotList(ListParams);
}else{
params={
page:this.currentPage.toString(),
size:this.pageSize.toString(),
platform:this.checkedWebs,
coin:this.checkedCurrencies,
account:this.robotAccountOne,
min_date_time:this.selectTime==''?'':this.selectTime[0].toString(),
max_date_time:this.selectTime==''?'':this.selectTime[1].toString(),
status:status
}
}
axios.post(ApiConfig.countWave,params).then( res => {
if (res.data.code === 200) {
this.listCount=res.data.data.count
this.tableData=res.data.data.list
console.log("列表数据",this.tableData)
}
})
},
//通过机器人账户搜索
//波动统计首页搜索
searchByAccountOne(){
this.getWaveList()
},
//波动统计弹窗通过机器人账户搜索
searchByAccount() {
if (!this.robotAccount) {
let params={
class:"robot",
account:this.robotAccount,
}
axios.post(ApiConfig.GetMatchRobots,params).then( res => {
if (res.data.code === 200) {
let arr=res.data.data.map(item=>{
return item.base+"/"+item.coin
})
this.haveSymbol=arr
}
}).catch( error => {
this.$notify({
title: '错误',
message: "请先输入账户地址后再试",
message: "服务器崩溃啦,请稍后再试",
type: 'error',
duration:'2000',
});
return;
}
this.checkAll = false;
this.isIndeterminate = true;
this.foldExchange = true;
this.checkAll0 = false;
this.isIndeterminate0 = true;
this.foldExchange0 = true;
this.checkAll1 = false;
this.checkedPairs = [];
this.isIndeterminate1 = true;
this.foldExchange1 = true;
this.checkedWebs = [];
this.checkedCurrencies = [];
this.checkedPairs = [];
let Params = {
class:"robot", //账户级别 有robot bank admin三个返回数据也不同
account: this.robotAccount,
}
this._robotAccount = this.robotAccount;
this.getRobotList(Params);
})
},
},
watch:{
checkedWebs(){
this.getWaveList()
},
checkedCurrencies(){
this.getWaveList()
},
platInfo(val){
this.webs = [];
//获取所有的交易所和币种
......@@ -371,23 +648,249 @@
sessionStorage.setItem('webs', JSON.stringify(this.webs));
sessionStorage.setItem('currencies', JSON.stringify(this.currencies));
}
},
currentPage(val){
this.getWaveList()
},
selectTime(){
this.getWaveList()
}
}
};
</script>
<style scoped>
.statisMessageBigDiv{
margin: 20px 0 0 0;
width: 95%;
display: flex;
}
.statisMessageDivOne{
width:50%;
height:120px;
margin-right: 10px;
background:rgba(241,250,244,1);
border-radius:4px;
border:1px solid rgba(166,216,186,1);
.firstChild{
margin-top: 22px;
text-align: center;
height:33px;
font-size:24px;
color:rgba(76,171,115,1);
line-height:33px;
}
.secondChild{
text-align: center;
height:17px;
font-size:12px;
color:rgba(76,171,115,1);
line-height:17px;
}
.thirdChild{
margin-top: 6px;
text-align: center;
height:17px;
font-size:12px;
color:rgba(76,171,115,1);
line-height:17px;
}
}
.statisMessageDivTwo{
width:50%;
height:120px;
background:rgba(248,243,243,1);
border-radius:4px;
border:1px solid rgba(236,184,184,1);
.firstChild{
margin-top: 22px;
text-align: center;
height:33px;
font-size:24px;
color:rgba(217,120,120,1);
line-height:33px;
}
.secondChild{
text-align: center;
height:17px;
font-size:12px;
color:rgba(217,120,120,1);
line-height:17px;
}
.thirdChild{
margin-top: 6px;
text-align: center;
height:17px;
font-size:12px;
color:rgba(217,120,120,1);
line-height:17px;
}
}
.statisMessageDivThree{
width:50%;
height:120px;
margin-right: 10px;
background:rgba(239,243,245,1);
border-radius:4px;
border:1px solid rgba(199,217,225,1);
.firstChild{
margin-top: 22px;
text-align: center;
height:33px;
font-size:24px;
color:rgba(121,130,134,1);
line-height:33px;
}
.secondChild{
text-align: center;
height:17px;
font-size:12px;
color:rgba(121,130,134,1);
line-height:17px;
}
.thirdChild{
margin-top: 6px;
text-align: center;
height:17px;
font-size:12px;
color:rgba(121,130,134,1);
line-height:17px;
}
}
.statisMessageDivFour{
width:50%;
height:120px;
background:rgba(239,243,245,1);
border-radius:4px;
border:1px solid rgba(199,217,225,1);
.firstChild{
margin-top: 22px;
text-align: center;
height:33px;
font-size:24px;
color:rgba(121,130,134,1);
line-height:33px;
}
.secondChild{
text-align: center;
height:17px;
font-size:12px;
color:rgba(121,130,134,1);
line-height:17px;
}
.thirdChild{
margin-top: 6px;
text-align: center;
height:17px;
font-size:12px;
color:rgba(121,130,134,1);
line-height:17px;
}
}
.symbolTitle{
color: #7792A7;
height:36px;
line-height:36px;
margin: 0 10px 0 10px;
}
.symbolDiv{
display: flex;
width: 95%;
height:40px;
border-radius:4px;
border:1px solid rgba(224,224,224,1);
margin-top: 10px;
}
.dialogTitle {
align-items: center;
display: flex;
.robotReacher{
width: 360px;
margin-right:10px;
}
.robotDate{
width: 340px;
margin-right: 20px;
}
}
.record-title{
float: left;
padding-top: 20px;
}
.threeButton{
margin-bottom: 10px;
float: right;
}
.robotInput{
margin-left: 20px;
width: 300px;
height: 40px;
}
.subtitle {
font-size:18px;
color:rgba(51,51,51,1);
}
.select-bar {
display: flex;
align-items: center;
float: right;
height: 60px;
.select-bar-content {
float: left;
width: 260px;
margin-left: 10px;
padding: 5px 10px 0 65px;
background-color: #fff;
border-radius:4px;
border:1px solid rgba(224,224,224,1);
z-index: 100;
height: 38px;
overflow: hidden;
&.pair {
width: 410px;
}
.amount {
line-height: 26px;
}
.ellipsis {
position: relative;
top: -3px;
left: -13px;
}
&.unfold {
height: auto;
}
.title {
display: inline-block;
width: 65px;
text-align: center;
position: relative;
left: -65px;
}
.fold-button {
cursor: pointer;
line-height: 26px;
color: rgba(192,212,218,1);
}
}
}
.record-box {
background:rgba(255,255,255,1);
border-radius:4px;
border:1px solid rgba(119,146,167,1);
padding: 20px;
margin: 20px 0 20px 0;
padding: 10px 20px 20px 20px;
margin: 20px 20px 20px 0;
}
.title-box {
position: relative;
z-index: 10;
margin: 25px 0 20px 0;
margin: 0 0 0 0;
/*margin-bottom: 20px;*/
&>.title {
display: inline-block;
......@@ -399,7 +902,8 @@
}
.title {
display: inline-block;
width: 125px;
width: 110px;
height: 25px;
text-align: center;
position: relative;
......@@ -412,6 +916,7 @@
font-size:18px;
color:rgba(51,51,51,1);
}
/* 顶部标签 */
ul.classify-overview {
height: 100px;
display:flex;
......@@ -562,16 +1067,128 @@
margin: 0px 0 20px 0;
}
.boxTitle {
float: right;
display: flex;
/* justify-content: center; */
align-items: center;
}
.robotInput{
margin-left: 20px;
/* 弹窗样式 */
.dialogButton{
display: flex;
justify-content: center;
}
.statisMessage{
font-size: 14px;
color: #808080;
margin:o auto;
height: 300px;
line-height: 300px;
text-align: center;
}
</style>
<style>
.el-radio-button__inner {
margin: 2px 0 0 5px;
width: 86px;
text-align: center;
background-color: #C3D3DF;
border-color: #C3D3DF;
box-shadow: none;
color: #fff;
border-radius: 3px;
font-size: 12px;
}
.el-radio-button {
margin: 0 2px 10px 0;
border-radius: 3px;
}
.el-radio-button.is-checked .el-radio-button__inner {
background-color: #7792A7;
border-color: #7792A7;
}
.el-radio-button.is-focus .el-radio-button__inner {
border-color: #dcdfe6;
}
.el-radio-button__orig-radio:checked+.el-radio-button__inner {
color: #fff;
background-color: #7792A7;
border-color: #7792A7;
-webkit-box-shadow: -1px 0 0 0 #7792A7;
box-shadow: -1px 0 0 0 #7792A7;
}
/*select组件样式覆盖*/
.overview {
.select-bar-content {
/*padding: 2px 0 0 65px;*/
.el-checkbox-button:last-child .el-checkbox-button__inner, .el-checkbox-button:first-child .el-checkbox-button__inner {
border-radius: 3px;
}
&.pair {
.el-checkbox-button__inner{
width: 85px;
}
.el-checkbox-group .el-checkbox-button:first-child {
margin-left: 90px;
}
}
.el-checkbox-button__inner {
padding: 5px 0;
width: 58px;
text-align: center;
background-color: #C3D3DF;
border-color: #C3D3DF;
box-shadow: none;
color: #fff;
border-radius: 3px;
font-size: 12px;
}
.el-checkbox-button {
margin: 0 10px 10px 0;
border-radius: 3px;
}
.el-checkbox-button.is-checked .el-checkbox-button__inner {
background-color: #7792A7;
border-color: #7792A7;
}
.el-checkbox-button.is-focus .el-checkbox-button__inner {
border-color: #dcdfe6;
}
&>.el-checkbox-button {
margin-left: -69px;
}
.el-checkbox-group {
margin-top: -34px;
.el-checkbox-button:first-child {
margin-left: 70px;
}
}
}
.el-button--primary {
color: #fff;
background-color: #7792A7;
border-color: #7792A7;
}
/* 覆盖弹窗title文字样式 */
.el-dialog__title {
display: inline-block;
width: 100%;
text-align: center;
}
/* 弹窗头部样式 */
.el-dialog__header {
height: 100px;
padding: 30px 20px 10px;
}
.el-button {
margin: 0 10px 0 0;
}
.el-date-editor .el-range-separator{
padding: 0;
}
.el-input-group__append{
padding: 0;
}
}
</style>
......@@ -12,17 +12,21 @@
<p>{{robotStatusList.status_stop}}</p>
<p>停止运行(台)</p>
</li>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'profit'}" @click="statusFilter('profit')" v-if="environment=='inside'">
<p>{{robotStatusList.profit_status_abnormal}}</p>
<p>盈利异常(台)</p>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'coin_wave'}" @click="statusFilter('coin_wave')">
<p>{{robotStatusList.coin_wave_status_abnormal}}</p>
<p>目标币今日波动异常(台)</p>
</li>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'base_wave'}" @click="statusFilter('base_wave')" v-if="environment=='inside'">
<p>{{robotStatusList.base_wave_status_abnormal}}</p>
<p>基础币今日波动异常(台)</p>
</li>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'coin'}" @click="statusFilter('coin')">
<p>{{robotStatusList.coin_status_abnormal}}</p>
<p>目标币数量异常(台)</p>
<p>目标币余额异常(台)</p>
</li>
<li class="abnormal" :class="{ 'filter' : robotStatus === 'base'}" @click="statusFilter('base')">
<p>{{robotStatusList.base_status_abnormal}}</p>
<p>基础币数量异常(台)</p>
<p>基础币余额异常(台)</p>
</li>
</ul>
<div class="filter-box clearfix">
......@@ -88,7 +92,7 @@
<span>查看详情</span>
<i class="el-icon-caret-right"></i>
</div>
<div class="switch">
<div class="switch" v-show="permission_read[0]">
<span v-show="item.status=='normal'">关闭</span>
<span v-show="!item.status=='normal'">开启</span>
<el-switch
......@@ -101,32 +105,58 @@
</div>
</div>
<p class="robot-name">{{item.tag}}</p>
<div class="chart-box">
<p v-if="environment=='inside'" class="title">今日盈亏</p>
<p v-if="environment=='inside'" class="data" :class="item.today_profit && item.today_profit.indexOf('-')!== -1 ? 'lose' : 'gain'">{{item.today_profit}}</p>
<div>
<p v-show="item.status==='normal'" class="type" :class="{'inside':environment=='inside','outside':environment=='outside'}">正在运行</p>
<p v-show="item.status==='stop'" class="type" :class="{'inside':environment=='inside','outside':environment=='outside'}">停止运行</p>
<p v-if="environment=='inside'">
<span class="result">总盈亏</span>
<span class="data" :class="item.all_profit && item.all_profit.indexOf('-')!== -1 ? 'lose' : 'gain'">{{item.all_profit}}</span>
</p>
<!-- <p class="robot-nameTwo">{{item.status}}</p> -->
<div class="twoChart-box" >
<div class="chart-box" >
<p v-show="permission_read[6]" v-if="environment=='inside'" class="title">{{item.coin}}波动</p>
<p v-show="permission_read[6]" v-if="environment=='inside'" class="data" :class="item.today_profit && item.today_profit.indexOf('-')!== -1 ? 'lose' : 'gain'">{{item.coin_wave_percent}}</p>
<p v-show="permission_read[6]" v-if="environment=='inside'" class="dataTwo">{{item.coin_wave}}</p>
<p v-show="permission_read[6]" v-if="environment=='inside'" class="title">≈¥{{item.coin_wave*item.coin_ticker}}</p>
</div>
<div class="chart-box">
<p v-show="permission_read[6]" v-if="environment=='inside'" class="title">{{item.base}}波动</p>
<p v-show="permission_read[6]" v-if="environment=='inside'" class="data" :class="item.today_profit && item.today_profit.indexOf('-')!== -1 ? 'lose' : 'gain'">{{item.base_wave_percent}}</p>
<p v-show="permission_read[6]" v-if="environment=='inside'" class="dataTwo">{{item.base_wave}}</p>
<p v-show="permission_read[6]" v-if="environment=='inside'" class="title">≈¥{{item.base_wave*item.base_ticker}}</p>
</div>
<div class="coin">
<span>{{item.coin}}余额</span>
<div class="sum">
<span>{{item.coin_amount}}</span>
</div>
<div class="coinDiv" >
<div class="coinOne">
<span>{{item.coin}}</span>
<div class="sum">
<span>{{item.coin_wave}}</span>
<!-- <span>{{item.coin}}</span> -->
</div>
</div>
<div class="base">
<span>{{item.base}}余额</span>
<div class="coin" >
<span>≈¥{{item.coin_fee}}</span>
<div class="sum">
<span>{{item.base_amount}}</span>
<span>≈¥{{item.coin_fee}}</span>
<!-- <span>{{item.coin}}</span> -->
</div>
</div>
</div>
<div class="coinDiv" >
<div class="coinOne">
<span>{{item.base}}</span>
<div class="sum">
<span>{{item.base_wave}}</span>
</div>
</div>
<div class="base">
<span>≈¥{{item.base_fee}}</span>
<div class="sum">
<span>≈¥{{item.base_fee}}</span>
</div>
</div>
</div>
</li>
<li></li>
<li></li>
......@@ -144,6 +174,8 @@
export default {
data() {
return {
permission_read:[],
permission_control:[],
environment:sessionStorage.getItem('environment'),
robotAccount: '',//通过机器人账户搜索
_robotAccount: '',//说明通过机器人账户搜索成功
......@@ -194,6 +226,11 @@
ClickOutside
},
created() {
this.permission_read= parseInt(localStorage.getItem("permission_read")).toString(2).split("")
this.permission_control=parseInt(localStorage.getItem("permission_control")).toString(2).split("")
console.log("可视权限",this.permission_read)
console.log("控制权限",this.permission_control)
this.webs = this.webs.length === 0 && sessionStorage.getItem('webs') ? JSON.parse(sessionStorage.getItem('webs')) : this.webs;
this.currencies = this.currencies.length === 0 && sessionStorage.getItem('currencies') ? JSON.parse(sessionStorage.getItem('currencies')) : this.currencies;
this.init();
......@@ -294,7 +331,7 @@
getRobotStatus(params) {
axios.post(ApiConfig.GetRobotStatus,params).then( res => {
if (res.data.code === 200) {
// console.log(res.data)
// console.log("数据",res.data)
this.robotStatusList = res.data.data;
}
})
......@@ -305,6 +342,7 @@
if (res.data.code === 200) {
// console.log(res.data.data);
this.robotList = res.data.data;
console.log("机器人数据",res.data.data)
}
}).catch( error => {
this.$notify({
......@@ -438,9 +476,10 @@
this.robotStatus = status;
this.subtitle = status === 'normal' ? '正在运行机器人' :
(status === 'stop' ? '停止运行机器人' :
(status === 'profit' ? '盈利异常机器人' :
(status === 'coin' ? '目标币异常机器人' :
(status === 'base' ? '基础币异常机器人':'所有机器人'))));
(status === 'coin_wave' ? '目标币今日波动异常机器人' :
(status === 'base_wave' ? '基础币今日波动异常机器人' :
(status === 'coin' ? '目标币余额异常机器人' :
(status === 'base' ? '基础币余额异常机器人':'所有机器人')))));
//筛选机器人参数
const path = this.$route.params.name;
let Coin = path === 'BTY' || path === 'YCC' ? [path] : [];
......@@ -653,7 +692,7 @@
/*margin: 0 20px 20px 0;*/
margin-bottom: 20px;
width:306px;
height:340px;
height:376px;
background:rgba(255,255,255,1);
border-radius:4px;
padding: 13px 23px 0 20px;
......@@ -664,27 +703,37 @@
&.normal {
border:1px solid rgba(146,208,171,1);
.chart-box {
border: 3px solid #73C795;
background-color: rgba(166,216,186,0.3);
/* border: 3px solid #73C795; */
}
.type {
text-align: center;
font-size: 14px;
color:rgba(76,171,115,1);
}
}
&.stop {
border:1px solid rgba(208,216,220,1);
.chart-box {
border: 3px solid rgba(208,216,220,1);
/* border: 3px solid rgba(208,216,220,1); */
background-color:rgba(199,217,225,0.3);
}
.type {
font-size: 14px;
text-align: center;
color:rgba(121,130,134,1);
}
}
&.abnormal {
border:1px solid rgba(217,120,120,1);
.chart-box {
border: 3px solid rgba(217,120,120,1);
/* border: 3px solid rgba(217,120,120,1); */
background-color:rgba(236,184,184,0.3);
}
.type {
font-size: 14px;
text-align: center;
color:rgba(217,120,120,1);
}
}
......@@ -711,17 +760,29 @@
color:rgba(51,51,51,1);
line-height:20px;
text-align: center;
margin: 12px 0 20px 0;
margin: 12px 0 0px 0;
}
.robot-nameTwo{
font-size:14px;
font-weight: 600;
color:rgba(51,51,51,1);
/* line-height:20px; */
text-align: center;
margin: 0px 0 10px 0;
}
.twoChart-box{
display: flex;
width: 266px;
}
.chart-box {
margin: auto;
width: 154px;
width: 128px;
box-sizing: border-box;
height: 154px;
border-radius: 50%;
height: 130px;
/* border-radius: 50%; */
text-align: center;
position: relative;
padding-top: 43px;
padding-top: 10px;
.title {
height: 17px;
font-size:12px;
......@@ -729,6 +790,7 @@
line-height:17px;
}
.data {
margin-top: 10px;
font-size:24px;
line-height:33px;
&.gain {
......@@ -741,6 +803,13 @@
color:rgba(208,216,220,1);
}
}
.dataTwo{
margin:5px 0 5px 0 ;
font-size:14px;
color: #333333;
line-height:20px;
height: 20px;
}
div {
height: 40px;
width: 100%;
......@@ -770,19 +839,37 @@
}
}
.coin,.base {
height: 20px;
line-height: 20px;
/* margin-top: 10px;
height: 57px; */
/* line-height: 20px; */
height: 28px;
line-height: 28px;
font-size:12px;
color:rgba(128,128,128,1);
.sum {
color:rgba(128,128,128,1);
float: right;
font-size:12px;
}
}
.coinOne{
height: 28px;
line-height: 28px;
font-size:12px;
color:#333333;
.sum {
float: right;
font-size:14px;
color:rgba(51,51,51,1);
}
}
.coin {
margin: 19px 0 10px 0;
.coinDiv{
height: 57px;
margin-top: 10px;
}
/* .coin {
margin: 19px 0 10px 0;
} */
.no-data {
text-align: center;
font-size: 20px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment