diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index b444326..823a6c1 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -85,16 +85,18 @@ export default { handler(val) { if (val) { let temp = 1; + console.log(val,'val') + console.log(this.fileList,'fileList') // 首先将值转为数组 - const list = Array.isArray(val) ? val : this.value.split(','); - // 然后将数组转为对象数组 - this.fileList = list.map(item => { - if (typeof item === "string") { - item = { name: item, url: item }; - } - item.uid = item.uid || new Date().getTime() + temp++; - return item; - }); + // const list = Array.isArray(val) ? val : this.value.split(','); + // // 然后将数组转为对象数组 + // this.fileList = list.map(item => { + // if (typeof item === "string") { + // item = { name: item, url: item }; + // } + // item.uid = item.uid || new Date().getTime() + temp++; + // return item; + // }); } else { this.fileList = []; return []; diff --git a/src/views/tcZz/netManage/gzdt/index.vue b/src/views/tcZz/netManage/gzdt/index.vue index 8e85305..5232d2a 100644 --- a/src/views/tcZz/netManage/gzdt/index.vue +++ b/src/views/tcZz/netManage/gzdt/index.vue @@ -234,9 +234,9 @@ - + @@ -473,6 +473,14 @@ submitForm() { this.$refs["form"].validate(valid => { if (valid) { + let arr = []; + let arr2 = [] + this.form.fileUrl.map((item)=>{ + arr.push(item.name); + arr2.push(item.url); + }) + this.form.fileName = arr.join(','); + this.form.fileUrl = arr2.join(','); if (this.form.id != null) { updateGzdt(this.form).then(response => { this.$modal.msgSuccess("修改成功"); diff --git a/src/views/tcZz/netManage/ytlc/index.vue b/src/views/tcZz/netManage/ytlc/index.vue index 7bbaddd..0275306 100644 --- a/src/views/tcZz/netManage/ytlc/index.vue +++ b/src/views/tcZz/netManage/ytlc/index.vue @@ -20,7 +20,7 @@ @keyup.enter.native="handleQuery" /> - + @@ -373,7 +373,16 @@ submitForm() { this.$refs["form"].validate(valid => { if (valid) { + let arr = []; + let arr2 = [] + this.form.fileUrl.map((item)=>{ + arr.push(item.name); + arr2.push(item.url); + }) + this.form.fileName = arr.join(','); + this.form.fileUrl = arr2.join(','); if (this.form.id != null) { + console.log(this.form) updateYtlc(this.form).then(response => { this.$modal.msgSuccess("修改成功"); this.open = false; diff --git a/src/views/tcZz/netWorkYq/yqbg/index.vue b/src/views/tcZz/netWorkYq/yqbg/index.vue index 9954b72..c8a3317 100644 --- a/src/views/tcZz/netWorkYq/yqbg/index.vue +++ b/src/views/tcZz/netWorkYq/yqbg/index.vue @@ -41,7 +41,7 @@ @keyup.enter.native="handleQuery" /> - + @@ -458,6 +458,14 @@ submitForm() { this.$refs["form"].validate(valid => { if (valid) { + let arr = []; + let arr2 = [] + this.form.fileUrl.map((item)=>{ + arr.push(item.name); + arr2.push(item.url); + }) + this.form.fileName = arr.join(','); + this.form.fileUrl = arr2.join(','); if (this.form.id != null) { updateYqbg(this.form).then(response => { this.$modal.msgSuccess("修改成功"); diff --git a/src/views/tcZz/networkEcology/wldv/index.vue b/src/views/tcZz/networkEcology/wldv/index.vue index b6e37b1..be28b58 100644 --- a/src/views/tcZz/networkEcology/wldv/index.vue +++ b/src/views/tcZz/networkEcology/wldv/index.vue @@ -1,212 +1,170 @@