月球大数据地理空间分析展示平台-【中台】
Surpriseplus
2023-09-13 8f6271eca8eb12710a07ed1a1b82fc491dfd4a5a
发布管理添加发布状态
已修改2个文件
94 ■■■■ 文件已修改
src/api/api.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/datamanage/uploadmanage.vue 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/api.js
@@ -1244,3 +1244,7 @@
export function publish_selectSjColorTables(params) {
  return request.get("/publish/selectSjColorTables", { params: params });
}
//数据管理=>查询数简任务状态
export function publish_selectSjMissionStatus(params) {
  return request.get("/publish/selectSjMissionStatus", { params: params });
}
src/views/datamanage/uploadmanage.vue
@@ -697,7 +697,7 @@
      <div
        v-loading="true"
        element-loading-background="rgba(0, 0, 0, 0.0) "
        element-loading-text="数据发布中"
        :element-loading-text="loadingText"
        style="margin: 0px 20px;widht:100%;height:calc(100% - 80px); "
      >
      </div>
@@ -720,7 +720,8 @@
  publish_deletesSjServices,
  publish_update,
  publish_insertSjService,
  publish_selectSjColorTables
  publish_selectSjColorTables,
  publish_selectSjMissionStatus
} from '../../api/api.js'
import { conditions } from '../Archive/Archive';
import { method_option, nodata_Option, server_option, system_Option, type_option } from './js/layerManage';
@@ -805,7 +806,8 @@
        {
          value: 1,
          label: "直方图均衡",
        }]
        }],
      loadingText: '数据发布中',
    }
  },
  methods: {
@@ -913,25 +915,32 @@
      var color2 = null;
      var level = null;
      var val_data = [];
      for (var i in this.renderTypeOptions) {
        if (this.renderTypeOptions[i].name == this.renderType.value) {
          val_data.push(this.renderTypeOptions[i].content.levels);
      var dataId = 0;
      if (this.renderTypeOptions.length > 0) {
        for (var i in this.renderTypeOptions) {
          if (this.renderTypeOptions[i].name == this.renderType) {
            val_data.push(this.renderTypeOptions[i]);
          }
        }
      }
      if (val_data.length > 0) {
        level = val_data[0];
      }
      if (this.colorTableType == 0) {
        color1 = level;
        color1 = level.content.levels;
        dataId = level.data_id;
      } else if (this.colorTableType == 1) {
        color2 = level;
        color2 = level.content.levels;
        dataId = level.data_id;
      }
      var obj = {
        colorTable: color1, // 普通颜色表,可不设
        gradientColorTable: color2,
        dircode: this.formInline.dirid,
        colorTableId: dataId,
        name: name,
        ids: std,
        enhanceType: this.insertLayer.enhanceType,
@@ -943,20 +952,69 @@
      this.loadDialogVisible = true
      this.insertDialogVisible = false;
      this.loadDialogVisible = false
      const data = await publish_insertSjService(obj);
      if (data.code == 200 && data.result && data.result > 0) {
        this.loadDialogVisible = true
        this.getLoadingMsg(data.result);
      } else {
        this.$message.error("数据发布失败")
        this.getTableData();
      }
      if (data.code == 200 && data.result > 0) {
      // if (data.code == 200 && data.result > 0) {
      //   this.$message({
      //     message: '数据发布成功',
      //     type: 'success'
      //   });
      // } else {
      //   this.$message.error("数据发布失败")
      // }
      //
    },
    async getLoadingMsg(res) {
      if (!this.loadDialogVisible) return;
      const data = await publish_selectSjMissionStatus({ id: res })
      if (data.result.status == 3) {
        this.$message({
          message: '数据发布成功',
          type: 'success'
        });
      } else {
        this.loadDialogVisible = false;
        this.getTableData();
      } else if (data.result.status == 5 || data.result.status == 4) {
        this.$message.error("数据发布失败")
        this.loadDialogVisible = false;
        this.getTableData();
      } else {
        if (data.result.process == 100) {
          this.$message({
            message: '数据发布成功',
            type: 'success'
          });
          this.loadDialogVisible = false;
          this.getTableData();
        } else {
          this.loadingText = '数据发布中,已发布 ' + data.result.process + '%';
          var that = this;
          setTimeout(() => {
            that.getLoadingMsg(res);
          }, 3000);
        }
      }
      this.loadDialogVisible = false
      this.getTableData();
    },
    setEnhanceTypeChange(res) {
      var val = this.enhanceOption.filter((res) => {
        if (res.value == this.insertLayer.enhanceType) {
@@ -1512,7 +1570,7 @@
  .loadBox {
    position: fixed;
    z-index: 2002;
    background: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.75);
    width: 100%;
    height: 100%;
    top: 0;