管道基础大数据平台系统开发-【前端】-新系統界面
1
Surpriseplus
2023-08-02 7c515e10fcdffcff295a04533b5789a373aee59d
src/views/datamanage/uploadmanage.vue
@@ -32,6 +32,17 @@
      </div>
      <div
        class="tabs_pane"
        @click="setTabsChange(4)"
      >
        <div
          class="tabsSpan"
          :class="{ changetabs : active == 'fourth'}"
        >
          <span> {{$t('dataManage.uploadObj.publishTask')}}</span>
        </div>
      </div>
      <div
        class="tabs_pane"
        @click="setTabsChange(3)"
      >
        <div
@@ -146,7 +157,7 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item v-if="active == 'second'">
        <el-form-item v-if="active == 'second'  || active == 'fourth'">
          <el-select
            size="small"
            v-model="formInline.type1"
@@ -155,6 +166,22 @@
          >
            <el-option
              v-for="item in typeOption1"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item v-if="active == 'fourth'">
          <el-select
            size="small"
            v-model="formInline.status"
            @change="handleTypeChange2"
            placeholder="请选择数据类别..."
          >
            <el-option
              v-for="item in typeOption2"
              :key="item.value"
              :label="item.label"
              :value="item.value"
@@ -206,6 +233,7 @@
      <div class="dividing-line"></div>
      <div class="table_box content_Table">
        <el-table
          v-if="active !='fourth'"
          :data="tableData"
          style="width: 100%"
          @selection-change="handleSelectionChange"
@@ -260,6 +288,7 @@
            key="7"
          />
          <el-table-column
            v-if="active == 'first'"
            prop="verName"
            :label="$t('dataManage.vmobj.versionNumber')"
            align="center"
@@ -291,6 +320,7 @@
            align="center"
            key="12"
          />
          <el-table-column
            v-if="active == 'first'"
            prop="createTime"
@@ -303,6 +333,20 @@
            </template>
          </el-table-column>
          <el-table-column
            prop="updateName"
            :label="$t('dataManage.vmobj.updateonuser')"
            align="center"
            key="14"
          />
          <el-table-column
            prop="updateTime"
            :label="$t('dataManage.vmobj.updateontime')"
            :formatter="formatData"
            align="center"
            key="15"
          />
          <el-table-column
            min-width="150"
            :label="$t('common.operate')"
@@ -344,6 +388,92 @@
                plain
              >已发布
              </el-button>
            </template>
          </el-table-column>
        </el-table>
        <el-table
          v-if="active ==  'fourth'"
          :data="tableData"
          style="width: 100%"
          height="calc(100% - 1px)"
          ref="tableBox"
        >
          <!-- <el-table-column
            prop="name"
            :label="$t('dataManage.vmobj.name')"
            align="center"
            key="1"
          ></el-table-column> -->
          <el-table-column
            prop="name"
            :label="$t('dataManage.vmobj.name')"
            align="center"
            key="3"
          ></el-table-column>
          <el-table-column
            prop="status"
            :label="$t('dataManage.styleObj.status')"
            align="center"
            key="4"
            :formatter="stateFormatStatus"
          ></el-table-column>
          <el-table-column
            prop="type"
            :label="$t('dataManage.styleObj.type')"
            align="center"
            key="5"
          ></el-table-column>
          <el-table-column
            prop="descr"
            :label="$t('dataManage.styleObj.descr')"
            align="center"
            key="6"
          ></el-table-column>
          <el-table-column
            prop="err"
            :label="$t('common.err')"
            align="center"
            key="7"
          ></el-table-column>
          <el-table-column
            prop="createName"
            :label="$t('common.rublisher')"
            align="center"
            key="8"
          />
          <el-table-column
            prop="createTime"
            :label="$t('common.releaseTime')"
            :formatter="formatData"
            align="center"
            key="9"
          />
          <el-table-column
            prop="updateName"
            :label="$t('dataManage.vmobj.updateonuser')"
            align="center"
            key="10"
          />
          <el-table-column
            prop="updateTime"
            :label="$t('dataManage.vmobj.updateontime')"
            :formatter="formatData"
            align="center"
            key="11"
          />
          <el-table-column
            min-width="80"
            :label="$t('common.operate')"
          >
            <template slot-scope="scope">
              <el-button
                v-if="scope.row.status == '1'"
                size="small"
                type="danger"
                plain
                @click="setCannelTask(scope.row)"
              >{{$t('common.endTask')}}
              </el-button>
            </template>
          </el-table-column>
