管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-08-21 dc412901096a7ea7d65d1c7e097d7f9043073d93
src/views/datamanage/uploadmanage.vue
@@ -1,5 +1,6 @@
<template>
  <div class="uploads_box">
    <My-bread :list="[
        `${$t('dataManage.dataManage')}`,
        `${$t('dataManage.uploadManage')}`,
@@ -9,7 +10,7 @@
    <div class="tabs_box">
      <div
        class="tabs_pane"
        @click="setTabsChange()"
        @click="setTabsChange(1)"
      >
        <div
          class="tabsSpan"
@@ -20,7 +21,7 @@
      </div>
      <div
        class="tabs_pane"
        @click="setTabsChange()"
        @click="setTabsChange(2)"
      >
        <div
          class="tabsSpan"
@@ -29,8 +30,33 @@
          <span> {{$t('dataManage.uploadObj.releaseList')}}</span>
        </div>
      </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
          class="tabsSpan"
          :class="{ changetabs : active == 'third'}"
        >
          <span> {{$t('dataManage.uploadObj.attachMount')}}</span>
        </div>
      </div>
    </div>
    <div class="content_box">
    <div
      v-if="active != 'third'"
      class="content_box"
    >
      <el-form
        :inline="true"
        :model="formInline"
@@ -78,6 +104,28 @@
            </el-option>
          </el-select>
        </el-form-item>
        <!-- 目录 -->
        <el-form-item v-if="active == 'second'">
          <el-select
            size="small"
            v-model="formInline.dirid2"
            placeholder="请选择项目目录..."
          >
            <el-option
              :value="formInline.dirid2"
              :label="formInline.dirName2"
              style="height: auto"
            >
              <el-tree
                ref="tree"
                :data="dirOption2"
                node-key="id"
                :props="defaultProps"
                @node-click="handleDirChange2"
              />
            </el-option>
          </el-select>
        </el-form-item>
        <!-- 版本 -->
        <el-form-item v-if="active == 'first'">
          <el-select
@@ -109,10 +157,44 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item v-if="active == 'second'  || active == 'fourth'">
          <el-select
            size="small"
            v-model="formInline.type1"
            @change="handleTypeChange1"
            placeholder="请选择数据类别..."
          >
            <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"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-input
            size="small"
            :title="$t('dataManage.vmobj.keyword')"
            v-model="formInline.name"
            :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuedataName')"
          > <i
              @click="getTableData"
              :title="$t('common.iquery')"
@@ -124,12 +206,15 @@
        <el-form-item style="float:right">
          <!-- 发布 -->
          <el-button
            v-if="active == 'first'"
            type="success"
            size="small"
            icon="el-icon-s-promotion"
            @click="setPagePublish"
          >{{$t('common.publish')}}</el-button>
          <!-- 刪除 -->
          <el-button
            v-if="active == 'second'"
            type="danger"
            size="small"
            icon="el-icon-delete"
@@ -148,32 +233,38 @@
      <div class="dividing-line"></div>
      <div class="table_box content_Table">
        <el-table
          v-if="active !='fourth'"
          :data="tableData"
          style="width: 100%"
          border
          @selection-change="handleSelectionChange"
          @cell-dblclick="copyText"
          height="calc(100% - 1px)"
          ref="tableBox"
        >
          <el-table-column
            type="selection"
            width="55"
            key="1"
          />
          <el-table-column
            :label="$t('dataManage.dictionaryManageObj.number')"
            type="index"
            width="50"
            align="center"
            key="2"
          >
          </el-table-column>
          <el-table-column
            prop="type"
            prop="name"
            :label="$t('dataManage.vmobj.name')"
            align="center"
            key="3"
          />
          <el-table-column
            prop="type"
            :label="$t('dataManage.vmobj.format')"
            align="center"
            key="4"
          />
          <el-table-column
            v-if="active == 'first'"
