Commit 17788ed7 by fengfan

ui

parent f54df34a
<template>
<div id="app">
<Header/>
<Nav/>
<router-view/>
<Header />
<Nav />
<transition name="fade">
<router-view />
</transition>
</div>
</template>
<script>
import Header from "./components/head"
import Nav from "./components/nav"
import Header from "./components/head";
import Nav from "./components/nav";
export default {
name: 'App',
components:{Header,Nav}
}
name: "App",
components: { Header, Nav }
};
</script>
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
......@@ -30,3 +32,13 @@ export default {
overflow: hidden;
}
</style>
<style scoped>
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.5s;
}
.fade-enter,
.fade-leave-active {
opacity: 0;
}
</style>
<template>
<div class="page">
<content-box :btnbackshow="btnbackshow" @btnbackclick="backfn">
<div class="content">
<div class="subtitle">{{subtitle.name||'全国'}} :</div>
<div id="scrollbox">
<vuescroll :ops="ops">
<div
class="btn"
:class="{activearea:activearea.code == item.code}"
v-for="(item,index) in btnlist"
:key="index"
@click="showC(item)"
>{{item.name}}</div>
</vuescroll>
</div>
<page-title v-if="activearea.code === subtitle.code || activearea.name=='全国'"
class="titlePosition"
:titledata="titledata"
:titleactive="titleactive"
@titleclick="titleclickfn"
/>
</div>
</content-box>
<div class='null'></div>
<updown @up=up @down=down class='btns' />
<div class=btn>去h5</div>
</div>
</template>
<script>
import { send } from "@/service/ctrapi";
import contentBox from "../components/contentBox";
import updown from "../components/updown";
import pageTitle from "../components/pageTitle";
import vuescroll from "vuescroll";
export default {
components: { contentBox, pageTitle, vuescroll },
components: { updown, pageTitle },
data() {
return {
btnlist: [],
titledata: ["24小时", "近一周", "近一月", "近一年"],
msgPathCfg:{
root:'/预警监控',
list1:'/省级',
subtitle:'/时间范围',
},
titleactive: 0,
activearea: {},
subtitle: {},
btnbackshow: false,
ops: {
bar: {
background: "#41c9ff",
keepShow: true
},
rail: {
background: "#3e4a59",
opacity: 0.5
}
}
};
},
mounted() {
this.showP();
},
methods: {
backfn() {
send(`${this.msgPathCfg.root}`, []);
this.showP();
titleclickfn(i) {
this.titleactive = i
if(i==0){
send(`/预警系统/信息流程`,[])
}else{
send(`/预警系统/系统流程`,[])
}
},
showP() {
this.$axios
.get("http://123.56.149.208:8091/external/get/city/all")
.then(val => {
this.btnlist = val.data.data;
this.btnbackshow = false;
this.titleactive = 0
this.activearea = this.btnlist[0];
this.subtitle = {};
});
up() {
// send(`/预警系统/信息流程/Up`,[])
},
showC(item) {
if (this.btnbackshow) {
this.activearea = item;
send(
`${this.msgPathCfg.root}${this.msgPathCfg.list1}/${this.subtitle.name}/H5/${this.activearea.name}`,
[]
);
} else if (item.name === "全国") {
this.activearea = item;
send(`${this.msgPathCfg.root}${this.msgPathCfg.subtitle}/${this.titleactive}`, []);
} else {
this.$axios
.get(`http://123.56.149.208:8091/external/get/city/id/${item.code}`)
.then(val => {
this.btnlist = val.data.data;
this.btnbackshow = true;
this.subtitle = item;
this.activearea = item;
send(
`${this.msgPathCfg.root}${this.msgPathCfg.list1}/${this.subtitle.name}${this.msgPathCfg.subtitle}/${this.titleactive}`,
[]
);
});
}
down() {
// send(`/预警系统/信息流程/Down`,[])
},
titleclickfn(i) {
this.titleactive = i;
if (this.btnbackshow && this.activearea == this.subtitle) {
send(
`${this.msgPathCfg.root}${this.msgPathCfg.list1}/${this.subtitle.name}${this.msgPathCfg.subtitle}/${this.titleactive}`,
[]
);
} else if (this.activearea.name === "全国") {
send(`${this.msgPathCfg.root}${this.msgPathCfg.subtitle}/${this.titleactive}`, []);
} else {
// send( `${this.msgPathCfg.root}${this.msgPathCfg.list1}/${this.subtitle.name}${this.msgPathCfg.subtitle}/${this.titleactive}`, []);
}
h5(){
}
}
};
</script>
<style scoped>
.null{
height: 2.5rem;
}
.page {
width: 18.4rem;
height: 13.5rem;
......@@ -127,57 +56,29 @@ export default {
background-size: cover;
margin-top: 1.5rem;
margin-left: 2.2rem;
position: relative;
}
.content {
padding-top: 1rem;
padding-left: 1rem;
text-align: left;
}
#scrollbox {
width: 15.5rem;
height: 9rem;
margin-left: 1rem;
margin-top: 0.5rem;
}
.btn {
float: left;
white-space: nowrap;
font-size: 0.3rem;
color: #fff;
text-align: center;
line-height: 0.81rem;
padding: 0 0.1rem;
margin: 0 0.45rem 0.74rem 0;
min-width: 2.59rem;
height: 0.81rem;
background: url(../assets/img/btn-bg.png) no-repeat;
background-size: 100% 100%;
position: relative;
}
.subtitle {
margin: 0.5rem 0 0.5rem 1rem;
color: #fff;
font-size: 0.4rem;
text-shadow: 0.1rem 0rem 0.5rem rgba(255, 255, 255, 0.3),
-0.1rem 0rem 0.5rem rgba(255, 255, 255, 0.3),
0rem 0.1rem 0.5rem rgba(255, 255, 255, 0.3),
0rem -0.1rem 0.5rem rgba(255, 255, 255, 0.3);
}
.activearea {
font-size: 0.35rem;
}
.activearea::after {
content: "";
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: -100%;
background: url(../assets/img/btn-light.png) no-repeat;
background-size: 100% 94%;
}
>>> div.title{
background:none;
transform: translateY(-0.2rem);
.btn{
white-space: nowrap;
font-size: 0.3rem;
color: #fff;
text-align: center;
line-height: 0.81rem;
padding: 0 0.1rem;
margin: 0 0.45rem 0.74rem 0;
min-width: 2.59rem;
height: 0.81rem;
background: url(../assets/img/btn-bg.png) no-repeat;
background-size: 100% 100%;
position: absolute;
left: 13rem;
top: 5.8rem;
}
</style>
<template>
<div class="page">
<content-box :btnbackshow="btnbackshow" @btnbackclick="backfn">
<div class="content">
<div class="subtitle">{{subtitle.name||'全国'}} :</div>
<div id="scrollbox">
<vuescroll :ops="ops">
<div
class="btn"
:class="{activearea:activearea.code == item.code}"
v-for="(item,index) in btnlist"
:key="index"
@click="showC(item)"
>{{item.name}}</div>
</vuescroll>
</div>
<page-title v-if="activearea.code === subtitle.code || activearea.name=='全国'"
class="titlePosition"
:titledata="titledata"
:titleactive="titleactive"
@titleclick="titleclickfn"
/>
</div>
</content-box>
</div>
</template>
......
<template>
<div class="page">
<content-box :btnbackshow="btnbackshow" @btnbackclick="backfn">
<div class="content">
<div class="subtitle">{{subtitle.name||'全国'}} :</div>
<div id="scrollbox">
<vuescroll :ops="ops">
<div
class="btn"
:class="{activearea:activearea.code == item.code}"
v-for="(item,index) in btnlist"
:key="index"
@click="showC(item)"
>{{item.name}}</div>
</vuescroll>
</div>
<page-title v-if="activearea.code === subtitle.code || activearea.name=='全国'"
class="titlePosition"
:titledata="titledata"
:titleactive="titleactive"
@titleclick="titleclickfn"
/>
</div>
</content-box>
</div>
</template>
......
<template>
<div class="page">
<content-box :btnbackshow="btnbackshow" @btnbackclick="backfn">
<div class="content">
<div class="subtitle">{{subtitle.name||'全国'}} :</div>
<div id="scrollbox">
<vuescroll :ops="ops">
<div
class="btn"
:class="{activearea:activearea.code == item.code}"
v-for="(item,index) in btnlist"
:key="index"
@click="showC(item)"
>{{item.name}}</div>
</vuescroll>
</div>
<page-title v-if="activearea.code === subtitle.code || activearea.name=='全国'"
class="titlePosition"
:titledata="titledata"
:titleactive="titleactive"
@titleclick="titleclickfn"
/>
</div>
</content-box>
</div>
</template>
......
<template>
<div class="page">
<content-box :btnbackshow="btnbackshow" @btnbackclick="backfn">
<div class="content">
<div class="subtitle">{{subtitle.name||'全国'}} :</div>
<div id="scrollbox">
<vuescroll :ops="ops">
<div
class="btn"
:class="{activearea:activearea.code == item.code}"
v-for="(item,index) in btnlist"
:key="index"
@click="showC(item)"
>{{item.name}}</div>
</vuescroll>
</div>
<page-title v-if="activearea.code === subtitle.code || activearea.name=='全国'"
class="titlePosition"
:titledata="titledata"
:titleactive="titleactive"
@titleclick="titleclickfn"
/>
</div>
</content-box>
</div>
</template>
......
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 sign in to comment