代码提交

This commit is contained in:
lixiaobang 2023-01-16 09:35:05 +08:00
parent df68891c60
commit 289844c46f
5 changed files with 2463 additions and 2426 deletions

View File

@ -18,7 +18,7 @@
</div> </div>
<div class="date"> <div class="date">
<span>{{item.date}}</span> <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> </div>
</div> </div>
@ -38,12 +38,14 @@ export default {
mixins:[MinxinItem], mixins:[MinxinItem],
data(){ data(){
return{ return{
addDay:'',
subDay:'',
routerTitle:['首页','20kv','35kv','站房智辅'], routerTitle:['首页','20kv','35kv','站房智辅'],
routerActive:0, routerActive:0,
weatherArr:[ weatherArr:[
{day:'今天',temperature:'27℃-19℃',pic:require('./assets/images/sun.png')}, {day:'今天',temperature:'',pic:require('./assets/images/sun.png')},
{day:'12月01日',temperature:'27℃-19℃',pic:require('./assets/images/union.png')}, {day:'昨天',temperature:'',pic:require('./assets/images/union.png')},
{day:'12月02日',temperature:'27℃-19℃',pic:require('./assets/images/windy.png')} {day:'明天',temperature:'',pic:require('./assets/images/windy.png')}
], ],
weekList:['周日','周一','周二','周三','周四','周五','周六'], weekList:['周日','周一','周二','周三','周四','周五','周六'],
week:'', week:'',
@ -56,18 +58,47 @@ export default {
}, },
methods:{ 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(){ handleWather(){
// axios({url:"http://www.jcznedu.com:5000/weather/prediction/?city=&&limit=3",methods:'GET'}).then(res=>{ // axios({url:"http://www.jcznedu.com:5000/weather/prediction/?city=&&limit=3",methods:'GET'}).then(res=>{
// }) // })
Weather({ Weather({
action:'one',
key:'天气情况'
}).then((res)=>{ }).then((res)=>{
this.weatherArr = res.data.data.daly; let toDay = this.$moment().format("D")
this.weatherArr[0].date = '今天'; this.getDateSub(1);
for (let i = 0; i < this.weatherArr.length; i++) { this.getDateAdd(1),
this.Onweather(this.weatherArr[i].weather,i) 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)
} }
});
}) })
}, },
// //

View File

@ -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) => { export const Weather = (params) => {
return axios.get('api/Handler/Weather.ashx', { return axios.get('api/Handler/Data.ashx', {
params params
}) })
}; };

Binary file not shown.

View File

@ -16,26 +16,26 @@
-webkit-background-clip: text; -webkit-background-clip: text;
background-clip: text; background-clip: text;
background-image: linear-gradient(to bottom, rgb(189,255,231), rgb(86,244,254));" 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> <span style="font-size: 18px;">配电路线</span>
</div> </div>
</div> </div>
<div class="info"> <div class="info">
<div class="lists"> <div class="lists">
<div class="title">电缆化率</div> <div class="title">电缆化率</div>
<div class="number">43.6%</div> <div class="number">{{CompanyInfo.dlhl}}</div>
</div> </div>
<div class="lists"> <div class="lists">
<div class="title">配电站开关</div> <div class="title">配电站开关</div>
<div class="number">169</div> <div class="number">{{CompanyInfo.pdkgz}}</div>
</div> </div>
<div class="lists"> <div class="lists">
<div class="title">配电室</div> <div class="title">配电室</div>
<div class="number">579</div> <div class="number">{{CompanyInfo.pds}}</div>
</div> </div>
<div class="lists"> <div class="lists">
<div class="title">户外环网柜</div> <div class="title">户外环网柜</div>
<div class="number">1440</div> <div class="number">{{CompanyInfo.hwhwg}}</div>
</div> </div>
</div> </div>
</div> </div>
@ -50,26 +50,26 @@
-webkit-background-clip: text; -webkit-background-clip: text;
background-clip: text; background-clip: text;
background-image: linear-gradient(to bottom, rgb(189,255,231), rgb(86,244,254)); 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> <span style="font-size: 18px">路线长度</span>
</div> </div>
</div> </div>
<div class="info"> <div class="info">
<div class="lists"> <div class="lists">
<div class="title">架空路线</div> <div class="title">架空路线</div>
<div class="number">2328</div> <div class="number">{{CompanyInfo.jkxl}}</div>
</div> </div>
<div class="lists"> <div class="lists">
<div class="title">架空绝缘导线</div> <div class="title">架空绝缘导线</div>
<div class="number">2012.6</div> <div class="number">{{CompanyInfo.jkjydx}}</div>
</div> </div>
<div class="lists"> <div class="lists">
<div class="title">架空绝缘化率</div> <div class="title">架空绝缘化率</div>
<div class="number">86.45%</div> <div class="number">{{CompanyInfo.jkjyhl}}</div>
</div> </div>
<div class="lists"> <div class="lists">
<div class="title">电缆路线</div> <div class="title">电缆路线</div>
<div class="number">1800</div> <div class="number">{{CompanyInfo.dlxl}}</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -15,8 +15,8 @@ module.exports = {
// port: 8989, // 开发服务器运行端口号 // port: 8989, // 开发服务器运行端口号
proxy: { proxy: {
'/api': { //代理的名字 '/api': { //代理的名字
target:'http://111.229.30.246:3111/', // target:'http://111.229.30.246:3111/',
// target: 'http://172.16.1.254:3111/', target: 'http://172.16.1.254:3111/',
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
pathRewrite:{ pathRewrite:{