浏览代码

控制评价模块完成

Koishi 2 年之前
父节点
当前提交
6873ecdfbb
共有 2 个文件被更改,包括 374 次插入82 次删除
  1. 81 71
      src/api/index.js
  2. 293 11
      src/components/search/action.vue

+ 81 - 71
src/api/index.js

@@ -2,7 +2,7 @@ import request from "../utils/request";
 //全部风机
 const getWindturbine = () => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/windturbine/all`,
         method: "get",
     });
@@ -10,7 +10,7 @@ const getWindturbine = () => {
 // 获取所有升压站tab数据
 const getAllStationTab = () => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/boost_station/stations`,
         method: "get",
     });
@@ -18,7 +18,7 @@ const getAllStationTab = () => {
 // 获取svg触发器
 const getAllStationSvgInfo = (params) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/boost_station/svginfo?id=${params.id}`,
         method: "get",
     });
@@ -26,7 +26,7 @@ const getAllStationSvgInfo = (params) => {
 // 获取升压站svg图片数据
 const getSvgData = (params) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/boost_station/svg?id=${params.id}`,
         method: "get",
     });
@@ -34,7 +34,7 @@ const getSvgData = (params) => {
 // 获取矩阵页面光伏二级页左侧栏数据
 const getStationInfoData = () => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/station/pv_info`,
         method: "get",
     });
@@ -42,7 +42,7 @@ const getStationInfoData = () => {
 // 获取矩阵页面光伏二级页整体数据
 const getAllPvStationData = (params) => {
     return request({
-        baseURL:process.env.VUE_APP_ADAPTERURL,
+        baseURL: process.env.VUE_APP_ADAPTERURL,
         url: `/ts/latest?thingType=windturbine&thingId=${params.id}&uniformCodes=${params.codes}`,
         method: "get",
     });
@@ -50,7 +50,7 @@ const getAllPvStationData = (params) => {
 // 获取矩阵页面光伏二级页echarts数据
 const getAllPvHistoryData = (params) => {
     return request({
-        baseURL:process.env.VUE_APP_ADAPTERURL,
+        baseURL: process.env.VUE_APP_ADAPTERURL,
         url: `/ts/history/snap?thingType=windturbine&thingId=${params.id}&uniformCode=${params.code}&startTs=${params.startTime}&endTs=${params.endTime}&interval=${params.interval}`,
         method: "get",
     });
@@ -59,7 +59,7 @@ const getAllPvHistoryData = (params) => {
 // 标题栏数据
 const stationOverview = () => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/station/overview`,
         method: "get",
     });
@@ -67,7 +67,7 @@ const stationOverview = () => {
 //获取报警数据
 const alarmFault = () => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/alarm/fault`,
         method: "get",
     });
@@ -75,7 +75,7 @@ const alarmFault = () => {
 //获取推荐风机信息
 const recommendation = () => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/windturbine/recommendation`,
         method: "get",
     });
@@ -83,16 +83,16 @@ const recommendation = () => {
 //登陆
 const login = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/user/login`,
         method: "post",
-        data:data,
+        data: data,
     });
 };
 //获取场站
 const getStation = () => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/station/info`,
         method: "get",
     });
