| | |
| | | </avue-crud> |
| | | |
| | | <el-dialog title="编辑" append-to-body :visible.sync="editPopup" center @close="editClose"> |
| | | <avue-form ref="formRef" :option="option" v-model="editForm" @submit="rowUpdate"> |
| | | <avue-form ref="formRef" :option="option" v-model="editForm" @submit="handleSubmit"> |
| | | |
| | | <template slot-scope="{type, disabled}" slot="sceneGeo"> |
| | | <el-button type="primary" style="font-size: 14px; border: none;" icon="el-icon-map-location" |
| | |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(val) { |
| | | if (typeof val == "object") { |
| | | if (!val) { |
| | | console.log("*****11**********" + val) |
| | | console.log("*****789111**********" + !val) |
| | | if (val.length <= 0) { |
| | | return |
| | | } |
| | | console.log("*****789**********" + val) |
| | |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(val) { |
| | | if (typeof val == "object") { |
| | | if (!val) { |
| | | if (val.length <= 0) { |
| | | return |
| | | } |
| | | console.log("*****789**********" + val) |
| | | console.log("*****78910**********" + !val) |
| | | |
| | | var arr = val |
| | | //经纬度替换 |
| | |
| | | } |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | |
| | | handleSubmit(form, done) { |
| | | update(form).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.editPopup = false |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | |
| | | this.sharePopup = false |
| | | }, |
| | | handleEdit(row) { |
| | | this.editForm = row |
| | | getDetail(row.orderId).then((res) => { |
| | | this.editForm = res.data.data |
| | | this.editPopup = true |
| | | }) |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.orderId).then((res) => { |
| | | this.form = res.data.data |
| | | // this.form.sceneAddr = [this.form.sceneGeoLng, this.form.sceneGeoLat, this.form.sceneAddr].join(',') |
| | | // if (this.form.imageUrls.length > 0) { |
| | | // var urls = [] |
| | | // var names = this.form.imageUrls.split(",") |
| | | // names.forEach(name => { |
| | | // urls.push(website.minioUrl + name) |
| | | // }) |
| | | // this.form.imageUrls = urls.join(",") |
| | | // } |
| | | }) |
| | | } |
| | | // con |