添加工单台选择小区页面

This commit is contained in:
赵毅 2025-08-12 17:41:09 +08:00
parent 39a0160f95
commit 93026479d3
5 changed files with 223 additions and 10 deletions

View File

@ -15,6 +15,13 @@
.searchBox_add { .searchBox_add {
margin: 10rpx 20rpx; margin: 10rpx 20rpx;
display: flex;
align-items: center;
}
.top-image{
width: 50rpx;
height: 50rpx;
} }
.emptyCommunity { .emptyCommunity {

View File

@ -1,8 +1,9 @@
<template> <template>
<view class="container"> <view class="container">
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }"> <view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<view class="searchBox_add"> <view class="searchBox_add" @click="addCommunity">
<view class="emptyCommunity" @click="addCommunity"> <image class="top-image" src="http://localhost:8080/workOrder_community.png" mode="aspectFill"></image>
<view class="emptyCommunity">
{{ communityVal }} {{ communityVal }}
</view> </view>
</view> </view>
@ -10,7 +11,7 @@
<!-- 背景图片区域 --> <!-- 背景图片区域 -->
<view class="bg-image-container"> <view class="bg-image-container">
<image class="bg-image" src="http://localhost:8080/test.png" mode="aspectFill"></image> <image class="bg-image" src="http://localhost:8080/test.png" mode="aspectFill"></image>
<!-- <input class="search-box" placeholder='输入工单号进入工单' confirm-type='search' @input="searchInput" <!-- <input class="search-box" placeholder='输入工单号进入工单' confirm-type='search' @input="searchInput"
@confirm="searchInput" :value="selectKeyWord" /> --> @confirm="searchInput" :value="selectKeyWord" /> -->
<view class="search-box"> <view class="search-box">
<text class="search-placeholder">输入工单号进入工单</text> <text class="search-placeholder">输入工单号进入工单</text>
@ -31,11 +32,11 @@
<script> <script>
import { import {
request, request,
picUrl, picUrl,
uniqueByField, uniqueByField,
menuButtonInfo, menuButtonInfo,
NavgateTo, NavgateTo,
} from "../../../utils"; } from "../../../utils";
import { apiArr } from "../../../api/community"; import { apiArr } from "../../../api/community";
@ -52,7 +53,7 @@ export default {
const orderDispatchPermission = uni.getStorageSync('order_dispatch_permission'); const orderDispatchPermission = uni.getStorageSync('order_dispatch_permission');
this.showWorkOrderSection = !(workOrderPermission === false && orderDispatchPermission === false); this.showWorkOrderSection = !(workOrderPermission === false && orderDispatchPermission === false);
}, },
async onShow(){ async onShow() {
this.communityVal = uni.getStorageSync('changeCommData').name; this.communityVal = uni.getStorageSync('changeCommData').name;
const params = { const params = {
community_id: uni.getStorageSync('changeCommData').id, community_id: uni.getStorageSync('changeCommData').id,
@ -62,7 +63,7 @@ export default {
}, },
methods: { methods: {
addCommunity() { addCommunity() {
NavgateTo("/packages/community/myCommunity/index"); NavgateTo("/packages/workOrderDashboard/myCommunity/index");
}, },
// //

View File

@ -0,0 +1,98 @@
page {
background-color: #f6f7fb;
padding: 0;
}
.container {
min-height: 100vh;
}
image {
width: 100%;
height: 100%;
}
.empty {
font-size: 28rpx;
color: #999999;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 180rpx;
}
.empty image {
width: 340rpx;
height: 240rpx;
}
.addBtn {
width: 600rpx;
height: 90rpx;
background: linear-gradient(91deg, #FF7658 0%, #FF370B 100%);
border-radius: 100rpx 100rpx 100rpx 100rpx;
font-size: 36rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
position: fixed;
left: 50%;
transform: translateX(-50%);
bottom: 100rpx;
}
.communityList {
padding: 0 20rpx;
background-color: #fff;
margin-top: 20rpx;
}
.communityItem {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1rpx solid #EBEBEB;
padding: 30rpx 0;
}
.communityItem_left{
display: flex;
align-items: center;
}
.communityItem_left_img {
width: 160rpx;
height: 140rpx;
border-radius: 20rpx;
overflow: hidden;
margin-right: 30rpx;
}
.communityItem_left_msg{
flex: 1;
}
.communityItem_left_msg_tit {
font-size: 30rpx;
color: #222222;
}
.communityItem_left_msg_tit span {
color: #FF370B;
}
.communityItem_left_msg_msg {
font-size: 26rpx;
color: #999999;
}
.communityItem_right{
width: 34rpx;
height: 34rpx;
margin-left: 80rpx;
}
/* 最后一个 communityItem */
.communityItem:last-child {
border-bottom: none;
}

View File

@ -0,0 +1,100 @@
<template>
<view class="container">
<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"
alt="" />
没有添加任何房产
</view>
<div class="communityList">
<div class="communityItem" v-for="item in communityList" :key="item.community_id"
@click="choseCommunity(item)">
<div class="communityItem_left">
<div class="communityItem_left_img">
<image :src="item.pic" mode="aspectFill"></image>
</div>
<div class="communityItem_left_msg">
<div class="communityItem_left_msg_tit">{{ item.name }}<span> {{ item.room_owner_list.length }}
</span></div>
<div class="communityItem_left_msg_msg">{{ item.addr }}</div>
</div>
</div>
<div class="communityItem_right">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_check1.png"
v-if="item.community_id != currentCommunity.id"></image>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_check2.png"
v-if="item.community_id == currentCommunity.id"></image>
</div>
</div>
</div>
<!-- <div class="addBtn" @click="addCommunity">添加我的房产</div> -->
</view>
</template>
<script>
import {
request,
NavgateTo,
isPhone,
picUrl
} from '../../../utils';
import {
apiArr
} from '../../../api/community';
export default {
data() {
return {
communityList: [],
page_num: 1,
page_size: 10,
currentCommunity: {}
}
},
methods: {
addCommunity() {
NavgateTo("/packages/community/addCommunity/index")
},
async getList() {
await request(apiArr.commInfo, "POST", {
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 => {
res.rows.forEach(item => {
item.pic = item.pic.startsWith('http') ? item.pic : picUrl + item.pic
});
this.communityList = res.rows.filter(item => item.front_end_display !== 1)
})
},
// toUpview(item) {
// uni.setStorageSync('changeCommData', { id: item.community_id, name: item.name });
// NavgateTo("/packages/community/index/index")
// },
choseCommunity(e) {
this.currentCommunity = e
uni.setStorageSync('changeCommData', { id: e.community_id, name: e.name });
uni.setStorageSync('currentCommunityAddr',e.addr);
uni.setStorageSync("isShowNav", e.room_owner_list[0].type)
NavgateTo("1")
},
},
onLoad(options) {
this.currentCommunity = uni.getStorageSync('changeCommData')
console.log(this.currentCommunity, 'currentCommunity');
this.getList();
},
onReachBottom() { },
}
</script>
<style>
@import url("./index.css");
</style>

View File

@ -102,6 +102,13 @@
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#fff" "navigationBarBackgroundColor": "#fff"
} }
},
{
"path": "myCommunity/index",
"style": {
"navigationBarTitleText": "选择小区",
"navigationBarBackgroundColor": "#fff"
}
} }
] ]
}, },