管道基础大数据平台系统开发-【前端】-新系統界面
王旭
2023-05-10 7a0c7de021aebbef3ec137f2f94ff73ab41014d7
src/views/datamanage/uploadmanage.vue
@@ -10,7 +10,7 @@
    <div class="tabs_box">
      <div
        class="tabs_pane"
        @click="setTabsChange()"
        @click="setTabsChange(1)"
      >
        <div
          class="tabsSpan"
@@ -21,7 +21,7 @@
      </div>
      <div
        class="tabs_pane"
        @click="setTabsChange()"
        @click="setTabsChange(2)"
      >
        <div
          class="tabsSpan"
@@ -30,8 +30,22 @@
          <span> {{$t('dataManage.uploadObj.releaseList')}}</span>
        </div>
      </div>
      <div
        class="tabs_pane"
        @click="setTabsChange(3)"
      >
        <div
          class="tabsSpan"
          :class="{ changetabs : active == 'third'}"
        >
          <span> {{$t('dataManage.uploadObj.modelAttachMount')}}</span>
        </div>
      </div>
    </div>
    <div class="content_box">
    <div
      v-if="active != 'third'"
      class="content_box"
    >
      <el-form
        :inline="true"
        :model="formInline"
@@ -115,12 +129,14 @@
            size="small"
            :title="$t('dataManage.vmobj.keyword')"
            v-model="formInline.name"
              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuedataName')"
          > <i
              @click="getTableData"
              :title="$t('common.iquery')"
              slot="suffix"
              class="el-icon-search"
              style="padding-right: 8px"
            ></i></el-input>
        </el-form-item>
        <el-form-item style="float:right">
@@ -155,8 +171,8 @@
        <el-table
          :data="tableData"
          style="width: 100%"
          border
          @selection-change="handleSelectionChange"
          @cell-dblclick="copyText"
          height="calc(100% - 1px)"
        >
          <el-table-column
@@ -280,6 +296,12 @@
        >
        </el-pagination>
      </div>
    </div>
    <div
      v-if="active == 'third'"
      class="content_box"
    >
      <mapview v-if="active == 'third'"></mapview>
    </div>
    <!-- 地址预览 -->
    <el-dialog
@@ -420,7 +442,7 @@
      :close-on-click-modal="false"
      :show-close="false"
    >
      <div style="width:100%;height:30vh">
      <div style="width:100%; ">
        <el-form
          ref="form"
          :model="insertLayer"
@@ -437,6 +459,24 @@
              disabled
              v-model="insertLayer.number"
            ></el-input>
          </el-form-item>
          <el-form-item
            :label="$t('dataManage.vmobj.labe14')"
            v-show="formInline.type =='DOM'"
          >
            <el-select
              style="width:100%"
              v-model="insertLayer.noData"
            >
              <el-option
                label="黑色"
                value="0"
              ></el-option>
              <el-option
                label="白色"
                value="255"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="$t('dataManage.vmobj.minLevel')">
            <!-- <el-input
@@ -563,6 +603,9 @@
        value: 'DOM',
        label: '影像数据(.tif, .img)'
      }, {
        value: 'DEM',
        label: '高程数据(.tif)'
      }, {
        value: 'MPT',
        label: '场景数据(.mpt)'
      }, {
@@ -588,16 +631,26 @@
      detailsDialogVisible: false,
      itemdetail: {},
      insertDialogVisible: false,
      insertLayer: { name: '', number: null, min: 4, max: 18 },
      insertLayer: { name: '', number: null, min: 4, max: 18, noData: '0' },
      loadDialogVisible: false,
      options: [],
      isFullscreen: false,
    }
  },
  methods: {
    copyText(row, column, cell, event) {
      // 双击复制
      let save = function (e) {
        e.clipboardData.setData('text/plain', event.target.innerText);
        e.preventDefault();  //阻止默认行为
      }
      document.addEventListener('copy', save);//添加一个copy事件
      document.execCommand("copy");//执行copy方法
      this.$message({ message: '复制成功', type: 'success' })//提示
    },
    setOptions() {
      var std = [];
      for (var i = 0; i < 21; i++) {
      for (var i = 0; i < 23; i++) {
        std.push({
          value: i,
          label: i
@@ -655,7 +708,8 @@
        max: max,
        name: name,
        ids: std,
        type: this.formInline.type
        type: this.formInline.type,
        noData: this.insertLayer.noData
      }
      this.loadDialogVisible = true
      this.insertDialogVisible = false;
@@ -677,12 +731,13 @@
    //数据发布
    async setPagePublish() {
      if (this.multipleSelection.length == 0) {
        this.$message.error("请选择要发布的数据")
        this.$message("请选择要发布的数据")
        return
      }
      if (this.formInline.type == "DOM") {
      if (this.formInline.type == "DOM" || this.formInline.type == "DEM") {
        this.insertLayer.name = this.formInline.dirName;
        this.insertLayer.number = this.multipleSelection.length
        this.insertLayer.noData = '0';
        this.insertDialogVisible = true;
      } else {
        var std = [];
@@ -692,7 +747,6 @@
        var obj = {
          dircode: this.formInline.dirid,
          depcode: this.formInline.depid,
          ids: std,
          type: this.formInline.type
        }
@@ -720,6 +774,10 @@
    },
    //修改提交
    async setEditLayerSubmit() {
      if (this.editLayer.url) {
        var url = this.editLayer.url;
        this.editLayer.url = url.replace(iisHost, "{host}");
      }
      const data = await publish_update(this.editLayer);
      if (data.code != 200) {
        this.$message.error("数据修改失败")
@@ -797,6 +855,7 @@
    },
    //预览弹窗关闭
    handleClose() {
      this.getTableData();
      this.dialogVisible = false;
      this.showMapView = false;
@@ -843,17 +902,23 @@
      this.getTableData();
    },
    //tabs切換
    setTabsChange() {
      switch (this.active) {
        case 'first':
          this.active = 'second';
          this.setPageStart();
          break;
        case 'second':
    setTabsChange(res) {
      switch (res) {
        case 1:
          this.active = 'first';
          this.setPageStart();
          break;
        case 2:
          this.active = 'second';
          this.setPageStart();
          break;
        case 3:
          this.$store.state.previewLayer = {
            url: "menuLayer"
          }
          this.active = 'third';
          break;
      }
    },
    //页面初始化
@@ -870,17 +935,17 @@
      if (this.active == "first") {
        this.listData = {
          pageIndex: 1,
          pageSize: 100,
          pageSize: 10,
          count: 0
        }
        this.showPageSize = [100, 200, 500, 1000]
        this.showPageSize = [10, 50, 100, 200]
      } else {
        this.listData = {
          pageIndex: 1,
          pageSize: 10,
          count: 0
        }
        this.showPageSize = [10, 20, 50, 100]
        this.showPageSize = [10, 50, 100, 200]
      }
      this.formInline.type = this.typeOption[0].value;
@@ -937,6 +1002,7 @@
    async getTableData() {
      this.tableData = [];
      this.listData.count = 0;
      this.listData.pageIndex = 1;
      if (this.active == "first") {
        this.listData.depcode = this.formInline.depid;