From d3215f0051943a83f459009359d0039c3a0e1a4e Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期五, 04 八月 2023 10:29:48 +0800
Subject: [PATCH] 信息管理

---
 src/views/datamanage/dataLoader.vue | 1363 +++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 1,139 insertions(+), 224 deletions(-)

diff --git a/src/views/datamanage/dataLoader.vue b/src/views/datamanage/dataLoader.vue
index 7bbaadf..8fcd86b 100644
--- a/src/views/datamanage/dataLoader.vue
+++ b/src/views/datamanage/dataLoader.vue
@@ -1,130 +1,452 @@
 <template>
-  <div class="authorityManagement_box"    v-loading.fullscreen.lock="fullscreenLoading"
-                element-loading-spinner="el-icon-loading"
-                 element-loading-background="rgba(0, 0, 0, 0.8)">
-    <My-bread
-      :list="[
+  <div
+    class="authorityManagement_box"
+    v-loading.fullscreen.lock="fullscreenLoading"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0.8)"
+  >
+    <My-bread :list="[
         `${$t('dataManage.dataManage')}`,
         `${$t('dataManage.datawarehousing')}`,
-      ]"
-    ></My-bread>
+      ]"></My-bread>
     <el-divider />
     <div class="updateContent">
-      <div class="contentIquery">
-        <el-form :inline="true" :model="formInline" class="demo-form-inline">
-          <el-form-item :label="$t('dataManage.dataUpObj.catalogue')">
-            <el-cascader
-              v-model="formInline.catalog"
-              :options="catalogOption"
-              @change="catalogChange"
-              :props="cascader"
-            ></el-cascader>
-          </el-form-item>
-          <el-form-item :label="$t('dataManage.dataUpObj.company')">
-            <el-cascader
-              v-model="formInline.company"
-              :options="companyOption"
-              @change="companyChange"
-              :props="cascader"
-            ></el-cascader>
-          </el-form-item>
-          <el-form-item :label="$t('dataManage.dataUpObj.entryTime')">
-            <el-date-picker
-              v-model.trim="formInline.monitorTime"
-              :picker-options="pickerOptions"
-              type="datetime"
-              placeholder="璇烽�夋嫨"
-              value-format="yyyy-MM-dd HH:mm:ss"
-            />
-          </el-form-item>
-          <el-form-item>
-            <input id="uploadfile" @change= "handleFileChange" type="file"  name="file" multiple="multiple"  style="display: none"></input>
-            <el-button icon="el-icon-document-add" @click="fileSelect" class="primary">{{
-              $t('common.file')
-            }}</el-button>
-          </el-form-item>
-          <br />
-          <el-form-item :label="$t('dataManage.dataUpObj.describe')">
-            <el-input
-              type="textarea"
-              v-model="formInline.desc"
-              maxlength="50"
-              class="nm-skin-pretty"
-              show-word-limit
-:rows="2"  resize='none'
-              style="width: 460px"
-            ></el-input>
-          </el-form-item>
-          <el-form-item>
-            <el-button icon="el-icon-upload" @click="setFileUpload"
+      <el-tabs
+        v-model="activeTabName"
+        @tab-click="handleTabClick"
+      >
+        <el-tab-pane
+          :label="$t('dataManage.dataUpObj.uploaddata')"
+          name="first"
+        >
 
