|  | @@ -9,13 +9,14 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              <el-input clearable v-model="state" @input="change_witch" class="search" placeholder="请输入内容"></el-input>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            <el-table :data="active_dableData" style="width: 100%" height="650" :header-cell-style="{
 | 
	
		
			
				|  |  | -                background: 'rgba(10, 25, 38, 0.6)',
 | 
	
		
			
				|  |  | -                color: '#66b1ff',
 | 
	
		
			
				|  |  | -                fontSize: '14px',
 | 
	
		
			
				|  |  | -                fontFamily: 'Microsoft YaHei',
 | 
	
		
			
				|  |  | -                fontWeight: '400',
 | 
	
		
			
				|  |  | -            }">
 | 
	
		
			
				|  |  | +            <el-table :row-class-name="tableRowClassName" ref="singleTable" :data="active_dableData" style="width: 100%"
 | 
	
		
			
				|  |  | +                height="650" :header-cell-style="{
 | 
	
		
			
				|  |  | +                    background: 'rgba(10, 25, 38, 0.6)',
 | 
	
		
			
				|  |  | +                    color: '#66b1ff',
 | 
	
		
			
				|  |  | +                    fontSize: '14px',
 | 
	
		
			
				|  |  | +                    fontFamily: 'Microsoft YaHei',
 | 
	
		
			
				|  |  | +                    fontWeight: '400',
 | 
	
		
			
				|  |  | +                }">
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  <el-table-column show-overflow-tooltip="true" v-for="(index, item) in store.state.cockpit_vector.columns"
 | 
	
	
		
			
				|  | @@ -51,10 +52,17 @@ export default {
 | 
	
		
			
				|  |  |              title: "",
 | 
	
		
			
				|  |  |              active_dableData: null,
 | 
	
		
			
				|  |  |              tableData: null,
 | 
	
		
			
				|  |  | +            scrollTop_index: null
 | 
	
		
			
				|  |  |          };
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      methods: {
 | 
	
		
			
				|  |  | -        async draw_vector_server(jscType){
 | 
	
		
			
				|  |  | +        tableRowClassName({ row, rowIndex }) {
 | 
	
		
			
				|  |  | +            if (rowIndex === this.scrollTop_index) {
 | 
	
		
			
				|  |  | +                return 'warning-row';
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            return '';
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        async draw_vector_server(jscType) {
 | 
	
		
			
				|  |  |              let res = await QueryOne({ jscType, id: "4602" });
 | 
	
		
			
				|  |  |              tdsy.addLayer({ ...res.data, title: this.title });
 | 
	
		
			
				|  |  |          },
 | 
	
	
		
			
				|  | @@ -104,8 +112,9 @@ export default {
 | 
	
		
			
				|  |  |          // },
 | 
	
		
			
				|  |  |          draw_vector_tdgy_gy_jd(data) {
 | 
	
		
			
				|  |  |              // tdsy.remove();
 | 
	
		
			
				|  |  | -            data.forEach((res) => {
 | 
	
		
			
				|  |  | +            data.forEach((res, index) => {
 | 
	
		
			
				|  |  |                  res.type = '图斑上图'
 | 
	
		
			
				|  |  | +                res.index = index
 | 
	
		
			
				|  |  |                  if (res.geom) {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                      let geojson = res.geom;
 | 
	
	
		
			
				|  | @@ -196,8 +205,8 @@ export default {
 | 
	
		
			
				|  |  |              })
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          go(item) {
 | 
	
		
			
				|  |  | -            if(!item.geom){
 | 
	
		
			
				|  |  | -                this.$message.warning( "缺少定位图斑" );
 | 
	
		
			
				|  |  | +            if (!item.geom) {
 | 
	
		
			
				|  |  | +                this.$message.warning("缺少定位图斑");
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              store.setVectordataid(item.dataid)
 | 
	
		
			
				|  |  |              let arr = [];
 | 
	
	
		
			
				|  | @@ -423,7 +432,9 @@ export default {
 | 
	
		
			
				|  |  |          cockpit_vector() {
 | 
	
		
			
				|  |  |              return store.state.cockpit_vector;
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +        computed_vectorData() {
 | 
	
		
			
				|  |  | +            return store.state.vectorData;
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      watch: {
 | 
	
		
			
				|  |  |          cockpit_vector(newVal, oldVal) {
 | 
	
	
		
			
				|  | @@ -443,10 +454,30 @@ export default {
 | 
	
		
			
				|  |  |              if (newVal.goitem) {
 | 
	
		
			
				|  |  |                  this.go(newVal.goitem)
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          active_dableData(newVal, oldVal) {
 | 
	
		
			
				|  |  | -            if(this.cockpit_vector.mapType) this.draw_vector_server(this.cockpit_vector.mapType)
 | 
	
		
			
				|  |  | +            if (this.cockpit_vector.mapType) this.draw_vector_server(this.cockpit_vector.mapType)
 | 
	
		
			
				|  |  |              else this.draw_vector_tdgy_gy_jd(newVal);
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        computed_vectorData(newVal, oldVal) {
 | 
	
		
			
				|  |  | +            newVal.forEach((res) => {
 | 
	
		
			
				|  |  | +                if (res.name == 'index') {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                    const TableRows = this.$refs.singleTable.bodyWrapper.querySelectorAll('.el-table__body tbody .el-table__row')
 | 
	
		
			
				|  |  | +                    let scrollTop = 0
 | 
	
		
			
				|  |  | +                    for (let i = 0; i < TableRows.length; i++) {
 | 
	
		
			
				|  |  | +                        if (i === res.value) {
 | 
	
		
			
				|  |  | +                            break
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                        scrollTop += TableRows[i].offsetHeight
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    this.$refs.singleTable.bodyWrapper.scrollTop = scrollTop
 | 
	
		
			
				|  |  | +                    this.scrollTop_index = res.value
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      mounted() {
 | 
	
	
		
			
				|  | @@ -641,5 +672,9 @@ export default {
 | 
	
		
			
				|  |  |  .el-table::before {
 | 
	
		
			
				|  |  |      background: rgba(10, 25, 38, 0) !important;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/deep/ .el-table .warning-row {
 | 
	
		
			
				|  |  | +    background: rgb(102, 177, 255) !important;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  </style>
 | 
	
		
			
				|  |  |    
 |