管道基础大数据平台系统开发-【前端】-新系統界面
surprise
2023-11-29 97277a2c41d80bbf375f88a47e242f1b17602b2b
src/views/datamanage/uploadmanage.vue
@@ -49,7 +49,7 @@
          class="tabsSpan"
          :class="{ changetabs : active == 'third'}"
        >
          <span> {{$t('dataManage.uploadObj.modelAttachMount')}}</span>
          <span> {{$t('dataManage.uploadObj.attachMount')}}</span>
        </div>
      </div>
    </div>
@@ -807,68 +807,27 @@
        <div
          v-for="item in osgbLasOption"
          style="margin-top: 10px; display: flex; align-items: center; justify-content: space-around;  "
          style="margin-top: 10px; display: flex; justify-content: center; align-items: center; "
        >
          <div
            class="contLable"
            style=" margin: 0px 10px;"
          >
          <div style=" text-align: center; ">
            {{ item.name }}
          </div>
          <div>
            <div style="display: flex; align-items: center; margin: 0px 10px;">
              <label class="contLable">高度偏移量:</label>
              <el-input
                size="small"
                v-model="item.zs"
              >
                <i slot="suffix">m</i></el-input>
            </div>
          </div>
          <div v-show="formInline.type =='LAS'">
            <div style="display: flex;  align-items: center; margin: 0px 10px;">
              <label class="contLable">坐标系:</label>
              <el-select
                v-if="!item.lids"
                v-model="item.srids"
                style="width: 100%;"
                size="small"
              >
                <el-option
                  v-for="item in stridOption"
                  :key="item.id"
                  :label="item.coordinate"
                  :value="item.epsgcode"
                >
                </el-option>
              </el-select>
              <el-input
                v-if="item.lids"
                v-model="item.srids"
                size="small"
                disabled
              ></el-input>
            </div>
          </div>
        </div>
        <!-- <el-form-item :label="$t('dataManage.vmobj.heightOffset')">
          <!-- <div style="display: flex; align-items: center; margin: 0px 10px;">
            <label class="contLable">高度偏移量:</label>
            <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')"
          >
              size="small"
              v-model="item.zs"
            >
              <i slot="suffix">m</i></el-input>
          </div>
          <div style="display: flex;  align-items: center; ">
            <label class="contLable">坐标系:</label>
            <el-select
              v-model="osgbLasLayer.strid"
              :placeholder="$t('dataManage.vmobj.label2')"
              v-if="!item.lids"
              v-model="item.srids"
              style="width: 100%;"
              size="small"
            >
              <el-option
                v-for="item in stridOption"
@@ -878,8 +837,14 @@
              >
              </el-option>
            </el-select>
          </el-form-item> -->
            <el-input
              v-if="item.lids"
              v-model="item.srids"
              size="small"
              disabled
            ></el-input>
          </div> -->
        </div>
        <div style="display: flex; justify-content: end;margin-top:10px;">
          <el-button
            size="small"
@@ -914,6 +879,21 @@
      >
      </div>
    </div>
    <el-dialog
      :title="$t('common.details')"
      :visible.sync="rasterCsVisible"
      :close-on-click-modal="false"
      width="35%"
    >
      <div class="rasterCsBox">
        <div v-for="(item,index) in rasterCsOption">
          <div class="rasterCsContent">
            <label>{{ item.name }} : </label>
            <label>{{ item.bak }}</label>
          </div>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