@@ -181,55 +272,108 @@
            :label="$t('dataManage.vmobj.size')"
            :formatter="stateFormatSizes"
            align="center"
            key="5"
          />
          <el-table-column
            prop="depName"
            :label="$t('dataManage.vmobj.depName')"
            align="center"
            key="6"
          />
          <el-table-column
            prop="dirName"
            :label="$t('dataManage.vmobj.dirName')"
            width="200"
            align="center"
            key="7"
          />
          <el-table-column
            v-if="active == 'first'"
            prop="verName"
            :label="$t('dataManage.vmobj.versionNumber')"
            align="center"
            key="8"
          />
          <el-table-column
            prop="url"
            :label="$t('common.publishAddress')"
            align="center"
            key="9"
          />
          <el-table-column
            v-if="active == 'first'"
            prop="uname"
            :label="$t('common.rublisher')"
            align="center"
            :key="Math.random()"
            key="10"
          />
          <el-table-column
            v-if="active != 'first'"
            prop="createName"
            :label="$t('common.rublisher')"
            align="center"
            :key="Math.random()"
            key="11"
          />
          <el-table-column
            prop="createTime"
            :label="$t('common.releaseTime')"
            align="center"
            key="12"
          />
          <el-table-column
            v-if="active == 'first'"
            prop="createTime"
            :label="$t('common.publishStatus')"
            align="center"
            key="13"
          >
            <template slot-scope="scope">
              <span v-if="scope.row.url ">已发布</span>
            </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')"
            v-if="active == 'second'"
          >
            <template slot-scope="scope">
              <el-button
                v-if="scope.row.url"
                v-if="active == 'second'"
                size="small"
                type="info"
                plain
                @click="setPreviewDetails(scope.row)"
              >{{$t('common.details')}}
              </el-button>
              <el-button
                v-if="active == 'second'"
                size="small"
                type="warning"
                plain
                @click="setPreviewEdit(scope.row)"
              >{{$t('common.update')}}
              </el-button>
              <el-button
                v-if="scope.row.url && active == 'second'"
                size="small"
                type="success"
                plain
@@ -238,22 +382,98 @@
              </el-button>
              <el-button
                v-if="scope.row.url"
                v-if="scope.row.url && active == 'first'"
                size="small"
                type="warning"
                type="success"
                plain
                @click="setPreviewLayer(scope.row)"
              >{{$t('common.preview')}}
              >已发布
              </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.url"
                v-if="scope.row.status == '1'"
                size="small"
                type="info"
                type="danger"
                plain
                @click="setPreviewLayer(scope.row)"
              >{{$t('common.preview')}}
                @click="setCannelTask(scope.row)"
              >{{$t('common.endTask')}}
              </el-button>
            </template>
          </el-table-column>
