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/metadataManage.vue | 1305 +++++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 865 insertions(+), 440 deletions(-)

diff --git a/src/views/datamanage/metadataManage.vue b/src/views/datamanage/metadataManage.vue
index 3595331..7da6dd5 100644
--- a/src/views/datamanage/metadataManage.vue
+++ b/src/views/datamanage/metadataManage.vue
@@ -1,20 +1,26 @@
 <template>
   <div class="authorityManagement_box">
-    <My-bread
-      :list="[
+    <My-bread :list="[
         `${$t('dataManage.dataManage')}`,
         `${$t('dataManage.metadataManage')}`,
-      ]"
-    ></My-bread>
+      ]"></My-bread>
     <el-divider />
-    <div class="inquire subpage_Div" ref="container">
-      <el-form ref="queryForm" :model="queryForm" :inline="true">
+    <div
+      class="inquire subpage_Div"
+      ref="container"
+    >
+      <el-form
+        ref="queryForm"
+        :model="queryForm"
+        :inline="true"
+      >
         <div class="flex_box">
           <div style="margin-right: auto">
             <el-form-item size="small">
               <el-select
                 :popper-append-to-body="false"
                 v-model="queryForm.depName"
+                ref="treeSelect"
               >
                 <el-option
                   :value="queryForm.depid"
@@ -48,6 +54,7 @@
               <el-select
                 :popper-append-to-body="false"
                 v-model="queryForm.dirName"
+                ref="treeSelect1"
               >
                 <el-option
                   :value="queryForm.dirid"
@@ -93,19 +100,21 @@
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item prop="name" size="small">
+            <el-form-item
+              prop="name"
+              size="small"
+            >
               <!--            suffix-icon="el-icon-edit"  :placeholder="$t('common.pleaseInput')"-->
               <el-input
                 v-model="queryForm.name"
                 :placeholder="$t('shuJuGuanLi.lable2')"
                 style="width: 200px"
-                ><i
+              ><i
                   slot="suffix"
                   class="el-icon-search"
                   @click="queryInfo()"
                   style="padding-right: 8px"
-                ></i
-              ></el-input>
+                ></i></el-input>
             </el-form-item>
           </div>
           <div>
@@ -125,7 +134,7 @@
                 size="small"
                 @click="deleteMetaInfo"
                 icon="el-icon-delete"
-                >{{ $t("common.delete") }}
+              >{{ $t("common.delete") }}
               </el-button>
             </el-form-item>
             <el-form-item v-if="btnStatus.download">
@@ -134,7 +143,7 @@
                 icon="el-icon-download"
                 type="success"
                 size="small"
-                >{{ $t("common.download") }}
+              >{{ $t("common.download") }}
               </el-button>
             </el-form-item>
 
@@ -144,58 +153,18 @@
                 icon="el-icon-refresh"
                 type="info"
                 size="small"
-                >{{ $t("common.reset") }}
+              >{{ $t("common.reset") }}
               </el-button>
             </el-form-item>
           </div>
         </div>
-
-        <!-- <el-form-item style="float:right">
-          <el-button
-            @click="queryInfo()"
-            icon="el-icon-search"
-            class="primary"
-            size="small"
-          >{{ $t('common.iquery') }}</el-button>
-        </el-form-item>
-        <el-form-item style="float:right">
-          <el-button
-            @click="resetInfo('queryForm')"
-            icon="el-icon-refresh"
-            type="info"
-            size="small"
-          >{{ $t('common.reset') }}</el-button>
-        </el-form-item> -->
-
-        <!-- <el-form-item v-if="btnStatus.insert">
-          <el-button
-            type="success"
-            size="small"
-            @click="showAddDialog"
-            icon="el-icon-plus"
-            >{{ $t('common.append') }}</el-button
-          >
-        </el-form-item> -->
-        <!-- <el-form-item v-if="btnStatus.delete" style="float:right">
-          <el-button
-            type="danger"
-            size="small"
-            @click="deleteMetaInfo"
-            icon="el-icon-delete"
-          >{{ $t('common.delete') }}</el-button>
-        </el-form-item>
-        <el-form-item v-if="btnStatus.download" style="float:right">
-          <el-button
-            @click="downFormData"
-            icon="el-icon-download"
-            type="success"
-            size="small"
-          >{{ $t('common.download') }}</el-button>
-        </el-form-item> -->
       </el-form>
     </div>
     <div class="dividing-line"></div>
-    <div class="table_box subpage_Div" :style="styleVar">
+    <div
+      class="table_box subpage_Div"
+      :style="styleVar"
+    >
       <el-table
         :data="tableData"
         style="width: 100%"
@@ -203,7 +172,10 @@
         @selection-change="handleSelectionChange"
         height="calc(100% - 57px)"
       >
-        <el-table-column type="selection" width="55" />
+        <el-table-column
+          type="selection"
+          width="55"
+        />
         <el-table-column
           :label="$t('dataManage.dictionaryManageObj.number')"
           type="index"
@@ -218,8 +190,7 @@
                 title="婧愭暟鎹煡璇�"
                 @click="setQueryMetaData(scope.row)"
                 target="_blank"
-                >{{ scope.row.name }}</el-link
-              >
+              >{{ scope.row.name }}</el-link>
             </span>
             <span v-else-if="scope.row.metaid > 0">
               <el-link
@@ -227,14 +198,32 @@
                 title="鍏冩暟鎹煡璇�"
                 @click="setMetaDataQuery(scope.row)"
                 target="_blank"
-                >{{ scope.row.name }}</el-link
-              ></span
-            >
+              >{{ scope.row.name }}</el-link></span>
             <span v-else>{{ scope.row.name }}</span>
           </template>
         </el-table-column>
 
-        <el-table-column prop="type" :label="$t('dataManage.vmobj.format')" />
+        <el-table-column
+          prop="type"
+          :label="$t('dataManage.vmobj.format')"
+        >
+          <template slot-scope="scope">
+            <span v-if="scope.row.type == 'gdb'">
+              <el-link
+                @click="setSelectGdbByGuid(scope.row)"
+                style="color: #409eff"
+              >
+                {{  scope.row.type }}
+              </el-link>
+            </span>
+            <span v-else>
+
+              {{  scope.row.type }}
+            </span>
+          </template>
+
+        </el-table-column>
+
         <el-table-column
           prop="sizes"
           :label="$t('dataManage.vmobj.size')"
@@ -257,7 +246,10 @@
           <template slot-scope="scope">
             <!-- <span ></span> -->
             <el-link></el-link>
