管道基础大数据平台系统开发-【前端】-新系統界面
surprise
2024-02-05 fb98e10c76d7e6c2d01f3a9f8c1b727f905cbdca
src/views/Archive/index.vue
@@ -1,603 +1,294 @@
<template>
  <div class="archive">
    <div class="top_header">
      <div class="top_left">
        <My-bread :list="[`${$t('synthesis.synthesis')}`, `${$t('synthesis.archive')}`]"></My-bread>
      </div>
  <div class="archive box_div">
    <div class="menu_top">
      <My-bread :list="[`${$t('synthesis.synthesis')}`, `${$t('synthesis.archive')}`]"></My-bread>
      <!-- 下载列表 -->
      <i
        @click="getdownloadList"
        class="el-icon-tickets"
        :title="$t('synthesis.DownloadList')"
      ></i>
    </div>
    <div class="box_item">
      <div class="box_left">资料类别</div>
      <div class="box_cont">
        <div v-if="isShowFirstCheck">
          <el-checkbox-group v-model="checkedDataType">
            <el-checkbox
              @change="handleCheckedDataTypeChange(item)"
              v-for="(item, index)  in showList"
              :label="item.name"
              :key="index"
            >{{item.name}}</el-checkbox>
          </el-checkbox-group>
        </div>
        <div
          v-if="!isShowFirstCheck"
          class="box_div"
          v-for="(item, index) in showList"
          :key="index"
          @click="changeListDataType(item)"
        >
          <!-- <el-checkbox
            v-if="isShowFirstCheck"
            v-model="item.isCheckedFlag"
            :checked="item.isCheckedFlag"
          ></el-checkbox> -->
          <div
            :class="{menuActive:dataTypeName == item.name}"
            style="margin-left: 5px"
          >{{ item.name }}</div>
        </div>
      </div>
      <div class="box_right">
        <div
          class="box_div box_menu"
          @click="moreEvent(1)"
        >
          {{ $t('synthesis.more') }}
        </div>
        <div
          class="box_div box_menu"
          @click="checkEvent(1)"
        >
          <i class="el-icon-plus"></i>
          <span v-if="!isShowFirstCheck">{{ $t('synthesis.Multiplechoice') }}</span>
          <span v-if="isShowFirstCheck">{{ $t('synthesis.Singlechoice') }}</span>
        </div>
      </div>
    </div>
    <div class="box_item">
      <div class="box_left">项目名称</div>
      <div class="box_cont">
        <div v-if=" isShowSecondCheck">
          <el-checkbox-group v-model="checkedEntryName">
            <el-checkbox
              @change="handleCheckedEntryNameChange(item)"
              v-for="(item, index)  in showList1"
              :label="item.name"
              :key="index"
            >{{item.name}}</el-checkbox>
          </el-checkbox-group>
        </div>
        <div
          v-if="!isShowSecondCheck"
          class="box_div"
          v-for="(item, index) in showList1"
          :key="index"
          @click="changeListEntryName(item)"
        >
          <div
            :class="{menuActive:EntryName == item.name}"
            style="margin-left: 5px"
          >{{ item.name }}</div>
        </div>
      </div>
      <div class="box_right">
        <div
          class="box_div box_menu"
          @click="moreEvent(2)"
        >
          {{ $t('synthesis.more') }}
        </div>
        <div
          class="box_div box_menu"
          @click="checkEvent(2)"
        >
          <i class="el-icon-plus"></i>
          <span v-if="!isShowSecondCheck">{{ $t('synthesis.Multiplechoice') }}</span>
          <span v-if="isShowSecondCheck">{{ $t('synthesis.Singlechoice') }}</span>
        </div>
      </div>
    </div>
    <div class="bottom_content">
      <div class="bottom_left">
        <!-- <div class="box_div">当前搜索关键词:</div> -->
        <div>
          <ul>
            <li>搜索类型</li>
            <li
              @click="getMenuChange(1)"
              :class="{ menuActive: isMenuActive }"
            >
              数据库
            </li>
            <li
              @click="getMenuChange(2)"
              :class="{ menuActive: !isMenuActive }"
              style="border-bottom: 1px solid white"
            >
              文件数据源
            </li>
          </ul>
        </div>
      </div>
      <div class="bottom_right">
        <div>
          <el-form
            :inline="true"
            :model="formInline"
            class="demo-form-inline"
    <el-divider />
    <!-- 查询框 -->
    <div class="iquery">
      <el-form
        :inline="true"
        :model="formInline"
        class="demo-form-inline"
      >
        <!-- 数据类型 -->
        <el-form-item :title="$t('archiveObj.dataType')">
          <el-select
            size="small"
            v-model="formInline.dataType"
            :popper-append-to-body="false"
            :placeholder="$t('archiveObj.label1')"
            @change="setDataTypeChange()"
          >
            <!-- <el-form-item>
              <el-cascader
                v-model="formInline.dirid"
                :show-all-levels="false"
                :options="companyOption"
                @change="handleChange"
                :props="{
              label: 'name',
              value: 'id',
              children: 'children',
              checkStrictly: true,
              emitPath: false,
            }"
              ></el-cascader> -->
            </el-form-item>
            <el-form-item>
              <el-cascader
                v-model="formInline.depid"
                :show-all-levels="false"
                :options="companyOption1"
                @change="handleChange1"
                :props="{
              label: 'name',
              value: 'id',
              children: 'children',
              checkStrictly: true,
              emitPath: false,
            }"
              ></el-cascader>
            </el-form-item>
            <el-form-item>
              <el-input
                v-model="formInline.tab"
                suffix-icon="el-icon-search"
                :placeholder="$t('common.pleaseInput')"
              ></el-input>
            </el-form-item>
            <el-form-item>
              <el-button
                icon="el-icon-search"
                @click="searchDataLibSelectTabs"
                size="mini"
              >{{
              $t('common.iquery')
            }}</el-button>
              <el-button
                icon="el-icon-refresh"
                @click="restDataLibSelectTabs"
                type="info"
                size="mini"
              >{{
              $t('common.reset')
            }}</el-button>
            </el-form-item>
            <el-form-item>
              <el-button
                @click="getSpaceMapVisibale"
                size="mini"
              >{{
              $t('synthesis.rangequery')
            }}</el-button>
            </el-form-item>
          </el-form>
        </div>
        <div v-if="isMenuActive">
          <ul>
            <li
              v-for="(item, index) in dataType"
              :key="index"
            <el-option
              :label="$t('archiveObj.dataBank')"
              value="type1"
            ></el-option>
            <el-option
              :label="$t('archiveObj.file')"
              value="type2"
            ></el-option>
          </el-select>
        </el-form-item>
        <!-- 资料类别 -->
        <el-form-item :title="$t('archiveObj.dataClass')">
          <el-select
            :popper-append-to-body="false"
            v-model="formInline.category"
            multiple
            clearable
            collapse-tags
            multiple
            filterable
            allow-create
            default-first-option
            size="small"
            ref="cascaders"
            :placeholder="$t('archiveObj.label4')"
            @change="categorySelectChange('orgName','org',categoryOptions)"
          >
            <el-option
              v-for="item in categoryOptions"
              :key="item.key"
              :label="item.value"
              :value="item.key"
            >
              <div
                class="box_div"
                @click="getShowTable(item)"
              >
                {{ item.tabDesc }}
              </div>
            </li>
          </ul>
        </div>
            </el-option>
          </el-select>
        </el-form-item>
        <!-- 项目名称 -->
        <el-form-item :title="$t('archiveObj.entryName')">
          <el-select
            :popper-append-to-body="false"
            v-model="formInline.item"
            multiple
            clearable
            collapse-tags
            multiple
            filterable
            allow-create
            default-first-option
            size="small"
            :placeholder="$t('archiveObj.label5')"
            @change="itemSelectChange('orgName','org',itemOptions)"
          >
            <el-option
              v-for="item in itemOptions"
              :key="item.code"
              :label="item.name"
              :value="item.code"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <!-- 单位 -->
        <el-form-item :title="$t('archiveObj.unit')">
          <el-select
            size="small"
            v-model="formInline.depName"
            :placeholder="$t('archiveObj.label3')"
            :popper-append-to-body="false"
            ref="treeSelect"
          >
            <el-option
              :value="formInline.depcode"
              :label="formInline.depName"
              style="height: auto"
            >
              <el-tree
                ref="tree"
                :data="depOption"
                node-key="id"
                :props="defaultProps"
                @node-click="depChange"
              />
            </el-option>
          </el-select>
          </el-select>
        </el-form-item>
        <!-- 关键字 -->
        <el-form-item :title="$t('archiveObj.keywords')">
          <el-input
            :placeholder="$t('archiveObj.label6')"
            v-model="formInline.keywords"
            size="small"
          > <i
              :title="$t('common.iquery')"
              @click="setSearchKeyWords"
              slot="suffix"
              class="el-input__icon el-icon-search"
            ></i></el-input>
        </el-form-item>
        <!-- 批量下載 -->
        <el-form-item
          style="float:right"
          v-if="formInline.dataType =='type2'"
        >
          <el-button
            type="success"
            size="small"
            icon="el-icon-download"
            @click="setCardDownload"
          >{{$t('common.download')}}</el-button>
        </el-form-item>
        <!-- 空间查询 -->
        <el-form-item style="float:right">
          <el-button
            type="primary"
            size="small"
            icon="el-icon-search"
            @click="getSpaceMapVisibale"
          >{{$t('synthesis.rangequery')}}</el-button>
        </el-form-item>
        <!-- 重置 -->
        <el-form-item style="float:right">
          <el-button
            type="info"
            size="small"
            icon="el-icon-refresh"
            @click="setQuerAllTablesRefresh"
          >{{$t('common.reset')}}</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="contBox">
      <div
        id="archTopBox"
        class="archTopBox"
      >
        <div
          class="boxCard"
          v-if="!isMenuActive"
          v-for="(item,index) in tableData1"
          v-for="(item,index) in monthdata"
        >
          <el-card class="box-card">
            <div
              slot="header"
              class="clearfix"
            >
              <span>{{item.name}}</span>
              <span v-show="formInline.dataType =='type2'">
                <el-checkbox
                  v-model="item.ischecked"
                  @change="handleCheckedDataTypeChange(item)"
                  style="margin-right:10px"
                >
                </el-checkbox>
                <span v-if="item.ismeta > 0">
                  <el-link
                    style="color: #409eff"
                    title="源数据查询"
                    target="_blank"
                    @click="setQueryMetaData(item)"
                  >{{ item.name }}</el-link>
                </span>
                <span v-else-if="item.metaid > 0"> <el-link
                    style="color: #409eff"
                    title="元数据查询"
                    target="_blank"
                    @click="setMetaDataQuery(item)"
                  >{{ item.name }}</el-link></span>
                <span v-else>{{ item.name }}</span>
              </span>
              <span v-show="formInline.dataType !='type2'">{{item.tabDesc}}</span>
              <div style="float: right; padding: 3px 0">
                <i
                  @click="showDetail1(item)"
                  class="el-icon-tickets"
                  v-show="formInline.dataType=='type2' "
                  v-if="showView(item, /[]/)"
                  class="el-icon-view"
                  :title="$t('common.preview')"
                  @click="setAttatchFileView(index, item)"
                ></i>
                <i
                  style="margin-left:10px"
                  @click="setFileDownload(item)"
                  class="el-icon-tickets"
                  :title="$t('common.details')"
                  @click="setCardDetails(item)"
                ></i>
                <!-- <i
                  v-show="formInline.dataType=='type2'"
                  style="margin-left:10px"
                  class="el-icon-download"
                  :title="$t('common.download')"
                  @click="setCardDownload(item)"
                ></i> -->
                <i
                  v-show="!item.isShow"
                  style="margin-left:10px"
                  class="el-icon-arrow-up"
                  :title="$t('archiveObj.fold')"
                  @click="setCardChange(item)"
                ></i>
                <i
                  v-show="item.isShow"
                  style="margin-left:10px"
                  class="el-icon-arrow-down"
                  :title="$t('archiveObj.develop')"
                  @click="setCardChange(item)"
                ></i>
              </div>
            </div>
            <div class="cardItem"> {{$t('dataManage.vmobj.format')}} : {{ item.type }} </div>
            <div class="cardItem"> {{$t('dataManage.vmobj.size')}} : {{stateFormatSizes(item.sizes)}} </div>
            <div class="cardItem"> {{$t('dataManage.vmobj.createonuser')}} : {{item.uname}} </div>
            <div class="cardItem"> {{$t('dataManage.vmobj.depName')}} : {{item.depName}} </div>
            <div class="cardItem"> {{$t('dataManage.vmobj.createontime')}} : {{format(item.createTime)}} </div>
            <div
              :id="item.id"
              style="margin:5px 1px"
              v-show="!item.isShow && formInline.dataType=='type2'"
            >
              <div class="cardItem"> {{$t('archiveObj.dataType')}} : {{ item.mold }} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.format')}} : {{ item.type }} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.size')}} : {{stateFormatSizes(item.sizes)}} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.tab')}} : {{ item.tab }} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.dirName')}} : {{ item.dirName }} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.row')}} : {{ item.rows }} </div>
              <div class="cardItem"> {{$t('archiveObj.downloads')}} : {{ item.downCount }} 次 </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.createonuser')}} : {{item.uname}} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.depName')}} : {{item.depName}} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.createontime')}} : {{format(item.createTime)}} </div>
            </div>
            <div
              :id="item.id"
              style="margin:5px 1px"
              v-show="!item.isShow && formInline.dataType!='type2'"
            >
              <div class="cardItem"> {{$t('archiveObj.dataType')}} : {{ item.mold }} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.tab')}} : {{ item.ns+'.'+item.tab }} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.row')}} : {{ item.rows }} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.dirName')}} : {{ item.bak }} </div>
              <!-- <div class="cardItem"> {{$t('archiveObj.storageType')}} : {{ item.tableType }} </div> -->
            </div>
          </el-card>
        </div>
      </div>
    </div>
    <div class="panerPage">
      <div 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-pagination>
      </div>
    </div>
    <el-dialog
      :title="dialogtitle"
      :visible.sync="dialogVisible"
      width="90%"
      top="5vh"
      :before-close="handleClose"
    >
      <!-- 条件-->
      <el-dialog
        width="37%"
        :visible.sync="conditionVisible"
        append-to-body
        title="查询条件"
        :before-close="handleconditionClose"
      >
        <el-form
          :inline="true"
          :model="formSql"
          class="demo-form-inline"
        >
          <el-form-item>
            <el-select
              @change="fieldChange($event)"
              v-model="formSql.field"
            >
              <el-option
                v-for="item in filedsOption"
                :key="item.field"
                :label="item.alias"
                :value="item.field"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-select v-model="formSql.condition">
              <el-option
                v-for="item in condOption"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item v-show="!fromSqlflag">
            <el-input v-model="formSql.value"></el-input>
          </el-form-item>
          <el-form-item v-show="fromSqlflag">
            <el-date-picker
              v-model="formSql.date"
              type="date"
              placeholder="选择日期"
              value-format="yyyy-MM-dd"
            >
            </el-date-picker>
          </el-form-item>
        </el-form>
        <span
          slot="footer"
          class="dialog-footer"
        >
          <el-button @click="startFiledAndcondition">取 消</el-button>
          <el-button
            class="primaries"
            @click="appendQueryFilter"
          >确 定</el-button>
        </span>
      </el-dialog>
      <!-- 附件-->
      <el-dialog
        width="30%"
        :visible.sync="innerVisible"
        append-to-body
      >
        <div class="contentBox">
          <ul>
            <li v-for="(item, index) in itemdetail">
              <p>
                <label> {{ item.label }}:</label>
                <label class="boxlabel">{{ item.value }}</label>
              </p>
              <el-divider></el-divider>
            </li>
          </ul>
        </div>
      </el-dialog>
      <!-- 詳情-->
      <el-dialog
        width="30%"
        :visible.sync="outerVisible"
        append-to-body
      >
        <el-form
          :model="fromfile"
          class="demo-form-inline"
        >
          <el-form-item>
            <el-input
              v-model="fromfile.file"
              style="width: 300px; margin-right: 20px"
              :placeholder="$t('common.choose')"
              disabled
            ></el-input>
            <input
              name="file1"
              type="file"
              id="insertFile"
              multiple="multiple"
              style="display: none"
              @change="insertFile( )"
            />
            <el-link
              @click="getInsertFile( )"
              :underline="false"
            ><i class="el-icon-folder-opened"></i></el-link>
          </el-form-item>
          <el-form-item>
            <el-row>
              <el-col :span="3">
                <el-link
                  class="elLink"
                  :underline="false"
                  @click="setAttachInsert"
                >{{$t('common.append')}}</i></el-link>
              </el-col>
              <el-col :span="3">
                <el-link
                  class="elLink"
                  :underline="false"
                  @click="setAttachDel"
                >{{$t('common.delete')}}</i></el-link>
              </el-col>
              <!-- <el-col :span="3">  <el-link  class="elLink" :underline="false" >{{$t('common.reset')}}</i></el-link></el-col> -->
            </el-row>
          </el-form-item>
          <el-form-item>
            <el-table
              :data="tableAttach"
              ref="filterTable"
              height="99%"
              border
              style="width: 100%"
              @selection-change="handleAttatchChange"
            >
              <el-table-column
                type="selection"
                width="55"
              />
              <el-table-column
                width="60"
                type="index"
                :label="$t('common.index')"
              />
              <el-table-column
                prop="date"
                :label="$t('common.fileNme')"
              />
              <el-table-column
                prop="name"
                :label="$t('common.filePath')"
              />
            </el-table>
          </el-form-item>
          <el-form-item>
            <el-row :gutter="20">
              <el-col
                :span="12"
                :offset="8"
              >
                <el-button
                  class="primary"
                  @click="outerVisible = false"
                >确认</el-button>
                <el-button
                  type="info"
                  @click="outerVisible = false"
                >取消</el-button>
              </el-col>
            </el-row>
          </el-form-item>
        </el-form>
      </el-dialog>
      <div style="max-height: 580px">
        <el-form
          v-if="isMenuActive"
          ref="ruleForm"
          :model="ruleForm"
          :inline="true"
        >
          <el-form-item>
            <el-input
              type="textarea"
              v-model="formInline.fileName"
              class="nm-skin-pretty"
              show-word-limit
              :rows="2"
              resize='none'
              disabled
              style="width: 650px;"
            ></el-input>
          </el-form-item>
          <el-form-item>
            <el-button
              @click="conditionVisible = true"
              type="info"
              icon="el-icon-plus"
            >{{$t('common.append')}}</el-button>
          </el-form-item>
          <el-form-item>
            <el-button
              @click="submitForm()"
              type="info"
              icon="el-icon-search"
            >{{$t('common.iquery')}}</el-button>
          </el-form-item>
          <el-form-item>
            <el-button
              type="info"
              @click="resetForm()"
              icon="el-icon-search"
            >{{$t('common.reset')}}</el-button>
          </el-form-item>
        </el-form>
        <el-divider class="eldivider" />
        <div style="width:100%;height:400px;">
          <el-table
            ref="filterTable"
            :data="tableData"
            height="100%"
            border
            style="width: 100%"
            @selection-change="handleSelectionChange"
      <div class="archBottomBox">
        <div style="margin-top:10px">
          <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="listData.count"
          >
            <el-table-column
              type="selection"
              align="center"
              width="55"
            />
            <el-table-column
              width="60"
              type="index"
              align="center"
              :label="$t('common.index')"
              :index="indexAdd"
            />
            <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-column
              v-if="isMenuActive"
              min-width="80"
              align="center"
              :label="$t('common.operate')"
            >
              <template slot-scope="scope">
                <el-link
                  class="elLink"
                  @click="showDetail(scope.$index, scope.row)"
                >{{ $t('common.details') }}</el-link>
                <el-link
                  class="elLink"
                  @click="getAttachTable(scope.$index, scope.row)"
                  style="margin-left: 20px"
                >{{ $t('common.enclosure') }}</el-link>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <div class="panerPage">
          <div class="pagination_box">
            <el-pagination
              @size-change="handleSizeChange1"
              @current-change="handleCurrentChange1"
              :current-page="listTypeData.pageIndex"
              :page-sizes="[10, 20, 30, 40]"
              :page-size="listTypeData.pageSize"
              layout="total, sizes, prev, pager, next, jumper"
              :total="count1"
            >
            </el-pagination>
          </div>
          </el-pagination>
        </div>
      </div>
    </el-dialog>
    <div
      class="downloadBox"
      v-if="showCodeBox"
    >
      <h4 style="padding: 20px">{{$t('common.passworld')}}</h4>
      <el-form
        :model="codeForm"
        :rules="rules"
        ref="codeForm"
        label-width="100px"
        class="codeForm"
      >
        <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-input
            type="password"
            v-model="codeForm.repassword"
            show-password
          ></el-input>
        </el-form-item>
        <el-form-item>
          <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>
        </el-form-item>
      </el-form>
    </div>
    <!-- 文件详情 -->
    <el-dialog
      :title="$t('common.details')"
      :visible.sync="showinfoBox1"
      :close-on-click-modal="false"
      width="30%"
    >
      <div class="contentBox">