@@ -100,7 +100,7 @@ const getStation = () => {
 //获取AGC场站
 const getAGCStation = () => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/station/agc`,
         method: "get",
     });
@@ -108,15 +108,15 @@ const getAGCStation = () => {
 //刷新报警信息
 const getSnap = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_SHARDINGURL,
-        url: `/alarm/snap/page?pagenum=${data.pagenum}&pagesize=${data.pagesize}&category1=${data.category1}&isopened=${data.isopened}&starttime=${data.starttime}&endtime=${data.endtime}&windturbineId=${data.windturbineId?data.windturbineId:''}`,
+        baseURL: process.env.VUE_APP_SHARDINGURL,
+        url: `/alarm/snap/page?pagenum=${data.pagenum}&pagesize=${data.pagesize}&category1=${data.category1}&isopened=${data.isopened}&starttime=${data.starttime}&endtime=${data.endtime}&windturbineId=${data.windturbineId ? data.windturbineId : ''}`,
         method: "get",
     });
 };
 //数据刷新
 const refreshData = (keys) => {
     return request({
-        baseURL:process.env.VUE_APP_ADAPTERURL,
+        baseURL: process.env.VUE_APP_ADAPTERURL,
         url: `/ts/latest?keys=${keys}`,
         method: "get",
     });
@@ -124,124 +124,124 @@ const refreshData = (keys) => {
 //风机控制
 const windturbControl = (pairs) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/control/`,
         method: "post",
-        data:pairs
+        data: pairs
     });
 };
 //风机控制
 const windturbControlLock = (pairs) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/control/lock`,
         method: "post",
-        data:pairs
+        data: pairs
     });
 };
 //获取风机详情页面数据
 const nitWinturbineBaseData = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_ADAPTERURL,
+        baseURL: process.env.VUE_APP_ADAPTERURL,
         url: `/ts/latest?thingType=${data.thingType}&thingId=${data.thingId}&uniformCodes=${data.uniformCodes}`,
         method: "get",
     });
 };
 const getOverview = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/windturbine/overview`,
         method: "get",
     });
 };
 const sendWarning = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/alarm/confirm?snapID=${data.snapID}&faultID=${data.faultID}&userName=${data.userName}`,
         method: "get",
     });
 };
 const sendRecommend = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `api/voice-control/addvoicetask`,
         method: "post",
-        data:data
+        data: data
     });
 };
 const getPower = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_ADAPTERURL,
+        baseURL: process.env.VUE_APP_ADAPTERURL,
         url: `/ts/history/snap?tagName=${data.tagName}&startTs=${data.startTs}&endTs=${data.endTs}&interval=${data.interval}`,
         method: "get",
     });
 };
 const getOriginalPower = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_ADAPTERURL,
+        baseURL: process.env.VUE_APP_ADAPTERURL,
         url: `/ts/history/raw?tagName=${data.tagName}&startTs=${data.startTs}&endTs=${data.endTs}`,
         method: "get",
     });
 };
 const getWindturbinePower = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_ADAPTERURL,
+        baseURL: process.env.VUE_APP_ADAPTERURL,
         url: `/ts/history/snap?thingId=${data.thingId}&uniformCode=${data.uniformCode}&startTs=${data.startTs}&endTs=${data.endTs}&thingType=${data.thingType}&interval=${data.interval}`,
         method: "get",
     });
 };
 const getOriginalWindturbinePower = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_ADAPTERURL,
+        baseURL: process.env.VUE_APP_ADAPTERURL,
         url: `/ts/history/raw?thingId=${data.thingId}&uniformCode=${data.uniformCode}&startTs=${data.startTs}&endTs=${data.endTs}&thingType=${data.thingType}`,
         method: "get",
     });
 };
-const getWindWarning = (data,pageIndex,pageSize) => {
+const getWindWarning = (data, pageIndex, pageSize) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/alarm/real-time-alarm?objectId=${data}&pageIndex=${pageIndex}&pageSize=${pageSize}`,
         method: "get"
     });
 };
-const getHealthDate=(stid,wtid)=>{
+const getHealthDate = (stid, wtid) => {
     return request({
-        baseURL:process.env.VUE_APP_WARNING,
-        url:`/alarm/statistic?stId=${stid}&wtId=${wtid}`,
-        method:"get"
+        baseURL: process.env.VUE_APP_WARNING,
+        url: `/alarm/statistic?stId=${stid}&wtId=${wtid}`,
+        method: "get"
     })
 }
-const getDetial=(data)=>{
+const getDetial = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
-        url:`/api/windturbine/${data}`,
-        method:"get"
+        baseURL: process.env.VUE_APP_API,
+        url: `/api/windturbine/${data}`,
+        method: "get"
     })
 }
