|
@@ -8,308 +8,339 @@
|
|
|
<div class="position-text-max-box">
|
|
|
<div>
|
|
|
<p>预警处置总数:</p>
|
|
|
- <p>15</p>
|
|
|
+ <p>{{deptData.handleTotal}}</p>
|
|
|
</div>
|
|
|
<div>
|
|
|
<p>昨日处置总数:</p>
|
|
|
- <p>6</p>
|
|
|
+ <p>{{deptData.yesterdayHandleTotal}}</p>
|
|
|
</div>
|
|
|
<div>
|
|
|
<p>今日处置总数:</p>
|
|
|
- <p>1</p>
|
|
|
+ <p>{{deptData.todayHandleTotal}}</p>
|
|
|
</div>
|
|
|
<div>
|
|
|
<p>环比增长:</p>
|
|
|
- <p>3%</p>
|
|
|
+ <p>{{deptData.rate}}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="date-max-box">
|
|
|
- <div :class="dateData==0?'checkColor':''">
|
|
|
- <p>1</p>
|
|
|
- <p>Mon</p>
|
|
|
- </div>
|
|
|
- <div :class="dateData==1?'checkColor':''">
|
|
|
- <p>2</p>
|
|
|
- <p>Tue</p>
|
|
|
- </div>
|
|
|
- <div :class="dateData==2?'checkColor':''">
|
|
|
- <p>3</p>
|
|
|
- <p>Wed</p>
|
|
|
- </div>
|
|
|
- <div :class="dateData==3?'checkColor':''">
|
|
|
- <p>4</p>
|
|
|
- <p>Thur</p>
|
|
|
- </div>
|
|
|
- <div :class="dateData==4?'checkColor':''">
|
|
|
- <p>5</p>
|
|
|
- <p>Fri</p>
|
|
|
- </div>
|
|
|
- <div :class="dateData==5?'checkColor':''">
|
|
|
- <p>6</p>
|
|
|
- <p>Sat</p>
|
|
|
- </div>
|
|
|
- <div :class="dateData==6?'checkColor':''">
|
|
|
- <p>7</p>
|
|
|
- <p>Sun</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="for-position-dept-box" :style="'top:'+item.top+'px;left:'+item.left+'px;'"
|
|
|
- v-for="(item,index) in deptList" :key="index">
|
|
|
- <div class="for-position-name-box-one" v-if="item.type">
|
|
|
+ <div :class="dayIndex==index?'checkColor':''" v-for="(item,index) in timeList" :key="index" @click="dayButton(index)">
|
|
|
+ <p>{{item.label}}</p>
|
|
|
<p>{{item.name}}</p>
|
|
|
- <p>今日预警处置:{{item.value}}</p>
|
|
|
- <img src="@/assets/ZDimages/img_bg_xtred@1x.png">
|
|
|
</div>
|
|
|
- <div class="for-position-name-box" v-if="!item.type">
|
|
|
- <p>{{item.name}}</p>
|
|
|
- <img src="@/assets/ZDimages/img_bg_xtblu@1x.png">
|
|
|
+ </div>
|
|
|
+ <div class="for-position-dept-max-box">
|
|
|
+ <div class="for-position-dept-box"
|
|
|
+ v-for="(item,index) in deptData.warningHandleSubs" :key="index">
|
|
|
+ <div class="for-position-name-box-one" v-if="item.handleTotal>0">
|
|
|
+ <p>{{item.deptSortName}}</p>
|
|
|
+ <p>今日预警处置:{{item.handleTotal}}</p>
|
|
|
+ <img src="@/assets/ZDimages/img_bg_xtred@1x.png">
|
|
|
+ </div>
|
|
|
+ <div class="for-position-name-box" v-if="item.handleTotal == 0">
|
|
|
+ <p>{{item.deptSortName}}</p>
|
|
|
+ <img src="@/assets/ZDimages/img_bg_xtblu@1x.png">
|
|
|
+ </div>
|
|
|
+ <p class="for-position-address-img-one" v-if="item.handleTotal>0">{{item.handleTotal}}</p>
|
|
|
+ <p class="for-position-address-img" v-if="item.handleTotal == 0">{{item.handleTotal}}</p>
|
|
|
</div>
|
|
|
- <p class="for-position-address-img-one" v-if="item.type">{{item.value}}</p>
|
|
|
- <p class="for-position-address-img" v-if="!item.type">{{item.value}}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import {
|
|
|
+ reportReportBigDataWarningHandle,
|
|
|
+} from "@/api/index";
|
|
|
import titlePageImgComponents from '@/components/titlePageImgComponents.vue'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'warningComponents',
|
|
|
components: {
|
|
|
titlePageImgComponents
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
- propsData:{
|
|
|
- title:'安全风险预警处置',
|
|
|
+ propsData: {
|
|
|
+ title: '安全风险预警处置'
|
|
|
},
|
|
|
- dateData:new Date().getDay(),
|
|
|
- deptList:[
|
|
|
- {
|
|
|
- name:"农学院",
|
|
|
- value:"1",
|
|
|
- top:171,
|
|
|
- left:257,
|
|
|
- type:true,
|
|
|
- },
|
|
|
- {
|
|
|
- name:"理学院",
|
|
|
- value:"1",
|
|
|
- top:165,
|
|
|
- left:544,
|
|
|
- type:false,
|
|
|
- },
|
|
|
- {
|
|
|
- name:"化学与药物",
|
|
|
- value:"4",
|
|
|
- top:90,
|
|
|
- left:739,
|
|
|
- type:false,
|
|
|
- },
|
|
|
- {
|
|
|
- name:"生命科学",
|
|
|
- value:"2",
|
|
|
- top:231,
|
|
|
- left:742,
|
|
|
- type:false,
|
|
|
- },
|
|
|
- {
|
|
|
- name:"园林艺术",
|
|
|
- value:"1",
|
|
|
- top:282,
|
|
|
- left:294,
|
|
|
- type:false,
|
|
|
- },
|
|
|
- {
|
|
|
- name:"植物保护",
|
|
|
- value:"3",
|
|
|
- top:271,
|
|
|
- left:533,
|
|
|
- type:false,
|
|
|
- },
|
|
|
- {
|
|
|
- name:"资源环境",
|
|
|
- value:"1",
|
|
|
- top:333,
|
|
|
- left:717,
|
|
|
- type:false,
|
|
|
- },
|
|
|
- {
|
|
|
- name:"国重楼",
|
|
|
- value:"2",
|
|
|
- top:373,
|
|
|
- left:454,
|
|
|
- type:false,
|
|
|
- },
|
|
|
- // {
|
|
|
- // name:"林学院",
|
|
|
- // value:"0",
|
|
|
- // top:375,
|
|
|
- // left:230,
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name:"林学院",
|
|
|
- // value:"0",
|
|
|
- // top:100,
|
|
|
- // left:384,
|
|
|
- // },
|
|
|
- ],
|
|
|
+ dateData: new Date().getDay(),
|
|
|
+ dayIndex:null,
|
|
|
+ timeList:[],
|
|
|
+ //获取数据
|
|
|
+ deptList: [],
|
|
|
+ //展示数据
|
|
|
+ deptData:{},
|
|
|
+ deptListIndex:0,
|
|
|
+ eChartsTimer:null,
|
|
|
+ eChartsTimerNum:0,
|
|
|
}
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
|
|
|
},
|
|
|
- mounted () {
|
|
|
-
|
|
|
+ mounted() {
|
|
|
+ this.initialize()
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
+ timedRefresh(){
|
|
|
+ let self = this;
|
|
|
+ self.getData();
|
|
|
+ //定时动画
|
|
|
+ clearInterval(self.eChartsTimer);
|
|
|
+ self.eChartsTimer = setInterval(function(){
|
|
|
+ self.deptListIndex++
|
|
|
+ if(self.deptList[self.deptListIndex]){
|
|
|
+ self.$set(self,'deptData',self.deptList[self.deptListIndex]);
|
|
|
+ }else{
|
|
|
+ self.getData();
|
|
|
+ }
|
|
|
+ },1000*30);
|
|
|
+ },
|
|
|
+ //日期初始化
|
|
|
+ initialize() {
|
|
|
+ let thisWeekDates = this.getThisWeekDates();
|
|
|
+ let timeList = [];
|
|
|
+ let day = new Date().getDay();
|
|
|
+ day = day==0 ? 7 : day;
|
|
|
+ this.$set(this,'dayIndex',day-1);
|
|
|
+ for(let i=0;i<thisWeekDates.length;i++){
|
|
|
+ timeList.push({
|
|
|
+ label:i+1,
|
|
|
+ name:i==0?'Mon':(i==1?'Tue':(i==2?'Wed':(i==3?'Thur':(i==4?'Fri':(i==5?'Sat':(i==6?'Sun':'')))))),
|
|
|
+ value:thisWeekDates[i],
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.$set(this,'timeList',timeList);
|
|
|
+ this.timedRefresh();
|
|
|
+ },
|
|
|
+ getThisWeekDates() {
|
|
|
+ const today = new Date();
|
|
|
+ const dayOfWeek = today.getDay();
|
|
|
+ const firstDayOfWeek = new Date(today);
|
|
|
+ if (dayOfWeek === 0) {
|
|
|
+ firstDayOfWeek.setDate(firstDayOfWeek.getDate() - 6);
|
|
|
+ } else {
|
|
|
+ firstDayOfWeek.setDate(firstDayOfWeek.getDate() - dayOfWeek + 1);
|
|
|
+ }
|
|
|
+ const dates = [];
|
|
|
+ for (let i = 0; i < 7; i++) {
|
|
|
+ dates.push(new Date(firstDayOfWeek.getTime() + i * 24 * 60 * 60 * 1000).toLocaleDateString().split("/") .join("-") );
|
|
|
+ }
|
|
|
+ return dates;
|
|
|
+ },
|
|
|
+ //日期点击
|
|
|
+ dayButton(index){
|
|
|
+ if(index != this.dayIndex){
|
|
|
+ this.$set(this,'dayIndex',index);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //获取数据
|
|
|
+ getData(){
|
|
|
+ reportReportBigDataWarningHandle({date:this.timeList[this.dayIndex].value}).then( response => {
|
|
|
+ this.$set(this,'deptList',response.data);
|
|
|
+ this.$set(this,'deptListIndex',0);
|
|
|
+ this.$set(this,'deptData',this.deptList[this.deptListIndex]);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ beforeDestroy() {
|
|
|
+ //清除定时器
|
|
|
+ clearInterval(this.eChartsTimer);
|
|
|
},
|
|
|
+ destroyed() {
|
|
|
+ //清除定时器
|
|
|
+ clearInterval(this.eChartsTimer);
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|
|
|
- .warningComponents{
|
|
|
- width:934px;
|
|
|
- margin:16px 30px;
|
|
|
- height:530px;
|
|
|
- .map-max-big-box{
|
|
|
- .map-one-max-big-box{
|
|
|
- height:468px;
|
|
|
- width:933px;
|
|
|
+ .warningComponents {
|
|
|
+ width: 934px;
|
|
|
+ margin: 16px 30px;
|
|
|
+ height: 530px;
|
|
|
+ .map-max-big-box {
|
|
|
+ .map-one-max-big-box {
|
|
|
+ height: 468px;
|
|
|
+ width: 933px;
|
|
|
background: no-repeat;
|
|
|
background-image: url("../../../assets/ZDimages/mapBackImg.png");
|
|
|
background-size: 100%;
|
|
|
position: relative;
|
|
|
}
|
|
|
- .position-text-max-box{
|
|
|
+ .position-text-max-box {
|
|
|
position: absolute;
|
|
|
- top:64px;
|
|
|
- left:20px;
|
|
|
+ top: 64px;
|
|
|
+ left: 20px;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
- div:nth-child(1),div:nth-child(2),div:nth-child(3){
|
|
|
- margin-bottom:40px;
|
|
|
+ div:nth-child(1), div:nth-child(2), div:nth-child(3) {
|
|
|
+ margin-bottom: 40px;
|
|
|
}
|
|
|
- div{
|
|
|
- width:202px;
|
|
|
- height:50px;
|
|
|
+ div {
|
|
|
+ width: 202px;
|
|
|
+ height: 50px;
|
|
|
background: no-repeat;
|
|
|
background-image: url("../../../assets/ZDimages/img_yjczbg@1x.png");
|
|
|
background-size: 100%;
|
|
|
display: flex;
|
|
|
- p:nth-child(1){
|
|
|
- color:#fff;
|
|
|
- line-height:52px;
|
|
|
- font-size:18px;
|
|
|
- font-weight:700;
|
|
|
- margin-left:20px;
|
|
|
- flex:1;
|
|
|
+ p:nth-child(1) {
|
|
|
+ color: #fff;
|
|
|
+ line-height: 52px;
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 700;
|
|
|
+ margin-left: 20px;
|
|
|
+ flex: 1;
|
|
|
}
|
|
|
- p:nth-child(2){
|
|
|
- color:#FF8400;
|
|
|
- line-height:52px;
|
|
|
- font-size:18px;
|
|
|
- font-weight:700;
|
|
|
- margin-right:15px;
|
|
|
+ p:nth-child(2) {
|
|
|
+ color: #FF8400;
|
|
|
+ line-height: 52px;
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 700;
|
|
|
+ margin-right: 15px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .date-max-box{
|
|
|
+ .date-max-box {
|
|
|
position: absolute;
|
|
|
- top:15px;
|
|
|
- right:30px;
|
|
|
+ top: 15px;
|
|
|
+ right: 30px;
|
|
|
display: flex;
|
|
|
- .checkColor{
|
|
|
- p{
|
|
|
+ .checkColor {
|
|
|
+ p {
|
|
|
|
|
|
- color:#00FFFF!important;
|
|
|
+ color: #00FFFF !important;
|
|
|
}
|
|
|
}
|
|
|
- div{
|
|
|
- /*cursor: pointer;*/
|
|
|
- width:60px;
|
|
|
- height:60px;
|
|
|
- margin-right:10px;
|
|
|
- padding:5px 0;
|
|
|
- p{
|
|
|
- font-size:18px;
|
|
|
- color:#fff;
|
|
|
- line-height:25px;
|
|
|
+ div {
|
|
|
+ cursor: pointer;
|
|
|
+ width: 60px;
|
|
|
+ height: 60px;
|
|
|
+ margin-right: 10px;
|
|
|
+ padding: 5px 0;
|
|
|
+ p {
|
|
|
+ font-size: 18px;
|
|
|
+ color: #fff;
|
|
|
+ line-height: 25px;
|
|
|
text-align: center;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .for-position-dept-box{
|
|
|
- display: inline-block;
|
|
|
- position:absolute;
|
|
|
- .for-position-name-box-one{
|
|
|
- border-radius:8px;
|
|
|
+ .for-position-dept-max-box{
|
|
|
+ position: relative;
|
|
|
+ .for-position-dept-box {
|
|
|
display: inline-block;
|
|
|
- min-width:180px;
|
|
|
- height:54px;
|
|
|
- border:1px solid #D80707;
|
|
|
- box-shadow: inset 0px 0px 10px 0px #D80707;
|
|
|
- p{
|
|
|
- text-align: center;
|
|
|
- color:#fff;
|
|
|
- font-size:16px;
|
|
|
- line-height:16px;
|
|
|
- height:16px;
|
|
|
- margin:6px 0 0;
|
|
|
+ position: absolute;
|
|
|
+ .for-position-name-box-one {
|
|
|
+ border-radius: 8px;
|
|
|
+ display: inline-block;
|
|
|
+ min-width: 180px;
|
|
|
+ height: 54px;
|
|
|
+ border: 1px solid #D80707;
|
|
|
+ box-shadow: inset 0px 0px 10px 0px #D80707;
|
|
|
+ p {
|
|
|
+ text-align: center;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 16px;
|
|
|
+ height: 16px;
|
|
|
+ margin: 6px 0 0;
|
|
|
+ }
|
|
|
+ img {
|
|
|
+ display: block;
|
|
|
+ width: 159px;
|
|
|
+ height: 4px;
|
|
|
+ margin: 0 auto;
|
|
|
+ }
|
|
|
}
|
|
|
- img{
|
|
|
- display: block;
|
|
|
- width:159px;
|
|
|
- height:4px;
|
|
|
- margin:0 auto;
|
|
|
+ .for-position-name-box {
|
|
|
+ border-radius: 8px;
|
|
|
+ display: inline-block;
|
|
|
+ min-width: 180px;
|
|
|
+ height: 30px;
|
|
|
+ border: 1px solid #00E6FF;
|
|
|
+ box-shadow: inset 0px 0px 10px 0px #047581;
|
|
|
+ p {
|
|
|
+ text-align: center;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 16px;
|
|
|
+ height: 16px;
|
|
|
+ margin: 6px 0 0;
|
|
|
+ }
|
|
|
+ img {
|
|
|
+ display: block;
|
|
|
+ width: 159px;
|
|
|
+ height: 4px;
|
|
|
+ margin: 0 auto;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- .for-position-name-box{
|
|
|
- border-radius:8px;
|
|
|
- display: inline-block;
|
|
|
- min-width:180px;
|
|
|
- height:30px;
|
|
|
- border:1px solid #00E6FF;
|
|
|
- box-shadow: inset 0px 0px 10px 0px #047581;
|
|
|
- p{
|
|
|
+ .for-position-address-img-one {
|
|
|
+ height: 50px;
|
|
|
+ width: 50px;
|
|
|
+ margin: 4px auto 0;
|
|
|
+ background: no-repeat;
|
|
|
+ background-image: url("../../../assets/ZDimages/address_1.png");
|
|
|
+ background-size: 100%;
|
|
|
+ color: #D80707;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 31px;
|
|
|
text-align: center;
|
|
|
- color:#fff;
|
|
|
- font-size:16px;
|
|
|
- line-height:16px;
|
|
|
- height:16px;
|
|
|
- margin:6px 0 0;
|
|
|
}
|
|
|
- img{
|
|
|
- display: block;
|
|
|
- width:159px;
|
|
|
- height:4px;
|
|
|
- margin:0 auto;
|
|
|
+ .for-position-address-img {
|
|
|
+ height: 50px;
|
|
|
+ width: 50px;
|
|
|
+ margin: 4px auto 0;
|
|
|
+ background: no-repeat;
|
|
|
+ background-image: url("../../../assets/ZDimages/address_2.png");
|
|
|
+ /*background-image: url("../../../assets/ZDimages/address_1.png");*/
|
|
|
+ background-size: 100%;
|
|
|
+ color: #00E6FF;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 31px;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
}
|
|
|
- .for-position-address-img-one{
|
|
|
- height:50px;
|
|
|
- width:50px;
|
|
|
- margin:4px auto 0;
|
|
|
- background: no-repeat;
|
|
|
- background-image: url("../../../assets/ZDimages/address_1.png");
|
|
|
- background-size: 100%;
|
|
|
- color:#D80707;
|
|
|
- font-size:16px;
|
|
|
- line-height: 31px;
|
|
|
- text-align: center;
|
|
|
+ .for-position-dept-box:nth-child(1){
|
|
|
+ top: 171px;
|
|
|
+ left: 257px;
|
|
|
}
|
|
|
- .for-position-address-img{
|
|
|
- height:50px;
|
|
|
- width:50px;
|
|
|
- margin:4px auto 0;
|
|
|
- background: no-repeat;
|
|
|
- background-image: url("../../../assets/ZDimages/address_2.png");
|
|
|
- /*background-image: url("../../../assets/ZDimages/address_1.png");*/
|
|
|
- background-size: 100%;
|
|
|
- color:#00E6FF;
|
|
|
- font-size:16px;
|
|
|
- line-height: 31px;
|
|
|
- text-align: center;
|
|
|
+ .for-position-dept-box:nth-child(2){
|
|
|
+ top: 165px;
|
|
|
+ left: 544px;
|
|
|
+ }
|
|
|
+ .for-position-dept-box:nth-child(3){
|
|
|
+ top: 90px;
|
|
|
+ left: 739px;
|
|
|
+ }
|
|
|
+ .for-position-dept-box:nth-child(4){
|
|
|
+ top: 231px;
|
|
|
+ left: 742px;
|
|
|
+ }
|
|
|
+ .for-position-dept-box:nth-child(5){
|
|
|
+ top: 282px;
|
|
|
+ left: 294px;
|
|
|
+ }
|
|
|
+ .for-position-dept-box:nth-child(6){
|
|
|
+ top: 271px;
|
|
|
+ left: 533px;
|
|
|
+ }
|
|
|
+ .for-position-dept-box:nth-child(7){
|
|
|
+ top: 333px;
|
|
|
+ left: 717px;
|
|
|
+ }
|
|
|
+ .for-position-dept-box:nth-child(8){
|
|
|
+ top: 373px;
|
|
|
+ left: 454px;
|
|
|
+ }
|
|
|
+ .for-position-dept-box:nth-child(9){
|
|
|
+ top: 375px;
|
|
|
+ left: 230px;
|
|
|
+ }
|
|
|
+ .for-position-dept-box:nth-child(10){
|
|
|
+ top: 100px;
|
|
|
+ left: 384px;
|
|
|
}
|
|
|
}
|
|
|
}
|