From 0a722969a72ced13136b82d8c01939bea2c43745 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期四, 27 七月 2023 17:21:53 +0800
Subject: [PATCH] 项目管理,数据发布修改

---
 src/views/datamanage/uploadmanage.vue | 1398 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 1,339 insertions(+), 59 deletions(-)

diff --git a/src/views/datamanage/uploadmanage.vue b/src/views/datamanage/uploadmanage.vue
index e5f6012..7d78f65 100644
--- a/src/views/datamanage/uploadmanage.vue
+++ b/src/views/datamanage/uploadmanage.vue
@@ -1,5 +1,6 @@
 <template>
   <div class="uploads_box">
+
     <My-bread :list="[
         `${$t('dataManage.dataManage')}`,
         `${$t('dataManage.uploadManage')}`,
@@ -9,29 +10,49 @@
     <div class="tabs_box">
       <div
         class="tabs_pane"
-        @click="setTabsChange()"
+        @click="setTabsChange(1)"
       >
-        <div :class="{ changetabs : active == 'first'}">
-          {{$t('dataManage.uploadObj.dataRelease')}}
+        <div
+          class="tabsSpan"
+          :class="{ changetabs : active == 'first'}"
+        >
+          <span> {{$t('dataManage.uploadObj.dataRelease')}}</span>
         </div>
       </div>
       <div
         class="tabs_pane"
-        @click="setTabsChange()"
+        @click="setTabsChange(2)"
       >
-        <div :class="{ changetabs : active == 'second'}">
-          {{$t('dataManage.uploadObj.releaseList')}}
+        <div
+          class="tabsSpan"
+          :class="{ changetabs : active == 'second'}"
+        >
+          <span> {{$t('dataManage.uploadObj.releaseList')}}</span>
+        </div>
+      </div>
+      <div
+        class="tabs_pane"
+        @click="setTabsChange(3)"
+      >
+        <div
+          class="tabsSpan"
+          :class="{ changetabs : active == 'third'}"
+        >
+          <span> {{$t('dataManage.uploadObj.modelAttachMount')}}</span>
         </div>
       </div>
     </div>
-    <div class="content_box">
+    <div
+      v-if="active != 'third'"
+      class="content_box"
+    >
       <el-form
         :inline="true"
         :model="formInline"
         class="demo-form-inline"
       >
         <!-- 鍗曚綅 -->
-        <el-form-item>
+        <el-form-item v-if="active == 'first'">
           <el-select
             size="small"
             v-model="formInline.depid"
@@ -52,7 +73,7 @@
           </el-select>
         </el-form-item>
         <!-- 鐩綍 -->
-        <el-form-item>
+        <el-form-item v-if="active == 'first'">
           <el-select
             size="small"
             v-model="formInline.dirid"
@@ -72,8 +93,30 @@
             </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>
+        <el-form-item v-if="active == 'first'">
           <el-select
             size="small"
             v-model="formInline.verid"
@@ -88,7 +131,7 @@
           </el-select>
         </el-form-item>
         <!-- 绫诲瀷 -->
-        <el-form-item>
+        <el-form-item v-if="active == 'first'">
           <el-select
             size="small"
             v-model="formInline.type"
@@ -103,10 +146,28 @@
             </el-option>
           </el-select>
         </el-form-item>
+        <el-form-item v-if="active == 'second'">
+          <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>
           <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')"
@@ -116,6 +177,23 @@
             ></i></el-input>
         </el-form-item>
         <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"
+            @click="setPageDelete"
+          >{{$t('common.delete')}}</el-button>
+          <!-- 閲嶇疆 -->
           <el-button
             type="info"
             size="small"
@@ -130,64 +208,145 @@
         <el-table
           :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'"
             prop="sizes"
             :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
             prop="verName"
             :label="$t('dataManage.vmobj.versionNumber')"
             align="center"
+            key="8"
           />
           <el-table-column
-            prop="uname"
-            :label="$t('dataManage.vmobj.createonuser')"
+            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="10"
+          />
+          <el-table-column
+            v-if="active != 'first'"
+            prop="createName"
+            :label="$t('common.rublisher')"
+            align="center"
+            key="11"
           />
           <el-table-column
             prop="createTime"
-            :label="$t('dataManage.vmobj.createontime')"
-            :formatter="formatData"
+            :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
+            min-width="150"
+            :label="$t('common.operate')"
+            v-if="active == 'second'"
+          >
+            <template slot-scope="scope">
+              <el-button
+                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
+                @click="setPreviewLayer(scope.row)"
+              >{{$t('common.preview')}}
+
+              </el-button>
+              <el-button
+                v-if="scope.row.url && active == 'first'"
+                size="small"
+                type="success"
+                plain
+              >宸插彂甯�
+
+              </el-button>
+            </template>
+          </el-table-column>
         </el-table>
       </div>
       <div
@@ -198,7 +357,7 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="listData.pageIndex"
-          :page-sizes="[10, 20, 50, 100]"
+          :page-sizes="showPageSize"
           :page-size="listData.pageSize"
           layout="total, sizes, prev, pager, next, jumper"
           :total="listData.count"