@@ -779,7 +909,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>
@@ -803,7 +933,9 @@
  publish_update,
  publish_insert,
  dataUpload_selectCoords,
  publish_selectLasCs
  publish_selectLasCs,
  task_selectByPageAndCount,
  task_deleteTask
} from '../../api/api.js'
import { conditions } from '../Archive/Archive';
@@ -826,6 +958,7 @@
        name: "",
        type: "",
        type1: "All",
        status: 'All'
      },
      listData: {
        pageIndex: 1,
@@ -892,6 +1025,25 @@
        value: 'BIM',
        label: '三维模型(.fbx, .ifc, .rvt)'
      }],
      typeOption2: [{
        label: '全部',
        value: 'All'
      }, {
        label: '未开始',
        value: 0
      }, {
        label: '进行中',
        value: 1
      }, {
        label: '正常结束',
        value: 2
      }, {
        label: '用户结束',
        value: 3
      }, {
        label: '运行出错',
        value: 4
      }],
      defaultProps: {
        label: "name",
        value: "id",
@@ -920,9 +1072,11 @@
      },
      stridOption: [],
      osgbLasOption: [],
      loadingText: '数据发布中'
    }
  },
  methods: {
    setOsgbCanel() {
      this.insertOsgbVisible = false;
      this.osgbLasLayer = {
@@ -972,6 +1126,7 @@
        srids: srids,
        zx: zs
      }
      this.loadingText = '数据发布中';
      this.loadDialogVisible = true
      this.setOsgbCanel();
      const data = await publish_insert(obj);
@@ -1025,6 +1180,7 @@
        models: models
      }
      this.loadingText = '数据发布中';
      this.loadDialogVisible = true
      this.insertModelVisible = false;
@@ -1064,7 +1220,9 @@
      this.options = std;
    },
    setloadDialogVisible() {
      this.loadDialogVisible = false
      this.loadDialogVisible = false;
      this.loadingText = '数据发布中';
    },
    setinsertLayerCancel() {
      this.insertDialogVisible = false;
@@ -1115,6 +1273,7 @@
        type: this.formInline.type,
        noData: this.insertLayer.noData
      }
      this.loadingText = '数据发布中';
      this.loadDialogVisible = true
      this.insertDialogVisible = false;
@@ -1209,7 +1368,7 @@
          ids: std,
          type: this.formInline.type
        }
        this.loadingText = '数据发布中';
        this.loadDialogVisible = true
        this.insertDialogVisible = false;
@@ -1266,6 +1425,24 @@
          });
      }
    },
    async setCannelTask(res) {
      const data = await task_deleteTask({ id: res.id })
      if (data.result == 200) {
        this.$message({
          message: '任务结束成功',
          type: 'success'
        });
      } else {
        this.$message.error({
          message: '任务结束失败',
        });
      }
      this.getTableData();
    },
    //修改弹窗
    setPreviewEdit(res) {
      this.updateLayer = JSON.stringify(res) //备份;
@@ -1280,6 +1457,7 @@
        var that = this
        this.$confirm('确定是否删除所选内容?')
          .then(_ => {
            that.deletePage()
          })
          .catch(_ => {
@@ -1288,6 +1466,8 @@
      }
    },
    async deletePage() {
      this.loadingText = '数据删除中';
      this.loadDialogVisible = true;
      var std = [];
      for (var i in this.multipleSelection) {
        std.push(this.multipleSelection[i].id);
@@ -1303,6 +1483,7 @@
        });
        this.getTableData();
      }
      this.loadDialogVisible = false;
    },
    //预览弹窗打开
    setPreviewLayer(res) {
@@ -1332,6 +1513,26 @@
        return val + " GB"
      } else {
        return row.sizes + " MB"
      }
    },
    stateFormatStatus(row, column) {
      switch (row.status) {
        case 0:
          return '未开始';
          break;
        case 1:
          return '进行中';
          break;
        case 2:
          return '正常结束';
          break;
        case 3:
          return '用户结束';
          break;
        case 4:
          return '运行出错';
          break;
      }
    },
    //格式化地址
@@ -1379,6 +1580,10 @@
          }
          this.active = 'third';
          break;
        case 4:
          this.active = 'fourth';
          this.setPageStart();
          break;
@@ -1401,9 +1606,17 @@
        depName: null,
        name: "",
        type: "",
        type1: "All"
        type1: "All",
        status: 'All'
      }
      if (this.active == "first") {
        this.listData = {
          pageIndex: 1,
          pageSize: 10,
          count: 0
        }
        this.showPageSize = [10, 50, 100, 200]
      } if (this.active == "fourth") {
        this.listData = {
          pageIndex: 1,
          pageSize: 10,
@@ -1418,8 +1631,12 @@
        }
        this.showPageSize = [10, 50, 100, 200, 500]
        this.formInline.type1 = this.typeOption1[0].value;
        this.formInline.dirid2 = this.dirOption2[0].code;
        this.formInline.dirName2 = this.dirOption2[0].name;
        if (this.dirOption2.length > 0) {
          this.formInline.dirid2 = this.dirOption2[0].code;
          this.formInline.dirName2 = this.dirOption2[0].name;
        }
      }
      this.formInline.type = this.typeOption[0].value;
@@ -1467,7 +1684,6 @@
    },
    //版本列表切换
    handleVerChange(value) {
      this.formInline.verid = value;
      this.getTableData();
    },
@@ -1478,6 +1694,12 @@
    },
    handleTypeChange1(value) {
      this.formInline.type1 = value;
      this.getTableData();
    },
    handleTypeChange2(value) {
      this.formInline.status = value;
      this.getTableData();
    },
    //单位列表切换
@@ -1498,10 +1720,6 @@
      this.formInline.dirName2 = data.name
      this.getTableData();
    },
    //获取Table表格数据
    async getTableData() {
@@ -1540,8 +1758,33 @@
          this.tableData = val;
          this.listData.count = data.count;
        }
      }
      else {
      } else if (this.active == "fourth") {
        if (this.formInline.status == 'All') {
          this.listData.status = null;
        } else {
          this.listData.status = this.formInline.status
        }
        if (this.formInline.type1 == 'All') {
          this.listData.type = null;
        } else {
          this.listData.type = this.formInline.type1
        }
        if (this.formInline.name) {
          this.listData.name = this.formInline.name;
        }
        this.tableData = [];
        const data = await task_selectByPageAndCount(this.listData)
        if (data.code != 200) {
        }
        this.tableData = data.result;
        this.listData.count = data.count;
      } else {
        this.listData.name = this.formInline.name
        if (this.formInline.dirid2 == 'All') {
          this.listData.dircode = this.formInline.dirid2.replace('All', '');