-            <el-link :underline="false" @click="detail(scope.row)">{{
+            <el-link
+              :underline="false"
+              @click="detail(scope.row)"
+            >{{
               scope.row.tab
             }}</el-link>
           </template>
@@ -268,7 +260,17 @@
               :label="$t('dataManage.vmobj.tab')"
               :formatter="formatData"
             /> -->
-        <el-table-column prop="rows" :label="$t('dataManage.vmobj.row')" />
+        <el-table-column
+          prop="rows"
+          :label="$t('dataManage.vmobj.row')"
+        />
+
+        <el-table-column
+          :label="$t('common.dataStatus')"
+          :formatter="stateFormat"
+        >
+
+        </el-table-column>
         <el-table-column
           prop="uname"
           :label="$t('dataManage.vmobj.createonuser')"
@@ -278,14 +280,17 @@
           :label="$t('dataManage.vmobj.createontime')"
           :formatter="formatData"
         />
-        <el-table-column min-width="210" :label="$t('common.operate')">
+        <el-table-column
+          min-width="210"
+          :label="$t('common.operate')"
+        >
           <template slot-scope="scope">
             <el-button
               @click="showDetail(scope.row)"
               type="primary"
               plain
               size="small"
-              >{{ $t("common.details") }}
+            >{{ $t("common.details") }}
             </el-button>
             <el-button
               type="warning"
@@ -294,7 +299,7 @@
               v-if="btnStatus.update"
               @click="editInfo(scope.row)"
               style="margin-left: 10px"
-              >{{ $t("common.edit") }}
+            >{{ $t("common.edit") }}
             </el-button>
             <el-button
               plain
@@ -302,17 +307,20 @@
               v-if="showPreview(scope.row)"
               @click="handlePreview(scope.row)"
               style="margin-left: 10px"
-              >{{ $t("common.preview") }}
+            >{{ $t("common.preview") }}
             </el-button>
           </template>
         </el-table-column>
       </el-table>
-      <div class="pagination_box" style="margin-top: 15px">
+      <div
+        class="pagination_box"
+        style="margin-top: 15px"
+      >
         <el-pagination
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="listData.pageIndex"
-          :page-sizes="[10, 20, 50, 100]"
+          :page-sizes="[10, 50, 100, 200]"
           :page-size="listData.pageSize"
           layout="total, sizes, prev, pager, next, jumper"
           :total="count"
@@ -320,16 +328,29 @@
         </el-pagination>
       </div>
     </div>
-    <div class="infoBox_box" v-show="showinfoBox">
+    <div
+      class="infoBox_box"
+      v-show="showinfoBox"
+      style="z-index:99999"
+    >
       <div class="infoBox box_div">
-        <div slot="header" class="clearfix">
+        <div
+          slot="header"
+          class="clearfix"
+        >
           <span>{{ $t("common.details") }}</span>
-          <div style="float: right; cursor: pointer" @click="closeDetial">
+          <div
+            style="float: right; cursor: pointer"
+            @click="closeDetial"
+          >
             <i class="el-icon-close"></i>
           </div>
         </div>
         <el-divider></el-divider>
-        <div class="contentBox" style="padding: 1%">
+        <div
+          class="contentBox"
+          style="padding: 1%"
+        >
           <p>{{ $t("dataManage.vmobj.name") }}锛歿{ itemdetail.name }}</p>
           <el-divider></el-divider>
           <p>{{ $t("dataManage.vmobj.format") }}锛歿{ itemdetail.type }}</p>
@@ -346,7 +367,7 @@
           <el-divider></el-divider>
           <p>{{ $t("dataManage.vmobj.tab") }}锛歿{ itemdetail.tab }}</p>
           <el-divider></el-divider>
-          <p>{{ $t("dataManage.vmobj.row") }}锛歿{ itemdetail.row }}</p>
+          <p>{{ $t("dataManage.vmobj.row") }}锛歿{ itemdetail.rows }}</p>
           <el-divider></el-divider>
           <p>
             {{ $t("dataManage.vmobj.createonuser") }}锛歿{ itemdetail.uname }}
@@ -358,17 +379,15 @@
             }}
           </p>
           <el-divider></el-divider>
-          <p>
-            {{ $t("dataManage.vmobj.updateonuser") }}锛歿{
-              itemdetail.updateUser
-            }}
+          <!-- <p>
+            {{ $t("dataManage.vmobj.depName") }}锛歿{ itemdetail.updateUser }}
           </p>
           <el-divider></el-divider>
           <p>
-            {{ $t("dataManage.vmobj.updateontime") }}锛歿{
+            {{ $t("dataManage.vmobj.depName") }}锛歿{
               setInfoBoxTime(itemdetail.updateTime)
             }}
-          </p>
+          </p> -->
         </div>
       </div>
     </div>
@@ -384,24 +403,36 @@
       :visible.sync="dialogFormVisible"
       :before-close="handleClose"
     >
-      <el-form :model="editForm" ref="editForm">
+      <el-form
+        :model="editForm"
+        ref="editForm"
+      >
         <el-form-item
           :label="$t('dataManage.vmobj.name')"
           :label-width="formLabelWidth"
         >
-          <el-input v-model="editForm.name" autocomplete="off"></el-input>
+          <el-input
+            v-model="editForm.name"
+            autocomplete="off"
+          ></el-input>
         </el-form-item>
         <el-form-item
           :label="$t('dataManage.vmobj.format')"
           :label-width="formLabelWidth"
         >
-          <el-input v-model="editForm.type" autocomplete="off"></el-input>
+          <el-input
+            v-model="editForm.type"
+            autocomplete="off"
+          ></el-input>
         </el-form-item>
         <el-form-item
           :label="$t('dataManage.vmobj.size')"
           :label-width="formLabelWidth"
         >
-          <el-input v-model="editForm.sizes" autocomplete="off"></el-input>
+          <el-input
+            v-model="editForm.sizes"
+            autocomplete="off"
+          ></el-input>
         </el-form-item>
         <el-form-item
           :label="$t('dataManage.vmobj.depName')"
@@ -467,7 +498,10 @@
           :label="$t('dataManage.vmobj.describe')"
           :label-width="formLabelWidth"
         >
-          <el-input v-model="editForm.describe" autocomplete="off"></el-input>
+          <el-input
+            v-model="editForm.describe"
+            autocomplete="off"
+          ></el-input>
         </el-form-item>
         <!-- <el-form-item
           :label="$t('dataManage.vmobj.gather')"
@@ -476,28 +510,40 @@
           <el-input v-model="editForm.gather" autocomplete="off"></el-input>
         </el-form-item> -->
       </el-form>
-      <div v-if="behavior == '淇敼淇℃伅'" slot="footer" class="dialog-footer">
-        <el-button size="small" @click="cancelEdit()"
-          >{{ $t("common.reset") }}
+      <div
+        v-if="behavior == '淇敼淇℃伅'"
+        slot="footer"
+        class="dialog-footer"
+      >
+        <el-button
+          size="small"
+          @click="cancelEdit()"
+        >{{ $t("common.reset") }}
         </el-button>
         <el-button
           size="small"
           type="primary"
           @click="sendEdit('editForm')"
           v-loading.fullscreen.lock="fullscreenLoading"
-          >{{ $t("common.submit") }}
+        >{{ $t("common.submit") }}
         </el-button>
       </div>
-      <div v-else slot="footer" class="dialog-footer">
-        <el-button size="small" @click="cancelAdd('editForm')"
-          >{{ $t("common.reset") }}
+      <div
+        v-else
+        slot="footer"
+        class="dialog-footer"
+      >
+        <el-button
+          size="small"
+          @click="cancelAdd('editForm')"
+        >{{ $t("common.reset") }}
         </el-button>
         <el-button
           size="small"
           type="primary"
           @click="sendAdd('editForm')"
           v-loading.fullscreen.lock="fullscreenLoading"
-          >{{ $t("common.submit") }}
+        >{{ $t("common.submit") }}
         </el-button>
       </div>
     </el-dialog>
@@ -529,12 +575,15 @@
             align="center"
           ></el-table-column>
         </el-table>
-        <div style="margin-top: 10px" class="pagination_box">
+        <div
+          style="margin-top: 10px"
+          class="pagination_box"
+        >
           <el-pagination
             @size-change="handleLoaderSizeChange"
             @current-change="handleLoaderCurrentChange"
             :current-page="listLoader.pageIndex"
-            :page-sizes="[10, 20, 50, 100]"
+            :page-sizes="[10, 50, 100, 200]"
             :page-size="listLoader.pageSize"
             layout="total, sizes, prev, pager, next, jumper"
             :total="count1"
@@ -543,7 +592,10 @@
         </div>
       </div>
     </el-dialog>
-    <div class="downloadBox box_div subpage_Div" v-if="showCodeBox">
+    <div
+      class="downloadBox box_div subpage_Div"
+      v-if="showCodeBox"
+    >
       <h4 style="padding: 20px">{{ $t("common.passworld") }}</h4>
       <el-form
         :model="codeForm"
@@ -552,14 +604,20 @@
         label-width="100px"
         class="codeForm"
       >
