From b9e4c29a57cc8c74f8807cb3c05d30d759315625 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 28 Jun 2022 16:57:02 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E7=BB=BC=E5=90=88=E6=B2=BB=E7=90=86?= =?UTF-8?q?=E5=9B=BE=E5=B1=82=E6=9F=A5=E8=AF=A2=E5=A2=9E=E5=8A=A0=E6=89=80?= =?UTF-8?q?=E5=B1=9E=E7=BB=84=E7=BB=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shequzhili/tuceng/zhonghe/base.vue | 149 +++++++++++++++--- 1 file changed, 127 insertions(+), 22 deletions(-) diff --git a/src/views/modules/shequzhili/tuceng/zhonghe/base.vue b/src/views/modules/shequzhili/tuceng/zhonghe/base.vue index d093107d1..4082d3b05 100644 --- a/src/views/modules/shequzhili/tuceng/zhonghe/base.vue +++ b/src/views/modules/shequzhili/tuceng/zhonghe/base.vue @@ -9,7 +9,19 @@ class="demo-form-inline" >
- + +
+ +
+
+ +
@@ -331,6 +344,15 @@ export default { optionsH: [], optionsD: [], optionsG: [], + orgOptions: [], + orgOptionProps:{ + multiple: false, + value: 'agencyId', + label: 'agencyName', + children: 'subAgencyList', + checkStrictly: true + }, + agencyIdArray:[], optionsWelfare: [ { @@ -344,6 +366,7 @@ export default { ], fmData: { + agencyId:"", gridId: "", villageId: "", buildId: "", @@ -410,6 +433,7 @@ export default { }, }, mounted() { + this.getOrgTreeList(); this.getGridList(); this.getValiheList(); this.getTableData(); @@ -465,6 +489,24 @@ export default { this.getHouseList(); }, + getOrgTreeList() { + const { user } = this.$store.state + this.$http + .post('/gov/org/customeragency/agencygridtree', {}) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } else { + console.log('获取组织树成功', res.data) + this.orgOptions=[] + this.orgOptions .push( res.data) + } + }) + .catch(() => { + return this.$message.error('网络错误') + }) + }, + getGridList() { const { user } = this.$store.state; this.$http @@ -489,7 +531,7 @@ export default { this.$http .post("/gov/org/icneighborhood/neighborhoodoption", { gridId: this.fmData.gridId, - agencyId: "", + agencyId: this.fmData.agencyId, // agencyId: user.agencyId }) .then(({ data: res }) => { @@ -579,62 +621,125 @@ export default { this.handleSearch(); }, + handleChangeAgency(val) { + let obj = this.$refs["myCascader"].getCheckedNodes()[0].data + + if (obj) { + if(obj.level === 'grid'){ + this.fmData.gridId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; + this.fmData.agencyId='' + }else{ + this.fmData.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; + this.fmData.gridId = '' + } + + }else{ + this.fmData.agencyId='' + this.fmData.gridId = '' + } + + + this.fmData.villageId = '' + this.fmData.buildId = '' + this.fmData.unitId = '' + this.fmData.homeId = '' + this.getValiheList() + }, + computeQueryParams() { const { pageSize, pageNo, elseParams, fmData } = this; + let conditions=[] + if(fmData.agencyId){ + conditions.push({ + queryType: "like", + tableName: "ic_resi_user", + columnName: "AGENCY_ID", + columnValue: [fmData.agencyId], + },) + } - return { - formCode: "resi_base_info", - pageSize, - pageNo, - conditions: [ + if(fmData.gridId){ + conditions.push( { queryType: "equal", tableName: "ic_resi_user", columnName: "GRID_ID", columnValue: [fmData.gridId], - }, + } + ) + } + + if(fmData.villageId){ + conditions.push( { queryType: "equal", tableName: "ic_resi_user", columnName: "VILLAGE_ID", columnValue: [fmData.villageId], - }, - { + } + ) + } + + if(fmData.buildId){ + conditions.push({ queryType: "equal", tableName: "ic_resi_user", columnName: "BUILD_ID", columnValue: [fmData.buildId], - }, - { + }) + } + + if(fmData.unitId){ + conditions.push({ queryType: "equal", tableName: "ic_resi_user", columnName: "UNIT_ID", columnValue: [fmData.unitId], - }, - { + }) + } + + if(fmData.homeId){ + conditions.push({ queryType: "equal", tableName: "ic_resi_user", columnName: "HOME_ID", columnValue: [fmData.homeId], - }, - { + }) + } + + if(fmData.name){ + conditions.push({ queryType: "like", tableName: "ic_resi_user", columnName: "NAME", columnValue: [fmData.name], - }, - { + }) + } + if(fmData.mobile){ + conditions.push({ queryType: "like", tableName: "ic_resi_user", columnName: "MOBILE", columnValue: [fmData.mobile], - }, - { + }) + } + if(fmData.idCard){ + conditions.push({ queryType: "like", tableName: "ic_resi_user", columnName: "ID_CARD", columnValue: [fmData.idCard], - }, + }) + } + + return { + formCode: "resi_base_info", + pageSize, + pageNo, + conditions: [ + + ...conditions, + ...elseParams, ], }; From 56cf560b3dc3ea104b4e293757aa4e2933e2bb51 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 28 Jun 2022 17:13:02 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/shequzhili/csgltc/csglDetail.vue | 44 +++++++------------ .../modules/shequzhili/ggfwtc/ggfwDetail.vue | 34 +++----------- 2 files changed, 23 insertions(+), 55 deletions(-) diff --git a/src/views/modules/shequzhili/csgltc/csglDetail.vue b/src/views/modules/shequzhili/csgltc/csglDetail.vue index b568e5325..af3dff975 100644 --- a/src/views/modules/shequzhili/csgltc/csglDetail.vue +++ b/src/views/modules/shequzhili/csgltc/csglDetail.vue @@ -11,7 +11,7 @@ prop="name" label-width="150px" style="display: block"> - {{formData.name}} + {{formData.name}} - {{formData.categoryName}} + {{formData.categoryName}} - {{formData.areaCovered}} + {{formData.areaCovered}} - {{formData.capacity}} + {{formData.capacity}} - {{formData.address}} - - -
-
-
- 经度 - - - 纬度 - - -
+
+ {{formData.address}} +
+
@@ -118,7 +99,14 @@ export default { // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 initMap () { // 定义地图中心点坐标 - var center = new window.TMap.LatLng(36.0722275, 120.38945519) + let { latitude, longitude } = this.$store.state.user; + console.log('lat'+latitude+',lon'+longitude) + if (!latitude || latitude == "" || latitude == "0") { + latitude = 39.9088810666821; + longitude = 116.39743841556731; + } + // 定义地图中心点坐标 + var center = new window.TMap.LatLng(latitude, longitude); // 定义map变量,调用 TMap.Map() 构造函数创建地图 map = new window.TMap.Map(document.getElementById('app'), { center: center, // 设置地图中心点坐标 diff --git a/src/views/modules/shequzhili/ggfwtc/ggfwDetail.vue b/src/views/modules/shequzhili/ggfwtc/ggfwDetail.vue index 42d9d9a1f..8a2578291 100644 --- a/src/views/modules/shequzhili/ggfwtc/ggfwDetail.vue +++ b/src/views/modules/shequzhili/ggfwtc/ggfwDetail.vue @@ -11,7 +11,7 @@ prop="name" label-width="150px" style="display: block"> - {{formData.name}} + {{formData.name}}
- {{formData.categoryName}} + {{formData.categoryName}} - {{formData.areaCovered}} + {{formData.areaCovered}} - {{formData.capacity}} + {{formData.capacity}} - {{formData.address}} - - -
-
-
- 经度 - - - 纬度 - - -
+
+ {{formData.address}} +
From a77f6c1f2a6e8bee9f485e20489abacdf8524ed2 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 28 Jun 2022 17:17:50 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E5=8F=AF=E8=A7=86=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 3 ++- .../visual/communityGovern/fivelayers/mapIndex.vue | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.env.development b/.env.development index fa857bf28..9e8a52665 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,7 @@ NODE_ENV=development # VUE_APP_API_SERVER = http://epmet-dev.elinkservice.cn:41080/api -VUE_APP_API_SERVER = http://192.168.1.140/api +# VUE_APP_API_SERVER = http://192.168.1.140/api +VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api # VUE_APP_API_SERVER = https://epmet-cloud.elinkservice.cn/api # VUE_APP_API_SERVER = https://epdc-shibei.elinkservice.cn/api diff --git a/src/views/modules/visual/communityGovern/fivelayers/mapIndex.vue b/src/views/modules/visual/communityGovern/fivelayers/mapIndex.vue index 6eaef99d3..5535dc576 100644 --- a/src/views/modules/visual/communityGovern/fivelayers/mapIndex.vue +++ b/src/views/modules/visual/communityGovern/fivelayers/mapIndex.vue @@ -305,7 +305,7 @@
-
+
企事业信息
场所类型: {{ selInfo.placeTypeName }} @@ -782,10 +782,11 @@ const vueGis = { this.loadGroupRent(info) } + if (info.placeType === 'party_unit') {//来自联建单位的机关直属部门 this.loadPartyUnit(info) } - if (info.placeType === 'enterprise_partrol') {//来自企事业查询的 + if (info.placeType === 'enterprise_patrol') {//来自企事业查询的 this.loadEnterprisePartrol(info) } @@ -1009,10 +1010,10 @@ const vueGis = { }, async loadEnterprisePartrol (info) { - const url = "/gov/org/enterprise/detail" + const url = "/gov/org/enterprise/detail/" + info.id // const url = "http://yapi.elinkservice.cn/mock/245/gov/org/enterprise/detail" - const { data, code, msg } = await requestGet(url) + const { data, code, msg } = await requestPost(url) if (code === 0) { // debugger From 5d83f83d95e007eda57dc7529fe8bc59551a938f Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 28 Jun 2022 17:20:32 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index 9e8a52665..fd937c0d6 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ NODE_ENV=development # VUE_APP_API_SERVER = http://epmet-dev.elinkservice.cn:41080/api -# VUE_APP_API_SERVER = http://192.168.1.140/api -VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api +VUE_APP_API_SERVER = http://192.168.1.140/api +# VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api # VUE_APP_API_SERVER = https://epmet-cloud.elinkservice.cn/api # VUE_APP_API_SERVER = https://epdc-shibei.elinkservice.cn/api From ed7ac80be6c37723043707819ddd4c892147e3cb Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Tue, 28 Jun 2022 17:21:19 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=E3=80=81=E5=9C=B0=E5=9B=BE=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=BB=8F?= =?UTF-8?q?=E7=BA=AC=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + .../communityService/dqfwzx/cpts/edit.vue | 21 +++++++-- .../communityService/sqzzz/cpts/edit.vue | 10 ++-- src/views/modules/cpts/base/cpts/edit.vue | 47 +++++++++++++++---- src/views/modules/cpts/base/index.vue | 30 +++++++++--- .../shequzhili/tuceng/anquan/weihua/index.vue | 8 ++++ .../shequzhili/tuceng/anquan/xuncha/index.vue | 8 ++++ .../shequzhili/tuceng/yingji/ziyuan/index.vue | 8 ++++ .../shequzhili/tuceng/zhonghe/base.vue | 4 +- 9 files changed, 108 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index 3def21d39..ca7e8abbb 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "dependencies": { "@riophae/vue-treeselect": "^0.4.0", "@tinymce/tinymce-vue": "^3.2.8", + "async-validator": "^4.2.5", "axios": "^0.19.0", "babel-eslint": "^8.0.1", "babel-plugin-component": "^1.1.1", diff --git a/src/views/modules/communityService/dqfwzx/cpts/edit.vue b/src/views/modules/communityService/dqfwzx/cpts/edit.vue index 8b31439d7..c3fd4bb3b 100644 --- a/src/views/modules/communityService/dqfwzx/cpts/edit.vue +++ b/src/views/modules/communityService/dqfwzx/cpts/edit.vue @@ -140,7 +140,7 @@ >查询
-
+
经度 { - this.handleMoveCenter(); + map.on("panend", (e) => { + this.handleMoveCenter(e); }); - this.handleMoveCenter(); + // this.handleMoveCenter(); }, setMarker(lat, lng) { @@ -510,7 +513,7 @@ export default { }); }, - handleMoveCenter() { + handleMoveCenter(e) { //修改地图中心点 const center = map.getCenter(); const lat = center.getLat(); @@ -518,6 +521,14 @@ export default { this.dataForm.latitude = lat; this.dataForm.longitude = lng; this.setMarker(lat, lng); + + if (e && e.originalEvent) { + geocoder + .getAddress({ location: new TMap.LatLng(lat, lng) }) // 将给定的坐标位置转换为地址 + .then((result) => { + this.dataForm.locationAddress = result.result.address; + }); + } }, async initForm(type, row) { diff --git a/src/views/modules/communityService/sqzzz/cpts/edit.vue b/src/views/modules/communityService/sqzzz/cpts/edit.vue index e0c54fcc3..0b756bafa 100644 --- a/src/views/modules/communityService/sqzzz/cpts/edit.vue +++ b/src/views/modules/communityService/sqzzz/cpts/edit.vue @@ -186,13 +186,13 @@ 查询
-
+
经度 { this.handleMoveCenter(e); }); - this.handleMoveCenter(); + // this.handleMoveCenter(); }, setMarker(lat, lng) { @@ -613,7 +613,7 @@ export default { width: 200px; } .item_width_4 { - width: 200px; + width: 430px; } .div_map { diff --git a/src/views/modules/cpts/base/cpts/edit.vue b/src/views/modules/cpts/base/cpts/edit.vue index 5bcaa412d..8c88f8f0b 100644 --- a/src/views/modules/cpts/base/cpts/edit.vue +++ b/src/views/modules/cpts/base/cpts/edit.vue @@ -110,11 +110,12 @@ style="margin-left: 10px" type="default" size="small" + ref="mapSearch" @click="handleSearchMap(item)" >查询
-
+
经度 查询
-
+
经度 import { requestPost } from "@/js/dai/request"; import nextTick from "dai-js/tools/nextTick"; +import Schema from "async-validator"; var map; var search; @@ -349,14 +351,16 @@ export default { }, editFixedParams: { type: Object, - default: () => { - return {}; - }, + default: () => ({}), }, editParamsDiv: { type: Number, default: 0, }, + editElseRules: { + type: Object, + default: () => ({}), + }, }, data() { @@ -460,7 +464,7 @@ export default { // 定义map变量,调用 TMap.Map() 构造函数创建地图 map = new window.TMap.Map(document.getElementById("app"), { center: center, // 设置地图中心点坐标 - zoom: 17.2, // 设置地图缩放级别 + zoom: 15, // 设置地图缩放级别 pitch: 43.5, // 设置俯仰角 rotation: 45, // 设置地图旋转角度 }); @@ -479,7 +483,7 @@ export default { map.on("panend", (e) => { this.handleMoveCenter(item, e); }); - this.handleMoveCenter(item); + // this.handleMoveCenter(item); }, setMarker(lat, lng) { @@ -569,8 +573,15 @@ export default { console.log("------------------------------------info", this.fmData); await nextTick(800); - if (map && data.latitude) { - map.setCenter(new TMap.LatLng(data.latitude, data.longitude)); + if (map) { + if (data.latitude) { + map.setCenter(new TMap.LatLng(data.latitude, data.longitude)); + } else { + if (this.$refs && this.$refs.mapSearch) { + console.log(this.$refs.mapSearch[0].handleClick); + this.$refs.mapSearch[0].handleClick(); + } + } } } else { this.$message.error(msg); @@ -587,12 +598,28 @@ export default { this.btnDisable = false; }, 5000); + console.log(this.$refs["ref_form"]); + this.$refs["ref_form"].validate((valid, messageObj) => { + console.log(valid, messageObj); if (!valid) { app.util.validateRule(messageObj); this.btnDisable = false; } else { - this.submit(); + if (this.editElseRules) { + const validator = new Schema(this.editElseRules); + validator + .validate(this.fmData) + .then(() => { + this.submit(); + }) + .catch(({ err, fields }) => { + console.log("--------------", err, fields); + app.util.validateRule(fields); + }); + } else { + this.submit(); + } } }); }, diff --git a/src/views/modules/cpts/base/index.vue b/src/views/modules/cpts/base/index.vue index 39be8e8eb..3c8250b48 100644 --- a/src/views/modules/cpts/base/index.vue +++ b/src/views/modules/cpts/base/index.vue @@ -1,7 +1,7 @@