代码提交

This commit is contained in:
lixiaobang 2022-11-16 09:49:06 +08:00
parent c81a3cbcc6
commit 05e275d857
4 changed files with 31 additions and 10 deletions

View File

@ -31,6 +31,7 @@
</template>
<script>
import MinxinItem from "./mixins"
import axios from 'axios'
export default {
name: 'home',
mixins:[MinxinItem],
@ -42,12 +43,21 @@ export default {
{day:'今天',temperature:'27℃-19℃',pic:require('./assets/images/sun.png')},
{day:'12月01日',temperature:'27℃-19℃',pic:require('./assets/images/union.png')},
{day:'12月02日',temperature:'27℃-19℃',pic:require('./assets/images/windy.png')}
]
],
}
},
mounted(){
// this.handleWather()
},
methods:{
//
handleWather(){
axios({url:'https://restapi.amap.com/v3/weather/weatherInfo?key=bc2b906032fdd8a63cbd0790d656b1d7&city=320903',methods:''}).then(res=>{
this.weatherArr[0] = res.data.lives[0]
console.log(res.data,'asdsads');
})
},
handleChange(index){
let that = this;
this.routerActive = index

View File

@ -4,6 +4,9 @@ if (process.env.NODE_ENV === 'development') {
} else if (process.env.NODE_ENV === 'production') {
axios.defaults.baseURL = '/api'
}
//设置请求头参数 common 为设置所有的接口 post为设置post请求的接口
// axios.defaults.headers.common['Authorization'] = `Bearer ${localStorage.getItem('access_token')}`;
// 电力概况
export const getCompanyInfo = (params) => {
return axios.get('/Handler/Company.ashx', {

View File

@ -358,13 +358,14 @@ export default {
}else if (tab.index == 1) {
this.activeName = 'second'
getDevice({
action : 'querydevice',
device_name : that.ringMainUnit
}).then((res)=>{
if (res.data.data.pic != null) {
this.photoList = Object.keys(res.data.data.pic).map((item,index)=>{
let photoUrl = ' http://111.229.30.246:3111'+ res.data.data.pic[index].url
let photoUrl = 'http://111.229.30.246:3111'+ res.data.data.pic[index].url
return {photo:photoUrl}
})
}

View File

@ -310,7 +310,7 @@
</div>
</div>
</div>
<!-- <div style="height:20px;width:20px;position: fixed">
<!-- <div style="height:20px;width:20px" class="icon">
<img src="../assets/images/btnFangDa.png"/>
</div> -->
<div class="componentShow" v-if="modelOthers">
@ -386,15 +386,15 @@ export default {
topContent:[
{
name:'配变数量',
count:'6,573'
count:''
},
{
name:'重复停运台次',
count:'6,573'
count:''
},
{
name:'配变重复停运率',
count:'0.22%'
count:''
},
],
device:''
@ -459,16 +459,17 @@ export default {
let dataPbty = [];
dataPbty = res.data.data
this.detailedFive(dataPbty);
console.log(dataPbty,'配变停运');
let dataPb = [];
let dataCf = [];
let dataCfl = [];
for (let i = 0; i < dataPbty.length; i++) {
dataPb.push(dataPbty[i].pbsl);
dataCf.push(dataPbty[i].cftytc);
dataCfl.push(dataPbty[i].pbcftyl)
}
this.topContent[0].count = dataPb.reduce((x, y) => x + y)
this.topContent[1].count = dataCf.reduce((x, y) => x + y)
console.log(dataCf.reduce((x, y) => x + y),'总数');
this.topContent[2].count = dataCfl.reduce((x, y) => x + y) + '%'
})
this.handleDate(0);
let that = this;
@ -480,7 +481,7 @@ export default {
that.device = res.val
}
})
},
},
methods: {
//unity
@ -553,7 +554,8 @@ export default {
type: "value",
data:[0,2,4,6,8,10],
nameTextStyle:{
color:'#ffffff'
color:'#ffffff',
// padding:[25,0,0,0]
},
axisLabel:{
color:'#ffffff'
@ -1994,6 +1996,11 @@ export default {
line-height: 26px;
}
}
.icon{
position: absolute;
bottom: 0;
right: 0;
}
</style>
<style lang="less">
.el-select{