Commit 90b95a88 by fengfan

system

parent 78a4c777
html{
background: url('img/bg-home.jpg');
background: url('img/bg.jpg');
background-repeat: no-repeat;
background-size: cover;
}
\ No newline at end of file
<template>
<div class="box">
<div class="up btn" @click="$emit('up')">上一步</div>
<div class="down btn" @click="$emit('down')">下一步</div>
</div>
</template>
<script>
export default {
data() {
return {
msg: ""
};
}
};
</script>
<style scoped>
.box {
width: 6rem;
height: 1.5rem;
font-size: 0.4rem;
line-height: 1.5rem;
color: #fff;
}
.btn {
float: left;
width: 2.5rem;
height: 1.5rem;
bottom: 1rem;
right: 1rem;
z-index: 10;
text-align: right;
}
.up {
background: url(../assets/img/up.png) no-repeat left top;
background-size: auto 100%;
}
.down {
background: url(../assets/img/down.png) no-repeat left top;
background-size: auto 100%;
}
</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"
<page-title
:titledata="titledata"
:titleactive="titleactive"
@titleclick="titleclickfn"
/>
</div>
</content-box>
<updown v-if="titleactive==0" @up=up @down=down class='btns' />
<updown v-if="titleactive==1" @up=up2 @down=down2 class='btns' />
</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小时", "近一周", "近一月", "近一年"],
titledata: ["预警信息发布全流程", "预警系统介绍"],
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`,[])
},
up2() {
send(`/预警系统/系统流程/Forward`,[])
},
down2() {
send(`/预警系统/系统流程/Backward`,[])
},
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}`, []);
}
}
}
};
</script>
......@@ -133,51 +69,9 @@ export default {
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);
.btns {
margin: 3rem 0 0 3rem;
}
</style>
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