diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 2da67b9..b4bd111 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -29,7 +29,8 @@
  • - {{ getFileName(file.name) }} + {{ file.name }} +
    删除 @@ -153,7 +154,7 @@ export default { handleUploadSuccess(res, file) { if (res.code === 0) { // edit by 新疆事务通 - this.uploadList.push({ name: res.data, url: res.data }); + this.uploadList.push({ name:file.name.split('.')[0], url: res.data }); this.uploadedSuccessfully(); } else { this.number--; @@ -166,15 +167,29 @@ export default { // 删除文件 handleDelete(index) { this.fileList.splice(index, 1); - this.$emit("input", this.listToString(this.fileList)); + this.$emit("input", this.fileListMap(this.fileList)); + }, + fileListMap(list) { + return list + if(!list.length) return [] + let arr = list.map(item=>{ + let obj = { + name: item.name, + url: item.url + } + return obj + }) + return arr }, // 上传结束处理 uploadedSuccessfully() { if (this.number > 0 && this.uploadList.length === this.number) { + console.log(this.fileList, '分开', this.uploadList) this.fileList = this.fileList.concat(this.uploadList); this.uploadList = []; this.number = 0; - this.$emit("input", this.listToString(this.fileList)); + console.log(this.fileListMap(this.fileList)) + this.$emit("input", this.fileListMap(this.fileList)); this.$modal.closeLoading(); } }, diff --git a/src/views/business/Information/index.vue b/src/views/business/Information/index.vue index 50d7394..fbee5bc 100644 --- a/src/views/business/Information/index.vue +++ b/src/views/business/Information/index.vue @@ -160,7 +160,7 @@ export default { }, methods: { inputFn(val) { - this.form.attachmentList = val.split(',') + this.form.attachmentList = val }, /** 查询列表 */ getList() { diff --git a/src/views/business/vote/index.vue b/src/views/business/vote/index.vue index 569ff88..173be8d 100644 --- a/src/views/business/vote/index.vue +++ b/src/views/business/vote/index.vue @@ -128,7 +128,7 @@
    - + 增加议题 @@ -238,24 +238,27 @@ 投票结果
    -
    -
    -
    {{ item.voteName }}
    -
    -
    {{ item2.itemName }}
    - - -

    {{ item2.itemCount }}人

    -
    +
    +
    +
    {{ + item.voteName }} +
    +
    +
    {{ item2.itemName }}
    + + +
    {{ item2.itemCount }}人
    +
    {{ item.itemName }} (已投) - @@ -267,15 +270,36 @@ 投票详情 - - - - - - +
    + + + + + + + +
    + +
    + + + + + + +
    +