Переглянути джерело

全生命周期页面修改

yangxiao 3 роки тому
батько
коміт
5a90883a1d

+ 4 - 4
src/views/allLifeManage/index.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="health">
     <div class="selections mg-b-16">
-      <div class="item" @click="tabSelect(0)" :class="{ active: tabIndex == 0 }">风场功率风速排布图</div>
-      <div class="item" @click="tabSelect(1)" :class="{ active: tabIndex == 1 }">项目功率风速排布图</div>
-      <div class="item" @click="tabSelect(2)" :class="{ active: tabIndex == 2 }">线路功率风速排布图</div>
+      <div class="item" @click="tabSelect(0)" :class="{ active: tabIndex == 0 }">设备采购</div>
+      <div class="item" @click="tabSelect(1)" :class="{ active: tabIndex == 1 }">设备初始化信息</div>
+      <div class="item" @click="tabSelect(2)" :class="{ active: tabIndex == 2 }">设备维护与故障</div>
     </div>
     <div class="curHeight" v-if="tabIndex == 0">
       <Tab1 />
@@ -36,7 +36,7 @@ export default {
   data () {
     const that = this;
     return {
-      tabIndex: 0,
+      tabIndex: 1,
     };
   },
 

+ 75 - 275
src/views/allLifeManage/tab1.vue

@@ -3,338 +3,137 @@
     <div class="query mg-b-8">
       <div class="query-items">
         <div class="query-item">
-          <div class="lable">场:</div>
+          <div class="lable">场:</div>
           <div class="search-input">
-            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="getWtArray">
+            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="(wpId) => { getLine(); }">
               <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
             </el-select>
           </div>
         </div>
         <div class="query-item">
-          <div class="lable">风机:</div>
+          <div class="lable">线路:</div>
           <div class="search-input">
-            <el-select v-model="wtId" clearable placeholder="请选择" popper-class="select">
-              <el-option v-for="item in wtArray" :key="item.id" :value="item.id" :label="item.name" />
+            <el-select v-model="lineId" clearable placeholder="请选择" popper-class="select">
+              <el-option v-for="item in lineArray" :key="item.id" :value="item.id" :label="item.name" />
             </el-select>
           </div>
         </div>
+        <div class="query-item">
+					<div class="lable">日期:</div>
+					<div class="search-input">
+						<el-date-picker v-model="recorddate" type="date"
+							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
+						</el-date-picker>
+					</div>
+				</div>
       </div>
       <div class="query-actions">
-        <button class="btn green" @click="search()">查询</button>
+        <button class="btn green" @click="search">搜索</button>
       </div>
     </div>
-    <div class="df-table">
-      <ComTable height="78vh" :data="tableData"></ComTable>
-    </div>
+    <NormalScatterChart height="650px" :data="chartData" :showLegend="true" />
   </div>
 </template>
 
 <script>
-import ComTable from "@com/coms/table/table.vue";
+import NormalScatterChart from "@com/chart/scatter/normal-scatter-chart.vue";
 export default {
   // 名称
   name: "cutAnalyse",
 
   // 使用组件
   components: {
-    ComTable
+    NormalScatterChart
   },
 
   // 数据
   data () {
-    const that = this;
     return {
+      isAsc: "asc",
       wpArray: [],
+      lineArray: [],
       wpId: "",
-      wtArray: [],
-      wtId: "",
-      tableData: {
-        column: [
-          {
-            name: "风机编号",
-            field: "wtnum",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "所属风电场",
-            field: "ownerwf",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "所属工程",
-            field: "ownerproject",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "所属线路",
-            field: "ownerline",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "编号",
-            field: "wtwfnum",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "编号",
-            field: "wtgridnum",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "供应商",
-            field: "vendor",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "型号",
-            field: "model",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "额定功率",
-            field: "ratedpower",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "额定风速",
-            field: "ratedwinspe",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "额定电压",
-            field: "ratedvoltage",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "额定转速",
-            field: "ratedrev",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "切入风速",
-            field: "cutinwinspe",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "切出风速",
-            field: "cutoutwinspe",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "生存风速",
-            field: "maxwinspe",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "最低温度",
-            field: "lowertemp",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "最高温度",
-            field: "hightemp",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "最低转速",
-            field: "lowerrev",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "最高转速",
-            field: "highrev",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "风轮直径",
-            field: "roterdiameter",
-            is_num: false,
-            is_light: false,
-          },
-          {
-            name: "月大风切入合格率",
-            field: "monthinputbigratio",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "轮毂高度",
-            field: "hubheight",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "出厂日期",
-            field: "releasedate",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "吊装日期",
-            field: "installdate",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "调试日期",
-            field: "testdate",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "投运日期",
-            field: "opdate",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "位置",
-            field: "location",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "风机位置",
-            field: "wflocation",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
-            name: "风机ID",
-            field: "wtid",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          }
-        ],
-        data: [],
-      }
+      lineId:"",
+      wtId: "MG01_01",
+      recorddate:new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
+      chartData: [{
+        title: "风资源分析",
+        value: []
+      }]
     };
   },
 
   // 函数
   methods: {
     // 获取风场
-    getWpArray () {
+    getWp (reGetWp) {
       let that = this;
       that.API.requestData({
         method: "GET",
         subUrl: "powercompare/windfarmAjax",
         success (res) {
           that.wpArray = res.data;
-          that.wpId = that.wpId || res.data[0].id;
-          that.getWtArray(that.wpId, true);
+          that.wpId = res.data[0].id;
+          that.getLine();
         }
       });
     },
 
-    // 获取风机
-    getWtArray (wpId, keepRequest) {
+    // 获取线路
+    getLine(){
       let that = this;
-      if (wpId) {
-        that.API.requestData({
-          method: "GET",
-          subUrl: "powercompare/windturbineAjax",
-          data: {
-            wpId
-          },
-          success (res) {
-            that.wtArray = res.data;
-            const findRes = res.data.some(ele => {
-              return ele.id === that.wtId;
-            });
-            that.wtId = (findRes ? that.wtId : res.data[0].id);
-            that.getTableData();
-          }
-        });
-      } else {
-        that.wtArray = [];
-        that.wtId = "";
-      }
+      that.API.requestData({
+        method: "GET",
+        subUrl: "powercompare/lineWpIdAjax",
+        data:{
+          wpId: that.wpId
+        },
+        success (res) {
+          that.lineArray = res.data;
+          that.lineId = res.data[0].id;
+          that.getChartData();
+        }
+      });
     },
 
-    getTableData () {
+    // 获取图表数据
+    getChartData () {
       let that = this;
-      if (!that.wpId || !that.wtId) {
-        that.BASE.showMsg({
-          msg: "场站与日期不可为空"
-        });
-      } else {
-        that.API.requestData({
-          method: "GET",
-          baseURL:"http://192.168.10.18:9988/",
-          subUrl: "windturbine/list",
-          data: {
-            wtId:that.wtId
-          },
-          success (res) {
-            res.data.forEach(ele => {
-              ele.installdate = new Date(ele.installdate).formatDate("yyyy-MM-dd hh:mm:ss");
-              ele.opdate = new Date(ele.opdate).formatDate("yyyy-MM-dd hh:mm:ss");
-              ele.releasedate = new Date(ele.releasedate).formatDate("yyyy-MM-dd hh:mm:ss");
-              ele.testdate = new Date(ele.testdate).formatDate("yyyy-MM-dd hh:mm:ss");
-            });
-            that.tableData.data = res.data;
-          }
-        });
-      }
-
+      that.API.requestData({
+        method: "POST",
+        subUrl: "scatter/scatterAjax",
+        data: {
+          wpId: that.wpId,
+          pjId: "",
+          lnId: that.lineId,
+          year: (that.recorddate ? new Date(that.recorddate).getFullYear() : ""),
+          month: (that.recorddate ? (new Date(that.recorddate).getMonth() + 1) : ""),
+        },
+        success (res) {
+          let chartData = [{
+            title: "风资源分析",
+            value: (res.data || [])
+          }];
+          that.$nextTick(()=>{
+            that.chartData = chartData;
+          });
+        }
+      });
     },
 
-
     search () {
-      this.getTableData();
+      if (!this.wpId || !this.lineId) {
+        this.BASE.showMsg({
+          msg: '场站与线路为必选项'
+        });
+      } else {
+        this.getChartData();
+      }
     }
   },
 
   created () {
-    this.getWpArray();
+    this.getWp();
   },
 
   mounted () { },
@@ -365,6 +164,7 @@ export default {
     overflow: auto;
     flex-grow: 1;
     margin-top: 1.481vh;
+    height: 30vh;
 
     &:before {
       content: '';
@@ -381,4 +181,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 273 - 75
src/views/allLifeManage/tab2.vue

@@ -3,137 +3,336 @@
     <div class="query mg-b-8">
       <div class="query-items">
         <div class="query-item">
-          <div class="lable">场:</div>
+          <div class="lable">场:</div>
           <div class="search-input">
-            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="(wpId) => { getProject(); }">
+            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="getWtArray">
               <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
             </el-select>
           </div>
         </div>
         <div class="query-item">
-          <div class="lable">项目:</div>
+          <div class="lable">风机:</div>
           <div class="search-input">
-            <el-select v-model="projectId" clearable placeholder="请选择" popper-class="select">
-              <el-option v-for="item in projectArray" :key="item.id" :value="item.id" :label="item.name" />
+            <el-select v-model="wtId" clearable placeholder="请选择" popper-class="select">
+              <el-option v-for="item in wtArray" :key="item.id" :value="item.id" :label="item.name" />
             </el-select>
           </div>
         </div>
-        <div class="query-item">
-					<div class="lable">日期:</div>
-					<div class="search-input">
-						<el-date-picker v-model="recorddate" type="date"
-							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
-						</el-date-picker>
-					</div>
-				</div>
       </div>
       <div class="query-actions">
-        <button class="btn green" @click="search">搜索</button>
+        <button class="btn green" @click="search()">查询</button>
       </div>
     </div>
-    <NormalScatterChart height="650px" :data="chartData" :showLegend="true" />
+    <div class="df-table">
+      <ComTable height="78vh" :data="tableData"></ComTable>
+    </div>
   </div>
 </template>
 
 <script>
-import NormalScatterChart from "@com/chart/scatter/normal-scatter-chart.vue";
+import ComTable from "@com/coms/table/table.vue";
 export default {
   // 名称
   name: "cutAnalyse",
 
   // 使用组件
   components: {
-    NormalScatterChart
+    ComTable
   },
 
   // 数据
   data () {
+    const that = this;
     return {
-      isAsc: "asc",
       wpArray: [],
-      projectArray: [],
       wpId: "",
-      projectId:"",
-      wtId: "MG01_01",
-      recorddate:new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
-      chartData: [{
-        title: "风资源分析",
-        value: []
-      }]
+      wtArray: [],
+      wtId: "",
+      tableData: {
+        column: [
+          // {
+          //   name: "风机编号",
+          //   field: "wtnum",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          // {
+          //   name: "所属风电场",
+          //   field: "ownerwf",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          // {
+          //   name: "所属工程",
+          //   field: "ownerproject",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          // {
+          //   name: "所属线路",
+          //   field: "ownerline",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          // {
+          //   name: "编号",
+          //   field: "wtwfnum",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          // {
+          //   name: "编号",
+          //   field: "wtgridnum",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          {
+            name: "供应商",
+            field: "vendor",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "型号",
+            field: "model",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "额定功率",
+            field: "ratedpower",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "额定风速",
+            field: "ratedwinspe",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "额定电压",
+            field: "ratedvoltage",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "额定转速",
+            field: "ratedrev",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "切入风速",
+            field: "cutinwinspe",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "切出风速",
+            field: "cutoutwinspe",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "生存风速",
+            field: "maxwinspe",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          // {
+          //   name: "最低温度",
+          //   field: "lowertemp",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          // {
+          //   name: "最高温度",
+          //   field: "hightemp",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          // {
+          //   name: "最低转速",
+          //   field: "lowerrev",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          // {
+          //   name: "最高转速",
+          //   field: "highrev",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          // {
+          //   name: "风轮直径",
+          //   field: "roterdiameter",
+          //   is_num: false,
+          //   is_light: false,
+          // },
+          // {
+          //   name: "月大风切入合格率",
+          //   field: "monthinputbigratio",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          // {
+          //   name: "轮毂高度",
+          //   field: "hubheight",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          // {
+          //   name: "出厂日期",
+          //   field: "releasedate",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          {
+            name: "吊装日期",
+            field: "installdate",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          // {
+          //   name: "调试日期",
+          //   field: "testdate",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          // {
+          //   name: "投运日期",
+          //   field: "opdate",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          // {
+          //   name: "位置",
+          //   field: "location",
+          //   is_num: false,
+          //   is_light: false,
+          //   sortable: true
+          // },
+          {
+            name: "风机位置",
+            field: "wflocation",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "风机ID",
+            field: "wtid",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          }
+        ],
+        data: [],
+      }
     };
   },
 
   // 函数
   methods: {
     // 获取风场
-    getWp (reGetWp) {
+    getWpArray () {
       let that = this;
       that.API.requestData({
         method: "GET",
         subUrl: "powercompare/windfarmAjax",
         success (res) {
           that.wpArray = res.data;
-          that.wpId = res.data[0].id;
-          that.getProject();
+          that.wpId = that.wpId || res.data[0].id;
+          that.getWtArray(that.wpId, true);
         }
       });
     },
 
-    // 获取期数
-    getProject(){
+    // 获取风机
+    getWtArray (wpId, keepRequest) {
       let that = this;
-      that.API.requestData({
-        method: "GET",
-        subUrl: "powercompare/projectAjax",
-        data:{
-          wpIds: that.wpId
-        },
-        success (res) {
-          that.projectArray = res.data;
-          that.projectId = res.data[0].id;
-          that.getChartData();
-        }
-      });
+      if (wpId) {
+        that.API.requestData({
+          method: "GET",
+          subUrl: "powercompare/windturbineAjax",
+          data: {
+            wpId
+          },
+          success (res) {
+            that.wtArray = res.data;
+            const findRes = res.data.some(ele => {
+              return ele.id === that.wtId;
+            });
+            that.wtId = (findRes ? that.wtId : res.data[0].id);
+            that.getTableData();
+          }
+        });
+      } else {
+        that.wtArray = [];
+        that.wtId = "";
+      }
     },
 
-    // 获取图表数据
-    getChartData () {
+    getTableData () {
       let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "scatter/scatterAjax",
-        data: {
-          wpId: that.wpId,
-          pjId: that.projectId,
-          lnId: "",
-          year: (that.recorddate ? new Date(that.recorddate).getFullYear() : ""),
-          month: (that.recorddate ? (new Date(that.recorddate).getMonth() + 1) : ""),
-        },
-        success (res) {
-          let chartData = [{
-            title: "风资源分析",
-            value: (res.data || [])
-          }];
-          that.$nextTick(()=>{
-            that.chartData = chartData;
-          });
-        }
-      });
-    },
-
-    search () {
-      if (!this.wpId || !this.projectId) {
-        this.BASE.showMsg({
-          msg: '场站与项目为必选项'
+      if (!that.wpId) {
+        that.BASE.showMsg({
+          msg: "场站与日期不可为空"
         });
       } else {
-        this.getChartData();
+        that.API.requestData({
+          method: "GET",
+          baseURL:"http://192.168.10.18:9988/",
+          subUrl: "windturbine/list",
+          data: {
+            wtid:that.wtId
+          },
+          success (res) {
+            res.data.forEach(ele => {
+              ele.installdate = new Date(ele.installdate).formatDate("yyyy-MM-dd hh:mm:ss");
+              ele.opdate = new Date(ele.opdate).formatDate("yyyy-MM-dd hh:mm:ss");
+              ele.releasedate = new Date(ele.releasedate).formatDate("yyyy-MM-dd hh:mm:ss");
+              ele.testdate = new Date(ele.testdate).formatDate("yyyy-MM-dd hh:mm:ss");
+            });
+            that.tableData.data = res.data;
+          }
+        });
       }
+    },
+
+    search () {
+      this.getTableData();
     }
   },
 
   created () {
-    this.getWp();
+    this.getWpArray();
   },
 
   mounted () { },
@@ -164,7 +363,6 @@ export default {
     overflow: auto;
     flex-grow: 1;
     margin-top: 1.481vh;
-    height: 30vh;
 
     &:before {
       content: '';
@@ -181,4 +379,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 165 - 74
src/views/allLifeManage/tab3.vue

@@ -3,137 +3,229 @@
     <div class="query mg-b-8">
       <div class="query-items">
         <div class="query-item">
-          <div class="lable">场:</div>
+          <div class="lable">场:</div>
           <div class="search-input">
-            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="(wpId) => { getLine(); }">
+            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="getWtArray">
               <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
             </el-select>
           </div>
         </div>
         <div class="query-item">
-          <div class="lable">线路:</div>
+          <div class="lable">风机:</div>
           <div class="search-input">
-            <el-select v-model="lineId" clearable placeholder="请选择" popper-class="select">
-              <el-option v-for="item in lineArray" :key="item.id" :value="item.id" :label="item.name" />
+            <el-select v-model="wtId" clearable placeholder="请选择" popper-class="select">
+              <el-option v-for="item in wtArray" :key="item.id" :value="item.id" :label="item.name" />
             </el-select>
           </div>
         </div>
         <div class="query-item">
-					<div class="lable">日期:</div>
-					<div class="search-input">
-						<el-date-picker v-model="recorddate" type="date"
-							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
-						</el-date-picker>
-					</div>
-				</div>
+          <div class="lable">开始日期:</div>
+          <div class="search-input">
+            <el-date-picker v-model="starttime" type="date" value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
+            </el-date-picker>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">结束日期:</div>
+          <div class="search-input">
+            <el-date-picker v-model="endtime" type="date" value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
+            </el-date-picker>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">类型:</div>
+          <div class="search-input">
+            <el-select v-model="type" clearable placeholder="请选择" popper-class="select">
+              <el-option v-for="item in typeArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
       </div>
       <div class="query-actions">
-        <button class="btn green" @click="search">搜索</button>
+        <button class="btn green" @click="search()">查询</button>
       </div>
     </div>
-    <NormalScatterChart height="650px" :data="chartData" :showLegend="true" />
+    <div class="df-table">
+      <ComTable height="78vh" :data="tableData"></ComTable>
+    </div>
   </div>
 </template>
 
 <script>
-import NormalScatterChart from "@com/chart/scatter/normal-scatter-chart.vue";
+import ComTable from "@com/coms/table/table.vue";
 export default {
   // 名称
   name: "cutAnalyse",
 
   // 使用组件
   components: {
-    NormalScatterChart
+    ComTable
   },
 
   // 数据
   data () {
+    const that = this;
     return {
-      isAsc: "asc",
       wpArray: [],
-      lineArray: [],
       wpId: "",
-      lineId:"",
-      wtId: "MG01_01",
-      recorddate:new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
-      chartData: [{
-        title: "风资源分析",
-        value: []
-      }]
+      wtArray: [],
+      wtId: "",
+      type: "异动",
+      typeArray:[{
+        id: "检修",
+        label: "检修",
+        value: "检修"
+      }, {
+        id: "异动",
+        label: "异动",
+        value: "异动"
+      }, {
+        id: "故障",
+        label: "故障",
+        value: "故障"
+      }],
+      starttime: new Date().formatDate("yyyy-MM") + "-01",
+      endtime: new Date().formatDate("yyyy-MM-dd"),
+      tableData: {
+        column: [
+          {
+            name: "检修负责人",
+            field: "leader",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "检修类型",
+            field: "type",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "风机编号",
+            field: "wtnum",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "开始时间",
+            field: "starttime",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "结束时间",
+            field: "endtime",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "检修原因",
+            field: "problem",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "检修方式",
+            field: "solveway",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "设备唯一编号",
+            field: "eqnum",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          }
+        ],
+        data: [],
+      }
     };
   },
 
   // 函数
   methods: {
     // 获取风场
-    getWp (reGetWp) {
+    getWpArray () {
       let that = this;
       that.API.requestData({
         method: "GET",
         subUrl: "powercompare/windfarmAjax",
         success (res) {
           that.wpArray = res.data;
-          that.wpId = res.data[0].id;
-          that.getLine();
+          that.wpId = that.wpId || res.data[0].id;
+          that.getWtArray(that.wpId, true);
         }
       });
     },
 
-    // 获取线路
-    getLine(){
+    // 获取风机
+    getWtArray (wpId, keepRequest) {
       let that = this;
-      that.API.requestData({
-        method: "GET",
-        subUrl: "powercompare/lineWpIdAjax",
-        data:{
-          wpId: that.wpId
-        },
-        success (res) {
-          that.lineArray = res.data;
-          that.lineId = res.data[0].id;
-          that.getChartData();
-        }
-      });
+      if (wpId) {
+        that.API.requestData({
+          method: "GET",
+          subUrl: "powercompare/windturbineAjax",
+          data: {
+            wpId
+          },
+          success (res) {
+            that.wtArray = res.data;
+            const findRes = res.data.some(ele => {
+              return ele.id === that.wtId;
+            });
+            that.wtId = (findRes ? that.wtId : res.data[0].id);
+            that.getTableData();
+          }
+        });
+      } else {
+        that.wtArray = [];
+        that.wtId = "";
+      }
     },
 
-    // 获取图表数据
-    getChartData () {
+    getTableData () {
       let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "scatter/scatterAjax",
-        data: {
-          wpId: that.wpId,
-          pjId: "",
-          lnId: that.lineId,
-          year: (that.recorddate ? new Date(that.recorddate).getFullYear() : ""),
-          month: (that.recorddate ? (new Date(that.recorddate).getMonth() + 1) : ""),
-        },
-        success (res) {
-          let chartData = [{
-            title: "风资源分析",
-            value: (res.data || [])
-          }];
-          that.$nextTick(()=>{
-            that.chartData = chartData;
-          });
-        }
-      });
-    },
-
-    search () {
-      if (!this.wpId || !this.lineId) {
-        this.BASE.showMsg({
-          msg: '场站与线路为必选项'
+      if (!that.wpId || !that.starttime || !that.endtime) {
+        that.BASE.showMsg({
+          msg: "场站与日期不可为空"
         });
       } else {
-        this.getChartData();
+        that.API.requestData({
+          method: "GET",
+          baseURL:"http://192.168.10.18:9988/",
+          subUrl: "equoperationrecord/list",
+          data: {
+            wtid: that.wtId,
+            starttime: that.starttime,
+            endtime: that.endtime,
+            type: that.type,
+            pagenum:1,
+            pagesize:50000
+          },
+          success (res) {
+            that.tableData.data = res.data.records;
+          }
+        });
       }
+
+    },
+
+
+    search () {
+      this.getTableData();
     }
   },
 
   created () {
-    this.getWp();
+    this.getWpArray();
   },
 
   mounted () { },
@@ -164,7 +256,6 @@ export default {
     overflow: auto;
     flex-grow: 1;
     margin-top: 1.481vh;
-    height: 30vh;
 
     &:before {
       content: '';
@@ -181,4 +272,4 @@ export default {
     }
   }
 }
-</style>
+</style>