-        <el-form-item :label="$t('common.passworld')" prop="password">
+        <el-form-item
+          :label="$t('common.passworld')"
+          prop="password"
+        >
           <el-input
             type="password"
             v-model="codeForm.password"
             show-password
           ></el-input>
         </el-form-item>
-        <el-form-item :label="$t('common.SPassword')" prop="repassword">
+        <el-form-item
+          :label="$t('common.SPassword')"
+          prop="repassword"
+        >
           <el-input
             type="password"
             v-model="codeForm.repassword"
@@ -567,11 +625,17 @@
           ></el-input>
         </el-form-item>
         <el-form-item>
-          <el-button class="primary" size="small" @click="download('codeForm')"
-            >{{ $t("common.confirm") }}
+          <el-button
+            class="primary"
+            size="small"
+            @click="download('codeForm')"
+          >{{ $t("common.confirm") }}
           </el-button>
-          <el-button type="info" size="small" @click="closeDown('codeForm')"
-            >{{ $t("common.cancel") }}
+          <el-button
+            type="info"
+            size="small"
+            @click="closeDown('codeForm')"
+          >{{ $t("common.cancel") }}
           </el-button>
         </el-form-item>
       </el-form>
@@ -582,17 +646,30 @@
       width="70%"
     >
       <div style="height: 65vh; width: 100%">
-        <el-form :inline="true" :model="fromQueryMeta" class="demo-form-inline">
+        <el-form
+          :inline="true"
+          :model="fromQueryMeta"
+          class="demo-form-inline"
+        >
           <el-form-item>
-            <el-input size="small" v-model="fromQueryMeta.name"></el-input>
+            <el-input
+              size="small"
+              v-model="fromQueryMeta.name"
+            ></el-input>
           </el-form-item>
 
           <el-form-item>
-            <el-button type="primary" size="small" @click="setSearchMetaData()"
-              >鏌ヨ
+            <el-button
+              type="primary"
+              size="small"
+              @click="setSearchMetaData()"
+            >鏌ヨ
             </el-button>
-            <el-button type="info" size="small" @click="setRestMetaData()"
-              >閲嶇疆
+            <el-button
+              type="info"
+              size="small"
+              @click="setRestMetaData()"
+            >閲嶇疆
             </el-button>
           </el-form-item>
         </el-form>
@@ -648,7 +725,10 @@
             :label="$t('dataManage.dataUpObj.tableName')"
           >
             <template slot-scope="scope">
