diff --git a/config/index.js b/config/index.js index f57f55c..7f9f910 100644 --- a/config/index.js +++ b/config/index.js @@ -11,7 +11,7 @@ module.exports = { assetsPublicPath: '/', proxyTable: { '/api': { - target: 'http://192.168.0.45:8091/', + target: 'http://192.168.0.79:8091/', changeOrigin: true, pathRewrite: { '^/api': '' diff --git a/src/views/corpInfo/information/info/components/corpEdit.vue b/src/views/corpInfo/information/info/components/corpEdit.vue index f3be9fd..8def7dc 100644 --- a/src/views/corpInfo/information/info/components/corpEdit.vue +++ b/src/views/corpInfo/information/info/components/corpEdit.vue @@ -496,27 +496,27 @@ import { upload } from '@/utils/upload' export default { components: { SelectTree }, data() { - var hasCode = (rule, value, callback) => { - if (value) { - requestFN( - '/corpinfo/hasCode', - { - CODE: value, - CORPINFO_ID: this.form.CORPINFO_ID - } - ).then((data) => { - if (!data.pd) { - callback() - } else { - callback(new Error('统一社会信用代码重复')) - } - }).catch((e) => { - - }) - } else { - callback() - } - } + // var hasCode = (rule, value, callback) => { + // if (value) { + // requestFN( + // '/corpinfo/hasCode', + // { + // CODE: value, + // CORPINFO_ID: this.form.CORPINFO_ID + // } + // ).then((data) => { + // if (!data.pd) { + // callback() + // } else { + // callback(new Error('统一社会信用代码重复')) + // } + // }).catch((e) => { + // + // }) + // } else { + // callback() + // } + // } return { config: config, dialogMap: false, @@ -569,12 +569,12 @@ export default { { required: true, message: '企业名称不能为空', trigger: 'blur' } ], CODE: [ - { required: true, message: '统一社会信用代码不能为空', trigger: 'blur' }, - { - pattern: /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/, - message: '请输入正确的统一社会信用代码' - }, - { validator: hasCode, trigger: 'blur' } + { required: false, message: '统一社会信用代码不能为空', trigger: 'blur' } + // , { + // pattern: /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/, + // message: '请输入正确的统一社会信用代码' + // }, + // { validator: hasCode, trigger: 'blur' } ], PROVINCE: [ { required: true, message: '省不能为空', trigger: 'blur' } @@ -748,66 +748,73 @@ export default { }) }, confirm() { - this.$refs.form.validate(valid => { - if (valid) { - const loading = this.$loading({ - lock: true, - text: '提交中...', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }) - if (this.form.INDUSTRYALL && this.form.INDUSTRYALL.length > 0) { - this.form.CORP_TYPE = this.form.INDUSTRYALL[0] || '' - this.form.CORP_TYPE2 = this.form.INDUSTRYALL[1] || '' - this.form.CORP_TYPE3 = this.form.INDUSTRYALL[2] || '' - this.form.CORP_TYPE4 = this.form.INDUSTRYALL[3] || '' - } - const formData = new FormData() - Object.keys(this.pdrelated).map(key => { - formData.append(key, this.pdrelated[key]) - }) - Object.keys(this.form).map(key => { - formData.append(key, this.form[key]) - }) - if (this.form.FOURTYPE == '1') { - if (this.$refs.fourUpload.uploadFiles.length > 0) { - // eslint-disable-next-line no-redeclare - for (var i = 0; i < this.$refs.fourUpload.uploadFiles.length; i++) { - if (this.$refs.fourUpload.uploadFiles[i]) { - formData.append('fourFiles', this.$refs.fourUpload.uploadFiles[i].raw) + this.$confirm('此操作将会修改企业登录密码为Aa@123456789是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.$refs.form.validate(valid => { + if (valid) { + const loading = this.$loading({ + lock: true, + text: '提交中...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + if (this.form.INDUSTRYALL && this.form.INDUSTRYALL.length > 0) { + this.form.CORP_TYPE = this.form.INDUSTRYALL[0] || '' + this.form.CORP_TYPE2 = this.form.INDUSTRYALL[1] || '' + this.form.CORP_TYPE3 = this.form.INDUSTRYALL[2] || '' + this.form.CORP_TYPE4 = this.form.INDUSTRYALL[3] || '' + } + const formData = new FormData() + Object.keys(this.pdrelated).map(key => { + formData.append(key, this.pdrelated[key]) + }) + Object.keys(this.form).map(key => { + formData.append(key, this.form[key]) + }) + if (this.form.FOURTYPE == '1') { + if (this.$refs.fourUpload.uploadFiles.length > 0) { + // eslint-disable-next-line no-redeclare + for (var i = 0; i < this.$refs.fourUpload.uploadFiles.length; i++) { + if (this.$refs.fourUpload.uploadFiles[i]) { + formData.append('fourFiles', this.$refs.fourUpload.uploadFiles[i].raw) + } } } + } else if (this.form.FOURTYPE == '2') { + formData.append('fourFiles', this.FFILE) } - } else if (this.form.FOURTYPE == '2') { - formData.append('fourFiles', this.FFILE) - } - formData.append('COMPANY_AREA', this.$refs.PROVINCE.selected.label + this.$refs.CITY.selected.label + this.$refs.COUNTRY.selected.label) - this.form.COMPANY_AREA = - upload( - '/corpinfo/edit', - formData - ).then((data) => { - if (this.$refs.upload.uploadFiles.length > 0) { - loading.close() - this.uploadImg() - } else { - loading.close() - this.$message({ - message: '操作成功', - type: 'success' + formData.append('COMPANY_AREA', this.$refs.PROVINCE.selected.label + this.$refs.CITY.selected.label + this.$refs.COUNTRY.selected.label) + this.form.COMPANY_AREA = + upload( + '/corpinfo/edit', + formData + ).then((data) => { + if (this.$refs.upload.uploadFiles.length > 0) { + loading.close() + this.uploadImg() + } else { + loading.close() + this.$message({ + message: '操作成功', + type: 'success' + }) + this.goOut('0') + // this.$parent.activeName = 'CorpView' + } + }).catch((e) => { + loading.close() + this.$message({ + message: '操作失败', + type: 'error' + }) }) - this.goOut('0') - // this.$parent.activeName = 'CorpView' - } - }).catch((e) => { - loading.close() - this.$message({ - message: '操作失败', - type: 'error' - }) - }) - } + } + }) + }).catch(() => { }) }, diff --git a/src/views/corpInfo/user/components/edit.vue b/src/views/corpInfo/user/components/edit.vue index a36ad46..51862ca 100644 --- a/src/views/corpInfo/user/components/edit.vue +++ b/src/views/corpInfo/user/components/edit.vue @@ -63,6 +63,9 @@ 补充证照信息 + + + @@ -814,6 +817,7 @@ export default { form: { IS_HAZARDCONFIRMER: 0, INFORPOST: '', + CARDNO: '', INFORTITLE: '', INFORTITLEValue: '', infortitleType: 'select', diff --git a/src/views/firefighting/record/components/recordInfo.vue b/src/views/firefighting/record/components/recordInfo.vue index 8ce375e..d87f668 100644 --- a/src/views/firefighting/record/components/recordInfo.vue +++ b/src/views/firefighting/record/components/recordInfo.vue @@ -76,7 +76,7 @@ 消防设备编号 检查情况 点位检查照片 - 点位合格照片 + - + + + + + - + + + - - + - +