张雄 3 years ago
parent 737c19a9bf
commit 7f97fffcc3

@ -0,0 +1,19 @@
import httpService from "@/request"
// 城市-查询所有城市信息
export function getAllCity(params) {
return httpService({
url: `/city/allCity`,
method: 'get',
params: params,
})
}
// 城市-根据父类ID查询城市信息
export function getCityByParent(params) {
return httpService({
url: `/city/findByParentId`,
method: 'get',
params: params,
})
}

@ -45,6 +45,42 @@ export function getCustomerDetail(params) {
}) })
} }
// 小区管理-查询所有的小区信息
export function getCommunityList(params) {
return httpService({
url: `/user/community/list`,
method: 'get',
params: params,
})
}
// 小区管理-获取对应公司下的所有小区信息
export function getComById(params) {
return httpService({
url: `/user/community/getCommunityInfoByCompanyId`,
method: 'get',
params: params,
})
}
// 小区管理-添加小区信息
export function getAddCommunity(params) {
return httpService({
url: `/user/community/insertAdmin`,
method: 'post',
params: params,
})
}
// 小区管理-修改小区信息
export function updateCommunity(params) {
return httpService({
url: `/user/community/updateAdmin`,
method: 'post',
params: params,
})
}
// 订单管理-查询所有订单 // 订单管理-查询所有订单
export function getAllOrder(params) { export function getAllOrder(params) {
return httpService({ return httpService({
@ -54,6 +90,24 @@ export function getAllOrder(params) {
}) })
} }
// 订单管理-后台创建订单
export function createOrder(params) {
return httpService({
url: `/user/order/adminCreateOrder`,
method: 'post',
data: params,
})
}
// 订单管理-计算金额
export function calcAmount(params) {
return httpService({
url: `/user/order/calculateAmount`,
method: 'post',
data: params,
})
}
// 订单管理-订单解绑小区 // 订单管理-订单解绑小区
export function orderUnbound(params) { export function orderUnbound(params) {
return httpService({ return httpService({
@ -90,12 +144,21 @@ export function findSuperNavigation(params) {
}) })
} }
// 收费管理-根据收费模版主键Id查询收费模版信息
export function getChargeById(params) {
return httpService({
url: `/user/charging/findById`,
method: 'get',
params: params,
})
}
// 收费管理-收费标准-启用/禁用收费模版 // 收费管理-收费标准-启用/禁用收费模版
export function onoffCharging(params) { export function onoffCharging(params) {
return httpService({ return httpService({
url: `/user/charging/updateStatus`, url: `/user/charging/updateStatus`,
method: 'post', method: 'post',
params: params, data: params,
}) })
} }
@ -108,6 +171,15 @@ export function addCharge(params) {
}) })
} }
// 收费管理-收费标准-修改收费模版
export function updateCharge(params) {
return httpService({
url: `/user/charging/update`,
method: 'post',
data: params,
})
}
// 收费管理-财务账单-查询所有财务账单 // 收费管理-财务账单-查询所有财务账单
export function getAllList(params) { export function getAllList(params) {
return httpService({ return httpService({

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

@ -44,6 +44,15 @@ export default [
component: resolve => require(['@/views/Manage/VillageManage'], resolve), component: resolve => require(['@/views/Manage/VillageManage'], resolve),
meta: {title: '小区管理'}, meta: {title: '小区管理'},
}, },
{
path: '/Manage/VillageManage/_detail',
name: "village_detail",
title: "小区管理详情",
hide: true,
icon: 'home',
component: resolve => require(['@/views/Manage/VillageManage/_detail'], resolve),
meta: {title: '小区管理详情'},
},
{ {
path: '/Manage/OrderManage', path: '/Manage/OrderManage',
name: "OrderManage", name: "OrderManage",

@ -39,7 +39,8 @@
<a @click="detail(record)"></a> <a @click="detail(record)"></a>
</span> </span>
</a-table> </a-table>
<a-drawer title="新建收费模版" :visible="visible" @close="hanlderClose" width="512"> <!-- 新建/修改框 -->
<a-drawer :title="drawerModel == 1 ? '新建收费模版':'修改收费模版'" :visible="visible" @close="hanlderClose" width="512">
<a-form-model> <a-form-model>
<a-form-model-item label="模版名称"> <a-form-model-item label="模版名称">
<a-input v-model="addForm.name" style="width: 240px" placeholder="请输入模版名称" /> <a-input v-model="addForm.name" style="width: 240px" placeholder="请输入模版名称" />
@ -71,7 +72,8 @@
</div> </div>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<a-button @click="addConfirm" type="primary">确定</a-button> <a-button v-if="drawerModel==1" @click="addConfirm" type="primary"></a-button>
<a-button v-else type="primary" @click="addConfirm"></a-button>
</a-drawer> </a-drawer>
</div> </div>
</div> </div>
@ -79,12 +81,13 @@
<script> <script>
import {getChargingList} from "@/api/manage" import {getChargingList} from "@/api/manage"
// import {onoffCharging} from "@/api/manage" import {onoffCharging} from "@/api/manage"
import {findTimeType, findSuperNavigation, addCharge} from "@/api/manage"; import {findTimeType, findSuperNavigation, addCharge, updateCharge } from "@/api/manage";
export default { export default {
name: "chagingStandard", name: "chagingStandard",
data() { data() {
return { return {
drawerModel: 1,
form: { form: {
pageNum: 1, pageNum: 1,
size: 10, size: 10,
@ -218,6 +221,7 @@ export default {
}, },
// //
handlerAdd() { handlerAdd() {
this.drawerModel = 1;
this.visible = true this.visible = true
}, },
//- //-
@ -249,16 +253,30 @@ export default {
name: this.addForm.name, name: this.addForm.name,
chargingTemplateFunctionTimeTypeDTO: chosenAdds chargingTemplateFunctionTimeTypeDTO: chosenAdds
} }
addCharge(obj).then(res => { if(this.drawerModel == 1) {
}) addCharge(obj).then(() => {
this.visible = false
})
} else {
let o = Object.assign(obj, {id: this.chosenModel});
updateCharge(o).then(() => {
this.visible = false
})
};
this.getData();
}, },
// //
detail(record) { detail(record) {
this.chosenModel = record.id
this.drawerModel = 2;
this.visible = true
}, },
// ///
onChange(record) { onChange(record) {
console.log(record); let obj = {id: record.id}
onoffCharging(obj).then(() => {
this.getData()
})
}, },
// //
onSearch() { onSearch() {

@ -1,9 +1,8 @@
<template> <template>
<div class="main"> <div class="main">
<div class="cardTitle">退款订单</div> <div class="cardTitle">退款订单</div>
<a-divider />
<div class="content"> <div class="content">
<a-descriptions title="退款信息" :column="3"> <a-descriptions style="padding: 12px" title="退款信息" :column="3">
<a-descriptions-item label="订单号"> <a-descriptions-item label="订单号">
{{infoList.code}} {{infoList.code}}
</a-descriptions-item> </a-descriptions-item>
@ -19,16 +18,15 @@
</a-descriptions> </a-descriptions>
<a-divider></a-divider> <a-divider></a-divider>
<div class="payback-content"> <div class="payback-content">
<span>取消功能模块</span> <a-form-model :labelCol="{span: 2}" :wrapperCol="{span: 5,offset: 0}">
<a-checkbox-group :options="modelType" @change="modelChange" /> <a-form-model-item label="取消功能模块:">
<a-form-model layout="inline"> <a-checkbox-group :options="modelType" @change="modelChange" />
</a-form-model-item>
<a-form-model-item label="退款金额"> <a-form-model-item label="退款金额">
<a-input-number v-model="paybackForm.price"></a-input-number> <a-input-number v-model="paybackForm.price"></a-input-number>
</a-form-model-item> </a-form-model-item>
</a-form-model>
<a-form-model layout="inline">
<a-form-model-item label="退款方式"> <a-form-model-item label="退款方式">
<a-select v-model="paybackForm.type" style="width: 200px" placeholder="请选择退款方式"> <a-select v-model="paybackForm.type" placeholder="请选择退款方式">
<a-select-option :value="1"> <a-select-option :value="1">
线上 线上
</a-select-option> </a-select-option>
@ -40,8 +38,6 @@
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-form-model>
<a-form-model layout="inline">
<a-form-model-item label="退款原因"> <a-form-model-item label="退款原因">
<a-textarea placeholder="请输入退款原因" v-model="paybackForm.reason"></a-textarea> <a-textarea placeholder="请输入退款原因" v-model="paybackForm.reason"></a-textarea>
</a-form-model-item> </a-form-model-item>

@ -6,56 +6,54 @@
<div class="content"> <div class="content">
<a-descriptions title="基本信息" :column="3"> <a-descriptions title="基本信息" :column="3">
<a-descriptions-item label="企业名称"> <a-descriptions-item label="企业名称">
上海比利时物业有限公司 {{infoList.companyName}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="公司地址"> <a-descriptions-item label="公司地址">
湖南省湘潭市岳塘区红旗街道 8 单元 111 {{infoList.companyAddressDetails}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="社会信用代码" <a-descriptions-item label="社会信用代码"
>39123m13841bdi123341 >{{infoList.socialCreditCode}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="法人名称"> 陈晨 </a-descriptions-item> <a-descriptions-item label="法人名称"> {{infoList.legalPersonName}} </a-descriptions-item>
<a-descriptions-item label="法人身份证号" <a-descriptions-item label="法人身份证号"
>621222199804287702</a-descriptions-item >{{infoList.legalPersonIdCard}}</a-descriptions-item
> >
<a-descriptions-item label="执照有效期限"> <a-descriptions-item label="执照有效期限">
2021/04/09 2021/04/09</a-descriptions-item {{infoList.licenseTimeStart}}
> {{infoList.licenseTimeEnd == null ? '长期' : infoList.licenseTimeEnd}}
</a-descriptions-item>
</a-descriptions> </a-descriptions>
<a-descriptions title="法人身份证照" :column="1"> <a-descriptions title="法人身份证照" :column="1">
<a-descriptions-item label="头像面" @click="download(this.img)" <a-descriptions-item label="头像面" @click="download(this.img)"
><img :src="img" alt="" >
/></a-descriptions-item> <img :src="item.url" alt="" v-for="(item, index) in infoList.idCardFrontImgList" :key="index">
</a-descriptions-item>
<a-descriptions-item label="国徽面" <a-descriptions-item label="国徽面"
><img :src="img" alt="" ><img :src="item.url" alt="" v-for="(item, index) in infoList.idCardBackImgList" :key="index">
/></a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="营业执照" <a-descriptions-item label="营业执照"
><img :src="img" alt="" ><img :src="item.url" alt="" v-for="(item, index) in infoList.businessLicenseImgList" :key="index">
/></a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="其他附件" <a-descriptions-item label="其他附件"
><img :src="img" alt="" /><img :src="img" alt="" /><img ><img :src="item.url" alt="" v-for="(item, index) in infoList.othersImgList" :key="index">
:src="img" </a-descriptions-item>
alt="" /><img :src="img" alt="" /><img :src="img" alt="" /><img
:src="img"
alt=""
/></a-descriptions-item>
</a-descriptions> </a-descriptions>
<a-descriptions title="联系人信息" :column="3"> <a-descriptions title="联系人信息" :column="3">
<a-descriptions-item label="联系人"> 周立 </a-descriptions-item> <a-descriptions-item label="联系人"> {{infoList.contactsName}} </a-descriptions-item>
<a-descriptions-item label="联系人号码"> <a-descriptions-item label="联系人号码">
18716191912 {{infoList.contactsTel}}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="邮箱">hpzs@sina.com </a-descriptions-item> <a-descriptions-item label="邮箱">{{infoList.contactsEmail}} </a-descriptions-item>
<a-descriptions-item label="联系人地址"> <a-descriptions-item label="联系人地址">
陕西省铜川市宜君县哭泉乡 10 单元 98 {{infoList.contactsAddressDetails}}
</a-descriptions-item> </a-descriptions-item>
</a-descriptions> </a-descriptions>
</div> </div>
</div> </div>
<div class="footer"> <div class="footer">
<a-space style="margin-left: 70%"> <a-space style="margin-left: 70%">
<a-button type="primary" @click="auditShow=true"></a-button> <!-- <a-button type="primary" @click="auditShow=true"></a-button> -->
<a-button @click="cancel"></a-button> <a-button @click="cancel"></a-button>
</a-space> </a-space>
</div> </div>
<a-modal <a-modal
@ -90,19 +88,31 @@
</template> </template>
<script> <script>
import {getCustomerDetail} from "@/api/manage"
export default { export default {
data() { data() {
return { return {
form:{ form:{
type:'1', id: undefined
remark:''
}, },
auditShow: false, auditShow: false,
infoList: {},
detailData: {}, detailData: {},
img: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimgcdn.scol.com.cn%2FNEWS_1F3371B8BC0CD062D6AF69E363F8E32A.JPG&refer=http%3A%2F%2Fimgcdn.scol.com.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1643355029&t=835fe0ff21af86e6996eb308794df217", img: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimgcdn.scol.com.cn%2FNEWS_1F3371B8BC0CD062D6AF69E363F8E32A.JPG&refer=http%3A%2F%2Fimgcdn.scol.com.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1643355029&t=835fe0ff21af86e6996eb308794df217",
}; };
}, },
mounted() {
this.form.id = this.$route.query.id
this.getData();
},
methods: { methods: {
getData() {
getCustomerDetail(this.form).then(res => {
let data = res.data;
this.infoList = data;
console.log(this.infoList)
})
},
download() {}, download() {},
cancel() { cancel() {
this.$router.go(-1); this.$router.go(-1);

@ -135,8 +135,12 @@ export default {
}) })
}, },
detail(index){ detail(index){
console.log(index) this.$router.push({
this.$router.push({name:'customer_detail'}) name:'customer_detail',
query: {
id: index.id
}
})
}, },
onSelectChange(selectedRowKeys) { onSelectChange(selectedRowKeys) {
console.log("selectedRowKeys changed: ", selectedRowKeys); console.log("selectedRowKeys changed: ", selectedRowKeys);

@ -1,31 +1,187 @@
<template> <template>
<div class="main"> <div class="main">
<div class="main-content">
<div class="cardTitle">添加订单信息</div> <div class="cardTitle">添加订单信息</div>
<a-divider />
<div class="content"> <div class="content">
<a-form-model> <a-form-model :labelCol="{span: 2}" :wrapperCol="{span: 8}">
<a-form-model-item label="订单号"> <a-form-model-item label="订单号">
<a-input style="width: 240px"></a-input> <a-input v-model="form.code" ></a-input>
</a-form-model-item>
<a-form-model-item label="支付类型">
<a-select v-model="form.payType">
<a-select-option :value="1">线下</a-select-option>
<a-select-option :value="2">支付宝</a-select-option>
<a-select-option :value="3">微信</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="选择收费模版">
<a-select v-model="form.chargingTemplateId" @change="modelChange">
<a-select-option :value="item.id" v-for="(item, index) in modelData" :key="index">
{{item.name}}
</a-select-option>
</a-select>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="选择功能模块"> <a-form-model-item label="选择功能模块">
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="选择有效时长"> <a-form-model-item label="选择有效时长">
<a-select style="width: 240px"> <a-select v-model="form.timeTypeId" @change="timeChange">
<a-select-option :value="item.id" v-for="(item, index) in timeData" :key="index">
{{item.years == 0 ? '' : item.years+'年'}}
{{item.months == 0 ? '' : item.months+'个月'}}
{{item.days == 0 ? '' : item.days+'天'}}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="购买金额">
<span style="color: red">¥ {{form.payPrice}}</span>
</a-form-model-item>
<a-form-model-item label="选择公司">
<a-select v-model="form.companyId" @change="boundCom">
<a-select-option :value="item.id" v-for="(item, index) in companyData" :key="index">
{{item.companyName}}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="绑定小区">
<a-select v-model="form.communityId">
<a-select-option :value="item.id" v-for="(item, index) in comData" :key="index">
{{item.companyName}}
</a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</div> </div>
<div class="cardTitle">高级配置</div>
<div class="content">
<a-form-model :labelCol="{span: 2}" :wrapperCol="{span: 8}">
<a-form-model-item label="域名">
<a-input style="width: 394px"></a-input>
</a-form-model-item>
<a-form-model-item label="服务器ip">
<a-input style="width: 394px"></a-input>
</a-form-model-item>
<a-form-model-item label="是否定制">
<a-select style="width: 394px" @change="textareaDisable" v-model="form.isCustomized">
<a-select-option :value="0">
不定制
</a-select-option>
<a-select-option :value="1">
定制
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="定制需求">
<a-textarea v-model="form.customizedDemand" style="width: 394px" :disabled="form.isCustomized == 0" placeholder="请填写定制需求">
</a-textarea>
</a-form-model-item>
</a-form-model>
</div>
</div>
<a-space style="margin-left: 138px">
<a-button type="primary" @click="addConfirm"></a-button>
<a-button @click="cancel"></a-button>
</a-space>
</div> </div>
</template> </template>
<script> <script>
import {getAllRequest,getComById, createOrder, calcAmount} from "@/api/manage";
import {findTimeType, getChargingList, getChargeById} from "@/api/manage";
export default { export default {
name: "addOrder",
data() {
return {
form: {
code: '',
payType: 1,
chargingTemplateId: undefined,
modelFunctionId: [1],
timeTypeId: undefined,
payPrice: 0,
companyId: undefined,
communityId: undefined,
domainName: '',
serviceIp: '',
isCustomized: 0, //
customizedDemand: '' //
},
//
companyData: [],
comData: [], //
//
timeData: [],
//
modelData: [],
}
},
mounted() {
this.getApi();
},
methods: {
getApi() {
let obj = {pageNum: 1,size: 1000};
getAllRequest(obj).then(res => {
let data = res.data.rows
this.companyData = data;
})
findTimeType().then(res => {
let data = res.data;
this.timeData = data
})
getChargingList(Object.assign(obj, {name: ''})).then(res => {
let data = res.data.rows;
this.modelData = data
})
},
getPrice() {
if(this.form.chargingTemplateId && this.form.modelFunctionId && this.form.timeTypeId) {
let obj = {
chargingTemplateId: this.form.chargingTemplateId,
modelFunctionId: this.form.modelFunctionId,
timeTypeId: this.form.timeTypeId
};
calcAmount(obj).then(res => {
let data = res.data;
this.form.payPrice = data * 1
});
}
},
modelChange(val) {
getChargeById({id: val}).then(res => {
console.log(res)
});
this.getPrice();
},
timeChange(val) {
this.getPrice();
},
textareaDisable(val) {
if(val == 0) {
this.form.customizedDemand = ''
}
},
//
boundCom(val) {
getComById(val).then(res => {
let data = res.data;
this.comData = data
})
},
addConfirm() {
createOrder(this.form).then(res => {
console.log(res)
})
},
cancel() {
this.$router.go(-1);
}
}
} }
</script> </script>
<style> <style lang="less">
.main-content {
margin-left: 125px;
}
</style> </style>

@ -0,0 +1,15 @@
<template>
<div>
test
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

@ -1,87 +1,142 @@
<template> <template>
<div> <div class="main">
<commonTable <div class="cardTitle">小区管理</div>
:columns="columns" <div class="search-box">
:tableData="tableData" <a-space size="large">
:ActionsList="ActionsList" <a-input v-model="form.communityName" placeholder="请输入小区名" />
@handleTableChange="handleTableChange" <a-button type="primary" @click="handlerSearch"> </a-button>
@Actions="Actions" <a-button @click="handlerReset"> </a-button>
@selectionChoosed="selectionChoosed" </a-space>
> </div>
<template v-slot:actionBox="data"> <a-button @click="hanlderAdd" style="margin-left: 22px" type="primary">
<a @click="del(data)"></a> 添加小区
<span style="margin: 5px">|</span> </a-button>
<a>详情</a> <!-- 表格 -->
</template> <div id="commonTable">
</commonTable> <a-table
:scroll="{ x: 1300 }"
:columns="columns"
:data-source="tableData"
:pagination="pagination"
@change="handleTableChange"
:row-key="
(record, index) => {
return index;
}
"
>
<span slot="pics" slot-scope="text,record">
<img :src="item.url" alt="" v-for="(item, index) in record.communityImgList" :key="index">
</span>
<span slot="action" slot-scope="text,record">
<a @click="detail(record)"></a>
</span>
</a-table>
</div>
<a-drawer :title="modelType == 1 ? '填写小区信息':'修改小区信息'" :visible="visible" @close="hanlderClose" width="512">
<a-form-model>
<a-form-model-item label="小区全称">
<a-input v-model="addForm.name" style="width: 260px" placeholder="请输入小区全称" />
</a-form-model-item>
<a-form-model-item label="公司名称">
<a-select v-model="addForm.companyId" style="width: 260px" placeholder="请选择公司">
<a-select-option :value="item.id" v-for="(item, index) in companyData" :key="index">
{{item.companyName}}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="小区地址">
<a-select @change="cityChange1" style="width: 120px" placeholder="请选择省">
<a-select-option :value="item.id" v-for="(item, index) in cityData" :key="index">
{{item.name}}
</a-select-option>
</a-select>
<a-select v-model="address1" @change="cityChange2" style="width: 120px;margin-left: 20px" placeholder="请选择市">
<a-select-option :value="item.id" v-for="(item, index) in cityData2" :key="index">
{{item.name}}
</a-select-option>
</a-select>
<a-select v-model="addForm.address" style="width: 120px;margin-left: 20px" placeholder="请选择区">
<a-select-option :value="item.id" v-for="(item, index) in cityData3" :key="index">
{{item.name}}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item>
<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>
</a-form-model-item>
</a-form-model>
<a-button @click="addConfirm" type="primary">确定</a-button>
<a-button style="margin-left: 20px" @click="hanlderClose"></a-button>
</a-drawer>
</div> </div>
</template> </template>
<script> <script>
import {getCommunityList, getAddCommunity, getAllRequest, updateCommunity} from "@/api/manage"
import {getAllCity, getCityByParent} from "@/api/city"
import {uploadImg} from "@/api/upload"
export default { export default {
data() { data() {
return { return {
tableChoosed: [], uploadImg: uploadImg,
form: {
pageNum: 1,
size: 10,
communityName: ''
},
addForm: {
companyId: undefined,
name: '',
address: undefined,
addressDetails: '',
communityUrls: []
},
// //
pagination: { pagination: {
current: 1, current: 1,
total: 0, total: 0,
pageSize: 10, pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}, },
// //
columns: [ columns: [
{ {
title: "Name", title: "小区名称",
dataIndex: "name", dataIndex: "name",
width: "200", width: "200",
}, },
{ {
title: "Gender", title: "公司名称",
dataIndex: "gender", dataIndex: "companyName",
width: "200",
customRender: function (gender) {
if (gender === 1) {
return "是";
} else {
return "否";
}
},
},
{
title: "Gender1",
dataIndex: "gender1",
width: "200",
},
{
title: "Gender2",
dataIndex: "gender2",
width: "200",
},
{
title: "Gender3",
dataIndex: "gender3",
width: "200",
},
{
title: "Gender4",
dataIndex: "gender4",
width: "200", width: "200",
}, },
{ {
title: "Gender5", title: "小区地址",
dataIndex: "gender5", dataIndex: "addressName",
width: "200", width: "200",
}, },
{ {
title: "Gender6", title: "公司图片",
dataIndex: "gender6", dataIndex: "communityImgList",
width: "200",
},
{
title: "status",
dataIndex: "status",
width: "200", width: "200",
scopedSlots: { customRender: "pics" },
}, },
{ {
title: "操作", title: "操作",
@ -93,63 +148,106 @@ export default {
}, },
], ],
// //
tableData: [ tableData: [],
{ name: 1, gender: 1 }, companyData: [],
{}, cityData: [],
{}, cityData2: [],
{}, cityData3: [],
{}, address1: undefined,
{}, // /
{}, modelType: 1, //1 2
{}, visible: false,
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
],
ActionsList: [
{
label: "批量删除",
value: 1,
},
{
label: "批量导出",
value: 2,
},
],
}; };
}, },
mounted() {
this.getApi();
this.getData()
},
methods: { methods: {
handleTableChange(pagination) { getData() {
console.log(pagination); getCommunityList(this.form).then(res => {
const pager = { ...this.pagination }; let data = res.data.rows;
pager.current = pagination.current; this.pagination.total = res.data.total;
pager.pageSize = pagination.pageSize; this.tableData = data
this.pagination = pager; })
}, },
del(data) { getApi() {
console.log(data); let obj = {pageNum: 1,size: 1000};
getAllRequest(obj).then(res => {
let data = res.data.rows
this.companyData = data;
})
getAllCity().then(res => {
let data = res.data;
this.cityData = data;
})
}, },
Actions(data) { //
console.log(data); handleTableChange(pagination) {
this.form.size = pagination.pageSize;
this.form.pageNum = pagination.current;
this.getData();
}, },
selectionChoosed(data) { selectionChoosed(data) {
console.log(data);
this.tableChoosed = data this.tableChoosed = data
}, },
//
detail(record) {
this.modelType = 2;
this.chosenId = record.id; //id
this.visible = true;
},
//
handlerSearch() {
this.getData()
},
//
handlerReset() {
this.form.communityName = '';
this.getData()
},
//
hanlderAdd() {
this.modelType = 1;
this.visible = true;
},
hanlderClose() {
this.visible = false;
},
addConfirm() {
if(this.modelType == 1) {
getAddCommunity(this.addForm).then(res => {
console.log(res)
})
} else {
let obj = Object.assign({id: this.chosenId}, this.addForm)
updateCommunity(obj).then(res => {
console.log(res)
})
}
this.visible = false;
},
//-
cityChange1(val) {
this.address1 = undefined,
this.addForm.address = undefined,
this.cityData3 = [],
this.cityData2 = this.cityData[val-2].cityList
},
cityChange2(val) {
this.addForm.address = undefined
getCityByParent({parentId: val}).then(res => {
let data = res.data;
this.cityData3 = data;
})
},
//-
addFile(file) {
console.log(file)
}
}, },
}; };
</script> </script>
<style> <style lang="less">
</style> </style>
Loading…
Cancel
Save