-const getWarning=(data,wtid,pt)=>{
+const getWarning = (data, wtid, pt) => {
     return request({
-        baseURL:process.env.VUE_APP_WARNING,
-        url:`/alarm/list?stId=${data}&wtId=${wtid}&widget=${pt}`,
-        method:"get"
+        baseURL: process.env.VUE_APP_WARNING,
+        url: `/alarm/list?stId=${data}&wtId=${wtid}&widget=${pt}`,
+        method: "get"
     })
 }
-const getCustomerLock=()=>{
+const getCustomerLock = () => {
     return request({
         baseURL: process.env.VUE_APP_API,
-        url:`/api/windturbine/customer-lock`,
-        method:"get"
+        url: `/api/windturbine/customer-lock`,
+        method: "get"
     })
 }
 const controlRecord = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/control-record/search?stationId=${data.stationId}&userName=${data.userName}&windturbineId=${data.windturbineId}&startTime=${data.startTime}&endTime=${data.endTime}&pageSize=${data.pageSize}&pageIndex=${data.pageIndex}`,
         method: "get",
     });
 };
 const getLatest = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_ADAPTERURL,
+        baseURL: process.env.VUE_APP_ADAPTERURL,
         url: `/ts/latest?keys=${data}`,
         method: "get",
     });
@@ -249,14 +249,14 @@ const getLatest = (data) => {
 //获取智能模式下场站
 const getControlType = () => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/station/status`,
         method: "get",
     });
 };
 const uodateControlType = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/station/status/update?stationid=${data.stationid}&type=${data.type}&userName=${data.userName}`,
         method: "get",
     });
@@ -264,14 +264,14 @@ const uodateControlType = (data) => {
 //获取UniformCodes数据
 const getUniformCodes = () => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/windturbine/uniform-code`,
         method: "get",
     });
 };
 const getBoostStation = () => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/station/boost-station`,
         method: "get",
     });
@@ -279,22 +279,22 @@ const getBoostStation = () => {
 //获取风机code名称
 const getWindturbineFdc = () => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/windturbine/fdc`,
         method: "get",
     });
 };
 const getWindturbineWarning = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_SHARDINGURL,
-        url: `/alarm/history/page?pagenum=${data.pagenum}&pagesize=${data.pagesize}&windturbineid=${data.windturbineid?data.windturbineid:''}&starttime=${data.starttime}&endtime=${data.endtime}&keyword=${data.keyword?data.keyword:''}&stationid=${data.stationid?data.stationid:''}&category1=${data.category1?data.category1:''}`,
+        baseURL: process.env.VUE_APP_SHARDINGURL,
+        url: `/alarm/history/page?pagenum=${data.pagenum}&pagesize=${data.pagesize}&windturbineid=${data.windturbineid ? data.windturbineid : ''}&starttime=${data.starttime}&endtime=${data.endtime}&keyword=${data.keyword ? data.keyword : ''}&stationid=${data.stationid ? data.stationid : ''}&category1=${data.category1 ? data.category1 : ''}`,
         method: "get",
     });
 };
 //获取报警历史数据
 const getFaultHistory = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_SHARDINGURL,
+        baseURL: process.env.VUE_APP_SHARDINGURL,
         url: `/fault/history/listpage?pagenum=${data.pageIndex}&pagesize=${data.pageSize}&stationid=${data.stationid}&keyword=${data.keyword}&starttime=${data.startTime}&endtime=${data.endTime}`,
         method: "get",
     });
@@ -302,7 +302,7 @@ const getFaultHistory = (data) => {
 
 const stationCompared = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/station/compared?models=${data}`,
         method: "get",
     });
@@ -310,7 +310,7 @@ const stationCompared = (data) => {
 //温度矩阵
 const temperatureInfo = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/windturbine/temperature-info?id=${data.id}&status=${data.status}&pagenum=${data.pagenum}&pagesize=${data.pagesize}`,
         method: "get",
     });
@@ -318,7 +318,7 @@ const temperatureInfo = (data) => {
 //获取风机故障
 const alarmSnap = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/alarm/alarm-snap?windturbineId=${data.windturbineId}`,
         method: "get",
     });
@@ -327,7 +327,7 @@ const alarmSnap = (data) => {
 //预警分析
 const analysisDetail = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_WARNING,
+        baseURL: process.env.VUE_APP_WARNING,
         url: `/analysis/detail?station=${data.station}&startTs=${data.startTs}&endTs=${data.endTs}&interval=${data.interval}&wtId=${data.wtId}&name=${data.name}`,
         method: "get",
     });
@@ -335,7 +335,7 @@ const analysisDetail = (data) => {
 //预警分析
 const alarmCountQuery = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_WARNING,
+        baseURL: process.env.VUE_APP_WARNING,
         url: `/alarm/count/query/new2?stationid=${data.stationid}&startdate=${data.startdate}&enddate=${data.enddate}`,
         method: "get",
     });
@@ -343,7 +343,7 @@ const alarmCountQuery = (data) => {
 //获取风场机型
 const getStationModels = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/station/models?stationid=${data.stationid}`,
         method: "get",
     });
