|
@@ -3,29 +3,28 @@
|
|
<div class="innerContainerVector leftPaneVector">
|
|
<div class="innerContainerVector leftPaneVector">
|
|
|
|
|
|
<h2 class="PangetitleVector">
|
|
<h2 class="PangetitleVector">
|
|
- <span class="pange_textVector">{{ store.state.cockpit_vector.title }}</span>
|
|
|
|
|
|
+ <span class="pange_textVector">{{ title }}</span>
|
|
</h2>
|
|
</h2>
|
|
<i class="el-icon-close" @click="close"></i>
|
|
<i class="el-icon-close" @click="close"></i>
|
|
|
|
|
|
- <el-autocomplete class="search" @input="change_witch" style="z-index: 1111;" v-model="state"
|
|
|
|
- :fetch-suggestions="querySearchAsync" placeholder="请输入内容" @select="handleSelect"
|
|
|
|
- :popper-append-to-body="false"></el-autocomplete>
|
|
|
|
|
|
+ <el-input clearable v-model="state" @input="change_witch" class="search" placeholder="请输入内容"></el-input>
|
|
|
|
|
|
- <el-table :data="store.state.cockpit_vector.tableData" style="width: 100%" height="440" :header-cell-style="{
|
|
|
|
|
|
+ <el-table :data="active_dableData" style="width: 100%" height="440" :header-cell-style="{
|
|
background: 'rgba(10, 25, 38, 0.6)',
|
|
background: 'rgba(10, 25, 38, 0.6)',
|
|
color: '#66b1ff',
|
|
color: '#66b1ff',
|
|
fontSize: '14px',
|
|
fontSize: '14px',
|
|
fontFamily: 'Microsoft YaHei',
|
|
fontFamily: 'Microsoft YaHei',
|
|
fontWeight: '400',
|
|
fontWeight: '400',
|
|
}">
|
|
}">
|
|
-
|
|
|
|
-
|
|
|
|
- <el-table-column v-for="(index, item) in store.state.cockpit_vector.columns" :key="index"
|
|
|
|
- width="120" :prop="store.state.cockpit_vector.columns[item]" :label="store.state.cockpit_vector.columns[item]">
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <el-table-column show-overflow-tooltip="true" v-for="(index, item) in store.state.cockpit_vector.columns"
|
|
|
|
+ :key="index" width="120" :prop="store.state.cockpit_vector.columns[item]"
|
|
|
|
+ :label="store.state.cockpit_vector.columns[item]">
|
|
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column fixed="right" label="操作" width="100">
|
|
|
|
|
|
+ <el-table-column fixed="right" label="操作" width="90">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button @click="handleClick(scope.row)" type="text" size="small">详情</el-button>
|
|
<el-button @click="handleClick(scope.row)" type="text" size="small">详情</el-button>
|
|
<el-button @click="handleClick(scope.row)" type="text" size="small">定位</el-button>
|
|
<el-button @click="handleClick(scope.row)" type="text" size="small">定位</el-button>
|
|
@@ -43,87 +42,11 @@ import * as turf from "@turf/turf";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- restaurants: [],
|
|
|
|
state: '',
|
|
state: '',
|
|
timeout: null,
|
|
timeout: null,
|
|
- tableData: [{
|
|
|
|
- date: '2016-05-03',
|
|
|
|
- name: '王小虎',
|
|
|
|
- province: '上海',
|
|
|
|
- city: '普陀区',
|
|
|
|
- address: '上海市普陀区金沙江路 1518 弄',
|
|
|
|
- zip: 200333
|
|
|
|
- }, {
|
|
|
|
- date: '2016-05-02',
|
|
|
|
- name: '王小虎',
|
|
|
|
- province: '上海',
|
|
|
|
- city: '普陀区',
|
|
|
|
- address: '上海市普陀区金沙江路 1518 弄',
|
|
|
|
- zip: 200333
|
|
|
|
- }, {
|
|
|
|
- date: '2016-05-04',
|
|
|
|
- name: '王小虎',
|
|
|
|
- province: '上海',
|
|
|
|
- city: '普陀区',
|
|
|
|
- address: '上海市普陀区金沙江路 1518 弄',
|
|
|
|
- zip: 200333
|
|
|
|
- }, {
|
|
|
|
- date: '2016-05-01',
|
|
|
|
- name: '王小虎',
|
|
|
|
- province: '上海',
|
|
|
|
- city: '普陀区',
|
|
|
|
- address: '上海市普陀区金沙江路 1518 弄',
|
|
|
|
- zip: 200333
|
|
|
|
- }, {
|
|
|
|
- date: '2016-05-08',
|
|
|
|
- name: '王小虎',
|
|
|
|
- province: '上海',
|
|
|
|
- city: '普陀区',
|
|
|
|
- address: '上海市普陀区金沙江路 1518 弄',
|
|
|
|
- zip: 200333
|
|
|
|
- }, {
|
|
|
|
- date: '2016-05-06',
|
|
|
|
- name: '王小虎',
|
|
|
|
- province: '上海',
|
|
|
|
- city: '普陀区',
|
|
|
|
- address: '上海市普陀区金沙江路 1518 弄',
|
|
|
|
- zip: 200333
|
|
|
|
- }, {
|
|
|
|
- date: '2016-05-07',
|
|
|
|
- name: '王小虎',
|
|
|
|
- province: '上海',
|
|
|
|
- city: '普陀区',
|
|
|
|
- address: '上海市普陀区金沙江路 1518 弄',
|
|
|
|
- zip: 200333
|
|
|
|
- }, {
|
|
|
|
- date: '2016-05-03',
|
|
|
|
- name: '王小虎',
|
|
|
|
- province: '上海',
|
|
|
|
- city: '普陀区',
|
|
|
|
- address: '上海市普陀区金沙江路 1518 弄',
|
|
|
|
- zip: 200333
|
|
|
|
- }, {
|
|
|
|
- date: '2016-05-02',
|
|
|
|
- name: '王小虎',
|
|
|
|
- province: '上海',
|
|
|
|
- city: '普陀区',
|
|
|
|
- address: '上海市普陀区金沙江路 1518 弄',
|
|
|
|
- zip: 200333
|
|
|
|
- }, {
|
|
|
|
- date: '2016-05-03',
|
|
|
|
- name: '王小虎',
|
|
|
|
- province: '上海',
|
|
|
|
- city: '普陀区',
|
|
|
|
- address: '上海市普陀区金沙江路 1518 弄',
|
|
|
|
- zip: 200333
|
|
|
|
- }, {
|
|
|
|
- date: '2016-05-02',
|
|
|
|
- name: '王小虎',
|
|
|
|
- province: '上海',
|
|
|
|
- city: '普陀区',
|
|
|
|
- address: '上海市普陀区金沙江路 1518 弄',
|
|
|
|
- zip: 200333
|
|
|
|
- }]
|
|
|
|
|
|
+ title: "",
|
|
|
|
+ active_dableData: null,
|
|
|
|
+ tableData: null,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -133,74 +56,55 @@ export default {
|
|
|
|
|
|
store.setViewerFlagb(true);
|
|
store.setViewerFlagb(true);
|
|
},
|
|
},
|
|
|
|
+
|
|
change_witch() {
|
|
change_witch() {
|
|
this.get_search(this.state);
|
|
this.get_search(this.state);
|
|
},
|
|
},
|
|
get_search(word) {
|
|
get_search(word) {
|
|
if (word.length == 0) {
|
|
if (word.length == 0) {
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- let gy_ju = {
|
|
|
|
- jscType: 'jsc_tdgy_gy_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) => {
|
|
|
|
- this.restaurants = [];
|
|
|
|
- values.forEach((item, index) => {
|
|
|
|
- item.data.forEach((item, index) => {
|
|
|
|
- if (item.项目名称 != undefined && item.项目名称.length > 0) {
|
|
|
|
- item.value = item.项目名称
|
|
|
|
- }
|
|
|
|
- if (item.sxnr != undefined && item.sxnr.length > 0) {
|
|
|
|
- item.value = item.sxnr
|
|
|
|
- }
|
|
|
|
- this.restaurants.push(item);
|
|
|
|
- });
|
|
|
|
|
|
+ this.active_dableData = this.tableData;
|
|
|
|
+ } else {
|
|
|
|
+ let gy_ju = {
|
|
|
|
+ jscType: 'jsc_tdgy_gy_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) => {
|
|
|
|
+ this.active_dableData = values[0].data
|
|
|
|
+ }).catch((error) => {
|
|
|
|
+ console.error(error); // 如果有任何一个 promise 失败,则捕获这个错误
|
|
});
|
|
});
|
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
|
- // 当所有 promise 都成功完成时,values 是包含所有结果的数组
|
|
|
|
- }).catch((error) => {
|
|
|
|
- console.error(error); // 如果有任何一个 promise 失败,则捕获这个错误
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- querySearchAsync(queryString, cb) {
|
|
|
|
- var restaurants = this.restaurants;
|
|
|
|
- var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants;
|
|
|
|
-
|
|
|
|
- clearTimeout(this.timeout);
|
|
|
|
- this.timeout = setTimeout(() => {
|
|
|
|
- cb(results);
|
|
|
|
- }, 3000 * Math.random());
|
|
|
|
},
|
|
},
|
|
- createStateFilter(queryString) {
|
|
|
|
|
|
|
|
- return (state) => {
|
|
|
|
-
|
|
|
|
- return (state.项目名称.indexOf(queryString) != -1);
|
|
|
|
- };
|
|
|
|
- },
|
|
|
|
- handleSelect(item) {
|
|
|
|
- console.log(item);
|
|
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ cockpit_vector() {
|
|
|
|
+ return store.state.cockpit_vector;
|
|
},
|
|
},
|
|
- handleClick(e) {
|
|
|
|
- console.log(e);
|
|
|
|
|
|
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ cockpit_vector(newVal, oldVal) {
|
|
|
|
+ this.title = newVal.title
|
|
|
|
+ this.active_dableData = newVal.tableData
|
|
|
|
+ this.tableData = newVal.tableData
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
};
|
|
};
|
|
@@ -228,12 +132,11 @@ export default {
|
|
border-top-right-radius: 15px;
|
|
border-top-right-radius: 15px;
|
|
|
|
|
|
.search {
|
|
.search {
|
|
- margin: 2rem;
|
|
|
|
|
|
+ // margin: 2rem;
|
|
}
|
|
}
|
|
|
|
|
|
/deep/ .el-input {
|
|
/deep/ .el-input {
|
|
display: inline-block;
|
|
display: inline-block;
|
|
- width: 130%;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/deep/ .el-input__inner {
|
|
/deep/ .el-input__inner {
|
|
@@ -257,7 +160,7 @@ export default {
|
|
line-height: 23px;
|
|
line-height: 23px;
|
|
padding: 0 5px;
|
|
padding: 0 5px;
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
- top: -4.4rem !important;
|
|
|
|
|
|
+ top: -1.9rem !important;
|
|
position: relative;
|
|
position: relative;
|
|
right: -19.5rem;
|
|
right: -19.5rem;
|
|
}
|
|
}
|