优化完善物业管理模块的逻辑
This commit is contained in:
parent
00b9af721e
commit
9a51c9b3a4
@ -40,6 +40,8 @@ export const apiArr = {
|
|||||||
|
|
||||||
communityInfo: "/api/v2/community/get-one",//获取小区信息
|
communityInfo: "/api/v2/community/get-one",//获取小区信息
|
||||||
|
|
||||||
|
workCommunityList: "/api/v2/wechat/community-worker/work-comm-list",//员工小区列表
|
||||||
|
|
||||||
getOrderList:"/api/v2/wechat/community-orders/get-all-list",//获取账单
|
getOrderList:"/api/v2/wechat/community-orders/get-all-list",//获取账单
|
||||||
getCommunityRoomList:"/api/v2/wechat/community-room/list", //获取房源列表
|
getCommunityRoomList:"/api/v2/wechat/community-room/list", //获取房源列表
|
||||||
getUserGovenmentMoney:"/api/v2/wechat/government-housing-fund-flow-crud/user", //获取用户公积金
|
getUserGovenmentMoney:"/api/v2/wechat/government-housing-fund-flow-crud/user", //获取用户公积金
|
||||||
|
|||||||
@ -328,7 +328,6 @@ export default {
|
|||||||
});
|
});
|
||||||
if (!uni.getStorageSync("changeCommData")) {
|
if (!uni.getStorageSync("changeCommData")) {
|
||||||
uni.setStorageSync("changeCommData", { name: res.rows[0].name, id: res.rows[0].community_id })
|
uni.setStorageSync("changeCommData", { name: res.rows[0].name, id: res.rows[0].community_id })
|
||||||
uni.setStorageSync("isShowNav", res.rows[0].room_owner_list[0].type)
|
|
||||||
}
|
}
|
||||||
this.communityList = res.rows;
|
this.communityList = res.rows;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -91,7 +91,6 @@ export default {
|
|||||||
this.currentCommunity = e
|
this.currentCommunity = e
|
||||||
uni.setStorageSync('changeCommData', { id: e.community_id, name: e.name });
|
uni.setStorageSync('changeCommData', { id: e.community_id, name: e.name });
|
||||||
uni.setStorageSync('currentCommunityAddr', e.addr);
|
uni.setStorageSync('currentCommunityAddr', e.addr);
|
||||||
uni.setStorageSync("isShowNav", e.room_owner_list[0].type)
|
|
||||||
NavgateTo("1")
|
NavgateTo("1")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -120,6 +120,7 @@ export default {
|
|||||||
uni.removeStorageSync('is_deal');
|
uni.removeStorageSync('is_deal');
|
||||||
uni.removeStorageSync('is_dev');
|
uni.removeStorageSync('is_dev');
|
||||||
uni.removeStorageSync('is_shop');
|
uni.removeStorageSync('is_shop');
|
||||||
|
uni.removeStorageSync('is_worker');
|
||||||
uni.removeStorageSync('shopId');
|
uni.removeStorageSync('shopId');
|
||||||
uni.removeStorageSync('order_dispatch_permission');
|
uni.removeStorageSync('order_dispatch_permission');
|
||||||
uni.removeStorageSync('work_order_permission');
|
uni.removeStorageSync('work_order_permission');
|
||||||
@ -146,6 +147,7 @@ export default {
|
|||||||
uni.setStorageSync('is_deal', loginRes.is_deal);
|
uni.setStorageSync('is_deal', loginRes.is_deal);
|
||||||
uni.setStorageSync('is_dev', loginRes.is_dev);
|
uni.setStorageSync('is_dev', loginRes.is_dev);
|
||||||
uni.setStorageSync('is_shop', loginRes.is_shop);
|
uni.setStorageSync('is_shop', loginRes.is_shop);
|
||||||
|
uni.setStorageSync('is_worker', loginRes.is_worker);
|
||||||
|
|
||||||
|
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
|
|||||||
@ -11,11 +11,6 @@
|
|||||||
<!-- 背景图片区域 -->
|
<!-- 背景图片区域 -->
|
||||||
<view class="bg-image-container">
|
<view class="bg-image-container">
|
||||||
<image class="bg-image" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png" mode="aspectFill"></image>
|
<image class="bg-image" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png" mode="aspectFill"></image>
|
||||||
<!-- <input class="search-box" placeholder='输入工单号进入工单' confirm-type='search' @input="searchInput"
|
|
||||||
@confirm="searchInput" :value="selectKeyWord" /> -->
|
|
||||||
<!-- <view class="search-box">
|
|
||||||
<text class="search-placeholder">输入工单号进入工单</text>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
<view class="work-order-section">
|
<view class="work-order-section">
|
||||||
<view v-for="(item, index) in 9" :key="index">
|
<view v-for="(item, index) in 9" :key="index">
|
||||||
@ -69,7 +64,7 @@ export default {
|
|||||||
// 跳转到工单台
|
// 跳转到工单台
|
||||||
navigateToWorkOrderDashboard() {
|
navigateToWorkOrderDashboard() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/packages/workOrderDashboard/index/index'
|
url: '/packages/workOrderDashboard/index/index?communityId=' + uni.getStorageSync('changeCommData').id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,28 +11,16 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="tabList">
|
<view class="tabList">
|
||||||
<view
|
<view :class="active == 1 ? 'tab active' : 'tab'" @click="headerTabsClick(1)">
|
||||||
:class="active == 1 ? 'tab active' : 'tab'"
|
|
||||||
@click="headerTabsClick(1)"
|
|
||||||
>
|
|
||||||
待指派 <span>({{ awaitingNumb }})</span>
|
待指派 <span>({{ awaitingNumb }})</span>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view :class="active == 2 ? 'tab active' : 'tab'" @click="headerTabsClick(2)">
|
||||||
:class="active == 2 ? 'tab active' : 'tab'"
|
|
||||||
@click="headerTabsClick(2)"
|
|
||||||
>
|
|
||||||
进行中 <span>({{ underwayNum }})</span>
|
进行中 <span>({{ underwayNum }})</span>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view :class="active == 4 ? 'tab active' : 'tab'" @click="headerTabsClick(4)">
|
||||||
:class="active == 4 ? 'tab active' : 'tab'"
|
|
||||||
@click="headerTabsClick(4)"
|
|
||||||
>
|
|
||||||
已作废 <span>({{ discardNum }})</span>
|
已作废 <span>({{ discardNum }})</span>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view :class="active == 3 ? 'tab active' : 'tab'" @click="headerTabsClick(3)">
|
||||||
:class="active == 3 ? 'tab active' : 'tab'"
|
|
||||||
@click="headerTabsClick(3)"
|
|
||||||
>
|
|
||||||
已完成 <span>({{ doneNum }})</span>
|
已完成 <span>({{ doneNum }})</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -101,6 +89,7 @@ export default {
|
|||||||
underwayNum: '', // 进行中工单数量
|
underwayNum: '', // 进行中工单数量
|
||||||
doneNum: '', // 已完成工单数量
|
doneNum: '', // 已完成工单数量
|
||||||
discardNum: '', // 已废弃工单数量
|
discardNum: '', // 已废弃工单数量
|
||||||
|
communityId: '',//小区id
|
||||||
// 状态枚举类型
|
// 状态枚举类型
|
||||||
statusType: {
|
statusType: {
|
||||||
1: {
|
1: {
|
||||||
@ -140,10 +129,10 @@ export default {
|
|||||||
},
|
},
|
||||||
async init() {
|
async init() {
|
||||||
const [awaitingNumb, underwayNum, doneNum, discardNum] = await Promise.all([
|
const [awaitingNumb, underwayNum, doneNum, discardNum] = await Promise.all([
|
||||||
this.awaitingRes(),
|
this.awaitingRes(1),
|
||||||
this.underwayRes(),
|
this.awaitingRes(2),
|
||||||
this.doneRes(),
|
this.awaitingRes(3),
|
||||||
this.discardRes(),
|
this.awaitingRes(4),
|
||||||
]);
|
]);
|
||||||
this.awaitingNumb = awaitingNumb;
|
this.awaitingNumb = awaitingNumb;
|
||||||
this.underwayNum = underwayNum;
|
this.underwayNum = underwayNum;
|
||||||
@ -152,6 +141,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async getTabsList() {
|
async getTabsList() {
|
||||||
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
||||||
|
community_id: this.communityId,
|
||||||
status: this.active,
|
status: this.active,
|
||||||
page_num: this.page_num,
|
page_num: this.page_num,
|
||||||
page_size: this.page_size,
|
page_size: this.page_size,
|
||||||
@ -170,36 +160,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 待维修工单数量
|
// 待维修工单数量
|
||||||
async awaitingRes() {
|
async awaitingRes(status) {
|
||||||
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
||||||
status: 1,
|
community_id: this.communityId,
|
||||||
page_num: this.page_num,
|
status: status,
|
||||||
page_size: this.page_size,
|
|
||||||
});
|
|
||||||
return res.total;
|
|
||||||
},
|
|
||||||
// 进行中工单数量
|
|
||||||
async underwayRes() {
|
|
||||||
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
|
||||||
status: 2,
|
|
||||||
page_num: this.page_num,
|
|
||||||
page_size: this.page_size,
|
|
||||||
});
|
|
||||||
return res.total;
|
|
||||||
},
|
|
||||||
// 已废弃工单数量
|
|
||||||
async discardRes() {
|
|
||||||
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
|
||||||
status: 4,
|
|
||||||
page_num: this.page_num,
|
|
||||||
page_size: this.page_size,
|
|
||||||
});
|
|
||||||
return res.total;
|
|
||||||
},
|
|
||||||
// 已完成工单数量
|
|
||||||
async doneRes() {
|
|
||||||
const res = await request(apiArr.getWorkOrderCrudList, "POST", {
|
|
||||||
status: 3,
|
|
||||||
page_num: this.page_num,
|
page_num: this.page_num,
|
||||||
page_size: this.page_size,
|
page_size: this.page_size,
|
||||||
});
|
});
|
||||||
@ -217,6 +181,7 @@ export default {
|
|||||||
const meun = menuButtonInfo();
|
const meun = menuButtonInfo();
|
||||||
this.top = meun.top;
|
this.top = meun.top;
|
||||||
this.localHeight = meun.height;
|
this.localHeight = meun.height;
|
||||||
|
this.communityId = JSON.parse(options.communityId);
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.page_num = 1;
|
this.page_num = 1;
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<view class="empty" v-if="communityList.length == 0">
|
<view class="empty" v-if="communityList.length == 0">
|
||||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_newEmpty.png"
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_newEmpty.png"
|
||||||
alt="" />
|
alt="" />
|
||||||
没有添加任何房产
|
暂无数据
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -15,8 +15,7 @@
|
|||||||
<image :src="item.pic" mode="aspectFill"></image>
|
<image :src="item.pic" mode="aspectFill"></image>
|
||||||
</div>
|
</div>
|
||||||
<div class="communityItem_left_msg">
|
<div class="communityItem_left_msg">
|
||||||
<div class="communityItem_left_msg_tit">{{ item.name }}<span>( {{ item.room_owner_list.length }}
|
<div class="communityItem_left_msg_tit">{{ item.name }}</div>
|
||||||
)</span></div>
|
|
||||||
<div class="communityItem_left_msg_msg">{{ item.addr }}</div>
|
<div class="communityItem_left_msg_msg">{{ item.addr }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -57,17 +56,13 @@ export default {
|
|||||||
NavgateTo("/packages/community/addCommunity/index")
|
NavgateTo("/packages/community/addCommunity/index")
|
||||||
},
|
},
|
||||||
async getList() {
|
async getList() {
|
||||||
await request(apiArr.commInfo, "POST", {
|
await request(apiArr.workCommunityList, "POST", {
|
||||||
user_id: uni.getStorageSync('userId'),
|
user_id: uni.getStorageSync('userId'),
|
||||||
longitude: uni.getStorageSync('location').lng,
|
|
||||||
latitude: uni.getStorageSync('location').lat,
|
|
||||||
page_num: this.page_num,
|
|
||||||
page_size: this.page_size
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
res.rows.forEach(item => {
|
res.rows.forEach(item => {
|
||||||
item.pic = item.pic.startsWith('http') ? item.pic : picUrl + item.pic
|
item.pic = item.pic.startsWith('http') ? item.pic : picUrl + item.pic
|
||||||
});
|
});
|
||||||
this.communityList = res.rows.filter(item => item.front_end_display !== 1)
|
this.communityList = res.rows
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// toUpview(item) {
|
// toUpview(item) {
|
||||||
@ -79,7 +74,6 @@ export default {
|
|||||||
this.currentCommunity = e
|
this.currentCommunity = e
|
||||||
uni.setStorageSync('changeCommData', { id: e.community_id, name: e.name });
|
uni.setStorageSync('changeCommData', { id: e.community_id, name: e.name });
|
||||||
uni.setStorageSync('currentCommunityAddr',e.addr);
|
uni.setStorageSync('currentCommunityAddr',e.addr);
|
||||||
uni.setStorageSync("isShowNav", e.room_owner_list[0].type)
|
|
||||||
NavgateTo("1")
|
NavgateTo("1")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1063,8 +1063,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.showNav = uni.getStorageSync("isShowNav") ?
|
this.showNav = uni.getStorageSync("is_worker")
|
||||||
(uni.getStorageSync("isShowNav") == 1 ? false : true) : false
|
|
||||||
this.flag = false
|
this.flag = false
|
||||||
this.bottomPageNum = 1
|
this.bottomPageNum = 1
|
||||||
console.log('当前页面展示的城市信息', this.currentCity)
|
console.log('当前页面展示的城市信息', this.currentCity)
|
||||||
|
|||||||
@ -78,6 +78,7 @@ export default {
|
|||||||
uni.setStorageSync('is_deal', loginRes.is_deal);
|
uni.setStorageSync('is_deal', loginRes.is_deal);
|
||||||
uni.setStorageSync('is_dev', loginRes.is_dev);
|
uni.setStorageSync('is_dev', loginRes.is_dev);
|
||||||
uni.setStorageSync('is_shop', loginRes.is_shop);
|
uni.setStorageSync('is_shop', loginRes.is_shop);
|
||||||
|
uni.setStorageSync('is_worker', loginRes.is_worker);
|
||||||
|
|
||||||
|
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
@ -146,6 +147,7 @@ export default {
|
|||||||
uni.removeStorageSync('is_deal');
|
uni.removeStorageSync('is_deal');
|
||||||
uni.removeStorageSync('is_dev');
|
uni.removeStorageSync('is_dev');
|
||||||
uni.removeStorageSync('is_shop');
|
uni.removeStorageSync('is_shop');
|
||||||
|
uni.removeStorageSync('is_worker');
|
||||||
uni.removeStorageSync('shopId');
|
uni.removeStorageSync('shopId');
|
||||||
uni.removeStorageSync('order_dispatch_permission');
|
uni.removeStorageSync('order_dispatch_permission');
|
||||||
uni.removeStorageSync('work_order_permission');
|
uni.removeStorageSync('work_order_permission');
|
||||||
@ -194,6 +196,7 @@ export default {
|
|||||||
uni.setStorageSync('is_deal', loginRes.is_deal);
|
uni.setStorageSync('is_deal', loginRes.is_deal);
|
||||||
uni.setStorageSync('is_dev', loginRes.is_dev);
|
uni.setStorageSync('is_dev', loginRes.is_dev);
|
||||||
uni.setStorageSync('is_shop', loginRes.is_shop);
|
uni.setStorageSync('is_shop', loginRes.is_shop);
|
||||||
|
uni.setStorageSync('is_worker', loginRes.is_worker);
|
||||||
|
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
const loginInfoRes = await request(apiArr.loginInfo, 'POST', {
|
const loginInfoRes = await request(apiArr.loginInfo, 'POST', {
|
||||||
|
|||||||
@ -269,6 +269,7 @@ export default {
|
|||||||
uni.removeStorageSync('is_deal');
|
uni.removeStorageSync('is_deal');
|
||||||
uni.removeStorageSync('is_dev');
|
uni.removeStorageSync('is_dev');
|
||||||
uni.removeStorageSync('is_shop');
|
uni.removeStorageSync('is_shop');
|
||||||
|
uni.removeStorageSync('is_worker');
|
||||||
uni.removeStorageSync('shopId');
|
uni.removeStorageSync('shopId');
|
||||||
uni.removeStorageSync('order_dispatch_permission');
|
uni.removeStorageSync('order_dispatch_permission');
|
||||||
uni.removeStorageSync('work_order_permission');
|
uni.removeStorageSync('work_order_permission');
|
||||||
@ -295,6 +296,7 @@ export default {
|
|||||||
uni.setStorageSync('is_deal', loginRes.is_deal);
|
uni.setStorageSync('is_deal', loginRes.is_deal);
|
||||||
uni.setStorageSync('is_dev', loginRes.is_dev);
|
uni.setStorageSync('is_dev', loginRes.is_dev);
|
||||||
uni.setStorageSync('is_shop', loginRes.is_shop);
|
uni.setStorageSync('is_shop', loginRes.is_shop);
|
||||||
|
uni.setStorageSync('is_worker', loginRes.is_worker);
|
||||||
|
|
||||||
|
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user