From ef10dea2a96d68a00a9a316f8594e0636103a6ab Mon Sep 17 00:00:00 2001 From: zmc <zmc_li@foxmail.com> Date: 星期四, 12 十月 2023 16:50:25 +0800 Subject: [PATCH] 扬尘前端页面 --- src/api/index.js | 4 src/main.js | 4 src/views/line_graph/SiteComprehensiveRskRanking.vue | 28 ++++---- src/views/line_graph/DataRiskModel.vue | 7 +- src/views/line_graph/DataRiskRank.vue | 1 src/sfc/BreadCrumb.vue | 16 +++++ src/components/layout/AppAside.vue | 4 src/router/index.js | 72 +++++++++++++++++------- 8 files changed, 91 insertions(+), 45 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 4b67d52..f6fa644 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -4,9 +4,9 @@ -// const url = 'http://localhost:8081/'; +const url = 'http://localhost:8081/'; // 閮ㄧ讲 -const url = 'http://114.215.109.124:8803/'; +// const url = 'http://114.215.109.124:8803/'; //椋炵窘鐩戠 const $http = axios.create({ diff --git a/src/components/layout/AppAside.vue b/src/components/layout/AppAside.vue index 0e39925..af923ae 100644 --- a/src/components/layout/AppAside.vue +++ b/src/components/layout/AppAside.vue @@ -146,10 +146,10 @@ </el-menu-item> --> - <el-menu-item index="report" > + <!-- <el-menu-item index="report" > <el-icon><i-ep-Histogram /></el-icon> 涓氬姟鎶ヨ〃 - </el-menu-item> + </el-menu-item> --> </el-sub-menu> diff --git a/src/main.js b/src/main.js index 92e15e6..197848e 100644 --- a/src/main.js +++ b/src/main.js @@ -25,9 +25,9 @@ } }) // 鏈湴 -// axios.defaults.baseURL = 'http://localhost:8081' +axios.defaults.baseURL = 'http://localhost:8081' // 閮ㄧ讲 -axios.defaults.baseURL = 'http://114.215.109.124:8803' +// axios.defaults.baseURL = 'http://114.215.109.124:8803' app.config.globalProperties.$http = axios app.use(ElMessage) diff --git a/src/router/index.js b/src/router/index.js index 74978ca..05e1ea8 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,28 +11,58 @@ component: () => import('@/components/layout/AppLayout.vue'), children: [ - // 鏁版嵁鍒嗛櫓妯″瀷 - { - path: "/avgDay", - name: 'avgDay', - meta: { title: '鏁版嵁鍒嗛櫓妯″瀷' }, - component: () => import('@/views/line_graph/DataRiskModel.vue') - }, + { + path:'/avalue', + name:'avalue', + meta: {title: '椋庨櫓璇勪及'}, + children:[ + // 鏁版嵁鍒嗛櫓妯″瀷 + { + path: "/avgDay", + name: 'avgDay', + meta: { title: '鏁版嵁鍒嗛櫓妯″瀷' }, + component: () => import('@/views/line_graph/DataRiskModel.vue') + }, + + // 鏁版嵁椋庨櫓鎺掑悕 + { + path: "/analysis", + name: 'analysis', + meta: { title: '鏁版嵁椋庨櫓鎺掑悕' }, + component: () => import('@/views/line_graph/DataRiskRank.vue') + }, + // 鏁版嵁椋庨櫓鎺掑悕 + { + path: "/riskrank", + name: 'riskrank', + meta: { title: '缁煎悎椋庨櫓鎺掑悕' }, + component: () => import('@/views/line_graph/SiteComprehensiveRskRanking.vue') + }, + ] + }, + + // // 鏁版嵁鍒嗛櫓妯″瀷 + // { + // path: "/avgDay", + // name: 'avgDay', + // meta: { title: '鏁版嵁鍒嗛櫓妯″瀷' }, + // component: () => import('@/views/line_graph/DataRiskModel.vue') + // }, - // 鏁版嵁椋庨櫓鎺掑悕 - { - path: "/analysis", - name: 'analysis', - meta: { title: '鏁版嵁椋庨櫓鎺掑悕' }, - component: () => import('@/views/line_graph/DataRiskRank.vue') - }, - // 鏁版嵁椋庨櫓鎺掑悕 - { - path: "/riskrank", - name: 'riskrank', - meta: { title: '缁煎悎椋庨櫓鎺掑悕' }, - component: () => import('@/views/line_graph/SiteComprehensiveRskRanking.vue') - }, + // // 鏁版嵁椋庨櫓鎺掑悕 + // { + // path: "/analysis", + // name: 'analysis', + // meta: { title: '鏁版嵁椋庨櫓鎺掑悕' }, + // component: () => import('@/views/line_graph/DataRiskRank.vue') + // }, + // // 鏁版嵁椋庨櫓鎺掑悕 + // { + // path: "/riskrank", + // name: 'riskrank', + // meta: { title: '缁煎悎椋庨櫓鎺掑悕' }, + // component: () => import('@/views/line_graph/SiteComprehensiveRskRanking.vue') + // }, // 椋炶宸℃ { diff --git a/src/sfc/BreadCrumb.vue b/src/sfc/BreadCrumb.vue index 444c015..54fd4e6 100644 --- a/src/sfc/BreadCrumb.vue +++ b/src/sfc/BreadCrumb.vue @@ -4,7 +4,9 @@ export default { data(){ return{ - list:[] + list:[], + subTitle1: null, + subTitle2 :null, } }, setup(){ @@ -13,10 +15,14 @@ watch:{ $route(to,from){ this.list = to.matched + // this.subTitle1 = this.list[1] + // this.subTitle2 = this.list[2] } }, mounted (){ this.list = this.$route.matched + // this.subTitle1 = this.list[1] + // this.subTitle2 = this.list[2] }, methods:{ } @@ -29,6 +35,14 @@ <router-link :to="item.path">{{ item.meta.title }}</router-link> </el-breadcrumb-item> </el-breadcrumb> + + <!-- <el-breadcrumb :separator-icon="ArrowRight"> + <el-breadcrumb-item> {{subTitle1.meta.title}} </el-breadcrumb-item> + <el-breadcrumb-item> <router-link :to="item.path">{{subTitle2.meta.title}}</router-link></el-breadcrumb-item> --> + + + + </template> <style scoped> .el-breadcrumb__inner a { diff --git a/src/views/line_graph/DataRiskModel.vue b/src/views/line_graph/DataRiskModel.vue index 702f7c4..7a343d3 100644 --- a/src/views/line_graph/DataRiskModel.vue +++ b/src/views/line_graph/DataRiskModel.vue @@ -99,9 +99,9 @@ }, mounted() { // 椤甸潰鍔犺浇鏄剧ず椋庨櫓鏈�楂樼殑绔欑偣 - this.getRiskWeightName() + // this.getRiskWeightName() - + this.fetch() }, methods: { async getRiskWeightName() { @@ -240,7 +240,8 @@ <AreaAndmonitorType></AreaAndmonitorType> </el-form-item> <el-form-item> - <InputSearch isNeedDefaultSite="0" @submit-value="(n) => (form.name = n)" :siteName="form.name"></InputSearch> + <!-- <InputSearch isNeedDefaultSite="1" @submit-value="(n) => (form.name = n)" :siteName="form.name"></InputSearch> --> + <InputSearch isNeedDefaultSite="1" @submit-value="(n) => (form.name = n)" ></InputSearch> </el-form-item> <el-form-item> diff --git a/src/views/line_graph/DataRiskRank.vue b/src/views/line_graph/DataRiskRank.vue index aa882a4..64e3f6e 100644 --- a/src/views/line_graph/DataRiskRank.vue +++ b/src/views/line_graph/DataRiskRank.vue @@ -44,6 +44,7 @@ }, mounted() { + console.log(this.$route.matched); this.form.name = ''; }, methods: { diff --git a/src/views/line_graph/SiteComprehensiveRskRanking.vue b/src/views/line_graph/SiteComprehensiveRskRanking.vue index f9260a6..488b6d8 100644 --- a/src/views/line_graph/SiteComprehensiveRskRanking.vue +++ b/src/views/line_graph/SiteComprehensiveRskRanking.vue @@ -144,20 +144,20 @@ }, // 浼佷笟寮傚父璇︽儏 - exceptiondataCount() { - exceptionApi - .exceptiondata1({ - // siteName: this.form.name, - siteName: '', - beginTime: this.form.beginTime, - endTime: this.form.endTime - }) - .then((res) => { - let obj = index.calRecur(res.data.data) - this.bill.exceptionRecurrence = obj['exceptionRecurrence'] - this.bill.exceptionTypeAggregation = obj['exceptionTypeAggregation'] - }) - }, + // exceptiondataCount() { + // exceptionApi + // .exceptiondata1({ + // // siteName: this.form.name, + // siteName: '', + // beginTime: this.form.beginTime, + // endTime: this.form.endTime + // }) + // .then((res) => { + // let obj = index.calRecur(res.data.data) + // this.bill.exceptionRecurrence = obj['exceptionRecurrence'] + // this.bill.exceptionTypeAggregation = obj['exceptionTypeAggregation'] + // }) + // }, /** * 鍒濆鍔犺浇鍑芥暟 -- Gitblit v1.9.3