@@ -605,7 +296,17 @@
        <el-divider></el-divider>
        <p>{{ $t('dataManage.vmobj.format') }}:{{ itemdetail1.type }}</p>
        <el-divider></el-divider>
        <p>{{ $t('common.size') }}:{{ setInfoBoxSize(itemdetail1.sizes) }}</p>
        <p>{{ $t('common.size') }}:{{ stateFormatSizes(itemdetail1.sizes) }}</p>
        <el-divider></el-divider>
        <p>{{ $t('dataManage.vmobj.tab') }}:{{  itemdetail1.tab }}</p>
        <el-divider></el-divider>
        <p>{{ $t('dataManage.vmobj.row') }}:{{itemdetail1.rows }}</p>
        <el-divider></el-divider>
        <p>{{ $t('archiveObj.downloads') }}:{{ itemdetail1.downCount }} 次</p>
        <el-divider></el-divider>
        <p>{{ $t('archiveObj.label9') }}:{{ itemdetail1.lastUser }} </p>
        <el-divider></el-divider>
        <p>{{ $t('archiveObj.label8') }}:{{setInfoBoxTime(itemdetail1.lastTime) }} </p>
        <el-divider></el-divider>
        <p>{{ $t('dataManage.vmobj.depName') }}:{{ itemdetail1.depName }}</p>
        <el-divider></el-divider>