@@ -935,7 +915,8 @@
  dataUpload_selectCoords,
  publish_selectLasCs,
  task_selectByPageAndCount,
  task_deleteTask
  task_deleteTask,
  publish_selectRasterCs
} from '../../api/api.js'
import { conditions } from '../Archive/Archive';
@@ -1072,7 +1053,9 @@
      },
      stridOption: [],
      osgbLasOption: [],
      loadingText: '数据发布中'
      loadingText: '数据发布中',
      rasterCsVisible: false,
      rasterCsOption: []
    }
  },
  methods: {
@@ -1088,24 +1071,32 @@
      var ids = [];
      var zs = []
      for (var i in this.osgbLasOption) {
        ids.push(this.osgbLasOption[i].id)
        zs.push(this.osgbLasOption[i].zs)
      }
      var models = []
      var srids = [];
      var lerro = [];
      for (var i in this.osgbLasOption) {
        ids.push(this.osgbLasOption[i].id)
        // zs.push(this.osgbLasOption[i].zs)
        zs.push(0)
        srids.push(0)
        models.push(0)
      }
      var name = this.osgbLasOption[0].name
      if (this.formInline.type == 'LAS') {
        for (var i in this.osgbLasOption) {
          if (this.osgbLasOption[i].srids) {
            var epsg = this.osgbLasOption[i].srids.replace('EPSG:', '')
            srids.push(epsg)
          } else {
            lerro.push(this.osgbLasOption[i].name)
          }
          // if (this.osgbLasOption[i].srids) {
          //   //var epsg = this.osgbLasOption[i].srids.replace('EPSG:', '')
          //   // srids.push(epsg)
          //   srids.push("00")
          // } else {
          //   lerro.push(this.osgbLasOption[i].name)
          // }
          srids.push(0)
        }
        if (lerro.length > 0) {
          return this.$message(lerro + '未选择发布数据的坐标系');
        }
        // if (lerro.length > 0) {
        //   return this.$message(lerro + '未选择发布数据的坐标系');
        // }
        // if (!this.osgbLasLayer.strid) {
        //   return this.$message('请选择发布数据的坐标系');
@@ -1116,31 +1107,18 @@
      var obj = {
        dircode: this.formInline.dirid,
        depcode: this.formInline.depid,
        min: null,
        max: null,
        name: null,
        min: 0,
        max: 0,
        name: name,
        type: this.formInline.type,
        noData: null,
        noData: 0,
        ids: ids,
        models: null,
        srids: srids,
        zx: zs
        models: models,
        srids: [],
        zs: zs
      }
      this.loadingText = '数据发布中';
      this.loadDialogVisible = true
      this.setOsgbCanel();
      const data = await publish_insert(obj);
      this.setPublish_insert(obj)
      if (data.code == 200 && data.result > 0) {
        this.$message({
          message: '数据发布成功',
          type: 'success'
        });
      } else {
        this.$message.error("数据发布失败")
      }
      this.loadDialogVisible = false
      this.getTableData();
    },
    setModelCanel() {
@@ -1180,22 +1158,7 @@
        models: models
      }
      this.loadingText = '数据发布中';
      this.loadDialogVisible = true
      this.insertModelVisible = false;
      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();
      this.setPublish_insert(obj)
    },
@@ -1263,6 +1226,21 @@
      for (var i in this.multipleSelection) {
        std.push(this.multipleSelection[i].id)
      }
      // if (this.formInline.type == 'DOM') {
        // const data1 = await publish_selectRasterCs({
        //   ids: std.toString()
        // })
        // if (data1.code == 200 && data1.result.length == 0) {
        // } else {
        //   this.rasterCsOption = data1.result;
        //   this.insertDialogVisible = false;
        //   this.rasterCsVisible = true;
        //   return
        // }
      // }
      var obj = {
        dircode: this.formInline.dirid,
        depcode: this.formInline.depid,
@@ -1273,23 +1251,11 @@
        type: this.formInline.type,
        noData: this.insertLayer.noData
      }
      this.loadingText = '数据发布中';
      this.loadDialogVisible = true
      this.insertDialogVisible = false;
      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();
      this.setPublish_insert(obj)
    },
    //数据发布
    async setPagePublish() {
@@ -1297,7 +1263,6 @@
        this.$message("请选择要发布的数据")
        return
      }
      if (this.formInline.type == "DOM" || this.formInline.type == "DEM") {
        this.insertLayer.name = this.multipleSelection[0].name.split('.')[0];
@@ -1368,24 +1333,41 @@
          ids: std,
          type: this.formInline.type
        }
        this.loadingText = '数据发布中';
        this.loadDialogVisible = true
        this.insertDialogVisible = false;
        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();
        this.setPublish_insert(obj)
      }
    },
    async setPublish_insert(obj) {
      this.insertDialogVisible = false;
      this.insertModelVisible = false;
      this.insertOsgbVisible = false;
      var std = [];
      this.loadingText = '数据发布中';
      this.loadDialogVisible = true
      this.insertDialogVisible = false;
      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();
    },
    //数据详情
    setPreviewDetails(res) {
      this.itemdetail = res;
@@ -1949,7 +1931,17 @@
    padding: 10px !important;
  }
  .contLable {
    width: 160px;
    width: 140px;
    text-align: right;
  }
  .rasterCsBox {
    max-height: 60vh;
    overflow: auto;
    .rasterCsContent {
      padding: 10px;
      font-size: 16px;
      font-family: Source Han Sans CN;
    }
  }
}
</style>