@@ -275,23 +495,397 @@
        </el-pagination>
      </div>
    </div>
    <div
      v-if="active == 'third'"
      class="content_box"
    >
      <mapview v-if="active == 'third'"></mapview>
    </div>
    <!-- 地址预览 -->
    <el-dialog
      :title="$t('common.preview')"
      :class="isFullscreen ? '' : 'dialogClass_his'"
      custom-class="handleDialogClass"
      width="73.4%"
      :fullscreen="isFullscreen"
      v-if="dialogVisible"
      :visible.sync="dialogVisible"
      :show-close="false"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
    >
      <dialog-header
        slot="title"
        :dialog-tittle="$t('common.preview')"
        :fullscreen="isFullscreen"
        @handle-closed="handleClose"
        @is-fullscreen="onFullscreen"
      ></dialog-header>
      <div :class="{'fullscreen1':isFullscreen}">
        <mapview v-if="showMapView"></mapview>
      </div>
    </el-dialog>
    <!-- <el-dialog
      :title="$t('common.preview')"
      :visible.sync="dialogVisible"
      width="70%"
      :before-close="handleClose"
      top="13vh"
      :lock-scroll="false"
      :close-on-press-escape="false"
      :close-on-click-modal="false"
      v-el-drag-dialog
    >
      <div style="width:100%;height:65vh">
        <mapview v-if="showMapView"></mapview>
      <div
        id="MapDiv"
        style="background:red;widht:100%;height:calc(100% - 10px)"
      ></div>
    </el-dialog> -->
    <!-- 修改数据 -->
    <el-dialog
      :title="$t('common.update')"
      :visible.sync="editDialogVisible"
      width="50%"
      :show-close="false"
      :close-on-click-modal="false"
    >
      <div style="width:100%;height:50vh">
        <el-form
          ref="form"
          :model="editLayer"
          label-width="150px"
        >
          <el-form-item :label="$t('dataManage.vmobj.name')">
            <el-input v-model="editLayer.name"></el-input>
          </el-form-item>
          <el-form-item :label="$t('dataManage.vmobj.format')">
            <el-input
              disabled
              v-model="editLayer.type"
            ></el-input>
          </el-form-item>
          <el-form-item :label="$t('dataManage.vmobj.depName')">
            <el-input
              disabled
              v-model="editLayer.depName"
            ></el-input>
          </el-form-item>
          <el-form-item :label="$t('dataManage.vmobj.dirName')">
            <el-input
              disabled
              v-model="editLayer.dirName"
            ></el-input>
          </el-form-item>
          <el-form-item :label="$t('dataManage.vmobj.versionNumber')">
            <el-input
              disabled
              v-model="editLayer.verName"
            ></el-input>
          </el-form-item>
          <el-form-item :label="$t('common.publishAddress')">
            <el-input v-model="editLayer.url"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button
              size="small"
              type="primary"
              @click="setEditLayerSubmit"
            >{{$t('common.submit')}}</el-button>
            <el-button
              size="small"
              type="info"
              @click="setEditLayerCancle"
            >{{$t('common.cancel')}}</el-button>
          </el-form-item>
        </el-form>
      </div>
    </el-dialog>
    <!-- 数据详情 -->
    <el-dialog
      :title="$t('common.details')"
      :visible.sync="detailsDialogVisible"
      width="50%"
      :close-on-click-modal="false"
    >
      <div style="width:100%;height:50vh">
        <p>{{ $t("dataManage.vmobj.name") }}:{{ itemdetail.name }}</p>
        <el-divider></el-divider>
        <p>{{ $t("dataManage.vmobj.format") }}:{{ itemdetail.type }}</p>
        <el-divider></el-divider>
        <p>{{ $t("dataManage.vmobj.depName") }}:{{ itemdetail.depName }}</p>
        <el-divider></el-divider>
        <p>{{ $t("dataManage.vmobj.dirName") }}:{{ itemdetail.dirName }}</p>
        <el-divider></el-divider>
        <p>{{ $t("dataManage.vmobj.versionNumber") }}:{{ itemdetail.verName }}</p>
        <el-divider></el-divider>
        <p>{{ $t("common.publishAddress") }}:{{ itemdetail.url }}</p>
        <el-divider></el-divider>
        <p>{{ $t("common.rublisher") }}:{{ itemdetail.createName }}</p>
        <el-divider></el-divider>
        <p>{{ $t("common.releaseTime") }}:{{ itemdetail.createTime }}</p>
        <el-divider></el-divider>
        <p>{{ $t("dataManage.vmobj.updateonuser") }}:{{ itemdetail.updateName }}</p>
        <el-divider></el-divider>
        <p>{{ $t("dataManage.vmobj.updateontime") }}:{{ itemdetail.updateTime }}</p>
        <el-divider></el-divider>
      </div>
    </el-dialog>
    <!-- 发布 -->
    <el-dialog
      :title="$t('common.publish')"
      :visible.sync="insertDialogVisible"
      width="40%"
      :close-on-click-modal="false"
      :show-close="false"
    >
      <div style="width:100%; ">
        <el-form
          ref="form"
          :model="insertLayer"
          label-width="150px"
        >
          <el-form-item :label="$t('dataManage.vmobj.name')">
            <el-input
              v-model="insertLayer.name"
              :placeholder="$t('dataManage.vmobj.name')"
            ></el-input>
          </el-form-item>
          <el-form-item :label="$t('dataManage.vmobj.numberFiles')">
            <el-input
              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
            v-show="formInline.type !='DEM'"
            :label="$t('dataManage.vmobj.minLevel')"
          >
            <!-- <el-input
              v-model="insertLayer.min"
              :placeholder="$t('dataManage.vmobj.labe11')"
            ></el-input> -->
            <el-select
              style="width:100%"
              v-model="insertLayer.min"
              :placeholder="$t('dataManage.vmobj.labe11')"
            >
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item
            :label="$t('dataManage.vmobj.maxLevel')"
            v-show="formInline.type !='DEM'"
          >
            <!-- <el-input
              v-model="insertLayer.max"
              :placeholder="$t('dataManage.vmobj.labe12')"
            ></el-input> -->
            <el-select
              style="width:100%"
              v-model="insertLayer.max"
              :placeholder="$t('dataManage.vmobj.labe12')"
            >
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-button
              size="small"
              type="primary"
              @click="setinsertLayerSubmit()"
            >{{$t('common.submit')}}</el-button>
            <el-button
              size="small"
              type="info"
              @click="setinsertLayerCancel()"
            >{{$t('common.cancel')}}</el-button>
          </el-form-item>
        </el-form>
      </div>
    </el-dialog>
    <!--模型发布 -->
    <el-dialog
      :title="$t('common.publish')"
      :visible.sync="insertModelVisible"
      width="25%"
      :close-on-click-modal="false"
      :show-close="false"
    >
      <div style="width:100%; ">
        <div
          v-for="item in modelOptions"
          style="margin: 5px;"
        >
          <el-row :gutter="20">
            <el-col :span="10">
              <div
                class="contLable"
                style="height: 64px; display: flex; align-items: center;"
              >
                {{ item.name }}
              </div>
            </el-col>
            <el-col :span="10">
              <div style="height: 64px; display: flex; align-items: center;">
                <el-select
                  size="small"
                  v-model="item.isModel"
                  placeholder="请选择数据类型"
                >
                  <el-option
                    label="单体模型"
                    value="1"
                  ></el-option>
                  <el-option
                    label="倾斜模型"
                    value="0"
                  >倾斜模型</el-option>
                </el-select>
              </div>
            </el-col>
          </el-row>
        </div>
        <div style="display: flex; justify-content: end;margin-top:10px;">
          <el-button
            size="small"
            type="primary"
            @click="setModelInsert"
          >{{$t('common.submit')}}</el-button>
          <el-button
            size="small"
            type="info"
            @click="setModelCanel"
          >{{$t('common.cancel')}}</el-button>
        </div>
      </div>
    </el-dialog>
    <!-- OSGB LAS -->
    <el-dialog
      :title="$t('common.publish')"
      :visible.sync="insertOsgbVisible"
      :close-on-click-modal="false"
      :show-close="false"
      width="35%"
    >
      <div>
        <div
          v-for="item in osgbLasOption"
          style="margin-top: 10px; display: flex; justify-content: center; align-items: center; "
        >
          <div style=" text-align: center; ">
            {{ item.name }}
          </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 style="display: flex;  align-items: center; ">
            <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 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"
    >
      <div style="widht:100%; margin:20px; color:white">
        <div style="margin-left:99%">
          <el-link
            @click="setloadDialogVisible()"
            style="color:white"
          > X</el-link>
        </div>
      </div>
      <div
        v-loading="true"
        element-loading-background="rgba(0, 0, 0, 0.0) "
        :element-loading-text="loadingText"
        style="margin: 0px 20px;widht:100%;height:calc(100% - 80px); "
      >
      </div>
    </div>
  </div>