@@ -642,110 +343,919 @@
        </p>
      </div>
    </el-dialog>
    <!-- 数据库详情 -->
    <el-dialog
      title="批量下载"
      :visible.sync="batchDownloadVisible"
      :title=" this.listBankData.title"
      :visible.sync="dialogVisible"
      :close-on-click-modal="false"
      width="90%"
      top="5vh"
      :before-close="batchDownloadClose"
      top="12vh"
    >
      <div
        style="float:right;margin-right:10px"
        @click="downBatchFormData()"
      ><i
          style="color:#FFF"
          class="el-icon-download"
        ></i></div>
      <div style="height:580px">
      <!-- 密码框 -->
      <el-dialog
        :title="$t('common.passworld')"
        :visible.sync="downloadLogVisible"
        :close-on-click-modal="false"
        top="15vh"
        width="30%"
        :show-close="false"
        :modal="false"
      >
        <el-form
          :model="codeForm"
          :rules="rules"
          ref="codeForm"
          label-width="100px"
          class="codeForm"
        >
          <el-form-item
            :label="$t('common.passworld')"
            prop="password"
          >
            <el-input
              size="small"
              type="password"
              v-model="codeForm.password"
              show-password
            ></el-input>
          </el-form-item>
          <el-form-item
            :label="$t('common.SPassword')"
            prop="repassword"
          >
            <el-input
              size="small"
              type="password"
              v-model="codeForm.repassword"
              show-password
            ></el-input>
          </el-form-item>
          <el-form-item>
            <el-button
              class="primary"
              size="small"
              @click="download1('codeForm')"
            >{{$t('common.confirm')}}</el-button>
            <el-button
              type="info"
              size="small"
              @click="closeDown1('codeForm')"
            >{{$t('common.cancel')}}</el-button>
          </el-form-item>
        </el-form>
      </el-dialog>
      <!-- 数据库table详情 -->
      <el-dialog
        width="30%"
        :visible.sync="itemDetailVisible"
        :modal="false"
      >
        <div
          class="contentBox"
          style="height:60vh;overflow:auto"
        >
          <ul>
            <li v-for="(item, index) in itemdetail">
              <p>
                <label> {{ item.label }}:</label>
                <label class="boxlabel">{{ item.value }}</label>
              </p>
              <el-divider></el-divider>
            </li>
          </ul>
        </div>
      </el-dialog>
      <!-- 查询条件 -->
      <!-- 条件-->
      <el-dialog
        width="43%"
        :visible.sync="conditionVisible"
        :modal="false"
        title="查询条件"
        :show-close="false"
      >
        <el-form
          :inline="true"
          :model="formSql"
          class="demo-form-inline"
        >
          <el-form-item>
            <el-select
              size="small"
              :popper-append-to-body="false"
              @change="fieldChange($event)"
              v-model="formSql.field"
            >
              <el-option
                v-for="item in filedsOption"
                :key="item.field"
                :label="item.alias"
                :value="item.field"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-select
              size="small"
              :popper-append-to-body="false"
              v-model="formSql.condition"
            >
              <el-option
                v-for="item in condOption"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item v-show="!fromSqlflag">
            <el-input
              size="small"
              v-model="formSql.value"
            ></el-input>
          </el-form-item>
          <el-form-item v-show="fromSqlflag">
            <el-date-picker
              size="small"
              v-model="formSql.date"
              type="date"
              placeholder="选择日期"
              value-format="yyyy-MM-dd"
            >
            </el-date-picker>
          </el-form-item>
        </el-form>
        <span
          slot="footer"
          class="dialog-footer"
        >
          <el-button
            size="small"
            @click="startFiledAndcondition"
          >取 消</el-button>
          <el-button
            size="small"
            type="primary"
            @click="appendQueryFilter"
          >确 定</el-button>
        </span>
      </el-dialog>
      <!-- 数据库附件信息 -->
      <el-dialog
        :title="$t('common.enclosure')"
        :visible.sync="outerVisible"
        :close-on-click-modal="false"
        width="50%"
        :modal="false"
      >
        <div style="height:68vh">
          <el-form
            :model="fromfile"
            class="demo-form-inline"
          >
            <el-form-item>
              <el-input
                v-model="fromfile.file"
                style="width: 300px; margin-right: 20px"
                :placeholder="$t('common.choose')"
                disabled
              ></el-input>
              <input
                name="file1"
                type="file"
                id="insertFile"
                multiple="multiple"
                style="display: none"
                @change="insertFile( )"
              />
              <el-link
                @click="getInsertFile( )"
                :underline="false"
              ><i class="el-icon-folder-opened"></i></el-link>
            </el-form-item>
            <el-form-item>
              <el-row>
                <el-col :span="2">
                  <el-link
                    class="elLink"
                    :underline="false"
                    @click="setAttachInsert"
                  >{{$t('common.append')}}</el-link>
                </el-col>
                <el-col :span="2">
                  <el-link
                    class="elLink"
                    :underline="false"
                    @click="setAttachDel"
                  >{{$t('common.delete')}}</el-link>
                </el-col>
              </el-row>
            </el-form-item>
          </el-form>
          <el-table
            @cell-dblclick="copyText"
            :data="tableAttach"
            ref="filterTable"
            height="calc(100% - 130px)"
            border
            style="width: 100%"
            @selection-change="handleAttatchChange"
          >
            <el-table-column
              type="selection"
              width="70"
            />
            <el-table-column
              width="60"
              type="index"
              :label="$t('common.index')"
            />
            <el-table-column
              prop="name"
              :label="$t('common.fileNme')"
            />
            <el-table-column
              prop="sizes"
              :label="$t('common.size')"
              :formatter="statSizeChange"
            />
            <el-table-column
              align="center"
              :label="$t('common.operate')"
              min-width="100"
            >
              <template slot-scope="scope">
                <el-link
                  v-if="matchState(scope, /[]/)"
                  @click="setAttatchDetail(scope.$index, scope.row)"
                  class="elLink"
                >{{ $t('common.see') }}</el-link>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </el-dialog>
      <!-- 数据库Table信息 -->
      <div style="height:68vh">
        <el-form
          :model="formInline"
          :inline="true"
        >
          <el-form-item>
            <el-input
              type="input"
              v-model="formInline.fileName"
              class="nm-skin-pretty"
              show-word-limit
              :rows="2"
              resize='none'
              disabled
              size="small"
              style="width: 650px;"
              :placeholder="$t('archiveObj.label7')"
            ></el-input>
          </el-form-item>
          <el-form-item>
            <el-button
              type="success"
              size="small"
              icon="el-icon-plus"
              @click="conditionVisible = true"
            >{{$t('common.append')}}</el-button>
          </el-form-item>
          <el-form-item>
            <el-button
              type="primary"
              size="small"
              icon="el-icon-search"
              @click="submitForm()"
            >{{$t('common.iquery')}}</el-button>
          </el-form-item>
          <el-form-item>
            <el-button
              type="info"
              size="small"
              icon="el-icon-search"
              @click="resetForm()"
            >{{$t('common.reset')}}</el-button>
          </el-form-item>
          <el-form-item>
            <el-button
              type="warning"
              size="small"
              icon="el-icon-download"
              @click="downloadLogVisible = true"
            >{{$t('common.download')}}</el-button>
          </el-form-item>
          <!--   -->
        </el-form>
        <el-divider />
        <el-table
          :data="tableData2"
          @cell-dblclick="copyText"
          ref="filterTable"
          :data="tableData"
          border
          style="width: 100%"
          @selection-change="handleSelectionChange1"
          height="500px"
          height="calc(100% - 150px)"
          @selection-change="handleSelectionChange"
        >
          <el-table-column
            type="selection"
            align="center"
            width="55"
          />
          <el-table-column
            prop="name"
            :label="$t('dataManage.vmobj.name')"
            width="60"
            type="index"
            align="center"
            :label="$t('common.index')"
          />
          <el-table-column
            prop="type"
            :label="$t('dataManage.vmobj.format')"
          />
            v-for="(item, index) in attributeData"
            :key="index"
            :label="item.alias"
            :prop="item.field"
            show-overflow-tooltip
            align="center"
            min-width="150"
          ></el-table-column>
          <el-table-column
            prop="sizes"
            :label="$t('dataManage.vmobj.size')"
            :formatter="stateFormatSize"
          />
          <el-table-column
            prop="depName"
            :label="$t('dataManage.vmobj.depName')"
          />
          <el-table-column
            prop="dirName"
            :label="$t('dataManage.vmobj.dirName')"
          />
          <el-table-column :label="$t('dataManage.dataUpObj.tableName')">
            align="center"
            :label="$t('common.operate')"
            min-width="150"
          >
            <template slot-scope="scope">
              <a @click="showDetail2(scope.row)">{{
          scope.row.tab
        }}</a>
              <el-link
                class="elLink"
                @click="showDetail(scope.$index, scope.row)"
              >{{ $t('common.details') }}</el-link>
              <el-link
                class="elLink"
                @click="getAttachTable(scope.$index, scope.row)"
                style="margin-left: 20px"
              >{{ $t('common.enclosure') }}</el-link>
            </template>
          </el-table-column>
          <el-table-column
            prop="gather"
            :label="$t('dataManage.vmobj.gather')"
            :formatter="formatData"
          />
          <el-table-column
            prop="describe"
            :label="$t('dataManage.vmobj.describe')"
          />
          <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="100"
            :label="$t('common.operate')"
          >
          </el-table-column>
        </el-table>
        <div class="panerPage">
          <div class="pagination_box">
        <div class="archBottomBox">
          <div>
            <el-pagination
              @size-change="batchSizeChange"
              @current-change="batchCurrentChange"
              :current-page="batchPage.pageIndex"
              :page-sizes="[10, 20, 30, 40]"
              :page-size="batchPage.pageSize"
              @size-change="handleSizeChange1"
              @current-change="handleCurrentChange1"
              :current-page="listBankData.pageIndex"
              :page-sizes="[10, 20, 50, 100]"
              :page-size="listBankData.pageSize"
              layout="total, sizes, prev, pager, next, jumper"
              :total="batchPage.count"
              :total="listBankData.count"
            >
            </el-pagination>
          </div>
        </div>
      </div>
    </el-dialog>
    <!-- 密码框 -->
    <el-dialog
      :title="$t('common.passworld')"
      :visible.sync="passWorldVisible"
      :close-on-click-modal="false"
      top="15vh"
      width="30%"
      :show-close="false"
    >
      <el-form
        :model="codeForm"
        :rules="rules"
        ref="codeForm"
        label-width="100px"
        class="codeForm"
      >
        <el-form-item
          :label="$t('common.passworld')"
          prop="password"
        >
          <el-input
            size="small"
            type="password"
            v-model="codeForm.password"
            show-password
          ></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('common.SPassword')"
          prop="repassword"
        >
          <el-input
            size="small"
            type="password"
            v-model="codeForm.repassword"
            show-password
          ></el-input>
        </el-form-item>
        <el-form-item>
          <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>
        </el-form-item>
      </el-form>
    </el-dialog>
    <!-- 下载列表 -->
    <el-dialog
      :visible.sync="downloadListVisible"
      width="90%"
      top="14vh"
      :close-on-click-modal="false"
    >
      <div class="downloadBox">
        <div class="archdowntop">
          <el-table
            @cell-dblclick="copyText"
            :data="downloadTableData"
            style="width: 100%"
            height="calc(100% - 5px)"
          >
            <el-table-column
              type="index"
              width="50"
              :label="$t('common.index')"
            >
            </el-table-column>
            <el-table-column
              property="descr"
              :label="$t('common.title')"
            > </el-table-column>
            <el-table-column
              property="name"
              :label="$t('common.fileNme')"
            > </el-table-column>
            <el-table-column
              property="createName"
              :label="$t('operatManage.BWL.requestUser')"
            > </el-table-column>
            <el-table-column
              property="createTime"
              :formatter="formatData"
              :label="$t('dataApply.careatetime')"
            >
            </el-table-column>
            <el-table-column
              :label="$t('common.download')"
              width="120"
            >
              <template slot-scope="scope">
                <el-link
                  @click.native.prevent="downloadMap(scope.$index, scope.row)"
                  :underline="false"
                >下载</el-link>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <div class="archdownbottom">
          <el-pagination
            @size-change="downloadSizeChange"
            @current-change="downloadCurrentChange"
            :current-page="downloadPage.pageIndex"
            :page-sizes="[10, 20, 50, 100]"
            :page-size="downloadPage.pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="downloadPage.count"
          >
          </el-pagination>
        </div>
      </div>
    </el-dialog>
    <!--空间查询 -->
    <el-dialog
      :title=" $t('synthesis.rangequery')"
      :visible.sync="dialogMapVisible"
      width="90%"
      top="10vh"
      :close-on-click-modal="false"
      :before-close="handleMaptClose"
    >
      <div style="height:700px">
      <div style="height:73vh">
        <map-sdk v-if='showMapVisible'></map-sdk>
      </div>
    </el-dialog>
    <el-dialog
      :title="fromQueryMeta.title"
      :visible.sync="queryMetaFlag1"
      width="70%"
    >
      <div style="height: 65vh; width: 100%">
        <el-table
          @cell-dblclick="copyText"
          ref="filterTable"
          :data="metaDataTable1"
          style="width: 100%"
          height="100%"
        >
          <el-table-column
            align="center"
            type="index"
            :label="$t('common.index')"
            width="70px"
          ></el-table-column>
          <el-table-column
            align="center"
            prop="name"
            :label="$t('common.name')"
            width="120"
          >
          </el-table-column>
          <el-table-column
            align="center"
            prop="dirName"
            :label="$t('dataManage.dataUpObj.catalogue')"
            width="300"
          />
          <el-table-column
            align="center"
            prop="depName"
            :label="$t('dataManage.dataUpObj.company')"
            width="200"
          />
          <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="stateFormatSizes"
          />
          <el-table-column
            align="center"
            :label="$t('dataManage.dataUpObj.tableName')"
          >
            <template slot-scope="scope">
              <a class="scopeRowColor">{{
                  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>
      </div>
    </el-dialog>
    <el-dialog
      :title="fromQueryMeta.title"
      :visible.sync="queryMetaFlag"
      width="70%"
    >
      <div style="height: 65vh; width: 100%">
        <el-form
          :inline="true"
          :model="fromQueryMeta"
          class="demo-form-inline"
        >
          <el-form-item>
            <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>
            <el-button
              type="info"
              size="small"
              @click="setRestMetaData()"
            >重置
            </el-button>
          </el-form-item>
        </el-form>
        <el-table
          @cell-dblclick="copyText"
          ref="filterTable"
          :data="metaDataTable"
          style="width: 100%"
          height="calc(100% - 100px)"
        >
          <el-table-column
            align="center"
            type="index"
            :label="$t('common.index')"
            width="70px"
          ></el-table-column>
          <el-table-column
            align="center"
            prop="name"
            :label="$t('common.name')"
            width="120"
          >
          </el-table-column>
          <el-table-column
            align="center"
            prop="dirName"
            :label="$t('dataManage.dataUpObj.catalogue')"
            width="300"
          />
          <el-table-column
            align="center"
            prop="depName"
            :label="$t('dataManage.dataUpObj.company')"
            width="200"
          />
          <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="stateFormatSizes"
          />
          <el-table-column
            align="center"
            :label="$t('dataManage.dataUpObj.tableName')"
          >
            <template slot-scope="scope">
              <a
                class="scopeRowColor"
                @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>
        <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-size="listMetaData.pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="listMetaData.count"
          >
          </el-pagination>
        </div>
      </div>
    </el-dialog>
    <el-dialog
      title="预览"
      :append-to-body="false"
      :visible.sync="dialog.dialogVisible"
      width="70%"
      :close-on-click-modal="false"
    >
      <div
        v-if="dialog.isPdf"
        class="pdfClass"
      >
        <iframe
          :src="dialog.src"
          type="application/x-google-chrome-pdf"
          width="100%"
          height="100%"
        >
        </iframe>
      </div>
      <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="dialogInsertVisible"
      width="30%"
      top="35vh"
      :modal="false"
      :before-close="handleInsertClose"
    >
      <div style="width: 100%; max-height: 450px; overflow-y: auto">
        <el-form
          ref="form"
          :model="ruleForm"
          label-width="100px"
        >
          <el-form-item label="审核单位">
            <div>
              <ul>
                <li v-for="item in ruleForm.depid">
                  {{ item.name }}
                </li>
              </ul>
            </div>
          </el-form-item>
          <el-form-item label="表名">
            <div>
              <ul>
                <li v-for="item in ruleForm.tabs">
                  {{ item.tabDesc }}
                </li>
              </ul>
            </div>
          </el-form-item>
          <el-form-item label="条件">
            <el-input
              :title="ruleForm.wkt"
              v-model="ruleForm.wkt"
              disabled
            ></el-input>
          </el-form-item>
          <el-form-item label="描述">
            <el-input
              type="textarea"
              placeholder="请输入内容"
              v-model="ruleForm.descr"
              maxlength="50"
              show-word-limit
            >
            </el-input>
          </el-form-item>
          <el-form-item>
            <el-button
              class="primary"
              size="small"
              @click="getInsertDownx"
            >{{
              $t("common.confirm")
            }}</el-button>
            <el-button
              type="info"
              size="small"
              @click="closeInsertDown"
            >{{
              $t("common.cancel")
            }}</el-button>
          </el-form-item>
        </el-form>
      </div>
    </el-dialog>
    <el-dialog
      :title="$t('common.passworld')"
      :visible.sync="dialogVisible1"
      width="30%"
      top="35vh"
      :modal="false"
      :before-close="handleCloseDown1"
    >
      <el-form
        :model="codeForm"
        :rules="rules"
        ref="codeForm"
        label-width="100px"
        class="codeForm"
      >
        <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-input
            type="password"
            v-model="codeForm.repassword"
            show-password
          ></el-input>
        </el-form-item>
        <el-form-item>
          <el-button
            class="primary"
            size="small"
            @click="downloadx('codeForm')"
          >{{ $t("common.confirm") }}</el-button>
          <el-button
            type="info"
            size="small"
            @click="closeDownx('codeForm')"
          >{{
            $t("common.cancel")
          }}</el-button>
        </el-form-item>
      </el-form>
    </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>
    <iframe
      id="downFrame"
@@ -756,37 +1266,39 @@
</template>
<script>
import { flatten } from '@turf/turf';
import { conditions } from './Archive.js'
import MapSdk from '../../components/mapsdk.vue'
import MyBread from "../../components/MyBread.vue";
import { conditions } from './Archive.js';
import $ from 'jquery'
import { getToken } from '@/utils/auth';
import {
  decr,
  encr,
  selectdepTab,
  dataLib_selectProject,
  dataLib_selectDirTypes,
  dataLib_selectByPageForMeta,
  dataLib_selectTabs,
  dataLib_selectFields,
  dataLib_selectDomains,
  dataLib_selectByPage,
  sign_getPublicKey,
  dataLib_downloadReq,
  dataLib_selectDownloadFile,
  dataLib_selectPageCountForDownload,
  dataLib_selectPageAndCountByPid,
  dataLib_selectMetaById,
  dataLib_selectFiles,
  dataLib_deletes,
  dataLib_selectByPageForMeta,
  dataLib_selectDownloadFile,
  dataLib_downloadReq,
  dataLib_selectTabFields,
  sign_getPublicKey,
  dataLib_selectDbData,
  selectdirTab,
  selectdepTab,
  deleteMeta,
  dataLib_selectProject,
  dataLib_selectBaseType,
  dataLib_selectBusinessType
  dataLib_selectDbOverflowDep,
  dataLib_selectDepsByIds,
  apply_insertApply,
  dataLib_selectMetaOverflowDep
} from '../../api/api';
import $ from 'jquery'
import { getToken } from '@/utils/auth';
// import { data_type, project_name } from '../../components/js/archive.js';
import MyBread from '../../components/MyBread.vue';
import MapSdk from '../../components/mapsdk.vue'
import { dataLibView } from '@/api/screen.js'
export default {
  components: {
    MyBread,
    MapSdk
    MyBread, MapSdk
  },
  data() {
    var repasswordValidator = (rule, value, callback) => {
@@ -810,83 +1322,14 @@
      }
    };
    return {
      data_type: [],
      project_name: [],
      checkedDataType: [],
      checkedEntryName: [],
      dataTypeName: '不限',
      EntryName: '不限',
      conditionVisible: false,
      formSql: {
        field: '',
        condition: '',
        value: '',
        type: '',
        date: '',
      },
      fromfile: { file: '' },
      fromSqlflag: false,
      filedsOption: [],
      condOption: [],
      formInline: {
        tab: '', fileName: '', dirid: null,
        depid: null,
      },
      codeForm: {
        password: '',
        repassword: '',
      },
      fromfile: { file: '', },
      listType: [], // 1mi
      listProject: [],
      companyOption: [],
      companyOption1: [],
      showinfoBox1: false,
      dialogMapVisible: false,
      showMapVisible: false,
      showCodeBox: false,
      showFirstAll: false,
      isShowFirstCheck: false,
      showSecondAll: false,
      isShowSecondCheck: false,
      isMenuActive: true,
      dialogVisible: false,
      innerVisible: false,
      outerVisible: false,
      batchDownloadVisible: false,
      dataType: [],
      filedsLayer: [],
      attributeData: [],
      tableData: [],
      tableData1: [],
      tableData2: [],
      multipleSelection: [],
      multipleSelection1: [],
      attacgSelection: [],
      tableAttach: [],
      itemdetail: [],
      itemdetail1: {},
      listTypeData: {
        pageIndex: 1,
        pageSize: 10,
        id: null,
        name: null,
        filter: null,
        wkt: null,
      },
      listData: {
        pageIndex: 1,
        pageSize: 10,
        depid: null,
        dirid: null,
        name: null
      },
      count: 0,
      count1: 0,
      dialogtitle: null,
      ruleForm: {
        textarea: '',
      },
      rules: {
        password: [{ required: true, message: '请输入密码', trigger: 'blur' }, { validator: passwordValidator, trigger: 'blur' }],
@@ -895,494 +1338,310 @@
          { validator: repasswordValidator, trigger: 'blur' },
        ],
      },
      formInline: {
        fileName: "",//高级搜索
        dataType: "type2", //数据类型
        category: [], //查询类别,
        item: [],
        depcode: null, //单位,
        depName: null,//单位,
        keywords: '',
      },
      categoryOptions: [],
      itemOptions: [],
      depOption: [],//单位列表
      defaultProps: {
        label: "name",
        value: "id",
      },
      listData: {
        pageIndex: 1,
        pageSize: 10,
        count: 0,
      },
      listBankData: {
        pageIndex: 1,
        pageSize: 10,
        count: 0,
        name: "",
        title: "",
      },
      monthdata: [],
      itemdetail1: {},
      showinfoBox1: false,
      dialogVisible: false,
      formSql: {
        field: '',
        condition: '',
        value: '',
        type: '',
        date: '',
      },
      downloadPage: {
        pageIndex: 1,
        pageSize: 10,
        count: 0,
        name: null,
      },
      attributeData: [],
      tableData: [],
      multipleSelection1: [],
      passWorldVisible: false,
      itemdetail: [],
      itemDetailVisible: false,
      downloadLogVisible: false,
      conditionVisible: false,
      downloadListVisible: false,
      downloadTableData: [],
      dialogMapVisible: false,
      showMapVisible: false,
      queryMetaFlag1: false,
      metaDataTable1: [],
      fromQueryMeta: {
        title: ""
      },
      listMetaData: {
        metaid: 0,
        name: "",
        pageIndex: 1,
        pageSize: 10,
        count: 0,
      },
      fromQueryMeta: {
        name: ""
      },
      queryMetaFlag: false,
      metaDataTable: [],
      upAttach: {
        tabName: null,
        eventid: null,
      },
      batchPage: {
        pageIndex: 1,
        pageSize: 10,
        count: 0
      outerVisible: false,
      tableAttach: [],
      dataLib_selectFiles: [],
      attacgSelection: [],
      dialog: {
        dialogVisible: false,
        isPdf: false,
        isJpg: false,
        src: ''
      },
      checkedDataType: [],
      ruleForm: {
        depname: [],
        tabs: [],
        pwd: null,
        repwd: null,
        wkt: null,
        descr: null,
      },
      dialogInsertVisible: false,
      dialogVisible1: false,
      multipleSelection: [],
      dialogInsertFile: false,
      fileFrom: {
        descr: null,
        depid: null,
        ids: null,
        pwd: null,
        depcodes: null
      }
    };
  },
  computed: {
    newList() {
      this.listType.forEach((item) => {
        this.$set(item, 'isCheckedFlag', false);
      });
      return this.listType;
    },
    showList() {
      this.listType = this.data_type;
      if (this.showFirstAll == false) {
        var showList = [];
        if (this.newList.length > 8) {
          for (var i = 0; i < 10; i++) {
            showList.push(this.newList[i]); //将数组的前7条存放到showList数组中
          }
        } else {
          showList = this.newList; //个数足够显示,不需要再截取
        }
        return showList;
      } else {
        return this.newList;
      }
    },
    newList1() {
      this.listProject.forEach((item) => {
        this.$set(item, 'isCheckedFlag', false);
      });
      return this.listProject;
    },
    showList1() {
      this.listProject = this.project_name;
      if (this.showSecondAll == false) {
        var showList1 = [];
        if (this.newList1.length > 8) {
          for (var i = 0; i < 14; i++) {
            showList1.push(this.newList1[i]); //将数组的前7条存放到showList数组中
          }
        } else {
          showList1 = this.newList1; //个数足够显示,不需要再截取
        }
        return showList1;
      } else {
        return this.newList1;
      }
  watch: {
    "formInline.depName"() {
      this.$refs.treeSelect.visible = false;
    },
  },
  methods: {
    handleCheckedEntryNameChange(res) {
      if (this.checkedEntryName.indexOf(res.name) != -1) {
        if (res.name == "不限") {
          this.checkedEntryName = ['不限']
        } else {
          var index = this.checkedEntryName.indexOf('不限')
          if (index > -1) {
            this.checkedEntryName.splice(index, 1);
          }
        }
      }
    },
    handleCheckedDataTypeChange(res) {
      if (this.checkedDataType.indexOf(res.name) != -1) {
        if (res.name == "不限") {
          this.checkedDataType = ['不限']
        } else {
          var index = this.checkedDataType.indexOf('不限')
          if (index > -1) {
            this.checkedDataType.splice(index, 1);
          }
        }
      }
    },
    changeListDataType(res) {
      if (this.isShowFirstCheck == false) {
        this.dataTypeName = res.name;
      }
    },
    changeListEntryName(res) {
      if (this.isShowSecondCheck == false) {
        this.EntryName = res.name;
      }
    },
    getSpaceMapVisibale() {
      this.dialogMapVisible = true;
      this.showMapVisible = true;
      this.$store.state.mapMenuBoolean = true;
      this.$store.state.mapMenuBoxFlag = '1';
      this.$store.state.mapPopBoolean = false;
      this.$store.state.mapPopBoxFlag = null;
      this.$store.state.download = true;
    },
    handleMapClose() {
      this.$confirm('确认关闭?')
        .then((_) => {
          this.closeMapDown();
        })
        .catch((_) => { });
    },
    closeMapDown() {
      this.dialogMapVisible = false;
      this.showMapVisible = false;
      this.$store.state.mapMenuBoolean = false;
      this.$store.state.mapMenuBoxFlag = null;
      this.$store.state.download = false;
      this.$store.state.mapPopBoolean = false;
      this.$store.state.mapPopBoxFlag = null;
    },
    moreEvent(res) {
      switch (res) {
        case 1:
          this.showFirstAll = !this.showFirstAll;
          break;
        case 2:
          this.showSecondAll = !this.showSecondAll;
          break;
      }
    },
    checkEvent(res) {
      switch (res) {
        case 1:
          this.isShowFirstCheck = !this.isShowFirstCheck;
          if (this.isShowFirstCheck == false) {
            this.checkedDataType = []
            this.dataTypeName = '不限';
          } else {
            this.dataTypeName = null;
            this.checkedDataType = ['不限']
          }
          break;
        case 2:
          this.isShowSecondCheck = !this.isShowSecondCheck;
          if (this.isShowSecondCheck == false) {
            this.checkedEntryName = []
            this.EntryName = '不限';
          } else {
            this.EntryName = null;
            this.checkedEntryName = ['不限']
          }
          break;
      }
    },
    getMenuChange(res) {
      this.getQueryDirTree();
      this.formInline.tab = ""
      switch (res) {
        case 1:
          this.listData = {
            pageIndex: 1,
            pageSize: 10,
          }
          this.getDataLibSelectTabs();
          this.isMenuActive = true;
          break;
        case 2:
          this.listData = {
            pageIndex: 1,
            pageSize: 10,
            depid: null,
            dirid: null,
            name: null
          }
          this.isMenuActive = false;
          this.getMetaData();
          break;
      }
    },
    //单位列表获取
    async getQueryDirTree() {
      const res = await selectdirTab();
      if (res.code != 200) {
        this.$message.error('单位列表获取失败');
        return;
      }
      this.formInline.dirid = 1;
      this.companyOption = this.treeData(res.result);
      this.getQueryDepTree();
    },
    async getQueryDepTree() {
      const res = await selectdepTab();
      if (res.code != 200) {
        this.$message.error('单位列表获取失败');
        return;
      }
      this.formInline.depid = 1;
      this.companyOption1 = this.treeData(res.result);
      // this.getMetaData();
    },
    // 查询
    queryInfo() {
      this.listData.name = this.formInline.tab;
      this.getMetaData();
    },
    // 重置查询
    resetInfo(formName) {
      this.formInline.name = '';
      this.listData.pageSize = 10;
      this.listData.pageIndex = 1;
      this.listData.name = null;
      this.getMetaData();
    },
    deleteMetaInfo() {
      this.$confirm('确定是否删除所选内容?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      })
        .then(() => {
          var std = [];
          for (var i in this.multipleSelection1) {
            std.push(this.multipleSelection1[i].id);
          }
          deleteMeta({ ids: std.toString() }).then((res) => {
            if (res.code == 200) {
              this.$message({
                type: 'success',
                message: '删除成功!',
              });
              this.multipleSelection1 = [];
              this.listData.pageSize = 10;
              this.listData.pageIndex = 1;
              this.getMetaData();
            } else {
              this.$message.error('删除失败');
              this.multipleSelection1 = [];
            }
          });
        })
        .catch(() => {
          this.$message('已取消删除');
        });
    },
    getBatchMetaData() {
      this.batchPage.dirid = '1'
      this.batchPage.depid = '1';
      dataLib_selectByPageForMeta(this.batchPage).then((res) => {
        this.batchPage.count = res.count;
        this.tableData2 = res.result;
      });
    },
    batchSizeChange(val) {
      this.batchPage.pageSize = val;
      this.batchPage.pageIndex = 1;
      this.getBatchMetaData();
    },
    batchCurrentChange(val) {
      this.batchPage.pageIndex = val;
      this.getBatchMetaData();
    },
    downBatchFormData() {
      this.batchDownloadClose();
      this.downFormData();
    },
    batchDownloadClose() {
      this.batchDownloadVisible = false;
      this.batchPage = {
        pageIndex: 1,
        pageSize: 10,
        count: 0
      }
    },
    setBatchDownload() {
      this.getBatchMetaData();
      this.multipleSelection1 = [];
      this.batchDownloadVisible = true;
    },
    setFileDownload(res) {
      this.multipleSelection1 = [];
      this.multipleSelection1.push(res);
      this.downFormData();
    },
    downFormData() {
      if (this.multipleSelection1.length == 0) {
        this.$message({
          message: '请先选择要下载的文件',
          type: 'warning'
        });
        return;
      }
      this.showCodeBox = true;
    },
    async download() {
      var std = [];
      for (var i in this.multipleSelection1) {
        std.push(this.multipleSelection1[i].id)
      }
      var obj = {
        pwd: encrypt.encrypt(this.codeForm.repassword),
        ids: std
      };
      const res = await dataLib_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 dataLib_selectDownloadFile(downObj)
      if (data.code != 200) {
        this.$message.error('下载请求失败');
        return
      }
      var token = getToken()
      var url = BASE_URL + "/dataLib/downloadFile?token=" + token + "&guid=" + res.result + "&pwd=" + encodeURIComponent(encrypt.encrypt(this.codeForm.repassword));
      $("#downFrame").attr("src", url).click();
      this.closeDown();
    },
    closeDown() {
      this.showCodeBox = false;
      this.codeForm.password = '';
      this.codeForm.repassword = '';
    },
    getMetaData() {
      this.listData.dirid = this.formInline.dirid
      this.listData.depid = this.formInline.depid;
      dataLib_selectByPageForMeta(this.listData).then((res) => {
        this.tableData1 = res.result;
        this.count = res.count;
      });
    },
    handleChange(value) {
      this.listData.pageSize = 10;
      this.listData.pageIndex = 1;
      this.formInline.dirid = value;
      this.getMetaData();
    },
    handleChange1(value) {
      this.listData.pageSize = 10;
      this.listData.pageIndex = 1;
      this.formInline.depid = value;
      this.getMetaData();
    },
    //树列表生成
    treeData(source) {
      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) : ''; // 给父级添加一个children属性,并赋值
        return father.pid == 0; // 返回一级菜单
      });
    },
    searchDataLibSelectTabs() {
      if (this.isMenuActive == true) {
        this.getDataLibSelectTabs()
  mounted() {
    this.getDepTreeData();
    this.getCategorySelectData();
    this.getItemSelectData();
    this.signGetPublicKey();
    this.$bus.$on("setDialogInsertVisible", (res) => {
      if (res == true) {
        this.dialogVisible1 = true;
      } else {
        this.queryInfo();
        this.setDialogInsertVisible(res);
      }
    })
  },
  methods: {
    //数据库查询下载
    downloadBankData() {
      // downloadLogVisible
    },
    handleCloseDown1() {
      this.$confirm("确认关闭?")
        .then(_ => {
          this.closeDownx();
        })
        .catch(_ => { })
    },
    downloadx() {
      this.$bus.$emit("setInsertDown2", this.codeForm)
      //
    },
    closeDownx() {
      this.dialogVisible1 = false;
      this.codeForm = {
        password: '',
        repassword: '',
      }
    },
    restDataLibSelectTabs() {
      this.formInline.tab = ""
      this.listData.pageIndex = 1;
      this.listData.pageSize = 10
      this.searchDataLibSelectTabs();
    async getInsertDownx() {
    },
    async getDataLibSelectTabs() {
      this.listData.tab = this.formInline.tab
      const data = await dataLib_selectTabs(this.listData);
      if (data.code != 200) {
        this.$message.error('列表调用失败');
        return;
      this.dialogInsertVisible = false;
      this.dialogVisible1 = false;
      this.downloadLogVisible = false;
      var obj = null
      if (this.dialogMapVisible == true) {
        var entities = [];
        var tabs = [];
        for (var i in this.ruleForm.tabs) {
          entities.push(this.ruleForm.tabs[i].entity)
          tabs.push(this.ruleForm.tabs[i].tabDesc)
        }
        var std = [];
        for (var i in this.ruleForm.depname) {
          std.push(this.ruleForm.depname[i].name)
        }
        obj = {
          pwd: encr(this.codeForm.password),
          entities: entities,
          wkt: encr(this.ruleForm.wkt),
          filter: null,
          ids: null,
          depcode: null,
          dirs: null,
          depcodes: std,
          descr: this.ruleForm.descr,
          tabs: tabs
        }
      } else {
        var ids = [];
        var filter = null;
        this.downloadLogVisible = false;
        if (this.multipleSelection.length != 0) {
          for (var i in this.multipleSelection) {
            ids.push(this.multipleSelection[i].gid)
          }
          filter = null;
        } else {
          filter = this.listBankData.filter;
          ids = null;
        }
        var std = [];
        for (var i in this.ruleForm.depname) {
          std.push(this.ruleForm.depname[i].name)
        }
        var dirs = null;
        if (this.listData.dirs) {
          dirs = this.listData.dirs
        }
        obj = {
          pwd: encr(this.codeForm.password),
          entities: [this.listBankData.name], // bpachydrogeology,bhydrogeologyattach
          wkt: null,
          filter: filter,
          ids: ids,
          depcode: this.listData.depcode,
          dirs: dirs,
          depcodes: std,
          descr: this.ruleForm.descr,
          tabs: [this.listBankData.title]
        }
      }
      this.count = data.count;
      this.dataType = data.result;
    },
    showDetail1(row) {
      this.showinfoBox1 = true;
      this.itemdetail1 = row;
    },
    // 关闭查看
    closeDetial() {
      this.showinfoBox1 = false;
      this.itemdetail = {};
    },
    // 关键字查询
    submitForm() {
      this.listTypeData.pageIndex = 1;
      this.listTypeData.pageSize = 10;
      //获取table信息
      this.getCollapseTable(this.filedsLayer);
    },
    indexAdd(index) {
      const page = this.listTypeData.pageIndex // 当前页码
      const pagesize = this.listTypeData.pageSize  // 每页条数
      return index + 1 + (page - 1) * pagesize
    },
    // 重置查询
    resetForm(formName) {
      this.formInline.fileName = ""
      //获取table信息
      this.listTypeData.pageIndex = 1;
      this.listTypeData.pageSize = 10;
      this.getCollapseTable(this.filedsLayer);
    },
    async showDetail2(res) {
      var val = res.tab.split(".");
      const data = await dataLib_selectTabFields({
        ns: val[0],
        tab: val[1]
      })
      const data = await apply_insertApply(JSON.stringify(obj))
      if (data.code != 200) {
        this.$message.error('字段列表调用失败');
        this.$message.error("数据申请失败")
        return
      }
      this.listTypeData.pageIndex = 1;
      this.listTypeData.pageSize = 10;
      this.attributeData = data.result;
      this.dialogtitle = res.name + '(' + res.tab + ')';
      this.listTypeData.id = res.id;
      const data1 = await dataLib_selectDbData(this.listTypeData)
      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;
        if (option[i].createtime != null) {
          option[i].createtime = this.setInfoBoxTime(option[i].createtime)
        }
        if (option[i].updatetime != null) {
          option[i].updatetime = this.setInfoBoxTime(option[i].updatetime)
        }
      }
      this.count1 = data1.count;
      this.tableData = data1.result;
      this.dialogVisible = true;
      this.$message({
        message: "数据申请成功",
        type: "success",
      })
      this.closeDownx();
      this.closeDown1();
    },
    async getShowTable(res) {
      this.listTypeData.name = res.entity;
      this.listTypeData.pageIndex = 1;
      this.listTypeData.pageSize = 10;
      this.dialogtitle = res.tabDesc;
      this.upAttach.tabName = res.ns + "." + res.tab;
      this.filedsLayer = this.getCollapseDomFiled();
      this.getCollapseTable(this.filedsLayer);
    },
    handleClose() {
      this.dialogVisible = false;
    closeInsertDown() {
      this.ruleForm = {
        name: null,
      };
    },
    showDetail(index, row) {
      var std = [];
      for (var i in this.attributeData) {
        std.push({
          label: this.attributeData[i].alias,
          value: row[this.attributeData[i].field],
        });
        depname: [],
        tabs: [],
        pwd: null,
        repwd: null,
        wkt: null,
        descr: null,
      }
      this.itemdetail = std;
      this.innerVisible = true;
      this.dialogInsertVisible = false
      this.closeDown1();
    },
    handleInsertClose() {
      this.$confirm("确认关闭?")
        .then(_ => {
          this.closeInsertDown()
        })
        .catch(_ => { })
    },
    setDialogInsertVisible(res) {
      this.ruleForm = res;
      this.dialogInsertVisible = true;
    },
    copyText(row, column, cell, event) {
      // 双击复制
      let save = function (e) {
        e.clipboardData.setData('text/plain', event.target.innerText);
        e.preventDefault();  //阻止默认行为
      }
      document.addEventListener('copy', save);//添加一个copy事件
      document.execCommand("copy");//执行copy方法
      this.$message({ message: '复制成功', type: 'success' })//提示
    },
    //批量下载复选框chagne
    handleCheckedDataTypeChange(res) {
      var std = 0;
      for (var i = 0; i < this.multipleSelection1.length; i++) {
        if (res.guid == this.multipleSelection1[i].guid) {
          std = i;
        }
      }
      if (std == 0) {
        this.multipleSelection1.push(res);
      } else {
        this.multipleSelection1.splice(std, 1)
      }
      console.log(this.multipleSelection1)
    },
    matchState(state = "", reg) {
      var row = state.row;
      var name = row.name;
      if (name.indexOf('.pdf') != -1 || name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) {
        return true;
      }
      return false;
    },
    // 附件=>表格选择
    handleAttatchChange(val) {
      this.attacgSelection = val;
    },
    //附件=>文件选择
    getInsertFile() {
      $('#insertFile').click();
    },
    insertFile() {
      var val = document.getElementById('insertFile').files;
      if (!val || !val.length) return;
      this.fromfile.file = val[0].name;
    },
    getAttachTable(index, row) {
      if (row.eventid != null) {
@@ -1393,6 +1652,64 @@
      this.outerVisible = true;
      this.getAttacthFlieList();
    },
    //附件列表查询
    async getAttacthFlieList() {
      var obj = this.upAttach;
      const res = await dataLib_selectFiles(obj);
      if (res.code != 200) {
        this.$message.error('列表调用失败');
        return
      }
      this.tableAttach = res.result;
    },
    refreshAttatchDetail() {
      this.dialog.src = "";
      this.dialog.dialogVisible = false;
      this.dialog.isPdf = false;
      this.dialog.isJpg = false;
    },
    //附件查看
    setAttatchDetail(index, row) {
      this.refreshAttatchDetail()
      var name = row.name;
      if (name.indexOf('.pdf') != -1) {
        this.dialog.dialogVisible = true;
        this.dialog.isPdf = true;
        var url = BASE_URL + "/comprehensive/downloadForView?guid=" + row.guid + "&token=" + getToken();
        this.dialog.src = url
      } else if (name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) {
        this.dialog.dialogVisible = true;
        this.dialog.isJpg = true;
        var url = BASE_URL + "/comprehensive/downloadForView?guid=" + row.guid + "&token=" + getToken();
        this.dialog.src = url
      }
    },
    setAttatchFileView(index, row) {
      this.refreshAttatchDetail()
      var name = `${row.name}.${row.type}`;
      if (name.indexOf('.pdf') != -1) {
        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.dialogVisible = true;
      var url = BASE_URL + "/dataLib/downloadForView?guid=" + row.guid + "&token=" + getToken();
      this.dialog.src = url;
    },
    showView(res) {
      var name = res.type
      if (name) {
        if (name.indexOf('pdf') != -1 || name.indexOf('jpg') != -1 || name.indexOf('gif') != -1 || name.indexOf('png') != -1 || name.indexOf('jpeg') != -1) {
          return true
        } else {
          return false
        }
      }
    },
    //附件刪除
    async setAttachDel() {
      var std = [];
      for (var i in this.attacgSelection) {
@@ -1404,6 +1721,7 @@
      }
      this.getAttacthFlieList();
    },
    //附件列表新增
    setAttachInsert() {
      var token = getToken();
      var fs = document.getElementById("insertFile");
@@ -1449,159 +1767,147 @@
      });
    },
    setRestMetaData() {
      this.fromQueryMeta.name = "";
      this.listMetaData.name = this.fromQueryMeta.name;
      this.listMetaData.pageIndex = 1;
      this.listMetaData.pageSize = 10;
    async getAttacthFlieList() {
      var obj = this.upAttach;
      const res = await dataLib_selectFiles(obj);
      if (res.code != 200) {
        this.$message.error('列表调用失败');
        return
      }
      this.tableAttach = res.result;
      this.startQueryMetaData();
    },
    //附件=>文件选择
    getInsertFile() {
      $('#insertFile').click();
    },
    insertFile() {
      var val = document.getElementById('insertFile').files;
      if (!val || !val.length) return;
    setSearchMetaData() {
      this.listMetaData.name = this.fromQueryMeta.name;
      this.listMetaData.pageIndex = 1;
      this.listMetaData.pageSize = 10;
      this.fromfile.file = val[0].name;
      this.startQueryMetaData();
    },
    handleSelectionChange1(val) {
      this.multipleSelection1 = val;
    //源数据页面切换
    handleMetaSizeChange(val) {
      this.listMetaData.pageIndex = 1;
      this.listMetaData.pageSize = val;
      this.startQueryMetaData();
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    //源数据页面切换
    handMetaCurrentChange(val) {
      this.listMetaData.pageIndex = val;
      this.startQueryMetaData();
    },
    handleAttatchChange(val) {
      this.attacgSelection = val;
    //源数据查询
    setQueryMetaData(row) {
      this.fromQueryMeta.title = row.name;
      this.listMetaData = {
        metaid: row.id,
        name: "",
        pageIndex: 1,
        pageSize: 10,
        count: 0,
      };
      this.startQueryMetaData();
      this.queryMetaFlag = true;
    },
    async getCollapseTable(res) {
      res.then((val) => {
        this.attributeData = val;
      });
      if (this.formInline.fileName != "") {
        this.listTypeData.filter = this.formInline.fileName;
      } else {
        this.listTypeData.filter = null;
      }
      const data = await dataLib_selectByPage(this.listTypeData);
    async startQueryMetaData() {
      const data = await dataLib_selectPageAndCountByPid(this.listMetaData);
      if (data.code != 200) {
        this.$message.error('调用列表失败,请联系工作人员!');
        return;
      }
      var res_val = this.attributeData;
      for (var i in data.result) {
        let val_Data = data.result[i];
        for (var j in res_val) {
          if (res_val[j].domainNa != null && res_val[j].domainNa != undefined) {
            val_Data[res_val[j].field] = res_val[j].domainNa;
          }
        }
      }
      for (var i in data.result) {
        if (data.result[i].createtime != null) {
          data.result[i].createtime = this.format(data.result[i].createtime)
        }
        if (data.result[i].updatetime != null) {
          data.result[i].updatetime = this.format(data.result[i].updatetime)
        }
      }
      this.count1 = data.count;
      this.tableData = data.result;
      this.dialogVisible = true;
      this.metaDataTable = data.result;
      this.listMetaData.count = data.count;
    },
    //分页点击事件
    handleSizeChange1(val) {
      this.listTypeData.pageSize = val;
      this.listTypeData.pageIndex = 1;
      //获取table信息
      this.getCollapseTable(this.filedsLayer);
    },
    handleCurrentChange1(val) {
      this.listTypeData.pageIndex = val;
      //获取table信息
      this.getCollapseTable(this.filedsLayer);
    },
    async getCollapseDomFiled() {
      const fileds = await dataLib_selectFields({
        name: this.listTypeData.name,
      });
      if (fileds.code != 200) {
        this.$message.error('列表调用失败');
    //元数据查询
    async setMetaDataQuery(row) {
      this.fromQueryMeta.title = row.name;
      this.listMetaData = {
        id: row.metaid,
      };
      const data = await dataLib_selectMetaById(this.listMetaData);
      if (data.code != 200) {
        return;
      }
      const domains = await dataLib_selectDomains({
        name: this.listTypeData.name,
      });
      if (domains.code != 200) {
        this.$message.error('列表调用失败');
        return;
      }
      var data1 = fileds.result;
      var data2 = domains.result;
      this.formInline.fileName = ""
      var std = [];
      for (var i in data1) {
        if (data1[i].type != 'geomtry' && data1[i].type != 'null') {
          this.filedsOption.push(data1[i])
        }
        if (data1[i].showtype == 1) {
          if (data1[i].domainNa != null) {
            data1[i].domainNa = this.getDomainNaFild(data1[i].domainNa, data2);
          }
          std.push(data1[i]);
      this.queryMetaFlag1 = true;
      this.metaDataTable1 = [data.result];
    },
    getSpaceMapVisibale() {
      if (window.sgworld) {
        window.sgworld.Creator.SimpleGraphic.clear();
        for (var i in this.$store.state.queryInfo) {
          window.sgworld.Viewer.entities.remove(this.$store.state.queryInfo[i]);
        }
      }
      this.startFiledAndcondition();
      return std;
    },
    fieldChange(value) {
      var obj = {}
      obj = this.filedsOption.find(function (item) {
        return item.field === value;
      })
      this.conditionChange(obj)
      this.$store.state.queryInfo = [];
      if (this.$store.state.primitLayer != null) {
        sgworld.Viewer.entities.remove(this.$store.state.primitLayer);
        sgworld.Creator.DeleteObject(this.$store.state.primitLayer);
        this.$store.state.primitLayer = null;
      }
      this.dialogMapVisible = true;
      this.showMapVisible = true;
      this.$store.state.mapMenuBoolean = true;
      this.$store.state.mapMenuBoxFlag = '1';
      this.$store.state.mapPopBoolean = false;
      this.$store.state.mapPopBoxFlag = null;
      this.$store.state.download = true;
    },
    conditionChange(res) {
      this.formSql.field = res.field;
      this.formSql.type = res.type;
      if (res.type == "date" || res.type == "datetime") {
        this.fromSqlflag = true
      } else {
        this.fromSqlflag = false
    handleMaptClose() {
      this.dialogMapVisible = false;
      this.showMapVisible = false;
      this.$store.state.mapMenuBoolean = false;
      this.$store.state.mapMenuBoxFlag = null;
      this.$store.state.mapPopBoolean = false;
      this.$store.state.mapPopBoxFlag = false;
      this.$store.state.download = false;
      if (window.sgworld) {
        window.sgworld.Creator.SimpleGraphic.clear();
        for (var i in this.$store.state.queryInfo) {
          window.sgworld.Viewer.entities.remove(this.$store.state.queryInfo[i]);
        }
      }
      var std = [];
      this.condOption = [];
      if (res.type == 'text' || res.type == 'blob') {
        std = conditions[0]
      } else if (res.type == 'date' || res.type == 'datetime') {
        std = conditions[2]
      } else {
        std = conditions[1]
      this.$store.state.queryInfo = [];
      if (this.$store.state.primitLayer != null) {
        sgworld.Viewer.entities.remove(this.$store.state.primitLayer);
        sgworld.Creator.DeleteObject(this.$store.state.primitLayer);
        this.$store.state.primitLayer = null;
      }
      for (var i in std) {
        this.condOption.push({
          label: std[i],
          value: std[i],
        })
    },
    downloadMap(index, rows) {
      var token = getToken()
      var url = BASE_URL + "/dataLib/downloadFile?token=" + token + "&guid=" + rows.guid + "&pwd=" + rows.pwd;
      $("#downFrame").attr("src", url).click();
    },
    async getdownloadListData() {
      const data = await dataLib_selectPageCountForDownload(this.downloadPage);
      if (data.code != 200) {
        this.downloadListVisible = false;
        return this.$message.error('下载列表获取失败');
      }
      this.formSql.condition = this.condOption[0].value
      this.downloadTableData = data.result;
      this.downloadPage.count = data.count;
    },
    downloadSizeChange(val) {
      this.downloadPage.pageIndex = 1;
      this.downloadPage.pageSize = val;
      this.getdownloadListData();
    },
    downloadCurrentChange(val) {
      this.downloadPage.pageIndex = val;
      this.getdownloadListData();
    },
    getdownloadList() {
      this.downloadPage = {
        pageIndex: 1,
        pageSize: 10,
        count: 0,
        name: null,
      }
      this.downloadListVisible = true;
      this.getdownloadListData();
    },
    appendQueryFilter() {
      if (this.formSql.type == "date" || this.formSql.type == "datetime") {
@@ -1654,16 +1960,441 @@
      this.formSql.value = "";
      this.formSql.date = new Date();
    },
    handleconditionClose() {
      this.$confirm('确认关闭?')
        .then(_ => {
          this.startFiledAndcondition();
    fieldChange(value) {
      var obj = {}
      obj = this.filedsOption.find(function (item) {
        return item.field === value;
      })
      this.conditionChange(obj)
    },
    conditionChange(res) {
      this.formSql.field = res.field;
      this.formSql.type = res.type;
      if (res.type == "date" || res.type == "datetime") {
        this.fromSqlflag = true
      } else {
        this.fromSqlflag = false
      }
      var std = [];
      this.condOption = [];
      if (res.type == 'text' || res.type == 'blob') {
        std = conditions[0]
      } else if (res.type == 'date' || res.type == 'datetime') {
        std = conditions[2]
      } else {
        std = conditions[1]
      }
      for (var i in std) {
        this.condOption.push({
          label: std[i],
          value: std[i],
        })
        .catch(_ => { });
      }
      this.formSql.condition = this.condOption[0].value
    },
    async download1() {
      if (this.codeForm.password == '' || this.codeForm.repassword == '') {
        return this.$message.error('密码不能为空');
      }
      if (this.codeForm.password != this.codeForm.repassword) {
        return;
      }
      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}$/;
      if (!passwordreg.test(this.codeForm.password)) {
        return;
      }
      var ids = [];
      var filter = null;
      this.downloadLogVisible = false;
      if (this.multipleSelection.length != 0) {
        for (var i in this.multipleSelection) {
          ids.push(this.multipleSelection[i].gid)
        }
        filter = null;
      } else {
        filter = this.listBankData.filter;
        ids = null;
      }
      var obj = {
        entities: [this.listBankData.name], // bpachydrogeology,bhydrogeologyattach
        filter: filter,
        ids: ids,
        wkt: null,
        pwd: encrypt.encrypt(this.codeForm.password),
        depcode: this.listData.depcode,
        dirs: this.listData.dirs
      };
      const data = await dataLib_selectDbOverflowDep(obj)
      if (data.code != 200) {
        return
      }
      if (data.result.length == 0) {
        var that = this;
        $.ajax({
          url: BASE_URL + "/dataLib/downloadDbData?token=" + getToken(),
          type: "POST",
          data: JSON.stringify(obj),
          dataType: 'json', // html、json、jsonp、script、text
          contentType: "application/json", // "application/x-www-form-urlencoded"
          success: (data) => {
            if (data.code == 200) {
              that.downloadflie(data, this.codeForm.password)
            }
          },
          error: function (e) {
          }
        });
      } 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 dataLib_selectDepsByIds(val)
        this.ruleForm.depid = data1.result
        this.ruleForm.depname = std
        this.ruleForm.wkt = null
        this.ruleForm.tabs = [{
          tabDesc: this.listBankData.title
        }]
        this.dialogInsertVisible = true
      }
      // this.closeDown1();
    },
    downloadflie(data, pwd) {
      var token = getToken()
      var url = BASE_URL + "/dataLib/downloadFile?token=" + token + "&guid=" + data.result + "&pwd=" + encrypt.encrypt(pwd);
      $("#downFrame").attr("src", url).click();
      this.loading = false;
      this.closeDownx();
      this.closeDown1();
    },
    closeDown1() {
      this.downloadLogVisible = false;
      this.codeForm.password = '';
      this.codeForm.repassword = '';
    },
    //文件详情
    showDetail(index, row) {
      var std = [];
      for (var i in this.attributeData) {
        std.push({
          label: this.attributeData[i].alias,
          value: row[this.attributeData[i].field],
        });
      }
      this.itemdetail = std;
      this.itemDetailVisible = true;
    },
    async download() {
      if (this.codeForm.password == '' || this.codeForm.repassword == '') {
        return this.$message.error('密码不能为空');
      }
      if (this.codeForm.password != this.codeForm.repassword) {
        return;
      }
      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}$/;
      if (!passwordreg.test(this.codeForm.password)) {
        return;
      }
      this.passWorldVisible = false;
      var password = this.codeForm.repassword
      var std = [];
      var ids = [];
      for (var i in this.multipleSelection1) {
        std.push(this.multipleSelection1[i].id)
        ids.push(this.multipleSelection1[i].id)
      }
      // var obj = {
      // };
      this.closeDown();
      this.closeDownx();
      var obj = {
        ids: std,
      };
      const data = await dataLib_selectMetaOverflowDep(obj)
      if (data.code != 200) {
        return
      }
      if (data.result.length == 0) {
        const res = await dataLib_downloadReq(JSON.stringify({
          pwd: encrypt.encrypt(password),
          ids: std
        }));
        if (res.code != 200) {
          this.$message.error('下载请求失败');
          return
        }
        if (!res.result) {
          return
        }
        var downObj = {
          guid: res.result,
          pwd: encodeURIComponent(encrypt.encrypt(password))
        }
        const data = await dataLib_selectDownloadFile(downObj)
        if (data.code != 200) {
          this.$message.error('下载请求失败');
          return
        }
        var token = getToken()
        var url = BASE_URL + "/dataLib/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 dataLib_selectDepsByIds(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.monthdata.filter((res) => {
        return res.ischecked = false;
      })
      this.multipleSelection1 = [];
    },
    closeDown() {
      this.passWorldVisible = false;
      this.codeForm.password = '';
      this.codeForm.repassword = '';
    },
    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
      }
    },
    //文件下载
    setCardDownload(res) {
      // this.multipleSelection1 = [];
      // this.multipleSelection1.push(res);
      if (this.multipleSelection1.length == 0) {
        this.$message({
          message: '请先选择要下载的文件',
          type: 'warning'
        });
        return;
      }
      this.passWorldVisible = true;
    },
    //重置
    setQuerAllTablesRefresh() {
      // this.formInline = {
      //   fileName: "",//高级搜索
      //   dataType: "type2", //数据类型
      //   category: [], //查询类别,
      //   item: [],
      //   depcode: null, //单位,
      //   depName: null,//单位,
      //   keywords: '',
      // }
      this.formInline.fileName = "";//高级搜索
      this.formInline.category = [];//高级搜索
      this.formInline.item = [];//高级搜索
      this.formInline.depcode = null;//高级搜索
      this.formInline.depName = null;//高级搜索
      this.formInline.keywords = "";//高级搜索
      this.getAllTabesData();
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    //卡片详情点击事件
    async setCardDetails(res) {
      switch (this.formInline.dataType) {
        case "type1":
          this.getBankTableData(res);
          this.formInline.fileName = ""
          break;
        case "type2":
          this.itemdetail1 = res
          this.showinfoBox1 = true;
          break;
      }
    },
    //获取数据库数据js
    getBankTableData(res) {
      this.listBankData.name = res.entity;
      this.listBankData.pageIndex = 1;
      this.listBankData.pageSize = 10;
      this.listBankData.title = res.tabDesc;
      this.upAttach.tabName = res.ns + "." + res.tab;
      this.filedsLayer = this.getBankTableFiled();
      this.getCollapseTable(this.filedsLayer);
    },
    async getCollapseTable(res) {
      res.then((val) => {
        this.attributeData = val;
      });
      if (this.formInline.fileName != "") {
        this.listBankData.filter = this.formInline.fileName;
      } else {
        this.listBankData.filter = null;
      }
      this.listBankData.dirs = "";
      if (this.formInline.category.length != 0) {
        this.listBankData.dirs += this.formInline.category.toString();
      }
      if (this.formInline.item.length != 0) {
        if (this.listBankData.dirs.length != 0) {
          this.listBankData.dirs += ","
        }
        this.listBankData.dirs += this.formInline.item.toString();
      }
      this.listBankData.depcode = this.listData.depcode;
      const data = await dataLib_selectByPage(this.listBankData);
      if (data.code != 200) {
        this.$message.error('调用列表失败,请联系工作人员!');
        return;
      }
      var res_val = this.attributeData;
      for (var i in data.result) {
        let val_Data = data.result[i];
        for (var j in res_val) {
          if (res_val[j].domainNa != null && res_val[j].domainNa != undefined) {
            val_Data[res_val[j].field] = res_val[j].domainNa;
          }
        }
      }
      for (var i in data.result) {
        if (data.result[i].createtime) {
          data.result[i].createtime = this.format(data.result[i].createtime)
        }
        if (data.result[i].updatetime) {
          data.result[i].updatetime = this.format(data.result[i].updatetime)
        }
        data.result[i].createuser = data.result[i].createName
        data.result[i].updateuser = data.result[i].updateName
        if (data.result[i].verName) {
          data.result[i].verid = data.result[i].verName
        }
        if (data.result[i].depName) {
          data.result[i].depid = data.result[i].depName
        }
        if (data.result[i].dirName) {
          data.result[i].dirid = data.result[i].dirName
        }
      }
      this.listBankData.count = data.count;
      this.tableData = data.result;
      this.dialogVisible = true;
    },
    //获取数据表字段信息
    async getBankTableFiled() {
      const fileds = await dataLib_selectFields({
        name: this.listBankData.name,
      });
      if (fileds.code != 200) {
        this.$message.error('列表调用失败');
        return;
      }
      const domains = await dataLib_selectDomains({
        name: this.listBankData.name,
      });
      if (domains.code != 200) {
        this.$message.error('列表调用失败');
        return;
      }
      var data1 = fileds.result;
      var data2 = domains.result;
      this.formInline.fileName = ""
      var std = [];
      this.filedsOption = [];
      for (var i in data1) {
        if (data1[i].type != 'geometry' && data1[i].type != 'null') {
          this.filedsOption.push(data1[i])
        }
        if (data1[i].showtype == 1) {
          if (data1[i].domainNa != null) {
            data1[i].domainNa = this.getDomainNaFild(data1[i].domainNa, data2);
          }
          std.push(data1[i]);
        }
      }
      this.startFiledAndcondition();
      return std;
    },
    //值域字段匹配
    getDomainNaFild(res, result) {
      for (var i in result) {
@@ -1673,62 +2404,52 @@
      }
      return null;
    },
    handleSizeChange(res) {
    startFiledAndcondition() {
      this.conditionVisible = false;
      this.conditionChange(this.filedsOption[0]);
      this.formSql.value = "";
      this.formSql.date = new Date();
    },
    conditionChange(res) {
      this.formSql.field = res.field;
      this.formSql.type = res.type;
      if (res.type == "date" || res.type == "datetime") {
        this.fromSqlflag = true
      } else {
        this.fromSqlflag = false
      }
      var std = [];
      this.condOption = [];
      if (res.type == 'text' || res.type == 'blob') {
        std = conditions[0]
      } else if (res.type == 'date' || res.type == 'datetime') {
        std = conditions[2]
      } else {
        std = conditions[1]
      }
      for (var i in std) {
        this.condOption.push({
          label: std[i],
          value: std[i],
        })
      }
      this.formSql.condition = this.condOption[0].value
    },
    //存储类型切换
    setDataTypeChange() {
      this.listData.pageIndex = 1;
      this.listData.pageSize = res;
      if (this.isMenuActive == false) { this.getMetaData() } else { this.getDataLibSelectTabs() }
      this.listData.pageSize = 10;
      this.getAllTabesData();
    },
    handleCurrentChange(res) {
      this.listData.pageIndex = res;
      if (this.isMenuActive == false) { this.getMetaData() } else { this.getDataLibSelectTabs() }
    },
    async signGetPublicKey() {
      const res = await sign_getPublicKey();
      if (res && res.code == 200) {
        window.encrypt = new JSEncrypt();
        encrypt.setPublicKey(res.result);
      }
    },
    //单位转换
    stateFormatSize(row, column) {
      let data = row[column.property];
      if (data == null) {
        return data;
      }
      return this.stateFormatSizes(data);
    },
    stateFormatSizes(res) {
      if (res >= 1024) {
        const val = parseFloat(res / 1024).toFixed(3);
        return val + ' GB';
      } else {
        return res + ' MB';
      }
    },
    setInfoBoxTime(res) {
      if (res == null) {
        return res;
      }
      return this.format(res);
    },
    setInfoBoxSize(res) {
      if (res >= 1024) {
        return parseFloat(res / 1024).toFixed(3) + ' GB';
      } else {
        return res + ' MB';
      }
    },
    //格式化列表
    formatData(row, column) {
      let data = row[column.property];
      if (data == null) {
        return data;
      }
      return this.format(data);
    //卡片折叠效果
    setCardChange(res) {
      res.isShow = !res.isShow
    },
    //格式化时间
    format(shijianchuo) {
      //shijianchuo是整数,否则要parseInt转换
      var time = new Date(shijianchuo);
      var y = time.getFullYear();
      var m = time.getMonth() + 1;
@@ -1754,413 +2475,356 @@
    add0(m) {
      return m < 10 ? '0' + m : m;
    },
    async getDataTyeAndEntryName() {
      const data = await dataLib_selectProject();//查询项目名称
      if (data.code != 200) {
        this.$message.error('项目列表调用失败');
    //格式化列表
    formatData(row, column) {
      let data = row[column.property];
      if (data == null) {
        return data;
      }
      return this.format(data);
    },
    //格式化时间
    add0(m) {
      return m < 10 ? '0' + m : m;
    },
    statSizeChange(row, column) {
      return this.stateFormatSizes(row.sizes)
    },
    stateFormatSizes(res) {
      if (res >= 1024) {
        const val = parseFloat(res / 1024).toFixed(3);
        return val + ' GB';
      } else {
        return res + ' MB';
      }
    },
    setInfoBoxTime(res) {
      if (res == null) {
        return res;
      }
      return this.format(res);
    },
    handleSizeChange(val) {
      this.listData.pageIndex = 1;
      this.listData.pageSize = val;
      switch (this.formInline.dataType) {
        case "type2"://文件数据
          this.getQueryFileData();
          break;
        case "type1"://数据库数据
          this.getQueryBankData();
          break;
      }
      const res = await dataLib_selectBaseType(); //查询基础地理类别
      if (res.code != 200) {
        this.$message.error('基础地理类别列表调用失败');
    },
    handleCurrentChange(val) {
      this.listData.pageIndex = val;
      switch (this.formInline.dataType) {
        case "type2"://文件数据
          this.getQueryFileData();
          break;
        case "type1"://数据库数据
          this.getQueryBankData();
          break;
      }
      const rest = await dataLib_selectBusinessType(); //查询业务类别
      if (rest.code != 200) {
        this.$message.error('业务类别列表调用失败');
    },
    // 关键字查询
    submitForm() {
      this.listBankData.pageIndex = 1;
      this.listBankData.pageSize = 10;
      //获取table信息
      this.getCollapseTable(this.filedsLayer);
    },
    // 重置查询
    resetForm() {
      this.formInline.fileName = ""
      //获取table信息
      this.listBankData.pageIndex = 1;
      this.listBankData.pageSize = 10;
      //获取table信息
      this.getCollapseTable(this.filedsLayer);
    },
    handleSizeChange1(val) {
      this.listBankData.pageIndex = 1;
      this.listBankData.pageSize = val;
      //获取table信息
      this.getCollapseTable(this.filedsLayer);
    },
    handleCurrentChange1(val) {
      // 将div的滚动条复位到顶部
      this.listBankData.pageIndex = val;
      //获取table信息
      this.getCollapseTable(this.filedsLayer);
    },
    //查询数据库数据
    async getQueryBankData() {
      this.listData.dirs = "";
      this.listData.types = ""
      if (this.formInline.category.length != 0) {
        // this.listData.dirs += this.formInline.category.toString();
      }
      var std = [{ name: "不限", id: null }]
      var str = [{ name: "不限", id: null }]
      for (var i in data.result) {
        std.push({
          id: data.result[i].key,
          name: data.result[i].value
      var val_data = this.formInline.category;
      var data_type = []
      if (val_data.length > 0) {
        for (var i in val_data) {
          for (var j in this.categoryOptions) {
            if (this.categoryOptions[j].key == val_data[i]) {
              data_type.push(this.categoryOptions[j].value)
            }
          }
        }
      }
      if (this.formInline.item.length != 0) {
        if (this.listData.dirs.length != 0) {
          this.listData.dirs += ","
        }
        this.listData.dirs += this.formInline.item.toString();
      }
      this.listData.depcode = this.formInline.depcode;
      this.listData.tab = this.formInline.keywords;
      this.listData.types = data_type.toString();
      const data = await dataLib_selectTabs(this.listData);
      if (data.code != 200) {
        this.$message.error('数据库列表调用失败');
        return;
      }
      var val = data.result;
      if (val) {
        val = val.filter((res) => {
          res.mold = "数据库"
          res.isShow = false
          return res;
        })
        this.listData.count = data.count;
        this.monthdata = data.result;
      } else {
        this.listData.count = 0;
        this.monthdata = [];
      }
      this.project_name = std;
      for (var i in res.result) {
        str.push({
          id: res.result[i].key,
          name: res.result[i].value
    },
    //查询文件数据
    async getQueryFileData() {
      this.listData.dirs = "";
      if (this.formInline.category.length != 0) {
        this.listData.types = this.formInline.category.toString();
      }else{
        this.listData.types=null;
      }
      if (this.formInline.item.length != 0) {
        if (this.listData.dirs.length != 0) {
          this.listData.dirs += ","
        }
        this.listData.dirs += this.formInline.item.toString();
      }
      this.listData.depcode = this.formInline.depcode;
      this.listData.name = this.formInline.keywords;
      const data = await dataLib_selectByPageForMeta(this.listData);
      if (data.code != 200) {
        this.$message.error('文件数据列表调用失败');
      }
      var val = data.result;
      if (val) {
        val = val.filter((res) => {
          var type = "." + res.type;
          res.name = res.name.replaceAll(type, "")
          res.mold = "文件";
          res.isShow = false;
          res.ischecked = false;
          return res;
        })
        this.monthdata = val;
        this.listData.count = data.count;
      } else {
        this.monthdata = [];
        this.listData.count = 0;
      }
      for(var i in rest.result){
          str.push({
          id: rest.result[i].key,
          name: rest.result[i].value
        })
    },
    //查询数据
    getAllTabesData() {
      this.listData.pageIndex = 1;
      this.listData.pageSize = 10;
      switch (this.formInline.dataType) {
        case "type2"://文件数据
          this.getQueryFileData();
          break;
        case "type1"://数据库数据
          this.getQueryBankData();
          break;
      }
      this.data_type = str;
    }
  },
  mounted() {
    this.getDataLibSelectTabs();
    this.signGetPublicKey();
    this.getQueryDirTree();
    this.getDataTyeAndEntryName();
  },
    },
    //项目名称数据
    async getItemSelectData() {
      const data = await dataLib_selectProject();//查询项目名称
      if (data.code != 200) {
        this.$message.error('项目名称列表调用失败');
      }
      this.itemOptions = data.result;
    },
    //获取资料类别数据
    async getCategorySelectData() {
      // const data = await dataLib_selectDirTypes();
      // if (data.code != 200) {
      //   this.$message.error('资料类别列表调用失败');
      // }
      this.categoryOptions = [
        {key:'基础测绘',value:'基础测绘'},
        {key:'基础地灾',value:'基础地灾'},
        {key:'基础勘察',value:'基础勘察'},
        {key:'合规数据',value:'合规数据'},
        {key:'管理数据',value:'管理数据'},
        {key:'测绘(ESV)',value:'测绘(ESV)'},
        {key:'勘察(EGE)',value:'勘察(EGE)'},
        {key:'地灾(EGD)',value:'地灾(EGD)'},
        {key:'洞库(EGD)',value:'洞库(EGD)'},
      ];
    },
    //关键字查询
    setSearchKeyWords() {
      this.getAllTabesData();
    },
    //单位改变值触发
    depChange(data, node, nodeData) {
      this.formInline.depcode = data.code;
      this.formInline.depName = data.name;
      this.getAllTabesData();
    },
    //资料类别下拉框值改变触发
    categorySelectChange(model, prop, options) {
      this.getAllTabesData();
    },
    // 项目名称下拉框值改变触发
    itemSelectChange(model, prop, options) {
      this.getAllTabesData();
    },
    //获取单位列表
    async getDepTreeData() {
      const data = await selectdepTab();
      if (data.code != 200) {
        return this.$message.error('单位列表获取失败');
      }
      this.depOption = this.treeData(data.result);
      // this.formInline.depcode = this.depOption[0].code
      // this.formInline.depName = this.depOption[0].name;
      this.getAllTabesData();
    },
    //树列表生成
    treeData(source) {
      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) : ""; // 给父级添加一个children属性,并赋值
        return father.pid == 0; // 返回一级菜单
      });
    },
    async signGetPublicKey() {
      const res = await sign_getPublicKey();
      if (res && res.code == 200) {
        window.encrypt = new JSEncrypt();
        encrypt.setPublicKey(res.result);
      }
    },
  }
};
</script>
<style lang="less" scoped>
.archive {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow-y: auto;
  background: #353539;
  .top_header {
    width: calc(100% -20px);
    height: 60px;
    display: flex;
    padding: 0 10px;
    justify-content: space-between;
    border-bottom: 1px solid white;
    .top_left {
      display: flex;
      align-items: center;
    }
    label {
      font-size: 21px;
      font-family: Source Han Sans SC;
      font-weight: 400;
      color: #009cff;
      line-height: 70px;
    }
    span {
      color: gray;
      margin: 0 5px;
    }
    /deep/.el-form--inline .el-form-item__content {
      line-height: 70px;
    }
    /deep/.el-form--inline .el-form-item__label {
      line-height: 70px;
    }
  }
  .box_item {
    width: calc(100% - 60px);
    border-bottom: 1px solid white;
    height: auto;
    padding: 10px 30px;
    align-items: center;
    display: flex;
    float: left;
    .box_left {
      color: white;
      height: 100%;
      line-height: 100%;
      width: 100px;
      text-align: center;
      color: white;
      font-size: 14px;
      font-weight: 400;
    }
    .box_cont {
      color: white;
      height: 100%;
      width: 80%;
      display: flex;
      flex-wrap: wrap;
      /* 设置多行对齐 */
      align-content: flex-start;
      color: white;
      font-size: 14px;
      font-weight: 400;
    }
    .box_right {
      display: flex;
      justify-content: space-between;
      margin-left: 10px;
      color: white;
      font-size: 14px;
      align-self: flex-start;
      font-weight: 400;
      .box_menu {
        border: 1px solid white;
      }
      .box_menu:hover {
        border: 1px solid #009cff;
        color: #009cff;
      }
    }
  }
  .bottom_content {
    width: calc(100% - 60px);
    height: auto;
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    .bottom_left {
      width: 270px;
      font-size: 14px;
      font-weight: 400;
      align-self: flex-start;
      color: white;
      ul {
        margin-left: 10px;
      }
      li {
        height: 42px;
        border-top: 1px solid white;
        border-left: 1px solid white;
        border-right: 1px solid white;
        font-size: 14px;
        line-height: 42px;
        padding: 5px 15px;
      }
      .menuActive {
        color: #409eff;
      }
    }
    .bottom_right {
      width: 100%;
      padding: 0px 20px;
      height: auto;
      color: white;
      .boxCard {
        margin: 1%;
        /deep/.el-card {
          background: #303030 !important;
          color: #fff !important;
        }
        .cardItem {
          margin-bottom: 10px;
        }
      }
      li {
        border-bottom: 1px solid white;
        padding: 10px 0px;
      }
      li:hover {
        color: #409eff;
      }
    }
  }
  .panerPage {
    width: 100%;
    padding: 5px 0px;
    display: flex;
    justify-content: center;
  }
  .box_div {
    padding: 5px 15px;
    margin-left: 10px;
    display: flex;
    align-items: center;
    display: flex;
    .menuActive {
      color: #409eff;
    }
  }
  .primaries {
    background: linear-gradient(180deg, #002992, #080472);
    border: 1px solid #000000;
    box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.21);
    color: white;
  }
  .elLink {
    color: white;
  }
  .infoBox {
    width: 500px;
    position: absolute;
    z-index: 100;
    top: 25%;
    right: 25%;
    background: #303030;
    color: #fff;
    .el-card {
      background-color: transparent;
      color: #fff;
      span {
        color: #fff;
        font-size: 16px;
        font-weight: 600;
      }
    }
    .contentBox {
      margin: 0 aotu 10px;
      height: 500px;
      overflow: auto;
      p {
        // background-color: #bfa;
        // margin-bottom: 10px;
        font-size: 14px;
      }
    }
  }
  .downloadBox {
    position: absolute;
    top: 20%;
    left: 40%;
    padding: 20px;
    background: #303030;
    width: 30%;
    border: 1px solid gray;
    border-radius: 10px;
    color: white;
  }
  .pagination_box {
    /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;
    }
  }
  /deep/ .el-select .el-input__inner {
    border-color: #fff !important;
  }
  /deep/.el-checkbox {
    color: #ffff;
    line-height: 25px;
  }
}
.elLink {
  color: white !important;
}
.el-icon-folder-opened {
  color: white;
}
.contentBox {
  height: 60vh;
  overflow: auto;
  color: white;
}
/deep/ .el-dialog {
  background: #303030;
  z-index: 99;
}
.downloadBox {
  z-index: 999;
}
/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;
}
/deep/ .el-dialog__body {
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  padding: 10px;
}
/*修改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;
    color: #fff;
  }
  tr > td {
    background-color: #303030;
    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-input__inner {
  background-color: transparent !important ;
  color: #fff;
  border: 1px solid white !important;
}
/deep/.el-form-item__label {
  color: white;
}
/deep/.el-dialog__wrapper {
  position: relative;
  overflow: hidden;
}
/deep/.el-textarea__inner {
  background: transparent;
  border-color: #fff !important;
  color: white;
  height: 70px !important;
}
/deep/.el-form-item {
  margin-bottom: 0px;
}
/deep/.el-form-item__content {
  line-height: 70px;
}
/deep/.el-textarea.is-disabled .el-textarea__inner {
  background: transparent;
  .menu_top {
    display: flex;
    justify-content: space-between;
  }
  .iquery {
    width: 100%;
    padding-top: 10px;
  }
  .contBox {
    width: 100%;
    height: calc(100% - 111px);
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    display: flex;
    .archTopBox {
      width: 100%;
      overflow: auto;
      position: relative;
      .cardItem {
        margin-bottom: 10px;
        margin-left: 20px;
      }
    }
    .archBottomBox {
      width: 100%;
      display: flex;
      justify-content: center;
    }
  }
  /deep/.el-card__body {
    padding: 0px !important;
  }
  /deep/.el-card {
    margin-bottom: 10px !important;
  }
  /deep/.el-dialog__body {
    padding: 10px 10px;
  }
  /deep/.el-form-item {
    margin-bottom: 20px;
  }
  .show {
    display: none;
  }
  .downloadBox {
    width: 100%;
    height: 73vh;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    display: flex;
    .archdowntop {
      width: 100%;
      height: 69vh;
    }
    .archdownbottom {
      width: 100%;
      display: flex;
      justify-content: center;
    }
  }
  .pdfClass {
    height: 70vh;
    width: 100%;
    position: relative;
  }
}
</style>