From 3606917ab94b4ebf3bbe6c2ab51b669daab8d6a9 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 18 Oct 2022 09:15:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86-=E5=8F=91?= =?UTF-8?q?=E7=94=9F=E6=97=B6=E9=97=B4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/shequzhili/event/cpts/add.vue | 412 ++++++++---------- 1 file changed, 181 insertions(+), 231 deletions(-) diff --git a/src/views/modules/shequzhili/event/cpts/add.vue b/src/views/modules/shequzhili/event/cpts/add.vue index fd2048832..b3dd77459 100644 --- a/src/views/modules/shequzhili/event/cpts/add.vue +++ b/src/views/modules/shequzhili/event/cpts/add.vue @@ -2,202 +2,160 @@
- - - - + + + + - - + +
- 居民信息中选择 + 居民信息中选择
- - + + - - + + - - - + + + - - + + - - + +
- - - + + + 选择图片 -
+
最多上传3张图片,图片支持jpg、jpeg、bmp、git或png格式
- - + + - +
- + - 查询 + 查询
@@ -222,62 +180,54 @@
- +
- - - - + + + + - - - + + +
- 确定 + 确定
@@ -298,7 +248,7 @@ var markers; var infoWindowList; var geocoder; // 新建一个正逆地址解析类 -function iniFmData() { +function iniFmData () { return { gridId: "", //所属网格 reportUserId: "", // 报事人ID @@ -320,7 +270,7 @@ function iniFmData() { } export default { - data() { + data () { return { formType: "add", //表单操作类型 add新增,edit编辑,detail详情 @@ -376,7 +326,7 @@ export default { }, components: {}, computed: { - dataRule() { + dataRule () { let checkIdCard = (rule, value, callback) => { if (value === "") { callback(new Error("请输入身份证")); @@ -435,7 +385,7 @@ export default { }, }, - async mounted() { + async mounted () { const { user } = this.$store.state; this.agencyId = user.agencyId; let { latitude, longitude } = this.$store.state.user; @@ -453,7 +403,7 @@ export default { }, methods: { - async handleShowPersonList() { + async handleShowPersonList () { if (this.formData.gridId) { await this.handleChangeGrid(); this.personTableShow = true; @@ -461,10 +411,10 @@ export default { this.$message.info("请先选择网格"); } }, - diaClose() { + diaClose () { this.personTableShow = false; }, - handleComfirmSelPerson() { + handleComfirmSelPerson () { if (this.selPersonIndex === 0 || this.selPersonIndex) { let selPerson = this.demandUserList[this.selPersonIndex]; this.formData.name = selPerson.demandUserName; @@ -478,7 +428,7 @@ export default { } }, - async handleChangeGrid() { + async handleChangeGrid () { const url = "/epmetuser/icresiuser/demandusers"; // const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page" let params = { @@ -497,7 +447,7 @@ export default { this.tableLoading = false; }, - async loadGrid() { + async loadGrid () { const url = "/gov/org/customergrid/gridoption"; let params = { @@ -513,7 +463,7 @@ export default { this.$message.error(msg); } }, - async getCategoryList() { + async getCategoryList () { const url = "/gov/issue/issueprojectcategorydict/list"; let params = {}; @@ -535,7 +485,7 @@ export default { }, //重构树,去除网格 - filterTree(arr) { + filterTree (arr) { let childs = arr; for (let i = childs.length; i--; i > 0) { if (childs[i].subCategory) { @@ -549,12 +499,12 @@ export default { return arr; }, - handleChangeAgency(value) { + handleChangeAgency (value) { // this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label // this.orgId = this.selCategoryArray.length > 0 ? this.selCategoryArray[this.selCategoryArray.length - 1] : '' }, - async getEventInfo() { + async getEventInfo () { this.okflag = false; this.$refs["ref_form1"].validate((valid, messageObj) => { if (!valid) { @@ -592,7 +542,7 @@ export default { }); }, - removePic(file, fileList) { + removePic (file, fileList) { this.formData.imageList.splice( this.formData.imageList.findIndex((item) => item === file.url), 1 @@ -604,19 +554,19 @@ export default { this.hideUploadBtn = fileList.length >= 3; }, // 最多上传3张图,超过时隐藏上传按钮 - handleEditChange(file, fileList) { + handleEditChange (file, fileList) { this.hideUploadBtn = fileList.length >= 3; }, - exceedPic() { + exceedPic () { this.$message.warning("最多上传3张预览图片"); }, - handleSuccess(response, file, fileList) { + handleSuccess (response, file, fileList) { this.replayImgList.push(file); this.formData.imageList.push(response.data.url); }, // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 - initMap() { + initMap () { // 定义地图中心点坐标 var center = new window.TMap.LatLng( this.formData.latitude, @@ -648,7 +598,7 @@ export default { // this.convert() }, - setMarker(lat, lng) { + setMarker (lat, lng) { markers.setGeometries([]); markers.add([ { @@ -662,7 +612,7 @@ export default { ]); }, - handleSearchMap() { + handleSearchMap () { infoWindowList.forEach((infoWindow) => { infoWindow.close(); }); @@ -694,7 +644,7 @@ export default { }); }, - handleMoveCenter() { + handleMoveCenter () { //修改地图中心点 const center = map.getCenter(); const lat = center.getLat(); @@ -705,7 +655,7 @@ export default { this.convert(lat, lng); }, - convert(lat, lng) { + convert (lat, lng) { markers.setGeometries([]); // var input = document.getElementById('location').value.split(','); let location; @@ -739,12 +689,12 @@ export default { }); }, - resetData() { + resetData () { this.formData = iniFmData(); this.replayImgList = []; }, // 开启加载动画 - startLoading() { + startLoading () { loading = Loading.service({ lock: true, // 是否锁定 text: "正在加载……", // 加载中需要显示的文字 @@ -752,7 +702,7 @@ export default { }); }, // 结束加载动画 - endLoading() { + endLoading () { // clearTimeout(timer); if (loading) { loading.close();