管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2022-12-17 84d97857cb5ba7cfb62b6400bdff0911eab4826b
src/views/exportMap/index.vue
@@ -38,7 +38,7 @@
          <el-form-item>
            <el-link
              style="color: white"
              @click="showMapApply = !showMapApply"
              @click="showMapApply = true"
              :underline="false"
              >出图申请
            </el-link></el-form-item
@@ -65,9 +65,9 @@
            <el-button plain size="mini" @click="setMapRemoveDraw()"
              >清除</el-button
            >
            <el-button plain size="mini" @click="setExportMapLayer"
            <!-- <el-button plain size="mini" @click="setExportMapLayer"
              >出图</el-button
            >
            > -->
          </el-form-item>
        </el-form>
      </div>
@@ -150,6 +150,12 @@
          </el-table-column>
          <el-table-column property="name" label="名称"> </el-table-column>
          <el-table-column property="type" label="类型"> </el-table-column>
          <el-table-column
            property="createTime"
            :formatter="formatTime"
            label="日期"
          >
          </el-table-column>
          <el-table-column property="descr" label="描述"> </el-table-column>
          <el-table-column label="操作" width="120">
            <template slot-scope="scope">
@@ -235,6 +241,7 @@
import { removeToken, getToken } from '@/utils/auth';
import $ from 'jquery';
import { exportSelectByPage } from '../../api/api.js';
import moment from 'moment';
export default {
  data() {
    return {
@@ -259,7 +266,11 @@
          id: 1,
          label: '图层',
          children: [
            { label: '阀室', value: '阀室' },
            {
              label: '阀室',
              value: '阀室',
              resource: 'http://192.168.20.39:9055/gisserver/wmsserver/lfgd',
            },
            { label: '站场', value: '站场' },
            { label: '管道中心线', value: '管道中心线' },
          ],
@@ -286,6 +297,13 @@
    this.initMap();
  },
  methods: {
    formatTime(row, column) {
      let date = row[column.property];
      if (date === undefined || date === null) {
        return '';
      }
      return moment(parseInt(date)).format('YYYY-MM-DD HH:mm:ss');
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
@@ -299,9 +317,11 @@
      this.getShowMapList();
    },
    async getShowMapList() {
      const data = await exportSelectByPage(this.listdata);
      this.exportable = data.result;
      this.showMapList = true;
      const data = await exportSelectByPage(this.listdata);
      debugger;
      this.exportable = data.result;
      this.count = data.count;
    },
    setExportMapLayer(res) {
@@ -427,17 +447,17 @@
        this.arrList.push({
          name: data.label,
        });
        var wmsLayer = new Image({
          source: new ImageWMS({
            ratio: 1,
            url: data.resource,
            crossOrigin: 'anonymous',
            params: {
              VERSION: '1.3.0',
              FORMAT: 'image/png',
              LAYERS: '',
              srs: 'EPSG:900913',
              srs: 'EPSG:4326',
              tiled: true,
              styles: '',
            },