bibi 3 years ago
parent c73689a26a
commit dc47fdf34f

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

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