|
@@ -1,424 +1,353 @@
|
|
|
<template>
|
|
|
- <el-scrollbar height="92vh">
|
|
|
- <div class="query mg-b-8">
|
|
|
- <div class="query-items">
|
|
|
- <div class="query-item" style="width:200px">
|
|
|
- <div class="lable">场站:</div>
|
|
|
- <div class="search-input">
|
|
|
- <el-select v-model="station" placeholder="请选择" popper-class="select">
|
|
|
- <el-option v-for="item in ChangZhan" :key="item.id" :value="item.id" :label="item.name">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="query-item" style="width:200px">
|
|
|
- <div class="lable">样本类型:</div>
|
|
|
- <div class="search-input">
|
|
|
- <el-select v-model="yblx" placeholder="请选择样本" popper-class="select">
|
|
|
- <el-option v-for="item in yblxArr" :key="item.value" :value="item.value"
|
|
|
- :label="item.label">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="query-item" style="width:200px">
|
|
|
- <div class="lable">模型:</div>
|
|
|
- <div class="search-input">
|
|
|
- <el-select v-model="model" collapse-tags placeholder="请选择"
|
|
|
- popper-class="select">
|
|
|
- <el-option v-for="item in models" :key="item.value" :value="item.value" :label="item.label">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="query-item" style="width:250px">
|
|
|
- <div class="lable">时间间隔:</div>
|
|
|
- <div class="search-input">
|
|
|
- <el-select v-model="interval" collapse-tags clearable placeholder="请选择"
|
|
|
- popper-class="select">
|
|
|
- <el-option v-for="item in intervals" :key="item.value" :value="item.value" :label="item.label">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="query-item">
|
|
|
- <div class="lable">时间:</div>
|
|
|
- <div class="search-input">
|
|
|
- <el-date-picker v-model="time" type="datetimerange" range-separator="至" start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期">
|
|
|
- </el-date-picker>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="query-actions">
|
|
|
- <button class="btn" @click="list">查询</button>
|
|
|
- <button class="btn" @click="dbfx">对比</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <el-row :type="'flex'" class="content">
|
|
|
- <ComTable :data="tableData" height="70vh" v-loading="tableLoading" element-loading-text="拼命加载中"
|
|
|
- element-loading-background="rgba(0, 0, 0, 0.8)"></ComTable>
|
|
|
- </el-row>
|
|
|
- <el-dialog title="数据对比" v-model="dialog" width="90%" top="10vh" custom-class="modal"
|
|
|
- :close-on-click-modal="false" :before-close="onClickDialogClose" class="isvisiable">
|
|
|
- <scatter-line-chart :lineData="scatterLineData.lineData" :data="scatterLineData.data" xTitle="风速"
|
|
|
- yTitle="功率" :height="'70vh'" />
|
|
|
- </el-dialog>
|
|
|
- </el-scrollbar>
|
|
|
+ <el-scrollbar height="92vh">
|
|
|
+ <div class="query mg-b-8">
|
|
|
+ <div class="query-items">
|
|
|
+ <div class="query-item" style="width: 200px">
|
|
|
+ <div class="lable">场站:</div>
|
|
|
+ <div class="search-input">
|
|
|
+ <el-select
|
|
|
+ v-model="station"
|
|
|
+ placeholder="请选择"
|
|
|
+ popper-class="select"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in ChangZhan"
|
|
|
+ :key="item.id"
|
|
|
+ :value="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="query-item" style="width: 200px">
|
|
|
+ <div class="lable">样本类型:</div>
|
|
|
+ <div class="search-input">
|
|
|
+ <el-select
|
|
|
+ v-model="yblx"
|
|
|
+ placeholder="请选择样本"
|
|
|
+ popper-class="select"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in yblxArr"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="query-item" style="width: 200px">
|
|
|
+ <div class="lable">模型:</div>
|
|
|
+ <div class="search-input">
|
|
|
+ <el-select
|
|
|
+ v-model="model"
|
|
|
+ collapse-tags
|
|
|
+ placeholder="请选择"
|
|
|
+ popper-class="select"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in models"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="query-item" style="width: 250px">
|
|
|
+ <div class="lable">时间间隔:</div>
|
|
|
+ <div class="search-input">
|
|
|
+ <el-select
|
|
|
+ v-model="interval"
|
|
|
+ collapse-tags
|
|
|
+ placeholder="请选择"
|
|
|
+ popper-class="select"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in intervals"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="query-item">
|
|
|
+ <div class="lable">时间:</div>
|
|
|
+ <div class="search-input">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="time"
|
|
|
+ type="datetimerange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="query-actions">
|
|
|
+ <button class="btn" @click="list">查询</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-row :type="'flex'" class="content">
|
|
|
+ <ComTable
|
|
|
+ :data="tableData"
|
|
|
+ height="80vh"
|
|
|
+ v-loading="tableLoading"
|
|
|
+ element-loading-text="拼命加载中"
|
|
|
+ element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
|
+ ></ComTable>
|
|
|
+ </el-row>
|
|
|
+ <el-dialog
|
|
|
+ title="数据对比"
|
|
|
+ v-model="dialog"
|
|
|
+ width="70%"
|
|
|
+ top="10vh"
|
|
|
+ custom-class="modal"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :before-close="onClickDialogClose"
|
|
|
+ class="isvisiable"
|
|
|
+ >
|
|
|
+ <scatter-line-chart
|
|
|
+ :data="scatterLineData"
|
|
|
+ :dotName="dotName"
|
|
|
+ :height="'70vh'"
|
|
|
+ />
|
|
|
+ </el-dialog>
|
|
|
+ </el-scrollbar>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import ComTable from "@/components/coms/table/table.vue";
|
|
|
- import ScatterLineChart from "@/components/chart/combination/scatter-line-chart.vue";
|
|
|
- import BASE from "@tools/basicTool.js";
|
|
|
- export default {
|
|
|
- components: {
|
|
|
- ComTable,
|
|
|
- ScatterLineChart,
|
|
|
- },
|
|
|
- data() {
|
|
|
- const that = this;
|
|
|
- return {
|
|
|
- scatterLineData: {
|
|
|
- data: [{
|
|
|
- title: "1",
|
|
|
- value: [
|
|
|
- [14.49, 337.0],
|
|
|
- [5.78, 368.0],
|
|
|
- [5.08, 247.0],
|
|
|
- [4.79, 171.0],
|
|
|
- [4.05, 120.0],
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- title: "2",
|
|
|
- value: [
|
|
|
- [14.49, 37.0],
|
|
|
- [5.78, 68.0],
|
|
|
- [5.08, 47.0],
|
|
|
- [4.79, 71.0],
|
|
|
- [4.05, 20.0],
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
- lineData: {
|
|
|
- xTitle: "风速",
|
|
|
- yTitle: "功率",
|
|
|
- legends: [],
|
|
|
- data: [
|
|
|
- [80.67, 48.38, 65, 95.84, 71.84],
|
|
|
- [93.67, 98.38, 165, 295.84, 471.84],
|
|
|
- ],
|
|
|
- },
|
|
|
- },
|
|
|
- ids: [],
|
|
|
- checkLength: 0, //对标分析只能选择5个
|
|
|
- yblx: 0,
|
|
|
- yblxArr: [{
|
|
|
- label: '正样本',
|
|
|
- value: 0
|
|
|
- },
|
|
|
- {
|
|
|
- label: '负样本',
|
|
|
- value: 1
|
|
|
- }
|
|
|
- ],
|
|
|
- dialog: false, //传感点组件隐藏或显示
|
|
|
- ChangZhan: [],
|
|
|
- fjxh: [],
|
|
|
- fjxhArr: [],
|
|
|
- // 模型
|
|
|
- model: 0,
|
|
|
- models: [
|
|
|
- {
|
|
|
- label: '欠发矩阵模型',
|
|
|
- value: 0
|
|
|
- }
|
|
|
- ],
|
|
|
- // 时间间隔
|
|
|
- interval: "0-0.5",
|
|
|
- intervals: [//和明华有约定,必须这么写
|
|
|
- {
|
|
|
- label: '小于30分钟',
|
|
|
- value: "0-0.5"
|
|
|
- },
|
|
|
- {
|
|
|
- label: '30分钟-1小时',
|
|
|
- value: "0.5-1"
|
|
|
- },
|
|
|
- {
|
|
|
- label: '1小时-2小时',
|
|
|
- value: "1-2"
|
|
|
- },
|
|
|
- {
|
|
|
- label: '2小时-5小时',
|
|
|
- value: "2-5"
|
|
|
- },
|
|
|
- {//42天
|
|
|
- label: '大于5小时',
|
|
|
- value: "5-1008"
|
|
|
- }
|
|
|
- ],
|
|
|
- time: [],
|
|
|
- station: '',
|
|
|
- tableData: {
|
|
|
- column: [
|
|
|
- {
|
|
|
- name: "",
|
|
|
- field: "check",
|
|
|
- is_light: false,
|
|
|
- width: '50px',
|
|
|
- template: function() {
|
|
|
- return "<input class='check curCheckBox' type='CheckBox'/>";
|
|
|
- },
|
|
|
- click: function(event, data) {
|
|
|
- let id = data.id;
|
|
|
- if (event.target.checked == false && that.checkLength <= 5) {
|
|
|
- that.ids.forEach((item, i) => {
|
|
|
- if (item == id) {
|
|
|
- that.ids.splice(i, 1);
|
|
|
- }
|
|
|
- });
|
|
|
- that.checkLength--;
|
|
|
- } else if (event.target.checked && that.checkLength < 5) {
|
|
|
- that.ids.push(id);
|
|
|
- that.checkLength++;
|
|
|
- } else if (that.checkLength == 5) {
|
|
|
- event.target.checked = false;
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- name: "序号",
|
|
|
- field: "index",
|
|
|
- is_light: false,
|
|
|
- width: '100px',
|
|
|
- },
|
|
|
- {
|
|
|
- name: "样本类型",
|
|
|
- field: "tag",
|
|
|
- is_light: false,
|
|
|
- width: '150px',
|
|
|
- },
|
|
|
- {
|
|
|
- name: "风机编号",
|
|
|
- field: "windturbineid",
|
|
|
- is_light: false,
|
|
|
- width: '250px',
|
|
|
- },
|
|
|
- {
|
|
|
- name: "开始时间",
|
|
|
- field: "starttime",
|
|
|
- is_light: false,
|
|
|
- width: '350px',
|
|
|
- },
|
|
|
- {
|
|
|
- name: "结束时间",
|
|
|
- field: "endtime",
|
|
|
- is_light: false,
|
|
|
- width: '350px',
|
|
|
- },
|
|
|
- {
|
|
|
- name: "操作",
|
|
|
- field: "cz",
|
|
|
- is_light: false,
|
|
|
- width: '200px',
|
|
|
- template: () => {
|
|
|
- return (
|
|
|
- "<el-button type='text' style='cursor: pointer;' value='config'>查看</el-button> "
|
|
|
- );
|
|
|
- },
|
|
|
- click(e, row) {
|
|
|
- that.onClickOption(e, row);
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- data: [],
|
|
|
- },
|
|
|
- };
|
|
|
- },
|
|
|
- methods: {
|
|
|
- async startAjax() {
|
|
|
- var that = this;
|
|
|
- that.time = [new Date((new Date() - (3600 * 24 * 1000 * 30))).formatDate("yyyy-MM-dd hh:mm:ss"),
|
|
|
- new Date().formatDate("yyyy-MM-dd hh:mm:ss")
|
|
|
- ];
|
|
|
- await that.API.requestData({
|
|
|
- method: "GET",
|
|
|
- baseURL: "http://10.155.32.4:9001/",
|
|
|
- subUrl: "benchmarking/wplist",
|
|
|
- success(res) {
|
|
|
- that.ChangZhan = res.data;
|
|
|
- that.station = res.data[0].name
|
|
|
- },
|
|
|
- });
|
|
|
+import ComTable from "@/components/coms/table/table.vue";
|
|
|
+import ScatterLineChart from "./scatter-line-chart.vue";
|
|
|
+import BASE from "@tools/basicTool.js";
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ ComTable,
|
|
|
+ ScatterLineChart,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ const that = this;
|
|
|
+ return {
|
|
|
+ scatterLineData: [
|
|
|
+ [1.49, 337.0],
|
|
|
+ [5.78, 368.0],
|
|
|
+ [5.08, 247.0],
|
|
|
+ [4.79, 171.0],
|
|
|
+ [4.05, 120.0],
|
|
|
+ ],
|
|
|
+ dotName: "",
|
|
|
+ checkLength: 0, //对标分析只能选择5个
|
|
|
+ yblx: 0,
|
|
|
+ yblxArr: [
|
|
|
+ {
|
|
|
+ label: "正样本",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "负样本",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ dialog: false, //传感点组件隐藏或显示
|
|
|
+ ChangZhan: [],
|
|
|
+ // 模型
|
|
|
+ model: 0,
|
|
|
+ models: [
|
|
|
+ {
|
|
|
+ label: "欠发矩阵模型",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ // 时间间隔
|
|
|
+ interval: "1-2",
|
|
|
+ intervals: [
|
|
|
+ //和明华有约定,必须这么写
|
|
|
+ {
|
|
|
+ label: "小于30分钟",
|
|
|
+ value: "0-0.5",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "30分钟-1小时",
|
|
|
+ value: "0.5-1",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "1小时-2小时",
|
|
|
+ value: "1-2",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "2小时-5小时",
|
|
|
+ value: "2-5",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ //42天
|
|
|
+ label: "大于5小时",
|
|
|
+ value: "5-1008",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ time: [],
|
|
|
+ station: "",
|
|
|
+ tableData: {
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ name: "序号",
|
|
|
+ field: "index",
|
|
|
+ is_light: false,
|
|
|
+ width: "100px",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "样本类型",
|
|
|
+ field: "tag",
|
|
|
+ is_light: false,
|
|
|
+ width: "150px",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "风机编号",
|
|
|
+ field: "windturbineid",
|
|
|
+ is_light: false,
|
|
|
+ width: "250px",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "开始时间",
|
|
|
+ field: "starttime",
|
|
|
+ is_light: false,
|
|
|
+ width: "350px",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "结束时间",
|
|
|
+ field: "endtime",
|
|
|
+ is_light: false,
|
|
|
+ width: "350px",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "操作",
|
|
|
+ field: "cz",
|
|
|
+ is_light: false,
|
|
|
+ width: "200px",
|
|
|
+ template: () => {
|
|
|
+ return "<el-button type='text' style='cursor: pointer;' value='config'>详情</el-button> ";
|
|
|
+ },
|
|
|
+ click(e, row) {
|
|
|
+ that.onClickOption(e, row);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ data: [],
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async startAjax() {
|
|
|
+ var that = this;
|
|
|
+ that.time = [
|
|
|
+ new Date(new Date() - 3600 * 24 * 1000 * 15).formatDate(
|
|
|
+ "yyyy-MM-dd hh:mm:ss"
|
|
|
+ ),
|
|
|
+ new Date().formatDate("yyyy-MM-dd hh:mm:ss"),
|
|
|
+ ];
|
|
|
+ await that.API.requestData({
|
|
|
+ method: "GET",
|
|
|
+ baseURL: "http://10.155.32.4:9001/",
|
|
|
+ subUrl: "benchmarking/wplist",
|
|
|
+ success(res) {
|
|
|
+ that.ChangZhan = res.data;
|
|
|
+ that.station = res.data[1].id;
|
|
|
+ },
|
|
|
+ });
|
|
|
+ that.list();
|
|
|
+ },
|
|
|
+ onClickOption(e, row) {
|
|
|
+ // 操作按钮
|
|
|
+ if ("config" == e.target.getAttribute("value")) {
|
|
|
+ //查看
|
|
|
+ this.chart([row.id]);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ chart(ids) {
|
|
|
+ const that = this;
|
|
|
+ BASE.showLoading({ text: "加载中..." });
|
|
|
+ that.API.requestData({
|
|
|
+ method: "GET",
|
|
|
+ // baseURL: "http://192.168.10.19:9002/",
|
|
|
+ baseURL: "http://192.168.1.18:9002/",
|
|
|
+ subUrl: "case/performance/scatter",
|
|
|
+ data: {
|
|
|
+ id: ids,
|
|
|
+ interval: 30,
|
|
|
+ },
|
|
|
+ success(res) {
|
|
|
+ if (res.code == 200) {
|
|
|
+ let key = Object.keys(res.data)[0];
|
|
|
+ that.scatterLineData = res.data[key][1];
|
|
|
+ that.dotName = key;
|
|
|
+ BASE.closeLoading();
|
|
|
+ that.dialog = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ list() {
|
|
|
+ var that = this;
|
|
|
+ if (that.time == undefined) {
|
|
|
+ that.BASE.showMsg({
|
|
|
+ type: "warning",
|
|
|
+ msg: "请选择起始时间",
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
- // await that.API.requestData({
|
|
|
- // method: "GET",
|
|
|
- // baseURL: "http://192.168.1.18:9002/",
|
|
|
- // subUrl: "basic/station/all",
|
|
|
- // success(res) {
|
|
|
- // let fjxhArr = [];
|
|
|
- // let model = [],
|
|
|
- // fjxh = [];
|
|
|
- // res.data.forEach(ele => {
|
|
|
- // fjxhArr.push({
|
|
|
- // id: ele.id,
|
|
|
- // value: ele.model.split("/")
|
|
|
- // })
|
|
|
- // if (ele.id == "MHS_FDC") {
|
|
|
- // model = ele.model.split("/");
|
|
|
- // model.forEach(ele => {
|
|
|
- // fjxh.push({
|
|
|
- // label: ele,
|
|
|
- // value: ele
|
|
|
- // })
|
|
|
- // })
|
|
|
- // }
|
|
|
- // })
|
|
|
- // that.fjxhArr = fjxhArr;
|
|
|
- // that.model = model;
|
|
|
- // that.fjxh = fjxh;
|
|
|
- // },
|
|
|
- // });
|
|
|
- that.list()
|
|
|
- },
|
|
|
- onClickOption(e, row) { // 操作按钮
|
|
|
- if ("config" == e.target.getAttribute("value")) { //查看
|
|
|
- this.chart([row.id]);
|
|
|
- }
|
|
|
- },
|
|
|
- chart(ids) {
|
|
|
- const that = this;
|
|
|
- BASE.showLoading({ text:"加载中..." });
|
|
|
- that.API.requestData({
|
|
|
- method: "GET",
|
|
|
- baseURL: "http://192.168.1.18:9002/",
|
|
|
- subUrl: "case/performance/scatter",
|
|
|
- data: {
|
|
|
- id: ids,
|
|
|
- interval: 30
|
|
|
- },
|
|
|
- success(res) {
|
|
|
- if (res.code == 200) {
|
|
|
- let data = res.data,
|
|
|
- keys = Object.keys(data),
|
|
|
- fs = [],
|
|
|
- zs = [],
|
|
|
- dotData = [];
|
|
|
- keys.forEach(ele => {
|
|
|
- let keyId = ele.split('_')[1],
|
|
|
- dataType = ele.slice(0, 1);
|
|
|
- ids.forEach(ele2 => {
|
|
|
- if (ele2 == keyId && dataType == 'C') {
|
|
|
- data[ele].forEach(ele3 => {
|
|
|
- fs.push(ele3.fs)
|
|
|
- zs.push(ele3.zs)
|
|
|
- })
|
|
|
- } else if (ele2 == keyId && dataType == 'S') {
|
|
|
- dotData.push({
|
|
|
- title: keyId,
|
|
|
- value: data[ele]
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- that.scatterLineData.data = dotData;
|
|
|
- that.scatterLineData.lineData.data = [fs, zs];
|
|
|
- BASE.closeLoading();
|
|
|
- that.dialog = true;
|
|
|
- }
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- dbfx() {
|
|
|
- var that = this;
|
|
|
- if (that.ids.length <= 5 && that.ids.length != 0) {
|
|
|
- that.chart(that.ids);
|
|
|
- } else {
|
|
|
- this.BASE.showMsg({
|
|
|
- type: "warning",
|
|
|
- msg: "请选择测点后再对比",
|
|
|
- });
|
|
|
- return
|
|
|
- }
|
|
|
- },
|
|
|
- list() {
|
|
|
- var that = this;
|
|
|
- let station = '';
|
|
|
- if (typeof that.time[0].valueOf() != 'string') {
|
|
|
- that.time[0] = that.formatDate(that.time[0].valueOf())
|
|
|
- }
|
|
|
- if (typeof that.time[1].valueOf() != 'string') {
|
|
|
- that.time[1] = that.formatDate(that.time[1].valueOf())
|
|
|
- }
|
|
|
- if (typeof that.station.valueOf() == 'string') {
|
|
|
- that.ChangZhan.forEach(ele => {
|
|
|
- if (ele.name == that.station) {
|
|
|
- station = ele.id
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- that.API.requestData({
|
|
|
- showLoading: true,
|
|
|
- method: "GET",
|
|
|
- baseURL: "http://192.168.1.18:9002/",
|
|
|
- subUrl: "case/performance/list",
|
|
|
- data: {
|
|
|
- tag: that.yblx,
|
|
|
- stationen: station ? station : that.station,
|
|
|
- model: that.model,
|
|
|
- interval: that.inverval,
|
|
|
- starttime: that.time[0].valueOf(),
|
|
|
- endtime: that.time[1].valueOf()
|
|
|
- },
|
|
|
- success(res) {
|
|
|
- if (res.code == 200) {
|
|
|
- if (res.data.length) {
|
|
|
- let data = res.data;
|
|
|
- that.tableData.data = [];
|
|
|
- for (var i = 0; i < data.length; i++) {
|
|
|
- let obj = {
|
|
|
- index: i + 1,
|
|
|
- tag: data[i].tag == 0 ? '正样本' : '负样本',
|
|
|
- windturbineid: data[i].windturbineid,
|
|
|
- starttime: data[i].starttime,
|
|
|
- endtime: data[i].endtime,
|
|
|
- id: data[i].id
|
|
|
- };
|
|
|
- that.tableData.data.push(obj);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.startAjax();
|
|
|
- },
|
|
|
- watch: {
|
|
|
- station(res) {
|
|
|
- let fjxh = [];
|
|
|
- this.fjxhArr.forEach(ele => {
|
|
|
- if (ele.id == res) {
|
|
|
- ele.value.forEach(ele2 => {
|
|
|
- fjxh.push({
|
|
|
- label: ele2,
|
|
|
- value: ele2
|
|
|
- })
|
|
|
- })
|
|
|
- this.model = ele.value;
|
|
|
- }
|
|
|
- })
|
|
|
- this.fjxh = fjxh;
|
|
|
- }
|
|
|
- },
|
|
|
- };
|
|
|
+ that.API.requestData({
|
|
|
+ showLoading: true,
|
|
|
+ method: "GET",
|
|
|
+ baseURL: "http://192.168.1.18:9002/",
|
|
|
+ // baseURL: "http://192.168.10.19:9002/",
|
|
|
+ subUrl: "case/performance/list",
|
|
|
+ data: {
|
|
|
+ tag: that.yblx,
|
|
|
+ station: that.station,
|
|
|
+ interval: that.interval,
|
|
|
+ st: that.time[0].valueOf(),
|
|
|
+ et: that.time[1].valueOf(),
|
|
|
+ },
|
|
|
+ success(res) {
|
|
|
+ if (res.code == 200) {
|
|
|
+ that.tableData.data = [];
|
|
|
+ if (res.data.length) {
|
|
|
+ let data = res.data;
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
+ let obj = {
|
|
|
+ index: i + 1,
|
|
|
+ tag: data[i].tag == 0 ? "正样本" : "负样本",
|
|
|
+ windturbineid: data[i].windturbineid,
|
|
|
+ starttime: data[i].starttime,
|
|
|
+ endtime: data[i].endtime,
|
|
|
+ id: data[i].id,
|
|
|
+ };
|
|
|
+ that.tableData.data.push(obj);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ that.BASE.showMsg({
|
|
|
+ msg: "所选日期暂无数据",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.startAjax();
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
- .el-select.w {
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
+.el-select.w {
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
</style>
|