月球大数据地理空间分析展示平台-【中台】
Surpriseplus
2023-08-30 9370afd29a8f6662921cc3f0f9e0f78890061326
src/views/datamanage/resourceManagement.vue
@@ -190,7 +190,7 @@
          />
          <el-table-column
            :label="$t('common.operate')"
            width="150"
            width="200"
          >
            <template slot-scope="scope">
              <el-button
@@ -199,6 +199,12 @@
                type="warning"
                plain
              >{{ $t('common.update') }}</el-button>
              <el-button
                size="small"
                v-show="scope.row.status != 0"
                plain
                @click="setScopePreview(scope.row)"
              >{{ $t('common.preview') }}</el-button>
            </template>
          </el-table-column>
@@ -519,10 +525,37 @@
        </span>
      </div>
    </el-dialog>
    <!-- 地址预览 -->
    <el-dialog
      :title="$t('common.preview')"
      :class="isFullscreen ? '' : 'dialogClass_his'"
      custom-class="handleDialogClass"
      width="73.4%"
      :fullscreen="isFullscreen"
      v-if="prevDialog"
      :visible.sync="prevDialog"
      :show-close="false"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
    >
      <dialog-header
        slot="title"
        :dialog-tittle="$t('common.preview')"
        :fullscreen="isFullscreen"
        @handle-closed="handleClose"
        @is-fullscreen="onFullscreen"
      ></dialog-header>
      <div :class="{'fullscreen1':isFullscreen}">
        <mapview v-if="showMapView"></mapview>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import MyBread from "../../components/MyBread.vue";
import dialogHeader from './dialogHeader.vue'
import server from '../../components/js/server.js'
import {
  getPerms,
  select_Res_ByPageAndCount,
@@ -536,11 +569,11 @@
import { serve_type, data_type, category_type } from './js/layerManage.js'
import { json } from "body-parser";
import { flatten } from '@turf/turf';
import mapview from '../../components/MapView/moonMap.vue'
export default {
  name: "catalogueManage",
  components: {
    MyBread,
    MyBread, mapview, 'dialog-header': dialogHeader,
  },
  data() {
@@ -580,6 +613,9 @@
      categoryType: [],
      insertDisabled: false,
      editDisabled: false,
      isFullscreen: false,
      prevDialog: false,
      showMapView: false,
    };
  },
  watch: {
@@ -590,7 +626,22 @@
    window.removeEventListener("resize", this.onResize);
  },
  methods: {
    //是否为全屏函数
    onFullscreen(fullscreen) {
      this.isFullscreen = fullscreen;
    },
    //预览弹窗关闭
    handleClose() {
      this.prevDialog = false
      this.showMapView = false;
    },
    async setEditConfirm() {
      if (this.editData.url.indexOf('?') > -1) {
        var val = this.editData.url.split("?");
        this.editData.url = val[0];
        this.editData.args = this.editData.args + val[1];
      }
      const data = await res_update(this.editData);
      if (data.code == 200) {
        this.$message({
@@ -716,6 +767,12 @@
        .catch(_ => { });
    },
    async setInsertConfirm() {
      if (this.insertData.url.indexOf('?') > -1) {
        var val = this.insertData.url.split("?");
        this.insertData.url = val[0];
        this.insertData.args = val[1] + this.insertData.args;
      }
      this.insertData.status = parseInt(this.insertData.status)
      const data = await res_insert(this.insertData);
      if (data.code == 200) {
@@ -764,6 +821,13 @@
        this.editData.data = parseInt(this.editData.data)
      }
      this.editDialog = true
    },
    setScopePreview(row) {
      this.prevDialog = true;
      this.showMapView = true;
      setTimeout(() => {
        server.addLayer(row)
      }, 1000);
    },
    formatProxy(row, column) {
      var token = getToken()
@@ -1024,6 +1088,10 @@
    }
  }
}
.fullscreen1 {
  width: 100%;
  height: 94vh;
}
/deep/ .el-input__suffix {
  top: 50%;
  transform: translateY(-50%);
@@ -1031,6 +1099,12 @@
.insertWidth {
  width: calc(100% - 200px);
}
/deep/.el-dialog__body {
  padding: 10px !important;
}
/deep/.el-dialog__header {
  padding: 10px !important;
}
</style>
<style >
.el-message-box {