</template>
<script>
import axios from 'axios';
import dialogHeader from './dialogHeader.vue'
import mapview from '../../components/preview_map.vue'
import MyBread from "../../components/MyBread.vue"
import {
@@ -300,22 +894,36 @@
  meta_selectVerByDirid,
  publish_selectMetasByPage,
  publish_selectByPage,
  publish_deletes
  publish_deletes,
  publish_update,
  publish_insert,
  dataUpload_selectCoords,
  publish_selectLasCs,
  task_selectByPageAndCount,
  task_deleteTask
} from '../../api/api.js'
import { conditions } from '../Archive/Archive';
export default {
  components: { MyBread, mapview },
  components: {
    MyBread, mapview,
    'dialog-header': dialogHeader,
  },
  data() {
    return {
      active: 'first',
      formInline: {
        dirid: null,
        dirid2: null,
        dirName: null,
        dirName2: null,
        depid: null,
        verid: null,
        depName: null,
        name: "",
        type: ""
        type: "",
        type1: "All",
        status: 'All'
      },
      listData: {
        pageIndex: 1,
@@ -325,20 +933,81 @@
      multipleSelection: [],
      tableData: [],
      depOption: [],
      dirOption2: [],
      dirOption: [],
      verOption: [],
      modelOptions: [],
      typeOption: [{
        value: 'DOM',
        label: '影像数据(.tif, .img)'
      }, {
        value: 'DEM',
        label: '高程数据(.tif)'
      }, {
        value: 'MPT',
        label: '场景数据(.mpt)'
      }, {
        value: 'OSGB',
        label: '倾斜数据(.osgb)'
      }, {
        value: 'LAS',
        label: '点云数据(.las, .laz)'
      }, {
        value: 'CPT',
        label: '点云数据(.cpt)'
      }, {
        value: '3DML',
        label: '三维模型(.3dml)'
      }, {
        value: 'BIM',
        label: '三维模型(.fbx, .ifc, .rvt)'
      }],
      typeOption1: [{
        value: 'All',
        label: '全部'
      }, {
        value: 'DOM',
        label: '影像数据(.tif, .img)'
      }, {
        value: 'DEM',
        label: '高程数据(.tif)'
      }, {
        value: 'MPT',
        label: '场景数据(.mpt)'
      }, {
        value: 'OSGB',
        label: '倾斜数据(.osgb)'
      }, {
        value: 'LAS',
        label: '点云数据(.las, .laz)'
      }, {
        value: 'CPT',
        label: '点云数据(.cpt)'
      }, {
        value: '3DML',
        label: '三维模型(.3dml)'
      }, {
        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",
@@ -350,31 +1019,444 @@
      dialogVisible: false,
      showMapView: false,
      showPageSize: [],
      editLayer: {},
      updateLayer: {},
      editDialogVisible: false,
      detailsDialogVisible: false,
      itemdetail: {},
      insertDialogVisible: false,
      insertModelVisible: false,
      insertLayer: { name: '', number: null, min: 4, max: 18, noData: '0' },
      loadDialogVisible: false,
      options: [],
      isFullscreen: false,
      insertOsgbVisible: false,
      osgbLasLayer: {
        z: '0',
        strid: ''
      },
      stridOption: [],
      osgbLasOption: [],
      loadingText: '数据发布中'
    }
  },
  methods: {
    async setPageDelete() {
    setOsgbCanel() {
      this.insertOsgbVisible = false;
      this.osgbLasLayer = {
        z: '0',
        strid: ''
      }
    },
    async setOsgbInsert() {
      var ids = [];
      var 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)
          //   srids.push("00")
          // } else {
          //   lerro.push(this.osgbLasOption[i].name)
          // }
          srids.push(0)
        }
        // if (lerro.length > 0) {
        //   return this.$message(lerro + '未选择发布数据的坐标系');
        // }
        // 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: 0,
        max: 0,
        name: name,
        type: this.formInline.type,
        noData: 0,
        ids: ids,
        models: models,
        srids: [],
        zs: zs
      }
      this.loadingText = '数据发布中';
      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 = [];
    },
    async setModelInsert() {
      var val = this.modelOptions.filter(res => {
        if (!res.isModel) {
          return res
        }
      })
      var str = [];
      if (val.length > 0) {
        for (var i in val) {
          str.push(val[i].name)
        }
        var mesage = str.toString() + '未选择数据类型'
        this.$message(mesage);
        return;
      }
      var ids = [];
      var models = [];
      for (var i in this.modelOptions) {
        ids.push(this.modelOptions[i].id)
        models.push(parseInt(this.modelOptions[i].isModel))
      }
      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: 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();
    },
    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 < 23; i++) {
        std.push({
          value: i,
          label: i
        })
      }
      this.options = std;
    },
    setloadDialogVisible() {
      this.loadDialogVisible = false;
      this.loadingText = '数据发布中';
    },
    setinsertLayerCancel() {
      this.insertDialogVisible = false;
      this.insertLayer = { name: '', number: null, min: 4, max: 18 };
    },
    //发布提交
    async setinsertLayerSubmit() {
      var min = this.insertLayer.min;
      var max = this.insertLayer.max;
      var name = this.insertLayer.name;
      if (this.formInline.type == 'DEM') {
        min = 0;
        max = 18;
      }
      if (!name) {
        this.$message.error("名称不能为空")
        return
      }
      if (parseInt(min) < 0 || parseInt(min) > 20) {
        this.$message.error("最小级别不能小于 0 或大于 20 ")
        return
      }
      if (parseInt(max) < 0 || parseInt(max) > 20) {
        this.$message.error(" 最大级别不能小于 0 或大于 20 ")
        return
      }
      if (parseInt(min) > parseInt(max)) {
        this.$message.error("最小级别不得大于最大级别")
        return
      }
      var std = [];
      for (var i in this.multipleSelection) {
        std.push(this.multipleSelection[i].id)
      }
      var obj = {
        dircode: this.formInline.dirid,
        depcode: this.formInline.depid,
        min: min,
        max: max,
        name: name,
        ids: std,
        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();
    },
    //数据发布
    async setPagePublish() {
      if (this.multipleSelection.length == 0) {
        return this.$message.error("请选择要删除的数据")
        this.$message("请选择要发布的数据")
        return
      }
      if (this.formInline.type == "DOM" || this.formInline.type == "DEM") {
        this.insertLayer.name = this.multipleSelection[0].name.split('.')[0];
        this.insertLayer.number = this.multipleSelection.length
        this.insertLayer.noData = '0';
        this.insertDialogVisible = true;
      } else if (this.formInline.type == "3DML" || this.formInline.type == "BIM") {
        var val = JSON.parse(JSON.stringify(this.multipleSelection))
        for (var i in val) {
          val[i].isModel = null
        }
        this.modelOptions = val;
        this.insertModelVisible = true;
      } else if (this.formInline.type == "OSGB") {
        var val = JSON.parse(JSON.stringify(this.multipleSelection))
        for (var i in val) {
          val[i].zs = 0;
          val[i].srids = null;
        }
        this.osgbLasOption = val;
        this.insertOsgbVisible = true;
      } else if (this.formInline.type == "LAS") {
        var lids = [];
        var val = JSON.parse(JSON.stringify(this.multipleSelection))
        for (var i in val) {
          val[i].zs = 0;
          val[i].srids = null;
          val[i].lids = false;
          lids.push('ids=' + val[i].id)
        }
        var url = lids.join('&')
        const data1 = await publish_selectLasCs(url);
        if (data1.code != 200) {
          this.$message('Las文件坐标系ID失败');
        } else {
          for (var i = 0; i < val.length; i++) {
            var coord = data1.result[i]
            if (coord > 0) {
              val[i].srids = "EPSG:" + coord;
              val[i].lids = true;
            }
          }
        }
        const data = await dataUpload_selectCoords();
        if (data.code != 200) {
          this.$message('坐标系数据获取失败');
        }
        this.stridOption = data.result;
        this.osgbLasOption = val;
        this.insertOsgbVisible = true;
      } else {
        var std = [];
        for (var i in this.multipleSelection) {
          std.push(this.multipleSelection[i].id);
          std.push(this.multipleSelection[i].id)
        }
        const data = await publish_deletes(std);
        if (data.code != 200) {
          this.$message.error("单位列表获取失败")
          return
        } else {
        var obj = {
          dircode: this.formInline.dirid,
          depcode: this.formInline.depid,
          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: '删除成功',
            message: '数据发布成功',
            type: 'success'
          });
          this.getTableData();
        } else {
          this.$message.error("数据发布失败")
        }
        this.loadDialogVisible = false
        this.getTableData();
      }
    },
    //数据详情
    setPreviewDetails(res) {
      this.itemdetail = res;
      this.detailsDialogVisible = true;
    },
    //修改提交
    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("数据修改失败")
        return
      }
      this.$message({
        message: '数据修改成功',
        type: 'success'
      });
      this.getTableData();
      this.editDialogVisible = false;
    },
    //修改取消
    setEditLayerCancle() {
      if (this.editLayer == this.updateLayer) {
        this.editDialogVisible = false;
      } else {
        this.$confirm('确认关闭?')
          .then(_ => {
            done();
          })
          .catch(_ => {
            this.editLayer = JSON.parse(this.updateLayer)
            this.editDialogVisible = false;
          });
      }
    },
    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) //备份;
      this.editLayer = JSON.parse(JSON.stringify(res));
      this.editDialogVisible = true;
    },
    //删除
    setPageDelete() {
      if (this.multipleSelection.length == 0) {
        return this.$message.error("请选择要删除的数据")
      } else {
        var that = this
        this.$confirm('确定是否删除所选内容?')
          .then(_ => {
            that.deletePage()
          })
          .catch(_ => {
          });
      }
    },
    async deletePage() {
      this.loadingText = '数据删除中';
      this.loadDialogVisible = true;
      var std = [];
      for (var i in this.multipleSelection) {
        std.push(this.multipleSelection[i].id);
      }
      const data = await publish_deletes({ ids: std.toString() });
      if (data.code != 200) {
        this.$message.error("单位列表获取失败")
        return
      } else {
        this.$message({
          message: '删除成功',
          type: 'success'
        });
        this.getTableData();
      }
      this.loadDialogVisible = false;
    },
    //预览弹窗打开
    setPreviewLayer(res) {
@@ -382,8 +1464,13 @@
      this.dialogVisible = true;
      this.showMapView = true;
    },
    //是否为全屏函数
    onFullscreen(fullscreen) {
      this.isFullscreen = fullscreen;
    },
    //预览弹窗关闭
    handleClose() {
      this.getTableData();
      this.dialogVisible = false;
      this.showMapView = false;
@@ -399,6 +1486,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;
      }
    },
    //格式化地址