-              <a class="scopeRowColor" @click="detail(scope.row)">{{
+              <a
+                class="scopeRowColor"
+                @click="detail(scope.row)"
+              >{{
                 scope.row.tab
               }}</a>
             </template>
@@ -664,12 +744,15 @@
             :label="$t('dataManage.dataUpObj.describe')"
           />
         </el-table>
-        <div class="pagination_box" style="margin-top: 15px">
+        <div
+          class="pagination_box"
+          style="margin-top: 15px"
+        >
           <el-pagination
             @size-change="handleMetaSizeChange"
             @current-change="handMetaCurrentChange"
             :current-page="listMetaData.pageIndex"
-            :page-sizes="[10, 20, 50, 100]"
+            :page-sizes="[10, 50, 100, 200,500]"
             :page-size="listMetaData.pageSize"
             layout="total, sizes, prev, pager, next, jumper"
             :total="listMetaData.count"
@@ -736,7 +819,10 @@
             :label="$t('dataManage.dataUpObj.tableName')"
           >
             <template slot-scope="scope">
-              <a class="scopeRowColor" @click="detail(scope.row)">{{
+              <a
+                class="scopeRowColor"
+                @click="detail(scope.row)"
+              >{{
                 scope.row.tab
               }}</a>
             </template>
@@ -762,7 +848,10 @@
       width="70%"
       :close-on-click-modal="false"
     >
-      <div v-if="dialog.isPdf" class="pdfClass">
+      <div
+        v-if="dialog.isPdf"
+        class="pdfClass"
+      >
         <iframe
           :src="dialog.src"
           type="application/x-google-chrome-pdf"
@@ -771,11 +860,203 @@
         >
         </iframe>
       </div>
-      <div v-if="dialog.isJpg" class="pdfClass">
-        <img style="width: 100%; height: 100%" :src="dialog.src" alt="" />
+      <div
+        v-if="dialog.isJpg"
+        class="pdfClass"
+      >
+        <el-image
+          style="width: 100%; height: 100%"
+          :src="dialog.src"
+          :preview-src-list="[dialog.src]"
+        >
+        </el-image>
       </div>
     </el-dialog>
+    <el-dialog
+      title="鏁版嵁鐢宠"
+      :visible.sync="dialogInsertFile"
+      width="30%"
+      top="10vh"
+      :modal="false"
+      :close-on-click-modal="false"
+      :show-close="false"
+    >
+      <el-form
+        ref="form"
+        :model="fileFrom"
+        label-width="100px"
+      >
+        <el-form-item label="瀹℃牳鍗曚綅">
+          <div>
+            <ul>
+              <li v-for="item in fileFrom.depid">
+                {{ item.name }}
+              </li>
+            </ul>
+          </div>
+        </el-form-item>
 
+        <el-form-item label="鎻忚堪">
+          <el-input
+            type="textarea"
+            placeholder="璇疯緭鍏ュ唴瀹�"
+            v-model="fileFrom.descr"
+            maxlength="50"
+            show-word-limit
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            class="primary"
+            size="small"
+            @click="getFileInsertApply()"
+          >{{ $t("common.confirm") }}</el-button>
+          <el-button
+            type="info"
+            size="small"
+            @click="handleInsertFileClose()"
+          >{{ $t("common.cancel") }}</el-button>
+        </el-form-item>
+      </el-form>
+    </el-dialog>
+    <el-dialog
+      title=""
+      :visible.sync="gdbDialog"
+      width="80%"
+      top="8vh"
+      :modal="false"
+      :close-on-click-modal="false"
+    >
+      <div class="gdbTableBox">
+        <el-table
+          :data="gdbData"
+          style="width: 100%"
+        >
+          <el-table-column
+            type="selection"
+            width="55"
+          />
+          <el-table-column
+            :label="$t('dataManage.dictionaryManageObj.number')"
+            type="index"
+            width="50"
+          >
+          </el-table-column>
+          <el-table-column :label="$t('dataManage.vmobj.name')">
+            <template slot-scope="scope">
+              <span v-if="scope.row.ismeta > 0">
+                <el-link
+                  style="color: #409eff"
+                  title="婧愭暟鎹煡璇�"
+                  @click="setQueryMetaData(scope.row)"
+                  target="_blank"
+                >{{ scope.row.name }}</el-link>
+              </span>
+              <span v-else-if="scope.row.metaid > 0">
+                <el-link
+                  style="color: #409eff"
+                  title="鍏冩暟鎹煡璇�"
+                  @click="setMetaDataQuery(scope.row)"
+                  target="_blank"
+                >{{ scope.row.name }}</el-link></span>
+              <span v-else>{{ scope.row.name }}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            prop="type"
+            :label="$t('dataManage.vmobj.format')"
+          >
+
+          </el-table-column>
+
+          <el-table-column
+            prop="sizes"
+            :label="$t('dataManage.vmobj.size')"
+            :formatter="stateFormatSizes"
+          />
+          <el-table-column
+            prop="depName"
+            :label="$t('dataManage.vmobj.depName')"
+          />
+          <el-table-column
+            prop="dirName"
+            :label="$t('dataManage.vmobj.dirName')"
+            width="200"
+          />
+          <el-table-column
+            prop="verName"
+            :label="$t('dataManage.vmobj.versionNumber')"
+          />
+          <el-table-column :label="$t('dataManage.dataUpObj.tableName')">
+            <template slot-scope="scope">
+
+              <el-link></el-link>
+              <el-link
+                :underline="false"
+                @click="detail(scope.row)"
+              >{{
+              scope.row.tab
+            }}</el-link>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            prop="rows"
+            :label="$t('dataManage.vmobj.row')"
+          />
+
+          <el-table-column
+            :label="$t('common.dataStatus')"
+            :formatter="stateFormat"
+          >
+
+          </el-table-column>
+          <el-table-column
+            prop="uname"
+            :label="$t('dataManage.vmobj.createonuser')"
+          />
+          <el-table-column
+            prop="createTime"
+            :label="$t('dataManage.vmobj.createontime')"
+            :formatter="formatData"
+          />
+          <el-table-column
+            min-width="210"
+            :label="$t('common.operate')"
+          >
+            <template slot-scope="scope">
+              <el-button
+                @click="showDetail(scope.row)"
+                type="primary"
+                plain
+                size="small"
+              >{{ $t("common.details") }}
+              </el-button>
+              <el-button
+                type="warning"
+                plain
+                size="small"
+                v-if="btnStatus.update"
+                @click="editInfo(scope.row)"
+                style="margin-left: 10px"
+              >{{ $t("common.edit") }}
+              </el-button>
+              <el-button
+                plain
+                size="small"
+                v-if="showPreview(scope.row)"
+                @click="handlePreview(scope.row)"
+                style="margin-left: 10px"
+              >{{ $t("common.preview") }}
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+
+    </el-dialog>
     <iframe
       id="downFrame"
       src=""
@@ -785,9 +1066,10 @@
 </template>
 
 <script>
-import $ from "jquery"
-import { getToken } from "@/utils/auth"
+import $ from "jquery";
+import { getToken } from "@/utils/auth";
 import {
+  encr,
   deleteMeta,
   insertMeta,
   meta_downloadReq,
@@ -802,9 +1084,13 @@
   sign_getPublicKey,
   updateMeta,
   meta_selectById,
-} from "../../api/api"
+  meta_selectMetaOverflowDep,
+  meta_selectDepsByCodes,
+  apply_insertApply,
+  meta_selectGdbByGuid,
+} from "../../api/api";
 
-import MyBread from "../../components/MyBread.vue"
+import MyBread from "../../components/MyBread.vue";
 
 export default {
   name: "metadataManage",
@@ -812,22 +1098,22 @@
   data() {
     var repasswordValidator = (rule, value, callback) => {
       if (value === "") {
-        callback(new Error("璇峰啀娆¤緭鍏ュ瘑鐮�"))
+        callback(new Error("璇峰啀娆¤緭鍏ュ瘑鐮�"));
       } else if (value !== this.codeForm.password) {
-        callback(new Error("涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!"))
+        callback(new Error("涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!"));
       } else {
-        callback()
+        callback();
       }
-    }
+    };
     var passwordValidator = (rule, value, callback) => {
       var passwordreg =
-        /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![a-z0-9]+$)(?![a-z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![0-9\W!@#$%^&*`~()\\-_+=,.?;<>]+$)[a-zA-Z0-9\W!@#$%^&*`~()\\-_+=,.?;<>]{12,20}$/
+        /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![a-z0-9]+$)(?![a-z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![0-9\W!@#$%^&*`~()\\-_+=,.?;<>]+$)[a-zA-Z0-9\W!@#$%^&*`~()\\-_+=,.?;<>]{12,20}$/;
       if (!passwordreg.test(value)) {
-        callback(new Error("瀵嗙爜蹇呴』鐢辨暟瀛椼�佸瓧姣嶃�佺壒娈婂瓧绗︾粍鍚�,璇疯緭鍏�13-20浣�"))
+        callback(new Error("瀵嗙爜蹇呴』鐢辨暟瀛椼�佸瓧姣嶃�佺壒娈婂瓧绗︾粍鍚�,璇疯緭鍏�13-20浣�"));
       } else {
-        callback()
+        callback();
       }
-    }
+    };
     return {
       verOptions: [],
       defaultProps: {
@@ -853,6 +1139,8 @@
         dirid: "",
         depid: "",
         verid: "",
+        depName: "",
+
       },
       behavior: "",
       initialForm: "",
@@ -932,275 +1220,327 @@
         isJpg: false,
         src: "",
       },
-    }
+      dialogInsertFile: false,
+      fileFrom: {
+        descr: null,
+        depid: null,
+        ids: null,
+        pwd: null,
+        depcodes: null,
+      },
+      gdbData: [],
+      gdbDialog: false,
+      gdbGuid: null,
+    };
   },
   created() {
     // this.getSelectDictTab();
-    this.showPermsBtn()
-    this.getQueryDepTree()
+    this.showPermsBtn();
+    this.getQueryDepTree();
 
-    this.signGetPublicKey()
+    this.signGetPublicKey();
   },
   beforeDestroy() {
-    this.timer && clearTimeout(this.timer)
-    window.removeEventListener("resize", this.onResize)
+    this.timer && clearTimeout(this.timer);
+    window.removeEventListener("resize", this.onResize);
   },
+
   mounted() {
-    window.addEventListener("resize", this.onResize)
-    this.calHeight()
+    window.addEventListener("resize", this.onResize);
+    this.calHeight();
+  },
+  watch: {
+    "queryForm.depName"() {
+
+      this.$refs.treeSelect.visible = false;
+    },
+    "queryForm.dirid"() {
+
+      this.$refs.treeSelect1.visible = false;
+    },
   },
   methods: {
+    //gdb 鐐瑰嚮浜嬩欢
+    setSelectGdbByGuid(row) {
+      this.gdbGuid = row.guid
+      this.getSelectGdbByGuid();
+    },
+    async getSelectGdbByGuid() {
+      if (!this.gdbGuid) return
+      const data = await meta_selectGdbByGuid({ guid: this.gdbGuid })
+      if (data.code != 200) {
+        return this.$message.error("鏍规嵁GUID鏌ヨGDB鏁版嵁澶辫触");
+      }
+      if (data.count <= 0) {
+        return this.$message("鏌ユ棤鏇村鏁版嵁");
+      }
+      this.gdbData = data.result;
+      this.gdbDialog = true;
+
+    },
+
+
+    stateFormat(row, column) {
+      var val = ['shp', 'gdb', 'xls', 'xlsx']
+      if (val.indexOf(row.type) > -1 && row.rows > 0) {
+        return '宸蹭笂浼�,宸插叆搴�'
+      } else if (val.indexOf(row.type) > -1 && row.rows == 0) {
+        return '宸蹭笂浼�,鏈叆搴�'
+      } else {
+        return '宸蹭笂浼�'
+      }
+    },
     //澶у皬鍊兼敼鍙�
     changeSizeFile(row, column, cellValue, index) {
       if (cellValue >= 1024) {
-        return parseFloat(cellValue / 1204).toFixed(3) + "GB"
+        return parseFloat(cellValue / 1204).toFixed(3) + "GB";
       } else {
-        return cellValue + "MB"
+        return cellValue + "MB";
       }
     },
     setRestMetaData() {
-      this.fromQueryMeta.name = ""
-      this.listMetaData.name = this.fromQueryMeta.name
-      this.listMetaData.pageIndex = 1
-      this.listMetaData.pageSize = 10
+      this.fromQueryMeta.name = "";
+      this.listMetaData.name = this.fromQueryMeta.name;
+      this.listMetaData.pageIndex = 1;
+      this.listMetaData.pageSize = 10;
 
-      this.startQueryMetaData()
+      this.startQueryMetaData();
     },
     setSearchMetaData() {
-      this.listMetaData.name = this.fromQueryMeta.name
-      this.listMetaData.pageIndex = 1
-      this.listMetaData.pageSize = 10
+      this.listMetaData.name = this.fromQueryMeta.name;
+      this.listMetaData.pageIndex = 1;
+      this.listMetaData.pageSize = 10;
 
-      this.startQueryMetaData()
+      this.startQueryMetaData();
     },
     //婧愭暟鎹〉闈㈠垏鎹�
     handleMetaSizeChange(val) {
-      this.listMetaData.pageIndex = 1
-      this.listMetaData.pageSize = val
-      this.startQueryMetaData()
+      this.listMetaData.pageIndex = 1;
+      this.listMetaData.pageSize = val;
+      this.startQueryMetaData();
     },
     //婧愭暟鎹〉闈㈠垏鎹�
     handMetaCurrentChange(val) {
-      this.listMetaData.pageIndex = val
-      this.startQueryMetaData()
+      this.listMetaData.pageIndex = val;
+      this.startQueryMetaData();
     },
     //鍏冩暟鎹煡璇�
     async setMetaDataQuery(row) {
-      this.fromQueryMeta.title = row.name
+      this.fromQueryMeta.title = row.name;
       this.listMetaData = {
         id: row.metaid,
-        // name: "",
-        // pageIndex: 1,
-        // pageSize: 10,
-        // count: 0,
-      }
-      const data = await meta_selectById(this.listMetaData)
+
+      };
+      const data = await meta_selectById(this.listMetaData);
       if (data.code != 200) {
-        return
+        return;
       }
 
-      this.queryMetaFlag1 = true
-      this.metaDataTable1 = [data.result]
+      this.queryMetaFlag1 = true;
+      this.metaDataTable1 = [data.result];
       // this.listMetaData.count = data.count;
     },
+
+
     //婧愭暟鎹煡璇�
     setQueryMetaData(row) {
-      this.fromQueryMeta.title = row.name
+      this.fromQueryMeta.title = row.name;
       this.listMetaData = {
         metaid: row.id,
         name: "",
         pageIndex: 1,
         pageSize: 10,
         count: 0,
-      }
-      this.startQueryMetaData()
-      this.queryMetaFlag = true
+      };
+      this.startQueryMetaData();
+      this.queryMetaFlag = true;
     },
     async startQueryMetaData() {
-      const data = await meta_selectPageAndCountByPid(this.listMetaData)
+      const data = await meta_selectPageAndCountByPid(this.listMetaData);
       if (data.code != 200) {
-        return
+        return;
       }
-      this.metaDataTable = data.result
-      this.listMetaData.count = data.count
+      this.metaDataTable = data.result;
+      this.listMetaData.count = data.count;
     },
 
     onResize() {
-      this.timer && clearTimeout(this.timer)
+      this.timer && clearTimeout(this.timer);
       this.timer = setTimeout(() => {
-        this.calHeight()
-      }, 500)
+        this.calHeight();
+      }, 500);
     },
     calHeight() {
       this.$nextTick(() => {
-        const rect = this.$refs.container.getBoundingClientRect()
-        this.tableHeight = `${rect.height + 97}px`
-        this.styleVar["height"] = `calc(100% - ${rect.height + 28}px)`
-      })
+        const rect = this.$refs.container.getBoundingClientRect();
+        this.tableHeight = `${rect.height + 97}px`;
+        this.styleVar["height"] = `calc(100% - ${rect.height + 28}px)`;
+      });
     },
     async detail(res) {
-      var val = res.tab.split(".")
+      var val = res.tab.split(".");
       const data = await meta_selectFields({
         ns: val[0],
         tab: val[1],
-      })
+      });
 
       if (data.code != 200) {
-        this.$message.error("瀛楁鍒楄〃璋冪敤澶辫触")
-        return
+        this.$message.error("瀛楁鍒楄〃璋冪敤澶辫触");
+        return;
       }
 
