分页pageSize修改,输入框placeholder修改
This commit is contained in:
parent
e9e36537d7
commit
35540269d8
|
|
@ -67,7 +67,7 @@ export default {
|
||||||
createPagination({
|
createPagination({
|
||||||
fetchData: getProjectSchedule,
|
fetchData: getProjectSchedule,
|
||||||
mode: "loadMore",
|
mode: "loadMore",
|
||||||
pageSize: 3,
|
pageSize: 5,
|
||||||
autoLoad: false, // 设置为 false,不自动加载
|
autoLoad: false, // 设置为 false,不自动加载
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -5,24 +5,24 @@
|
||||||
<custom-navbar ref="customNavbar" title="往生殿" />
|
<custom-navbar ref="customNavbar" title="往生殿" />
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<!-- 状态展示 -->
|
<!-- 状态展示 -->
|
||||||
<status-display v-if="loading" type="loading" loading-text="加载中..." />
|
<status-display v-if="loading" loading-text="加载中..." type="loading" />
|
||||||
<!-- 搜索框 -->
|
<!-- 搜索框 -->
|
||||||
<search-box
|
<search-box
|
||||||
v-model="searchName"
|
v-model="searchName"
|
||||||
:width="'682rpx'"
|
|
||||||
:search-icon="CommonEnum.SEARCH"
|
:search-icon="CommonEnum.SEARCH"
|
||||||
placeholder="请输入姓名或分区进行查找"
|
:width="'682rpx'"
|
||||||
btn-text="搜索"
|
btn-text="搜索"
|
||||||
|
placeholder="请输入姓名"
|
||||||
@search="handleSearch"
|
@search="handleSearch"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 供奉列表 -->
|
<!-- 供奉列表 -->
|
||||||
<enshrined-list
|
<enshrined-list
|
||||||
v-if="!loading"
|
v-if="!loading"
|
||||||
|
ref="enshrinedList"
|
||||||
:memorial-id="memorialId"
|
:memorial-id="memorialId"
|
||||||
:search-keyword="searchName"
|
:search-keyword="searchName"
|
||||||
@item-click="handleItemClick"
|
@item-click="handleItemClick"
|
||||||
ref="enshrinedList"
|
|
||||||
/>
|
/>
|
||||||
<!-- 状态栏 -->
|
<!-- 状态栏 -->
|
||||||
<StatusBar
|
<StatusBar
|
||||||
|
|
@ -35,8 +35,8 @@
|
||||||
<view class="floor-selector-container">
|
<view class="floor-selector-container">
|
||||||
<FloorSelector
|
<FloorSelector
|
||||||
ref="floorSelector"
|
ref="floorSelector"
|
||||||
:default-floor-id="defaultFloorId"
|
|
||||||
:default-area-id="defaultAreaId"
|
:default-area-id="defaultAreaId"
|
||||||
|
:default-floor-id="defaultFloorId"
|
||||||
:default-unit-id="defaultUnitId"
|
:default-unit-id="defaultUnitId"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
/>
|
/>
|
||||||
|
|
@ -49,15 +49,15 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { CommonEnum } from '@/enum/common.js'
|
import { CommonEnum } from "@/enum/common.js";
|
||||||
import SearchBox from '../../components/search-box/search-box.vue'
|
import SearchBox from "../../components/search-box/search-box.vue";
|
||||||
import StatusDisplay from '../../components/status-display/status-display.vue'
|
import StatusDisplay from "../../components/status-display/status-display.vue";
|
||||||
import EnshrinedList from './compositons/enshrinedListIndex.vue'
|
import EnshrinedList from "./compositons/enshrinedListIndex.vue";
|
||||||
import FloorSelector from './compositons/floorSelector.vue'
|
import FloorSelector from "./compositons/floorSelector.vue";
|
||||||
import StatusBar from './compositons/statusBar.vue'
|
import StatusBar from "./compositons/statusBar.vue";
|
||||||
import BottomButton from '../../components/bottom-button/bottom-button.vue'
|
import BottomButton from "../../components/bottom-button/bottom-button.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
BottomButton,
|
BottomButton,
|
||||||
SearchBox,
|
SearchBox,
|
||||||
|
|
@ -69,13 +69,13 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
CommonEnum,
|
CommonEnum,
|
||||||
searchName: '',
|
searchName: "",
|
||||||
loading: false,
|
loading: false,
|
||||||
memorialId: '16', // 默认往生殿ID,可以从路由参数获取
|
memorialId: "16", // 默认往生殿ID,可以从路由参数获取
|
||||||
// 楼层选择器默认值
|
// 楼层选择器默认值
|
||||||
defaultFloorId: '',
|
defaultFloorId: "",
|
||||||
defaultAreaId: '',
|
defaultAreaId: "",
|
||||||
defaultUnitId: '',
|
defaultUnitId: "",
|
||||||
// 当前选中的楼层信息
|
// 当前选中的楼层信息
|
||||||
currentSelection: {
|
currentSelection: {
|
||||||
floor: null,
|
floor: null,
|
||||||
|
|
@ -83,121 +83,126 @@
|
||||||
unit: null,
|
unit: null,
|
||||||
},
|
},
|
||||||
// 当前选中的单元ID,用于状态栏查询
|
// 当前选中的单元ID,用于状态栏查询
|
||||||
selectedUnitId: '',
|
selectedUnitId: "",
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
// 从路由参数获取往生殿ID
|
// 从路由参数获取往生殿ID
|
||||||
if (options.id) {
|
if (options.id) {
|
||||||
this.memorialId = options.id
|
this.memorialId = options.id;
|
||||||
}
|
}
|
||||||
this.initPage()
|
this.initPage();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化页面
|
// 初始化页面
|
||||||
async initPage() {
|
async initPage() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
try {
|
try {
|
||||||
// 页面初始化逻辑
|
// 页面初始化逻辑
|
||||||
console.log('往生殿页面初始化,ID:', this.memorialId)
|
console.log("往生殿页面初始化,ID:", this.memorialId);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('页面初始化失败:', error)
|
console.error("页面初始化失败:", error);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '页面加载失败',
|
title: "页面加载失败",
|
||||||
icon: 'none',
|
icon: "none",
|
||||||
})
|
});
|
||||||
} finally {
|
} finally {
|
||||||
this.loading = false
|
this.loading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 处理搜索
|
// 处理搜索
|
||||||
handleSearch(value) {
|
handleSearch(value) {
|
||||||
console.log('搜索内容:', value)
|
console.log("搜索内容:", value);
|
||||||
this.searchName = value
|
this.searchName = value;
|
||||||
|
|
||||||
// 跳转到往生者搜索页面并传递搜索关键词
|
// 跳转到往生者搜索页面并传递搜索关键词
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/memorial/deceasedSearch?keyword=${encodeURIComponent(value)}`,
|
url: `/pages/memorial/deceasedSearch?keyword=${encodeURIComponent(value)}`,
|
||||||
success: () => {
|
success: () => {
|
||||||
console.log('跳转到搜索页面成功')
|
console.log("跳转到搜索页面成功");
|
||||||
},
|
},
|
||||||
fail: error => {
|
fail: (error) => {
|
||||||
console.error('跳转失败:', error)
|
console.error("跳转失败:", error);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '页面跳转失败',
|
title: "页面跳转失败",
|
||||||
icon: 'none',
|
icon: "none",
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 处理列表项点击
|
// 处理列表项点击
|
||||||
handleItemClick(item) {
|
handleItemClick(item) {
|
||||||
console.log('点击供奉记录:', item)
|
console.log("点击供奉记录:", item);
|
||||||
// 可以跳转到详情页或执行其他操作
|
// 可以跳转到详情页或执行其他操作
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: `查看 ${item.worshiperName} 的供奉记录`,
|
title: `查看 ${item.worshiperName} 的供奉记录`,
|
||||||
icon: 'none',
|
icon: "none",
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 处理楼层选择变化
|
// 处理楼层选择变化
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
console.log('楼层选择变化:', selection)
|
console.log("楼层选择变化:", selection);
|
||||||
this.currentSelection = selection
|
this.currentSelection = selection;
|
||||||
|
|
||||||
// 当选中单元时,更新selectedUnitId触发状态栏查询
|
// 当选中单元时,更新selectedUnitId触发状态栏查询
|
||||||
if (selection.unit) {
|
if (selection.unit) {
|
||||||
console.log('选中单元:', selection.unit.label, 'ID:', selection.unit.id)
|
console.log(
|
||||||
this.selectedUnitId = selection.unit.id
|
"选中单元:",
|
||||||
|
selection.unit.label,
|
||||||
|
"ID:",
|
||||||
|
selection.unit.id,
|
||||||
|
);
|
||||||
|
this.selectedUnitId = selection.unit.id;
|
||||||
} else {
|
} else {
|
||||||
// 如果没有选中单元,清空状态栏
|
// 如果没有选中单元,清空状态栏
|
||||||
this.selectedUnitId = ''
|
this.selectedUnitId = "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 跳转到往生大殿页面的通用方法
|
// 跳转到往生大殿页面的通用方法
|
||||||
navigateToMemorialHall(unitId) {
|
navigateToMemorialHall(unitId) {
|
||||||
console.log('跳转到往生大殿页面,ID:', unitId)
|
console.log("跳转到往生大殿页面,ID:", unitId);
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/memorial/memorialHall?id=${unitId}`,
|
url: `/pages/memorial/memorialHall?id=${unitId}`,
|
||||||
success: () => {
|
success: () => {
|
||||||
console.log('跳转成功')
|
console.log("跳转成功");
|
||||||
},
|
},
|
||||||
fail: error => {
|
fail: (error) => {
|
||||||
console.error('跳转失败:', error)
|
console.error("跳转失败:", error);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '页面跳转失败',
|
title: "页面跳转失败",
|
||||||
icon: 'none',
|
icon: "none",
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 处理查看详情
|
// 处理查看详情
|
||||||
handleViewDetails(unitData) {
|
handleViewDetails(unitData) {
|
||||||
console.log('查看单元详情:', unitData)
|
console.log("查看单元详情:", unitData);
|
||||||
this.navigateToMemorialHall(unitData.id)
|
this.navigateToMemorialHall(unitData.id);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 提交供奉 - 跳转到往生大殿页面
|
// 提交供奉 - 跳转到往生大殿页面
|
||||||
submitPrayer() {
|
submitPrayer() {
|
||||||
console.log('提交供奉,跳转到往生大殿页面,ID:', this.selectedUnitId)
|
console.log("提交供奉,跳转到往生大殿页面,ID:", this.selectedUnitId);
|
||||||
this.navigateToMemorialHall(this.selectedUnitId)
|
this.navigateToMemorialHall(this.selectedUnitId);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.page {
|
.page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -205,26 +210,26 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding-bottom: 180rpx;
|
padding-bottom: 180rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.floor-selector-container {
|
.floor-selector-container {
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 状态栏容器样式
|
// 状态栏容器样式
|
||||||
:deep(.status-bar) {
|
:deep(.status-bar) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 750rpx;
|
max-width: 750rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom {
|
.bottom {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #fffbf5;
|
background: #fffbf5;
|
||||||
height: 180rpx;
|
height: 180rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user