@@ -421,25 +1528,42 @@
    //分页切换
    handleCurrentChange(val) {
      this.listData.pageIndex = val;
      this.getTableData();
      this.getTableData_one();
    },
    //每页显示数量
    handleSizeChange(val) {
      this.listData.pageSize = val;
      this.listData.pageIndex = 1;
      this.getTableData();
      this.getTableData_one();
    },
    //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;
        case 4:
          this.active = 'fourth';
          this.setPageStart();
          break;
          this.$nextTick(() => {
            this.$refs.tableBox.doLayout()
          })
      }
    },
@@ -447,27 +1571,45 @@
    setPageStart() {
      this.formInline = {
        dirid: null,
        dirid2: null,
        dirName: null,
        dirName2: null,
        depid: null,
        verid: null,
        depName: null,
        name: "",
        type: ""
        type: "",
        type1: "All",
        status: 'All'
      }
      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]
      } if (this.active == "fourth") {
        this.listData = {
          pageIndex: 1,
          pageSize: 10,
          count: 0
        }
        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, 500]
        this.formInline.type1 = this.typeOption1[0].value;
        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;
@@ -481,14 +1623,30 @@
        this.$message.error("单位列表获取失败")
        return
      }
      var res = JSON.parse(JSON.stringify(data.result));
      var res_val = res.filter((rs) => {
        if (rs.pid == 0) {
          return rs
        }
      })
      res_val.unshift({
        name: '全部',
        id: 'All',
        pid: 0,
        code: "All"
      })
      this.dirOption2 = this.treeData(res_val)
      this.dirOption = this.treeData(data.result);
      this.formInline.dirid = this.dirOption[0].code;
      this.formInline.dirName = this.dirOption[0].name;
      this.getVerList()
      this.formInline.dirid2 = this.dirOption2[0].code;
      this.formInline.dirName2 = this.dirOption2[0].name;
      this.getVerList(this.dirOption[0].id)
    },
    //获取版本列表
    async getVerList() {
      const data = await meta_selectVerByDirid({ dirid: this.formInline.dirid })
    async getVerList(res) {
      const data = await meta_selectVerByDirid({ dirid: res })
      if (data.code != 200) {
        this.$message.error("版本列表获取失败")
        return
@@ -507,6 +1665,16 @@
      this.formInline.type = value;
      this.getTableData();
    },
    handleTypeChange1(value) {
      this.formInline.type1 = value;
      this.getTableData();
    },
    handleTypeChange2(value) {
      this.formInline.status = value;
      this.getTableData();
    },
    //单位列表切换
    handleDepChange(data, node, nodeData) {
      this.formInline.depid = data.code
@@ -515,15 +1683,25 @@
    },
    //目录列表切换
    handleDirChange(data, node, nodeData) {
      this.formInline.dirid = data.code
      this.formInline.dirName = data.name
      this.getVerList()
      this.getVerList(data.id)
    },
    //目录列表切换
    handleDirChange2(data, node, nodeData) {
      this.formInline.dirid2 = data.code
      this.formInline.dirName2 = data.name
      this.getTableData();
    },
    //获取Table表格数据
    async getTableData() {
      this.tableData = [];
      this.listData.count = 0;
      this.listData.pageIndex = 1;
      this.getTableData_one();
    },
    async getTableData_one() {
      this.tableData = [];
      if (this.active == "first") {
        this.listData.depcode = this.formInline.depid;
@@ -553,26 +1731,64 @@
          this.tableData = val;
          this.listData.count = data.count;
        }
      }
      else {
        if (this.formInline.name) {
          this.listData.name = this.formInline.name
      } 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', '');
        } else {
          this.listData.dircode = this.formInline.dirid2
        }
        if (this.formInline.type1 == 'All') {
          this.listData.type = this.formInline.type1.replace('All', '');
        } else {
          this.listData.type = this.formInline.type1
        }
        const data = await publish_selectByPage(this.listData);
        debugger
        if (data.result) {
          var that = this
          var val = data.result.filter((res) => {
            if (res.createTime) {
              res.createTime = that.format(res.createTime);
          var val = data.result.filter((rs) => {
            if (rs.createTime) {
              rs.createTime = that.format(rs.createTime);
            }
            if (rs.updateTime) {
              rs.updateTime = that.format(rs.updateTime);
            }
            if (rs.url) {
            if (res.url) {
              res.url = res.url.replace("{host}", iisHost);
              rs.url = rs.url.replace("{host}", iisHost);
            }
            return res
            return rs
          })
          this.tableData = val;
          this.listData.count = data.count;
        }
@@ -631,6 +1847,7 @@
  mounted() {
    this.active = 'first';
    this.setPageStart();
    this.setOptions();
  }
}
</script>
@@ -679,5 +1896,34 @@
      height: calc(100% - 110px);
    }
  }
  /deep/.el-divider--horizontal {
    margin: 14px 0px;
  }
  .loadBox {
    position: fixed;
    z-index: 2002;
    background: rgba(0, 0, 0, 0.2);
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    .el-loading-mask {
      background: transparent !important;
    }
  }
  .fullscreen1 {
    width: 100%;
    height: 92vh;
  }
  /deep/.el-dialog__body {
    padding: 10px !important;
  }
  /deep/.el-dialog__header {
    padding: 10px !important;
  }
  .contLable {
    width: 140px;
    text-align: right;
  }
}
</style>