|
@@ -327,23 +327,7 @@ export default {
|
|
|
orderByColumn:'',
|
|
|
isAsc:'asc',
|
|
|
doesExist:'no',
|
|
|
- tableData: [{
|
|
|
- date: '2016-05-02',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1518 弄'
|
|
|
- }, {
|
|
|
- date: '2016-05-04',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1517 弄'
|
|
|
- }, {
|
|
|
- date: '2016-05-01',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1519 弄'
|
|
|
- }, {
|
|
|
- date: '2016-05-03',
|
|
|
- name: '王小虎',
|
|
|
- address: '上海市普陀区金沙江路 1516 弄'
|
|
|
- }]
|
|
|
+ tableData: []
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
@@ -456,6 +440,9 @@ export default {
|
|
|
},
|
|
|
InterValueData(){
|
|
|
let that = this;
|
|
|
+ this.$http.get('/powercompare/windfarmAjax').then((res) => {
|
|
|
+ that.options = res.data.data;
|
|
|
+ })
|
|
|
this.doesExist = 'no';
|
|
|
var valueData = new URLSearchParams();
|
|
|
valueData.append('orderByColumn',this.orderByColumn);
|
|
@@ -466,27 +453,27 @@ export default {
|
|
|
valueData.append('zjs',this.value4)
|
|
|
this.$http.post('/contrast/addBenchmarkZj',valueData).then((res) => {
|
|
|
console.log(res)
|
|
|
- // that.tableData = res.data.data;
|
|
|
+ that.tableData = res.data.data;
|
|
|
// console.log(that.getTableDataAll)
|
|
|
- // console.log(that.tableData)
|
|
|
- // for(let i=0;i<that.getTableDataAll.length;i++){
|
|
|
- // for(let j=0;j<that.tableData.length;j++){
|
|
|
- // if(that.getTableDataAll[i].wpId == that.tableData[j].wpId && that.getTableDataAll[i].zjName == that.tableData[j].zjName){
|
|
|
- // that.doesExist = 'yes';
|
|
|
- // this.$message.error("此值在表中已存在");
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if(that.doesExist == 'no'){
|
|
|
- // for(let i=0;i<that.tableData.length;i++){
|
|
|
- // that.getTableDataAll.push(that.tableData[i])
|
|
|
- // }
|
|
|
- // this.$message.error("添加成功");
|
|
|
- // return;
|
|
|
- // }
|
|
|
-
|
|
|
+ console.log(that.tableData)
|
|
|
+ for(let i=0;i<that.getTableDataAll.length;i++){
|
|
|
+ for(let j=0;j<that.tableData.length;j++){
|
|
|
+ if(that.getTableDataAll[i].wpId == that.tableData[j].wpId && that.getTableDataAll[i].zjName == that.tableData[j].zjName){
|
|
|
+ that.doesExist = 'yes';
|
|
|
+ this.$message.error("此值在表中已存在");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(that.doesExist == 'no'){
|
|
|
+ for(let i=0;i<that.tableData.length;i++){
|
|
|
+ that.getTableDataAll.push(that.tableData[i])
|
|
|
+ }
|
|
|
+ this.$message.error("添加成功");
|
|
|
+ return;
|
|
|
+ }
|
|
|
})
|
|
|
+ // this.InterValueDatainitial();
|
|
|
},
|
|
|
drawPie() {
|
|
|
var charts;
|