Parcourir la source

健康管理传参有误问题修改

Koishi il y a 3 ans
Parent
commit
c0f46c5a24
3 fichiers modifiés avec 242 ajouts et 217 suppressions
  1. 180 184
      src/router/index.js
  2. 58 29
      src/views/HealthControl/HealthTab1.vue
  3. 4 4
      src/views/LightMatrix1/LightMatrix1.vue

+ 180 - 184
src/router/index.js

@@ -69,194 +69,190 @@ const routes = [{
 		component: () =>
 			import( /* webpackChunkName: "windsite" */ '../views/WindSite/WindSite.vue'),
 		children: [{
-				path: 'home/:wpId', // 场站监视
-				component: () =>
-					import( /* webpackChunkName: "windsitehome" */ '../views/WindSite/pages/Home/Home.vue'),
-			}, {
-				path: 'draughtfanlist/:wpId', // 风机列表
-				component: () =>
-					import( /* webpackChunkName: "windsitedraughtfanlist" */
-						'../views/WindSite/pages/DraughtFanList.vue'),
-			}, {
-				path: 'matrix/:wpId', // 风场矩阵
-				component: () =>
-					import( /* webpackChunkName: "windsitematrix" */ '../views/WindSite/pages/Matrix.vue'),
-			}, {
-				path: 'lightmatrix/:wpId',
-				component: () =>
-					import( /* webpackChunkName: "windsitelightmatrix" */
-						'../views/WindSite/pages/LightMatrix.vue'),
-			}, {
-				path: 'box/:wpId',
-				component: () =>
-					import( /* webpackChunkName: "windsitebox" */ '../views/WindSite/pages/Box.vue'),
-			}, {
-				path: 'info/:wpId/:wtId', // 单机状态监视
-				component: () =>
-					import( /* webpackChunkName: "info" */ '../views/WindSite/pages/Info/Info.vue'),
-			}, {
-				path: 'tower/:wpId', // 测风塔
-				component: () =>
-					import( /* webpackChunkName: "windsitetower" */ '../views/WindSite/pages/Tower.vue'),
-			}, {
-				path: 'inverter-info/:wpId/:wtId', 
-				component: () =>
-					import( /* webpackChunkName: "inverter-info" */
+			path: 'home/:wpId', // 场站监视
+			component: () =>
+				import( /* webpackChunkName: "windsitehome" */ '../views/WindSite/pages/Home/Home.vue'),
+		}, {
+			path: 'draughtfanlist/:wpId', // 风机列表
+			component: () =>
+				import( /* webpackChunkName: "windsitedraughtfanlist" */
+					'../views/WindSite/pages/DraughtFanList.vue'),
+		}, {
+			path: 'matrix/:wpId', // 风场矩阵
+			component: () =>
+				import( /* webpackChunkName: "windsitematrix" */ '../views/WindSite/pages/Matrix.vue'),
+		}, {
+			path: 'lightmatrix/:wpId',
+			component: () =>
+				import( /* webpackChunkName: "windsitelightmatrix" */
+					'../views/WindSite/pages/LightMatrix.vue'),
+		}, {
+			path: 'box/:wpId',
+			component: () =>
+				import( /* webpackChunkName: "windsitebox" */ '../views/WindSite/pages/Box.vue'),
+		}, {
+			path: 'tower/:wpId', // 测风塔
+			component: () =>
+				import( /* webpackChunkName: "windsitetower" */ '../views/WindSite/pages/Tower.vue'),
+		}, {
+			path: 'inverter-info/:wpId/:wtId',
+			component: () =>
+				import( /* webpackChunkName: "inverter-info" */
 					'../views/WindSite/pages/Inverter-Info.vue'),
-			}, {
-				path: 'map/:wpId',
-				component: () =>
-					import( /* webpackChunkName: "windsitemap" */ '../views/WindSite/pages/Map.vue'),
-			}, {
-				path: 'map1/:wpId',
-				component: () =>
-					import( /* webpackChunkName: "windsitemap1" */ '../views/WindSite/pages/Map1.vue'),
-			}, {
-				path: '/decision/decision1', //风机绩效榜
-				name: 'decision1',
-				component: () => import( /* webpackChunkName: "decision1" */ '../views/Decision/Decision1.vue'),
-			},
-			{
-				path: '/decision/decision1Mx', //风机绩效榜明细
-				name: 'decision1Mx',
-				component: () => import( /* webpackChunkName: "decision1Mx" */
-					'../views/Decision/Decision1Mx.vue'),
-			},
+		}, {
+			path: 'map/:wpId',
+			component: () =>
+				import( /* webpackChunkName: "windsitemap" */ '../views/WindSite/pages/Map.vue'),
+		}, {
+			path: 'map1/:wpId',
+			component: () =>
+				import( /* webpackChunkName: "windsitemap1" */ '../views/WindSite/pages/Map1.vue'),
+		}, {
+			path: '/decision/decision1', //风机绩效榜
+			name: 'decision1',
+			component: () => import( /* webpackChunkName: "decision1" */ '../views/Decision/Decision1.vue'),
+		},
+		{
+			path: '/decision/decision1Mx', //风机绩效榜明细
+			name: 'decision1Mx',
+			component: () => import( /* webpackChunkName: "decision1Mx" */
+				'../views/Decision/Decision1Mx.vue'),
+		},
 
-			{
-				path: '/decision/decision2', //五项损失率
-				name: 'decision2',
-				component: () => import( /* webpackChunkName: "decision2" */ '../views/Decision/Decision2.vue'),
-			},
-			{
-				path: '/decision/decision2Cndb', //场内对标
-				name: 'decision2Cndb',
-				component: () => import( /* webpackChunkName: "decision2Cndb" */
-					'../views/Decision/Decision2Cndb.vue'),
-			},
-			{
-				path: '/decision/decision2Cjdb', //场际对标
-				name: 'decision2Cjdb',
-				component: () => import( /* webpackChunkName: "decision2Cjdb" */
-					'../views/Decision/Decision2Cjdb.vue'),
-			},
-			{
-				path: '/decision/decision2Xmdb', //项目对标
-				name: 'decision2Xmdb',
-				component: () => import( /* webpackChunkName: "decision2Xmdb" */
-					'../views/Decision/Decision2Xmdb.vue'),
-			},
-			{
-				path: '/decision/decision2Xldb', //线路对标
-				name: 'decision2Xldb',
-				component: () => import( /* webpackChunkName: "decision2Xldb" */
-					'../views/Decision/Decision2Xldb.vue'),
-			},
-			{
-				path: '/decision/decision3', //性能对标
-				name: 'decision3',
-				component: () => import( /* webpackChunkName: "decision3" */ '../views/Decision/Decision3.vue'),
-			},
-			{
-				path: '/decision/decision3db', //单机横向对比
-				name: 'decision3db',
-				component: () => import( /* webpackChunkName: "decision3db" */
-					'../views/Decision/Decision3Db.vue'),
-			},
-			{
-				path: '/decision/decision4', //值际对标
-				name: 'decision4',
-				component: () => import( /* webpackChunkName: "decision4" */ '../views/Decision/Decision4.vue'),
-			},
-			{
-				path: '/decision/decision4czzl', //操作指令统计
-				name: 'decision4czzl',
-				component: () => import( /* webpackChunkName: "decision4czzl" */
-					'../views/Decision/Decision4Czzl.vue'),
-			},
-			{
-				path: '/health',
-				name: 'health',
-				component: () => import('../views/HealthControl/Health.vue'),
-			},
-			{
-				path: '/health/health1',
-				name: 'health1',
-				component: () => import('../views/HealthControl/Health1.vue'),
-			},
-			{
-				path: '/health/health2', // 健康管理首页
-				name: 'health2',
-				component: () => import('../views/HealthControl/Health2.vue'),
-			},
-			{
-				path: '/health/health3/:wpId', // 场站健康管理
-				name: 'health3',
-				component: () => import('../views/HealthControl/Health3.vue'),
-			},
-			{
-				path: '/health/health4',
-				name: 'health4',
-				children: [{
-						path: 'healthLineChart/:wtId', // 风机健康趋势
-						component: () => import( /* webpackChunkName: "healthLineChart" */
-							'../views/HealthControl/healthLineChart.vue'),
-					},
-					{
-						path: 'healthLineChart2/:wtId', // 健康趋势
-						component: () => import( /* webpackChunkName: "healthLineChart2" */
-							'../views/HealthControl/healthLineChart2.vue'),
-					}
-				],
-				component: () => import('../views/HealthControl/Health4.vue'),
-			},
-			{
-				path: '/health/health5/',
-				name: 'health5',
-				component: () => import('../views/HealthControl/Health5.vue'),
-			},
-			{
-				path: '/health/health6', // 健康总览
-				name: 'health6',
-				component: () => import('../views/HealthControl/Health6.vue'),
-			},
-			{
-				path: '/cutAnalyse', // 切入切出分析
-				name: 'cutAnalyse',
-				component: () => import('../views/cutAnalyse/index.vue'),
-			},
-			{
-				path: '/cutAnalyse', // 切入切出分析
-				name: 'cutAnalyse',
-				component: () => import('../views/cutAnalyse/index.vue'),
-			},
-			{
-				path: '/wtSaturability', // 单机饱和度
-				name: 'wtSaturability',
-				component: () => import('../views/wtSaturability/index.vue'),
-			},
-			{
-				path: '/windAnalysis', // 风资源分析
-				name: 'windAnalysis',
-				component: () => import('../views/windAnalysis/index.vue'),
-			},
-			{
-				path: '/windAnalysis/fx', // 风向
-				name: 'fxzstmain',
-				component: () => import('../views/windAnalysis/fxzstmain.vue'),
-			},
-			{
-				path: 'boosterstation/:wpId', // 升压站
-				component: () =>
-					import( /* webpackChunkName: "boosterstation" */
-						'../views/WindSite/pages/BoosterStation.vue'),
+		{
+			path: '/decision/decision2', //五项损失率
+			name: 'decision2',
+			component: () => import( /* webpackChunkName: "decision2" */ '../views/Decision/Decision2.vue'),
+		},
+		{
+			path: '/decision/decision2Cndb', //场内对标
+			name: 'decision2Cndb',
+			component: () => import( /* webpackChunkName: "decision2Cndb" */
+				'../views/Decision/Decision2Cndb.vue'),
+		},
+		{
+			path: '/decision/decision2Cjdb', //场际对标
+			name: 'decision2Cjdb',
+			component: () => import( /* webpackChunkName: "decision2Cjdb" */
+				'../views/Decision/Decision2Cjdb.vue'),
+		},
+		{
+			path: '/decision/decision2Xmdb', //项目对标
+			name: 'decision2Xmdb',
+			component: () => import( /* webpackChunkName: "decision2Xmdb" */
+				'../views/Decision/Decision2Xmdb.vue'),
+		},
+		{
+			path: '/decision/decision2Xldb', //线路对标
+			name: 'decision2Xldb',
+			component: () => import( /* webpackChunkName: "decision2Xldb" */
+				'../views/Decision/Decision2Xldb.vue'),
+		},
+		{
+			path: '/decision/decision3', //性能对标
+			name: 'decision3',
+			component: () => import( /* webpackChunkName: "decision3" */ '../views/Decision/Decision3.vue'),
+		},
+		{
+			path: '/decision/decision3db', //单机横向对比
+			name: 'decision3db',
+			component: () => import( /* webpackChunkName: "decision3db" */
+				'../views/Decision/Decision3Db.vue'),
+		},
+		{
+			path: '/decision/decision4', //值际对标
+			name: 'decision4',
+			component: () => import( /* webpackChunkName: "decision4" */ '../views/Decision/Decision4.vue'),
+		},
+		{
+			path: '/decision/decision4czzl', //操作指令统计
+			name: 'decision4czzl',
+			component: () => import( /* webpackChunkName: "decision4czzl" */
+				'../views/Decision/Decision4Czzl.vue'),
+		},
+		{
+			path: '/health',
+			name: 'health',
+			component: () => import('../views/HealthControl/Health.vue'),
+		},
+		{
+			path: '/health/health1',
+			name: 'health1',
+			component: () => import('../views/HealthControl/Health1.vue'),
+		},
+		{
+			path: '/health/health2', // 健康管理首页
+			name: 'health2',
+			component: () => import('../views/HealthControl/Health2.vue'),
+		},
+		{
+			path: '/health/health3/:wpId', // 场站健康管理
+			name: 'health3',
+			component: () => import('../views/HealthControl/Health3.vue'),
+		},
+		{
+			path: '/health/health4',
+			name: 'health4',
+			children: [{
+				path: 'healthLineChart/:wtId', // 风机健康趋势
+				component: () => import( /* webpackChunkName: "healthLineChart" */
+					'../views/HealthControl/healthLineChart.vue'),
 			},
 			{
-				path: "generalappearance/:wpId", // 总样貌
-				component: () =>
-					import( /* webpackChunkName: "generalappearance" */
-						"../views/WindSite/pages/GeneralAppearance.vue"),
-			},
+				path: 'healthLineChart2/:wtId', // 健康趋势
+				component: () => import( /* webpackChunkName: "healthLineChart2" */
+					'../views/HealthControl/healthLineChart2.vue'),
+			}
+			],
+			component: () => import('../views/HealthControl/Health4.vue'),
+		},
+		{
+			path: '/health/health5/',
+			name: 'health5',
+			component: () => import('../views/HealthControl/Health5.vue'),
+		},
+		{
+			path: '/health/health6', // 健康总览
+			name: 'health6',
+			component: () => import('../views/HealthControl/Health6.vue'),
+		},
+		{
+			path: '/cutAnalyse', // 切入切出分析
+			name: 'cutAnalyse',
+			component: () => import('../views/cutAnalyse/index.vue'),
+		},
+		{
+			path: '/cutAnalyse', // 切入切出分析
+			name: 'cutAnalyse',
+			component: () => import('../views/cutAnalyse/index.vue'),
+		},
+		{
+			path: '/wtSaturability', // 单机饱和度
+			name: 'wtSaturability',
+			component: () => import('../views/wtSaturability/index.vue'),
+		},
+		{
+			path: '/windAnalysis', // 风资源分析
+			name: 'windAnalysis',
+			component: () => import('../views/windAnalysis/index.vue'),
+		},
+		{
+			path: '/windAnalysis/fx', // 风向
+			name: 'fxzstmain',
+			component: () => import('../views/windAnalysis/fxzstmain.vue'),
+		},
+		{
+			path: 'boosterstation/:wpId', // 升压站
+			component: () =>
+				import( /* webpackChunkName: "boosterstation" */
+					'../views/WindSite/pages/BoosterStation.vue'),
+		},
+		{
+			path: "generalappearance/:wpId", // 总样貌
+			component: () =>
+				import( /* webpackChunkName: "generalappearance" */
+					"../views/WindSite/pages/GeneralAppearance.vue"),
+		},
 		]
 	},
 	{

+ 58 - 29
src/views/HealthControl/HealthTab1.vue

@@ -27,12 +27,16 @@
       </div>
     </div>
     <div class="health-report">
-      <panel class="health-report-panel" :title="'推荐检修风机'" :showLine="false">
+      <panel
+        class="health-report-panel"
+        :title="'推荐检修风机'"
+        :showLine="false"
+      >
         <div class="actions mg-b-16">
           <div class="item green" @click="onClickRecommon(1)">当日内推荐</div>
           <div class="item purple" @click="onClickRecommon(2)">三日内推荐</div>
           <div class="item gray" @click="onClickRecommon(3)">超三日推荐</div>
-          <div style="margin-left:450px">
+          <div style="margin-left: 450px">
             <button class="btn" @click="onClickCofirmAll()">全部确认</button>
             <button class="btn" @click="onClickIgnoreAll()">全部忽略</button>
           </div>
@@ -45,9 +49,17 @@
             </div>
             <div class="info">
               <p>推荐理由:{{ item.reason }}</p>
-              <p>推荐检修时间:{{new Date(item.recodedate).formatDate("yyyy-MM-dd hh:mm:ss")}}</p>
+              <p>
+                推荐检修时间:{{
+                  new Date(item.recodedate).formatDate("yyyy-MM-dd hh:mm:ss")
+                }}
+              </p>
               <p>推荐时间对应风速:{{ item.speed }} m/s</p>
-              <p>判断时间:{{new Date(item.createdate).formatDate("yyyy-MM-dd hh:mm:ss")}}</p>
+              <p>
+                判断时间:{{
+                  new Date(item.createdate).formatDate("yyyy-MM-dd hh:mm:ss")
+                }}
+              </p>
               <div class="actions mg-t-16">
                 <button class="btn success" @click="onClickCofirm(item)">
                   <i class="fa fa-check"></i>
@@ -63,7 +75,7 @@
         </div>
       </panel>
     </div>
-    <health-report :show="reportshow" :params="reportparams" @closed="closed"/>
+    <health-report :show="reportshow" :params="reportparams" @closed="closed" />
   </div>
 </template>
 
@@ -71,23 +83,28 @@
 import VertivalBarLineChart from "../../components/chart/combination/vertival-bar-line-chart.vue";
 import SvgIcon from "../../components/coms/icon/svg-icon.vue";
 import Panel from "../../components/coms/panel/panel.vue";
-import HealthReport from "../../components/other/healthReport/index.vue"
+import HealthReport from "../../components/other/healthReport/index.vue";
 
 export default {
-  components: { SvgIcon, Panel, VertivalBarLineChart, HealthReport},
+  components: { SvgIcon, Panel, VertivalBarLineChart, HealthReport },
   data() {
     return {
       infoList: [
         // {title: '24小时健康趋势', svgid: 'svg-24-houre', active: false, type: 'houre'},
         { title: "7日健康趋势", svgid: "svg-h-day", active: true, type: "day" },
-        { title: "30日健康趋势", svgid: "svg-h-month", active: false, type: "month"},
+        {
+          title: "30日健康趋势",
+          svgid: "svg-h-month",
+          active: false,
+          type: "month",
+        },
       ],
       bardata: { area: [], legend: [], data: [] }, // 损失电量分析echart数值
       lineData: [],
       recommenList: [], // 健康报告推荐
       recommenIndex: 1, // 记录当前是那个推荐
       reportshow: false, //是否显示健康报告
-      reportparams: undefined
+      reportparams: undefined,
     };
   },
   created() {
@@ -128,20 +145,26 @@ export default {
       }
     },
     // 查看健康报告
-    onClickReport(item){
-      this.reportshow = true
-      this.reportparams = {wtId: item.wtid, recorddate: new Date(item.recodedate).formatDate("yyyy-MM-dd")}
+    onClickReport(item) {
+      this.reportshow = true;
+      this.reportparams = {
+        wtId: item.wtid,
+        recorddate: new Date(item.createdate).formatDate("yyyy-MM-dd"),
+      };
     },
     // 关闭健康报告
-    closed(){
-      this.reportshow = false
+    closed() {
+      this.reportshow = false;
     },
     // 健康推荐提交
     onClickCofirm(item) {
       let that = this;
-      that.$confirm('确认提交?').then(_=> {
-        that.requestOption("recommen/confirpush", item.rid);
-      }).catch(_=>{})
+      that
+        .$confirm("确认提交?")
+        .then((_) => {
+          that.requestOption("recommen/confirpush", item.rid);
+        })
+        .catch((_) => {});
     },
     // 健康推荐取消
     onClickIgnore(item) {
@@ -150,16 +173,22 @@ export default {
     // 健康推荐提交全部
     onClickCofirmAll() {
       let that = this;
-      that.$confirm('确认全部提交?').then(_=> {
-        that.requestOptionAll("recommen/confirpushAll");
-      }).catch(_=>{})
+      that
+        .$confirm("确认全部提交?")
+        .then((_) => {
+          that.requestOptionAll("recommen/confirpushAll");
+        })
+        .catch((_) => {});
     },
     // 健康推荐取消全部
     onClickIgnoreAll() {
       let that = this;
-      that.$confirm('确认全部取消?').then(_=> {
-        that.requestOptionAll("recommen/ignorepushAll");
-      }).catch(_=>{})
+      that
+        .$confirm("确认全部取消?")
+        .then((_) => {
+          that.requestOptionAll("recommen/ignorepushAll");
+        })
+        .catch((_) => {});
     },
     // 健康报告推荐
     requestRecommen(url) {
@@ -376,7 +405,7 @@ export default {
           flex-direction: row;
           justify-content: space-between;
           span {
-             cursor: pointer; 
+            cursor: pointer;
           }
         }
 
@@ -389,11 +418,11 @@ export default {
           p {
             margin: 0;
             line-height: 2;
-            overflow:hidden; 
-            text-overflow:ellipsis;
-            display:-webkit-box; 
-            -webkit-box-orient:vertical;
-            -webkit-line-clamp:2; 
+            overflow: hidden;
+            text-overflow: ellipsis;
+            display: -webkit-box;
+            -webkit-box-orient: vertical;
+            -webkit-line-clamp: 2;
           }
 
           .actions {

+ 4 - 4
src/views/LightMatrix1/LightMatrix1.vue

@@ -346,12 +346,12 @@ export default {
     goDetails(item) {
       if (item.wpId.indexOf("FDC") !== -1) {
         this.$router.push({
-          path: `/monitor/windsite/info/${item.wpId}/${item.wtId}`,
+          path: `/monitor/windsite/info/${item.wpId}/${item.wtId}`
         });
       } else {
-        this.$router.push({
-          path: `/monitor/windsite/inverter-info/${item.wpId}/${item.wtId}`,
-        });
+        // this.$router.push({
+        //   path: `/info/inverter-info/${item.wpId}/${item.wtId}`
+        // });
       }
     },
   },