| | |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | :upload-before="uploadBefore" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | if (!row.picUrls){ |
| | | row.picUrls = null |
| | | } |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | console.log(res); |
| | | this.form = res.data.data; |
| | | this.form.avueMapAddress = { |
| | | "formattedAddress": this.form.address, |
| | |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | uploadBefore(file, done, loading,column) { |
| | | if (["image","video"].includes(file.type.split("/")[0])){ |
| | | done() |
| | | }else { |
| | | this.$message.warning('请上传图片或视频') |
| | | loading() |
| | | } |
| | | }, |
| | | handleDisposal(row) { |
| | | this.disposalVisible = true |
| | | this.$nextTick(() => { |