diff --git a/src/assets/css/index.css b/src/assets/css/index.css index a3491e2..a125714 100644 --- a/src/assets/css/index.css +++ b/src/assets/css/index.css @@ -258,7 +258,7 @@ width: 33.33%; text-align: center; float: left; - margin-top: 0.5vw; + /*margin-top: 0.5vw;*/ } .sx_cov_lt_tit{ font-size:0.8vw ; @@ -897,4 +897,12 @@ } ::-webkit-scrollbar { width: 0 !important; /* 隐藏滚动条 */ +} + +.amap-logo{ + display: none; + opacity:0 !important; +} +.amap-copyright { + opacity:0; } \ No newline at end of file diff --git a/src/assets/image/img.png b/src/assets/image/img.png new file mode 100644 index 0000000..ab16856 Binary files /dev/null and b/src/assets/image/img.png differ diff --git a/src/assets/image/soil.png b/src/assets/image/soil.png new file mode 100644 index 0000000..9cb7b2f Binary files /dev/null and b/src/assets/image/soil.png differ diff --git a/src/components/SingleEchartDialog.vue b/src/components/SingleEchartDialog.vue new file mode 100644 index 0000000..12bf05f --- /dev/null +++ b/src/components/SingleEchartDialog.vue @@ -0,0 +1,281 @@ + + + + + \ No newline at end of file diff --git a/src/pages/Home/index.vue b/src/pages/Home/index.vue index 14bb68c..9d24d6b 100644 --- a/src/pages/Home/index.vue +++ b/src/pages/Home/index.vue @@ -144,7 +144,7 @@
- +
@@ -177,6 +177,10 @@ 团柏河监测站
+
+ + 土壤监测点 +
@@ -250,10 +254,10 @@ -
+
-
+
{{ valist.name }} @@ -278,7 +282,8 @@
-
+ +
{{ effect_assess0.detailCode }} {{ effect_assess0.detailValue }} @@ -289,7 +294,8 @@ {{ effect_assess1.detailValue }}
-
+ +
{{ effect_assess2.detailValue }} {{ effect_assess2.detailCode }} @@ -310,16 +316,16 @@
- 监测站实时数据 + 土壤监测实时数据
-
+
-
+
-
+
- {{ item.stationName }} + {{ item.stationName?item.stationName:item.deployRemark?item.deployRemark:'土壤监测站' }} {{ item.name }} @@ -342,7 +348,7 @@
- +
农业废弃物台账
@@ -531,75 +537,9 @@
- - -
-
- - -
- {{ descriptionValue }} -
-
-
- 时间范围 - - - 展示方式 - - - 折线 - 表格 - -
- - - - - - - -
- - - - - - -
-
- + + @@ -622,10 +562,12 @@ import vueSeamlessScroll from 'vue-seamless-scroll' import hefentianqi from '@/pages/weather/weather.vue' import SoilDialog from '@/components/SoilDialog.vue' import {_colors} from '@/utils/color.js' +import SingleEchartDialog from "@/components/SingleEchartDialog.vue"; export default { name: 'mainHome', components: { + SingleEchartDialog, vueSeamlessScroll, hefentianqi, ScaleBox, @@ -633,9 +575,12 @@ export default { }, data() { return { + singleEchartDialogShowFlag: false, + singleEchartData: null, aMap: null, dataTypeEchart: true, markersOrient: [], + markersSoil: [], markersOther: [], lastClickIcon: '', urlimg: 'https://fxnsp.zgzhny.com/lh-api/sys/common/static/', @@ -668,13 +613,6 @@ export default { qcdtdialogTableVisible: false, qyinfordtdialogTableVisible: false, shipdialogTableVisible: false, - trqxzxdialogTableVisible: false, - trbg: null, - trzx: false, - trbgzhuanq: false, - descriptionValue: null, - timetr: [new Date(), new Date()], - radiotr: '1', qyinformation: '', listData: [], summryAllData: null, @@ -756,7 +694,7 @@ export default { // 实时时间 setTimeout(() => { this.$nextTick(() => { - this.PestLight(this.zoomData, this.isShowLightNumber); + this.initMap(this.zoomData, this.isShowLightNumber); }) }, 2000) //初始化数据 @@ -771,9 +709,9 @@ export default { }, methods: { initSoilData(){ - getSoilSummry({deployIds:['1679816733238575105'], "summrayMode":"dayhours"}).then(res=>{ - console.log(res) - }) + // getSoilSummry({deployIds:['1679816733238575105'], "summrayMode":"dayhours"}).then(res=>{ + // console.log(res) + // }) }, formatter: function (num) { return num.toFixed(3) @@ -789,10 +727,10 @@ export default { this.zoomData = 14 if (this.isShowLight == undefined) { let isShowLight = '1' - this.PestLight(this.zoomData, isShowLight); + this.initMap(this.zoomData, isShowLight); } else { let isShowLight = this.isShowLight - this.PestLight(this.zoomData, isShowLight); + this.initMap(this.zoomData, isShowLight); } setTimeout(() => { this.$nextTick(() => { @@ -802,9 +740,9 @@ export default { } else {// 地图模式 this.zoomData = 15 if (this.isShowLight == undefined) { - this.PestLight(this.zoomData, '1'); + this.initMap(this.zoomData, '1'); } else { - this.PestLight(this.zoomData, this.isShowLight); + this.initMap(this.zoomData, this.isShowLight); } } }, @@ -864,181 +802,49 @@ export default { if (value == true) { let isShowLight = '1' this.isShowLight = isShowLight - this.PestLight(this.zoomData, isShowLight) + this.initMap(this.zoomData, isShowLight) } else { let isShowLight = '' this.isShowLight = isShowLight - this.PestLight(this.zoomData, isShowLight) + this.initMap(this.zoomData, isShowLight) } }, scaleChange(e) { console.log("ee", e) }, - // 历史数据曲线弹唱 - deviceSummaryApi() { - let obj = { - stationCode: this.stationCode, - endTime: this.endTime, - startTime: this.startTime, - survItem: this.survItem, - // auths:this.auths, - } - survItemSummary(obj).then(res => { - let that = this - this.dataListVlaue = res.result.dataList - this.timeListVlaue = res.result.timeList - this.formListVlaue = res.result.formList - this.unitValue = res.result.itemInfo.unit - // this.limitStrValue = res.result.itemInfo.limitStr - this.descriptionValue = res.result.itemInfo.description - if (this.timeListVlaue) { - setTimeout(() => { - that.$nextTick(() => { - that.drawChartTc(); - }) - }, 700) + showEchartDialog(item, survItem) { + console.log('showEchartDialog', item, survItem) + if(survItem === 1){ + let dom = item.target.closest(".jczbtm_lf"); // 定位元素 + if(!dom){ + dom = item.target.closest(".jcsssj"); } - }) - }, - drawChartTc() { - // 基于准备好的dom,初始化echarts实例 这个和上面的main对应 - let myChart1 = this.$echarts.init(document.getElementById("maintczxtc")); - // 指定图表的配置项和数据 - let option = { - tooltip: { - trigger: 'axis', - axisPointer: { - type: 'cross', - label: { - backgroundColor: '#3c6ae1' - } + if (dom) { // 是否是滚动组件的某一行/列 + let item2 = dom.dataset.item + survItem = dom.dataset.survitem + if(item2){ + item2=JSON.parse(item2) + }else{ + item2 = null; } - }, - legend: { - data: [''] - }, - toolbox: {}, - areaStyle: { - color: { - type: 'linear', - x: 0, - y: 0, - x2: 0, - y2: 1, - colorStops: [ // 渐变颜色 - { - offset: 0, - color: 'rgba(85,111,253,0.70)', - }, - { - offset: 1, - color: 'rgba(85,111,253,0.20)', - }, - ], - global: false, - }, - }, - grid: { - left: '3%', - right: '4%', - bottom: '3%', - containLabel: true - }, - xAxis: [ - { - type: 'category', - boundaryGap: false, - data: this.timeListVlaue.reverse(), - axisLabel: { - //x轴文字的配置 - show: true, - textStyle: { - color: "#fff", - }, - }, + console.log('showEchartDialog222', dom,item2, survItem) + // :data-item="item" :data-survItem="valist.tylename" + if(item2 && survItem){ + this.showEchartDialog(item2, survItem) } - ], - yAxis: [ - { - type: 'value', - axisLabel: { - //x轴文字的配置 - show: true, - textStyle: { - color: "#fff", - }, - }, - } - ], - series: [ - { - name: this.descriptionValue, - animationDurationUpdate: 1000, // 更新动画时长为 1s - animationEasingUpdate: 'quinticInOut', // 更新动画缓动效果为 'quinticInOut' - type: 'line', - stack: 'Total', - smooth: true, - areaStyle: {}, - emphasis: { - focus: 'series' - }, - lineStyle: { - color: '#3c6ae1' // 设置线的颜色为红色 - }, - data: this.dataListVlaue.reverse(), - }, - ], - }; - // 使用刚指定的配置项和数据显示图表。 - myChart1.clear(); - myChart1.setOption(option); - }, - // 时间 - timetrpicker(data) { - this.startTime = data.displayValue[0], - this.endTime = data.displayValue[1], - this.deviceSummaryApi() - }, - // 所有弹窗 - tczxtc(val, survItem) { - this.descriptionValue = '' - this.stationCode = val - this.survItem = survItem - this.trqxzxdialogTableVisible = true - this.trbgzhuanq = true - setTimeout(() => { - this.deviceSummaryApi() - this.trbgzhuanq = false - this.trbg = true; - }, 1500) - }, - agreeChange(val) { - let that = this - this.trbg = false; - if (val == '1') { - this.trbg = true - this.trbgzhuanq = true - this.trzx = false - setTimeout(() => { - this.trbgzhuanq = false - that.$nextTick(() => { - that.deviceSummaryApi() - // this.drawChartTc(); - }) - }, 1200) - } else if (val == '2') { - this.trbgzhuanq = true - setTimeout(() => { - that.deviceSummaryApi() - this.trbgzhuanq = false - this.trzx = true - this.trbg = false - }, 1200) + } + return; } - - that.btnstatus = (val === '1') ? true : false; + this.singleEchartData = { + stationCode: item.stationCode, + deployId: item.deployId, + survItem: survItem + } + setTimeout(() => { + this.singleEchartDialogShowFlag = true; + }, 200) }, - PestLight(zoomnum, isShowLight) { + initMap(zoomnum, isShowLight) { let that = this; // let isShowLight = this.isShowLightNumber getAllstationAndPestLight(isShowLight).then(res => { @@ -1092,8 +898,8 @@ export default { this.soidShowFlag = true console.log('soil click', ) }) - } - else { + this.markersSoil.push(marker) + } else { this.markersOther.push(marker) } marker.setMap(that.aMap); @@ -1109,7 +915,7 @@ export default { }); }) }, - tzalin() { + tzalin() {//农业台账 this.dialogTableVisible = true this.fwlistcover() this.$nextTick(() => { @@ -1179,7 +985,7 @@ export default { myChart.setOption(option); }); }, - tzqcalin() { + tzqcalin() {//台账禽畜弹窗 this.qcdialogTableVisible = true this.qclistcover() this.$nextTick(() => { @@ -1263,7 +1069,7 @@ export default { }, getNewestDataList() { getNewestData().then(res => { - this.listData = res.result.HisSurvData + this.listData = res.result.soilHisSurvData }) }, getPollutionDictList() { @@ -1481,13 +1287,11 @@ export default { this.inforname = onformation.realname } }, - guanbi() { - this.dialogTableVisible = false - }, - qcguanbi() { + qcguanbi() {//全部关闭 this.qcdialogTableVisible = false this.qyinfordtdialogTableVisible = false - this.trqxzxdialogTableVisible = false + this.dialogTableVisible = false + this.singleEchartDialogShowFlag = false }, screen() { let element = document.documentElement; @@ -1526,6 +1330,8 @@ export default { arr = this.markersOrient.filter(item => item.getExtData().name.indexOf("对竹河") != -1); } else if (flag == 'tuanbaihe') { arr = this.markersOrient.filter(item => item.getExtData().name.indexOf("团柏河") != -1); + } else if (flag == 'soil') { + arr = this.markersSoil; } } if (arr && arr.length > 0) { @@ -1567,17 +1373,6 @@ export default { right: 38%; } -.tz_cov { - width: 100%; - height: 30vw; - margin: 0 auto; - /* margin-top: 4vw; */ - border: 1px solid #0169d0; - position: relative; - background: rgba(16, 45, 80, 1); - box-shadow: inset 0px 0px 16px 0px rgba(0, 145, 255, 1); -} - .tz_cov_top { width: 40%; height: 3vw; diff --git a/src/pages/Login/index.vue b/src/pages/Login/index.vue index d616724..8f611d1 100644 --- a/src/pages/Login/index.vue +++ b/src/pages/Login/index.vue @@ -61,15 +61,12 @@ export default { // yzm:[ // {required:true,message:'请输入验证码',trigger:"blur"} // ] - } + }, + timer:null, }; }, created(){ this.getCode() - // 设置整点定时发送请求 - setInterval(() => { - this.getCode() - }, 30000); }, methods: { submitForm(formName){ @@ -94,6 +91,10 @@ export default { captcha: this.rulesForm.yzm, checkKey:1629428467008, }).then((data)=>{ + if(this.timer){ + clearInterval(this.timer); + this.timer = null; + } if(data.code === 200){ // window.sessionStorage.setItem('token', data.result.token) window.sessionStorage.setItem('password', JSON.stringify(data.result.userInfo)); @@ -101,7 +102,8 @@ export default { this.$router.push('/'); // window.location.href= '/Home'; }else{ - this.$message.error(data.message) + this.$message.error(data.message); + this.getCode() } }); }else{ @@ -115,9 +117,12 @@ export default { getCodeInfo(now).then((res) =>{ if (res.success == true) { this.codeUrl = res.result - console.log(this.codeUrl) + // console.log(this.codeUrl) // this.codeUrl = res.data.img } + this.timer = setTimeout(() => { + this.getCode() + }, 60000); }) } } diff --git a/src/pages/MywrList/index.vue b/src/pages/MywrList/index.vue index c0555f6..d0d1667 100644 --- a/src/pages/MywrList/index.vue +++ b/src/pages/MywrList/index.vue @@ -6,7 +6,7 @@ :delay="100" :isFlat="true" > -
+