123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- <template>
- <div>
- <div class="communication">
- <div class="battery_title">
- <span class="first"><img src="../assets/cangwei.png" /><p> {{chargerCode}}号仓位充电机</p></span>
- <!-- <span><el-button :class="buttonState[0]" @click="sendCharger" :disabled="buttonState === 1">{{buttonState === 1 ?'不可操作':buttonState[1]}}</el-button></span> -->
- </div>
- <div :class="statustext[1]">{{statustext[0]}}</div>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: "BatteryCharger",
- props:['chargerCode','comState'],
- data(){
- return{
- loading:false,
- }
- },
- computed:{
- statustext(){
- if(this.comState===1){
- return ['通讯正常','success']
- }else{
- return ['通讯异常','warning']
- }
- },
- buttonState(){
- if((this.chgState === 0 || this.chgState === 3) && this.storeState === 1){
- return ['btnState','充电']
- }else if(this.chgState === 2 && this.storeState === 1){
- return ['purple','断电']
- }else{
- return 1
- }
- }
- },
- methods:{
-
- }
- }
- </script>
- <style lang="scss" scoped>
- .communication {
- display: flex;
- margin-top: 10px;
- margin-bottom: 25px;
- div {
- line-height: 36px;
- font-size: 16px;
- font-weight: 600;
- height: 36px;
- width: 136px;
- text-align: center;
- }
- @media screen and (min-width: 1024px) and (max-width: 1153px) {
- div{
- font-weight: normal;
- font-size: 12px;
- white-space:nowrap;
- }
- .success,.warning{
- transform: scale(0.9);
- }
- }
- .battery_title{
- background-color: #1b263a;
- border: #25334d solid 1px;
- color: white;
- line-height: 34px;
- display: flex;
- justify-content: space-between;
- padding: 0 5px;
- width: 298px;
-
- .is-disabled{
- width:90px;
- height: 28px;
- padding: 0 0 0 18px;
- border-radius: 15px;
- color: #5f6571;
- border-color:#353c4c;
- background: url('../assets/d3.png') #353c4c no-repeat 6px center;
- background-size: 14px 14px;
- @media screen and (min-width: 1024px) and (max-width: 1153px) {
- :first-child{
- display: inline-block;
- transform:scale(0.9);
- color: white;
- margin-left: -18px;
- }
- .is-disabled{
- background-image: none;
- }
- }
- }
- @media screen and (min-width: 1024px) and (max-width: 1153px) {
- .is-disabled{
- background-image: none;
- }
- }
- .first{
- display: flex;
- img{
- width: 30px;
- height: 30px;
- margin-top: 2px;
- }
- p{
- flex: 1;
- margin: 0;
- padding: 0;
- }
- @media screen and (min-width: 1024px) and (max-width: 1153px) {
- p{
- font-weight: normal;
- white-space: nowrap;
- transform: scale(0.9);
- }
- }
- }
-
- .btnState{
- width:70px;
- height: 28px;
- padding: 0 0 0 15px;
- font-size: 14px;
- color: #fff;
- border-radius: 15px;
- line-height: 28px;
- margin-top: 2px;
- cursor: pointer;
- border: none;
- letter-spacing: 1px;
- background: url('../assets/d1.png') rgb(105, 184, 137) no-repeat 10px center;
- background-size: 14px 14px;
- }
- @media screen and (min-width: 1024px) and (max-width: 1153px) {
- .btnState{
- font-size: 12px;
- background-image: none;
- padding: 0;
- text-align: center;
- line-height: 28px;
- }
- }
- .btnState:hover{
- background-color:rgb(105, 184, 137,0.8);
- }
- .purple{
- width:70px;
- height: 28px;
- padding: 0 0 0 15px;
- font-size: 14px;
- color: #fff;
- border-radius: 15px;
- margin-top: 2px;
- cursor: pointer;
- border: none;
- letter-spacing: 1px;
- background: url('../assets/d2.png') rgb(224, 125, 68) no-repeat 10px center;
- background-size: 14px 14px;
- }
- .purple:hover{
- background-color:rgb(224, 125, 68,0.8);
- }
- img {
- vertical-align: middle;
- }
- }
- .success {
- color: #246CF9;
- text-align: right;
- }
- .warning {
- color: #c85e60;
- text-align: right;
- }
- }
- </style>
|