From 90567c299700200dfe75cac7df7d157aeb057000 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期六, 25 二月 2023 17:10:49 +0800 Subject: [PATCH] 综合展示界面修改,样式修改 --- /dev/null | 2071 ------------------- src/api/api.js | 6 src/assets/lang/zh.js | 62 src/views/Archive/index.vue | 2559 +++-------------------- src/assets/css/config.css | 4 src/assets/css/configure.css | 31 src/assets/lang/en.js | 64 src/views/Archive/index copy.vue | 1559 ++++++++----- 8 files changed, 1,435 insertions(+), 4,921 deletions(-) diff --git a/src/api/api.js b/src/api/api.js index bd0b4ab..81cb5be 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -745,6 +745,12 @@ export function dataLib_selectProject(params) { return request.get('/dataLib/selectProject', { params: params }); } + +//璧勬枡棣�=>鏌ヨ璧勬枡绫诲埆 +export function dataLib_selectDirTypes(params) { + return request.get('dataLib/selectDirTypes', { params: params }); +} + //璧勬枡棣�=>鏌ヨ鍩虹鍦扮悊绫诲埆 export function dataLib_selectBaseType(params) { return request.get('/dataLib/selectBaseType', { params: params }); diff --git a/src/assets/css/config.css b/src/assets/css/config.css index 135c35e..eebcd10 100644 --- a/src/assets/css/config.css +++ b/src/assets/css/config.css @@ -503,4 +503,8 @@ .Black_theme .popupBox .popupContainer { color: #FFF !important; +} + +.Black_theme .el-select__input { + color: "#FFF"; } \ No newline at end of file diff --git a/src/assets/css/configure.css b/src/assets/css/configure.css index 260dbcb..d8cadd9 100644 --- a/src/assets/css/configure.css +++ b/src/assets/css/configure.css @@ -3,7 +3,8 @@ ::-webkit-scrollbar { width: 8px; height: 8px; - background-color: #409eff; + background-color: #a9a9a9; + opacity: 0.6; } ::-webkit-scrollbar-track { @@ -11,18 +12,28 @@ } ::-webkit-scrollbar-thumb { - background: #409eff; + background: #a9a9a9; border-radius: 100px; + opacity: 0.6; } ::-webkit-scrollbar-thumb:hover { - background: #409eff; + background: #a9a9a9; + opacity: 0.6; } ::-webkit-scrollbar-corner { - background: #409eff; + background: #606266; } +::-webkit-scrollbar-button { + width: 0px; + + height: 0px; + + background: #606266; + border-radius: 10px; +} .box_div { background: #F4F8FF; @@ -335,12 +346,20 @@ } /*鍒嗗壊绾挎牱寮�*/ -.dividing-line{ +.dividing-line { width: 100%; height: 1px; background-color: #dcdfe6; } .el-divider--horizontal { - margin:24px 0 0; + margin: 24px 0 0; } + +.el-select-dropdown.is-multiple .el-select-dropdown__item.selected { + background-color: transparent; +} + +.el-select-dropdown.is-multiple .el-select-dropdown__item.selected:hover { + background: transparent; +} \ No newline at end of file diff --git a/src/assets/lang/en.js b/src/assets/lang/en.js index 15c5ecf..71770e3 100644 --- a/src/assets/lang/en.js +++ b/src/assets/lang/en.js @@ -786,36 +786,52 @@ bak: 'Remarks', }, }, - shuJuGuanLi:{ + shuJuGuanLi: { language: "en", - pselect:{ - select:"Please select", - dFile:"Single file upload", - dFiles:"Overall project upload", - SurveyDiscipline:"Survey Discipline", - SurveysDiscipline:"Surveys Discipline", - GeologicalDisasterSpecialty:"Geological Disaster Specialty", - CavernSpecialty:"Cavern Specialty", + pselect: { + select: "Please select", + dFile: "Single file upload", + dFiles: "Overall project upload", + SurveyDiscipline: "Survey Discipline", + SurveysDiscipline: "Surveys Discipline", + GeologicalDisasterSpecialty: "Geological Disaster Specialty", + CavernSpecialty: "Cavern Specialty", }, - shuJuJianSuo:{ - valueone:"Please enter content" + shuJuJianSuo: { + valueone: "Please enter content" }, - butten:{ - uploadFile:"Upload File", - NewPeer:"New Peer", - AddChild:"Add Child", - Delete:"Delete", - MoveUp:"Move Up", - MoveDown:"Move down", - Report:"Report", - Histogram:"Histogram", - Download:"Download", + butten: { + uploadFile: "Upload File", + NewPeer: "New Peer", + AddChild: "Add Child", + Delete: "Delete", + MoveUp: "Move Up", + MoveDown: "Move down", + Report: "Report", + Histogram: "Histogram", + Download: "Download", } - - - }, + archiveObj: { + dataType: 'Storage type', + queryCategory: 'Query category', + dataBank: 'Data bank', + file: 'File', + dataClass: 'Data Class', + entryName: 'Entry Name', + unit: 'Unit', + keywords: 'Keywords', + develop: 'Develop', + fold: 'Fold', + storageType: 'Data Type', + label1: 'Please select data type', + label2: 'Please select a query category', + label3: 'Please select company name', + label4: 'Please select data type', + label5: 'Please select the project name', + label6: "Please enter data name", + } }; diff --git a/src/assets/lang/zh.js b/src/assets/lang/zh.js index 37d14ed..7896b4a 100644 --- a/src/assets/lang/zh.js +++ b/src/assets/lang/zh.js @@ -794,37 +794,55 @@ bak: '澶囨敞', }, }, - shuJuGuanLi:{ + shuJuGuanLi: { language: "zh", - pselect:{ - select:"璇烽�夋嫨", - dFile:"鍗曟枃浠朵笂浼�", - dFiles:"椤圭洰鏁翠綋涓婁紶", - SurveyDiscipline:"娴嬮噺涓撲笟", - SurveysDiscipline:"鍕樺療涓撲笟", - GeologicalDisasterSpecialty:"鍦扮伨涓撲笟", - CavernSpecialty:"娲炲簱涓撲笟", + pselect: { + select: "璇烽�夋嫨", + dFile: "鍗曟枃浠朵笂浼�", + dFiles: "椤圭洰鏁翠綋涓婁紶", + SurveyDiscipline: "娴嬮噺涓撲笟", + SurveysDiscipline: "鍕樺療涓撲笟", + GeologicalDisasterSpecialty: "鍦扮伨涓撲笟", + CavernSpecialty: "娲炲簱涓撲笟", }, - shuJuJianSuo:{ - valueone:"璇疯緭鍏ュ唴瀹�" + shuJuJianSuo: { + valueone: "璇疯緭鍏ュ唴瀹�" }, - butten:{ - uploadFile:"涓婁紶鏂囦欢", - NewPeer:"鏂板鍚岀骇", - AddChild:"鏂板瀛愮骇", - Delete:"鍒犻櫎", - MoveUp:"鍚戜笂绉诲姩", - MoveDown:"鍚戜笅绉诲姩", - Report:"鎶ヨ〃", - Histogram:"鏌辩姸鍥�", - Download:"涓嬭浇", - + butten: { + uploadFile: "涓婁紶鏂囦欢", + NewPeer: "鏂板鍚岀骇", + AddChild: "鏂板瀛愮骇", + Delete: "鍒犻櫎", + MoveUp: "鍚戜笂绉诲姩", + MoveDown: "鍚戜笅绉诲姩", + Report: "鎶ヨ〃", + Histogram: "鏌辩姸鍥�", + Download: "涓嬭浇", } }, + archiveObj: { + dataType: "瀛樺偍绫诲瀷", + queryCategory: "鏌ヨ绫诲埆", + dataBank: '鏁版嵁搴�', + file: '鏂囦欢', + dataClass: '璧勬枡绫诲埆', + entryName: '椤圭洰鍚嶇О', + unit: '鍗曚綅', + develop: '灞曞紑', + fold: '鎶樺彔', + keywords: '鍏抽敭瀛�', + storageType: '鏁版嵁绫诲瀷', + label1: '璇烽�夋嫨鏁版嵁绫诲瀷', + label2: '璇烽�夋嫨鏌ヨ绫诲埆', + label3: '璇烽�夋嫨鍗曚綅鍚嶇О', + label4: '璇烽�夋嫨璧勬枡绫诲埆', + label5: '璇烽�夋嫨椤圭洰鍚嶇О', + label6: "璇疯緭鍏ユ暟鎹悕绉�", + } }; export default zh; diff --git a/src/views/Archive/index copy 2.vue b/src/views/Archive/index copy 2.vue deleted file mode 100644 index cf01fe9..0000000 --- a/src/views/Archive/index copy 2.vue +++ /dev/null @@ -1,2071 +0,0 @@ -<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="top_right"> - <el-form - :inline="true" - :model="formInline" - class="demo-form-inline" - > - <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" - class="primaries" - >{{ - $t('common.iquery') - }}</el-button> - <el-button - icon="el-icon-refresh" - @click="restDataLibSelectTabs" - type="info" - >{{ - $t('common.reset') - }}</el-button> - </el-form-item> - <el-form-item> - <el-button - @click="getSpaceMapVisibale" - class="primaries" - >{{ - $t('synthesis.rangequery') - }}</el-button> - </el-form-item> - </el-form> - </div> - </div> - <div class="box_item"> - <div class="box_left">璧勬枡绫诲埆</div> - <div class="box_cont"> - <div - class="box_div" - v-for="(item, index) in showList" - :key="index" - > - <el-checkbox - v-if="isShowFirstCheck" - v-model="item.isCheckedFlag" - :checked="item.isCheckedFlag" - ></el-checkbox> - <div 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> {{ $t('synthesis.Multiplechoice') }} - </div> - </div> - </div> - <div class="box_item"> - <div class="box_left">椤圭洰鍚嶇О</div> - <div class="box_cont"> - <div - class="box_div" - v-for="(item, index) in showList1" - :key="index" - > - <el-checkbox - v-if="isShowSecondCheck" - v-model="item.isCheckedFlag" - :checked="item.isCheckedFlag" - ></el-checkbox> - <div 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> {{ $t('synthesis.Multiplechoice') }} - </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 - v-if="isMenuActive" - class="bottom_right" - > - <ul> - <li - v-for="(item, index) in dataType" - :key="index" - > - <div - class="box_div" - @click="getShowTable(item)" - > - {{ item.tabDesc }} - </div> - </li> - </ul> - </div> - <div - v-if="!isMenuActive" - class="bottom_right" - > - <el-form - :inline="true" - :model="queryForm" - class="demo-form-inline" - > - <el-form-item> - <el-cascader - v-model="queryForm.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="queryForm.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-button - type="danger" - size="small" - @click="deleteMetaInfo" - icon="el-icon-delete" - >{{ $t('common.delete') }}</el-button> - </el-form-item> --> - <!-- <el-form-item> - <el-button - @click="setBatchDownload" - icon="el-icon-download" - type="success" - size="small" - >鎵归噺涓嬭浇</el-button> - </el-form-item> --> - </el-form> - <div - class="boxCard" - v-for="(item,index) in tableData1" - > - <el-card class="box-card"> - <div - slot="header" - class="clearfix" - > - <span>{{item.name}}</span> - - <div style="float: right; padding: 3px 0"> - <i - @click="showDetail1(item)" - class="el-icon-tickets" - ></i> - <i - style="margin-left:10px" - @click="setFileDownload(item)" - class="el-icon-download" - ></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> - </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, 50, 100]" - :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" - > - <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, 50, 100]" - :page-size="listTypeData.pageSize" - layout="total, sizes, prev, pager, next, jumper" - :total="count1" - > - </el-pagination> - </div> - </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" - width="30%" - > - <div class="contentBox"> - <p>{{ $t('dataManage.vmobj.name') }}锛歿{ itemdetail1.name }}</p> - <el-divider></el-divider> - <p>{{ $t('dataManage.vmobj.format') }}锛歿{ itemdetail1.type }}</p> - <el-divider></el-divider> - <p>{{ $t('common.size') }}锛歿{ setInfoBoxSize(itemdetail1.sizes) }}</p> - <el-divider></el-divider> - <p>{{ $t('dataManage.vmobj.depName') }}锛歿{ itemdetail1.depName }}</p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.gather') }}锛歿{ - setInfoBoxTime(itemdetail1.gather) - }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.describe') }}锛歿{ itemdetail1.describe }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.createonuser') }}锛歿{ itemdetail1.uname }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.createontime') }}锛歿{ - setInfoBoxTime(itemdetail1.createTime) - }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.updateonuser') }}锛歿{ - itemdetail1.updateUser - }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.updateontime') }}锛歿{ - setInfoBoxTime(itemdetail1.updateTime) - }} - </p> - </div> - </el-dialog> - <el-dialog - title="鎵归噺涓嬭浇" - :visible.sync="batchDownloadVisible" - width="90%" - top="5vh" - :before-close="batchDownloadClose" - > - <div - style="float:right;margin-right:10px" - @click="downBatchFormData()" - ><i - style="color:#FFF" - class="el-icon-download" - ></i></div> - <div style="height:580px"> - - <el-table - :data="tableData2" - style="width: 100%" - @selection-change="handleSelectionChange1" - height="500px" - > - <el-table-column - type="selection" - width="55" - /> - <el-table-column - prop="name" - :label="$t('dataManage.vmobj.name')" - /> - <el-table-column - prop="type" - :label="$t('dataManage.vmobj.format')" - /> - <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')"> - <template slot-scope="scope"> - <a @click="showDetail2(scope.row)">{{ - scope.row.tab - }}</a> - </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"> - <el-pagination - @size-change="batchSizeChange" - @current-change="batchCurrentChange" - :current-page="batchPage.pageIndex" - :page-sizes="[10, 20, 50, 100]" - :page-size="batchPage.pageSize" - layout="total, sizes, prev, pager, next, jumper" - :total="batchPage.count" - > - </el-pagination> - </div> - </div> - </div> - </el-dialog> - <el-dialog - :title=" $t('synthesis.rangequery')" - :visible.sync="dialogMapVisible" - width="90%" - > - <div style="height:700px"> - <map-sdk v-if='showMapVisible'></map-sdk> - </div> - </el-dialog> - <iframe - id="downFrame" - src="" - style="display: none; border: 0; padding: 0; height: 0; width: 0" - ></iframe> - </div> -</template> - -<script> -import { flatten } from '@turf/turf'; -import { conditions } from './Archive.js' -import { - dataLib_selectTabs, - dataLib_selectFields, - dataLib_selectDomains, - dataLib_selectByPage, - dataLib_selectFiles, - dataLib_deletes, - dataLib_selectByPageForMeta, - dataLib_selectDownloadFile, - dataLib_downloadReq, - dataLib_selectTabFields, - sign_getPublicKey, - dataLib_selectDbData, - selectdirTab, - selectdepTab, - deleteMeta, -} 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' -export default { - components: { - MyBread, - MapSdk - }, - data() { - var repasswordValidator = (rule, value, callback) => { - if (value === '') { - callback(new Error('璇峰啀娆¤緭鍏ュ瘑鐮�')); - } else if (value !== this.codeForm.password) { - callback(new Error('涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!')); - } else { - callback(); - } - }; - var passwordValidator = (rule, value, callback) => { - var passwordreg = - /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![a-z0-9]+$)(?![a-z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![0-9\W!@#$%^&*`~()\\-_+=,.?;<>]+$)[a-zA-Z0-9\W!@#$%^&*`~()\\-_+=,.?;<>]{12,20}$/; - if (!passwordreg.test(value)) { - callback( - new Error('瀵嗙爜蹇呴』鐢辨暟瀛椼�佸瓧姣嶃�佺壒娈婂瓧绗︾粍鍚�,璇疯緭鍏�13-20浣�') - ); - } else { - callback(); - } - }; - return { - conditionVisible: false, - formSql: { - field: '', - condition: '', - value: '', - type: '', - date: '', - - }, - fromSqlflag: false, - filedsOption: [], - condOption: [], - queryForm: { - dirid: null, - depid: null, - }, - formInline: { tab: '', fileName: '' }, - 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' }], - repassword: [ - { required: true, message: '璇疯緭鍏ョ‘璁ゅ瘑鐮�', trigger: 'blur' }, - { validator: repasswordValidator, trigger: 'blur' }, - ], - }, - upAttach: { - tabName: null, - eventid: null, - }, - batchPage: { - pageIndex: 1, - pageSize: 10, - count: 0 - } - }; - }, - computed: { - - newList() { - this.listType.forEach((item) => { - this.$set(item, 'isCheckedFlag', false); - }); - return this.listType; - }, - showList() { - this.listType = 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 = 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; - } - }, - }, - methods: { - - - 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) { - for (var i in this.showList) { - this.showList[i].isCheckedFlag = false - } - } - - break; - case 2: - this.isShowSecondCheck = !this.isShowSecondCheck; - if (this.isShowSecondCheck == false) { - for (var i in this.showList1) { - this.showList1[i].isCheckedFlag = false - } - } - break; - } - }, - getMenuChange(res) { - - 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.getQueryDirTree(); - - this.isMenuActive = false; - break; - } - }, - //鍗曚綅鍒楄〃鑾峰彇 - async getQueryDirTree() { - const res = await selectdirTab(); - if (res.code != 200) { - this.$message.error('鍗曚綅鍒楄〃鑾峰彇澶辫触'); - return; - } - this.queryForm.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.queryForm.depid = 1; - this.companyOption1 = this.treeData(res.result); - this.getMetaData(); - }, - - // 鏌ヨ - queryInfo() { - this.listData.name = this.formInline.tab; - this.getMetaData(); - }, - // 閲嶇疆鏌ヨ - resetInfo(formName) { - this.queryForm.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.queryForm.dirid - this.listData.depid = this.queryForm.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.queryForm.dirid = value; - this.getMetaData(); - }, - handleChange1(value) { - this.listData.pageSize = 10; - this.listData.pageIndex = 1; - this.queryForm.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) : ''; // 缁欑埗绾ф坊鍔犱竴涓猚hildren灞炴�э紝骞惰祴鍊� - return father.pid == 0; // 杩斿洖涓�绾ц彍鍗� - }); - }, - searchDataLibSelectTabs() { - if (this.isMenuActive == true) { - this.getDataLibSelectTabs() - } else { - this.queryInfo(); - } - }, - restDataLibSelectTabs() { - this.formInline.tab = "" - this.listData.pageIndex = 1; - this.listData.pageSize = 10 - this.searchDataLibSelectTabs(); - - }, - async getDataLibSelectTabs() { - this.listData.tab = this.formInline.tab - const data = await dataLib_selectTabs(this.listData); - if (data.code != 200) { - this.$message.error('鍒楄〃璋冪敤澶辫触'); - return; - } - 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] - }) - if (data.code != 200) { - 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; - - }, - 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; - 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], - }); - } - this.itemdetail = std; - this.innerVisible = true; - }, - getAttachTable(index, row) { - if (row.eventid != null) { - this.upAttach.eventid = row.eventid; - } else { - this.upAttach.eventid = ""; - } - this.outerVisible = true; - this.getAttacthFlieList(); - }, - async setAttachDel() { - var std = []; - for (var i in this.attacgSelection) { - std.push(this.attacgSelection[i].id); - } - const res = await dataLib_deletes({ ids: std.toString() }); - if (res.code != 200) { - this.$message.error('鏂囦欢鍒犻櫎澶辫触'); - } - this.getAttacthFlieList(); - }, - setAttachInsert() { - var token = getToken(); - var fs = document.getElementById("insertFile"); - if (fs.files.length == 0) { - - this.$message({ - message: '璇烽�夋嫨瑕佷笂浼犵殑鏂囦欢锛�', - type: 'warning' - }); - return; - } - const formData = new FormData() - for (var i = 0, c = fs.files.length; i < c; i++) { - - formData.append('file', fs.files[i]); // fs.files[i].name,file - } - - $.ajax(BASE_URL + "/dataQuery/uploadFiles?token=" + token + "&tabName=" + this.upAttach.tabName + "&eventid=" + this.upAttach.eventid, { - type: "post", - data: formData, - async: true, - cache: false, - processData: false, - contentType: false, - success: (rs) => { - this.$message({ - message: '闄勪欢娣诲姞鎴愬姛', - type: 'success' - }); - document.getElementById("insertFile").value = ""; - this.fromfile = { - file: '', - } - this.getAttacthFlieList(); - }, - error: (e) => { - document.getElementById("insertFile").value = ""; - this.fromfile = { - file: '', - } - this.$message.error('闄勪欢娣诲姞澶辫触'); - } - }); - }, - - - async getAttacthFlieList() { - var obj = this.upAttach; - const res = await dataLib_selectFiles(obj); - if (res.code != 200) { - this.$message.error('鍒楄〃璋冪敤澶辫触'); - return - } - this.tableAttach = res.result; - }, - //闄勪欢=>鏂囦欢閫夋嫨 - getInsertFile() { - $('#insertFile').click(); - }, - insertFile() { - var val = document.getElementById('insertFile').files; - if (!val || !val.length) return; - - this.fromfile.file = val[0].name; - }, - handleSelectionChange1(val) { - this.multipleSelection1 = val; - }, - handleSelectionChange(val) { - this.multipleSelection = val; - }, - handleAttatchChange(val) { - this.attacgSelection = val; - }, - 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); - 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; - }, - //鍒嗛〉鐐瑰嚮浜嬩欢 - 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('鍒楄〃璋冪敤澶辫触'); - 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.startFiledAndcondition(); - return std; - }, - - 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], - }) - } - this.formSql.condition = this.condOption[0].value - }, - appendQueryFilter() { - if (this.formSql.type == "date" || this.formSql.type == "datetime") { - if (this.formSql.date == null) { - this.$message.error('璇疯緭鍏ヨ鏌ヨ鐨勪俊鎭�!'); - return; - } - } else { - if (this.formSql.value == "") { - this.$message.error('璇疯緭鍏ヨ鏌ヨ鐨勪俊鎭�!'); - return; - } - } - - if (this.formInline.fileName != "") { - this.formInline.fileName += " and "; - } - var val; - - if (this.formSql.type == "long" || this.formSql.type == "integer") { - - val = parseInt(this.formSql.value); - } else if (this.formSql.type == 'double') { - - if (this.formSql.value.indexOf(".") != -1) { - val = this.formSql.value; - } else { - val = parseFloat(this.formSql.value).toFixed(1) - } - } else if (this.formSql.type == "date" || this.formSql.type == "datetime") { - var time = new Date(this.formSql.date); - var m = time.getMonth() + 1; - var d = time.getDate(); - var y = time.getFullYear(); - val = "'" + y + - '-' + - this.add0(m) + - '-' + - this.add0(d) + "'"; - } else { - val = "'" + this.formSql.value + "'"; - } - this.formInline.fileName += this.formSql.field + " " + this.formSql.condition + " " + val; - - this.startFiledAndcondition(); - }, - startFiledAndcondition() { - this.conditionVisible = false; - this.conditionChange(this.filedsOption[0]); - this.formSql.value = ""; - this.formSql.date = new Date(); - }, - handleconditionClose() { - this.$confirm('纭鍏抽棴锛�') - .then(_ => { - this.startFiledAndcondition(); - }) - .catch(_ => { }); - }, - - - - //鍊煎煙瀛楁鍖归厤 - getDomainNaFild(res, result) { - for (var i in result) { - if (result[i].domName == res) { - return result[i].codeDesc; - } - } - return null; - }, - handleSizeChange(res) { - this.listData.pageIndex = 1; - this.listData.pageSize = res; - if (this.isMenuActive == false) { this.getMetaData() } else { this.getDataLibSelectTabs() } - }, - 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); - }, - //鏍煎紡鍖栨椂闂� - format(shijianchuo) { - //shijianchuo鏄暣鏁帮紝鍚﹀垯瑕乸arseInt杞崲 - var time = new Date(shijianchuo); - var y = time.getFullYear(); - var m = time.getMonth() + 1; - var d = time.getDate(); - var h = time.getHours(); - var mm = time.getMinutes(); - var s = time.getSeconds(); - return ( - y + - '-' + - this.add0(m) + - '-' + - this.add0(d) + - ' ' + - h + - ':' + - mm + - ':' + - s - ); - }, - //鏍煎紡鍖栨椂闂� - add0(m) { - return m < 10 ? '0' + m : m; - }, - }, - mounted() { - this.getDataLibSelectTabs(); - this.signGetPublicKey(); - }, -}; -</script> - -<style lang="less" scoped> -.archive { - width: 100%; - height: 100%; - margin: 0; - overflow-y: auto; - background: #353539; - .top_header { - width: calc(100% - 60px); - height: 70px; - display: flex; - padding: 0 30px; - 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: calc(100% - 320px); - 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; - } - .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; - } -} - -.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 { - 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 { - 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; -} -</style> diff --git a/src/views/Archive/index copy.vue b/src/views/Archive/index copy.vue index 696e950..32d7c12 100644 --- a/src/views/Archive/index copy.vue +++ b/src/views/Archive/index copy.vue @@ -1,115 +1,108 @@ <template> - <div class="archive"> + <div + class="archive box_div" + v-loading="loading" + element-loading-background="rgba(0, 0, 0, 0.8)" + > <div class="top_header"> <div class="top_left"> <My-bread :list="[`${$t('synthesis.synthesis')}`, `${$t('synthesis.archive')}`]"></My-bread> </div> - <div class="top_right"> - <el-form - :inline="true" - :model="formInline" - class="demo-form-inline" - > - <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" - class="primaries" - >{{ - $t('common.iquery') - }}</el-button> - <el-button - icon="el-icon-refresh" - @click="restDataLibSelectTabs" - type="info" - >{{ - $t('common.reset') - }}</el-button> - </el-form-item> - <el-form-item> - <el-button - @click="getSpaceMapVisibale" - class="primaries" - >{{ - $t('synthesis.rangequery') - }}</el-button> - </el-form-item> - </el-form> - </div> </div> + <div class="box_item "> - <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 - class="box_div" + v-if="!isShowFirstCheck" + class="menu_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 style="margin-left: 5px">{{ item.name }}</div> + + <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" + class="menu_div subpage_Div" @click="moreEvent(1)" > {{ $t('synthesis.more') }} </div> <div - class="box_div box_menu" + class="menu_div subpage_Div " @click="checkEvent(1)" > - <i class="el-icon-plus"></i> {{ $t('synthesis.Multiplechoice') }} + <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_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 - class="box_div" + v-if="!isShowSecondCheck" + class="menu_div" v-for="(item, index) in showList1" :key="index" + @click="changeListEntryName(item)" > - <el-checkbox - v-if="isShowSecondCheck" - v-model="item.isCheckedFlag" - :checked="item.isCheckedFlag" - ></el-checkbox> - <div style="margin-left: 5px">{{ item.name }}</div> + <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" + class="menu_div subpage_Div" @click="moreEvent(2)" > {{ $t('synthesis.more') }} </div> <div - class="box_div box_menu" + class="menu_div subpage_Div" @click="checkEvent(2)" > - <i class="el-icon-plus"></i> {{ $t('synthesis.Multiplechoice') }} + <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 class="bottom_left "> + <!-- <div class="menu_div">褰撳墠鎼滅储鍏抽敭璇�:</div> --> <div> <ul> <li>鎼滅储绫诲瀷</li> @@ -122,185 +115,144 @@ <li @click="getMenuChange(2)" :class="{ menuActive: !isMenuActive }" - style="border-bottom: 1px solid white" - > + style="border-bottom: 1px solid #dcdfe6"> 鏂囦欢鏁版嵁婧� </li> </ul> </div> </div> - <div - v-if="isMenuActive" - class="bottom_right" - > - <ul> - <li - v-for="(item, index) in dataType" - :key="index" + + <div class="bottom_right" > + <div class="inquire subpage_Div center " ref="container" style="padding: 10px;align-self: center"> + <el-form + :inline="true" + :model="formInline" + class="demo-form-inline" + ref="sizeForm" + label-width="68px" > - <div - class="box_div" - @click="getShowTable(item)" + <!-- <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 style="padding-right: 10px"> + <el-cascader + v-model="formInline.depid" + :show-all-levels="false" + :options="companyOption1" + @change="handleChange1" + :props="{ + label: 'name', + value: 'code', + children: 'children', + checkStrictly: true, + emitPath: false, + }" + ></el-cascader> + </el-form-item> + <el-form-item style="padding-right: 50px"> + <el-input + v-model="formInline.tab" + suffix-icon="el-icon-search" + :placeholder="$t('common.pleaseInput')" + ></el-input> + </el-form-item> + + <el-form-item style="padding-right: 40px"> + <el-button + type="primary" + icon="el-icon-search" + @click="searchDataLibSelectTabs" + size="medium" + >{{$t('common.iquery')}}</el-button> + <!-- </el-form-item> + <el-form-item style="padding-right: 10px">--> + <el-button + icon="el-icon-refresh" + @click="restDataLibSelectTabs" + type="info" + size="medium" + style=" + background: #a3a5a6; + border: 1px solid #a3a5a6; + color: white; " + >{{ $t('common.reset') }}</el-button> +<!-- </el-form-item> + <el-form-item style="padding-right: 10px">--> + <el-button + type="success" + icon="el-icon-search" + @click="getSpaceMapVisibale" + size="medium" + >{{ $t('synthesis.rangequery') }}</el-button> +<!-- </el-form-item> + <el-form-item style="padding-right: 10px">--> + <el-button + icon="el-icon-download" + type="warning" + @click="getdownloadList" + size="medium" + >{{ $t('synthesis.DownloadList') }}</el-button> + </el-form-item> + </el-form> + </div> + <div v-if="isMenuActive"> + <ul> + <li + v-for="(item, index) in dataTypeList" + :key="index" > - {{ item.tabDesc }} ({{ item.tab }}) + <div + class="menu_div" + @click="getShowTable(item)" + > + {{ item.tabDesc }} <span style="margin-left:20px">{{item.rows}}鏉�</span> + </div> + </li> + </ul> + </div> + <div + class="boxCard" + v-if="!isMenuActive" + v-for="(item,index) in tableData1" + > + <el-card class="box-card"> + <div + slot="header" + class="clearfix" + > + <span>{{item.name}}</span> + + <div style="float: right; padding: 3px 0"> + <i + @click="showDetail1(item)" + class="el-icon-tickets" + ></i> + <i + style="margin-left:10px" + @click="setFileDownload(item)" + class="el-icon-download" + ></i> + </div> </div> - </li> - </ul> - </div> - <div - v-if="!isMenuActive" - class="bottom_right" - > - <el-form - :inline="true" - :model="queryForm" - class="demo-form-inline" - > - <el-form-item> - <el-cascader - v-model="queryForm.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="queryForm.dirid" - :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 :label="$t('dataManage.vmobj.keyword')" > - <el-input v-model="queryForm.name" :placeholder="$t('common.pleaseInput')"></el-input> - </el-form-item> --> - <!-- <el-form-item> - <el-button - @click="queryInfo()" - icon="el-icon-search" - class="primary" - size="small" - >{{ $t('common.iquery') }}</el-button - > - </el-form-item> --> - <!-- <el-form-item> - <el-button - @click="resetInfo('queryForm')" - icon="el-icon-refresh" - type="info" - size="small" - >{{ $t('common.reset') }}</el-button - > - </el-form-item> --> - <el-form-item> - <el-button - type="danger" - size="small" - @click="deleteMetaInfo" - icon="el-icon-delete" - >{{ $t('common.delete') }}</el-button> - </el-form-item> - <el-form-item> - <el-button - @click="downFormData" - icon="el-icon-download" - type="success" - size="small" - >{{ $t('common.download') }}</el-button> - </el-form-item> - </el-form> - <el-table - :data="tableData1" - style="width: 100%" - @selection-change="handleSelectionChange1" - height="500px" - > - <el-table-column - type="selection" - width="55" - /> - <el-table-column - prop="name" - :label="$t('dataManage.vmobj.name')" - /> - <el-table-column - prop="type" - :label="$t('dataManage.vmobj.format')" - /> - <el-table-column - prop="sizes" - :label="$t('dataManage.vmobj.size')" - :formatter="stateFormatSizes" - /> - <el-table-column - prop="depName" - :label="$t('dataManage.vmobj.depName')" - /> - <el-table-column - prop="dirName" - :label="$t('dataManage.vmobj.dirName')" - /> - - <el-table-column :label="$t('dataManage.dataUpObj.tableName')"> - <template slot-scope="scope"> - <a @click="showDetail2(scope.row)">{{ - scope.row.tab - }}</a> - </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')" - > - <template slot-scope="scope"> - <el-link - style="color: white" - @click="showDetail1(scope.row)" - >{{ - $t('common.details') - }}</el-link> - <!-- <el-link - @click="editInfo(scope.row)" - style="margin-left: 10px; color: white" - >{{ $t('common.edit') }}</el-link - > --> - </template> - </el-table-column> - </el-table> + <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> + </el-card> + </div> </div> </div> <div class="panerPage"> @@ -322,13 +274,15 @@ :visible.sync="dialogVisible" width="90%" top="10vh" + :modal="false" + style="z-index:999" :before-close="handleClose" > <!-- 鏉′欢--> <el-dialog width="37%" :visible.sync="conditionVisible" - append-to-body + :modal="false" title="鏌ヨ鏉′欢" :before-close="handleconditionClose" > @@ -339,6 +293,7 @@ > <el-form-item> <el-select + :popper-append-to-body="false" @change="fieldChange($event)" v-model="formSql.field" > @@ -352,7 +307,10 @@ </el-select> </el-form-item> <el-form-item> - <el-select v-model="formSql.condition"> + <el-select + :popper-append-to-body="false" + v-model="formSql.condition" + > <el-option v-for="item in condOption" :key="item.value" @@ -390,7 +348,6 @@ <el-dialog width="30%" :visible.sync="innerVisible" - append-to-body > <div class="contentBox"> <ul> @@ -408,7 +365,7 @@ <el-dialog width="30%" :visible.sync="outerVisible" - append-to-body + :modal="false" > <el-form :model="fromfile" @@ -441,14 +398,14 @@ class="elLink" :underline="false" @click="setAttachInsert" - >{{$t('common.append')}}</i></el-link> + >{{$t('common.append')}}</el-link> </el-col> <el-col :span="3"> <el-link class="elLink" :underline="false" @click="setAttachDel" - >{{$t('common.delete')}}</i></el-link> + >{{$t('common.delete')}}</el-link> </el-col> <!-- <el-col :span="3"> <el-link class="elLink" :underline="false" >{{$t('common.reset')}}</i></el-link></el-col> --> </el-row> @@ -483,7 +440,7 @@ </el-table> </el-form-item> - <el-form-item> + <!-- <el-form-item> <el-row :gutter="20"> <el-col @@ -500,10 +457,60 @@ >鍙栨秷</el-button> </el-col> </el-row> + </el-form-item> --> + </el-form> + </el-dialog> + <el-dialog + :title="$t('common.passworld')" + :visible.sync="downloadLogVisible" + width="30%" + top="10vh" + :modal="false" + :show-close="false" + :before-close="handleCloseDown" + > + <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="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> - <div style="height: 700px"> + <div style="max-height: 580px"> <el-form v-if="isMenuActive" ref="ruleForm" @@ -525,73 +532,87 @@ <el-form-item> <el-button @click="conditionVisible = true" - type="info" + type="success" + size="small" icon="el-icon-plus" >{{$t('common.append')}}</el-button> </el-form-item> <el-form-item> <el-button @click="submitForm()" - type="info" + type="primary" + size="small" icon="el-icon-search" >{{$t('common.iquery')}}</el-button> </el-form-item> <el-form-item> <el-button type="info" + size="small" @click="resetForm()" icon="el-icon-search" >{{$t('common.reset')}}</el-button> </el-form-item> + <el-form-item> + <el-button + type="warning" + size="small" + @click="downloadForm()" + icon="el-icon-download" + >{{$t('common.download')}}</el-button> + </el-form-item> </el-form> <el-divider class="eldivider" /> - <el-table - ref="filterTable" - :data="tableData" - height="76%" - border - style="width: 100%" - @selection-change="handleSelectionChange" - > - <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')" + <div style="width:100%;height:400px;"> + <el-table + ref="filterTable" + :data="tableData" + height="100%" + border + style="width: 100%" + @selection-change="handleSelectionChange" > - <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> + <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="120" + 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 @@ -609,7 +630,7 @@ </div> </el-dialog> <div - class="downloadBox" + class="downloadBox box_div subpage_Div" v-if="showCodeBox" > <h4 style="padding: 20px">{{$t('common.passworld')}}</h4> @@ -654,74 +675,213 @@ </el-form-item> </el-form> </div> - <div - class="infoBox" - v-show="showinfoBox1" + <el-dialog + :title="$t('common.details')" + :visible.sync="showinfoBox1" + width="30%" > - <el-card class="box-card"> - <div - slot="header" - class="clearfix" - > - <span>{{ $t('common.details') }}</span> - <div - style="float: right; cursor: pointer" - @click="closeDetial" - > - <i class="el-icon-close"></i> - </div> - </div> - <div class="contentBox"> - <p>{{ $t('dataManage.vmobj.name') }}锛歿{ itemdetail1.name }}</p> - <el-divider></el-divider> - <p>{{ $t('dataManage.vmobj.format') }}锛歿{ itemdetail1.type }}</p> - <el-divider></el-divider> - <p>{{ $t('common.size') }}锛歿{ setInfoBoxSize(itemdetail1.sizes) }}</p> - <el-divider></el-divider> - <p>{{ $t('dataManage.vmobj.depName') }}锛歿{ itemdetail1.depName }}</p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.gather') }}锛歿{ + <div class="contentBox"> + <p>{{ $t('dataManage.vmobj.name') }}锛歿{ itemdetail1.name }}</p> + <el-divider></el-divider> + <p>{{ $t('dataManage.vmobj.format') }}锛歿{ itemdetail1.type }}</p> + <el-divider></el-divider> + <p>{{ $t('common.size') }}锛歿{ setInfoBoxSize(itemdetail1.sizes) }}</p> + <el-divider></el-divider> + <p>{{ $t('dataManage.vmobj.depName') }}锛歿{ itemdetail1.depName }}</p> + <el-divider></el-divider> + <p> + {{ $t('dataManage.vmobj.gather') }}锛歿{ setInfoBoxTime(itemdetail1.gather) }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.describe') }}锛歿{ itemdetail1.describe }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.createonuser') }}锛歿{ itemdetail1.uname }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.createontime') }}锛歿{ + </p> + <el-divider></el-divider> + <p> + {{ $t('dataManage.vmobj.describe') }}锛歿{ itemdetail1.describe }} + </p> + <el-divider></el-divider> + <p> + {{ $t('dataManage.vmobj.createonuser') }}锛歿{ itemdetail1.uname }} + </p> + <el-divider></el-divider> + <p> + {{ $t('dataManage.vmobj.createontime') }}锛歿{ setInfoBoxTime(itemdetail1.createTime) }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.updateonuser') }}锛歿{ + </p> + <el-divider></el-divider> + <p> + {{ $t('dataManage.vmobj.updateonuser') }}锛歿{ itemdetail1.updateUser }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.updateontime') }}锛歿{ + </p> + <el-divider></el-divider> + <p> + {{ $t('dataManage.vmobj.updateontime') }}锛歿{ setInfoBoxTime(itemdetail1.updateTime) }} - </p> + </p> + </div> + </el-dialog> + <el-dialog + title="鎵归噺涓嬭浇" + :visible.sync="batchDownloadVisible" + width="90%" + top="5vh" + :before-close="batchDownloadClose" + > + <div + style="float:right;margin-right:10px" + @click="downBatchFormData()" + ><i class="el-icon-download"></i></div> + <div style="height:580px"> + + <el-table + :data="tableData2" + style="width: 100%" + @selection-change="handleSelectionChange1" + height="500px" + > + <el-table-column + type="selection" + width="55" + /> + <el-table-column + prop="name" + :label="$t('dataManage.vmobj.name')" + /> + <el-table-column + prop="type" + :label="$t('dataManage.vmobj.format')" + /> + <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')"> + <template slot-scope="scope"> + <a @click="showDetail2(scope.row)">{{ + scope.row.tab + }}</a> + </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"> + <el-pagination + @size-change="batchSizeChange" + @current-change="batchCurrentChange" + :current-page="batchPage.pageIndex" + :page-sizes="[10, 20, 50, 100]" + :page-size="batchPage.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="batchPage.count" + > + </el-pagination> + </div> </div> - </el-card> - </div> + </div> + </el-dialog> <el-dialog :title=" $t('synthesis.rangequery')" :visible.sync="dialogMapVisible" width="90%" - :before-close="handleMapClose" + top="10vh" > <div style="height:700px"> <map-sdk v-if='showMapVisible'></map-sdk> + </div> + </el-dialog> + <el-dialog + :visible.sync="downloadListVisible" + width="90%" + top="10vh" + > + <div style="height:700px"> + <el-table + :data="downloadTableData" + style="width: 100%" + > + <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> + <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> </el-dialog> <iframe @@ -751,10 +911,14 @@ selectdirTab, selectdepTab, deleteMeta, + dataLib_selectProject, + dataLib_selectBaseType, + dataLib_selectBusinessType, + dataLib_selectPageCountForDownload, } from '../../api/api'; import $ from 'jquery' import { getToken } from '@/utils/auth'; -import { data_type, project_name } from '../../components/js/archive.js'; +// import { data_type, project_name } from '../../components/js/archive.js'; import MyBread from '../../components/MyBread.vue'; import MapSdk from '../../components/mapsdk.vue' export default { @@ -784,6 +948,16 @@ } }; return { + dataTypeList: [], + loading: false, + downloadLogVisible: false, + downloadListVisible: false, + data_type: [], + project_name: [], + checkedDataType: [], + checkedEntryName: [], + dataTypeName: '涓嶉檺', + EntryName: '涓嶉檺', conditionVisible: false, formSql: { field: '', @@ -796,11 +970,11 @@ fromSqlflag: false, filedsOption: [], condOption: [], - queryForm: { - dirid: null, + + formInline: { + tab: '', fileName: '', dirid: null, depid: null, }, - formInline: { tab: '', fileName: '' }, codeForm: { password: '', repassword: '', @@ -822,11 +996,13 @@ dialogVisible: false, innerVisible: false, outerVisible: false, + batchDownloadVisible: false, dataType: [], filedsLayer: [], attributeData: [], tableData: [], tableData1: [], + tableData2: [], multipleSelection: [], multipleSelection1: [], attacgSelection: [], @@ -844,7 +1020,9 @@ listData: { pageIndex: 1, pageSize: 10, - tab: '' + depcode: null, + dirs: null, + tab: null }, count: 0, count1: 0, @@ -862,11 +1040,26 @@ upAttach: { tabName: null, eventid: null, + }, + batchPage: { + pageIndex: 1, + pageSize: 10, + count: 0 + }, + downloadTableData: [], + downloadPage: { + pageIndex: 1, + pageSize: 10, + count: 0, + name: null, + }, + queryList: { + showList1: '', + showList2: '' } }; }, computed: { - newList() { this.listType.forEach((item) => { this.$set(item, 'isCheckedFlag', false); @@ -874,11 +1067,11 @@ return this.listType; }, showList() { - this.listType = data_type; + this.listType = this.data_type; if (this.showFirstAll == false) { var showList = []; if (this.newList.length > 8) { - for (var i = 0; i < 14; i++) { + for (var i = 0; i < 10; i++) { showList.push(this.newList[i]); //灏嗘暟缁勭殑鍓�7鏉″瓨鏀惧埌showList鏁扮粍涓� } } else { @@ -896,7 +1089,7 @@ return this.listProject; }, showList1() { - this.listProject = project_name; + this.listProject = this.project_name; if (this.showSecondAll == false) { var showList1 = []; if (this.newList1.length > 8) { @@ -913,8 +1106,218 @@ }, }, methods: { + handleCloseDown() { + + }, + 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; + } + this.downloadLogVisible = false; + + var obj = { + entities: [this.listTypeData.name], // bpachydrogeology,bhydrogeologyattach + filter: this.listTypeData.filter, + pwd: encrypt.encrypt(this.codeForm.password), + depcodes: [this.listData.depcode], + dirs: this.listData.dirs + + }; + this.loading = true; + var that = this; + $.ajax({ + url: BASE_URL + "/dataLib/downloadEntityReq?token=" + getToken(), + type: "POST", + data: JSON.stringify(obj), + dataType: 'json', // html銆乯son銆乯sonp銆乻cript銆乼ext + contentType: "application/json", // "application/x-www-form-urlencoded" + success: (data) => { + if (data.code == 200) { + that.downloadflie(data, this.codeForm.password) + + } + }, + error: function (e) { + } + }); + }, + downloadflie(data, pwd) { + this.codeForm = { + password: '', + repassword: '', + } + 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; + }, + closeDown1() { + this.codeForm = { + password: '', + repassword: '', + } + this.downloadLogVisible = false; + }, + downloadForm() { + this.downloadLogVisible = true; + }, + 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(); + }, + 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(); + }, + async getdownloadListData() { + const data = await dataLib_selectPageCountForDownload(this.downloadPage); + if (data.code != 200) { + this.downloadListVisible = false; + return this.$message.error('涓嬭浇鍒楄〃鑾峰彇澶辫触'); + } + + this.downloadTableData = data.result; + + this.downloadPage.count = data.count; + }, + 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); + } + } + } + var std = ""; + for (var i in this.checkedEntryName) { + for (var j in this.showList1) { + if (this.showList1[j].name == this.checkedEntryName[i]) { + if (std.length != 0) { + std += "," + } + std += this.showList1[j].id + } + } + } + this.queryList.showList2 = std; + + this.getQueryShowListData(); + }, + 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); + } + } + } + var std = ""; + for (var i in this.checkedDataType) { + for (var j in this.showList) { + if (this.showList[j].name == this.checkedDataType[i]) { + if (std.length != 0) { + std += "," + } + std += this.showList[j].id + } + } + } + this.queryList.showList1 = std; + this.getQueryShowListData(); + }, + changeListDataType(res) { + if (this.isShowFirstCheck == false) { + this.dataTypeName = res.name; + this.queryList.showList1 = res.id; + this.getQueryShowListData(); + } + }, + + getQueryShowListData() { + var a1 = ""; + if (this.queryList.showList1 != "" && this.queryList.showList1 != null) { + a1 = this.queryList.showList1; + } + if (this.queryList.showList2 != "" && this.queryList.showList2 != null) { + if (a1.length != 0) { + a1 += "," + } + a1 += this.queryList.showList2; + } + this.listData.dirs = a1; + this.listData.pageIndex = 1; + this.listData.pageSize = 10; + if (this.isMenuActive == true) { + this.getDataLibSelectTabs() + } else { + this.queryInfo(); + } + }, + + restDataLibSelectTabs() { + this.formInline.tab = "" + this.queryList = { + showList1: null, + showList2: null, + } + this.formInline.depid = this.companyOption1[0].code; + this.listData.depcode = this.companyOption1[0].code; + this.checkedDataType = [] + this.dataTypeName = '涓嶉檺'; + this.dataTypeName = null; + this.checkedDataType = ['涓嶉檺']; + this.isShowFirstCheck = false + this.checkedDataType = [] + this.dataTypeName = '涓嶉檺'; + this.queryList.showList1 = null; + this.isShowSecondCheck = false; + this.checkedEntryName = [] + this.EntryName = '涓嶉檺'; + this.queryList.showList2 = null; + this.getQueryShowListData(); + }, + + + changeListEntryName(res) { + if (this.isShowSecondCheck == false) { + this.EntryName = res.name; + this.queryList.showList2 = res.id; + this.getQueryShowListData(); + } + }, getSpaceMapVisibale() { this.dialogMapVisible = true; this.showMapVisible = true; @@ -940,6 +1343,17 @@ this.$store.state.download = false; this.$store.state.mapPopBoolean = false; this.$store.state.mapPopBoxFlag = null; + sgworld.Creator.SimpleGraphic.clear(); + if (this.entityaLayers.length != 0) { + for (var i in this.entityaLayers) { + sgworld.Viewer.entities.remove(this.entityaLayers[i]); + } + this.entityaLayers = []; + } + + + + }, moreEvent(res) { switch (res) { @@ -955,27 +1369,46 @@ switch (res) { case 1: this.isShowFirstCheck = !this.isShowFirstCheck; + if (this.isShowFirstCheck == false) { + this.checkedDataType = [] + this.dataTypeName = '涓嶉檺'; + this.queryList.showList1 = null; + this.getQueryShowListData(); + } else { + this.dataTypeName = null; + this.checkedDataType = ['涓嶉檺']; + this.queryList.showList1 = null; + this.getQueryShowListData(); + } + break; case 2: this.isShowSecondCheck = !this.isShowSecondCheck; + if (this.isShowSecondCheck == false) { + this.checkedEntryName = [] + this.EntryName = '涓嶉檺'; + this.queryList.showList2 = null; + this.getQueryShowListData(); + } else { + this.EntryName = null; + this.checkedEntryName = ['涓嶉檺'] + this.queryList.showList2 = null; + this.getQueryShowListData(); + } break; } }, getMenuChange(res) { - this.listData.pageSize = 10; - this.listData.pageIndex = 1; + this.getQueryDirTree(); this.formInline.tab = "" switch (res) { case 1: - - this.getDataLibSelectTabs(); this.isMenuActive = true; - + this.getQueryShowListData(); break; case 2: - this.getQueryDirTree(); - this.isMenuActive = false; + this.getQueryShowListData(); break; } }, @@ -986,7 +1419,7 @@ this.$message.error('鍗曚綅鍒楄〃鑾峰彇澶辫触'); return; } - this.queryForm.dirid = 1; + this.formInline.dirid = 1; this.companyOption = this.treeData(res.result); this.getQueryDepTree(); }, @@ -996,9 +1429,12 @@ this.$message.error('鍗曚綅鍒楄〃鑾峰彇澶辫触'); return; } - this.queryForm.depid = 1; + // this.formInline.depid = 1; this.companyOption1 = this.treeData(res.result); - this.getMetaData(); + this.formInline.depid = this.companyOption1[0].code; + this.listData.depcode = this.companyOption1[0].code; + + this.getQueryShowListData(); }, // 鏌ヨ @@ -1008,7 +1444,7 @@ }, // 閲嶇疆鏌ヨ resetInfo(formName) { - this.queryForm.name = ''; + this.formInline.name = ''; this.listData.pageSize = 10; this.listData.pageIndex = 1; this.listData.name = null; @@ -1045,8 +1481,50 @@ 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' @@ -1093,24 +1571,24 @@ this.codeForm.repassword = ''; }, getMetaData() { - this.listData.dirid = this.queryForm.dirid - this.listData.depid = this.queryForm.dirid; + 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.queryForm.dirid = value; + this.formInline.dirid = value; this.getMetaData(); }, handleChange1(value) { - this.listData.pageSize = 10; - this.listData.pageIndex = 1; - this.queryForm.depid = value; - this.getMetaData(); + this.formInline.depid = value; + this.listData.depcode = value; + this.getQueryShowListData(); }, //鏍戝垪琛ㄧ敓鎴� treeData(source) { @@ -1129,13 +1607,7 @@ this.queryInfo(); } }, - restDataLibSelectTabs() { - this.formInline.tab = "" - this.listData.pageIndex = 1; - this.listData.pageSize = 10 - this.searchDataLibSelectTabs(); - }, async getDataLibSelectTabs() { this.listData.tab = this.formInline.tab const data = await dataLib_selectTabs(this.listData); @@ -1143,13 +1615,13 @@ this.$message.error('鍒楄〃璋冪敤澶辫触'); return; } + this.count = data.count; - this.dataType = data.result; + + this.dataTypeList = data.result; }, showDetail1(row) { - this.showinfoBox1 = true; - this.itemdetail1 = row; }, // 鍏抽棴鏌ョ湅 @@ -1179,6 +1651,7 @@ this.getCollapseTable(this.filedsLayer); }, + async showDetail2(res) { var val = res.tab.split("."); const data = await dataLib_selectTabFields({ @@ -1220,7 +1693,7 @@ this.listTypeData.name = res.entity; this.listTypeData.pageIndex = 1; this.listTypeData.pageSize = 10; - this.dialogtitle = res.tabDesc + '(' + res.tab + ')'; + this.dialogtitle = res.tabDesc; this.upAttach.tabName = res.ns + "." + res.tab; this.filedsLayer = this.getCollapseDomFiled(); @@ -1267,6 +1740,7 @@ var token = getToken(); var fs = document.getElementById("insertFile"); if (fs.files.length == 0) { + this.$message({ message: '璇烽�夋嫨瑕佷笂浼犵殑鏂囦欢锛�', type: 'warning' @@ -1345,7 +1819,8 @@ } else { this.listTypeData.filter = null; } - + this.listTypeData.depcode = this.listData.depcode; + this.listTypeData.dirs = this.listData.dirs const data = await dataLib_selectByPage(this.listTypeData); if (data.code != 200) { this.$message.error('璋冪敤鍒楄〃澶辫触,璇疯仈绯诲伐浣滀汉鍛�!'); @@ -1410,6 +1885,7 @@ var data2 = domains.result; this.formInline.fileName = "" var std = []; + this.filedsOption=[]; for (var i in data1) { if (data1[i].type != 'geomtry' && data1[i].type != 'null') { @@ -1548,12 +2024,19 @@ } }, //鍗曚綅杞崲 - stateFormatSizes(row, column) { - if (row.sizes >= 1024) { - const val = parseFloat(row.sizes / 1024).toFixed(3); + 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 row.sizes + ' MB'; + return res + ' MB'; } }, setInfoBoxTime(res) { @@ -1605,28 +2088,67 @@ add0(m) { return m < 10 ? '0' + m : m; }, + async getDataTyeAndEntryName() { + const data = await dataLib_selectProject();//鏌ヨ椤圭洰鍚嶇О + if (data.code != 200) { + this.$message.error('椤圭洰鍒楄〃璋冪敤澶辫触'); + } + + const res = await dataLib_selectBaseType(); //鏌ヨ鍩虹鍦扮悊绫诲埆 + if (res.code != 200) { + this.$message.error('鍩虹鍦扮悊绫诲埆鍒楄〃璋冪敤澶辫触'); + } + const rest = await dataLib_selectBusinessType(); //鏌ヨ涓氬姟绫诲埆 + if (rest.code != 200) { + this.$message.error('涓氬姟绫诲埆鍒楄〃璋冪敤澶辫触'); + } + 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 + }) + } + this.project_name = std; + for (var i in res.result) { + str.push({ + id: res.result[i].key, + name: res.result[i].value + }) + } + for (var i in rest.result) { + str.push({ + id: rest.result[i].key, + name: rest.result[i].value + }) + } + this.data_type = str; + } }, mounted() { this.getDataLibSelectTabs(); this.signGetPublicKey(); + this.getQueryDirTree(); + this.getDataTyeAndEntryName(); }, }; </script> <style lang="less" scoped> .archive { - width: 100%; - height: 100%; - margin: 0; - overflow: hidden; - background: #353539; + width: 98%; + height: 95%; + padding: 1%; + position: relative; + overflow: auto; .top_header { - width: calc(100% - 60px); - height: 70px; + width: calc(100% -20px); + height: 60px; display: flex; - padding: 0 30px; + padding: 0 10px; justify-content: space-between; - border-bottom: 1px solid white; + .top_left { display: flex; align-items: center; @@ -1639,44 +2161,35 @@ 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; - + margin: 5px 30px; + padding-bottom: 5px; + border-bottom: 1px solid #dcdfe6; 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; } @@ -1684,13 +2197,11 @@ 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; @@ -1710,15 +2221,15 @@ 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; + border-top: 1px solid #dcdfe6; + border-left: 1px solid #dcdfe6; + border-right: 1px solid #dcdfe6; font-size: 14px; line-height: 42px; padding: 5px 15px; @@ -1728,13 +2239,19 @@ } } .bottom_right { - width: calc(100% - 320px); + width: 100%; padding: 0px 20px; - max-height: 600px; - overflow-y: auto; - color: white; + height: auto; + + .boxCard { + margin: 1%; + + .cardItem { + margin-bottom: 10px; + } + } li { - border-bottom: 1px solid white; + border-bottom: 1px solid #dcdfe6; padding: 10px 0px; } li:hover { @@ -1745,53 +2262,18 @@ .panerPage { width: 100%; padding: 5px 0px; - bottom: 10px; - position: absolute; display: flex; justify-content: center; } - .box_div { + .menu_div { padding: 5px 15px; margin-left: 10px; display: flex; align-items: center; display: flex; - } - .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; - } + + .menuActive { + color: #409eff; } } @@ -1800,161 +2282,16 @@ 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; - } -} -.elLink { - color: white !important; -} -.el-icon-folder-opened { - color: white; -} - -.contentBox { - height: 550px; - overflow: auto; - color: white; -} -/deep/ .el-dialog { - background: #303030; -} -/deep/.el-range-editor.is-active, -.el-range-editor.is-active:hover, -.el-select .el-input.is-focus .el-input__inner { - border: 1px solid; -} -/deep/.el-dialog__title { - color: white; -} -/deep/ .el-dialog__body { - 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; + /deeep/.el-form-item { + margin-bottom: 0px; } -} -// 璁剧疆杈撳叆妗嗙殑鑳屾櫙鑹层�佸瓧浣撻鑹层�佽竟妗嗗睘鎬ц缃紱 -/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 { - 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; + .el-dialog__wrapper { + z-index: 9999; + } } </style> diff --git a/src/views/Archive/index.vue b/src/views/Archive/index.vue index 32d7c12..48de824 100644 --- a/src/views/Archive/index.vue +++ b/src/views/Archive/index.vue @@ -1,2064 +1,285 @@ <template> - <div - class="archive box_div" - v-loading="loading" - element-loading-background="rgba(0, 0, 0, 0.8)" - > - <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 + 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="menu_div" - v-for="(item, index) in showList" - :key="index" - @click="changeListDataType(item)" - > - - <div - :class="{menuActive:dataTypeName == item.name}" - style="margin-left: 5px" - >{{ item.name }}</div> - </div> - </div> - - <div class="box_right"> - <div - class="menu_div subpage_Div" - @click="moreEvent(1)" - > - {{ $t('synthesis.more') }} - </div> - <div - class="menu_div subpage_Div " - @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="menu_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="menu_div subpage_Div" - @click="moreEvent(2)" - > - {{ $t('synthesis.more') }} - </div> - <div - class="menu_div subpage_Div" - @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="menu_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 #dcdfe6"> - 鏂囦欢鏁版嵁婧� - </li> - </ul> - </div> - </div> - - <div class="bottom_right" > - <div class="inquire subpage_Div center " ref="container" style="padding: 10px;align-self: center"> - <el-form - :inline="true" - :model="formInline" - class="demo-form-inline" - ref="sizeForm" - label-width="68px" + <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 style="padding-right: 10px"> - <el-cascader - v-model="formInline.depid" - :show-all-levels="false" - :options="companyOption1" - @change="handleChange1" - :props="{ - label: 'name', - value: 'code', - children: 'children', - checkStrictly: true, - emitPath: false, - }" - ></el-cascader> - </el-form-item> - <el-form-item style="padding-right: 50px"> - <el-input - v-model="formInline.tab" - suffix-icon="el-icon-search" - :placeholder="$t('common.pleaseInput')" - ></el-input> - </el-form-item> - - <el-form-item style="padding-right: 40px"> - <el-button - type="primary" - icon="el-icon-search" - @click="searchDataLibSelectTabs" - size="medium" - >{{$t('common.iquery')}}</el-button> - <!-- </el-form-item> - <el-form-item style="padding-right: 10px">--> - <el-button - icon="el-icon-refresh" - @click="restDataLibSelectTabs" - type="info" - size="medium" - style=" - background: #a3a5a6; - border: 1px solid #a3a5a6; - color: white; " - >{{ $t('common.reset') }}</el-button> -<!-- </el-form-item> - <el-form-item style="padding-right: 10px">--> - <el-button - type="success" - icon="el-icon-search" - @click="getSpaceMapVisibale" - size="medium" - >{{ $t('synthesis.rangequery') }}</el-button> -<!-- </el-form-item> - <el-form-item style="padding-right: 10px">--> - <el-button - icon="el-icon-download" - type="warning" - @click="getdownloadList" - size="medium" - >{{ $t('synthesis.DownloadList') }}</el-button> - </el-form-item> - </el-form> - </div> - <div v-if="isMenuActive"> - <ul> - <li - v-for="(item, index) in dataTypeList" - :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" + :placeholder="$t('archiveObj.label4')" + @change="categorySelectChange('orgName','org',categoryOptions)" + > + <el-option + v-for="item in categoryOptions" + :key="item.value" + :label="item.value" + :value="item.key" > - <div - class="menu_div" - @click="getShowTable(item)" - > - {{ item.tabDesc }} <span style="margin-left:20px">{{item.rows}}鏉�</span> - </div> - </li> - </ul> - </div> + </el-option> + </el-select> + </el-form-item> + <!-- 椤圭洰鍚嶇О --> + <el-form-item :title="$t('archiveObj.dataClass')"> + <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" + > + <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"> + <el-button + type="primary" + size="small" + icon="el-icon-search" + >{{$t('synthesis.rangequery')}}</el-button> + + </el-form-item> + <el-form-item style="float:right"> + <el-button + type="info" + size="small" + icon="el-icon-refresh" + >{{$t('common.reset')}}</el-button> + + </el-form-item> + </el-form> + </div> + <div class="contBox"> + <div 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'">{{item.name}}</span> + <span>{{item.tabDesc}}</span> <div style="float: right; padding: 3px 0"> <i - @click="showDetail1(item)" class="el-icon-tickets" + :title="$t('common.details')" + @click="setCardDetails(item)" ></i> <i + v-show="formInline.dataType=='type2'" style="margin-left:10px" - @click="setFileDownload(item)" class="el-icon-download" + :title="$t('common.download')" + ></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.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.row')}} : {{ item.rows }} </div> + <!-- <div class="cardItem"> {{$t('archiveObj.storageType')}} : {{ item.tableType }} </div> --> + + </div> </el-card> </div> + + </div> + <div class="archBottomBox"> + + <div class="pagination_box"> + <el-pagination + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + :current-page="listData.pageIndex" + :page-sizes="[10, 20, 50, 100]" + :page-size="listData.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="listData.count" + > + </el-pagination> + </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, 50, 100]" - :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="10vh" - :modal="false" - style="z-index:999" - :before-close="handleClose" - > - <!-- 鏉′欢--> - <el-dialog - width="37%" - :visible.sync="conditionVisible" - :modal="false" - title="鏌ヨ鏉′欢" - :before-close="handleconditionClose" - > - <el-form - :inline="true" - :model="formSql" - class="demo-form-inline" - > - <el-form-item> - <el-select - :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 - :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 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" - > - <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" - :modal="false" - > - <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')}}</el-link> - </el-col> - <el-col :span="3"> - <el-link - class="elLink" - :underline="false" - @click="setAttachDel" - >{{$t('common.delete')}}</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> - <el-dialog - :title="$t('common.passworld')" - :visible.sync="downloadLogVisible" - width="30%" - top="10vh" - :modal="false" - :show-close="false" - :before-close="handleCloseDown" - > - <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="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> - <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="success" - size="small" - icon="el-icon-plus" - >{{$t('common.append')}}</el-button> - </el-form-item> - <el-form-item> - <el-button - @click="submitForm()" - type="primary" - size="small" - icon="el-icon-search" - >{{$t('common.iquery')}}</el-button> - </el-form-item> - <el-form-item> - <el-button - type="info" - size="small" - @click="resetForm()" - icon="el-icon-search" - >{{$t('common.reset')}}</el-button> - </el-form-item> - <el-form-item> - <el-button - type="warning" - size="small" - @click="downloadForm()" - icon="el-icon-download" - >{{$t('common.download')}}</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" - > - <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="120" - 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, 50, 100]" - :page-size="listTypeData.pageSize" - layout="total, sizes, prev, pager, next, jumper" - :total="count1" - > - </el-pagination> - </div> - </div> - </div> - </el-dialog> - <div - class="downloadBox box_div subpage_Div" - 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" - width="30%" - > - <div class="contentBox"> - <p>{{ $t('dataManage.vmobj.name') }}锛歿{ itemdetail1.name }}</p> - <el-divider></el-divider> - <p>{{ $t('dataManage.vmobj.format') }}锛歿{ itemdetail1.type }}</p> - <el-divider></el-divider> - <p>{{ $t('common.size') }}锛歿{ setInfoBoxSize(itemdetail1.sizes) }}</p> - <el-divider></el-divider> - <p>{{ $t('dataManage.vmobj.depName') }}锛歿{ itemdetail1.depName }}</p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.gather') }}锛歿{ - setInfoBoxTime(itemdetail1.gather) - }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.describe') }}锛歿{ itemdetail1.describe }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.createonuser') }}锛歿{ itemdetail1.uname }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.createontime') }}锛歿{ - setInfoBoxTime(itemdetail1.createTime) - }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.updateonuser') }}锛歿{ - itemdetail1.updateUser - }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.updateontime') }}锛歿{ - setInfoBoxTime(itemdetail1.updateTime) - }} - </p> - </div> - </el-dialog> - <el-dialog - title="鎵归噺涓嬭浇" - :visible.sync="batchDownloadVisible" - width="90%" - top="5vh" - :before-close="batchDownloadClose" - > - <div - style="float:right;margin-right:10px" - @click="downBatchFormData()" - ><i class="el-icon-download"></i></div> - <div style="height:580px"> - - <el-table - :data="tableData2" - style="width: 100%" - @selection-change="handleSelectionChange1" - height="500px" - > - <el-table-column - type="selection" - width="55" - /> - <el-table-column - prop="name" - :label="$t('dataManage.vmobj.name')" - /> - <el-table-column - prop="type" - :label="$t('dataManage.vmobj.format')" - /> - <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')"> - <template slot-scope="scope"> - <a @click="showDetail2(scope.row)">{{ - scope.row.tab - }}</a> - </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"> - <el-pagination - @size-change="batchSizeChange" - @current-change="batchCurrentChange" - :current-page="batchPage.pageIndex" - :page-sizes="[10, 20, 50, 100]" - :page-size="batchPage.pageSize" - layout="total, sizes, prev, pager, next, jumper" - :total="batchPage.count" - > - </el-pagination> - </div> - </div> - </div> - </el-dialog> - <el-dialog - :title=" $t('synthesis.rangequery')" - :visible.sync="dialogMapVisible" - width="90%" - top="10vh" - > - <div style="height:700px"> - <map-sdk v-if='showMapVisible'></map-sdk> - </div> - </el-dialog> - <el-dialog - :visible.sync="downloadListVisible" - width="90%" - top="10vh" - > - <div style="height:700px"> - <el-table - :data="downloadTableData" - style="width: 100%" - > - <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> - <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> - </el-dialog> - <iframe - id="downFrame" - src="" - style="display: none; border: 0; padding: 0; height: 0; width: 0" - ></iframe> </div> </template> <script> -import { flatten } from '@turf/turf'; -import { conditions } from './Archive.js' -import { - dataLib_selectTabs, - dataLib_selectFields, - dataLib_selectDomains, - dataLib_selectByPage, - 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_selectPageCountForDownload, -} 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 MyBread from "../../components/MyBread.vue"; +import { selectdepTab, dataLib_selectProject, dataLib_selectDirTypes, dataLib_selectByPageForMeta, dataLib_selectTabs } from '../../api/api'; export default { components: { MyBread, - MapSdk }, data() { - var repasswordValidator = (rule, value, callback) => { - if (value === '') { - callback(new Error('璇峰啀娆¤緭鍏ュ瘑鐮�')); - } else if (value !== this.codeForm.password) { - callback(new Error('涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!')); - } else { - callback(); - } - }; - var passwordValidator = (rule, value, callback) => { - var passwordreg = - /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![a-z0-9]+$)(?![a-z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![0-9\W!@#$%^&*`~()\\-_+=,.?;<>]+$)[a-zA-Z0-9\W!@#$%^&*`~()\\-_+=,.?;<>]{12,20}$/; - if (!passwordreg.test(value)) { - callback( - new Error('瀵嗙爜蹇呴』鐢辨暟瀛椼�佸瓧姣嶃�佺壒娈婂瓧绗︾粍鍚�,璇疯緭鍏�13-20浣�') - ); - } else { - callback(); - } - }; return { - dataTypeList: [], - loading: false, - downloadLogVisible: false, - downloadListVisible: false, - data_type: [], - project_name: [], - checkedDataType: [], - checkedEntryName: [], - dataTypeName: '涓嶉檺', - EntryName: '涓嶉檺', - conditionVisible: false, - formSql: { - field: '', - condition: '', - value: '', - type: '', - date: '', - - }, - fromSqlflag: false, - filedsOption: [], - condOption: [], - formInline: { - tab: '', fileName: '', dirid: null, - depid: null, + dataType: "type2", //鏁版嵁绫诲瀷 + category: [], //鏌ヨ绫诲埆, + item: [], + depcode: null, //鍗曚綅, + depName: null,//鍗曚綅, + keywords: '', }, - 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, + categoryOptions: [], + itemOptions: [], + depOption: [],//鍗曚綅鍒楄〃 + defaultProps: { + label: "name", + value: "id", }, listData: { pageIndex: 1, pageSize: 10, - depcode: null, - dirs: null, - tab: null - }, - count: 0, - count1: 0, - dialogtitle: null, - ruleForm: { - textarea: '', - }, - rules: { - password: [{ required: true, message: '璇疯緭鍏ュ瘑鐮�', trigger: 'blur' }, { validator: passwordValidator, trigger: 'blur' }], - repassword: [ - { required: true, message: '璇疯緭鍏ョ‘璁ゅ瘑鐮�', trigger: 'blur' }, - { validator: repasswordValidator, trigger: 'blur' }, - ], - }, - upAttach: { - tabName: null, - eventid: null, - }, - batchPage: { - pageIndex: 1, - pageSize: 10, - count: 0 - }, - downloadTableData: [], - downloadPage: { - pageIndex: 1, - pageSize: 10, count: 0, - name: null, }, - queryList: { - showList1: '', - showList2: '' - } + monthdata: [ + ] }; }, - 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; - } - }, + mounted() { + this.getDepTreeData(); + this.getCategorySelectData(); + this.getItemSelectData(); + this.getAllTabesData(); }, methods: { - handleCloseDown() { + //鍗$墖璇︽儏鐐瑰嚮浜嬩欢 + setCardDetails(res) { }, - 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; - } - this.downloadLogVisible = false; - - var obj = { - entities: [this.listTypeData.name], // bpachydrogeology,bhydrogeologyattach - filter: this.listTypeData.filter, - pwd: encrypt.encrypt(this.codeForm.password), - depcodes: [this.listData.depcode], - dirs: this.listData.dirs - - }; - this.loading = true; - var that = this; - $.ajax({ - url: BASE_URL + "/dataLib/downloadEntityReq?token=" + getToken(), - type: "POST", - data: JSON.stringify(obj), - dataType: 'json', // html銆乯son銆乯sonp銆乻cript銆乼ext - contentType: "application/json", // "application/x-www-form-urlencoded" - success: (data) => { - if (data.code == 200) { - that.downloadflie(data, this.codeForm.password) - - } - }, - error: function (e) { - } - }); - }, - downloadflie(data, pwd) { - this.codeForm = { - password: '', - repassword: '', - } - 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; - }, - closeDown1() { - this.codeForm = { - password: '', - repassword: '', - } - this.downloadLogVisible = false; - }, - downloadForm() { - this.downloadLogVisible = true; - }, - 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(); - }, - 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(); - }, - async getdownloadListData() { - const data = await dataLib_selectPageCountForDownload(this.downloadPage); - if (data.code != 200) { - this.downloadListVisible = false; - return this.$message.error('涓嬭浇鍒楄〃鑾峰彇澶辫触'); - } - - this.downloadTableData = data.result; - - this.downloadPage.count = data.count; - }, - 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); - } - } - } - var std = ""; - for (var i in this.checkedEntryName) { - for (var j in this.showList1) { - if (this.showList1[j].name == this.checkedEntryName[i]) { - if (std.length != 0) { - std += "," - } - std += this.showList1[j].id - } - } - } - this.queryList.showList2 = std; - - this.getQueryShowListData(); - }, - 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); - } - } - } - var std = ""; - for (var i in this.checkedDataType) { - for (var j in this.showList) { - if (this.showList[j].name == this.checkedDataType[i]) { - if (std.length != 0) { - std += "," - } - std += this.showList[j].id - } - } - } - this.queryList.showList1 = std; - this.getQueryShowListData(); - }, - changeListDataType(res) { - if (this.isShowFirstCheck == false) { - this.dataTypeName = res.name; - this.queryList.showList1 = res.id; - this.getQueryShowListData(); - } - }, - - getQueryShowListData() { - var a1 = ""; - if (this.queryList.showList1 != "" && this.queryList.showList1 != null) { - a1 = this.queryList.showList1; - } - if (this.queryList.showList2 != "" && this.queryList.showList2 != null) { - if (a1.length != 0) { - a1 += "," - } - a1 += this.queryList.showList2; - } - this.listData.dirs = a1; + //瀛樺偍绫诲瀷鍒囨崲 + setDataTypeChange() { this.listData.pageIndex = 1; this.listData.pageSize = 10; - if (this.isMenuActive == true) { - this.getDataLibSelectTabs() - } else { - this.queryInfo(); - } - - + this.getAllTabesData(); }, - - restDataLibSelectTabs() { - this.formInline.tab = "" - this.queryList = { - showList1: null, - showList2: null, - } - this.formInline.depid = this.companyOption1[0].code; - this.listData.depcode = this.companyOption1[0].code; - this.checkedDataType = [] - this.dataTypeName = '涓嶉檺'; - this.dataTypeName = null; - this.checkedDataType = ['涓嶉檺']; - this.isShowFirstCheck = false - this.checkedDataType = [] - this.dataTypeName = '涓嶉檺'; - this.queryList.showList1 = null; - this.isShowSecondCheck = false; - this.checkedEntryName = [] - this.EntryName = '涓嶉檺'; - this.queryList.showList2 = null; - this.getQueryShowListData(); - }, - - - changeListEntryName(res) { - if (this.isShowSecondCheck == false) { - this.EntryName = res.name; - this.queryList.showList2 = res.id; - this.getQueryShowListData(); - } - }, - 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; - sgworld.Creator.SimpleGraphic.clear(); - if (this.entityaLayers.length != 0) { - for (var i in this.entityaLayers) { - sgworld.Viewer.entities.remove(this.entityaLayers[i]); - } - this.entityaLayers = []; - } - - - - - }, - 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 = '涓嶉檺'; - this.queryList.showList1 = null; - this.getQueryShowListData(); - } else { - this.dataTypeName = null; - this.checkedDataType = ['涓嶉檺']; - this.queryList.showList1 = null; - this.getQueryShowListData(); - } - - break; - case 2: - this.isShowSecondCheck = !this.isShowSecondCheck; - if (this.isShowSecondCheck == false) { - this.checkedEntryName = [] - this.EntryName = '涓嶉檺'; - this.queryList.showList2 = null; - this.getQueryShowListData(); - } else { - this.EntryName = null; - this.checkedEntryName = ['涓嶉檺'] - this.queryList.showList2 = null; - this.getQueryShowListData(); - } - break; - } - }, - getMenuChange(res) { - this.getQueryDirTree(); - this.formInline.tab = "" - switch (res) { - case 1: - this.isMenuActive = true; - this.getQueryShowListData(); - break; - case 2: - this.isMenuActive = false; - this.getQueryShowListData(); - 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.formInline.depid = this.companyOption1[0].code; - this.listData.depcode = this.companyOption1[0].code; - - this.getQueryShowListData(); - }, - - // 鏌ヨ - 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() { - - 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.formInline.depid = value; - this.listData.depcode = value; - this.getQueryShowListData(); - }, - //鏍戝垪琛ㄧ敓鎴� - 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) : ''; // 缁欑埗绾ф坊鍔犱竴涓猚hildren灞炴�э紝骞惰祴鍊� - return father.pid == 0; // 杩斿洖涓�绾ц彍鍗� - }); - }, - searchDataLibSelectTabs() { - if (this.isMenuActive == true) { - this.getDataLibSelectTabs() - } else { - this.queryInfo(); - } - }, - - async getDataLibSelectTabs() { - this.listData.tab = this.formInline.tab - const data = await dataLib_selectTabs(this.listData); - if (data.code != 200) { - this.$message.error('鍒楄〃璋冪敤澶辫触'); - return; - } - - this.count = data.count; - - this.dataTypeList = 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] - }) - if (data.code != 200) { - 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; - - }, - 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; - 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], - }); - } - this.itemdetail = std; - this.innerVisible = true; - }, - getAttachTable(index, row) { - if (row.eventid != null) { - this.upAttach.eventid = row.eventid; - } else { - this.upAttach.eventid = ""; - } - this.outerVisible = true; - this.getAttacthFlieList(); - }, - async setAttachDel() { - var std = []; - for (var i in this.attacgSelection) { - std.push(this.attacgSelection[i].id); - } - const res = await dataLib_deletes({ ids: std.toString() }); - if (res.code != 200) { - this.$message.error('鏂囦欢鍒犻櫎澶辫触'); - } - this.getAttacthFlieList(); - }, - setAttachInsert() { - var token = getToken(); - var fs = document.getElementById("insertFile"); - if (fs.files.length == 0) { - - this.$message({ - message: '璇烽�夋嫨瑕佷笂浼犵殑鏂囦欢锛�', - type: 'warning' - }); - return; - } - const formData = new FormData() - for (var i = 0, c = fs.files.length; i < c; i++) { - - formData.append('file', fs.files[i]); // fs.files[i].name,file - } - - $.ajax(BASE_URL + "/dataQuery/uploadFiles?token=" + token + "&tabName=" + this.upAttach.tabName + "&eventid=" + this.upAttach.eventid, { - type: "post", - data: formData, - async: true, - cache: false, - processData: false, - contentType: false, - success: (rs) => { - this.$message({ - message: '闄勪欢娣诲姞鎴愬姛', - type: 'success' - }); - document.getElementById("insertFile").value = ""; - this.fromfile = { - file: '', - } - this.getAttacthFlieList(); - }, - error: (e) => { - document.getElementById("insertFile").value = ""; - this.fromfile = { - file: '', - } - this.$message.error('闄勪欢娣诲姞澶辫触'); - } - }); - }, - - - async getAttacthFlieList() { - var obj = this.upAttach; - const res = await dataLib_selectFiles(obj); - if (res.code != 200) { - this.$message.error('鍒楄〃璋冪敤澶辫触'); - return - } - this.tableAttach = res.result; - }, - //闄勪欢=>鏂囦欢閫夋嫨 - getInsertFile() { - $('#insertFile').click(); - }, - insertFile() { - var val = document.getElementById('insertFile').files; - if (!val || !val.length) return; - - this.fromfile.file = val[0].name; - }, - handleSelectionChange1(val) { - this.multipleSelection1 = val; - }, - handleSelectionChange(val) { - this.multipleSelection = val; - }, - handleAttatchChange(val) { - this.attacgSelection = val; - }, - async getCollapseTable(res) { - res.then((val) => { - this.attributeData = val; - }); - if (this.formInline.fileName != "") { - this.listTypeData.filter = this.formInline.fileName; - } else { - this.listTypeData.filter = null; - } - this.listTypeData.depcode = this.listData.depcode; - this.listTypeData.dirs = this.listData.dirs - const data = await dataLib_selectByPage(this.listTypeData); - 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; - }, - //鍒嗛〉鐐瑰嚮浜嬩欢 - 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('鍒楄〃璋冪敤澶辫触'); - 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 = []; - this.filedsOption=[]; - 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.startFiledAndcondition(); - return std; - }, - - 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], - }) - } - this.formSql.condition = this.condOption[0].value - }, - appendQueryFilter() { - if (this.formSql.type == "date" || this.formSql.type == "datetime") { - if (this.formSql.date == null) { - this.$message.error('璇疯緭鍏ヨ鏌ヨ鐨勪俊鎭�!'); - return; - } - } else { - if (this.formSql.value == "") { - this.$message.error('璇疯緭鍏ヨ鏌ヨ鐨勪俊鎭�!'); - return; - } - } - - if (this.formInline.fileName != "") { - this.formInline.fileName += " and "; - } - var val; - - if (this.formSql.type == "long" || this.formSql.type == "integer") { - - val = parseInt(this.formSql.value); - } else if (this.formSql.type == 'double') { - - if (this.formSql.value.indexOf(".") != -1) { - val = this.formSql.value; - } else { - val = parseFloat(this.formSql.value).toFixed(1) - } - } else if (this.formSql.type == "date" || this.formSql.type == "datetime") { - var time = new Date(this.formSql.date); - var m = time.getMonth() + 1; - var d = time.getDate(); - var y = time.getFullYear(); - val = "'" + y + - '-' + - this.add0(m) + - '-' + - this.add0(d) + "'"; - } else { - val = "'" + this.formSql.value + "'"; - } - this.formInline.fileName += this.formSql.field + " " + this.formSql.condition + " " + val; - - this.startFiledAndcondition(); - }, - startFiledAndcondition() { - this.conditionVisible = false; - this.conditionChange(this.filedsOption[0]); - this.formSql.value = ""; - this.formSql.date = new Date(); - }, - handleconditionClose() { - this.$confirm('纭鍏抽棴锛�') - .then(_ => { - this.startFiledAndcondition(); - }) - .catch(_ => { }); - }, - - - - //鍊煎煙瀛楁鍖归厤 - getDomainNaFild(res, result) { - for (var i in result) { - if (result[i].domName == res) { - return result[i].codeDesc; - } - } - return null; - }, - handleSizeChange(res) { - this.listData.pageIndex = 1; - this.listData.pageSize = res; - if (this.isMenuActive == false) { this.getMetaData() } else { this.getDataLibSelectTabs() } - }, - 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) { @@ -2088,210 +309,174 @@ add0(m) { return m < 10 ? '0' + m : m; }, - async getDataTyeAndEntryName() { + stateFormatSizes(res) { + if (res >= 1024) { + const val = parseFloat(res / 1024).toFixed(3); + return val + ' GB'; + } else { + return res + ' MB'; + } + }, + + handleSizeChange(val) { + this.listData.pageIndex = 1; + this.listData.pageSize = val; + this.getAllTabesData(); + + }, + handleCurrentChange(val) { + this.listData.pageIndex = val; + this.getAllTabesData(); + }, + + + //鏌ヨ鏁版嵁搴撴暟鎹� + async getQueryBankData() { + const data = await dataLib_selectTabs(this.listData); + if (data.code != 200) { + this.$message.error('鏁版嵁搴撳垪琛ㄨ皟鐢ㄥけ璐�'); + return; + } + var val = data.result; + val = val.filter((res) => { + + res.mold = "鏁版嵁搴�" + res.isShow = false + return res; + }) + this.listData.count = data.count; + this.monthdata = data.result; + }, + //鏌ヨ鏂囦欢鏁版嵁 + async getQueryFileData() { + const data = await dataLib_selectByPageForMeta(this.listData); + if (data.code != 200) { + this.$message.error('鏂囦欢鏁版嵁鍒楄〃璋冪敤澶辫触'); + } + var val = data.result; + val = val.filter((res) => { + var type = "." + res.type; + res.name = res.name.replaceAll(type, "") + res.mold = "鏂囦欢" + res.isShow = false + return res; + }) + this.monthdata = val; + this.listData.count = data.count; + }, + //鏌ヨ鏁版嵁 + getAllTabesData() { + switch (this.formInline.dataType) { + case "type2"://鏂囦欢鏁版嵁 + this.getQueryFileData(); + break; + case "type1"://鏁版嵁搴撴暟鎹� + this.getQueryBankData(); + break; + } + }, + //椤圭洰鍚嶇О鏁版嵁 + async getItemSelectData() { const data = await dataLib_selectProject();//鏌ヨ椤圭洰鍚嶇О if (data.code != 200) { - this.$message.error('椤圭洰鍒楄〃璋冪敤澶辫触'); + this.$message.error('椤圭洰鍚嶇О鍒楄〃璋冪敤澶辫触'); } + this.itemOptions = data.result; + }, + //鑾峰彇璧勬枡绫诲埆鏁版嵁 + async getCategorySelectData() { + const data = await dataLib_selectDirTypes(); + if (data.code != 200) { + this.$message.error('璧勬枡绫诲埆鍒楄〃璋冪敤澶辫触'); + } + this.categoryOptions = data.result; - const res = await dataLib_selectBaseType(); //鏌ヨ鍩虹鍦扮悊绫诲埆 - if (res.code != 200) { - this.$message.error('鍩虹鍦扮悊绫诲埆鍒楄〃璋冪敤澶辫触'); + }, + //鍏抽敭瀛楁煡璇� + setSearchKeyWords() { + }, + //鍗曚綅鏀瑰彉鍊艰Е鍙� + depChange(data, node, nodeData) { + this.formInline.depcode = data.code; + this.formInline.depName = data.name; + }, + //璧勬枡绫诲埆涓嬫媺妗嗗�兼敼鍙樿Е鍙� + categorySelectChange(model, prop, options) { + + }, + // 椤圭洰鍚嶇О涓嬫媺妗嗗�兼敼鍙樿Е鍙� + itemSelectChange(model, prop, options) { + + }, + //鑾峰彇鍗曚綅鍒楄〃 + async getDepTreeData() { + const data = await selectdepTab(); + if (data.code != 200) { + return this.$message.error('鍗曚綅鍒楄〃鑾峰彇澶辫触'); } - const rest = await dataLib_selectBusinessType(); //鏌ヨ涓氬姟绫诲埆 - if (rest.code != 200) { - this.$message.error('涓氬姟绫诲埆鍒楄〃璋冪敤澶辫触'); - } - 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 - }) - } - this.project_name = std; - for (var i in res.result) { - str.push({ - id: res.result[i].key, - name: res.result[i].value - }) - } - for (var i in rest.result) { - str.push({ - id: rest.result[i].key, - name: rest.result[i].value - }) - } - this.data_type = str; - } - }, - mounted() { - this.getDataLibSelectTabs(); - this.signGetPublicKey(); - this.getQueryDirTree(); - this.getDataTyeAndEntryName(); - }, + this.depOption = this.treeData(data.result); + this.formInline.depcode = this.depOption[0].code + this.formInline.depName = this.depOption[0].name; + }, + //鏍戝垪琛ㄧ敓鎴� + 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) : ""; // 缁欑埗绾ф坊鍔犱竴涓猚hildren灞炴�э紝骞惰祴鍊� + return father.pid == 0; // 杩斿洖涓�绾ц彍鍗� + }); + }, + } }; </script> <style lang="less" scoped> .archive { - width: 98%; - height: 95%; - padding: 1%; + width: calc(100% - 20px); + height: calc(100% - 20px); + padding: 10px; position: relative; overflow: auto; - .top_header { - width: calc(100% -20px); - height: 60px; - display: flex; - padding: 0 10px; - justify-content: space-between; - .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 { - margin: 0 5px; - } - } - .box_item { - width: calc(100% - 60px); - height: auto; - margin: 5px 30px; - padding-bottom: 5px; - border-bottom: 1px solid #dcdfe6; - align-items: center; - display: flex; - float: left; - .box_left { - height: 100%; - line-height: 100%; - width: 100px; - text-align: center; - - font-size: 14px; - font-weight: 400; - } - .box_cont { - height: 100%; - width: 80%; - display: flex; - flex-wrap: wrap; - /* 璁剧疆澶氳瀵归綈 */ - align-content: flex-start; - - font-size: 14px; - font-weight: 400; - } - .box_right { - display: flex; - justify-content: space-between; - margin-left: 10px; - - font-size: 14px; - align-self: flex-start; - font-weight: 400; - - .box_menu:hover { - border: 1px solid #009cff; - color: #009cff; - } - } - } - .bottom_content { - width: calc(100% - 60px); - - height: auto; - padding: 10px 30px; - + .menu_top { display: flex; justify-content: space-between; - .bottom_left { - width: 270px; - font-size: 14px; - font-weight: 400; - align-self: flex-start; - - ul { - margin-left: 10px; - } - li { - height: 42px; - border-top: 1px solid #dcdfe6; - border-left: 1px solid #dcdfe6; - border-right: 1px solid #dcdfe6; - font-size: 14px; - line-height: 42px; - padding: 5px 15px; - } - .menuActive { - color: #409eff; - } - } - .bottom_right { - width: 100%; - padding: 0px 20px; - height: auto; - - .boxCard { - margin: 1%; - - .cardItem { - margin-bottom: 10px; - } - } - li { - border-bottom: 1px solid #dcdfe6; - padding: 10px 0px; - } - li:hover { - color: #409eff; - } - } } - .panerPage { + .iquery { width: 100%; - padding: 5px 0px; - display: flex; - justify-content: center; + padding-top: 10px; } - .menu_div { - padding: 5px 15px; - margin-left: 10px; - display: flex; + .contBox { + width: 100%; + min-height: calc(100% - 111px); + flex-direction: column; align-items: center; + justify-content: space-between; display: flex; - .menuActive { - color: #409eff; + .archTopBox { + width: 100%; + .cardItem { + margin-bottom: 10px; + margin-left: 20px; + } + } + .archBottomBox { + width: 100%; + display: flex; + justify-content: center; } } - - .downloadBox { - position: absolute; - top: 20%; - left: 40%; - padding: 20px; - - width: 30%; - - border-radius: 10px; + /deep/.el-card__body { + padding: 0px !important; } - /deeep/.el-form-item { - margin-bottom: 0px; + /deep/.el-card { + margin-bottom: 10px !important; } - .el-dialog__wrapper { - z-index: 9999; + .show { + display: none; } } </style> -- Gitblit v1.9.3