diff --git a/package.json b/package.json index 5e4a9ad..14e5c24 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "d3": "^5.0.0", "d3-flextree": "^2.1.2", "dayjs": "^1.11.10", - "echarts": "4.2.1", + "echarts": "^5.5.0", "element-china-area-data": "^6.1.0", "element-ui": "^2.15.6", "file-saver": "2.0.1", @@ -82,6 +82,7 @@ "vue-awesome-swiper": "^3.1.3", "vue-count-to": "1.0.13", "vue-cropper": "0.4.9", + "vue-echarts": "^6.6.9", "vue-pdf": "^4.3.0", "vue-router": "3.0.2", "vue-simple-uploader": "^0.7.6", diff --git a/src/api/sluice/analysis.js b/src/api/sluice/analysis.js new file mode 100644 index 0000000..a2c0da6 --- /dev/null +++ b/src/api/sluice/analysis.js @@ -0,0 +1,42 @@ +import request from '@/utils/request'; + +// 获取水闸统计列表 +export function getSluiceStatisticalListApi(data) { + return request({ + url: `/run/sz/project/yq/statistics`, + method: 'post', + data + }); +} + +// 统计超出的指标 +export function getSluiceExceedApi(wagaCode) { + return request({ + url: `/run/sz/yq/statistics/exceed-index`, + method: 'post', + data:{ + wagaCode, + } + }); +} +// 获取降雨量和过水闸流量 +export function getRainfallAndGateFlowApi(wagaCode) { + return request({ + url: `/run/sz/yq/statistics/get-ten-days-rainfall`, + method: 'post', + data:{ + wagaCode, + } + }); +} + +// 统计超出的指标 +export function getWaterLevelInfoApi(wagaCode) { + return request({ + url: `/run/sz/yq/statistics/get-ten-days-water-regime`, + method: 'post', + data:{ + wagaCode, + } + }); +} diff --git a/src/api/sluice/index.js b/src/api/sluice/index.js index 0baa8dd..766ce71 100644 --- a/src/api/sluice/index.js +++ b/src/api/sluice/index.js @@ -1,5 +1,6 @@ // 水闸相关接口 import request from '@/utils/request' +export * from './analysis'; // 获取巡查水闸列表 export function getRunProjectList(data) { diff --git a/src/main.js b/src/main.js index dddeb06..c4e4927 100644 --- a/src/main.js +++ b/src/main.js @@ -52,7 +52,10 @@ import {downloadFile,showFile} from '@/api/common' import Viewer from 'v-viewer' import 'viewerjs/dist/viewer.css' + import echarts from 'echarts' +// import v_echarts from 'vue-echarts' + Vue.prototype.$echarts = echarts import { regionData, codeToText, TextToCode } from "element-china-area-data"; @@ -113,7 +116,8 @@ Vue.prototype.$timePick = function (date) { } Vue.use(Viewer); - +// 全局挂载echarts +// Vue.component('v-chart',v_echarts); // 全局组件挂载 Vue.component('Pagination', Pagination) Vue.component('RightToolbar', RightToolbar) diff --git a/src/views/sluice/runManage/waterRainReport/smartAnalyse/index.vue b/src/views/sluice/runManage/waterRainReport/smartAnalyse/index.vue index 21044e8..8b94675 100644 --- a/src/views/sluice/runManage/waterRainReport/smartAnalyse/index.vue +++ b/src/views/sluice/runManage/waterRainReport/smartAnalyse/index.vue @@ -2,164 +2,139 @@