-      this.dialogVisible = true
+      this.dialogVisible = true;
 
-      this.attributeData = data.result
+      this.attributeData = data.result;
 
       this.listLoader = {
         id: res.id,
         pageIndex: 1,
         pageSize: 10,
-      }
-      this.getDataLoaderSelectDbData()
+      };
+      this.getDataLoaderSelectDbData();
     },
 
     async getDataLoaderSelectDbData() {
-      const data1 = await meta_selectByPageForUpload(this.listLoader)
+      const data1 = await meta_selectByPageForUpload(this.listLoader);
       if (data1.code != 200) {
-        this.$message.error("瀛楁鍒楄〃璋冪敤澶辫触")
-        return
+        this.$message.error("瀛楁鍒楄〃璋冪敤澶辫触");
+        return;
       }
 
-      var option = data1.result
+      var option = data1.result;
       for (var i in option) {
-        option[i].dirid = option[i].dirName
-        option[i].depid = option[i].depName
-        option[i].createuser = option[i].createName
-        option[i].updateuser = option[i].updateName
-        option[i].verid = option[i].verName
+        option[i].dirid = option[i].dirName;
+        option[i].depid = option[i].depName;
+        option[i].createuser = option[i].createName;
+        option[i].updateuser = option[i].updateName;
+        option[i].verid = option[i].verName;
         if (option[i].createtime != null) {
-          option[i].createtime = this.setInfoBoxTime(option[i].createtime)
+          option[i].createtime = this.setInfoBoxTime(option[i].createtime);
         }
         if (option[i].updatetime != null) {
-          option[i].updatetime = this.setInfoBoxTime(option[i].updatetime)
+          option[i].updatetime = this.setInfoBoxTime(option[i].updatetime);
         }
       }
-      this.dbTableData = data1.result
-      this.count1 = data1.count
+      this.dbTableData = data1.result;
+      this.count1 = data1.count;
     },
     handleLoaderSizeChange(val) {
-      this.listLoader.pageIndex = 1
-      this.listLoader.pageSize = val
-      this.getDataLoaderSelectDbData()
+      this.listLoader.pageIndex = 1;
+      this.listLoader.pageSize = val;
+      this.getDataLoaderSelectDbData();
     },
     handleLoaderCurrentChange(val) {
-      this.listLoader.pageIndex = val
-      this.getDataLoaderSelectDbData()
+      this.listLoader.pageIndex = val;
+      this.getDataLoaderSelectDbData();
     },
 
     async signGetPublicKey() {
-      const res = await sign_getPublicKey()
+      const res = await sign_getPublicKey();
       if (res && res.code == 200) {
-        window.encrypt = new JSEncrypt()
-        encrypt.setPublicKey(res.result)
+        window.encrypt = new JSEncrypt();
+        encrypt.setPublicKey(res.result);
       }
     },
     //鍗曚綅鍒楄〃鑾峰彇
     async getQueryDepTree() {
-      const res = await selectdepTab()
+      const res = await selectdepTab();
       if (res.code != 200) {
-        this.$message.error("鍗曚綅鍒楄〃鑾峰彇澶辫触")
-        return
+        this.$message.error("鍗曚綅鍒楄〃鑾峰彇澶辫触");
+        return;
       }
-      this.companyOption1 = this.treeData(res.result)
-      this.queryForm.depcode = this.companyOption1[0].code
-      this.queryForm.depName = this.companyOption1[0].name
-      this.getQueryDirTree()
+      this.companyOption1 = this.treeData(res.result);
+      this.queryForm.depcode = this.companyOption1[0].code;
+      this.queryForm.depName = this.companyOption1[0].name;
+      this.getQueryDirTree();
     },
 
     async getQueryDirTree() {
-      const res = await selectdirTab()
+      const res = await selectdirTab();
       if (res.code != 200) {
-        this.$message.error("鍗曚綅鍒楄〃鑾峰彇澶辫触")
-        return
+        this.$message.error("鍗曚綅鍒楄〃鑾峰彇澶辫触");
+        return;
       }
-      this.companyOption = this.treeData(res.result)
-      this.queryForm.dirid = this.companyOption[0].id
-      this.queryForm.dircode = this.companyOption[0].code
-      this.queryForm.dirName = this.companyOption[0].name
-      this.getQueryVerList()
+      this.companyOption = this.treeData(res.result);
+      this.queryForm.dirid = this.companyOption[0].id;
+      this.queryForm.dircode = this.companyOption[0].code;
+      this.queryForm.dirName = this.companyOption[0].name;
+      this.getQueryVerList();
     },
 
     async getQueryVerList() {
-      const data = await meta_selectVerByDirid({ dirid: this.queryForm.dirid })
+      const data = await meta_selectVerByDirid({ dirid: this.queryForm.dirid });
       if (data.code != 200) {
-        this.$message.error("鐗堟湰鍒楄〃鑾峰彇澶辫触")
-        return
+        this.$message.error("鐗堟湰鍒楄〃鑾峰彇澶辫触");
+        return;
       }
-      this.verOptions = data.result
-      this.queryForm.verid = data.result[0].id
-      this.getMetaData()
+      this.verOptions = data.result;
+      this.queryForm.verid = data.result[0].id;
+      this.getMetaData();
     },
     verHandleChange(val) {
-      this.queryForm.verid = val
-      this.listData.pageSize = 10
-      this.listData.pageIndex = 1
-      this.getMetaData()
+      this.queryForm.verid = val;
+      this.listData.pageSize = 10;
+      this.listData.pageIndex = 1;
+      this.getMetaData();
     },
     handleChange(data, node, nodeData) {
-      this.listData.pageSize = 10
-      this.listData.pageIndex = 1
-      this.queryForm.dircode = data.code
-      this.queryForm.dirid = data.id
-      this.queryForm.dirName = data.name
-      this.getQueryVerList()
+      this.listData.pageSize = 10;
+      this.listData.pageIndex = 1;
+      this.queryForm.dircode = data.code;
+      this.queryForm.dirid = data.id;
+      this.queryForm.dirName = data.name;
+      this.getQueryVerList();
     },
     handleChange1(data, node, nodeData) {
-      this.listData.pageSize = 10
-      this.listData.pageIndex = 1
-      this.queryForm.depcode = data.code
-      this.queryForm.depName = data.name
-      this.getMetaData()
+      this.listData.pageSize = 10;
+      this.listData.pageIndex = 1;
+      this.queryForm.depcode = data.code;
+      this.queryForm.depName = data.name;
+
+      this.getMetaData();
     },
     handleChange2(data, node, nodeData) {
-      this.editForm.depid = data.id
-      this.editForm.depcode = data.code
-      this.editForm.depName = data.name
+      this.editForm.depid = data.id;
+      this.editForm.depcode = data.code;
+      this.editForm.depName = data.name;
     },
     handleChange3(data, node, nodeData) {
-      this.editForm.dirid = data.id
-      this.editForm.dircode = data.code
-      this.editForm.dirName = data.name
+      this.editForm.dirid = data.id;
+      this.editForm.dircode = data.code;
+      this.editForm.dirName = data.name;
     },
     //鏍煎紡鍖栧垪琛�
     formatData(row, column) {
-      let data = row[column.property]
+      let data = row[column.property];
       if (data == null) {
-        return data
+        return data;
       }
-      return this.format(data)
+      return this.format(data);
     },
     setInfoBoxTime(res) {
       if (res == null) {
-        return res
+        return res;
       }
-      return this.format(res)
+      return this.format(res);
     },
     setInfoBoxSize(res) {
       if (res >= 1024) {
-        return parseFloat(res / 1024).toFixed(3) + " GB"
+        return parseFloat(res / 1024).toFixed(3) + " GB";
       } else {
-        return res + " MB"
+        return res + " MB";
       }
     },
     //鏍煎紡鍖栨椂闂�
     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()
