diff --git a/App.vue b/App.vue index d17179b..1f8c57f 100644 --- a/App.vue +++ b/App.vue @@ -13,7 +13,7 @@ } else { uni.reLaunch({ // url: '/pages/login/login' - url:'/pages/skInfo/detail/index' + url:'/pages/ylzList/detail/index' }) console.log(token.secretKey,'App Launch2') } diff --git a/pages.json b/pages.json index 9cae36b..70b33b9 100644 --- a/pages.json +++ b/pages.json @@ -323,6 +323,12 @@ "style": { "navigationBarTitleText": "" } + }, + { + "path": "pages/ylzList/detail/index", + "style": { + "navigationBarTitleText": "" + } } ], diff --git a/pages/skDetail/zrtx/zrtx.vue b/pages/skDetail/zrtx/zrtx.vue index 2152336..88e2ba0 100644 --- a/pages/skDetail/zrtx/zrtx.vue +++ b/pages/skDetail/zrtx/zrtx.vue @@ -1,6 +1,6 @@ @@ -15,6 +18,9 @@ import moment from 'moment' import Jcxx from "./jcxx.vue" import Zrtx from "../../skDetail/zrtx/zrtx.vue" + import Krqx from "./krqx/index.vue" + import BasicInfo from "./basicInfo.vue" + import Tzcs from "./tzcs.vue" export default { data() { @@ -24,9 +30,7 @@ stm: '', etm: '' }, - customStyle: { - background: '#000' - }, + list1: [{ name: '监测信息', }, { @@ -38,12 +42,15 @@ }, { name: '责任人' }], - skInfo:{} + skInfo:{}, }; }, components:{ Jcxx, - Zrtx + Zrtx, + Krqx, + BasicInfo, + Tzcs }, onLoad() { this.getList(); diff --git a/pages/skInfo/detail/jcxx.vue b/pages/skInfo/detail/jcxx.vue index dc7434a..69a71cc 100644 --- a/pages/skInfo/detail/jcxx.vue +++ b/pages/skInfo/detail/jcxx.vue @@ -68,14 +68,14 @@ - + - + - - + + @@ -124,7 +124,7 @@ showTime:false, showTime1:false, subsectionList: ['图', '表', '统计值'], - current:0, + curNow:0, jcTableData:[], chartData: {}, } @@ -210,8 +210,8 @@ this.etm = time; this.showTime1 = false }, - subsectionChange(e){ - this.current = e + subsectionChange(e){ + this.curNow = e } }, watch:{ diff --git a/pages/skInfo/detail/krqx/chartOptions.js b/pages/skInfo/detail/krqx/chartOptions.js new file mode 100644 index 0000000..76efa7e --- /dev/null +++ b/pages/skInfo/detail/krqx/chartOptions.js @@ -0,0 +1,80 @@ +import {GetInterval} from "../../../../utils/tools" +export default function DrpOption(data) { + const maxVal = Math.ceil(Math.max(...data.map(obj => obj.rz))) + const minVal = Math.floor(Math.min(...data.map(obj => obj.rz))) + const maxValX = Math.max(...data.map(obj => obj.w)) + const minValX = Math.min(...data.map(obj => obj.w)) + let arr = [] + + data.forEach(item=>{ + arr.push([item.w,item.rz]) + }) + let eopts = { + tooltip: { + trigger: 'axis', + }, + grid: [ + { + top: "12%", + left: "12%", + right: "18%", + bottom: "8%" + }, + ], + xAxis: [ + { + name: "库容(万m³)", + nameGap: 5, + type: 'value', + min:Math.floor(minValX / 5) *5, + max:Math.ceil(maxValX / 5) *5, + interval:GetInterval(minValX,maxValX), + data: data.map(o => o.w), + splitLine: { + show: false + }, + } + ], + yAxis: [ + { + type: 'value', + name: "库水位(m)", + minInterval:1, + splitLine: { + show: true, + lineStyle: { + color: '#07a6ff', + width: 0.25, + type: 'dotted' + } + }, + axisLabel: { + color: '#333', + fontSize: 12, + }, + axisLine: { + show: true + }, + axisTick: { + show: true, + }, + min: minVal, + max: maxVal + } + ], + }; + let chartData = { + series: [ + { + type: 'line', + color: "#007AFD", + data: arr, + smooth: true + }, + ] + }; + return { + eopts, + chartData + } +} \ No newline at end of file diff --git a/pages/skInfo/detail/krqx/index.vue b/pages/skInfo/detail/krqx/index.vue new file mode 100644 index 0000000..c9955a2 --- /dev/null +++ b/pages/skInfo/detail/krqx/index.vue @@ -0,0 +1,56 @@ + + + \ No newline at end of file diff --git a/pages/skInfo/detail/krqx/jcsjTable.vue b/pages/skInfo/detail/krqx/jcsjTable.vue new file mode 100644 index 0000000..dd7a4bd --- /dev/null +++ b/pages/skInfo/detail/krqx/jcsjTable.vue @@ -0,0 +1,85 @@ + + + + + \ No newline at end of file diff --git a/pages/skInfo/detail/tzcs.vue b/pages/skInfo/detail/tzcs.vue new file mode 100644 index 0000000..fe4f9e5 --- /dev/null +++ b/pages/skInfo/detail/tzcs.vue @@ -0,0 +1,119 @@ + + + \ No newline at end of file diff --git a/pages/ylzList/detail/index.vue b/pages/ylzList/detail/index.vue new file mode 100644 index 0000000..b151bb3 --- /dev/null +++ b/pages/ylzList/detail/index.vue @@ -0,0 +1,172 @@ + + + + \ No newline at end of file diff --git a/pages/ylzList/detail/jcOptions.js b/pages/ylzList/detail/jcOptions.js new file mode 100644 index 0000000..fbdbf4b --- /dev/null +++ b/pages/ylzList/detail/jcOptions.js @@ -0,0 +1,181 @@ + +import echarts from 'echarts/lib/echarts'; +export default function DrpOption(echartData) { + console.log("echartData",echartData); + + let totalDrp = 0; + const DRPLEVEL = [10, 20, 50, 100, 250]; + const maxVal = DRPLEVEL.find(o => o > totalDrp); + const xMaxVal = echartData?.actual ? DRPLEVEL.find(o => { + let max = Math.max(...echartData?.actual || []) + return o > max + }):maxVal + // const xMaxVal = Math.ceil(Math.max(...echartData.actual)) + 2 + const yMaxVal = echartData?.actual ? DRPLEVEL.find(o => { + let max = Math.max(...echartData?.total) + return o > max + }): maxVal + let eopts = { + tooltip: { + trigger: 'axis', + }, + grid: { + x: 40, + y: 30, + x2: 30, + y2: 28, + borderWidth: 0 + }, + legend: { + // 显示图例 + show: true, + // 图例的位置 + data: ['实测', '累计'] + }, + calculable: true, + xAxis: [ + { + type: 'category', + data: echartData.time, + splitLine: { + show: false + }, + axisLabel: { + color: '#333', + fontSize: 12, + format:"jcDataFormat" + }, + axisLine: { + lineStyle: { + color: '#07a6ff', + width: 0.5, + } + }, + axisTick: { + show: false, + }, + } + ], + yAxis: [ + { + type: 'value', + position: 'left', + name:"雨量mm", + splitLine: { + show: true, + lineStyle: { + color: '#07a6ff', + width: 0.25, + type: 'dashed' + } + }, + axisLabel: { + color: '#333', + fontSize: 12, + }, + axisLine: { + show: false + }, + axisTick: { + show: false, + }, + min: 0, + max: xMaxVal + }, + { + type: 'value', + position: 'right', + name:"累计mm", + splitLine: { + show: true, + lineStyle: { + color: '#07a6ff', + width: 0.25, + type: 'dashed' + } + }, + axisLabel: { + color: '#333', + fontSize: 12, + }, + axisLine: { + show: false + }, + axisTick: { + show: false, + }, + min: 0, + max: yMaxVal + } + ], + }; + let chartData = { + series: [ + { + name: '实测', + type: 'bar', + barWidth: '60%', + data: echartData.actual, + itemStyle: { + normal: { + barBorderRadius: [3, 3, 0, 0], + color: new echarts.graphic.LinearGradient( + 0, 0, 0, 1, + [ + { offset: 0, color: '#3876cd' }, + { offset: 0.5, color: '#45b4e7' }, + { offset: 1, color: '#54ffff' } + ] + ), + }, + }, + label: { + show: false, + }, + markPoint: { + data: [ + { type: 'max', name: '最大值', symbol: 'circle', symbolSize: 1, symbolOffset: [0, -12] }, + ] + }, + }, + { + yAxisIndex: 1, + name: '累计', + type: 'line', + showSymbol: false, + label: { + show: false, + }, + data: echartData.total, + lineStyle: { + normal: { + width: 1, + } + }, + areaStyle: { + normal: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ + offset: 0, + color: 'rgba(3, 194, 236, 0.3)' + }, { + offset: 0.8, + color: 'rgba(3, 194, 236, 0)' + } + ], false), + shadowColor: 'rgba(0, 0, 0, 0.1)', + shadowBlur: 10 + } + }, + itemStyle: { + normal: { + color: '#03C2EC' + } + }, + } + ] + }; + return { + eopts, + chartData + } +} \ No newline at end of file diff --git a/pages/ylzList/detail/jcTable.vue b/pages/ylzList/detail/jcTable.vue new file mode 100644 index 0000000..6687c1b --- /dev/null +++ b/pages/ylzList/detail/jcTable.vue @@ -0,0 +1,89 @@ + + + + + \ No newline at end of file diff --git a/pages/ylzList/detail/tjsjTable.vue b/pages/ylzList/detail/tjsjTable.vue new file mode 100644 index 0000000..527de70 --- /dev/null +++ b/pages/ylzList/detail/tjsjTable.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/pages/ylzList/index.vue b/pages/ylzList/index.vue index 2539f04..71715ae 100644 --- a/pages/ylzList/index.vue +++ b/pages/ylzList/index.vue @@ -1,5 +1,5 @@