管道基础大数据平台系统开发-【前端】-新系統界面
src/views/datamanage/uploadmanage.vue
@@ -624,6 +624,58 @@
      </div>
    </el-dialog>
    <!-- OSGB LAS -->
    <el-dialog
      :title="$t('common.publish')"
      :visible.sync="insertOsgbVisible"
      width="25%"
      :close-on-click-modal="false"
      :show-close="false"
    >
      <div style="width:100%; ">
        <el-form
          :model="osgbLasLayer"
          label-width="160px"
        >
          <el-form-item :label="$t('dataManage.vmobj.heightOffset')">
            <el-input
              :placeholder="$t('dataManage.vmobj.label1')"
              v-model="osgbLasLayer.z"
            ></el-input>
          </el-form-item>
          <el-form-item
            v-if="formInline.type == 'LAS'"
            :label="$t('dataManage.vmobj.coordinateSystemID')"
          >
            <el-select
              v-model="osgbLasLayer.strid"
              :placeholder="$t('dataManage.vmobj.label2')"
              style="width: 100%;"
            >
              <el-option
                v-for="item in stridOption"
                :key="item.id"
                :label="item.coordinate"
                :value="item.epsgcode"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-form>
        <div style="display: flex; justify-content: end;margin-top:10px;">
          <el-button
            size="small"
            type="primary"
            @click="setOsgbInsert"
          >{{$t('common.submit')}}</el-button>
          <el-button
            size="small"
            type="info"
            @click="setOsgbCanel"
          >{{$t('common.cancel')}}</el-button>
        </div>
      </div>
    </el-dialog>
    <div
      class="loadBox"
      v-if="loadDialogVisible"
@@ -662,6 +714,7 @@
  publish_deletes,
  publish_update,
  publish_insert,
  dataUpload_selectCoords
} from '../../api/api.js'
import { conditions } from '../Archive/Archive';
@@ -703,6 +756,12 @@
        value: 'MPT',
        label: '场景数据(.mpt)'
      }, {
        value: 'OSGB',
        label: '倾斜数据(.osgb)'
      }, {
        value: 'LAS',
        label: '点云数据(.las, .laz)'
      }, {
        value: 'CPT',
        label: '点云数据(.cpt)'
      }, {
@@ -733,11 +792,66 @@
      loadDialogVisible: false,
      options: [],
      isFullscreen: false,
      insertOsgbVisible: false,
      osgbLasLayer: {
        z: '0',
        strid: ''
      },
      stridOption: [],
    }
  },
  methods: {
    setOsgbCanel() {
      this.insertOsgbVisible = false;
      this.osgbLasLayer = {
        z: '0',
        strid: ''
      }
    },
    async setOsgbInsert() {
      var ids = [];
      for (var i in this.multipleSelection) {
        ids.push(this.multipleSelection[i].id)
      }
      var strid;
      if (this.formInline.type == 'LAS') {
        if (!this.osgbLasLayer.strid) {
          return this.$message('请选择发布数据的坐标系');
        } else {
          strid = this.osgbLasLayer.strid.replace('EPSG:', '')
        }
      }
      var obj = {
        dircode: this.formInline.dirid,
        depcode: this.formInline.depid,
        min: null,
        max: null,
        name: null,
        type: this.formInline.type,
        noData: null,
        ids: ids,
        models: null,
        srid: parseInt(strid),
        z: parseFloat(parseFloat(this.osgbLasLayer.z).toFixed(3))
      }
      this.loadDialogVisible = true
      this.setOsgbCanel();
      const data = await publish_insert(obj);
      if (data.code == 200 && data.result > 0) {
        this.$message({
          message: '数据发布成功',
          type: 'success'
        });
      } else {
        this.$message.error("数据发布失败")
      }
      this.loadDialogVisible = false
      this.getTableData();
    },
    setModelCanel() {
      this.insertModelVisible = false;
      this.modelOptions = [];
@@ -900,11 +1014,17 @@
          val[i].isModel = null
        }
        this.modelOptions = val;
        this.insertModelVisible = true;
      } else if (this.formInline.type == "OSGB") {
        this.insertOsgbVisible = true;
      } else if (this.formInline.type == "LAS") {
        const data = await dataUpload_selectCoords();
        if (data.code != 200) {
          this.$message('坐标系数据获取失败');
        }
        this.stridOption = data.result;
        this.insertOsgbVisible = true;
      } else {
        var std = [];
        for (var i in this.multipleSelection) {
@@ -988,10 +1108,10 @@
        var that = this
        this.$confirm('确定是否删除所选内容?')
          .then(_ => {
            done();
            that.deletePage()
          })
          .catch(_ => {
            that.deletePage()
          });
      }
    },