|
@@ -296,44 +296,66 @@ export default {
|
|
|
change_witch() {
|
|
|
this.get_search(this.state);
|
|
|
},
|
|
|
- get_search(word) {
|
|
|
- if (word.length == 0) {
|
|
|
- this.active_dableData = this.tableData;
|
|
|
- } else {
|
|
|
- let gy_ju = {
|
|
|
- beginTime: store.state.cockpit_date[0],
|
|
|
- endTime: store.state.cockpit_date[1],
|
|
|
- jscType: store.state.cockpit_vector.tablejscType + '_cx',
|
|
|
- id: '4602',
|
|
|
- val0: word,
|
|
|
+ // get_search(word) {
|
|
|
+ // if (word.length == 0) {
|
|
|
+ // this.active_dableData = this.tableData;
|
|
|
+ // } else {
|
|
|
+ // let gy_ju = {
|
|
|
+ // beginTime: store.state.cockpit_date[0],
|
|
|
+ // endTime: store.state.cockpit_date[1],
|
|
|
+ // jscType: store.state.cockpit_vector.tablejscType + '_cx',
|
|
|
+ // id: '4602',
|
|
|
+ // val0: word,
|
|
|
|
|
|
- }
|
|
|
- if (this.title == '土地供应完成项目' || this.title == '山水工程完成项目') {
|
|
|
- gy_ju.beginTime = undefined
|
|
|
- gy_ju.endTime = undefined
|
|
|
- }
|
|
|
+ // }
|
|
|
+ // if (this.title == '土地供应完成项目' || this.title == '山水工程完成项目') {
|
|
|
+ // gy_ju.beginTime = undefined
|
|
|
+ // gy_ju.endTime = undefined
|
|
|
+ // }
|
|
|
|
|
|
- // let bj_sl = {
|
|
|
- // beginTime: store.state.cockpit_date[0],
|
|
|
- // endTime: store.state.cockpit_date[1],
|
|
|
- // jscType: 'jsc_bjxm_csbj_zbmx_cx',
|
|
|
- // id: '4602',
|
|
|
- // val0: word,
|
|
|
+ // // let bj_sl = {
|
|
|
+ // // beginTime: store.state.cockpit_date[0],
|
|
|
+ // // endTime: store.state.cockpit_date[1],
|
|
|
+ // // jscType: 'jsc_bjxm_csbj_zbmx_cx',
|
|
|
+ // // id: '4602',
|
|
|
+ // // val0: word,
|
|
|
|
|
|
- // }
|
|
|
+ // // }
|
|
|
|
|
|
- Promise.all([QueryList(gy_ju)]).then((values) => {
|
|
|
- values[0].data.map((res) => {
|
|
|
- if (res.geom) {
|
|
|
- res.geom = wellknown.parse(res.geom.split(";")[1]);
|
|
|
- }
|
|
|
- })
|
|
|
- this.active_dableData = values[0].data
|
|
|
+ // Promise.all([QueryList(gy_ju)]).then((values) => {
|
|
|
+ // values[0].data.map((res) => {
|
|
|
+ // if (res.geom) {
|
|
|
+ // res.geom = wellknown.parse(res.geom.split(";")[1]);
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // this.active_dableData = values[0].data
|
|
|
|
|
|
|
|
|
- }).catch((error) => {
|
|
|
- console.error(error); // 如果有任何一个 promise 失败,则捕获这个错误
|
|
|
- });
|
|
|
+ // }).catch((error) => {
|
|
|
+ // console.error(error); // 如果有任何一个 promise 失败,则捕获这个错误
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+
|
|
|
+ // },
|
|
|
+
|
|
|
+ get_search(word) {
|
|
|
+ if (word.length == 0) {
|
|
|
+ this.active_dableData = this.tableData;
|
|
|
+ } else {
|
|
|
+ // console.log('this.tableData: ', this.tableData);
|
|
|
+ // this.active_dableData = this.tableData.filter((item) => {
|
|
|
+ // item.项目名称.indexOf(word) >= 0
|
|
|
+ // })
|
|
|
+ console.log('this.tableData: ', this.word);
|
|
|
+
|
|
|
+ this.active_dableData = this.tableData.filter((item) => {
|
|
|
+ console.log('item: ', item);
|
|
|
+ if (item[this.word] && word) {
|
|
|
+ return item[this.word].indexOf(word) >= 0;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -368,6 +390,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
this.active_dableData = data.data
|
|
|
+ console.log('data.data: ', data.data);
|
|
|
this.tableData = data.data
|
|
|
},
|
|
|
|
|
@@ -380,7 +403,9 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
cockpit_vector(newVal, oldVal) {
|
|
|
+ console.log('newVal: ', newVal);
|
|
|
this.title = newVal.title
|
|
|
+ this.word = newVal.word
|
|
|
if (newVal.tableData.length > 0) {
|
|
|
|
|
|
this.active_dableData = newVal.tableData
|