+      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 +
         "-" +
@@ -1213,47 +1553,47 @@
         mm +
         ":" +
         s
-      )
+      );
     },
     //鏍煎紡鍖栨椂闂�
     add0(m) {
-      return m < 10 ? "0" + m : m
+      return m < 10 ? "0" + m : m;
     },
     //鍗曚綅杞崲
     stateFormatSizes(row, column) {
       if (row.sizes >= 1024) {
-        const val = parseFloat(row.sizes / 1024).toFixed(3)
-        return val + " GB"
+        const val = parseFloat(row.sizes / 1024).toFixed(3);
+        return val + " GB";
       } else {
-        return row.sizes + " MB"
+        return row.sizes + " MB";
       }
     },
     //鐩綍鏍戣幏鍙�
     async getSelectDictTab() {
-      const res = await selectdirTab()
+      const res = await selectdirTab();
       if (res.code != 200) {
-        this.$message.error("鍒楄〃璋冪敤澶辫触")
+        this.$message.error("鍒楄〃璋冪敤澶辫触");
       }
-      this.optionCount = this.treeData(res.result)
-      this.dirComPanyOption = this.treeData(res.result)
-      this.listData.depcode = this.optionCount[0].code
+      this.optionCount = this.treeData(res.result);
+      this.dirComPanyOption = this.treeData(res.result);
+      this.listData.depcode = this.optionCount[0].code;
     },
     handleNodeClick(data) {
-      this.listData.pageSize = 10
-      this.listData.pageIndex = 1
-      this.listData.dirid = data.id
-      this.getMetaData()
+      this.listData.pageSize = 10;
+      this.listData.pageIndex = 1;
+      this.listData.dirid = data.id;
+      this.getMetaData();
     },
     getTableDesc(res) {
-      this.activeName = res.tab
+      this.activeName = res.tab;
     },
     //鏄剧ず鏉冮檺鎸夐挳
     showPermsBtn() {
-      let currentPerms = this.$store.state.currentPerms
-      let permsEntity = this.$store.state.permsEntity
+      let currentPerms = this.$store.state.currentPerms;
+      let permsEntity = this.$store.state.permsEntity;
       permsEntity
-        .filter(item => item.perms == currentPerms)
-        .map(item => (this.btnStatus[item.tag.substr(1)] = true))
+        .filter((item) => item.perms == currentPerms)
+        .map((item) => (this.btnStatus[item.tag.substr(1)] = true));
     },
     // ShowWindowFly(res) {
     //   console.log(res);