@@ -351,7 +351,7 @@ const getStationModels = (data) => {
 //获取设置查询
 const getSettings = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/settings/recommendation?stationId=${data.stationId}&modelId=${data.modelId}`,
         method: "get",
     });
@@ -359,16 +359,16 @@ const getSettings = (data) => {
 //修改设置
 const updateSettings = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/settings/recommendation`,
         method: "post",
-        data:data
+        data: data
     });
 };
 //状态时间查询
 const statusTime = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/windturbine/status-time?stationId=${data.stationid}&startTs=${data.startTs}&endTs=${data.endTs}`,
         method: "get",
     });
@@ -377,7 +377,7 @@ const statusTime = (data) => {
 //推荐记录查询
 const recommended = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `control-record/recommended?pagesize=${data.pagesize}&pagenum=${data.pagenum}&stationid=${data.stationid}&windturbineid=${data.windturbineid}`,
         method: "get",
     });
@@ -386,7 +386,7 @@ const recommended = (data) => {
 //状态变化查询
 const statusChange = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/windturbine/status?startTs=${data.startTs}&endTs=${data.endTs}&pagesize=${data.pagesize}&pagenum=${data.pagenum}&windturbineId=${data.windturbineid}`,
         method: "get",
     });
@@ -395,7 +395,7 @@ const statusChange = (data) => {
 //恢复默认设置
 const returnSetting = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_API,
+        baseURL: process.env.VUE_APP_API,
         url: `/api/settings/recommendation/recover?stationId=${data.stationId}&modelId=${data.modelId}`,
         method: "get",
     });
