From 59004e86ca49bb5acbb32c4e4866e91bb8bfd959 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Mon, 13 Jun 2022 14:38:31 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=98=BE=E9=9A=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/shequzhili/event/cpts/event-detail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/shequzhili/event/cpts/event-detail.vue b/src/views/modules/shequzhili/event/cpts/event-detail.vue index 2158a7bdf..899f0abb9 100644 --- a/src/views/modules/shequzhili/event/cpts/event-detail.vue +++ b/src/views/modules/shequzhili/event/cpts/event-detail.vue @@ -79,7 +79,7 @@ -
关闭 From f64c46903893acaa722956766c4fc258b65e4f02 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Mon, 13 Jun 2022 16:34:16 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/shequzhili/event/cpts/event-detail.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/modules/shequzhili/event/cpts/event-detail.vue b/src/views/modules/shequzhili/event/cpts/event-detail.vue index 899f0abb9..bcb0579a8 100644 --- a/src/views/modules/shequzhili/event/cpts/event-detail.vue +++ b/src/views/modules/shequzhili/event/cpts/event-detail.vue @@ -78,8 +78,12 @@
+ +
关闭 From 762b70be96fbb6e5a2cda45fed5c56ef7e109101 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 14 Jun 2022 11:17:22 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=81=8F=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/scss/buttonstyle copy.scss | 67 ------------ src/views/modules/workSys/mapConfig.vue | 137 +++++++++++++++++------- 2 files changed, 98 insertions(+), 106 deletions(-) delete mode 100644 src/assets/scss/buttonstyle copy.scss diff --git a/src/assets/scss/buttonstyle copy.scss b/src/assets/scss/buttonstyle copy.scss deleted file mode 100644 index d10764f3b..000000000 --- a/src/assets/scss/buttonstyle copy.scss +++ /dev/null @@ -1,67 +0,0 @@ -//新增 -.el-button--add { - color: #fff; - background-color: #22c1c3; - border-color: #22c1c3; -} -.el-button--add:hover { - color: #fff; - background-color: #05b1b4; - border-color: #05b1b4; -} -.el-button--add:focus { - color: #fff; - background-color: #22c1c3; - border-color: #22c1c3; -} - -//删除、导入 -.el-button--delete { - color: #fff; - background-color: #fe6252; - border-color: #fe6252; -} -.el-button--delete:hover { - color: #fff; - background-color: #fe6252; - border-color: #fe6252; -} -.el-button--delete:focus { - color: #fff; - background-color: #fe6252; - border-color: #fe6252; -} - -//重置、导出 -.el-button--reset { - color: #fff; - background-color: #feb349; - border-color: #feb349; -} -.el-button--reset:hover { - color: #fff; - background-color: #feb349; - border-color: #feb349; -} -.el-button--reset:focus { - color: #fff; - background-color: #feb349; - border-color: #feb349; -} - -//查询、确定 -.el-button--search:hover { - color: #fff; - background-color: #3e8ef7; - border-color: #3e8ef7; -} -.el-button--search:focus { - color: #fff; - background-color: #3e8ef7; - border-color: #3e8ef7; -} -.el-button--search { - color: #fff; - background-color: #3e8ef7; - border-color: #3e8ef7; -} diff --git a/src/views/modules/workSys/mapConfig.vue b/src/views/modules/workSys/mapConfig.vue index a991576b7..f8b73ff8e 100644 --- a/src/views/modules/workSys/mapConfig.vue +++ b/src/views/modules/workSys/mapConfig.vue @@ -49,8 +49,8 @@ resize="none" size="small" style="width:200px" - :precision="6" - :step="0.00001" + :precision="5" + :step="0.0001" placeholder='请输入经度偏差' v-model="xOffset"> @@ -58,8 +58,8 @@ @@ -100,14 +100,52 @@ width="50%" :before-close="handleClose">
- - +
+ 中心点经度: + + + 中心点纬度: + + +
+
+ + +
+
+ 经度偏差: + + + 纬度偏差: + + +
+ 取 消 @@ -248,10 +286,14 @@ const vueGis = { showOffset: false, // polygonManullyString: "POLYGON (( 120.33902844 36.10290786, 120.33928218 36.10292997, 120.33956336 36.10316381, 120.34016675 36.10367715, 120.34044913 36.10391476, 120.34045707 36.10392145, 120.34068696 36.10411489, 120.34103181 36.10436285, 120.34117309 36.10441824, 120.34134613 36.10447927, 120.34164715 36.10465122, 120.34124679 36.10507284, 120.34088128 36.10538902, 120.34076198 36.10549222, 120.34053890 36.10520966, 120.34044967 36.10507284, 120.34030632 36.10494761, 120.34019091 36.10484679, 120.33976558 36.10448095, 120.33966658 36.10439980, 120.33947147 36.10425822, 120.33932037 36.10417613, 120.33913002 36.10411307, 120.33895751 36.10406073, 120.33879451 36.10403693, 120.33864104 36.10403158, 120.33864031 36.10395235, 120.33863211 36.10305897, 120.33902175 36.10290728, 120.33902844 36.10290786))", polygonManullyString: "", - polygonStringResult: '', xOffset: 0, yOffset: 0, + xOffset_customize: 0.0051, + yOffset_customize: 0.0002, + + longitude: '', + latitude: '', } }, async mounted () { @@ -725,6 +767,14 @@ const vueGis = { }, handleManuallyOk () { + if (this.longitude || this.latitude) { + if (!(this.longitude && this.latitude)) { + this.$message({ + type: "warning", + message: "请同时填写中心点经纬度,或不填写" + }); + } + } //转化成需要的格式 //120.54033616308595,36.53603370922851,120.69620469335939,36.5408402277832,120.63166001562502,36.46771248120117,120.52728989843752,36.458786089599606,120.54033616308595,36.53603370922851 //中国经纬度范围 @@ -734,18 +784,27 @@ const vueGis = { const arrayString = this.polygonManullyString let array = arrayString.split(/[, ]/) console.log(array) - this.polygonStringResult = '' + let polygonStringResult = '' + + array.forEach(element => { let num = Number(element) if (num) { - this.polygonStringResult = this.polygonStringResult + element + ',' + polygonStringResult = polygonStringResult + element + ',' } }); - this.polygonStringResult = this.polygonStringResult.substring(0, this.polygonStringResult.length - 1) + polygonStringResult = polygonStringResult.substring(0, polygonStringResult.length - 1) + + if (this.xOffset_customize !== 0 || this.yOffset_customize !== 0) { + this.saveOffset(this.xOffset_customize, this.yOffset_customize, polygonStringResult) + } else { + this.addPolygon(polygonStringResult) + } + + - this.addPolygon(this.polygonStringResult) }, handleSetOffset () { @@ -753,7 +812,7 @@ const vueGis = { }, handleOffsetOk () { let selPolygonString = "" - let offsetPolygonString = ''//偏移后的坐标字符串 + this.subAgencyArray.forEach(element => { if (element.id === this.selAgencyId && element.coordinates && element.coordinates.length > 0) { selPolygonString = element.coordinates @@ -761,35 +820,32 @@ const vueGis = { }); if (selPolygonString) { - let tempArray = selPolygonString.split(',') - - tempArray.forEach((element, index) => { - let aaa = 0 - - if (index % 2 === 0) {//偶数 - aaa = parseFloat(element) + parseFloat(this.xOffset) - } else { - aaa = parseFloat(element) + parseFloat(this.yOffset) - } - - if (index % 2 !== 0) {//奇数 + this.saveOffset(tyhis.xOffset, this.yOffset, selPolygonString) + } - } - offsetPolygonString = offsetPolygonString + aaa + ',' + }, + saveOffset (xOffset, yOffset, selPolygonString) { + let offsetPolygonString = ''//偏移后的坐标字符串 + let tempArray = selPolygonString.split(',') - }); + tempArray.forEach((element, index) => { + let aaa = 0 - offsetPolygonString = offsetPolygonString.substring(0, offsetPolygonString.length - 1) - } + if (index % 2 === 0) {//偶数 + aaa = parseFloat(element) + parseFloat(xOffset) + } else { + aaa = parseFloat(element) + parseFloat(yOffset) + } + if (index % 2 !== 0) {//奇数 + } + offsetPolygonString = offsetPolygonString + aaa + ',' - console.log('selPolygonString', selPolygonString) - console.log('offsetPolygonString', offsetPolygonString) + }); + offsetPolygonString = offsetPolygonString.substring(0, offsetPolygonString.length - 1) this.addPolygon(offsetPolygonString) - - }, handleSetOffset () { this.handleOffsetCancel = false @@ -924,7 +980,9 @@ const vueGis = { let params = { orgId: this.selAgency.id, level: this.selAgency.level, - coordinates: coorString + coordinates: coorString, + longitude: this.longitude, + latitude: this.latitude } const { data, code, msg } = await requestPost(url, params) @@ -935,6 +993,7 @@ const vueGis = { message: "绘制成功" }); if (this.dialogVisible) { + this.polygonManullyString = ' ' this.dialogVisible = false } this.refreshMap(false) From 7206ced68fbebcf325234f21641b5d057e762e12 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 14 Jun 2022 12:43:35 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E7=BB=8F=E7=BA=AC=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/workSys/mapConfig.vue | 29 ++++++++++++++----------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/views/modules/workSys/mapConfig.vue b/src/views/modules/workSys/mapConfig.vue index f8b73ff8e..b350cbc6d 100644 --- a/src/views/modules/workSys/mapConfig.vue +++ b/src/views/modules/workSys/mapConfig.vue @@ -102,19 +102,19 @@
中心点经度: - - + + 中心点纬度: - - + +
Date: Tue, 14 Jun 2022 13:04:14 +0800 Subject: [PATCH 05/12] 11 --- src/views/modules/workSys/mapConfig.vue | 37 +++++++++++++++---------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/src/views/modules/workSys/mapConfig.vue b/src/views/modules/workSys/mapConfig.vue index b350cbc6d..6e53153d5 100644 --- a/src/views/modules/workSys/mapConfig.vue +++ b/src/views/modules/workSys/mapConfig.vue @@ -102,17 +102,13 @@
中心点经度: - 中心点纬度: -
@@ -289,11 +285,13 @@ const vueGis = { xOffset: 0, yOffset: 0, - xOffset_customize: 0.0051, - yOffset_customize: 0.0002, + xOffset_customize: 0, + yOffset_customize: 0, + // xOffset_customize: 0.0051,//市北默认偏移 + // yOffset_customize: 0.0002,//市北默认偏移 - longitude: '', - latitude: '', + longitude: undefined, + latitude: undefined, } }, async mounted () { @@ -760,8 +758,16 @@ const vueGis = { handleManually () { this.dialogVisible = true this.polygonManullyString = '' - this.longitude = '' - this.latitude = '' + this.longitude = undefined + this.latitude = undefined + if (this.selAgency) { + if (this.selAgency.longitude) { + this.longitude = this.selAgency.longitude + } + if (this.selAgency.latitude) { + this.latitude = this.selAgency.latitude + } + } }, //点击【手动录入】 @@ -770,13 +776,16 @@ const vueGis = { }, handleManuallyOk () { + if (this.longitude || this.latitude) { if (!(this.longitude && this.latitude)) { this.$message({ type: "warning", message: "请同时填写中心点经纬度,或不填写" }); + return false } + } //转化成需要的格式 //120.54033616308595,36.53603370922851,120.69620469335939,36.5408402277832,120.63166001562502,36.46771248120117,120.52728989843752,36.458786089599606,120.54033616308595,36.53603370922851 From b29566833fe74397aec243a9d95cddaa0c39e075 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 14 Jun 2022 14:57:43 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E8=81=94=E5=BB=BA=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E7=AD=89=E5=8E=BB=E9=99=A4=E7=94=B5=E8=AF=9D=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../regionalParty/unitsForm.vue | 18 +- .../ninePlaces/places/placesForm.vue | 18 +- .../communityService/sqzzz/cpts/edit.vue | 385 ++++++++---------- 3 files changed, 181 insertions(+), 240 deletions(-) diff --git a/src/views/modules/communityParty/regionalParty/unitsForm.vue b/src/views/modules/communityParty/regionalParty/unitsForm.vue index 47d2a0a91..ac3965ea8 100644 --- a/src/views/modules/communityParty/regionalParty/unitsForm.vue +++ b/src/views/modules/communityParty/regionalParty/unitsForm.vue @@ -287,15 +287,15 @@ export default { }, async addUnit () { - const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 - if (regPhone.test(this.formData.contactMobile) === false) { - this.btnDisable = false - this.$message({ - type: 'warning', - message: '请输入正确的手机号码' - }) - return false; - } + // const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 + // if (regPhone.test(this.formData.contactMobile) === false) { + // this.btnDisable = false + // this.$message({ + // type: 'warning', + // message: '请输入正确的手机号码' + // }) + // return false; + // } let url = '/heart/icpartyunit/save' // let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/save" diff --git a/src/views/modules/communityService/ninePlaces/places/placesForm.vue b/src/views/modules/communityService/ninePlaces/places/placesForm.vue index cd874d37f..29080f4a8 100644 --- a/src/views/modules/communityService/ninePlaces/places/placesForm.vue +++ b/src/views/modules/communityService/ninePlaces/places/placesForm.vue @@ -197,15 +197,15 @@ export default { }, async addPlace () { - const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 - if (regPhone.test(this.formData.mobile) === false) { - this.btnDisable = false - this.$message({ - type: 'warning', - message: '请输入正确的手机号码' - }) - return false; - } + // const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 + // if (regPhone.test(this.formData.mobile) === false) { + // this.btnDisable = false + // this.$message({ + // type: 'warning', + // message: '请输入正确的手机号码' + // }) + // return false; + // } let url = '' diff --git a/src/views/modules/communityService/sqzzz/cpts/edit.vue b/src/views/modules/communityService/sqzzz/cpts/edit.vue index 2be14c87c..3b1d06b80 100644 --- a/src/views/modules/communityService/sqzzz/cpts/edit.vue +++ b/src/views/modules/communityService/sqzzz/cpts/edit.vue @@ -1,243 +1,185 @@ @@ -255,7 +197,7 @@ var infoWindowList; let loading; // 加载动画 export default { - data() { + data () { return { formType: "add", //表单操作类型 add新增,edit编辑,detail详情 @@ -281,7 +223,7 @@ export default { }, components: {}, computed: { - dataRule() { + dataRule () { return { organizationName: [ { required: true, message: "组织名称 不能为空", trigger: "blur" }, @@ -316,15 +258,15 @@ export default { props: {}, watch: {}, - async created() { + async created () { this.getCategoryList(); }, - async mounted() { + async mounted () { this.initMap(); }, methods: { - async getCategoryList() { + async getCategoryList () { const url = "/sys/dict/data/dictlist"; const params = { dictType: "self_org_category", @@ -336,19 +278,19 @@ export default { this.$message.error(msg); } }, - handleAddStaff() { + handleAddStaff () { this.dataForm.organizationPersonnel = [ ...this.dataForm.organizationPersonnel, { personName: "", personPhone: "" }, ]; }, - handleDelStaff(index) { + handleDelStaff (index) { const { organizationPersonnel } = this.dataForm; organizationPersonnel.splice(index, 1); this.dataForm.organizationPersonnel = organizationPersonnel; }, // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 - initMap() { + initMap () { // 定义地图中心点坐标 var center = new window.TMap.LatLng(36.0722275, 120.38945519); // 定义map变量,调用 TMap.Map() 构造函数创建地图 @@ -374,7 +316,7 @@ export default { this.handleMoveCenter(); }, - setMarker(lat, lng) { + setMarker (lat, lng) { markers.setGeometries([]); markers.add([ { @@ -388,7 +330,7 @@ export default { ]); }, - handleSearchMap() { + handleSearchMap () { infoWindowList.forEach((infoWindow) => { infoWindow.close(); }); @@ -416,7 +358,7 @@ export default { }); }, - handleMoveCenter() { + handleMoveCenter () { //修改地图中心点 const center = map.getCenter(); const lat = center.getLat(); @@ -426,7 +368,7 @@ export default { this.setMarker(lat, lng); }, - async initForm(type, row) { + async initForm (type, row) { this.$refs.ref_form.resetFields(); this.formType = type; @@ -438,7 +380,7 @@ export default { } }, - async handleComfirm() { + async handleComfirm () { this.btnDisable = true; setTimeout(() => { this.btnDisable = false; @@ -448,26 +390,25 @@ export default { app.util.validateRule(messageObj); this.btnDisable = false; } else { - if (!formVltHelper.userOrMobile(this.dataForm.principalPhone)) { - return this.$message({ - type: "error", - message: "手机号格式有误", - }); - } + // if (!formVltHelper.userOrMobile(this.dataForm.principalPhone)) { + // return this.$message({ + // type: "error", + // message: "手机号格式有误", + // }); + // } const { dataForm: { organizationPersonnel }, } = this; let vlt = organizationPersonnel.every((item) => { return ( item.personName && - item.personPhone && - formVltHelper.userOrMobile(item.personPhone) + item.personPhone ); }); if (!vlt) { return this.$message({ type: "error", - message: "成员姓名/手机号为空或格式有误", + message: "成员姓名/手机号为空", }); } this.submit(); @@ -475,7 +416,7 @@ export default { }); }, - async submit() { + async submit () { let url = ""; if (this.formType === "add") { url = "/heart/iccommunityselforganization/addcommunityselforganization"; @@ -503,11 +444,11 @@ export default { } }, - handleCancle() { + handleCancle () { this.resetData(); this.$emit("dialogCancle"); }, - resetData() { + resetData () { this.orgId = ""; this.dataForm = { organizationName: "", @@ -525,7 +466,7 @@ export default { }; }, // 开启加载动画 - startLoading() { + startLoading () { loading = Loading.service({ lock: true, // 是否锁定 text: "正在加载……", // 加载中需要显示的文字 @@ -533,7 +474,7 @@ export default { }); }, // 结束加载动画 - endLoading() { + endLoading () { // clearTimeout(timer); if (loading) { loading.close(); From 2c285a37df67c520305c04cb41c881357da7dc0d Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 14 Jun 2022 16:02:35 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E6=AD=A3=E5=88=99=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/workSys/mapConfig.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/workSys/mapConfig.vue b/src/views/modules/workSys/mapConfig.vue index 6e53153d5..bc2f4d3db 100644 --- a/src/views/modules/workSys/mapConfig.vue +++ b/src/views/modules/workSys/mapConfig.vue @@ -794,7 +794,7 @@ const vueGis = { // 纬度范围:3°51′N至53°33′N 北纬 const arrayString = this.polygonManullyString - let array = arrayString.split(/[, ]/) + let array = arrayString.split(/[, ()]/) console.log(array) let polygonStringResult = '' From 00532d3f60591a9ec59c9e6509dc541498bb855d Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Tue, 14 Jun 2022 16:43:13 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E5=8F=AF=E8=A7=86=E5=8C=96=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main-shuju/main-content.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/main-shuju/main-content.vue b/src/views/main-shuju/main-content.vue index a67827be4..360e96f3c 100644 --- a/src/views/main-shuju/main-content.vue +++ b/src/views/main-shuju/main-content.vue @@ -60,7 +60,9 @@ export default { // localStorage.getItem("token") + // "&customerId=" + // localStorage.getItem("customerId"); - return isURL(url); + + return /^http[s]?:\/\/.*/.test(url) || /^\/\/.*/.test(url); + // return isURL(url); }, // tabs, 选中tab tabSelectedHandle(tab) { From 304e3b8bae0915e55ba2ad7dee455c72e9db9a4b Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Tue, 14 Jun 2022 17:42:27 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E5=8F=AF=E8=A7=86=E5=8C=96=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/validate.js | 22 ++++++++++++---------- src/views/main-shuju/main-content.vue | 4 ++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/utils/validate.js b/src/utils/validate.js index 0215c8c43..a130010f2 100644 --- a/src/utils/validate.js +++ b/src/utils/validate.js @@ -2,38 +2,40 @@ * 邮箱 * @param {*} s */ -export function isEmail (s) { - return /^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(s) +export function isEmail(s) { + return /^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test( + s + ); } /** * 手机号码 * @param {*} s */ -export function isMobile (s) { - return /^1[0-9]{10}$/.test(s) +export function isMobile(s) { + return /^1[0-9]{10}$/.test(s); } /** * 电话号码 * @param {*} s */ -export function isPhone (s) { - return /^([0-9]{3,4}-)?[0-9]{7,8}$/.test(s) +export function isPhone(s) { + return /^([0-9]{3,4}-)?[0-9]{7,8}$/.test(s); } /** * URL地址 * @param {*} s */ -export function isURL (s) { - return /^http[s]?:\/\/.*/.test(s) +export function isURL(s) { + return /^http[s]?:\/\/.*/.test(s) || /^\/\/.*/.test(s); } /** * 身份证 * @param {*} s */ -export function isCard (s) { - return /^(\d{15}$)|(^\d{17}([0-9]|X)$)/.test(s) +export function isCard(s) { + return /^(\d{15}$)|(^\d{17}([0-9]|X)$)/.test(s); } diff --git a/src/views/main-shuju/main-content.vue b/src/views/main-shuju/main-content.vue index 360e96f3c..4d6a73a3e 100644 --- a/src/views/main-shuju/main-content.vue +++ b/src/views/main-shuju/main-content.vue @@ -61,8 +61,8 @@ export default { // "&customerId=" + // localStorage.getItem("customerId"); - return /^http[s]?:\/\/.*/.test(url) || /^\/\/.*/.test(url); - // return isURL(url); + // return /^http[s]?:\/\/.*/.test(url); + return isURL(url); }, // tabs, 选中tab tabSelectedHandle(tab) { From 137384dfa00bfe2cba8e4cfc44c7cd3f7dfc830c Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Thu, 16 Jun 2022 11:10:58 +0800 Subject: [PATCH 10/12] dd --- src/views/main-shuju/main.vue | 2 +- src/views/main.vue | 2 +- src/views/modules/visual/communityParty/community.vue | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/main-shuju/main.vue b/src/views/main-shuju/main.vue index 8d4f0bc2c..4abb6808f 100644 --- a/src/views/main-shuju/main.vue +++ b/src/views/main-shuju/main.vue @@ -123,7 +123,7 @@ export default { localStorage.setItem("customerName", data.customerName || ""); } } else { - this.$message.error(rspMsg); + this.$message.error(msg); } }, }, diff --git a/src/views/main.vue b/src/views/main.vue index f12112f35..eb6f306e1 100644 --- a/src/views/main.vue +++ b/src/views/main.vue @@ -159,7 +159,7 @@ export default { localStorage.setItem("customerName", data.customerName || ""); } } else { - this.$message.error(rspMsg); + this.$message.error(msg); } }, }, diff --git a/src/views/modules/visual/communityParty/community.vue b/src/views/modules/visual/communityParty/community.vue index e8f825ace..34cff4b25 100644 --- a/src/views/modules/visual/communityParty/community.vue +++ b/src/views/modules/visual/communityParty/community.vue @@ -530,6 +530,7 @@ export default { this.unitTableData = data.list.map((item, index) => { return { ...item, + index: index + 1, urlIndex: index } }) From 8bc1ced9d43f5e8d6e6cb87442f64fc7d533ba37 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Thu, 16 Jun 2022 16:20:27 +0800 Subject: [PATCH 11/12] dd --- src/views/modules/visual/communityParty/party.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/modules/visual/communityParty/party.vue b/src/views/modules/visual/communityParty/party.vue index 016d7e59d..534391913 100644 --- a/src/views/modules/visual/communityParty/party.vue +++ b/src/views/modules/visual/communityParty/party.vue @@ -317,6 +317,7 @@ export default { // return // } if (params.seriesIndex == 0 || params.seriesIndex == 2) { + console.log('请求了吗') this.ageCode = '' // this.getUnitList(this.agencyId) this.getAgeList() @@ -378,7 +379,7 @@ export default { // this.getEduList() // return // } - this.clickEduPie(params.dataIndex) + // this.clickEduPie(params.dataIndex) if (params.seriesIndex == 0 || params.seriesIndex == 2) { this.eduCode = '' this.getEduList() From 0e267d89622dc232a84235fc74ae0a6e3c3e41ae Mon Sep 17 00:00:00 2001 From: zhaoyongnian <541231643@qq.com> Date: Thu, 16 Jun 2022 16:56:42 +0800 Subject: [PATCH 12/12] bug --- .../partymember/icpartyorg-add-or-update.vue | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/views/modules/partymember/icpartyorg-add-or-update.vue b/src/views/modules/partymember/icpartyorg-add-or-update.vue index 04bbde23e..93c020d7c 100644 --- a/src/views/modules/partymember/icpartyorg-add-or-update.vue +++ b/src/views/modules/partymember/icpartyorg-add-or-update.vue @@ -145,12 +145,6 @@ agencyOrgList:[] } }, - // mounted () { - // setTimeout(() => { - // console.log(':::::::::::::::::::::::') - // this.initMap() - // }, 800); - // }, methods: { init() { this.visible = true @@ -159,10 +153,10 @@ this.dataForm.staffId = localStorage.getItem('staffId') this.keyWords = '' //设置党组织类型 - - this.$nextTick(() => { + setTimeout(() => { this.$refs['dataForm'].resetFields() this.dataForm.latitude = '' + this.dataForm.agencyId = '' if (this.dataForm.id) { this.setPartyOrgType() this.getInfo() @@ -174,14 +168,17 @@ this.dataForm.orgPid = this.dataForm.orgId this.dataForm.orgPids = this.dataForm.orgPids ? this.dataForm.orgPids + ':' + this.dataForm.orgId : this.dataForm.orgId this.dataForm.partyOrgType = this.dataForm._partyOrgType - console.log(this.dataForm.partyOrgType, this.dataForm.orgPid, this.dataForm.orgPids) + this.setPartyOrgType_xzxj() this.getInfoAgencyLisy() } else { this.dataForm.mySelectOrg = '' } } - }) + }, 50); + // this.$nextTick(() => { + + // }) }, // 设置组织类型 新增党组织 setPartyOrgType_xzxj() { @@ -250,9 +247,22 @@ if(value == '5'){ // 支部 不选择行政组织 this.dataForm.agencyId = localStorage.getItem('agencyId') this.dataForm.agencyPids = '' + // 先清空数据 + this.orgList = [] + this.dataForm.mySelectOrg = '', // 我选中的当前党组织 + this.dataForm.orgPid = '', // 党组织的上级ID,没有上级时为0 + this.dataForm.orgPids = '' this.getOrgList() } else { - //根据组织类型获取行政组织 + // 先清空数据 + this.agencyOrgList = [] + this.dataForm.agencyId = '' + + // 先清空数据 + this.orgList = [] + this.dataForm.mySelectOrg = '', // 我选中的当前党组织 + this.dataForm.orgPid = '', // 党组织的上级ID,没有上级时为0 + this.dataForm.orgPids = '' this.getInfoAgencyLisy() } },