From b6c8e7c61f0270598ba7fdbc44f79512e010d0fe Mon Sep 17 00:00:00 2001 From: TreeWish <1131093754@qq.com> Date: 星期五, 03 三月 2023 22:03:13 +0800 Subject: [PATCH] 合并国际化配置 --- src/views/Archive/index.vue | 58 ++ src/views/maintenance/tokentool.vue | 2 src/assets/css/configure.css | 24 + src/views/userManage/authorityManage.vue | 1 src/components/MapView/mapMenuPop.vue | 36 + src/components/mapsdk.vue | 182 +++++++++ src/views/datamanage/SpatialData.vue | 504 ++++++++++++++++++++++----- src/components/MapView/mapSpaceTop.vue | 2 src/assets/lang/zh.js | 3 src/views/maintenance/parameterConfiguration.vue | 1 src/views/maintenance/blackwhiteList.vue | 2 public/config/config.js | 12 src/components/MapView/mapMenuTop.vue | 127 ++++-- src/views/datamanage/versionManage.vue | 4 src/assets/lang/en.js | 3 src/views/userManage/roleManage.vue | 2 src/components/MapView/mapSpacePop.vue | 70 +++ 17 files changed, 838 insertions(+), 195 deletions(-) diff --git a/public/config/config.js b/public/config/config.js index d89d5a2..ab9b01f 100644 --- a/public/config/config.js +++ b/public/config/config.js @@ -2,6 +2,7 @@ var isWeb = true; var webHost = isWeb ? "103.85.165.99" + ":8052" : '192.168.20.205' + ":8088"; +// var webHost = isWeb ? "103.85.165.99" + ":8052" : '192.168.16.162' + ":12316"; var fmeHost = isWeb ? "103.85.165.99" + ":8051" : '192.168.20.205' + ":88"; @@ -38,10 +39,19 @@ // SG鍦板潃 SGUrl: "http://" + iisHost + "/SG/Elevation", // Fly鍦板潃 - fly: 'http://' + iisHost + '/LFData/fly/' + (isWeb ? "lfy_web.fly" : "lf_127.fly"), + // fly: 'http://' + iisHost + '/LFData/fly/' + (isWeb ? "lfy_web.fly" : "lf_127.fly"), + fly: 'http://' + iisHost + '/LFData/fly/' + (isWeb ? "lfgd.fly" : "lfgd_127.fly"), // positionBtn: [], }; +//宸ョ偣淇℃伅琛� +var workSite = [ + { + name: "鍕樺療淇℃伅琛�", + table: "s_survey_information", + ns: 'bs', + }, +] var gaoDeBaseUrl = [{ url: 'http://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}', diff --git a/src/assets/css/configure.css b/src/assets/css/configure.css index c1603ae..e58a01b 100644 --- a/src/assets/css/configure.css +++ b/src/assets/css/configure.css @@ -365,16 +365,36 @@ } /*el-table杈规*/ -.el-table{ +.el-table { border-left: none !important; border-right: none !important; } + .el-table td { border-right: none !important; } + .el-table th.is-leaf { border-right: none !important; } -.el-table--group::after, .el-table--border::after{ + +.el-table--group::after, +.el-table--border::after { width: 0 !important; } + +.el-table { + width: 100%; + display: flex; + flex-direction: column; + + +} + +.el-table .el-table__body-wrapper { + flex: 1; +} + +.el-table th.gutter { + display: table-cell !important; +} \ No newline at end of file diff --git a/src/assets/lang/en.js b/src/assets/lang/en.js index 02f347a..af1fa08 100644 --- a/src/assets/lang/en.js +++ b/src/assets/lang/en.js @@ -50,7 +50,8 @@ passworld: 'Passworld', language: "涓枃", title: 'Title', - preview: 'preview' + preview: 'preview', + attribute: 'Attribute', }, dataManage: { diff --git a/src/assets/lang/zh.js b/src/assets/lang/zh.js index 61d065e..aae2e2a 100644 --- a/src/assets/lang/zh.js +++ b/src/assets/lang/zh.js @@ -50,7 +50,8 @@ passworld: '瀵嗙爜', language: "English", title: '鏍囬', - preview: '棰勮' + preview: '棰勮', + attribute: '灞炴��', }, dataManage: { dataManage: '鏁版嵁绠$悊', diff --git a/src/components/MapView/mapMenuPop.vue b/src/components/MapView/mapMenuPop.vue index d5d9419..777bcf5 100644 --- a/src/components/MapView/mapMenuPop.vue +++ b/src/components/MapView/mapMenuPop.vue @@ -546,7 +546,7 @@ this.imagePoint = null; } var wkt = this.$wkt.parse(val1); - this.setMapLoaction(wkt); + this.setMapLoaction(wkt, row); } }, setMapLoaction(res) { @@ -604,6 +604,7 @@ this.listdata.pageIndex = 1; this.listdata.pageSize = 10; this.listdata.name = res.entity; + this.$store.state.propertiesName = res; this.getTableDateHidder(); }, handleSizeChange(val) { @@ -642,6 +643,7 @@ }, async showAllImage(res) { for (var i in res) { + let properties = res[i]; var param = { gid: res[i].gid, name: this.listdata.name, @@ -654,7 +656,7 @@ if (val1) { var wkt = this.$wkt.parse(val1); // this.getprimitiLayer(wkt); - this.primitivesAddLayer(wkt); + this.primitivesAddLayer(wkt, properties); } } }, @@ -667,7 +669,7 @@ break; } }, - primitivesAddLayer(res) { + primitivesAddLayer(res, properties) { switch (res.type) { case "Point": var val = Cesium.Cartesian3.fromDegrees( @@ -676,6 +678,8 @@ ); var point = Viewer.entities.add({ position: val, + properties: properties, + tag: "properties_point", billboard: { // 鍥惧儚鍦板潃锛孶RI鎴朇anvas鐨勫睘鎬� image: SmartEarthRootUrl + "Workers/image/mark.png", @@ -694,6 +698,29 @@ }); point.billboard.disableDepthTestDistance = Number.POSITIVE_INFINITY; this.$store.state.queryInfo.push(point); + //鐐瑰嚮浜嬩欢 + window.propertieshandler = new Cesium.ScreenSpaceEventHandler( + sgworld.Viewer.scene.canvas + ); + window.propertieshandler.setInputAction(event => { + let pick = sgworld.Viewer.scene.pick(event.position); + // ; + if (pick && pick.id && pick.id.tag == "properties_point") { + this.$store.state.propertiesFlag = '1'; + let properties = pick.id.properties; + let propertyNames = pick.id.properties.propertyNames; + let obj = {}; + obj["eventid"] = properties['_eventid']._value; + this.attributeData.forEach(item => { + propertyNames.forEach(itemElement => { + if (itemElement == item.field) { + obj[item.alias] = properties[itemElement]._value + } + }) + }) + this.$store.state.propertiesInfo = obj; + } + }, Cesium.ScreenSpaceEventType.LEFT_CLICK); break; case "LineString": case "MultiLineString": @@ -752,6 +779,9 @@ } }); }, + destroyed() { + this.$store.state.propertiesFlag = null; + } }; </script> diff --git a/src/components/MapView/mapMenuTop.vue b/src/components/MapView/mapMenuTop.vue index ec5a325..7cd4bff 100644 --- a/src/components/MapView/mapMenuTop.vue +++ b/src/components/MapView/mapMenuTop.vue @@ -1,6 +1,10 @@ <template> <div class="menuBox"> - <el-form :inline="true" :model="menuTopFrom" class="demo-form-inline"> + <el-form + :inline="true" + :model="menuTopFrom" + class="demo-form-inline" + > <el-form-item> <el-select v-model="menuTopFrom.queryLayer" @@ -8,7 +12,10 @@ placeholder="璇烽�夋嫨..." :popper-append-to-body="false" > - <el-option :value="menuTopFrom.queryLayer" style="height: 100%"> + <el-option + :value="menuTopFrom.queryLayer" + style="height: 100%" + > <div style="height: 200px; overflow: auto"> <el-tree :data="layerData" @@ -22,16 +29,17 @@ </el-tree> </div> <div style="margin-top: 5px"> - <el-button size="small" plain @click="getCheckedNodes" - >纭</el-button - > + <el-button + size="small" + plain + @click="getCheckedNodes" + >纭</el-button> <el-button size="small" type="info" plain @click="resetCheckedNodes" - >閲嶇疆</el-button - > + >閲嶇疆</el-button> </div> </el-option> </el-select> @@ -70,12 +78,17 @@ </el-form-item> <el-form-item> - <el-button plain size="small" @click="getAttributeQuery" - >鏌ヨ</el-button - > - <el-button type="info" size="small" @click="clearQuery" plain - >閲嶇疆</el-button - > + <el-button + plain + size="small" + @click="getAttributeQuery" + >鏌ヨ</el-button> + <el-button + type="info" + size="small" + @click="clearQuery" + plain + >閲嶇疆</el-button> </el-form-item> <!-- <el-form-item> <el-button @@ -104,7 +117,10 @@ width="25%" @opened="dialogOpend" > - <el-form :model="menuTopFrom" label-width="150px"> + <el-form + :model="menuTopFrom" + label-width="150px" + > <el-form-item label="绠¢亾涓績绾�"> <el-select @change="changeSelect2" @@ -144,9 +160,15 @@ ></el-input-number> </el-form-item> </el-form> - <div slot="footer" class="dialog-footer"> + <div + slot="footer" + class="dialog-footer" + > <el-button @click="dialogFormVisible = false">鍙� 娑�</el-button> - <el-button type="primary" @click="changeBufferData">纭� 瀹�</el-button> + <el-button + type="primary" + @click="changeBufferData" + >纭� 瀹�</el-button> </div> </el-dialog> </div> @@ -178,20 +200,20 @@ }, treeChange: [], layerData: [ - { - id: 1, - label: "鍩虹鏁版嵁", - tabDesc: "鍩虹鏁版嵁", - value: "BD", - children: [], - }, - { - id: 2, - label: "涓氬姟鏁版嵁", - tabDesc: "涓氬姟鏁版嵁", - value: "BS", - children: [], - }, + // { + // id: 1, + // label: "鍩虹鏁版嵁", + // tabDesc: "鍩虹鏁版嵁", + // value: "BD", + // children: [], + // }, + // { + // id: 2, + // label: "涓氬姟鏁版嵁", + // tabDesc: "涓氬姟鏁版嵁", + // value: "BS", + // children: [], + // }, ], queryOption: [ @@ -272,28 +294,43 @@ if (data.code != 200) { this.$message.error("鍒楄〃璋冪敤澶辫触") } - var option = data.result.filter(res => { - if (res.rows != 0) { - return res + + // var val = data.result.filter(res => { + // if (res.rows != 0) { + // return res + // } + // }) + var val = data.result + var std = []; + val.filter((item) => { + if (std.indexOf(item.bak) == -1) { + std.push(item.bak); + this.layerData.push( + { + val: item.bak, + label: item.bak, + children: [], + } + ) } + }); + + this.layerData.filter((item) => { + val.filter((res) => { + if (item.val === res.bak) { + res.label = res.tabDesc + item.children.push(res) + } + }) }) - for (var i in option) { - var val_Data = option[i] - val_Data.id = "1" + i - val_Data.label = val_Data.tabDesc - if (option[i].ns == "bd") { - this.layerData[0].children.push(val_Data) - } else { - this.layerData[1].children.push(val_Data) - } - } + }, //鑾峰彇閫夋嫨鏍戠殑鑺傜偣 getCheckedNodes() { var valTree = this.$refs.tree.getCheckedNodes() if (valTree.length == 0) return - - this.menuTopFrom.queryLayer = valTree[0].tabDesc + this.menuTopFrom.queryLayer = valTree[0].tabDesc; + this.$store.state.propertiesName = valTree[0]; for (var i = 0; i < valTree.length; i++) { if (valTree[i].entity) { this.treeChange.push(valTree[i]) diff --git a/src/components/MapView/mapSpacePop.vue b/src/components/MapView/mapSpacePop.vue index c08795a..3e4146c 100644 --- a/src/components/MapView/mapSpacePop.vue +++ b/src/components/MapView/mapSpacePop.vue @@ -194,6 +194,7 @@ spaceLayer: '', imagePoint: null, domainsLayer: null, + querytype: null, }; }, watch: { @@ -243,7 +244,7 @@ this.options = []; var std = []; - + this.querytype = obj.type if (obj.type == "text" || obj.type == "blob") { std = this.conditions[0]; } else if (obj.type == "date" || obj.type == "datetime") { @@ -271,6 +272,7 @@ this.formInline.name = val_date.field; this.options = []; var std = []; + this.querytype = val_date.type if (val_date.type == "text" || val_date.type == "blob") { std = this.conditions[0]; } else if (val_date.type == "date" || val_date.type == "datetime") { @@ -337,13 +339,41 @@ if (this.formInline.input == undefined || this.formInline.input == null) { this.listdata.filter = null; } else { + + var val; + var value = this.formInline.input + if (this.querytype == "long" || this.querytype == "integer") { + + val = parseInt(value); + } else if (this.querytype == 'double') { + + if (this.formSql.value.indexOf(".") != -1) { + val = value; + } else { + val = parseFloat(value).toFixed(1) + } + } else if (querytype == "date" || querytype == "datetime") { + var time = new Date(value); + var m = time.getMonth() + 1; + var d = time.getDate(); + var y = time.getFullYear(); + val = "'" + y + + '-' + + this.add0(m) + + '-' + + this.add0(d) + "'"; + } else { + val = "'" + value + "'"; + } + + + + this.listdata.filter = - this.formInline.name + - ' ' + - this.formInline.region + - ' ' + - this.formInline.input; + this.formInline.name + " " + this.formInline.region + " " + val + } + const data = await dataQuerySelectByPage(this.listdata); if (data.code != 200) { this.$message.error('鍒楄〃璋冪敤澶辫触'); @@ -383,7 +413,8 @@ this.$store.state.primitLayer = null; } var wkt = this.$wkt.parse(val1); - this.setMapLoaction(wkt,row); + + this.setMapLoaction(wkt, row); } }, handleSizeChange(val) { @@ -394,7 +425,7 @@ this.listdata.pageIndex = val; this.getSpaceTableLayer(); }, - setMapLoaction(res,properties) { + setMapLoaction(res, properties) { if (this.$store.state.primitLayer != null) { sgworld.Creator.DeleteObject(this.$store.state.primitLayer); // this.$store.state.primitLayer = null; @@ -402,6 +433,7 @@ this.$store.state.primitLayer = null; } var coord = res.coordinates; + if (res.type == 'Point') { var val = Cesium.Cartesian3.fromDegrees( res.coordinates[0], @@ -409,8 +441,8 @@ ); this.$store.state.primitLayer = Viewer.entities.add({ - properties:properties, - tag : "properties_point", + properties: properties, + tag: "properties_point", position: val, billboard: { // 鍥惧儚鍦板潃锛孶RI鎴朇anvas鐨勫睘鎬� @@ -433,19 +465,21 @@ sgworld.Navigate.flyToObj(this.$store.state.primitLayer) window.propertieshandler = new Cesium.ScreenSpaceEventHandler( - sgworld.Viewer.scene.canvas + sgworld.Viewer.scene.canvas ); window.propertieshandler.setInputAction(event => { let pick = sgworld.Viewer.scene.pick(event.position); - // debugger; + // ; if (pick && pick.id && pick.id.tag == "properties_point") { this.$store.state.propertiesFlag = '1'; let properties = pick.id.properties; let propertyNames = pick.id.properties.propertyNames; let obj = {}; + obj["eventid"] = properties['_eventid']._value; + // this.attributeData.forEach(item => { propertyNames.forEach(itemElement => { - if (itemElement == item.field){ + if (itemElement == item.field) { obj[item.alias] = properties[itemElement]._value } }) @@ -455,12 +489,16 @@ }, Cesium.ScreenSpaceEventType.LEFT_CLICK); } else if (res.type == 'MultiPolygon' || res.type == 'LineString') { + var val = res.coordinates[0][0]; var std = []; for (var i in val) { - std.push({ x: val[i][0], y: val[i][1] }) + std.push(val[i][0]) + + std.push(val[i][1]) } + this.$store.state.primitLayer = Viewer.entities.add({ polyline: { positions: Cesium.Cartesian3.fromDegreesArray(std), @@ -504,7 +542,6 @@ border: 1px solid gray; float: left; .centTable { - margin-top: 1%; position: absolute; height: 66%; width: 98%; @@ -522,5 +559,8 @@ position: absolute; bottom: 3%; } + /deep/.el-form-item { + margin-bottom: 0px; + } } </style> diff --git a/src/components/MapView/mapSpaceTop.vue b/src/components/MapView/mapSpaceTop.vue index de3cd91..71d8dfb 100644 --- a/src/components/MapView/mapSpaceTop.vue +++ b/src/components/MapView/mapSpaceTop.vue @@ -151,7 +151,7 @@ this.mapSpaceQueryLayer = value; this.layerData.forEach(item => { if (this.menuTopFrom.queryLayer == item.entity){ - this.$store.state.propertiesName = item.tabDesc; + this.$store.state.propertiesName = item; } }) this.getCheckedNodes(); diff --git a/src/components/mapsdk.vue b/src/components/mapsdk.vue index ce5fc51..f6c03dd 100644 --- a/src/components/mapsdk.vue +++ b/src/components/mapsdk.vue @@ -351,8 +351,9 @@ > <el-card class="box-card"> <div slot="header"> - <span>{{$store.state.propertiesName}}</span> + <span>{{$store.state.propertiesName.tabDesc || '灞炴�т俊鎭�'}}</span> <div style="float: right; cursor: pointer"> + <el-link type="primary" :underline="false" @click="getAttatchList" style="margin-right: 10px">鏌ョ湅闄勪欢</el-link> <i class="el-icon-close" @click="closeBufferBox(6)" @@ -368,12 +369,85 @@ v-for="(value, key) in $store.state.propertiesInfo" :key="key" > - <span style="font-size: 14px;font-weight: bold;margin-right: 5px">{{key}}:</span> - <span>{{value}}</span> + <span v-if="key != 'eventid'" style="font-size: 14px;font-weight: bold;margin-right: 5px">{{key}}:</span> + <span v-if="key != 'eventid'">{{value}}</span> </div> </div> </el-card> </div> + <!--闄勪欢鍒楄〃寮圭獥--> + <el-dialog + title="闄勪欢鍒楄〃" + :append-to-body="false" + :visible.sync="showAttach" + width="35%" + :close-on-click-modal="false" + > + <div> + <el-table + :data="attachList" + height="100%" + style="width: 100%" + border + > + <el-table-column + align="center" + type="index" + label="搴忓彿" + width="50" + /> + <el-table-column + prop="name" + label="鍚嶇О"> + </el-table-column> + <el-table-column + label="鏃堕棿" + width="180"> + <template slot-scope="scope"> + <span>{{format(scope.row.createTime)}}</span> + </template> + </el-table-column> + <el-table-column + label="鎿嶄綔" + width="100"> + <template slot-scope="scope"> + <el-button v-if="showAttachDetailBtn(scope.row)" @click="showAttachDetail(scope.row)" type="text" size="small">鏌ョ湅</el-button> + </template> + </el-table-column> + </el-table> + </div> + </el-dialog> + <!--闄勪欢寮圭獥--> + <el-dialog + title="棰勮" + :append-to-body="false" + :visible.sync="dialog.dialogVisible" + width="70%" + :close-on-click-modal="false" + > + <div + v-if="dialog.isPdf" + class="pdfClass" + > + <iframe + :src="dialog.src" + type="application/x-google-chrome-pdf" + width="100%" + height="100%" + > + </iframe> + </div> + <div + v-if="dialog.isJpg" + class="pdfClass" + > + <img + style="width:100%; height:100%;" + :src="dialog.src" + alt="" + /> + </div> + </el-dialog> <!-- <div--> <!-- @click="changeMenulayer"--> <!-- class="center CenDiv"--> @@ -391,13 +465,14 @@ <script> import $ from "jquery"; import mapMenuTop from "./MapView/mapMenuTop.vue"; - import mapSpaceTop from "./MapView/mapSpaceTop.vue"; import { select_Comprehensive_ByPageAndCount, select_Comprehensive_SelectWktById, comprehensive_selectRoute, + dataLib_selectFiles } from "../api/api"; +import {getToken} from '@/utils/auth' export default { name: "", @@ -436,7 +511,6 @@ lon: "", lat: "", }, - rules: { lon: [ { required: true, message: "璇疯緭鍏ヨ捣鐐圭粡绾害鍧愭爣", trigger: "blur" }, @@ -481,7 +555,6 @@ layer3: null, isActive: false, isMenuLayer: true, - selFrom: {}, selectTree: null, showTerrainLevelDialog: false, menuList: [], @@ -492,7 +565,16 @@ show2DMap: false, terrainFrom: { height: '10' - }, showLengendDialog: false, + }, + showLengendDialog: false, + showAttach:false, + attachList:[], + dialog: { + dialogVisible: false, + isPdf: false, + isJpg: false, + src: '' + } }; }, mounted() { @@ -1079,6 +1161,86 @@ } this.$bus.$emit("changemapType", this.show2DMap); }, + //鑾峰彇闄勪欢鍒楄〃 + async getAttatchList() { + let tabName = this.$store.state.propertiesName.ns+'.'+this.$store.state.propertiesName.tab; + let eventid = this.$store.state.propertiesInfo.eventid; + var obj = { + eventid:eventid, + tabName:tabName, + }; + const res = await dataLib_selectFiles(obj); + if (res.code != 200) { + this.$message.error('闄勪欢鏌ヨ澶辫触'); + return + } + if (res.result.length <= 0) { + this.$message.error('鏆傛棤闄勪欢'); + return + } + this.attachList = res.result; + this.showAttach = true; + }, + //鏄惁鏄剧ず鏌ョ湅鎸夐挳 + showAttachDetailBtn(row){ + var name = row.name; + if (name.indexOf('.pdf') != -1 || name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) { + return true; + } + return false; + }, + //鏁版嵁鍒濆鍖� + refreshAttatchDetail() { + this.dialog.src = ""; + this.dialog.dialogVisible = false; + this.dialog.isPdf = false; + this.dialog.isJpg = false; + }, + //鏌ョ湅闄勪欢 + showAttachDetail(row){ + this.refreshAttatchDetail(); + var name = row.name; + if (name.indexOf('.pdf') != -1) { + this.dialog.dialogVisible = true; + this.dialog.isPdf = true; + var url = BASE_URL + "/res/downloadForView?guid=" + row.guid + "&token=" + getToken(); + this.dialog.src = url + } + else if (name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) { + this.dialog.dialogVisible = true; + this.dialog.isJpg = true; + var url = BASE_URL + "/res/downloadForView?guid=" + row.guid + "&token=" + getToken(); + this.dialog.src = url + } + }, + //鏍煎紡鍖栨椂闂� + 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; + }, }, }; </script> @@ -1331,6 +1493,12 @@ background-size: contain; } +.pdfClass { + height: 70vh; + width: 100%; + position: relative; +} + // .menuSelect .el-input__inner { // background: rgba(255, 255, 255, 0.2) !important; // color: white !important; diff --git a/src/views/Archive/index.vue b/src/views/Archive/index.vue index 9c28b0f..d3189da 100644 --- a/src/views/Archive/index.vue +++ b/src/views/Archive/index.vue @@ -54,7 +54,7 @@ > <el-option v-for="item in categoryOptions" - :key="item.value" + :key="item.key" :label="item.value" :value="item.key" > @@ -558,6 +558,7 @@ > <template slot-scope="scope"> <el-link + v-if="matchState(scope, /[]/)" @click="setAttatchDetail(scope.$index, scope.row)" class="elLink" >{{ $t('common.see') }}</el-link> @@ -1216,6 +1217,15 @@ this.signGetPublicKey(); }, methods: { + matchState(state = "", reg) { + var row = state.row; + var name = row.name; + if (name.indexOf('.pdf') != -1 || name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) { + return true; + } + + return false; + }, // 闄勪欢=>琛ㄦ牸閫夋嫨 handleAttatchChange(val) { this.attacgSelection = val; @@ -1993,14 +2003,19 @@ return; } var val = data.result; - val = val.filter((res) => { + if (val) { + val = val.filter((res) => { + res.mold = "鏁版嵁搴�" + res.isShow = false + return res; + }) + this.listData.count = data.count; + this.monthdata = data.result; + } else { + this.listData.count = 0; + this.monthdata = []; + } - res.mold = "鏁版嵁搴�" - res.isShow = false - return res; - }) - this.listData.count = data.count; - this.monthdata = data.result; }, //鏌ヨ鏂囦欢鏁版嵁 async getQueryFileData() { @@ -2022,16 +2037,22 @@ 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; - }) + if (val) { + 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; + this.monthdata = val; + this.listData.count = data.count; + } else { + this.monthdata = []; + this.listData.count = 0; + } + }, //鏌ヨ鏁版嵁 getAllTabesData() { @@ -2061,6 +2082,7 @@ if (data.code != 200) { this.$message.error('璧勬枡绫诲埆鍒楄〃璋冪敤澶辫触'); } + this.categoryOptions = data.result; }, //鍏抽敭瀛楁煡璇� @@ -2076,7 +2098,9 @@ }, //璧勬枡绫诲埆涓嬫媺妗嗗�兼敼鍙樿Е鍙� categorySelectChange(model, prop, options) { + this.getAllTabesData(); + }, // 椤圭洰鍚嶇О涓嬫媺妗嗗�兼敼鍙樿Е鍙� itemSelectChange(model, prop, options) { diff --git a/src/views/datamanage/SpatialData.vue b/src/views/datamanage/SpatialData.vue index 51325bf..6c7ac4e 100644 --- a/src/views/datamanage/SpatialData.vue +++ b/src/views/datamanage/SpatialData.vue @@ -112,7 +112,7 @@ <div class="dividing-line"></div> <div class="table_box" - style="height:calc(100% - 130px)" + style="height:calc(100% - 130px); " > <!-- border--> <!-- ref="filterTable"--> @@ -125,19 +125,14 @@ :data="tableData" style="width: 100% ;" border - height="100% " + height="100%" > <el-table-column type="selection" width="20" align="center" /> - <!-- <el-table-column - width="60" - align="center" - type="index" - :label="$t('common.index')" - />--> + <el-table-column min-width="135" v-for="(item, index) in attributeData" @@ -148,7 +143,7 @@ align="center" ></el-table-column> <el-table-column - min-width="180" + min-width="240" :label="$t('common.operate')" > <template slot-scope="scope"> @@ -162,8 +157,14 @@ plain size="small" @click="getAttachTable(scope.$index, scope.row)" - style="margin-left: 20px; " >{{$t('common.enclosure')}}</el-button> + <el-button + plain + size="small" + type="info" + v-if="matchState1(scope, /[]/)" + @click="getAttributeTable(scope.$index, scope.row)" + >{{$t('common.attribute')}}</el-button> </template> </el-table-column> </el-table> @@ -227,7 +228,7 @@ :title="$t('common.attachinform')" :visible.sync="dialogFormVisible" > - <div style="height: 500px; overflow: auto"> + <div style="height:68vh"> <el-form :model="formInline" class="demo-form-inline" @@ -274,57 +275,49 @@ <!-- <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="calc(100% - 100px)" - 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 - type="primary" - size="small" - @click="dialogFormVisible = false" - >纭</el-button> - <el-button - type="info" - size="small" - @click="dialogFormVisible = false" - >鍙栨秷</el-button> - </el-col> - </el-row> - </el-form-item> --> </el-form> + <el-table + :data="tableAttach" + ref="filterTable" + height="calc(100% - 130px)" + border + style="width: 100%" + @selection-change="handleAttatchChange" + > + <el-table-column + type="selection" + width="70" + /> + <el-table-column + width="60" + type="index" + :label="$t('common.index')" + /> + <el-table-column + prop="name" + :label="$t('common.fileNme')" + /> + + <el-table-column + prop="sizes" + :label="$t('common.size')" + :formatter="statSizeChange" + /> + <el-table-column + align="center" + :label="$t('common.operate')" + min-width="100" + > + <template slot-scope="scope"> + <el-link + v-if="matchState(scope, /[]/)" + @click="setAttatchDetail(scope.$index, scope.row)" + class="elLink" + >{{ $t('common.see') }}</el-link> + + </template> + </el-table-column> + </el-table> </div> </el-dialog> <el-dialog @@ -413,6 +406,97 @@ <map-sdk v-if='showMapVisible'></map-sdk> </div> </el-dialog> + <el-dialog + title="棰勮" + :append-to-body="false" + :visible.sync="dialog.dialogVisible" + width="70%" + :close-on-click-modal="false" + > + <div + v-if="dialog.isPdf" + class="pdfClass" + > + <iframe + :src="dialog.src" + type="application/x-google-chrome-pdf" + width="100%" + height="100%" + > + </iframe> + </div> + <div + v-if="dialog.isJpg" + class="pdfClass" + > + <img + style="width:100%; height:100%" + :src="dialog.src" + alt="" + /> + </div> + </el-dialog> + <el-dialog + :title="attribute.title" + :append-to-body="false" + :visible.sync="AttributedialogVisible" + width="80%" + :close-on-click-modal="false" + > + <div class="attributeBox"> + <div class="attrubuteLeft"> + <ul> + <li + v-for="item in attrbuteOption" + :class="{active:attributeFlag === item.name}" + @click="setChangeAttrubuteData(item)" + > + {{item.name}} + </li> + </ul> + </div> + <div class="attrubuteRight"> + <el-table + ref="refAttributeTable" + :data="attributeTable" + style="width:100%;" + border + height="calc(100% - 50px)" + > + <el-table-column + type="selection" + align="center" + /> + + <el-table-column + min-width="135" + v-for="(item, index) in attributeData" + :key="index" + :label="item.alias" + :prop="item.field" + show-overflow-tooltip + align="center" + ></el-table-column> + + </el-table> + <div + class="pagination_box" + style="margin-top: 10px" + > + <el-pagination + @size-change="attributeSizeChange" + @current-change="attributeCurrentChange" + :current-page="attribute.pageIndex" + :page-sizes="[10, 20, 50, 100]" + :page-size="attribute.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="attribute.count" + > + </el-pagination> + </div> + </div> + </div> + </el-dialog> </div> </template> @@ -461,30 +545,6 @@ }, fromSqlflag: false, tree: [ - { - tabDesc: "鍩虹鏁版嵁", - label: "鍩虹鏁版嵁", - value: "BD", - ns: "bd", - id: 1, - children: [], - }, - { - id: 2, - tabDesc: "涓氬姟鏁版嵁", - label: "涓氬姟鏁版嵁", - value: "BS", - ns: "bs", - children: [], - }, - { - id: 3, - tabDesc: "鍏冩暟鎹�", - label: "鍏冩暟鎹�", - value: "MD", - ns: "md", - children: [], - }, ], tableAttach: [], filedsOption: [], @@ -549,6 +609,25 @@ eventid: null, }, filterText: "", + dialog: { + dialogVisible: false, + isPdf: false, + isJpg: false, + src: '' + }, + AttributedialogVisible: false, + attribute: { + name: null, + pageIndex: 1, + pageSize: 10, + count: 0, + title: null + }, + attrbuteOption: [], + attributeFlag: null, + attributeTable: [], + attributeLayer: null, + attributeFild: null, }; }, created() { @@ -564,6 +643,131 @@ }, methods: { + //鍒嗛〉鐐瑰嚮浜嬩欢 + attributeSizeChange(val) { + this.attribute.pageSize = val; + this.attribute.pageIndex = 1; + //鑾峰彇table淇℃伅 + this.setAttributeTableData(this.attributeLayer); + }, + attributeCurrentChange(val) { + this.attribute.pageIndex = val; + //鑾峰彇table淇℃伅 + this.setAttributeTableData(this.attributeLayer); + }, + getAttributeTable(idnex, row) { + this.attribute.title = row.workname; + this.attrbuteOption = workSite; + + this.AttributedialogVisible = true; + this.setChangeAttrubuteData(this.attrbuteOption[0]) + }, + setChangeAttrubuteData(res) { + this.attributeFlag = res.name; + this.attribute.pageIndex = 1; + this.attribute.pageSize = 10; + this.attribute.count = 0; + this.attributeLayer = res; + this.setAttributeTableData(res) + }, + setAttributeTableData(res) { + var name = res.table.replaceAll("_", ""); + this.attribute.name = name; + var value = this.getAttributeDomFiled(name) + this.getAttributeTableData(value, res) + }, + + //鑾峰彇姣忎釜琛ㄥ瓧娈靛悕绉板強闃堝�� + async getAttributeDomFiled(res) { + //鏌ヨ瀛楁淇℃伅; + const fileds = await dataQuery_selectFields({ + name: res, + }); + if (fileds.code != 200) { + this.$message.error("璋冪敤鍒楄〃澶辫触,璇疯仈绯诲伐浣滀汉鍛�!"); + return; + } + + //鏌ヨ闃堝�间俊鎭紱 + const domains = await dataQuery_selectDomains({ + name: res, + }); + if (domains.code != 200) { + this.$message.error("璋冪敤鍒楄〃澶辫触,璇疯仈绯诲伐浣滀汉鍛�!"); + return; + } + var data1 = fileds.result; + var data2 = domains.result; + var std = []; + this.filedsOption = []; + for (var i in data1) { + if (data1[i].type != 'geometry' && data1[i].type) { + + 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]); + } + } + return std; + }, + + //鑾峰彇琛ㄦ牸淇℃伅 + async getAttributeTableData(res, result) { + res.then((val) => { + this.attributeFild = val; + }); + + this.attribute.filter = "workname = " + "'" + this.attribute.title + "'"; + + + const data = await dataQuery_selectByPage(this.attribute); + if (data.code != 200) { + this.$message.error("璋冪敤鍒楄〃澶辫触,璇疯仈绯诲伐浣滀汉鍛�!"); + return; + } + this.attributeTable = [] + var res_val = this.attributeFild; + this.attribute.count = data.count; + 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; + } + } + } + + this.attributeTable = data.result; + + }, + + + + matchState1(state = "", reg) { + var row = state.row; + if ( + this.listData.name == "ssurveyworksite" + ) { + return true; + } + return false; + }, + statSizeChange(row, column) { + return this.stateFormatSizes(row.sizes) + }, + stateFormatSizes(res) { + if (res >= 1024) { + const val = parseFloat(res / 1024).toFixed(3); + return val + ' GB'; + } else { + return res + ' MB'; + } + }, filterNode(value, data) { if (!value) return true; return data.label.indexOf(value) !== -1; @@ -593,6 +797,45 @@ this.$store.state.mapPopBoolean = false; this.$store.state.mapPopBoxFlag = null; }, + + refreshAttatchDetail() { + this.dialog.src = ""; + this.dialog.dialogVisible = false; + this.dialog.isPdf = false; + this.dialog.isJpg = false; + }, + //闄勪欢鏌ョ湅 + setAttatchDetail(index, row) { + + this.refreshAttatchDetail() + var name = row.name; + if (name.indexOf('.pdf') != -1) { + this.dialog.dialogVisible = true; + this.dialog.isPdf = true; + var url = BASE_URL + "/res/downloadForView?guid=" + row.guid + "&token=" + getToken(); + this.dialog.src = url + } else if (name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) { + this.dialog.dialogVisible = true; + this.dialog.isJpg = true; + var url = BASE_URL + "/res/downloadForView?guid=" + row.guid + "&token=" + getToken(); + this.dialog.src = url + } + }, + + matchState(state = "", reg) { + var row = state.row; + var name = row.name; + + if (name) { + if (name.indexOf('.pdf') != -1 || name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) { + return true; + } + } + + return false; + }, + + async setAttachDel() { var std = []; for (var i in this.attacgSelection) { @@ -689,26 +932,44 @@ if (data.code != 200) { this.$message.error("鍒楄〃璋冪敤澶辫触"); } - var option = data.result; + var val = data.result; - for (var i in option) { - var val_Data = option[i]; - val_Data.id = "1" + i; - // val_Data.label = val_Data.tabDesc + "(" + val_Data.tab + ")" - val_Data.label = val_Data.tabDesc; - option[i].id = parseInt(option[i].id); - for (var j in this.tree) { - if (this.tree[j].ns == option[i].ns) { - this.tree[j].children.push(val_Data); - } + // for (var i in option) { + // var val_Data = option[i]; + // val_Data.id = "1" + i; + // // val_Data.label = val_Data.tabDesc + "(" + val_Data.tab + ")" + // val_Data.label = val_Data.tabDesc; + // option[i].id = parseInt(option[i].id); + // for (var j in this.tree) { + // if (this.tree[j].ns == option[i].ns) { + // this.tree[j].children.push(val_Data); + // } + // } + + // } + var std = []; + val.filter((item) => { + if (std.indexOf(item.bak) == -1) { + std.push(item.bak); + this.tree.push( + { + val: item.bak, + label: item.bak, + children: [], + } + ) } - // if (option[i].ns == 'bd') { + }); - // this.tree[0].children.push(val_Data); - // } else { - // this.tree[1].children.push(val_Data); - // } - } + this.tree.filter((item) => { + val.filter((res) => { + if (item.val === res.bak) { + res.label = res.tabDesc + item.children.push(res) + } + }) + }) + this.handleNodeClick(this.tree[0].children[0]); }, //鎺堟潈绠$悊 @@ -725,10 +986,12 @@ handleNodeClick(data) { //鍒ゆ柇鐐瑰嚮鏄惁涓哄瓙鑺傜偣 if (data.children != null) return; + this.listData.name = data.entity; //瑕佹煡璇㈣〃鏍肩被鍨嬶紱 this.getClickTable = data; this.listData.pageIndex = 1; this.listData.pageSize = 10; + this.count = 0; this.upAttach.tabName = data.ns + "." + data.tab; this.filedsLayer = this.getCollapseDomFiled(); //鑾峰彇姣忎釜琛ㄥ瓧娈靛悕绉板強闃堝�� @@ -1205,6 +1468,43 @@ border: 1px solid #dcdfe6; } } + .pdfClass { + height: 70vh; + width: 100%; + position: relative; + } + .attributeBox { + height: 63vh; + width: 100%; + position: relative; + display: flex; + justify-content: space-between; + .attrubuteLeft { + width: calc(20% - 20px); + height: calc(100% - 20px); + border: 1px solid #dcdfe6; + border-radius: 5px; + padding: 10px; + li { + border-bottom: 1px solid #dcdfe6; + line-height: 30px; + text-align: center; + } + li:hover { + background: rgba(255, 255, 255, 0.3); + color: #409eff; + } + .active { + color: #409eff; + } + } + .attrubuteRight { + width: 79%; + height: 100%; + border: 1px solid #dcdfe6; + border-radius: 5px; + } + } } .table_box2 { diff --git a/src/views/datamanage/versionManage.vue b/src/views/datamanage/versionManage.vue index 43224b1..4efbbaf 100644 --- a/src/views/datamanage/versionManage.vue +++ b/src/views/datamanage/versionManage.vue @@ -687,6 +687,7 @@ .then((_) => { this.dialogFormVisible = false this.upform = {}; + this.getRoleTabelData(); }) .catch((_) => { }); // this.dialogFormVisible = false; @@ -721,6 +722,7 @@ .then((_) => { this.InsertFormdialog = false this.insertform = {}; + this.getRoleTabelData(); }) .catch((_) => { }); // this.InsertFormdialog = false; @@ -796,6 +798,7 @@ this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") .then((_) => { this.dialogFormVisible = false + this.getRoleTabelData(); }) .catch((_) => { }); }, @@ -803,6 +806,7 @@ this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") .then((_) => { this.InsertFormdialog = false + this.getRoleTabelData(); }) .catch((_) => { }); }, diff --git a/src/views/maintenance/blackwhiteList.vue b/src/views/maintenance/blackwhiteList.vue index 94f146e..8d62b15 100644 --- a/src/views/maintenance/blackwhiteList.vue +++ b/src/views/maintenance/blackwhiteList.vue @@ -479,6 +479,8 @@ this.$nextTick(() => { this.editForm = JSON.parse(this.initialForm); }); + this.BGetList(); + this.WGetList(); }) .catch((_) => { }); }, diff --git a/src/views/maintenance/parameterConfiguration.vue b/src/views/maintenance/parameterConfiguration.vue index b3e69d8..f940fdb 100644 --- a/src/views/maintenance/parameterConfiguration.vue +++ b/src/views/maintenance/parameterConfiguration.vue @@ -211,6 +211,7 @@ .then((_) => { this.EditFormdialog = false; this.upform = {}; + this.getRoleTabelData(); }) .catch((_) => { }); }, diff --git a/src/views/maintenance/tokentool.vue b/src/views/maintenance/tokentool.vue index 9f2a75c..96b975e 100644 --- a/src/views/maintenance/tokentool.vue +++ b/src/views/maintenance/tokentool.vue @@ -469,6 +469,7 @@ .then((_) => { this.EditFormdialog = false; this.upform = {}; + this.getRoleTabelData(); }) .catch((_) => { }); }, @@ -664,6 +665,7 @@ this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") .then((_) => { this.EditFormdialog = false + this.getRoleTabelData(); }) .catch((_) => { }); }, diff --git a/src/views/userManage/authorityManage.vue b/src/views/userManage/authorityManage.vue index 17aa037..b169c0c 100644 --- a/src/views/userManage/authorityManage.vue +++ b/src/views/userManage/authorityManage.vue @@ -494,6 +494,7 @@ .then((_) => { this.EditFormdialog = false; this.upform = {}; + this.getRoleTabelData(); }) .catch((_) => { }); }, diff --git a/src/views/userManage/roleManage.vue b/src/views/userManage/roleManage.vue index 7272266..270015c 100644 --- a/src/views/userManage/roleManage.vue +++ b/src/views/userManage/roleManage.vue @@ -830,6 +830,7 @@ .then((_) => { this.UpdateFormdialog = false; this.updateform = {}; + this.getRoleTabelData(); }) .catch((_) => { }); }, @@ -944,6 +945,7 @@ this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") .then((_) => { this.UpdateFormdialog = false + this.getRoleTabelData(); }) .catch((_) => { }); }, -- Gitblit v1.9.3