bibi 3 years ago
parent c73689a26a
commit dc47fdf34f

@ -14,12 +14,12 @@
<div class="ant-upload-text">上传图片</div>
</div>
</a-upload>
<Img :previewVisible='previewVisible' :previewImage='previewImage' @handleCancel='handleCancel'/>
<imgModal :previewVisible='previewVisible' :previewImage='previewImage' @handleCancel='handleCancel'/>
</div>
</template>
<script>
import Img from "./img.vue"
import imgModal from "./imgModal.vue"
function getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
@ -31,7 +31,7 @@ function getBase64(file) {
import store from "@/store";
export default {
components:{
Img
imgModal
},
data() {
return{

@ -65,7 +65,7 @@
>
</a-col>
<a-col :span="5" style="line-height:130px;margin-top:-20px"
><a-button shape="round" size="default" @click="edit()"
><a-button shape="round" size="default" @click="editCompany()"
>修改公司信息</a-button
></a-col
>
@ -187,7 +187,7 @@
<a-input v-model="form.name" style="60%"></a-input>
</a-form-model-item>
<a-form-model-item label="小区地址" prop='address'>
<allCity></allCity>
<allCity @onchange='onchange'></allCity>
</a-form-model-item>
<a-form-model-item label="小区详细地址" prop='addressDetails'>
<a-input v-model="form.addressDetails" style="60%"></a-input>
@ -254,13 +254,14 @@ export default {
addVillage() {
this.visible = true;
},
edit(){},
editCompany() {},
handleOk() {
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
let res = await communityInsert(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
this.handleCancel()
} else {
this.$message.error(res.msg);
@ -276,7 +277,10 @@ export default {
this.$router.push({ name: "newOrder" });
},
handleChange(data){
this.form.communityUrls = data[0].response.data
this.form.communityUrls[0] = data[0].response.data
},
onchange(data){
this.form.address = data[2]
}
},
};

Loading…
Cancel
Save