-             type="success">{{
+          <div class="contentIquery">
+            <el-form
+              :inline="true"
+              :model="formInline"
+              class="demo-form-inline"
+            >
+              <el-form-item :label="$t('dataManage.dataUpObj.catalogue')">
+                <el-cascader
+                  v-model="formInline.dirid"
+                  :options="catalogOption"
+                  @change="catalogChange"
+                  :props="cascader"
+                ></el-cascader>
+              </el-form-item>
+              <el-form-item :label="$t('dataManage.dataUpObj.company')">
+                <el-cascader
+                  v-model="formInline.depid"
+                  :options="companyOption"
+                  @change="companyChange"
+                  :props="cascader"
+                ></el-cascader>
+              </el-form-item>
+              <el-form-item :label="$t('dataManage.dataUpObj.versionNo')">
+                <el-select
+                  v-model="formInline.verid"
+                  :placeholder="$t('common.choose')"
+                >
+                  <el-option
+                    v-for="item in verOption"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+
+              <el-form-item>
+                <el-input
+                  type="textarea"
+                  v-model="formInline.fileName"
+                  class="nm-skin-pretty"
+                  show-word-limit
+                  :rows="2"
+                  resize='none'
+                  style="width: 650px;"
+                ></el-input>
+              </el-form-item>
+              <el-form-item>
+                <input
+                  id="uploadfile"
+                  @change="handleFileChange"
+                  type="file"
+                  name="file"
+                  multiple="multiple"
+                  accept=".xls,.xlsx,.mdb,.shp.zip,.gdb.zip"
+                  style="display: none"
+                ></input>
+
+                <el-button
+                  v-if="formInline.fileName == '鏈�夋嫨鏂囦欢'"
+                  type="info"
+                  @click="fileSelect"
+                >
+                  閫夋嫨鏂囦欢
+                </el-button>
+                <el-button
+                  v-else
+                  type="info"
+                  @click="clearFileSelect"
+                >
+                  閲嶇疆
+                </el-button>
+              </el-form-item>
+              <br />
+              <el-form-item>
+                <el-input
+                  type="textarea"
+                  v-model="formInline.descr"
+                  maxlength="50"
+                  class="nm-skin-pretty"
+                  show-word-limit
+                  :rows="2"
+                  resize='none'
+                  style="width: 460px"
+                ></el-input>
+              </el-form-item>
+              <el-form-item>
+                <el-button
+                  icon="el-icon-upload"
+                  @click="setFileUpload"
+                  type="success"
+                >{{
               $t('common.upload')
             }}</el-button>
 
-            <el-button
-              icon="el-icon-delete"
-              type="danger"
-              @click="setFileDelete"
-
-              :disabled="tableData.length == 0 ? true : false"
-              >{{ $t('common.delete') }}</el-button
+                <el-button
+                  icon="el-icon-delete"
+                  type="danger"
+                  @click="setFileDelete"
+                  :disabled="tableData.length == 0 ? true : false"
+                >{{ $t('common.delete') }}</el-button>
+                <el-button
+                  icon="el-icon-data-line"
+                  type="info"
+                  disabled
+                >{{ $t('common.quayTest') }}</el-button>
+                <el-button
+                  icon="el-icon-folder-add"
+                  type="warning"
+                  @click="setFileWare"
+                  :disabled="tableData.length == 0 ? true : false"
+                >{{ $t('common.Warehousin') }}</el-button>
+              </el-form-item>
+            </el-form>
+          </div>
+          <div class="contentTable">
+            <el-table
+              :data="tableData"
+              style="width: 100%"
+              height="99%"
+              @selection-change="handleSelectionChange"
             >
-            <el-button
-              icon="el-icon-folder-add"
-              type="warning"
-                @click="setFileWare"
-              :disabled="tableData.length == 0 ? true : false"
-              >{{ $t('common.Warehousin') }}</el-button
-            >
-          </el-form-item>
-        </el-form>
-      </div>
-      <div class="contentTable">
-         <el-table
-     :data="tableData"
-        border
-        style="width: 100%"
-        height="92%"
-        @selection-change="handleSelectionChange">
-       <el-table-column type="selection" width="55" />
-        <el-table-column
-          align="center"
-          type="index"
-          :label="$t('common.index')"
-          width="70px"
-          fixed
-        />
-
-        <el-table-column
-          align="center"
-          prop="name"
-          :label="$t('userManage.userInfoObj.uname')"
-          fixed
-        />
-    </el-table>
-      <div style="margin-top: 10px" class="pagination_box">
-    <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="listData.pageIndex"
-          :page-sizes="[10, 20, 30, 40]"
-          :page-size="listData.pageSize"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="count"
+              <el-table-column
+                type="selection"
+                width="55"
+              />
+              <el-table-column
+                align="center"
+                type="index"
+                :label="$t('common.index')"
+                width="70px"
+                fixed
+              />
+              <el-table-column
+                align="center"
+                prop="name"
+                :label="$t('common.name')"
+                fixed
+              />
+            </el-table>
+          </div>
+        </el-tab-pane>
+        <el-tab-pane
+          :label="$t('dataManage.dataUpObj.receiptdata')"
+          name="second"
         >
-        </el-pagination>
-      </div>
-      </div>
+          <div
+            class="contentIquery"
+            style="padding-bottom: 0% !important;"
+          >
+            <el-form
+              :inline="true"
+              :model="formWarehousing"
+              class="demo-form-inline"
+            >
+              <el-form-item :label="$t('dataManage.dataUpObj.describe')">
+                <el-input
+                  v-model="formWarehousing.name"
+                  placeholder="璇疯緭鍏ュ唴瀹�"
+                ></el-input>
+              </el-form-item>
+              <el-form-item>
+                <el-button
+                  icon="el-icon-upload"
+                  @click="setWarehouseSearch"
+                  class="primary"
+                >{{
+              $t('common.iquery')
+            }}</el-button>
+                <el-button
+                  @click="setWarehouseReset"
+                  icon="el-icon-folder-add"
+                  type="info"
+                >{{ $t('common.reset') }}</el-button>
+                <el-button
+                  @click="setWarehouseDel"
+                  icon="el-icon-folder-delete"
+                  type="danger"
+                >{{ $t('common.delete') }}</el-button>
+              </el-form-item>
+            </el-form>
+          </div>
+          <div
+            class="contentTable"
+            style="height:500px"
+          >
+            <el-table
+              :data="waretableData"
+              style="width:99%"
+              height="92%"
+              @selection-change="handleDelteChange"
+            >
+              <el-table-column
+                type="selection"
+                width="55"
+              >
+              </el-table-column>
+              <el-table-column
+                align="center"
+                type="index"
+                :label="$t('common.index')"
+                width="70px"
+              />
+              <el-table-column
+                align="center"
+                prop="name"
+                :label="$t('common.name')"
+              />
+              <el-table-column
+                align="center"
+                prop="dirName"
+                :label="$t('dataManage.dataUpObj.catalogue')"
+              />
+              <el-table-column
+                align="center"
+                prop="depName"
+                :label="$t('dataManage.dataUpObj.company')"
+              />
+              <el-table-column
+                align="center"
+                prop="verName"
+                :label="$t('dataManage.dataUpObj.versionNo')"
+              />
+              <el-table-column
+                align="center"
+                prop="type"
+                :label="$t('common.type')"
+              />
+              <el-table-column
+                align="center"
+                prop="sizes"
+                :label="$t('common.size')"
+                :formatter="changeSizeFile"
+              />
+              <el-table-column
+                align="center"
+                :label="$t('dataManage.dataUpObj.tableName')"
+              >
+                <template slot-scope="scope">
+                  <a @click="detail(scope.row)">{{
+          scope.row.tab
+        }}</a>
+                </template>
+              </el-table-column>
+
+              <el-table-column
+                align="center"
+                prop="rows"
+                :label="$t('common.lineNuber')"
+              />
+              <el-table-column
+                align="center"
+                prop="desc"
+                :label="$t('dataManage.dataUpObj.describe')"
+              />
+              <el-table-column
+                align="center"
+                prop="uname"
+                :label="$t('dataManage.vmobj.createonuser')"
+              />
+              <el-table-column
+                align="center"
+                prop="createTime"
+                :label="$t('dataManage.vmobj.createontime')"
+                :formatter="changetimeFile"
+              />
+            </el-table>
+
+            <div
+              style="margin-top: 10px"
+              class="pagination_box"
+            >
+              <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="listData.pageIndex"
+                :page-sizes="[10, 20, 50, 100]"
+                :page-size="listData.pageSize"
+                layout="total, sizes, prev, pager, next, jumper"
+                :total="count"
+              >
+              </el-pagination>
+            </div>
+          </div>
+        </el-tab-pane>
+
+      </el-tabs>
 
     </div>
+    <!--  -->
+    <el-dialog
+      :title="$t('dataManage.datawarehousing')"
+      :visible.sync="dialogWarehousing"
+      width="70%"
+      :before-close="handleWareClose"
+    >
+      <div class="dialogBox">
+        <div class="transFarBox">
+          <ul>
+            <li
+              @click="singleElection(item)"
+              v-for="(item, i) in tableWareOne"
+              :class="{ active: activeName == item.tab }"
+            >{{item.tab}} ({{item.type}})</li>
+          </ul>
+        </div>
+        <div class="tarnsbtton">
+          <div>
+            <div style="padding:2%"> <el-link><i class="el-icon-plus"></i></el-link></div>
+          </div>
+
+        </div>
+        <div class="transFarBox">
+          <ul>
+            <li
+              @click="singleElection2(item)"
+              v-for="(item, i) in tableWareTwo"
+              :class="{ active: activeName2 == item.entity }"
+            >{{item.tabDesc}} ( {{item.ns}}.{{item.tab}})</li>
+          </ul>
+        </div>
+        <div class="tarnsbtton">
+          <div>
+            <div style="padding:2%"> <el-link @click="setWareTableChangeLeft"><i class="el-icon-d-arrow-left"></i></el-link></div><br />
+            <div style="padding:2%">
+              <el-link><i
+                  class="el-icon-d-arrow-right"
+                  @click="setWareTableChangeRight"
+                ></i></el-link>
+            </div>
+          </div>
+        </div>
+        <div class="transFarBox">
+          <ul>
+            <li
+              @click="singleElection3(i)"
+              v-for="(item, i) in tableWareThree"
+              :class="{ active: activeName3 ==( item.tab+i)}"
+            >{{item.tab}} ( {{item.tabDesc}} {{item.ns}}.{{item.tabs}} )</li>
+          </ul>
+        </div>
+      </div>
+      <span
+        slot="footer"
+        class="dialog-footer"
+      >
+        <el-button
+          class="primary"
+          @click="autoMatchWare"
+        >鑷姩鍖归厤</el-button>
+        <el-button @click="setInsrtWareTableClose ">鍙� 娑�</el-button>
+        <el-button
+          class="primary"
+          @click="setInsrtWareTable"
+        >纭� 瀹�</el-button>
+      </span>
+    </el-dialog>
+
+    <el-dialog
+      :title="$t('common.details')"
+      :visible.sync="dialogVisible"
+      width="70%"
+    >
+      <div style="height:600px">
+        <el-table
+          ref="filterTable"
+          :data="dbTableData"
+          height="90%"
+          border
+          style="width: 100%"
+        >
+          <el-table-column
+            width="60"
+            type="index"
+            :label="$t('common.index')"
+          />
+          <el-table-column
+            v-for="(item, index) in attributeData"
+            :key="index"
+            :label="item.alias"
+            :prop="item.field"
+            show-overflow-tooltip
+            align="center"
+          ></el-table-column>
+        </el-table>
+        <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-size="listLoader.pageSize"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="count1"
+          >
+          </el-pagination>
+        </div>
+      </div>
+
+    </el-dialog>
+
   </div>
 </template>
 
 <script>
 import $ from 'jquery';
 import MyBread from '../../components/MyBread.vue';
-import { selectdirTab, queryDepTree } from '../../api/api';
+import { getToken } from '@/utils/auth';
+import {
+  dataLoader_selectDirAll,
+  dataLoader_selectDepAll,
+  dataLoader_selectPath,
+  dataLoader_selectVerByDirid,
+  dataLoader_selectFiles,
+  dataUploadDeleteFiles,
+  dataLoader_InsertFiles,
+  dataLoader_selectMappers,
+  dataLoader_SelectTabs,
+  dataLoader_selectByPageForUpload,
+  dataLoader_deleteMetas,
+  dataLoader_selectFields,
+  dataLoader_selectDbData
+} from '../../api/api';
 export default {
   name: 'dataUpdata',
   components: {
@@ -132,20 +454,35 @@
   },
   data() {
     return {
+
+      formWarehousing: {
+        name: '',
+
+      },
+      waretableData: [],
+      activeTabName: 'first',
+      wareStatus: false,
+      dialogWarehousing: false,
       btnStatus: 0,
       count: 0,
       formInline: {
-        monitorTime: '',
+        verid: '',
+        gather: '',
+        fileName: '鏈�夋嫨鏂囦欢'
       },
+      tableWareOne: [],
+      tableWareTwo: [],
       catalogOption: [],
       companyOption: [],
       tableData: [],
-      listTable: [],
+      listTableWare: [],
+      tableWareThree: [],
       multipleSelection: [],
       fullscreenLoading: false,
       listData: {
         pageIndex: 1,
         pageSize: 10,
+        name: ''
       },
       pickerOptions: {
         disabledDate(time) {
@@ -153,6 +490,7 @@
         },
         selectableRange: '00:00:00 - 23:59:59',
       },
+      verOption: [],
       cascader: {
         label: 'name',
         value: 'id',
@@ -160,6 +498,24 @@
         checkStrictly: true,
         emitPath: false,
       },
+
+      listWare: [],
+      wareSelectOne: null,
+      wareSelectTwo: null,
+      activeName: '',
+      activeName2: '',
+      activeName3: '',
+      wareTableFlag: null,
+      multipleDelete: [],
+      dialogVisible: false,
+      attributeData: [],
+      listLoader: {
+        id: null,
+        pageSize: 1,
+        pageSize: 10,
+      },
+      count1: 0,
+      dbTableData: [],
     };
   },
 
@@ -168,9 +524,10 @@
     this.getQueryDepTree();
     this.timeDefault();
     this.getFilePath();
+
   },
   watch: {
-    'detailData.monitorTime': {
+    'detailData.gather': {
       handler(newValue, oldValue) {
         if (newValue) {
           let date = new Date();
@@ -184,7 +541,7 @@
           ) {
             let hh1 = moment(newValue).format('HH:mm:ss');
             if (hh1 > nowDate) {
-              this.detailData.monitorTime = new Date();
+              this.detailData.gather = new Date();
             }
             st = nowDate;
           } else {
@@ -196,62 +553,417 @@
       },
       deep: true,
       immediate: true,
+
     },
   },
 
   methods: {
-    //鏂囦欢涓婁紶
-    setFileUpload() {
-      this.handlerLoading(true);
-      setTimeout(() => {
-        this.handlerLoading(false);
-      }, 2000);
+    async detail(res) {
+      var val = res.tab.split(".");
+      const data = await dataLoader_selectFields({
+        ns: val[0],
+        tab: val[1]
+      })
+      if (data.code != 200) {
+        this.$message.error('瀛楁鍒楄〃璋冪敤澶辫触');
+        return
+      }
+      var val_data = data.result;
+      for (var i in val_data) {
+        if (val_data[i].alias.indexOf('ID') != -1) {
+          val_data[i].alias = val_data[i].alias.replace('ID', '')
+        }
+      }
+      this.dialogVisible = true;
+      this.attributeData = val_data;
 
-      this.getFileLength();
+      this.listLoader = {
+        id: res.id,
+        pageIndex: 1,
+        pageSize: 10,
+      }
+      this.getDataLoaderSelectDbData();
     },
-    //鏁版嵁鍒犻櫎
-    setFileDelete() {
-      this.handlerLoading(true);
+    async getDataLoaderSelectDbData() {
+      const data1 = await dataLoader_selectDbData(this.listLoader);
+      if (data1.code != 200) {
+        this.$message.error('瀛楁鍒楄〃璋冪敤澶辫触');
+        return
+      }
+      var val = data1.result;
+      for (var i in val) {
+        val[i].createuser = val[i].createName;
+        val[i].depid = val[i].depName;
+        val[i].dirid = val[i].dirName;
+        val[i].verid = val[i].verName;
+        val[i].updateuser = val[i].updateName;
+        if (val[i].createtime != null) {
+          val[i].createtime = this.changetimeLayer(val[i].createtime)
+        }
+        if (val[i].updatetime != null) {
+          val[i].updatetime = this.changetimeLayer(val[i].updatetime)
+        }
+      }
+      this.dbTableData = data1.result;
+      this.count1 = data1.count;
+    },
+    handleLoaderSizeChange(val) {
+      this.listLoader.pageIndex = 1;
+      this.listLoader.pageSize = val;
+      this.getDataLoaderSelectDbData();
+    },
+    handleLoaderCurrentChange(val) {
+      this.listLoader.pageIndex = val;
+      this.getDataLoaderSelectDbData();
+    },
 
+    changetimeLayer(res) {
+      var time = new Date(res);
+      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
+      );
+    },
 
+    changetimeFile(res) {
+      return this.changetimeLayer(res.createTime)
+    },
+    //鏍煎紡鍖栨椂闂�
+    add0(m) {
+      return m < 10 ? '0' + m : m;
+    },
+    setWarehouseSearch() {
 
-      this.multipleSelection.forEach(item => {
-        this.listTable = this.listTable.filter((items) => {
-
-          if (items.name != item.name && item.id != items.id) {
-            return items;
-          }
-
+      this.listData = {
+        pageIndex: 1,
+        pageSize: 10,
+        name: this.formWarehousing.name,
+      }
+      this.getAllWareTable();
+    },
+    async setWarehouseDel() {
+      var std = [];
+      for (var i in this.multipleDelete) {
+        std.push(this.multipleDelete[i].id);
+      }
+      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎鎵�閫夊唴瀹�, 鏄惁缁х画?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(async () => {
+        const data = await dataLoader_deleteMetas({ ids: std.toString() })
+        if (data.code == 200) {
+          this.$message({
+            message: "鍒犻櫎鎴愬姛锛�",
+            type: "success",
+          });
+          this.listData.pageIndex = 1;
+          this.listData.pageSize = 10;
+          this.getAllWareTable();
+        } else {
+          this.$message({
+            message: "鍒犻櫎澶辫触锛�",
+            type: "warning",
+          });
+        }
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堝垹闄�'
         });
       });
-      this.listData.pageIndex= 1;
-      this.listData.pageSize = 10;
-      this.count = this.listTable.length;
-      this.setViewTable();
-      this.getFileLength();
-      this.handlerLoading(false);
+
+      // const res = await dataLoader_deleteMetas({ ids: std.toString() })
+      // if (res.code != 200) {
+      //   this.$message.error('鍒犻櫎澶辫触');
+      // } else {
+      //   this.$message({
+      //     message: '鍒犻櫎鎴愬姛',
+      //     type: 'success'
+      //   });
+      //   this.listData.pageIndex = 1;
+      //   this.listData.pageSize = 10;
+      //   this.getAllWareTable();
+      // }
+    },
+    handleDelteChange(val) {
+      this.multipleDelete = val;
+    },
+    setWarehouseReset() {
+      this.formWarehousing.name = '';
+      this.listData = {
+        pageIndex: 1,
+        pageSize: 10,
+        name: null,
+      }
+      this.getAllWareTable();
+    },
+    handleTabClick(tab, event) {
+      if (this.activeTabName == 'second') {
+        this.setWarehouseReset();
+      }
+    },
+    handleSizeChange(val) {
+      this.listData.pageIndex = 1;
+      this.listData.pageSize = val;
+      this.getAllWareTable();
+    },
+    handleCurrentChange(val) {
+      this.listData.pageIndex = val;
+      this.getAllWareTable();
+    },
+    //鑾峰彇鍏ュ簱鏁版嵁鍒楄〃
+    async getAllWareTable() {
+
+      const res = await dataLoader_selectByPageForUpload(this.listData);
+      if (res.code != 200) {
+        this.$message.error('鍒楄〃鏁版嵁鑾峰彇澶辫触');
+        return;
+      }
+
+      this.count = res.count;
+      this.waretableData = res.result;
+    },
+    //澶у皬鍊兼敼璁�
+    changeSizeFile(row, column, cellValue, index) {
+
+      if (cellValue >= 1024) {
+        return parseFloat(cellValue / 1204).toFixed(3) + "GB"
+      } else {
+        return cellValue + "MB"
+      }
+    },
+    setInsrtWareTableClose() {
+      this.dialogWarehousing = false;
+      this.setClearAttartch();
+    },
+    async setInsrtWareTable() {
+      var obj = {
+        metaEntity: this.formInline,
+        fileEntities: this.tableData,
+        tabEntities: this.tableWareThree
+      };
+      const res = await dataLoader_InsertFiles(JSON.stringify(obj));
+
+      if (res.code != 200) {
+        this.$message.error('鏁版嵁鍏ュ簱澶辫触');
+        return;
+      } else {
+
+        this.$message({
+          message: '鏁版嵁鍏ュ簱鎴愬姛',
+          type: 'success'
+        });
+        this.dialogWarehousing = false;
+        this.getFileLength();
+        this.setClearAttartch();
+      }
+
+    },
+    setClearAttartch() {
+      this.activeName = '';
+      this.activeName2 = '';
+      this.activeName3 = '';
+      this.tableWareThree = [];
+      this.tableWareTwo = [];
+      this.tableWareOne = [];
+    },
+    autoMatchWare() {
+      var val1 = this.tableWareOne;
+      var val2 = this.tableWareTwo;
+      var std = [];
+      for (var i = 0; i < val1.length; i++) {
+
+        const stdTab = this.setSplitWare(val1[i].tab)
+        for (var j = 0; j < val2.length; j++) {
+          if (val2[j].tab == stdTab) {
+            std.push(val1[i].tab)
+            val1[i].entity = val2[j].entity;
+            val1[i].tabDesc = val2[j].tabDesc;
+            val1[i].tabs = val2[j].tab;
+            val1[i].ns = val2[j].ns;
+
+            this.tableWareThree.push(val1[i]);
+          }
+        }
+      }
+      std.forEach(item => {
+        this.tableWareOne = this.tableWareOne.filter(items => items.tab !== item);
+      });
+
+    },
+    setSplitWare(res) {
+      if (res.indexOf(".shp") != -1) {
+        return res.split(".shp").join("");
+      } else if (res.indexOf(".mdb") != -1) {
+        return res.split(".mdb").join("");
+      } else if (res.indexOf(".gdb") != -1) {
+        return res.split(".gdb").join("");
+      } else {
+        return res;
+      }
+    },
+    handleWareClose(done) {
+      this.$confirm('纭鍏抽棴锛�')
+        .then(_ => {
+          done();
+          this.setClearAttartch();
+        })
+        .catch(_ => { });
+    },
+    setWareTableChangeLeft() {
+      var res = this.wareTableFlag;
+      var value1 = this.tableWareThree[res];
+      value1.entity = null;
+      value1.tabDesc = null;
+      if (this.tableWareOne.indexOf(value1) != -1) {
+
+      } else {
+        this.tableWareOne.push(value1);
+        this.tableWareThree.splice(res, 1)
+        this.activeName = '';
+        this.activeName2 = '';
+        this.activeName3 = '';
+      }
+
+    },
+    setWareTableChangeRight() {
+
+      this.wareSelectOne.entity = this.wareSelectTwo.entity;
+      this.wareSelectOne.tabDesc = this.wareSelectTwo.tabDesc;
+      if (this.tableWareThree.indexOf(this.wareSelectOne) != -1) {
+
+      } else {
+        this.tableWareThree.push(this.wareSelectOne)
+        this.tableWareOne.forEach((value, index, array) => {
+          if (value.tab == this.wareSelectOne.tab) {
+            this.tableWareOne.splice(index, 1)
+          }
+        })
+        this.activeName = '';
+        this.activeName2 = '';
+        this.activeName3 = '';
+      }
+    },
+    singleElection(row) {
+      this.wareSelectOne = row;
+      this.activeName = row.tab
+
+    },
+    singleElection2(row) {
+      this.wareSelectTwo = row;
+      this.activeName2 = row.entity
+
+    },
+    singleElection3(res) {
+      this.wareTableFlag = res;
+      this.activeName3 = this.tableWareThree[res].tab + res;
+    },
+
+    //鏌ヨ鎵�鏈夌殑琛�
+    async getDataLoaderSelectTabs() {
+      const res = await dataLoader_SelectTabs();
+      if (res.code != 200) {
+        this.$message.error('鏁版嵁璇锋眰澶辫触');
+        return;
+      }
+      this.tableWareTwo = res.result;
+    },
+    //鏌ヨ鏄犲皠
+    async getDataLoaderSelectMappers(res) {
+      const data = await dataLoader_selectMappers(res);
+
+      if (data.code != 200) {
+        this.$message.error('鏁版嵁璇锋眰澶辫触');
+        return;
+      }
+
+      this.tableWareOne = data.result;
+    },
+    //鏁版嵁鍒犻櫎
+    async setFileDelete() {
+      this.handlerLoading(true);
+      var data = JSON.stringify(this.multipleSelection);
+      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎鎵�閫夊唴瀹�, 鏄惁缁х画?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(async () => {
+        const data = await dataUploadDeleteFiles(data);
+        if (data.code == 200) {
+          this.$message({
+            message: "鍒犻櫎鎴愬姛锛�",
+            type: "success",
+          });
+          this.getFileLength();
+          this.handlerLoading(false);
+        } else {
+          this.$message({
+            message: "鍒犻櫎澶辫触锛�",
+            type: "warning",
+          });
+          this.handlerLoading(false);
+        }
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堝垹闄�'
+        });
+      });
+      // const res = await dataUploadDeleteFiles(data);
+      // if (res.code != 200) {
+      //   this.$message.error('鍒犻櫎澶辫触');
+      //   this.handlerLoading(false);
+      //   return;
+      // }
+      // this.getFileLength();
+      // this.handlerLoading(false);
+
+
+
     },
     //鏁版嵁鍏ュ簱
-    setFileWare() {
-      this.handlerLoading(true);
-      setTimeout(() => {
-        this.handlerLoading(false);
-      }, 2000);
-      this.getFilePath();
+    async setFileWare() {
+      this.tableWareThree = [];
+      this.listTableWare = [];
+      this.getDataLoaderSelectTabs();
+      this.getDataLoaderSelectMappers(this.formInline.path);
+      this.dialogWarehousing = true;
+      //     if(this.multipleSelection.length==0){
+      //      this.$message.error('璇烽�夋嫨瑕佸叆搴撶殑鏁版嵁');
+      //       return
+      //     }
+      //       var obj = {
+      //             metaEntity: this.formInline,
+      //             fileEntities: this.multipleSelection
+      //           };
+
+      //       const res = await dataLoader_InsertFiles(JSON.stringify(obj));
+
+      //        if (res.code != 200) {
+      //       this.$message.error('鏂囦欢鍏ュ簱澶辫触');
+      //       return;
+      //     }
+
+      //
+
     },
-    //鑾峰彇鏂囦欢涓婁紶璺緞
-    getFilePath() {
-      for (var i = 0; i < 20; i++) {
-        this.listTable.push({
-          id: i,
-          name: 'value' + i
-        })
-      }
-      this.count = this.listTable.length;
-      this.listData.pageIndex = 1;
-      this.listData.pageSize = 10;
-      this.setViewTable();
-    },
+
     //鏄剧ず琛ㄦ牸鏁版嵁
     setViewTable() {
       var index = this.listData.pageIndex - 1;
@@ -262,30 +974,87 @@
         if (this.listTable[i] != null) {
           std.push(this.listTable[i])
         }
-
       }
-
       this.tableData = std;
     },
-    //鑾峰彇鏂囦欢涓婁紶鏁版嵁
-    getFileLength() {
+    //鏂囦欢涓婁紶
+    setFileUpload() {
+      this.fullscreenLoading = true;
+      var token = getToken();
+      var formData = new FormData();
 
+
+      var fs = document.getElementById("uploadfile");
+      for (var i = 0, c = fs.files.length; i < c; i++) {
+        formData.append(fs.files[i].name, fs.files[i]); // fs.files[i].name,file
+      }
+
+
+      $.ajax(BASE_URL + "/dataLoader/uploadFiles?token=" + token + "&path=" + this.formInline.path, {
+        type: "post",
+        data: formData,
+        async: true,
+        cache: false,
+        processData: false,
+        contentType: false,
+        success: (rs) => {
+          this.fullscreenLoading = false;
+          this.$message({
+            message: '鏁版嵁涓婁紶鎴愬姛',
+            type: 'success'
+          });
+          this.getFileLength();
+
+
+          this.clearFileSelect();
+        },
+        error: (rs) => {
+          this.fullscreenLoading = false;
+          this.$message.error('鏁版嵁涓婁紶澶辫触');
+          this.clearFileSelect();
+        }
+      });
+
+
+    },
+    //鑾峰彇鏂囦欢涓婁紶鏁版嵁
+    async getFileLength() {
+      const res = await dataLoader_selectFiles(this.formInline.path);
+      if (res.code != 200) {
+        this.$message.error('鏂囦欢涓婁紶鏁版嵁鑾峰彇澶辫触');
+        return;
+      }
+
+      if (res.result == null) {
+        this.count = 0;
+        this.setClearTableData();
+      } else {
+        this.count = res.result.length;
+        this.tableData = res.result;
+      }
+
+
+      // this.listData.pageIndex = 1;
+      // this.listData.pageSize = 10;
+      // this.setViewTable();
     },
     //娓呴櫎琛ㄦ牸淇℃伅
     setClearTableData() {
       this.tableData = [];
       this.listTable = [];
     },
-    //鍒嗛〉鎺у埗
-    handleSizeChange(res) {
-      this.listData.pageIndex = 1;
-      this.listData.pageSize = res;
-      this.setViewTable();
-    },
-    handleCurrentChange(res) {
-      this.listData.pageIndex = res;
-      this.setViewTable();
-    },
+
+
+    // //鍒嗛〉鎺у埗
+    // handleSizeChange(res) {
+    //   this.listData.pageIndex = 1;
+    //   this.listData.pageSize = res;
+    //   this.setViewTable();
+    // },
+    // handleCurrentChange(res) {
+    //   this.listData.pageIndex = res;
+    //   this.setViewTable();
+    // },
     //琛ㄦ牸閫変腑浜嬩欢
     handleSelectionChange(res) {
       this.multipleSelection = res;
@@ -294,14 +1063,21 @@
     fileSelect() {
       $("#uploadfile").click();
     },
-    handleFileChange() {
-      var val = document.getElementById("uploadfile").files;
-      if (!val || !val.length) return;
-      var formData = new FormData();
-      for (var i = 0; i < val.length; i++) {
-        formData.append(val[i].name, val[i]);
+    handleFileChange(event) {
+      var std = [];
+      var len = event.currentTarget.files.length;
+      for (var i = 0; i < len; i++) {
+        var f = event.currentTarget.files[i];
+        std.push(f.name)
       }
-      console.log(formData)
+
+      this.formInline.fileName = std.toString();
+
+
+    },
+    clearFileSelect() {
+      this.formInline.fileName = "鏈�夋嫨鏂囦欢";
+      document.getElementById("uploadfile").value = "";
     },
     //褰撳墠鏃堕棿鑾峰彇
     timeDefault() {
@@ -322,41 +1098,66 @@
         minutes +
         sign2 +
         seconds;
-      this.formInline.monitorTime = s1;
+      this.formInline.gather = s1;
     },
 
     //Loading鏄鹃殣
     handlerLoading(res) {
-      this.fullscreenLoading = res;
+
     },
     //鐩綍鍒囨崲
     catalogChange(value) {
-      this.formInline.catalog = value;
+      this.formInline.dirid = value;
+      this.getselectVerByDirid();
     },
     //鍗曚綅鍒囨崲
     companyChange(value) {
-      this.formInline.company = value;
+      this.formInline.depid = value;
     },
-
-    //鍗曚綅鍒楄〃鑾峰彇
-    async getQueryDepTree() {
-      const res = await queryDepTree();
+    //鑾峰彇鏂囦欢涓婁紶璺緞
+    async getFilePath() {
+      const res = await dataLoader_selectPath();
       if (res.code != 200) {
         this.$message.error('鍗曚綅鍒楄〃鑾峰彇澶辫触');
         return;
       }
-      this.formInline.company = 1;
+      this.formInline.path = res.result;
+    },
+    //鍗曚綅鍒楄〃鑾峰彇
+    async getQueryDepTree() {
+      const res = await dataLoader_selectDepAll();
+      if (res.code != 200) {
+        this.$message.error('鍗曚綅鍒楄〃鑾峰彇澶辫触');
+        return;
+      }
+      this.formInline.depid = 1;
       this.companyOption = this.treeData(res.result);
     },
+    //鐗堟湰鍙疯幏鍙�
+    async getselectVerByDirid() {
+      this.verOption = [];
+      this.formInline.verid = "";
+      const res = await dataLoader_selectVerByDirid({ dirid: this.formInline.dirid });
+
+      if (res.code != 200) {
+        this.$message.error('鐗堟湰鍒楄〃鑾峰彇澶辫触');
+        return;
+      }
+      this.verOption = res.result;
+      this.formInline.verid = res.result[0].id;
+    },
+
+
     //鐩綍鍒楄〃鑾峰彇
     async getSelectdirTab() {
-      const res = await selectdirTab();
+      const res = await dataLoader_selectDirAll();
       if (res.code != 200) {
         this.$message.error('鐩綍鍒楄〃鑾峰彇澶辫触');
         return;
       }
-      this.formInline.catalog = 1;
+      this.formInline.dirid = 1;
       this.catalogOption = this.treeData(res.result);
+      this.getselectVerByDirid()
     },
     //鏍戝垪琛ㄧ敓鎴�
     treeData(source) {
@@ -392,8 +1193,8 @@
       border-radius: 5px;
     }
     .contentTable {
-      width: 98%;
-      height: 72%;
+      width: 97%;
+      height: 400px;
       border: 1px solid white;
       padding: 1%;
       border-radius: 5px;
@@ -456,42 +1257,6 @@
           background-color: #216fe6;
         }
       }
-      .pagination_box {
-        margin-top: 20px;
-        /deep/.el-input__inner {
-          background-color: transparent !important;
-          border: 1px solid;
-          color: white;
-        }
-        /deep/.el-pagination__total {
-          color: white;
-        }
-        /deep/.el-pagination__jump {
-          color: white;
-        }
-        /deep/.el-pager li.active {
-          color: #409eff;
-        }
-        /deep/.el-pager li {
-          color: white;
-          background: transparent;
-        }
-        /deep/.el-pager li {
-          color: white;
-        }
-        /deep/.btn-prev {
-          background: transparent;
-        }
-        /deep/.btn-next {
-          background: transparent;
-        }
-         /deep/.btn-next i {
-          color:white;
-        }
-        /deep/.btn-prev i {
-          color:white;
-        }
-      }
     }
     .primary {
       background: #409eff;
@@ -530,5 +1295,155 @@
   /deep/.el-loading-spinner i {
     color: #1890ff !important;
   }
+  /deep/ .el-dialog {
+    background: #303030;
+  }
+  /deep/.el-range-editor.is-active,
+  .el-range-editor.is-active:hover,
+  .el-select .el-input.is-focus .el-input__inner {
+    border: 1px solid;
+  }
+  /deep/.el-dialog__title {
+    color: white;
+  }
+  .dialogBox {
+    width: 100%;
+    height: 500px;
+    display: flex;
+    justify-content: space-between;
+    .transFarBox {
+      width: 30%;
+      height: 100%;
+      border: 1px solid white;
+      border-radius: 5px;
+      max-height: 500px;
+      overflow-y: auto;
+      li {
+        color: white;
+        border-bottom: 1px solid white;
+        line-height: 30px;
+        text-align: center;
+      }
+      li:hover {
+        background: rgba(255, 255, 255, 0.3);
+      }
+      .active {
+        color: #409eff;
+      }
+    }
+    .tarnsbtton {
+      width: 6%;
+      height: 100%;
+
+      /*flex 甯冨眬*/
+      display: flex;
+      /*瀹炵幇鍨傜洿灞呬腑*/
+      align-items: center;
+      /*瀹炵幇姘村钩灞呬腑*/
+      justify-content: center;
+    }
+  }
+
+  /*淇敼table 琛ㄤ綋鐨勮儗鏅鑹插拰鏂囧瓧棰滆壊*/
+  /deep/ .el-table {
+    background-color: transparent;
+
+    th,
+    td {
+      background-color: transparent;
+    }
+    .el-table__expanded-cell {
+      background-color: transparent !important;
+    }
+
+    // 琛ㄥご鑳屾櫙鑹�
+    th.el-table__cell {
+      background-color: #303030 !important;
+      color: #fff;
+    }
+    tr > td {
+      background-color: #303030 !important;
+      color: #fff;
+    }
+
+    // hover鏁堟灉
+    tr:hover > td {
+      background-color: rgba(255, 255, 255, 0.3) !important;
+    }
+
+    tbody tr:hover {
+      background-color: rgba(255, 255, 255, 0.3) !important;
+      // text-align: center;
+    }
+
+    // 婊氬姩鏉″楂�
+    .el-table__body-wrapper::-webkit-scrollbar {
+      width: 5px;
+      height: 5px;
+    }
+
+    .el-table__body-wrapper::-webkit-scrollbar {
+      width: 5px;
+      /*婊氬姩鏉″搴�*/
+      height: 5px;
+      /*婊氬姩鏉¢珮搴�*/
+    }
+    /*瀹氫箟婊氬姩鏉¤建閬� 鍐呴槾褰�+鍦嗚*/
+    .el-table__body-wrapper::-webkit-scrollbar-track {
+      box-shadow: 0px 1px 3px #216fe6 inset;
+      /*婊氬姩鏉$殑鑳屾櫙鍖哄煙鐨勫唴闃村奖*/
+      border-radius: 10px;
+    }
+
+    /*瀹氫箟婊戝潡 鍐呴槾褰�+鍦嗚*/
+    .el-table__body-wrapper::-webkit-scrollbar-thumb {
+      box-shadow: 0px 1px 3px #216fe6 inset;
+      border-radius: 6px;
+      background-color: #216fe6;
+    }
+  }
+  /deep/.el-tabs__active-bar {
+    background: #409eff;
+  }
+  /deep/ .el-tabs__item {
+    color: #409eff;
+  }
+  .pagination_box {
+    margin-top: 20px;
+    /deep/.el-input__inner {
+      background-color: transparent !important;
+      border: 1px solid;
+      color: white;
+    }
+    /deep/.el-pagination__total {
+      color: white;
+    }
+    /deep/.el-pagination__jump {
+      color: white;
+    }
+    /deep/.el-pager li.active {
+      color: #409eff;
+    }
+    /deep/.el-pager li {
+      color: white;
+      background: transparent;
+    }
+    /deep/.el-pager li {
+      color: white;
+    }
+    /deep/.btn-prev {
+      background: transparent;
+    }
+    /deep/.btn-next {
+      background: transparent;
+    }
+    /deep/.btn-next i {
+      color: white;
+    }
+    /deep/.btn-prev i {
+      color: white;
+    }
+  }
 }
 </style>
+ 

--
Gitblit v1.9.3