From 29ea1900b38c3f43c51ea35a050800c2f5e73c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=AD=A6=E5=9D=A4?= <1107410514@qq.com> Date: Tue, 3 Dec 2019 15:19:09 +0800 Subject: [PATCH] kun 191203 15:20 --- src/views/project/Application.vue | 103 +++++++++++++++--------------- vue.config.js | 2 +- 2 files changed, 54 insertions(+), 51 deletions(-) diff --git a/src/views/project/Application.vue b/src/views/project/Application.vue index b3deee1..f1b08b0 100644 --- a/src/views/project/Application.vue +++ b/src/views/project/Application.vue @@ -791,7 +791,11 @@ export default { }) }, handleRemove (file, fileList) { - console.log(file, fileList) + this.picture.forEach(element => { + if (file.name === element.name) { + this.picture.splice(element, 1) + } + }) }, handlePreview (file) { console.log(file) @@ -845,7 +849,7 @@ export default { btn (index) { let s = this.sub s = index - // this.sub = s; + // this.sub = s let regd = /^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/ let regs = /^(0|86|17951)?(13[0-9]|15[012356789]|166|17[3678]|18[0-9]|14[57])[0-9]{8}$/ @@ -909,63 +913,61 @@ export default { this.prodemofg = this.divisionLaborText this.prodemotwo = this.coverText this.funds = this.initialText - this.proimages = [...this.fileLists, ...this.picture] + // this.proimages = [...this.fileLists, ...this.picture] + this.proimages = [...this.picture] // if (this.subStatus === 1) { if ( this.name === '' || - this.company === '' || - this.tid === '' || - this.rid === '' || - this.first_level === '' || - this.secondary === '' || - this.fieldeara === '' || - this.attribute === '' || - this.aterm === '' || - this.fterm === '' || - this.postaladdress === '' || - this.postalcode === '' || - this.pmail === '' || - this.plegal === '' || - this.plcode === '' || - this.pname === '' || - this.poster === '' || - this.poffice_tel === '' || - this.aphone === '' || - this.cname === '' || - this.cpost === '' || - this.coffice_tel === '' || - this.cphone === '' || - this.prespo === '' || - this.respoadd === '' || - this.respopcode === '' || - this.respomail === '' || - this.respopname === '' || - this.respopost === '' || - this.respoophone === '' || - this.respocname === '' || - this.respocpost === '' || - this.respocophone === '' || - this.decldes === '' || - this.prodes === '' || - this.prodemo === '' || - this.prodemojc === '' || - this.prodemotj === '' || - this.prodemojd === '' || - this.prodemoxg === '' || - this.prodemofg === '' || - this.prodemotwo === '' || - this.funds === '' + this.company === '' || + this.tid === '' || + this.rid === '' || + this.first_level === '' || + this.secondary === '' || + this.fieldeara === '' || + this.attribute === '' || + this.aterm === '' || + this.fterm === '' || + this.postaladdress === '' || + this.postalcode === '' || + this.pmail === '' || + this.plegal === '' || + this.plcode === '' || + this.pname === '' || + this.poster === '' || + this.poffice_tel === '' || + this.aphone === '' || + this.cname === '' || + this.cpost === '' || + this.coffice_tel === '' || + this.cphone === '' || + this.prespo === '' || + this.respoadd === '' || + this.respopcode === '' || + this.respomail === '' || + this.respopname === '' || + this.respopost === '' || + this.respoophone === '' || + this.respocname === '' || + this.respocpost === '' || + this.respocophone === '' || + this.decldes === '' || + this.prodes === '' || + this.prodemo === '' || + this.prodemojc === '' || + this.prodemotj === '' || + this.prodemojd === '' || + this.prodemoxg === '' || + this.prodemofg === '' || + this.prodemotwo === '' || + this.funds === '' ) { alert('请认真核对填写内容完整性!') return false } else if (this.aterm > this.fterm) { alert('截止日期应比申请日期晚') return false - } else if ( - !regd.test(this.poffice_tel) || - !regd.test(this.coffice_tel) - ) { + } else if (!regd.test(this.poffice_tel) || !regd.test(this.coffice_tel)) { alert('请填写正确的电话号码!') return false } else if (!regs.test(this.aphone) || !regs.test(this.cphone)) { @@ -973,7 +975,7 @@ export default { return false } else if ( !regd.test(this.respoophone) || - !regd.test(this.respocophone) + !regd.test(this.respocophone) ) { alert('请填写正确的电话号码!') return false @@ -1225,6 +1227,7 @@ export default { let imgs = JSON.parse(data.proimages) this.fileLists = imgs + this.picture = this.fileLists }, getDataDetails (id) { this.$http({ diff --git a/vue.config.js b/vue.config.js index 7c6a676..8dcbf39 100644 --- a/vue.config.js +++ b/vue.config.js @@ -12,7 +12,7 @@ hotOnly: false, proxy: { '/url/': { - target: 'http://cyteam.org.cn/api/', + target: 'http://chaoyang.yulongcode.com/api/', ws: false, changeOrigin: true, pathRewrite: {