代码提交
This commit is contained in:
parent
df68891c60
commit
289844c46f
49
src/App.vue
49
src/App.vue
|
@ -18,7 +18,7 @@
|
|||
</div>
|
||||
<div class="date">
|
||||
<span>{{item.date}}</span>
|
||||
<span style="font-size:24px;margin-top: 3px;">{{item.high}}-{{item.low}}</span>
|
||||
<span style="font-size:24px;margin-top: 3px;">{{item.temperature}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -38,12 +38,14 @@ export default {
|
|||
mixins:[MinxinItem],
|
||||
data(){
|
||||
return{
|
||||
addDay:'',
|
||||
subDay:'',
|
||||
routerTitle:['首页','20kv','35kv','站房智辅'],
|
||||
routerActive:0,
|
||||
weatherArr:[
|
||||
{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')}
|
||||
{day:'今天',temperature:'',pic:require('./assets/images/sun.png')},
|
||||
{day:'昨天',temperature:'',pic:require('./assets/images/union.png')},
|
||||
{day:'明天',temperature:'',pic:require('./assets/images/windy.png')}
|
||||
],
|
||||
weekList:['周日','周一','周二','周三','周四','周五','周六'],
|
||||
week:'',
|
||||
|
@ -56,18 +58,47 @@ export default {
|
|||
},
|
||||
|
||||
methods:{
|
||||
getDateSub(n){
|
||||
let day = this.$moment(new Date()).subtract(n, 'days').format('YYYY-MM-DD');
|
||||
this.subDay = day
|
||||
return day;
|
||||
},
|
||||
getDateAdd(n){
|
||||
var dd = new Date();
|
||||
dd.setDate(dd.getDate() + n); //获取n天后的日期
|
||||
var y = dd.getFullYear();
|
||||
var m = dd.getMonth() + 1; //获取当前月份的日期
|
||||
var d = dd.getDate();
|
||||
let day = y + '-' + m + '-' + d;
|
||||
this.addDay = day
|
||||
return day;
|
||||
},
|
||||
//天气
|
||||
handleWather(){
|
||||
// axios({url:"http://www.jcznedu.com:5000/weather/prediction/?city=盐都&&limit=3",methods:'GET'}).then(res=>{
|
||||
// })
|
||||
Weather({
|
||||
|
||||
action:'one',
|
||||
key:'天气情况'
|
||||
}).then((res)=>{
|
||||
this.weatherArr = res.data.data.daly;
|
||||
this.weatherArr[0].date = '今天';
|
||||
for (let i = 0; i < this.weatherArr.length; i++) {
|
||||
this.Onweather(this.weatherArr[i].weather,i)
|
||||
let toDay = this.$moment().format("D")
|
||||
this.getDateSub(1);
|
||||
this.getDateAdd(1),
|
||||
res.data.data.forEach((item,index) => {
|
||||
if (item.第N天 == this.$moment(this.subDay).format("D")) {
|
||||
this.weatherArr[1].date = '昨天'
|
||||
this.weatherArr[1].temperature = item.最低温度 +'℃' + '~' + item.最高温度 +'℃'
|
||||
this.Onweather(item.天气,1)
|
||||
}else if (item.第N天 == this.$moment(this.addDay).format("D")) {
|
||||
this.weatherArr[2].date = '明天'
|
||||
this.weatherArr[2].temperature = item.最低温度 +'℃' + '~' + item.最高温度 +'℃'
|
||||
this.Onweather(item.天气,2)
|
||||
}else if (item.第N天 == toDay) {
|
||||
this.weatherArr[0].date = '今天'
|
||||
this.weatherArr[0].temperature = item.最低温度 +'℃' + '~' + item.最高温度 +'℃'
|
||||
this.Onweather(item.天气,0)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
//天气
|
||||
|
|
|
@ -62,8 +62,14 @@ export const getPbtyqk = (params) => {
|
|||
// })
|
||||
// };
|
||||
//查询天气
|
||||
// export const Weather = (params) => {
|
||||
// return axios.get('api/Handler/Weather.ashx', {
|
||||
// params
|
||||
// })
|
||||
// };
|
||||
//查询天气1
|
||||
export const Weather = (params) => {
|
||||
return axios.get('api/Handler/Weather.ashx', {
|
||||
return axios.get('api/Handler/Data.ashx', {
|
||||
params
|
||||
})
|
||||
};
|
Binary file not shown.
|
@ -16,26 +16,26 @@
|
|||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
background-image: linear-gradient(to bottom, rgb(189,255,231), rgb(86,244,254));"
|
||||
>304</span>
|
||||
>{{CompanyInfo.pdxl}}</span>
|
||||
<span style="font-size: 18px;">配电路线</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="lists">
|
||||
<div class="title">电缆化率</div>
|
||||
<div class="number">43.6%</div>
|
||||
<div class="number">{{CompanyInfo.dlhl}}</div>
|
||||
</div>
|
||||
<div class="lists">
|
||||
<div class="title">配电站开关</div>
|
||||
<div class="number">169</div>
|
||||
<div class="number">{{CompanyInfo.pdkgz}}</div>
|
||||
</div>
|
||||
<div class="lists">
|
||||
<div class="title">配电室</div>
|
||||
<div class="number">579</div>
|
||||
<div class="number">{{CompanyInfo.pds}}</div>
|
||||
</div>
|
||||
<div class="lists">
|
||||
<div class="title">户外环网柜</div>
|
||||
<div class="number">1440</div>
|
||||
<div class="number">{{CompanyInfo.hwhwg}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -50,26 +50,26 @@
|
|||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
background-image: linear-gradient(to bottom, rgb(189,255,231), rgb(86,244,254));
|
||||
">4128</span>
|
||||
">{{CompanyInfo.xlcd}}</span>
|
||||
<span style="font-size: 18px">路线长度</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="lists">
|
||||
<div class="title">架空路线</div>
|
||||
<div class="number">2328</div>
|
||||
<div class="number">{{CompanyInfo.jkxl}}</div>
|
||||
</div>
|
||||
<div class="lists">
|
||||
<div class="title">架空绝缘导线</div>
|
||||
<div class="number">2012.6</div>
|
||||
<div class="number">{{CompanyInfo.jkjydx}}</div>
|
||||
</div>
|
||||
<div class="lists">
|
||||
<div class="title">架空绝缘化率</div>
|
||||
<div class="number">86.45%</div>
|
||||
<div class="number">{{CompanyInfo.jkjyhl}}</div>
|
||||
</div>
|
||||
<div class="lists">
|
||||
<div class="title">电缆路线</div>
|
||||
<div class="number">1800</div>
|
||||
<div class="number">{{CompanyInfo.dlxl}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -15,8 +15,8 @@ module.exports = {
|
|||
// port: 8989, // 开发服务器运行端口号
|
||||
proxy: {
|
||||
'/api': { //代理的名字
|
||||
target:'http://111.229.30.246:3111/',
|
||||
// target: 'http://172.16.1.254:3111/',
|
||||
// target:'http://111.229.30.246:3111/',
|
||||
target: 'http://172.16.1.254:3111/',
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
pathRewrite:{
|
||||
|
|
Loading…
Reference in New Issue