From 51695ced84babaa94ed66c07b8ea8d4630d5820e Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Mon, 25 Apr 2022 14:02:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A1=8C=E7=A8=8B=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/epidemic/travelForm.vue | 100 +++--------------- 1 file changed, 16 insertions(+), 84 deletions(-) diff --git a/src/views/modules/base/epidemic/travelForm.vue b/src/views/modules/base/epidemic/travelForm.vue index 456b2fc4..9647aef2 100644 --- a/src/views/modules/base/epidemic/travelForm.vue +++ b/src/views/modules/base/epidemic/travelForm.vue @@ -346,21 +346,20 @@ export default { return w + 'px' }, lzayLoadArea(node, resolve) { - this.getArea(node, resolve) - // setTimeout(() => { - - // }, 1000) + // this.getArea(node, resolve) + setTimeout(() => { + this.getArea(node, resolve) + }, 200) }, async initForm (type, row) { console.log('row----', row) this.formType = type this.formData.agencyId = this.agencyId if (type != 'add') { - this.formData = { ...row, channel: [], content: '' } - this.sourceAllCode = row.sourceAddressPathCode && row.sourceAddressPathCode.split(',') + // this.formData = { ...row, channel: [], content: '' } + await this.loadFormData(row.id) + - if (row.userType == 'icresi') this.isFromResi = true - else this.nowAllCode = row.presentAddressPathCode && row.presentAddressPathCode.split(',') } else { const { user } = this.$store.state this.nowAllCode = user.areaCodePath @@ -507,35 +506,20 @@ export default { this.handleSelAddress(personItem.houseId) }, - async loadFormData () { + async loadFormData (id) { - // const url = 'http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/detail' - const url = '/epmetuser/icNat/detail' + const url = '/epmetuser/tripreport/detail' let params = { - icNatId: this.icNatId, + id, } const { data, code, msg } = await requestPost(url, params) if (code === 0) { - this.formData = data - this.formData.icNatId = this.icNatId - this.fileList = [] - if (data.fileName) { - let obj = { - name: data.fileName, - type: data.attachmentType, - url: data.attachmentUrl, - } - // data.attachmentList.forEach(element => { - // element.name = element.fileName - // element.type = element.attachmentType - // element.size = element.attachmentSize - // }); - this.fileList.push(obj) - - } - - this.hideUploadEdit = this.fileList.length >= this.limitNum; - + console.log('deda-------', data) + this.formData = { ...data, channel: [], content: '' } + this.sourceAllCode = data.sourceAddressPathCode && data.sourceAddressPathCode.split(',') + + if (data.userType == 'icresi') this.isFromResi = true + else this.nowAllCode = data.presentAddressPathCode && data.presentAddressPathCode.split(',') } else { this.$message.error(msg) } @@ -592,58 +576,6 @@ export default { }, - handleRemove (file, fileList) { - this.hideUploadEdit = fileList.length >= this.limitNum; - this.formData.fileName = '' - this.formData.attachmentUrl = '' - this.formData.attachmentType = '' - this.fileList = [] - - }, - handlePictureCardPreview (file) { - this.dialogImageUrl = file.url; - this.dialogVisible = true; - }, - - handleEditChange (file, fileList) { - this.hideUploadEdit = fileList.length >= this.limitNum; - - }, - - beforeUpload (file) { - const array = file.name.split('.') - const extension = array[array.length - 1] - // const isLt1M = (file.size / 1024 / 1024) < 5 - if (extension !== 'jpg' - && extension !== 'png' - && extension !== 'gif' - ) { - this.$message.error('只能上传jpg、png、gif文件!') - return false - } - // if (!isLt1M) { - // this.$message.error('上传文件大小不能超过 5MB!') - // } - // return isLt1M - - }, - - handleFileSuccess (res, file) { - - if (res.code === 0 && res.msg === 'success') { - const array = file.name.split('.') - const fileType = array[array.length - 1] - - this.formData.fileName = file.name - this.formData.attachmentUrl = res.data.url - this.formData.attachmentType = 'image' - - file.attachmentFormat = fileType - file.attachmentSize = file.size - - } else this.$message.error(res.msg) - }, - resetData () { this.$refs.ref_form.resetFields() this.formData.sourceAddressCode = '' From e7fc1a03b3eac0535f4f4deb5617f40ab25a9cce Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Mon, 25 Apr 2022 14:08:06 +0800 Subject: [PATCH 2/2] dd --- src/views/components/rangeInput.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/components/rangeInput.vue b/src/views/components/rangeInput.vue index 99afe0d0..ede62f6c 100644 --- a/src/views/components/rangeInput.vue +++ b/src/views/components/rangeInput.vue @@ -102,9 +102,9 @@ export default { display: flex; align-items: center; } -.wd50 { - // width: 45%; -} +// .wd50 { +// // width: 45%; +// } .demo-form-inline { ::v-deep .el-form-item { width: 40%;