From 1a2d7710561c2ca22632ca7dbb1ecae46502ec7e Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期六, 25 二月 2023 17:29:05 +0800 Subject: [PATCH] 数据检索高级查询修改 --- src/components/MapView/mapSpaceTop.vue | 3 src/components/MapView/mapSpacePop.vue | 12 src/views/Archive/Archive.js | 6 src/views/datamanage/SpatialData.vue | 373 +++++++++++++++++++++++++++------------------------- 4 files changed, 203 insertions(+), 191 deletions(-) diff --git a/src/components/MapView/mapSpacePop.vue b/src/components/MapView/mapSpacePop.vue index d9d56a8..c6fd02f 100644 --- a/src/components/MapView/mapSpacePop.vue +++ b/src/components/MapView/mapSpacePop.vue @@ -143,9 +143,9 @@ optionx: [], options: [], conditions: [ - ['<>', 'like'], + ['=', '<>', 'like'], ['>=', '>', ' =', '<=', '<', '<>'], - ['>=', '<='], + ['>=', '>', ' =', '<=', '<', '<>'], ], options1: [ { @@ -232,7 +232,7 @@ obj = this.optionx.find(function (item) { return item.field === value; }); - + // if (obj.type == 'serial' || obj.type == 'int') { // this.options = this.options2; // } else { @@ -320,9 +320,9 @@ //鍒濆鍖栨煡璇㈤槇鍊艰〃 async getDomainsLayer() { const data = await inquiry_selectDomains({ name: this.spaceLayer }); - if (data.code != 200) { - this.$message.error('鍒楄〃璋冪敤澶辫触'); - } + if (data.code != 200) { + this.$message.error('鍒楄〃璋冪敤澶辫触'); + } this.domainsLayer = data.result; this.setListDataStart(); this.getTableselectFields(); diff --git a/src/components/MapView/mapSpaceTop.vue b/src/components/MapView/mapSpaceTop.vue index 32658cb..68e106d 100644 --- a/src/components/MapView/mapSpaceTop.vue +++ b/src/components/MapView/mapSpaceTop.vue @@ -5,7 +5,6 @@ @change="menuTreeCheck" placeholder="璇烽�夋嫨..." filterable - :popper-append-to-body="false" > <el-option v-for="item in layerData" @@ -100,6 +99,7 @@ pageIndex: 1, pageSize: 500, }); + debugger if (data.code != 200) { this.$message.error("鍒楄〃璋冪敤澶辫触"); } @@ -109,6 +109,7 @@ return res; } }); + debugger // for (var i in option) { // // console.log(option[i].tableType) diff --git a/src/views/Archive/Archive.js b/src/views/Archive/Archive.js index 0f34240..92033ff 100644 --- a/src/views/Archive/Archive.js +++ b/src/views/Archive/Archive.js @@ -1,5 +1,5 @@ export const conditions = [ - ['<>', 'like'], - ['>=', '>', ' =', '<=', '<', '<>'], - ['>=', '<='], + ['=', '<>', 'like'], + ['>=', '>', ' =', '<=', '<', '<>'], + ['>=', '>', ' =', '<=', '<', '<>'], ] \ No newline at end of file diff --git a/src/views/datamanage/SpatialData.vue b/src/views/datamanage/SpatialData.vue index 4cc048e..f584d5e 100644 --- a/src/views/datamanage/SpatialData.vue +++ b/src/views/datamanage/SpatialData.vue @@ -6,8 +6,16 @@ ]"></My-bread> <el-divider /> <div class="spatialContent "> - <div class="spatial_leftTree subpage_Div " style="border: 1px solid #dcdfe6;"> - <el-input v-model="filterText" style="width:220px;" :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')" suffix-icon="el-icon-search" ></el-input> + <div + class="spatial_leftTree subpage_Div " + style="border: 1px solid #dcdfe6;" + > + <el-input + v-model="filterText" + style="width:220px;" + :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')" + suffix-icon="el-icon-search" + ></el-input> <div style="width:300px"> <el-tree :data="tree" @@ -23,33 +31,33 @@ <div class="contentshuju"> <div class="contentshujutou"> <el-form - ref="ruleForm" - :model="ruleForm" - :inline="true" - > + ref="ruleForm" + :model="ruleForm" + :inline="true" + > - <el-form-item> - <!-- type="textarea" disabled--> - <el-input - v-model="ruleForm.fileName" - class="nm-skin-pretty" - show-word-limit - :rows="2" - resize='none' - style="width: 220px;" - :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')" - suffix-icon="el-icon-edit" - ></el-input> - </el-form-item> - <el-form-item style="float: right"> - <el-button - @click="getSpaceMapVisibale" - size="small" - type="primary" - >{{ + <el-form-item> + <!-- type="textarea" disabled--> + <el-input + v-model="ruleForm.fileName" + class="nm-skin-pretty" + show-word-limit + :rows="2" + resize='none' + style="width: 220px;" + :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')" + suffix-icon="el-icon-edit" + ></el-input> + </el-form-item> + <el-form-item style="float: right"> + <el-button + @click="getSpaceMapVisibale" + size="small" + type="primary" + >{{ $t('synthesis.rangequery') }}</el-button> - </el-form-item> + </el-form-item> <el-form-item style="float: right"> <el-button @click="resetForm" @@ -59,39 +67,42 @@ >{{$t('common.reset')}}</el-button> </el-form-item> - <el-form-item style="float: right"> - <el-button - @click="submitForm" - type="primary" - size="small" - icon="el-icon-search" - >{{$t('common.iquery')}}</el-button> - </el-form-item> - <el-form-item style="float: right"> - <el-button - v-if="btnStatus.insert" - @click="conditionVisible = true" - size="small" - icon="el-icon-plus" - type="success" - >{{$t('common.append')}}</el-button> - </el-form-item> - </el-form> + <el-form-item style="float: right"> + <el-button + @click="submitForm" + type="primary" + size="small" + icon="el-icon-search" + >{{$t('common.iquery')}}</el-button> + </el-form-item> + <el-form-item style="float: right"> + <el-button + v-if="btnStatus.insert" + @click="conditionVisible = true" + size="small" + icon="el-icon-plus" + type="success" + >{{$t('common.append')}}</el-button> + </el-form-item> + </el-form> </div> <div class="dividing-line"></div> - <div class="table_box" style="height:calc(100% - 89px)"> -<!-- border--> -<!-- ref="filterTable"--> -<!-- :data="tableData"--> -<!-- style="width: 100%"--> -<!-- height="calc(100% - 57px)"--> -<!-- :header-cell-style="{background:'#e6eaee',color:'#181818', 'text-align': 'center'} "--> + <div + class="table_box" + style="height:calc(100% - 89px)" + > + <!-- border--> + <!-- ref="filterTable"--> + <!-- :data="tableData"--> + <!-- style="width: 100%"--> + <!-- height="calc(100% - 57px)"--> + <!-- :header-cell-style="{background:'#e6eaee',color:'#181818', 'text-align': 'center'} "--> <el-table :data="tableData" style="width: 100%" height="calc(100% - 57px)" > - <el-table-column + <el-table-column type="selection" width="55" /> @@ -110,12 +121,12 @@ align="center" ></el-table-column> <el-table-column - min-width="180" + min-width="180" :label="$t('common.operate')" > <template slot-scope="scope"> <el-button - type="primary" + type="primary" plain size="small" @click="showDetail(scope.$index, scope.row)" @@ -129,9 +140,7 @@ </template> </el-table-column> </el-table> - <div - class="pagination_box" - > + <div class="pagination_box"> <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" @@ -145,125 +154,125 @@ </div> </div> </div> - - </div> - <div class="infoBox_box" v-show="showinfoBox"> - <div - class="infoBox box_div" - - > - <div - slot="header" - class="clearfix" - > - <span>{{$t('common.details')}}</span> + </div> + <div + class="infoBox_box" + v-show="showinfoBox" + > + <div class="infoBox box_div"> <div - style="float: right; cursor: pointer" - @click="closeDetial" + slot="header" + class="clearfix" > - <i class="el-icon-close"></i> + <span>{{$t('common.details')}}</span> + + <div + style="float: right; cursor: pointer" + @click="closeDetial" + > + <i class="el-icon-close"></i> + </div> + <el-divider></el-divider> </div> - <el-divider></el-divider> - </div> - <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> + <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> </div> - </div> + </div> <el-dialog :title="$t('common.attachinform')" top="2vh" :visible.sync="dialogFormVisible" > - <div style="height: 500px; overflow: auto"> - <el-form - :model="formInline" - class="demo-form-inline" - label-position="top" - > - <el-form-item> - <el-input - v-model="formInline.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 - v-if="btnStatus.insert" - class="elLink" - :underline="false" - @click="setAttachInsert" - >{{$t('common.append')}}</el-link> - </el-col> - <el-col :span="3"> - <el-link - v-if="btnStatus.delete" - 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="100%" - border - style="width: 100%" - @selection-change="handleAttatchChange" - > - <el-table-column - type="selection" - width="55" + <div style="height: 500px; overflow: auto"> + <el-form + :model="formInline" + class="demo-form-inline" + label-position="top" + > + <el-form-item> + <el-input + v-model="formInline.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-table-column - width="60" - type="index" - :label="$t('common.index')" - /> - <el-table-column - prop="date" - :label="$t('common.fileNme')" - /> + <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 + v-if="btnStatus.insert" + class="elLink" + :underline="false" + @click="setAttachInsert" + >{{$t('common.append')}}</el-link> + </el-col> + <el-col :span="3"> + <el-link + v-if="btnStatus.delete" + 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="100%" + 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-column + prop="name" + :label="$t('common.filePath')" + /> - </el-table> - </el-form-item> - <!-- <el-form-item> + </el-table> + </el-form-item> + <!-- <el-form-item> <el-row :gutter="20"> <el-col @@ -283,23 +292,24 @@ </el-col> </el-row> </el-form-item> --> - </el-form> - </div> + </el-form> + </div> </el-dialog> <el-dialog - top="2vh" :visible.sync="conditionVisible" title="鏌ヨ鏉′欢" :before-close="handleconditionClose" + width="44%" > - + <el-form - :inline="true" + :inline=" + true" :model="formSql" class="demo-form-inline" label-position="top" > - + <el-form-item> <el-select @change="fieldChange($event)" @@ -341,9 +351,9 @@ > </el-date-picker> </el-form-item> - + </el-form> - + <span slot="footer" class="dialog-footer" @@ -359,6 +369,7 @@ >纭� 瀹�</el-button> </span> </el-dialog> + <el-dialog :title=" $t('synthesis.rangequery')" :visible.sync="dialogMapVisible" @@ -539,7 +550,7 @@ .then((_) => { this.closeMapDown(); }) - .catch((_) => {}); + .catch((_) => { }); }, closeMapDown() { this.dialogMapVisible = false; @@ -578,12 +589,12 @@ $.ajax( BASE_URL + - "/dataQuery/uploadFiles?token=" + - token + - "&tabName= " + - this.upAttach.tabName + - "&eventid=" + - this.upAttach.eventid, + "/dataQuery/uploadFiles?token=" + + token + + "&tabName= " + + this.upAttach.tabName + + "&eventid=" + + this.upAttach.eventid, { type: "post", data: formData, @@ -745,7 +756,8 @@ var data2 = domains.result; var std = []; for (var i in data1) { - if (data1[i].type != "geomtry" && data1[i].type != "null") { + if (data1[i].type != 'geometry' && data1[i].type) { + debugger this.filedsOption.push(data1[i]); } if (data1[i].showtype == 1) { @@ -769,7 +781,7 @@ .then((_) => { this.startFiledAndcondition(); }) - .catch((_) => {}); + .catch((_) => { }); }, fieldChange(value) { @@ -1051,7 +1063,7 @@ // this.getMetaCount(""); // }); }) - .catch(() => {}); + .catch(() => { }); }, // 鑾峰彇澶氶�夐�変腑鐨勫璞� handleSelectionChange(val) { @@ -1119,7 +1131,7 @@ // }); // }); }) - .catch(() => {}); + .catch(() => { }); }, }, }; @@ -1154,7 +1166,6 @@ } } } - .table_box2 { border-radius: 5px; -- Gitblit v1.9.3