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/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 a67827be4..4d6a73a3e 100644 --- a/src/views/main-shuju/main-content.vue +++ b/src/views/main-shuju/main-content.vue @@ -60,6 +60,8 @@ export default { // localStorage.getItem("token") + // "&customerId=" + // localStorage.getItem("customerId"); + + // return /^http[s]?:\/\/.*/.test(url); return isURL(url); }, // tabs, 选中tab 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/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(); 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() } }, diff --git a/src/views/modules/shequzhili/event/cpts/event-detail.vue b/src/views/modules/shequzhili/event/cpts/event-detail.vue index 2158a7bdf..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 @@ + +
关闭 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 } }) 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() diff --git a/src/views/modules/workSys/mapConfig.vue b/src/views/modules/workSys/mapConfig.vue index a991576b7..bc2f4d3db 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,48 @@ width="50%" :before-close="handleClose">
- - +
+ 中心点经度: + + + 中心点纬度: + + +
+
+ + +
+
+ 经度偏差: + + + 纬度偏差: + + +
+ 取 消 @@ -248,10 +282,16 @@ 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, + yOffset_customize: 0, + // xOffset_customize: 0.0051,//市北默认偏移 + // yOffset_customize: 0.0002,//市北默认偏移 + + longitude: undefined, + latitude: undefined, } }, async mounted () { @@ -717,6 +757,17 @@ const vueGis = { //点击【手动录入】 handleManually () { this.dialogVisible = true + this.polygonManullyString = '' + 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 + } + } }, //点击【手动录入】 @@ -725,6 +776,17 @@ 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 //中国经纬度范围 @@ -732,20 +794,29 @@ const vueGis = { // 纬度范围:3°51′N至53°33′N 北纬 const arrayString = this.polygonManullyString - let array = arrayString.split(/[, ]/) + 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 +824,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 +832,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 +992,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 +1005,7 @@ const vueGis = { message: "绘制成功" }); if (this.dialogVisible) { + this.polygonManullyString = '' this.dialogVisible = false } this.refreshMap(false)