@@ -422,11 +422,20 @@ const costumeSetting = (data) => {
 //刷新报警信息
 const getAlarmSnap = (data) => {
     return request({
-        baseURL:process.env.VUE_APP_SHARDINGURL,
+        baseURL: process.env.VUE_APP_SHARDINGURL,
         url: `/alarm/snap?stationid=${data.stationid}&category1=${data.category1}&windturbineid=${data.windturbineid}&isopened=${data.isopened}`,
         method: "get",
     });
 };
+
+//刷新报警信息
+const getEvaluationData = (id) => {
+    return request({
+        baseURL: process.env.VUE_APP_API,
+        url: `/control-record/evaluation?id=${id || ""}`,
+        method: "get",
+    });
+};
 export default {
     login,
     getStation,
@@ -482,4 +491,5 @@ export default {
     statusChange,
     returnSetting,
     getAlarmSnap,
+    getEvaluationData
 };

+ 293 - 11
src/components/search/action.vue

@@ -69,6 +69,7 @@
                   fontSize: '12px',
                   'border-bottom': '1px solid #000000',
                 }"
+                @cell-dblclick="cellDbClick"
               >
                 <el-table-column
                   prop="time"
@@ -117,12 +118,80 @@
         </div>
       </div>
     </div>
+    <el-dialog
+      class="dialogs"
+      custom-class="currentBorder"
+      width="70%"
+      top="50px"
+      :show-close="true"
+      append-to-body
+      v-model="showStartDialog"
+    >
+      <div id="chart" style="width: 100%; height: 500px" />
+      <el-card class="otherContentBox" v-if="otherContentInfo.success">
+        <el-descriptions title="控制评分">
+          <el-descriptions-item label="控制时间">{{
+            otherContentInfo.operationRecordTs || "---"
+          }}</el-descriptions-item>
+          <el-descriptions-item label="并网开始时间">{{
+            otherContentInfo.onLineStartTs || "---"
+          }}</el-descriptions-item>
+          <el-descriptions-item label="并网结束时间">{{
+            otherContentInfo.onLineStartTs || "---"
+          }}</el-descriptions-item>
+          <el-descriptions-item label="并网时长">
+            {{ otherContentInfo.onLineDuration || "---" }}
+          </el-descriptions-item>
+          <el-descriptions-item label="并网期间发电量">{{
+            otherContentInfo.onLinePowerGeneration
+          }}</el-descriptions-item>
+          <el-descriptions-item label="单位时间内发电量">{{
+            otherContentInfo.powerGenerationPerHour
+          }}</el-descriptions-item>
+          <el-descriptions-item label="并网期间耗电量">{{
+            otherContentInfo.powerConsumption
+          }}</el-descriptions-item>
+          <!-- <el-descriptions-item label="风能利用百分比">{{
+            otherContentInfo.windUseRate
+          }}</el-descriptions-item> -->
+          <el-descriptions-item label="评分">
+            <el-rate
+              style="display: inline-block"
+              v-model="otherContentInfo.score"
+              allow-half
+              disabled
+            />
+            <span>{{ otherContentInfo.score * 2 }}&nbsp;/&nbsp;10&nbsp;分</span>
+          </el-descriptions-item>
+        </el-descriptions>
+      </el-card>
+      <el-card class="otherContentBox" v-else>
+        <div
+          style="
+            width: 100%;
+            height: 140px;
+            color: #eee;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            font-size: 18px;
+          "
+        >
+          <el-empty
+            class="empSvg"
+            :image-size="100"
+            description="暂无控制控制评分"
+          />
+        </div>
+      </el-card>
+    </el-dialog>
   </el-dialog>
 </template>
 
 <script>
 import dayjs from "dayjs";
 import api from "api/index";
+import * as echarts from "echarts";
 export default {
   props: {},
   updated() {
@@ -174,6 +243,11 @@ export default {
         "风机操作与风机状态不符",
         "需要登录",
       ],
+      showStartDialog: false,
+      rateValue: 4.5,
+      otherContentInfo: {
+        score: 0,
+      },
     };
   },
   methods: {
@@ -196,11 +270,11 @@ export default {
       stationList.forEach((item, index) => {
         if (item.type === 1) {
           let obj = {};
-        obj.id = index + 1;
-        obj.code = item.name;
-        obj.stationId = item.id;
-        obj.children = [];
-        this.showData[0].children.push(obj);
+          obj.id = index + 1;
+          obj.code = item.name;
+          obj.stationId = item.id;
+          obj.children = [];
+          this.showData[0].children.push(obj);
         }
       });
       this.datas = this.$store.state.windturbinelist
@@ -252,7 +326,7 @@ export default {
     },
     opened() {
       let date = new Date();
-      this.timeValue[0] = date.getTime() - 28800000;
+      this.timeValue[0] = date.getTime() - 28800000 * 300;
       this.timeValue[1] = date.getTime() + 3600000;
       this.dataDeal();
       this.getControlRecord();
@@ -264,11 +338,12 @@ export default {
             ? this.chooseStation.stationId
             : "",
           userName: "",
-          windturbineId: String(this.chooseStation?.id)?.length<2
-            ? ""
-            : this.chooseStation.stationId
-            ? this.chooseStation.windturbineId
-            : "",
+          windturbineId:
+            String(this.chooseStation?.id)?.length < 2
+              ? ""
+              : this.chooseStation.stationId
+              ? this.chooseStation.windturbineId
+              : "",
           startTime: dayjs(this.timeValue[0]).format("YYYY/MM/DD HH:mm:ss"),
           endTime: dayjs(this.timeValue[1]).format("YYYY/MM/DD HH:mm:ss"),
           pageSize: this.currentPage,
@@ -296,6 +371,178 @@ export default {
           }
         });
     },
+
+    cellDbClick(row) {
+      const controlType = row.controlType || "";
+      if (controlType === "Start") {
+        this.initEcharts(row.id);
+      }
+    },
+
+    initEcharts(id) {
+      api.getEvaluationData(id).then((res) => {
+        var data = res.data.datas;
+        var statistics = res.data.statistics;
+        var marks = new Array();
+        if (Array.isArray(statistics.mark)) {
+          for (var j = 0; j < statistics.mark.length; ++j) {
+            marks.push({ xAxis: statistics.mark[j] });
+          }
+        }
+
+        var ser = new Array();
+        var isFirst = true;
+        for (var i = 0; i < data.length; ++i) {
+          var s = {
+            data: data[i].values.map((item) => {
+              return item.value;
+            }),
+            type: "line",
+            name: data[i].name,
+            symbol: "none",
+            yAxisIndex: /功率/g.test(data[i].name) ? 1 : 0,
+          };
+          if (isFirst) {
+            s.markLine = {
+              symbol: ["none", "none"],
+              label: { show: false },
+              data: marks,
+            };
+          }
+          ser.push(s);
+          isFirst = false;
+        }
+
+        var option = {
+          tooltip: {
+            trigger: "axis",
+          },
+          legend: {
+            show: true,
+            textStyle: {
+              color: "#eee", //字体颜色
+            },
+            data: data.map((item) => {
+              return item.name;
+            }),
+          },
+          xAxis: {
+            type: "category",
+            data: data[0].values.map((item) => {
+              return new Date(item.ts).toLocaleString();
+            }),
+            axisLabel: {
+              show: true,
+              textStyle: {
+                color: "#eee",
+              },
+            },
+          },
+          yAxis: [
+            {
+              type: "value",
+              name: "风速(m/s)",
+              nameTextStyle: {
+                color: "#fff",
+              },
+              axisLabel: {
+                textStyle: {
+                  color: "#eee",
+                },
+              },
+            },
+            {
+              type: "value",
+              name: "功率(kwh)",
+              nameTextStyle: {
+                color: "#fff",
+              },
+              axisLabel: {
+                textStyle: {
+                  color: "#eee",
+                },
+              },
+            },
+          ],
+          dataZoom: [
+            {
+              type: "inside",
+              start: 0,
+              end: 100,
+            },
+          ],
+          series: ser,
+        };
+
+        if (res.data.statistics.success) {
+          this.otherContentInfo = {
+            operationRecordTs: this.formatDate(
+              new Date(res.data.statistics.allTime.operationRecordTs)
+            ),
+            onLineStartTs: this.formatDate(
+              new Date(res.data.statistics.allTime.onlineStartTs)
+            ),
+            onLineEndTs: this.formatDate(
+              new Date(res.data.statistics.allTime.onlineEndTs)
+            ),
+            onLineDuration: `${res.data.statistics.allTime.onLineDuration.toFixed(
+              2
+            )} h`,
+            onLinePowerGeneration: `${res.data.statistics.onLinePowerGeneration.toFixed(
+              2
+            )} kwh`,
+            powerGenerationPerHour: `${res.data.statistics.powerGenerationPerHour.toFixed(
+              2
+            )} kwh`,
+            powerConsumption: `${res.data.statistics.powerConsumption.toFixed(
+              2
+            )} kwh`,
+            windUseRate: `${res.data.statistics.windUseRate.toFixed(2)} %`,
+            score: res.data.statistics.score / 2,
+            success: res.data.statistics.success,
+          };
+        } else {
+          this.otherContentInfo = {};
+        }
+
+        this.showStartDialog = true;
+
+        this.$nextTick(() => {
+          let chartDom = document.getElementById("chart");
+          chartDom.innerHTML = "";
+          chartDom?.removeAttribute("_echarts_instance_");
+          let chart = echarts.init(chartDom, null, { renderer: "svg" });
+          chart.setOption(option);
+        });
+      });
+    },
+
+    formatDate(value) {
+      var date = new Date(value);
+      var y = date.getFullYear(),
+        m = date.getMonth() + 1,
+        d = date.getDate(),
+        h = date.getHours(),
+        i = date.getMinutes(),
+        s = date.getSeconds();
+      if (m < 10) {
+        m = "0" + m;
+      }
+      if (d < 10) {
+        d = "0" + d;
+      }
+      if (h < 10) {
+        h = "0" + h;
+      }
+      if (i < 10) {
+        i = "0" + i;
+      }
+      if (s < 10) {
+        s = "0" + s;
+      }
+      var t = y + "-" + m + "-" + d + " " + h + ":" + i + ":" + s;
+      return t;
+    },
   },
   watch: {
     filterText(val) {
@@ -413,4 +660,39 @@ tr {
   display: flex;
   flex-direction: row-reverse;
 }
+</style>
+
+<style lang="less">
+.el-dialog.currentBorder {
+  border: 1px solid #eee;
+}
+
+.el-card.otherContentBox {
+  background: rgb(36, 36, 36);
+
+  .el-descriptions__header {
+    color: #fff;
+  }
+
+  .el-descriptions__cell {
+    white-space: nowrap;
+  }
+
+  .el-descriptions__body {
+    color: #eee;
+    background: rgb(36, 36, 36);
+  }
+
+  .empSvg {
+    .el-empty__image {
+      opacity: 0.9;
+    }
+
+    .el-empty__description {
+      p {
+        color: #eee;
+      }
+    }
+  }
+}
 </style>