From 54837b203b8d23c01e0e6cf716cb6a3829ae60f6 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期四, 22 十二月 2022 19:48:07 +0800 Subject: [PATCH] 数据检索,关键字查询,空间查询,专题图添加mpt, --- src/views/Archive/index.vue | 1189 ++++++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 811 insertions(+), 378 deletions(-) diff --git a/src/views/Archive/index.vue b/src/views/Archive/index.vue index eb3699a..850ca5b 100644 --- a/src/views/Archive/index.vue +++ b/src/views/Archive/index.vue @@ -2,12 +2,14 @@ <div class="archive"> <div class="top_header"> <div class="top_left"> - <My-bread - :list="[`${$t('synthesis.synthesis')}`, `${$t('synthesis.archive')}`]" - ></My-bread> + <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 + :inline="true" + :model="formInline" + class="demo-form-inline" + > <el-form-item> <el-input v-model="formInline.tab" @@ -16,22 +18,33 @@ ></el-input> </el-form-item> <el-form-item> - <el-button icon="el-icon-search" @click="searchDataLibSelectTabs" class="primaries">{{ + <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">{{ + <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">{{ + <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"> @@ -74,13 +87,16 @@ </div> </div> </div> --> - <div class="bottom_content"> + <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 + @click="getMenuChange(1)" + :class="{ menuActive: isMenuActive }" + > 鏁版嵁搴� </li> <li @@ -93,36 +109,67 @@ </ul> </div> </div> - <div v-if="isMenuActive" class="bottom_right"> + <div + v-if="isMenuActive" + class="bottom_right" + > <ul> - <li v-for="(item, index) in dataType" :key="index"> - <div class="box_div" @click="getShowTable(item)"> + <li + v-for="(item, index) in dataType" + :key="index" + > + <div + class="box_div" + @click="getShowTable(item)" + > {{ item.tabDesc }} ({{ item.tab }}) </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="{ + <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 :label="$t('dataManage.vmobj.keyword')" > + ></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-form-item> <el-button @click="queryInfo()" icon="el-icon-search" @@ -131,7 +178,7 @@ >{{ $t('common.iquery') }}</el-button > </el-form-item> --> - <!-- <el-form-item> + <!-- <el-form-item> <el-button @click="resetInfo('queryForm')" icon="el-icon-refresh" @@ -140,95 +187,103 @@ >{{ $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-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="detail(scope.row)" >{{ + <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> + </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)">{{ + <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 + <!-- <el-link @click="editInfo(scope.row)" style="margin-left: 10px; color: white" >{{ $t('common.edit') }}</el-link > --> - </template> - </el-table-column> - </el-table> + </template> + </el-table-column> + </el-table> </div> </div> - <div class="panerPage" > + <div class="panerPage"> <div class="pagination_box"> <el-pagination @size-change="handleSizeChange" @@ -249,7 +304,74 @@ top="10vh" :before-close="handleClose" > - <el-dialog width="30%" :visible.sync="innerVisible" append-to-body> + <!-- 鏉′欢--> + <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"> @@ -262,96 +384,166 @@ </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="height: 700px"> - <el-form ref="ruleForm" :model="ruleForm" :inline="true"> - <el-form-item :label="$t('dataManage.vmobj.keyword')" prop="name"> + <!-- 瑭虫儏--> + <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="ruleForm.name" + 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-button icon="el-icon-search" @click="submitForm('ruleForm')" class="primary" size="small">{{ - $t('common.iquery') - }}</el-button> - <el-button icon="el-icon-refresh" @click="resetForm('ruleForm')" type="info" size="small">{{ - $t('common.reset') - }}</el-button> + <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="height: 700px"> + <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" /> <el-table ref="filterTable" :data="tableData" - height="78%" + height="76%" border style="width: 100%" @selection-change="handleSelectionChange" > - <el-table-column type="selection" align="center" width="55" /> + <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" @@ -362,6 +554,7 @@ align="center" ></el-table-column> <el-table-column + v-if="isMenuActive" min-width="80" align="center" :label="$t('common.operate')" @@ -370,14 +563,12 @@ <el-link class="elLink" @click="showDetail(scope.$index, scope.row)" - >{{ $t('common.details') }}</el-link - > + >{{ $t('common.details') }}</el-link> <el-link class="elLink" @click="getAttachTable(scope.$index, scope.row)" style="margin-left: 20px" - >{{ $t('common.enclosure') }}</el-link - > + >{{ $t('common.enclosure') }}</el-link> </template> </el-table-column> </el-table> @@ -397,7 +588,10 @@ </div> </div> </el-dialog> - <div class="downloadBox" v-if="showCodeBox"> + <div + class="downloadBox" + v-if="showCodeBox" + > <h4 style="padding: 20px">{{$t('common.passworld')}}</h4> <el-form :model="codeForm" @@ -406,27 +600,54 @@ 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 + :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 + :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-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> - <div class="infoBox" v-show="showinfoBox1"> + <div + class="infoBox" + v-show="showinfoBox1" + > <el-card class="box-card"> - <div slot="header" class="clearfix"> + <div + slot="header" + class="clearfix" + > <span>{{ $t('common.details') }}</span> - <div style="float: right; cursor: pointer" @click="closeDetial"> + <div + style="float: right; cursor: pointer" + @click="closeDetial" + > <i class="el-icon-close"></i> </div> </div> @@ -474,20 +695,26 @@ </el-card> </div> <el-dialog - :title=" $t('synthesis.rangequery')" - :visible.sync="dialogMapVisible" - width="90%" - :before-close="handleMapClose"> -<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> + :title=" $t('synthesis.rangequery')" + :visible.sync="dialogMapVisible" + width="90%" + :before-close="handleMapClose" + > + <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, @@ -498,8 +725,11 @@ dataLib_selectByPageForMeta, dataLib_selectDownloadFile, dataLib_downloadReq, + dataLib_selectTabFields, sign_getPublicKey, + dataLib_selectDbData, selectdirTab, + selectdepTab, deleteMeta, } from '../../api/api'; import $ from 'jquery' @@ -513,7 +743,7 @@ MapSdk }, data() { - var repasswordValidator = (rule, value, callback) => { + var repasswordValidator = (rule, value, callback) => { if (value === '') { callback(new Error('璇峰啀娆¤緭鍏ュ瘑鐮�')); } else if (value !== this.codeForm.password) { @@ -534,22 +764,36 @@ } }; return { - queryForm:{ - dirid:null, + conditionVisible: false, + formSql: { + field: '', + condition: '', + value: '', + type: '', + date: '', + }, - formInline: {tab:''}, + fromSqlflag: false, + filedsOption: [], + condOption: [], + queryForm: { + dirid: null, + depid: null, + }, + formInline: { tab: '', fileName: '' }, codeForm: { password: '', repassword: '', }, - fromfile:{ file: '',}, + fromfile: { file: '', }, listType: [], // 1mi listProject: [], - companyOption:[], - showinfoBox1:false, - dialogMapVisible:false, - showMapVisible:false, - showCodeBox:false, + companyOption: [], + companyOption1: [], + showinfoBox1: false, + dialogMapVisible: false, + showMapVisible: false, + showCodeBox: false, showFirstAll: false, isShowFirstCheck: false, showSecondAll: false, @@ -562,16 +806,17 @@ filedsLayer: [], attributeData: [], tableData: [], - tableData1:[], + tableData1: [], multipleSelection: [], - multipleSelection1:[], - attacgSelection: [], - tableAttach:[], + multipleSelection1: [], + attacgSelection: [], + tableAttach: [], itemdetail: [], - itemdetail1:{}, + itemdetail1: {}, listTypeData: { pageIndex: 1, pageSize: 10, + id: null, name: null, filter: null, wkt: null, @@ -579,28 +824,29 @@ listData: { pageIndex: 1, pageSize: 10, - tab:'' + tab: '' }, count: 0, count1: 0, dialogtitle: null, ruleForm: { - name: null, + textarea: '', }, - rules: { + 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, + upAttach: { + tabName: null, + eventid: null, } }; }, computed: { + newList() { this.listType.forEach((item) => { this.$set(item, 'isCheckedFlag', false); @@ -647,31 +893,33 @@ }, }, methods: { - getSpaceMapVisibale(){ - this.dialogMapVisible =true; - this.showMapVisible =true; + + + 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.mapPopBoolean = false; + this.$store.state.mapPopBoxFlag = null; this.$store.state.download = true; }, - handleMapClose(){ - this.$confirm('纭鍏抽棴锛�') + handleMapClose() { + this.$confirm('纭鍏抽棴锛�') .then((_) => { this.closeMapDown(); }) - .catch((_) => {}); + .catch((_) => { }); }, - closeMapDown(){ - this.dialogMapVisible =false; - this.showMapVisible =false; + 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; + this.$store.state.mapPopBoolean = false; + this.$store.state.mapPopBoxFlag = null; }, moreEvent(res) { switch (res) { @@ -696,22 +944,23 @@ getMenuChange(res) { this.listData.pageSize = 10; this.listData.pageIndex = 1; - this.formInline.tab="" + this.formInline.tab = "" switch (res) { case 1: - this.getDataLibSelectTabs(); + this.getDataLibSelectTabs(); this.isMenuActive = true; break; case 2: - this.getQueryDepTree(); + this.getQueryDirTree(); + this.isMenuActive = false; break; } }, - //鍗曚綅鍒楄〃鑾峰彇 - async getQueryDepTree() { + //鍗曚綅鍒楄〃鑾峰彇 + async getQueryDirTree() { const res = await selectdirTab(); if (res.code != 200) { this.$message.error('鍗曚綅鍒楄〃鑾峰彇澶辫触'); @@ -719,23 +968,33 @@ } 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.queryForm.name = ''; this.listData.pageSize = 10; this.listData.pageIndex = 1; this.listData.name = null; this.getMetaData(); }, - deleteMetaInfo() { + deleteMetaInfo() { this.$confirm('纭畾鏄惁鍒犻櫎鎵�閫夊唴瀹�?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', @@ -766,14 +1025,14 @@ this.$message('宸插彇娑堝垹闄�'); }); }, - downFormData() { + downFormData() { if (this.multipleSelection1.length == 0) { alert('璇峰厛閫夋嫨瑕佷笅杞界殑鏂囦欢'); return; } this.showCodeBox = true; }, - async download() { + async download() { var std = []; for (var i in this.multipleSelection1) { std.push(this.multipleSelection1[i].id) @@ -810,20 +1069,27 @@ this.codeForm.password = ''; this.codeForm.repassword = ''; }, - getMetaData() { - this.listData.dirid = this.queryForm.dirid + 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.pageSize = 10; this.listData.pageIndex = 1; this.queryForm.dirid = value; - this.getMetaData(); + 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) => { @@ -833,20 +1099,20 @@ return father.pid == 0; // 杩斿洖涓�绾ц彍鍗� }); }, - searchDataLibSelectTabs(){ - if(this.isMenuActive == true){ - this.getDataLibSelectTabs() - }else{ - this.queryInfo(); - } + searchDataLibSelectTabs() { + if (this.isMenuActive == true) { + this.getDataLibSelectTabs() + } else { + this.queryInfo(); + } }, -restDataLibSelectTabs(){ - this.formInline.tab="" - this.listData.pageIndex =1; - this.listData.pageSize=10 - this.searchDataLibSelectTabs(); + 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); @@ -854,12 +1120,12 @@ this.$message.error('鍒楄〃璋冪敤澶辫触'); return; } - this.count =data.count; + this.count = data.count; this.dataType = data.result; }, - showDetail1(row){ + showDetail1(row) { - this.showinfoBox1 = true; + this.showinfoBox1 = true; this.itemdetail1 = row; }, @@ -868,29 +1134,71 @@ this.showinfoBox1 = false; this.itemdetail = {}; }, - // 鍏抽敭瀛楁煡璇� + // 鍏抽敭瀛楁煡璇� submitForm() { this.listTypeData.pageIndex = 1; this.listTypeData.pageSize = 10; //鑾峰彇table淇℃伅 this.getCollapseTable(this.filedsLayer); }, - // 閲嶇疆鏌ヨ - resetForm(formName) { - this.searchName = ''; - this.$refs[formName].resetFields(); - //鑾峰彇table淇℃伅 - this.listTypeData.pageIndex = 1; - this.listTypeData.pageSize = 10; - 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 + '(' + res.tab + ')'; - this.upAttach.tabName= res.ns+"."+res.tab; + this.upAttach.tabName = res.ns + "." + res.tab; this.filedsLayer = this.getCollapseDomFiled(); this.getCollapseTable(this.filedsLayer); @@ -913,24 +1221,24 @@ this.innerVisible = true; }, getAttachTable(index, row) { - if(row.eventid != null){ + if (row.eventid != null) { this.upAttach.eventid = row.eventid; - }else{ - this.upAttach.eventid =""; + } else { + this.upAttach.eventid = ""; } this.outerVisible = true; this.getAttacthFlieList(); }, - async setAttachDel() { - var std = []; + 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){ + if (res.code != 200) { this.$message.error('鏂囦欢鍒犻櫎澶辫触'); } - this.getAttacthFlieList(); + this.getAttacthFlieList(); }, setAttachInsert() { var token = getToken(); @@ -945,7 +1253,7 @@ 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, { + $.ajax(BASE_URL + "/dataQuery/uploadFiles?token=" + token + "&tabName=" + this.upAttach.tabName + "&eventid=" + this.upAttach.eventid, { type: "post", data: formData, async: true, @@ -965,7 +1273,7 @@ }, error: (e) => { document.getElementById("insertFile").value = ""; - this.fromfile = { + this.fromfile = { file: '', } this.$message.error('闄勪欢娣诲姞澶辫触'); @@ -974,8 +1282,8 @@ }, - async getAttacthFlieList(){ - var obj =this.upAttach; + async getAttacthFlieList() { + var obj = this.upAttach; const res = await dataLib_selectFiles(obj); if (res.code != 200) { this.$message.error('鍒楄〃璋冪敤澶辫触'); @@ -999,15 +1307,15 @@ handleSelectionChange(val) { this.multipleSelection = val; }, - handleAttatchChange(val){ - this.attacgSelection = val; + handleAttatchChange(val) { + this.attacgSelection = val; }, async getCollapseTable(res) { res.then((val) => { this.attributeData = val; }); - if (this.ruleForm.name != null) { - this.listTypeData.filter = 'name like ' + this.ruleForm.name; + if (this.formInline.fileName != "") { + this.listTypeData.filter = this.formInline.fileName; } else { this.listTypeData.filter = null; } @@ -1019,7 +1327,6 @@ } var res_val = this.attributeData; - this.count1 = data.count; for (var i in data.result) { let val_Data = data.result[i]; @@ -1030,6 +1337,16 @@ } } } + 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; @@ -1065,8 +1382,14 @@ } 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); @@ -1074,9 +1397,106 @@ 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) { @@ -1086,22 +1506,22 @@ return null; }, handleSizeChange(res) { - this.listData.pageIndex = 1; + this.listData.pageIndex = 1; this.listData.pageSize = res; - if(this.isMenuActive == false){this.getMetaData()}else{this.getDataLibSelectTabs()} + if (this.isMenuActive == false) { this.getMetaData() } else { this.getDataLibSelectTabs() } }, handleCurrentChange(res) { - this.listData.pageIndex = res; - if(this.isMenuActive == false){this.getMetaData()}else{this.getDataLibSelectTabs()} + this.listData.pageIndex = res; + if (this.isMenuActive == false) { this.getMetaData() } else { this.getDataLibSelectTabs() } }, - async signGetPublicKey() { + async signGetPublicKey() { const res = await sign_getPublicKey(); if (res && res.code == 200) { window.encrypt = new JSEncrypt(); encrypt.setPublicKey(res.result); } }, - //鍗曚綅杞崲 + //鍗曚綅杞崲 stateFormatSizes(row, column) { if (row.sizes >= 1024) { const val = parseFloat(row.sizes / 1024).toFixed(3); @@ -1110,7 +1530,7 @@ return row.sizes + ' MB'; } }, - setInfoBoxTime(res) { + setInfoBoxTime(res) { if (res == null) { return res; } @@ -1123,7 +1543,7 @@ return res + ' MB'; } }, - //鏍煎紡鍖栧垪琛� + //鏍煎紡鍖栧垪琛� formatData(row, column) { let data = row[column.property]; if (data == null) { @@ -1320,11 +1740,11 @@ .elLink { color: white; } - .infoBox { + .infoBox { width: 500px; position: absolute; z-index: 100; - top: 25%; + top: 25%; right: 25%; background: #303030; color: #fff; @@ -1349,7 +1769,7 @@ } } -.downloadBox { + .downloadBox { position: absolute; top: 20%; left: 40%; @@ -1398,16 +1818,14 @@ /deep/ .el-select .el-input__inner { border-color: #fff !important; } - - } - .elLink { - color: white !important; - } - .el-icon-folder-opened { - color: white; - } +.elLink { + color: white !important; +} +.el-icon-folder-opened { + color: white; +} .contentBox { height: 550px; @@ -1428,74 +1846,89 @@ /deep/ .el-dialog__body { padding: 10px; } - /*淇敼table 琛ㄤ綋鐨勮儗鏅鑹插拰鏂囧瓧棰滆壊*/ - /deep/ .el-table { +/*淇敼table 琛ㄤ綋鐨勮儗鏅鑹插拰鏂囧瓧棰滆壊*/ +/deep/ .el-table { + background-color: transparent; + + th, + td { 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 ; + .el-table__expanded-cell { + background-color: transparent !important; + } + + // 琛ㄥご鑳屾櫙鑹� + th.el-table__cell { + background-color: #303030; color: #fff; - border: 1px solid white !important; } - /deep/.el-form-item__label { - color: white; + tr > td { + background-color: #303030; + color: #fff; } - /deep/.el-dialog__wrapper{ - overflow: hidden; + + // 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> -- Gitblit v1.9.3