|
@@ -51,7 +51,6 @@
|
|
|
</div>
|
|
|
<div class="query-actions">
|
|
|
<button class="btn" @click="list">查询</button>
|
|
|
- <button class="btn" @click="dbfx">对比</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -61,15 +60,14 @@
|
|
|
</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'" />
|
|
|
+ <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 ScatterLineChart from "./scatter-line-chart.vue";
|
|
|
import BASE from "@tools/basicTool.js";
|
|
|
export default {
|
|
|
components: {
|
|
@@ -79,39 +77,14 @@
|
|
|
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: [],
|
|
|
+ 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: [{
|
|
@@ -125,8 +98,6 @@
|
|
|
],
|
|
|
dialog: false, //传感点组件隐藏或显示
|
|
|
ChangZhan: [],
|
|
|
- fjxh: [],
|
|
|
- fjxhArr: [],
|
|
|
// 模型
|
|
|
model: 0,
|
|
|
models: [
|
|
@@ -164,31 +135,6 @@
|
|
|
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,
|
|
@@ -252,35 +198,6 @@
|
|
|
that.station = res.data[0].name
|
|
|
},
|
|
|
});
|
|
|
-
|
|
|
- // 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) { // 操作按钮
|
|
@@ -293,6 +210,7 @@
|
|
|
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: {
|
|
@@ -301,48 +219,15 @@
|
|
|
},
|
|
|
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];
|
|
|
+ let key = Object.keys(res.data)[0];
|
|
|
+ that.scatterLineData = res.data[key][1];
|
|
|
+ that.dotName = key;
|
|
|
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 = '';
|
|
@@ -363,17 +248,18 @@
|
|
|
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,
|
|
|
stationen: station ? station : that.station,
|
|
|
- model: that.model,
|
|
|
- interval: that.inverval,
|
|
|
+ interval: that.interval,
|
|
|
starttime: that.time[0].valueOf(),
|
|
|
endtime: that.time[1].valueOf()
|
|
|
},
|
|
|
success(res) {
|
|
|
if (res.code == 200) {
|
|
|
+ console.log(res.data.length)
|
|
|
if (res.data.length) {
|
|
|
let data = res.data;
|
|
|
that.tableData.data = [];
|
|
@@ -397,23 +283,6 @@
|
|
|
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;
|
|
|
- }
|
|
|
- },
|
|
|
};
|
|
|
</script>
|
|
|
|