@@ -206,49 +365,531 @@
         </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
+        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; align-items: center; justify-content: space-around;  "
+        >
+          <div
+            class="contLable"
+            style=" margin: 0px 10px;"
+          >
+            {{ 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')">
+            <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> -->
+
+        <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="鏁版嵁鍙戝竷涓�"
+        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 { selectdepTab, selectdirTab, meta_selectVerByDirid } from '../../api/api.js'
+import {
+  selectdepTab,
+  selectdirTab,
+  meta_selectVerByDirid,
+  publish_selectMetasByPage,
+  publish_selectByPage,
+  publish_deletes,
+  publish_update,
+  publish_insert,
+  dataUpload_selectCoords,
+  publish_selectLasCs
+} from '../../api/api.js'
+import { conditions } from '../Archive/Archive';
+
 export default {
-  components: { MyBread },
+  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",
       },
       listData: {
         pageIndex: 1,
-        pageSize: 10,
+        pageSize: 100,
         count: 0
       },
+      multipleSelection: [],
+      tableData: [],
       depOption: [],
+      dirOption2: [],
       dirOption: [],
       verOption: [],
+      modelOptions: [],
       typeOption: [{
-        value: 't1',
-        label: '鍏ㄩ儴'
-      }, {
-        value: 't2',
+        value: 'DOM',
         label: '褰卞儚鏁版嵁(.tif, .img)'
       }, {
-        value: 't3',
+        value: 'DEM',
+        label: '楂樼▼鏁版嵁(.tif)'
+      }, {
+        value: 'MPT',
         label: '鍦烘櫙鏁版嵁(.mpt)'
       }, {
-        value: 't4',
+        value: 'OSGB',
+        label: '鍊炬枩鏁版嵁(.osgb)'
+      }, {
+        value: 'LAS',
+        label: '鐐逛簯鏁版嵁(.las, .laz)'
+      }, {
+        value: 'CPT',
+        label: '鐐逛簯鏁版嵁(.cpt)'
+      }, {
+        value: '3DML',
         label: '涓夌淮妯″瀷(.3dml)'
       }, {
-        value: 't5',
+        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)'
       }],
       defaultProps: {
@@ -258,31 +899,493 @@
         checkStrictly: true,
         emitPath: false,
       },
+      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: [],
     }
   },
   methods: {
+    setOsgbCanel() {
+      this.insertOsgbVisible = false;
+      this.osgbLasLayer = {
+        z: '0',
+        strid: ''
+      }
+    },
+    async setOsgbInsert() {
+
+      var ids = [];
+      var zs = []
+      for (var i in this.osgbLasOption) {
+        ids.push(this.osgbLasOption[i].id)
+        zs.push(this.osgbLasOption[i].zs)
+      }
+      var srids = [];
+      var lerro = [];
+      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 (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: null,
+        max: null,
+        name: null,
+        type: this.formInline.type,
+        noData: null,
+        ids: ids,
+        models: null,
+        srids: srids,
+        zx: zs
+      }
+      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.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);//娣诲姞涓�涓猚opy浜嬩欢
+      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
+    },
+    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.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) {
+        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鏂囦欢鍧愭爣绯籌D澶辫触');
+        } 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)
+        }
+
+        var obj = {
+          dircode: this.formInline.dirid,
+          depcode: this.formInline.depid,
+          ids: std,
+          type: this.formInline.type
+        }
+
+        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;
+      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;
+          });
+      }
+    },
+    //淇敼寮圭獥
+    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() {
+      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();
+      }
+    },
+    //棰勮寮圭獥鎵撳紑
+    setPreviewLayer(res) {
+      this.$store.state.previewLayer = res;
+      this.dialogVisible = true;
+      this.showMapView = true;
+    },
+    //鏄惁涓哄叏灞忓嚱鏁�
+    onFullscreen(fullscreen) {
+      this.isFullscreen = fullscreen;
+    },
+    //棰勮寮圭獥鍏抽棴
+    handleClose() {
+      this.getTableData();
+      this.dialogVisible = false;
+      this.showMapView = false;
+
+    },
+    // 鑾峰彇澶氶�夐�変腑鐨勫璞�
+    handleSelectionChange(val) {
+      this.multipleSelection = val
+    },
+    //鍗曚綅杞崲
+    stateFormatSizes(row, column) {
+      if (row.sizes >= 1024) {
+        const val = parseFloat(row.sizes / 1024).toFixed(3)
+        return val + " GB"
+      } else {
+        return row.sizes + " MB"
+      }
+    },
+    //鏍煎紡鍖栧湴鍧�
+    formatLayer(row, column) {
+      let data = row.layer
+      if (data == null) {
+        return data
+      }
+
+      return data.replace("{host}", iisHost)
+    },
+    //鏍煎紡鍖栨椂闂�
+    formatData(row, column) {
+      let data = row[column.property]
+      if (data == null) {
+        return data
+      }
+      return this.format(data)
+    },
     //鍒嗛〉鍒囨崲
     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;
