From c96f313ccfc3eee0fd9c29287c7bd5efec918c48 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Thu, 18 Aug 2022 13:57:38 +0800 Subject: [PATCH 01/60] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E7=BB=8F=E7=BA=AC?= =?UTF-8?q?=E5=BA=A6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../regionalParty/activitysForm.vue | 26 ++++++++++++------- .../regionalParty/unitsForm.vue | 26 ++++++++++++++----- .../modules/shequzhili/event/cpts/add.vue | 14 ++++++++-- 3 files changed, 48 insertions(+), 18 deletions(-) diff --git a/src/views/modules/communityParty/regionalParty/activitysForm.vue b/src/views/modules/communityParty/regionalParty/activitysForm.vue index efd2c776a..94ce4234b 100644 --- a/src/views/modules/communityParty/regionalParty/activitysForm.vue +++ b/src/views/modules/communityParty/regionalParty/activitysForm.vue @@ -254,8 +254,8 @@ export default { peopleCount: 0,//服务人数 result: '', //活动结果 address: '', //详细地址 - longitude: 36.0722275, //经度 - latitude: 120.38945519 //纬度 + longitude: 120.38945519, //经度 + latitude: 36.0722275 //纬度 }, serviceList: [], // gridList: [], @@ -274,23 +274,31 @@ export default { async initForm (type, activityId) { this.startLoading() this.$refs.ref_form.resetFields(); - // const { user } = this.$store.state - // this.agencyId = user.agencyId - // await this.loadGrid() //获取服务事项 await this.loadService() + let { latitude, longitude } = this.$store.state.user; + if (!latitude || latitude == "" || latitude == "0") { + latitude = 39.9088810666821; + longitude = 116.39743841556731; + } + + this.formData.latitude = latitude + this.formData.longitude = longitude + this.formType = type if (activityId) { this.activityId = activityId this.formData.id = activityId await this.loadFormData() } else { - map.setCenter(new TMap.LatLng(36.0722275, 120.38945519)) - this.setMarker(36.0722275, 120.38945519) + } + + map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude)) + this.setMarker(this.formData.latitude, this.formData.longitude) this.endLoading() }, @@ -353,8 +361,8 @@ export default { } console.log(this.formData.content) - map.setCenter(new TMap.LatLng(parseFloat(this.formData.latitude), parseFloat(this.formData.longitude))) - this.setMarker(this.formData.latitude, this.formData.longitude) + // map.setCenter(new TMap.LatLng(parseFloat(this.formData.latitude), parseFloat(this.formData.longitude))) + // this.setMarker(this.formData.latitude, this.formData.longitude) } else { this.$message.error(msg) } diff --git a/src/views/modules/communityParty/regionalParty/unitsForm.vue b/src/views/modules/communityParty/regionalParty/unitsForm.vue index ac3965ea8..06b5eece2 100644 --- a/src/views/modules/communityParty/regionalParty/unitsForm.vue +++ b/src/views/modules/communityParty/regionalParty/unitsForm.vue @@ -189,8 +189,8 @@ export default { memberCount: 0, remark: '', //备注【最大500字】 address: '', //详细地址 - longitude: 36.0722275, //经度 - latitude: 120.38945519 //纬度 + longitude: 120.38945519, //经度 + latitude: 36.0722275//纬度 }, serviceList: [],//服务list @@ -198,6 +198,7 @@ export default { }, components: {}, mounted () { + this.initMap() }, @@ -210,16 +211,27 @@ export default { //获取服务事项 await this.loadService() + let { latitude, longitude } = this.$store.state.user; + if (!latitude || latitude == "" || latitude == "0") { + latitude = 39.9088810666821; + longitude = 116.39743841556731; + } + + this.formData.latitude = latitude + this.formData.longitude = longitude + this.formType = type if (unitId) { this.unitId = unitId this.formData.id = unitId await this.loadFormData() } else { - map.setCenter(new TMap.LatLng(36.0722275, 120.38945519)) - this.setMarker(36.0722275, 120.38945519) + } + map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude)) + this.setMarker(this.formData.latitude, this.formData.longitude) + this.endLoading() }, @@ -259,8 +271,8 @@ export default { } this.formData = { ...data } - map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude)) - this.setMarker(this.formData.latitude, this.formData.longitude) + // map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude)) + // this.setMarker(this.formData.latitude, this.formData.longitude) } else { this.$message.error(msg) } @@ -329,7 +341,7 @@ export default { // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 initMap () { // 定义地图中心点坐标 - var center = new window.TMap.LatLng(36.0722275, 120.38945519) + var center = new window.TMap.LatLng(this.formData.latitude, this.formData.longitude) // 定义map变量,调用 TMap.Map() 构造函数创建地图 map = new window.TMap.Map(document.getElementById('app'), { center: center, // 设置地图中心点坐标 diff --git a/src/views/modules/shequzhili/event/cpts/add.vue b/src/views/modules/shequzhili/event/cpts/add.vue index b53caf480..d3581582a 100644 --- a/src/views/modules/shequzhili/event/cpts/add.vue +++ b/src/views/modules/shequzhili/event/cpts/add.vue @@ -402,10 +402,20 @@ export default { async mounted () { const { user } = this.$store.state this.agencyId = user.agencyId + let { latitude, longitude } = this.$store.state.user; + if (!latitude || latitude == "" || latitude == "0") { + latitude = 39.9088810666821; + longitude = 116.39743841556731; + } + + this.formData.latitude = latitude + this.formData.longitude = longitude + + this.initMap() this.loadGrid(); this.getCategoryList() - this.initMap() + }, @@ -597,7 +607,7 @@ export default { // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 initMap () { // 定义地图中心点坐标 - var center = new window.TMap.LatLng(36.0722275, 120.38945519) + var center = new window.TMap.LatLng(this.formData.latitude, this.formData.longitude) // 定义map变量,调用 TMap.Map() 构造函数创建地图 map = new window.TMap.Map(document.getElementById('app'), { center: center, // 设置地图中心点坐标 From ab4ad940a5e0477c5419d1a63b9e8af9c44e3cf6 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Thu, 18 Aug 2022 16:36:16 +0800 Subject: [PATCH 02/60] =?UTF-8?q?=E7=BB=8F=E7=BA=AC=E5=BA=A6=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../regionalParty/activitysForm.vue | 53 +++++++++---------- .../communityParty/regionalParty/units.vue | 19 +++---- .../regionalParty/unitsDetail.vue | 3 +- .../regionalParty/unitsForm.vue | 31 ++++++----- 4 files changed, 55 insertions(+), 51 deletions(-) diff --git a/src/views/modules/communityParty/regionalParty/activitysForm.vue b/src/views/modules/communityParty/regionalParty/activitysForm.vue index 94ce4234b..a45a5b80b 100644 --- a/src/views/modules/communityParty/regionalParty/activitysForm.vue +++ b/src/views/modules/communityParty/regionalParty/activitysForm.vue @@ -234,6 +234,22 @@ var geocoder // 新建一个正逆地址解析类 let loading // 加载动画 export default { data () { + let initFormData = () => { + let _form = { + unitName: '', + serviceMatterList: [], + type: '', + contact: '', + contactMobile: '', + memberCount: 0, + remark: '', //备注【最大500字】 + address: '', //详细地址 + longitude: this.$store.state.user.longitude, //经度 + latitude: this.$store.state.user.latitude//纬度 + } + + return _form + } return { formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 @@ -241,22 +257,7 @@ export default { keyWords: '', activityId: '', - formData: { - gridId: '', - serviceMatter: '',//服务事项 - serviceMatterList: [], - unitId: '',//单位ID - unitIdList: [], - title: '',//活动标题 - target: '',//活动目标 - content: '',//活动内容 - activityTime: '',//活动时间 - peopleCount: 0,//服务人数 - result: '', //活动结果 - address: '', //详细地址 - longitude: 120.38945519, //经度 - latitude: 36.0722275 //纬度 - }, + formData: initFormData(), serviceList: [], // gridList: [], agencyId: '' @@ -527,20 +528,16 @@ export default { this.activityId = '' this.keyWords = '' this.formData = { - gridId: '', - serviceMatter: '',//服务事项 + unitName: '', serviceMatterList: [], - unitId: '',//单位ID - unitIdList: [], - title: '',//活动标题 - target: '',//活动目标 - content: '',//活动内容 - activityTime: '',//活动时间 - peopleCount: 0,//服务人数 - result: '', //活动结果 + type: '', + contact: '', + contactMobile: '', + memberCount: 0, + remark: '', //备注【最大500字】 address: '', //详细地址 - longitude: 36.0722275, //经度 - latitude: 120.38945519 //纬度 + longitude: this.$store.state.user.longitude, //经度 + latitude: this.$store.state.user.latitude//纬度 } }, // 开启加载动画 diff --git a/src/views/modules/communityParty/regionalParty/units.vue b/src/views/modules/communityParty/regionalParty/units.vue index 0feb07c8b..23db7d00e 100644 --- a/src/views/modules/communityParty/regionalParty/units.vue +++ b/src/views/modules/communityParty/regionalParty/units.vue @@ -477,9 +477,10 @@ export default { }, handleDetail (row) { - this.detailShow = true + this.formTitle = '详情' + this.formShow = true this.$nextTick(() => { - this.$refs.ref_detail.initForm(row) + this.$refs.ref_form.initForm('detail', row.id) }) }, @@ -501,7 +502,7 @@ export default { handleAdd () { this.formTitle = '新增' - this.formShow = 'edit' + this.formShow = true this.$nextTick(() => { this.$refs.ref_form.initForm('add', null) }) @@ -574,12 +575,12 @@ export default { if (code === 0) { if (data.type) { - this.$message({ - type: "success", - message: data.msg || "同步成功" - }); - - this.loadTable() + this.$message({ + type: "success", + message: data.msg || "同步成功" + }); + + this.loadTable() } else { this.$message.error(data.msg) } diff --git a/src/views/modules/communityParty/regionalParty/unitsDetail.vue b/src/views/modules/communityParty/regionalParty/unitsDetail.vue index 306fc3f83..b9f18486b 100644 --- a/src/views/modules/communityParty/regionalParty/unitsDetail.vue +++ b/src/views/modules/communityParty/regionalParty/unitsDetail.vue @@ -106,7 +106,7 @@ export default { } }, components: {}, - mounted () { + created () { this.initMap() }, @@ -118,6 +118,7 @@ export default { }, async initForm (row) { + this.startLoading() this.formData = { ...row } map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude)) diff --git a/src/views/modules/communityParty/regionalParty/unitsForm.vue b/src/views/modules/communityParty/regionalParty/unitsForm.vue index 06b5eece2..f6de440b1 100644 --- a/src/views/modules/communityParty/regionalParty/unitsForm.vue +++ b/src/views/modules/communityParty/regionalParty/unitsForm.vue @@ -173,14 +173,8 @@ var geocoder // 新建一个正逆地址解析类 let loading // 加载动画 export default { data () { - return { - formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 - - btnDisable: false, - - unitId: '', - keyWords: '', - formData: { + let initFormData = () => { + let _form = { unitName: '', serviceMatterList: [], type: '', @@ -189,9 +183,20 @@ export default { memberCount: 0, remark: '', //备注【最大500字】 address: '', //详细地址 - longitude: 120.38945519, //经度 - latitude: 36.0722275//纬度 - }, + longitude: this.$store.state.user.longitude, //经度 + latitude: this.$store.state.user.latitude//纬度 + } + + return _form + } + return { + formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 + + btnDisable: false, + + unitId: '', + keyWords: '', + formData: initFormData(), serviceList: [],//服务list } @@ -462,8 +467,8 @@ export default { memberCount: 0, remark: '', //备注【最大500字】 address: '', //详细地址 - longitude: '', //经度 - latitude: '' //纬度 + longitude: this.$store.state.user.longitude, //经度 + latitude: this.$store.state.user.latitude//纬度 } }, // 开启加载动画 From 14af9a12e2e73615ca85ff6885ba204438a3e2db Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 19 Aug 2022 13:18:12 +0800 Subject: [PATCH 03/60] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/shequzhili/event/eventList.vue | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/src/views/modules/shequzhili/event/eventList.vue b/src/views/modules/shequzhili/event/eventList.vue index 1632a2d5c..b4a8e2a08 100644 --- a/src/views/modules/shequzhili/event/eventList.vue +++ b/src/views/modules/shequzhili/event/eventList.vue @@ -49,9 +49,9 @@ @@ -317,6 +317,10 @@ @click="handleWatch(scope.row)" type="text" size="small">查看 + 删除 @@ -400,7 +404,7 @@ export default { } return { - pageType: "list", // 列表list 新增add 处理dispose 详情info + pageType: "list", // 列表list 新增add 处理dispose 详情info user: {}, agencyId: '', gridList: [],//所属网格list--场所区域 @@ -694,15 +698,22 @@ export default { this.getTableData(); }, - async handleDel (rowData, rowIndex) { - console.log(rowData, rowIndex); - const url = - "/heart/iccommunityselforganization/delcommunityselforganization"; - const { tableData } = this; + async handleDel (rowData) { + let message = "确认删除?"; - const { data, code, msg } = await requestPost(url, { - orgId: tableData[rowIndex].orgId, - }); + this.$confirm(message, "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }).then(() => { + this.delEvent(rowData.icEventId); + }).catch((err) => { }); + }, + async delEvent (eventId){ + const url = "/gov/project/icEvent/delete"; + let idsArr = [eventId]; + + const { data, code, msg } =await requestPost(url, idsArr); if (code === 0) { this.$message.success("删除成功!"); @@ -790,7 +801,7 @@ export default { secondIdList: [], } this.eventTypeCheck = [] - + this.pageNo = 1 this.getTableData(); From 09e4578c8e1401f09cd16ee9dac3b1ee6f4310c8 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 19 Aug 2022 16:01:25 +0800 Subject: [PATCH 04/60] =?UTF-8?q?=E8=AF=81=E4=BB=B6=E5=8F=B7=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/validate.js | 10 + src/views/components/resiForm.vue | 495 ++++++++++++++++-------------- 2 files changed, 272 insertions(+), 233 deletions(-) diff --git a/src/utils/validate.js b/src/utils/validate.js index a130010f2..659eeb346 100644 --- a/src/utils/validate.js +++ b/src/utils/validate.js @@ -39,3 +39,13 @@ export function isURL(s) { export function isCard(s) { return /^(\d{15}$)|(^\d{17}([0-9]|X)$)/.test(s); } +/** + * 护照 + * @param {*} s + */ +export function isPassport(s) { + let reg=/(^[EeKkGgDdSsPpHh]\d{8}$)|(^(([Ee][a-fA-F])|([DdSsPp][Ee])|([Kk][Jj])|([Mm][Aa])|(1[45]))\d{7}$)/; //护照(包括香港和澳门) + + + return reg.test(s); +} diff --git a/src/views/components/resiForm.vue b/src/views/components/resiForm.vue index 505fe55c0..014216e24 100644 --- a/src/views/components/resiForm.vue +++ b/src/views/components/resiForm.vue @@ -1,91 +1,115 @@