张雄 3 years ago
parent f9f4b65675
commit b7c5e4e85e

@ -68,7 +68,7 @@ export function getAddCommunity(params) {
return httpService({
url: `/user/community/insertAdmin`,
method: 'post',
params: params,
data: params,
})
}
@ -77,7 +77,7 @@ export function updateCommunity(params) {
return httpService({
url: `/user/community/updateAdmin`,
method: 'post',
params: params,
data: params,
})
}

@ -1,7 +1,7 @@
import httpService from "@/request"
// 上传平台照片
export function uploadImg(params) {
export function picUpload(params) {
return httpService({
url: `/user/upload/uploadImg`,
method: 'post',

@ -64,5 +64,5 @@ export default {
};
</script>
<style>
<style lang="less">
</style>

@ -9,7 +9,7 @@
<a-form-model-item label="申请人/公司名">
<a-input placeholder="请输入申请人/公司名" v-model="searchForm.name" />
</a-form-model-item>
<a-form-model-item label="状态">
<a-form-model-item label="到期状态">
<a-select style="width: 200px" placeholder="选择状态" v-model="searchForm.status">
<a-select-option :value="1">全部数据</a-select-option>
<a-select-option :value="2">已到期</a-select-option>

@ -72,18 +72,7 @@
<a-input v-model="addForm.addressDetails" style="width: 260px" placeholder="请输入详细地址"></a-input>
</a-form-model-item>
<a-form-model-item label="小区正门图片">
<a-upload
@change="addFile"
action=""
:defaultFileList="addForm.communityUrls"
class="avatar-uploader"
list-type="picture-card"
>
<div>
<a-icon :type="'plus'" />
<div class="ant-upload-text">Upload</div>
</div>
</a-upload>
<imgUpload @handleChange="addFile"></imgUpload>
</a-form-model-item>
</a-form-model>
<a-button @click="addConfirm" type="primary">确定</a-button>
@ -93,13 +82,15 @@
</template>
<script>
import imgUpload from "@/components/upload/index.vue"
import {getCommunityList, getAddCommunity, getAllRequest, updateCommunity} from "@/api/manage"
import {getAllCity, getCityByParent} from "@/api/city"
import {uploadImg} from "@/api/upload"
export default {
components: {
imgUpload
},
data() {
return {
uploadImg: uploadImg,
form: {
pageNum: 1,
size: 10,
@ -170,6 +161,9 @@ export default {
this.getData()
},
methods: {
img(val) {
console.log(val)
},
getData() {
getCommunityList(this.form).then(res => {
let data = res.data.rows;
@ -222,13 +216,13 @@ export default {
},
addConfirm() {
if(this.modelType == 1) {
getAddCommunity(this.addForm).then(res => {
console.log(res)
getAddCommunity(this.addForm).then(() => {
this.getData();
})
} else {
let obj = Object.assign({id: this.chosenId}, this.addForm)
updateCommunity(obj).then(res => {
console.log(res)
updateCommunity(obj).then(() => {
this.getData();
})
}
this.visible = false;
@ -249,7 +243,10 @@ export default {
},
//-
addFile(file) {
console.log(file)
console.log(file);
let communityUrls = [];
communityUrls.push(file[0].response.data);
this.addForm.communityUrls = communityUrls;
}
},
};

Loading…
Cancel
Save