@@ -1289,83 +1629,83 @@
     // },
     // 璇锋眰鏁版嵁鍐呭
     getMetaData() {
-      this.listData.depcode = this.queryForm.depcode
-      this.listData.dircode = this.queryForm.dircode
+      this.listData.depcode = this.queryForm.depcode;
+      this.listData.dircode = this.queryForm.dircode;
 
-      this.listData.verid = this.queryForm.verid
+      this.listData.verid = this.queryForm.verid;
       // this.listData.dirid = 57
 
-      select_meta_ByPageAndCount(this.listData).then(res => {
-        this.tableData = res.result
-        this.count = res.count
-      })
+      select_meta_ByPageAndCount(this.listData).then((res) => {
+        this.tableData = res.result;
+        this.count = res.count;
+      });
     },
     // 鏌ヨ
     queryInfo() {
-      this.listData.name = this.queryForm.name.trim()
-      this.listData.pageSize = 10
-      this.listData.pageIndex = 1
-      this.getMetaData()
+      this.listData.name = this.queryForm.name.trim();
+      this.listData.pageSize = 10;
+      this.listData.pageIndex = 1;
+      this.getMetaData();
     },
     // 閲嶇疆鏌ヨ
     resetInfo(formName) {
-      this.$refs[formName].resetFields()
-      this.listData.pageSize = 10
-      this.listData.pageIndex = 1
-      this.listData.name = null
-      this.queryForm.dirid = this.companyOption[0].id
-      this.queryForm.depid = this.companyOption1[0].id
-      this.queryForm.dircode = this.companyOption[0].code
-      this.queryForm.depcode = this.companyOption1[0].code
-      this.queryForm.dirName = this.companyOption[0].name
-      this.queryForm.depName = this.companyOption1[0].name
-      this.getQueryVerList()
-      this.getMetaData()
+      this.$refs[formName].resetFields();
+      this.listData.pageSize = 10;
+      this.listData.pageIndex = 1;
+      this.listData.name = null;
+      this.queryForm.dirid = this.companyOption[0].id;
+      this.queryForm.depid = this.companyOption1[0].id;
+      this.queryForm.dircode = this.companyOption[0].code;
+      this.queryForm.depcode = this.companyOption1[0].code;
+      this.queryForm.dirName = this.companyOption[0].name;
+      this.queryForm.depName = this.companyOption1[0].name;
+      this.getQueryVerList();
+      this.getMetaData();
     },
     //鏂板鎸夐挳
     showAddDialog() {
-      this.behavior = "鏂板鐢ㄦ埛"
-      this.editForm = {}
-      this.dialogFormVisible = true
+      this.behavior = "鏂板鐢ㄦ埛";
+      this.editForm = {};
+      this.dialogFormVisible = true;
     },
     cancelAdd(formName) {
-      this.editForm = {}
-      this.$refs[formName].resetFields()
+      this.editForm = {};
+      this.$refs[formName].resetFields();
     },
     sendAdd(formName) {
-      this.$refs[formName].validate(valid => {
+      this.$refs[formName].validate((valid) => {
         if (valid) {
-          this.fullscreenLoading = true
+          this.fullscreenLoading = true;
           insertMeta(this.editForm)
-            .then(res => {
+            .then((res) => {
               setTimeout(() => {
-                this.fullscreenLoading = false
+                this.fullscreenLoading = false;
                 if (res.code == 200) {
-                  this.listData.pageSize = 10
-                  this.listData.pageIndex = 1
-                  this.getMetaData()
+                  this.listData.pageSize = 10;
+                  this.listData.pageIndex = 1;
+                  this.getMetaData();
                   this.$message({
                     message: "娣诲姞鎴愬姛",
                     type: "success",
-                  })
-                  this.editForm = {}
-                  this.dialogFormVisible = false
+                  });
+                  this.editForm = {};
+                  this.dialogFormVisible = false;
                 }
-              }, 500)
+              }, 500);
             })
-            .catch(res => {
-              alert("淇敼澶辫触锛岃閲嶈瘯锛�")
-              this.fullscreenLoading = false
-            })
+            .catch((res) => {
+              alert("淇敼澶辫触锛岃閲嶈瘯锛�");
+              this.fullscreenLoading = false;
+            });
         } else {
-          console.log("error submit!!")
-          return false
+          console.log("error submit!!");
+          return false;
         }
-      })
+      });
     },
     // 鑾峰彇澶氶�夐�変腑鐨勫璞�
     handleSelectionChange(val) {
-      this.multipleSelection = val
+      this.multipleSelection = val;
     },
     // 鍒犻櫎澶氭潯
     deleteMetaInfo() {
@@ -1375,62 +1715,64 @@
         type: "warning",
       })
         .then(() => {
-          var std = []
+          var std = [];
           for (var i in this.multipleSelection) {
-            std.push(this.multipleSelection[i].id)
+            std.push(this.multipleSelection[i].id);
           }
-          deleteMeta({ ids: std.toString() }).then(res => {
+          deleteMeta({ ids: std.toString() }).then((res) => {
             if (res.code == 200) {
               this.$message({
                 type: "success",
                 message: "鍒犻櫎鎴愬姛!",
-              })
-              this.multipleSelection = []
-              this.listData.pageSize = 10
-              this.listData.pageIndex = 1
-              this.getMetaData()
+              });
+              this.multipleSelection = [];
+              // this.listData.pageSize = 10
+              this.listData.pageIndex = 1;
+              this.getMetaData();
             } else {
-              this.$message.error("鍒犻櫎澶辫触")
-              this.multipleSelection = []
+              this.$message.error("鍒犻櫎澶辫触");
+              this.multipleSelection = [];
             }
-          })
+          });
         })
         .catch(() => {
-          this.$message("宸插彇娑堝垹闄�")
-        })
+          this.$message("宸插彇娑堝垹闄�");
+        });
     },
 
     // 鏌ョ湅鐣岄潰
     showDetail(row) {
       // console.log(index, row);
-      this.showinfoBox = true
-      this.itemdetail = row
+      this.showinfoBox = true;
+
+      this.itemdetail = row;
+
     },
     // 鍏抽棴鏌ョ湅
     closeDetial() {
-      this.showinfoBox = false
-      this.itemdetail = {}
+      this.showinfoBox = false;
+      this.itemdetail = {};
     },
     // 淇敼鐣岄潰
     editInfo(row) {
       // console.log(row);
-      delete row.createTime
-      delete row.createUser
-      delete row.updateUser
-      delete row.updateUser
-      this.initialForm = JSON.stringify(row) //澶囦唤
-      this.behavior = "淇敼淇℃伅"
-      this.editForm = JSON.parse(JSON.stringify(row))
-      this.dialogFormVisible = true
-      this.getSelectDictTab()
+      delete row.createTime;
+      delete row.createUser;
+      delete row.updateUser;
+      delete row.updateUser;
+      this.initialForm = JSON.stringify(row); //澶囦唤
+      this.behavior = "淇敼淇℃伅";
+      this.editForm = JSON.parse(JSON.stringify(row));
+      this.dialogFormVisible = true;
+      this.getSelectDictTab();
     },
     handleClose(done) {
       this.$confirm("纭鍏抽棴锛�")
-        .then(_ => {
-          this.editForm = {}
-          done()
+        .then((_) => {
+          this.editForm = {};
+          done();
         })
-        .catch(_ => {})
+        .catch((_) => { });
     },
 
     // 鎻愪氦淇敼
@@ -1441,148 +1783,223 @@
         type: "warning",
       })
         .then(() => {
-          this.dialogFormVisible = false
-          updateMeta(this.editForm).then(res => {
+          this.dialogFormVisible = false;
+          updateMeta(this.editForm).then((res) => {
             setTimeout(() => {
-              this.fullscreenLoading = false
+              this.fullscreenLoading = false;
               if (res.code == 200) {
-                this.listData.pageSize = 10
-                this.listData.pageIndex = 1
-                this.getMetaData()
+                this.listData.pageSize = 10;
+                this.listData.pageIndex = 1;
+
+                if (this.gdbDialog) {
+                  this.getSelectGdbByGuid();
+                } else {
+                  this.getMetaData();
+                }
+
+
                 this.$message({
                   message: "淇敼鎴愬姛",
                   type: "success",
-                })
-                this.editForm = {}
-                this.dialogFormVisible = false
+                });
+                this.editForm = {};
+                this.dialogFormVisible = false;
               }
-            }, 500)
-          })
+            }, 500);
+          });
         })
         .catch(() => {
-          alert("淇敼澶辫触锛岃閲嶈瘯锛�")
-          this.fullscreenLoading = false
-        })
+          alert("淇敼澶辫触锛岃閲嶈瘯锛�");
+          this.fullscreenLoading = false;
+        });
+
     },
     cancelEdit() {
       this.$nextTick(() => {
-        this.editForm = JSON.parse(this.initialForm)
-      })
+        this.editForm = JSON.parse(this.initialForm);
+      });
     },
     async download() {
-      var std = []
+      var ids = [];
       for (var i in this.multipleSelection) {
-        std.push(this.multipleSelection[i].id)
+        ids.push(this.multipleSelection[i].id);
       }
       var obj = {
-        pwd: encrypt.encrypt(this.codeForm.repassword),
-        ids: std,
-      }
-      const res = await meta_downloadReq(JSON.stringify(obj))
-
-      if (res.code != 200) {
-        this.$message.error("涓嬭浇璇锋眰澶辫触")
-        return
-      }
-
-      var downObj = {
-        guid: res.result,
-        pwd: encodeURIComponent(encrypt.encrypt(this.codeForm.repassword)),
-      }
-      const data = await meta_selectDownloadFile(downObj)
-
+        ids: ids,
+      };
+      const data = await meta_selectMetaOverflowDep(obj);
       if (data.code != 200) {
-        this.$message.error("涓嬭浇璇锋眰澶辫触")
-        return
+        return;
       }