+
+
+
+          this.$nextTick(() => {
+            this.$refs.tableBox.doLayout()
+          })
+
 
       }
     },
@@ -290,18 +1393,35 @@
     setPageStart() {
       this.formInline = {
         dirid: null,
+        dirid2: null,
         dirName: null,
+        dirName2: null,
         depid: null,
         verid: null,
         depName: null,
         name: "",
-        type: ""
+        type: "",
+        type1: "All"
       }
-      this.listData = {
-        pageIndex: 1,
-        pageSize: 10,
-        count: 0
+      if (this.active == "first") {
+        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, 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;
       }
+
       this.formInline.type = this.typeOption[0].value;
       this.getDepTreeList();
       this.getDirTreeList();
@@ -313,14 +1433,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].id;
+      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
@@ -331,6 +1467,7 @@
     },
     //鐗堟湰鍒楄〃鍒囨崲
     handleVerChange(value) {
+
       this.formInline.verid = value;
       this.getTableData();
     },
@@ -339,21 +1476,135 @@
       this.formInline.type = value;
       this.getTableData();
     },
-    //鍗曚綅鍒楄〃鍒囨崲
-    handleDepChange(data, node, nodeData) {
-      this.formInline.depid = data.id
-      this.formInline.depName = data.name
+    handleTypeChange1(value) {
+      this.formInline.type1 = value;
       this.getTableData();
     },
     //鍗曚綅鍒楄〃鍒囨崲
-    handleDirChange(data, node, nodeData) {
-      this.formInline.dirid = data.id
-      this.formInline.dirName = data.name
-      this.getVerList()
+    handleDepChange(data, node, nodeData) {
+      this.formInline.depid = data.code
+      this.formInline.depName = data.name
+      this.getTableData();
     },
-    //鑾峰彇Table琛ㄦ牸鏁版嵁
-    getTableData() {
+    //鐩綍鍒楄〃鍒囨崲
+    handleDirChange(data, node, nodeData) {
+      this.formInline.dirid = data.code
+      this.formInline.dirName = data.name
+      this.getVerList(data.id)
+    },
+    //鐩綍鍒楄〃鍒囨崲
+    handleDirChange2(data, node, nodeData) {
+      this.formInline.dirid2 = data.code
+      this.formInline.dirName2 = data.name
+      this.getTableData();
+    },
 
+
+
+
+    //鑾峰彇Table琛ㄦ牸鏁版嵁
+    async getTableData() {
+
+      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;
+        this.listData.dircode = this.formInline.dirid;
+        this.listData.name = this.formInline.name;
+        this.listData.type = this.formInline.type;
+        this.listData.verid = this.formInline.verid;
+        const data = await publish_selectMetasByPage(this.listData)
+        if (data.code != 200) {
+
+        }
+        if (data.result) {
+
+
+          var that = this
+
+          var val = data.result.filter((res) => {
+            if (res.createTime) {
+              res.createTime = that.format(res.createTime);
+            }
+
+            if (res.url) {
+              res.url = res.url.replace("{host}", iisHost);
+            }
+            return res
+          })
+          this.tableData = val;
+          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);
+
+        if (data.result) {
+          var that = this
+          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) {
+
+              rs.url = rs.url.replace("{host}", iisHost);
+            }
+            return rs
+          })
+
+          this.tableData = val;
+          this.listData.count = data.count;
+        }
+      }
+    },
+    //鏍煎紡鍖栨椂闂�
+    format(shijianchuo) {
+      //shijianchuo鏄暣鏁帮紝鍚﹀垯瑕乸arseInt杞崲
+      var time = new Date(shijianchuo);
+      var y = time.getFullYear();
+      var m = time.getMonth() + 1;
+      var d = time.getDate();
+      var h = time.getHours();
+      var mm = time.getMinutes();
+      var s = time.getSeconds();
+      return (
+        y +
+        '-' +
+        this.add0(m) +
+        '-' +
+        this.add0(d) +
+        ' ' +
+        h +
+        ':' +
+        mm +
+        ':' +
+        s
+      );
+    },
+    //鏍煎紡鍖栨椂闂�
+    add0(m) {
+      return m < 10 ? '0' + m : m;
     },
     //鑾峰彇鍗曚綅鍒楄〃
     async getDepTreeList() {
@@ -363,7 +1614,7 @@
         return
       }
       this.depOption = this.treeData(data.result);
-      this.formInline.depid = this.depOption[0].id
+      this.formInline.depid = this.depOption[0].code
       this.formInline.depName = this.depOption[0].name
     },
     //鏍戝垪琛ㄧ敓鎴�
@@ -380,6 +1631,7 @@
   mounted() {
     this.active = 'first';
     this.setPageStart();
+    this.setOptions();
   }
 }
 </script>
@@ -428,5 +1680,33 @@
       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: 160px;
+  }
 }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3