Browse Source

代码提交

work_tab_bar
juwei001 1 year ago
parent
commit
d2617f11fc
  1. 14
      subpages/businessRecord/businessRecord.js
  2. 3
      subpages/businessRecord/businessRecord.json
  3. 29
      subpages/businessRecord/businessRecord.wxml
  4. 28
      subpages/businessRecord/businessRecord.wxss
  5. 43
      subpages/house/pages/housePortrait/housePortrait.js
  6. 4
      subpages/house/pages/housePortrait/housePortrait.json
  7. 36
      subpages/house/pages/housePortrait/housePortrait.wxml
  8. 74
      subpages/house/pages/housePortrait/housePortrait.wxss

14
subpages/businessRecord/businessRecord.js

@ -29,22 +29,24 @@ Page({
}],
tabValue: '12345',
data: {},
residIds:["1704792537883688962","1705416782032064514"]
residIds:[],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log('zoule')
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
const pages = getCurrentPages();
this.setData({
tabValue: "12345"
tabValue: "12345",
residIds:[pages[1].options.resiId]
})
this.show12345("12345");
},
@ -53,7 +55,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
console.log('zoule')
},
/**
@ -92,8 +94,10 @@ Page({
},
tabChange({currentTarget: {dataset:{index}}}) {
const pages = getCurrentPages();
this.setData({
tabValue: index
tabValue: index,
residIds:[pages[1].options.resiId]
})
if(index === "12345"){
this.show12345(index);

3
subpages/businessRecord/businessRecord.json

@ -1,3 +1,4 @@
{
"usingComponents": {}
"usingComponents": {
}
}

29
subpages/businessRecord/businessRecord.wxml

@ -9,15 +9,38 @@
</view>
<view class="table">
<view class="row header">
<view wx:if="{{tabValue === '12345'||tabValue === 'event'}}" class="row header">
<view class="cell">事件类型</view>
<view class="cell">事件描述</view>
</view>
<!-- <block wx:for="{{data[tabValue]}}" wx:for-item="item" wx:for-index="index"> -->
<block bind:tap="gotopage" data-obj="{{item}}" wx:for="{{data[tabValue]}}" wx:key="index">
<view wx:if="{{tabValue === 'provinceSurvey'||tabValue === 'selfSurvey'}}" class="row header">
<view class="cell">不满意事项类型</view>
<view class="cell">不满意事项描述</view>
</view>
<view wx:if="{{tabValue === 'need'}}" class="row header">
<view class="cell">需求类型</view>
<view class="cell">需求描述</view>
</view>
<view wx:if="{{tabValue === 'serve'}}" class="row header">
<view class="cell">需求类型</view>
<view class="cell">事件描述</view>
</view>
<view wx:if="{{tabValue === 'punchRecord'}}" class="row header">
<view class="cell1">打卡人</view>
<view class="cell1">打卡地址</view>
<view class="cell1">打卡时间</view>
</view>
<block bind:tap="gotopage" wx:if="{{tabValue !== 'punchRecord'}}" data-obj="{{item}}" wx:for="{{data[tabValue]}}" wx:key="index">
<view class="row {{index % 2 == 0 ? 'even' : 'odd'}}">
<view class="cell">{{item.categorycode}}</view>
<view class="cell">{{item.eventcontent}}</view>
</view>
</block>
<block bind:tap="gotopage" wx:if="{{tabValue == 'punchRecord'}}" data-obj="{{item}}" wx:for="{{data[tabValue]}}" wx:key="index">
<view class="row {{index % 2 == 0 ? 'even' : 'odd'}}">
<view class="cell1">{{item.name}}</view>
<view class="cell1">{{item.clockInAddress}}</view>
<view class="cell1">{{item.clockInTime}}</view>
</view>
</block>
</view>

28
subpages/businessRecord/businessRecord.wxss

@ -2,10 +2,10 @@
display: flex;
flex-wrap: wrap; /* 使得元素可以换行显示 */
margin: 0 -8rpx;
margin-bottom: 15px;
/* margin-bottom: 15px; */
}
.tag-list .tag {
padding: 10rpx 20rpx;
padding: 0rpx 20rpx;
font-size: 23rpx;
margin: 10rpx 8rpx;
text-align: center; /* 使标签文本居中 */
@ -101,7 +101,7 @@
.header {
font-weight: bold;
padding: 10px 0;
/* padding: 10px 0 0; */
}
.cell {
@ -122,6 +122,28 @@
font-size: 23rpx;
}
.cell1 {
flex: 1;
padding: 10px 0;
font-size: 23rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.cell1:nth-child(1) {
flex-basis: 20%;
font-size: 23rpx;
}
.cell1:nth-child(2) {
flex-basis: 30%;
font-size: 23rpx;
}
.cell1:nth-child(2) {
flex-basis: 30%;
font-size: 23rpx;
}
.even {
background-color: #f0f4fd;
}

43
subpages/house/pages/housePortrait/housePortrait.js

@ -7,6 +7,26 @@ Page({
*/
data: {
detail: {},
logs: [
{
"resiName": "栈-1-1-101-001",
"operatorName": "王显章6",
"type": "edit",
"typeName": "修改",
"beforeChange": "是否低保户:是,",
"afterChange": "是否低保户:否,",
"changeTime": "2024-02-21 16:43:05"
},
{
"resiName": "栈-1-1-101-001",
"operatorName": "王显章6",
"type": "edit",
"typeName": "修改",
"beforeChange": "是否特殊人群:否,",
"afterChange": "是否特殊人群:是,",
"changeTime": "2024-02-20 17:58:27"
},
]
},
/**
@ -14,18 +34,25 @@ Page({
*/
onLoad(options) {
this.setData({
houseId:options.houseId
houseId: options.resiId
})
this.getData()
},
getData() {
getData() {// this.data.houseId
api.getClearHouseDeatilById(this.data.houseId).then((res) => {
this.setData({
detail: res.data
})
}).catch((error) => {
detail: res.data
})
}).catch((error) => {
});
// this.data.houseId
api.getLogList({ resiId: this.data.houseId }).then((res) => {
this.setData({
logs: res.data.list
})
}).catch((error) => {
console.error("发生错误:", error);
});
});
},
/**
* 生命周期函数--监听页面初次渲染完成
@ -76,8 +103,8 @@ Page({
},
gotopage({currentTarget: {dataset}}) {
const {url} = dataset
gotopage({ currentTarget: { dataset } }) {
const { url } = dataset
console.log(url)
wx.navigateTo({
url

4
subpages/house/pages/housePortrait/housePortrait.json

@ -1,5 +1,7 @@
{
"usingComponents": {
"BusinessRecord": "../../../businessRecord/businessRecord"
"BusinessRecord": "../../../businessRecord/businessRecord",
"van-steps": "@vant/weapp/steps/index",
"van-step": "@vant/weapp/steps/index"
}
}

36
subpages/house/pages/housePortrait/housePortrait.wxml

@ -36,14 +36,46 @@
<view class="title">
<text>业务记录</text>
</view>
<BusinessRecord/>
<BusinessRecord />
</view>
<view class="card">
<view class="title">
<text>更新记录</text>
</view>
<ProblemList bind:change="tabChange"/>
<view>
<view class="logsBox" wx:for="{{logs}}" wx:key="{{item.changeTime}}">
<view class="item-dian {{index!=0?'item-dian1':''}}">
<view class="neidian"></view>
</view>
<view class="logs-top">
<view class="logs-top-title">{{item.typeName}}-{{item.operatorName}}</view>
<view class="logs-top-time">{{item.changeTime}}</view>
</view>
<view class="logs-content">
<view>
<view>
<text class="logs-content-title">变更前:</text>
<text class="logs-content-txt">{{item.beforeChange}}</text>
</view>
<view>
<text class="logs-content-title">变更后:</text>
<text class="logs-content-txt">{{item.afterChange}}</text>
</view>
</view>
<view>
<view>
<text class="logs-content-title">操作人:</text>
<text class="logs-content-txt">{{item.operatorName}}</text>
</view>
<view>
<text class="logs-content-title">备注:</text>
<text class="logs-content-txt">{{item.resiName}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>

74
subpages/house/pages/housePortrait/housePortrait.wxss

@ -17,9 +17,10 @@
display: flex;
align-items: center;
margin-left: -30rpx;
margin-bottom: 39rpx;
margin-bottom: 12rpx;
position: relative;
}
.card .title:before {
content: '';
display: block;
@ -29,6 +30,7 @@
border-radius: 4rpx;
margin-right: 20rpx;
}
.card .title .view {
font-size: 28rpx;
font-weight: 400;
@ -63,3 +65,73 @@
margin-top: 20rpx;
flex: 0 0 30%;
}
.logsBox {
border-left: 3rpx solid #DADEE5;
margin-left: -18rpx;
padding-left: 12rpx;
}
.logs-top {
display: flex;
justify-content: space-between;
position: relative;
top: -32rpx;
padding-left: 12rpx;
}
.logs-top-title {
height: 31rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 32rpx;
color: #333333;
line-height: 41rpx;
}
.logs-top-time {
height: 20rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 26rpx;
color: #BDBDBD;
line-height: 40rpx;
}
.logs-content {
position: relative;
top: -24rpx;
padding-top: 12rpx;
padding-bottom: 24rpx;
display: flex;
justify-content: space-between;
font-family: PingFang SC;
font-weight: 500;
font-size: 30rpx;
color: #999999;
line-height: 40rpx;
}
.logs-content-title {}
.logs-content-txt {
color: #333333;
}
.item-dian {
position: relative;
left: -28rpx;
width: 20rpx;
height: 20rpx;
background: #FFFFFF;
border-radius: 50%;
border: 1px solid #3A80E7;
padding: 2rpx;
}
.neidian {
width: 18rpx;
height: 18rpx;
background: #3A80E7;
border-radius: 50%;
}

Loading…
Cancel
Save