-      var token = getToken()
-      var url =
-        BASE_URL +
-        "/meta/downloadFile?token=" +
-        token +
-        "&guid=" +
-        res.result +
-        "&pwd=" +
-        encodeURIComponent(encrypt.encrypt(this.codeForm.repassword))
+      var password = this.codeForm.repassword;
+      if (data.result.length == 0) {
+        var obj = {
+          pwd: encrypt.encrypt(this.codeForm.repassword),
+          ids: ids,
+        };
+        const res = await meta_downloadReq(JSON.stringify(obj));
+        if (res.code != 200) {
+          this.$message.error("涓嬭浇璇锋眰澶辫触");
+          return;
+        }
 
-      $("#downFrame").attr("src", url).click()
-      this.closeDown()
+        var downObj = {
+          guid: res.result,
+          pwd: encodeURIComponent(encrypt.encrypt(this.codeForm.repassword)),
+        };
+        const data1 = await meta_selectDownloadFile(downObj);
+        if (data1.code != 200) {
+          this.$message.error("涓嬭浇璇锋眰澶辫触");
+          return;
+        }
+        var token = getToken();
+        var url =
+          BASE_URL +
+          "/meta/downloadFile?token=" +
+          token +
+          "&guid=" +
+          res.result +
+          "&pwd=" +
+          encodeURIComponent(encrypt.encrypt(this.codeForm.repassword));
+
+        $("#downFrame").attr("src", url).click();
+      } else {
+        var val = "";
+        var std = [];
+        for (var i in data.result) {
+          if (val == "") {
+            val += "codes=" + data.result[i];
+          } else {
+            val += "&codes=" + data.result[i];
+          }
+          std.push({
+            name: data.result[i],
+          });
+        }
+        const data1 = await meta_selectDepsByCodes(val);
+        if (data1.code != 200) {
+          return;
+        }
+
+        this.fileFrom.depid = data1.result;
+        this.fileFrom.ids = ids;
+        this.fileFrom.pwd = encr(password);
+        this.fileFrom.depcodes = data.result;
+        this.dialogInsertFile = true;
+      }
+
+      this.closeDown();
     },
+
+    async getFileInsertApply() {
+      this.dialogInsertFile = false;
+
+      var obj = {
+        ids: this.fileFrom.ids,
+        pwd: this.fileFrom.pwd,
+        tabs: ["鍏冩暟鎹〃"],
+        entities: ["sysmeta"],
+        descr: this.fileFrom.descr,
+        depcodes: this.fileFrom.depcodes,
+      };
+
+      const data = await apply_insertApply(JSON.stringify(obj));
+      this.handleInsertFileClose();
+      if (data.code != 200) {
+        this.$message.error("鏁版嵁鐢宠澶辫触");
+        return;
+      }
+      this.$message({
+        message: "鏁版嵁鐢宠鎴愬姛",
+        type: "success",
+      });
+    },
+    handleInsertFileClose() {
+      this.dialogInsertFile = false;
+      this.fileFrom = {
+        descr: null,
+        depid: null,
+        ids: null,
+        pwd: null,
+        depcodes: null,
+      };
+    },
+
     closeDown() {
-      this.showCodeBox = false
-      this.codeForm.password = ""
-      this.codeForm.repassword = ""
+      this.showCodeBox = false;
+      this.codeForm.password = "";
+      this.codeForm.repassword = "";
     },
     downFormData() {
       if (this.multipleSelection.length == 0) {
-        alert("璇峰厛閫夋嫨瑕佷笅杞界殑鏂囦欢")
-        return
+        alert("璇峰厛閫夋嫨瑕佷笅杞界殑鏂囦欢");
+        return;
       }
-      this.showCodeBox = true
+      this.showCodeBox = true;
     },
 
     handleSizeChange(val) {
-      this.listData.pageSize = val
-      this.listData.pageIndex = 1
-      this.getMetaData()
+      this.listData.pageSize = val;
+      this.listData.pageIndex = 1;
+      this.getMetaData();
     },
     handleCurrentChange(val) {
-      this.listData.pageIndex = val
-      this.getMetaData()
+      this.listData.pageIndex = val;
+      this.getMetaData();
     },
     //鏍戝垪琛ㄧ敓鎴�
     treeData(source) {
-      let cloneData = JSON.parse(JSON.stringify(source)) // 瀵规簮鏁版嵁娣卞害鍏嬮殕
-      return cloneData.filter(father => {
+      let cloneData = JSON.parse(JSON.stringify(source)); // 瀵规簮鏁版嵁娣卞害鍏嬮殕
+      return cloneData.filter((father) => {
         // 寰幆鎵�鏈夐」
-        let branchArr = cloneData.filter(child => father.id == child.pid) // 瀵规瘮ID锛屽垎鍒笂涓嬬骇鑿滃崟锛屽苟杩斿洖鏁版嵁
-        branchArr.length > 0 ? (father.children = branchArr) : "" // 缁欑埗绾ф坊鍔犱竴涓猚hildren灞炴�э紝骞惰祴鍊�
-        return father.pid == 0 // 杩斿洖涓�绾ц彍鍗�
-      })
+        let branchArr = cloneData.filter((child) => father.id == child.pid); // 瀵规瘮ID锛屽垎鍒笂涓嬬骇鑿滃崟锛屽苟杩斿洖鏁版嵁
+        branchArr.length > 0 ? (father.children = branchArr) : ""; // 缁欑埗绾ф坊鍔犱竴涓猚hildren灞炴�э紝骞惰祴鍊�
+        return father.pid == 0; // 杩斿洖涓�绾ц彍鍗�
+      });
     },
     showPreview(row) {
-      let name = row.name
-      if (!name) return false
+      let name = row.name;
+      if (!name) return false;
       return (
         name.indexOf("pdf") != -1 ||
         name.indexOf("jpg") != -1 ||
         name.indexOf("gif") != -1 ||
         name.indexOf("png") != -1 ||
         name.indexOf("jpeg") != -1
-      )
+      );
     },
     handlePreview(row) {
-      let name = row.name
-      this.refreshAttatchDetail()
+      let name = row.name;
+      this.refreshAttatchDetail();
 
       if (name.indexOf(".pdf") != -1) {
-        this.dialog.isPdf = true
+        this.dialog.isPdf = true;
       } else if (
         name.indexOf(".jpg") != -1 ||
         name.indexOf(".gif") != -1 ||
         name.indexOf(".png") != -1 ||
         name.indexOf(".jpeg") != -1
       ) {
-        this.dialog.isJpg = true
+        this.dialog.isJpg = true;
       }
-      this.dialog.dialogVisible = true
-      this.dialog.isPdf = true
+      this.dialog.dialogVisible = true;
+
       var url =
         BASE_URL +
         "/inquiry/downloadForView?guid=" +
         row.guid +
         "&token=" +
-        getToken()
-      this.dialog.src = url
+        getToken();
+      this.dialog.src = url;
     },
     refreshAttatchDetail() {
-      this.dialog.src = ""
-      this.dialog.dialogVisible = false
-      this.dialog.isPdf = false
-      this.dialog.isJpg = false
+      this.dialog.src = "";
+      this.dialog.dialogVisible = false;
+      this.dialog.isPdf = false;
+      this.dialog.isJpg = false;
     },
   },
-}
+};
 </script>
 <style lang="less" scoped>
 //@import url(); 寮曞叆鍏叡css绫�
@@ -1628,5 +2045,13 @@
       position: relative;
     }
   }
+  .el-divider--horizontal {
+    margin: 15px 0;
+  }
+  .gdbTableBox {
+    width: 100%;
+    height: 740px;
+    overflow-y: auto;
+  }
 }
 </style>

--
Gitblit v1.9.3