feat:接口页面声明首页新增预约模块

This commit is contained in:
shijing 2025-10-27 11:19:33 +08:00
parent 0728951740
commit 2a106deaa0
6 changed files with 166 additions and 61 deletions

View File

@ -69,6 +69,7 @@
.container { .container {
color: #333; color: #333;
padding: 0rpx 12rpx; padding: 0rpx 12rpx;
background-color: #fff;
} }
.uni-forms-item { .uni-forms-item {
margin-bottom: 8rpx !important; margin-bottom: 8rpx !important;

View File

@ -32,13 +32,50 @@
{ {
"navigationBarTitleText" : "会议室预约" "navigationBarTitleText" : "会议室预约"
} }
},{ },
{
"path" : "pages/ofm/sealForm",
"style" :
{
"navigationBarTitleText" : "印章申请"
}
},
{
"path" : "pages/ofm/vehicleForm",
"style" :
{
"navigationBarTitleText" : "用车申请"
}
},
{
"path" : "pages/ofm/borrowfile_form",
"style" :
{
"navigationBarTitleText" : "档案借阅"
}
},
{
"path" : "pages/ofm/publicityForm",
"style" :
{
"navigationBarTitleText" : "宣传报道"
}
},
{
"path" : "pages/ofm/patent_form",
"style" :
{
"navigationBarTitleText" : "专利审批"
}
},
{
"path" : "pages/ofm/mroom", "path" : "pages/ofm/mroom",
"style" : "style" :
{ {
"navigationBarTitleText" : "会议室" "navigationBarTitleText" : "会议室"
} }
},{ },
{
"path" : "pages/ofm/booking", "path" : "pages/ofm/booking",
"style" : "style" :
{ {

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="container"> <view class="container container1">
<image src="/static/banner_c.png" mode="widthFix" style="width:100%"></image> <image src="/static/banner_c.png" mode="widthFix" style="width:100%"></image>
<uni-section :title="welTitle" type="circle" titleFontSize="15px" titleColor="#0000CD" <uni-section :title="welTitle" type="circle" titleFontSize="15px" titleColor="#0000CD"
@click="goUserInfo"> @click="goUserInfo">
@ -34,22 +34,8 @@
</view> </view>
</view> </view>
</uni-grid-item> </uni-grid-item>
<uni-grid-item>
<view class="grid-item-box" @click="cameraClick">
<image class="image" src="/static/yuding.png" mode="aspectFill" />
<text class="text">拍照</text>
</view>
</uni-grid-item>
</uni-grid> </uni-grid>
</uni-section> </uni-section>
<!-- <uni-section title="列表信息" type="line">
<uni-list>
<uni-list-item v-for="(item ,index) in moduleList" :index="index" :key="index" :title="item.text">
</uni-list-item>
</uni-list>
</uni-section> -->
</view> </view>
</template> </template>
@ -61,22 +47,41 @@
welTitle: "", welTitle: "",
imageSrc:"", imageSrc:"",
currentDate: tool.getTodayDate(), currentDate: tool.getTodayDate(),
moduleList: [{ moduleList: [
{
navigate:'/pages/ofm/booking_form?mode=add', navigate:'/pages/ofm/booking_form?mode=add',
url: '/static/yuding.png', url: '/static/yuding.png',
text: '会议预定', text: '会议预定',
type: "primary", type: "primary",
}, },
{ {
navigate:'/pages/ofm/booking', navigate:'/pages/ofm/sealForm?mode=add',
url: '/static/meetingRecord.png', url: '/static/meetingRecord.png',
text: '预定记录', text: '印章申请',
type: "success" type: "success"
}, },
{ {
navigate:'/pages/ofm/mroom', navigate:'/pages/ofm/vehicleForm?mode=add',
url: '/static/meetingRecord.png',
text: '用车申请',
type: "success"
},
{
navigate:'/pages/ofm/borrowfile_form?mode=add',
url: '/static/meetingRecord.png',
text: '档案借阅',
type: "success"
},
{
navigate:'/pages/ofm/publicityForm?mode=add',
url: '/static/huiyishi.png', url: '/static/huiyishi.png',
text: '会议室', text: '宣传报道',
type: "warning"
},
{
navigate:'/pages/ofm/patent_form?mode=add',
url: '/static/huiyishi.png',
text: '专利审批',
type: "warning" type: "warning"
} }
] ]
@ -84,7 +89,6 @@
}, },
mounted() { mounted() {
this.initWelTitle(); this.initWelTitle();
}, },
onShow() { onShow() {
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
@ -124,6 +128,9 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.container1{
background-color: rgba(255,255,255,0);
}
.image { .image {
width: 60upx; width: 60upx;
height: 60upx; height: 60upx;

View File

@ -19,6 +19,7 @@
page:1, page:1,
page_size:10, page_size:10,
dataList:[], dataList:[],
status: 'more',
} }
}, },
mounted() { mounted() {
@ -28,6 +29,12 @@
this.page = 1; this.page = 1;
this.getlistData() this.getlistData()
}, },
onReachBottom() {
if (this.status === 'more') {
this.page++;
this.getTicket()
}
},
methods:{ methods:{
itemClick(item){ itemClick(item){
uni.setStorageSync("currentBooking", item) uni.setStorageSync("currentBooking", item)
@ -37,9 +44,24 @@
}, },
getlistData(){ getlistData(){
let that = this; let that = this;
that.status = 'loading';
that.$api.bookingList({page:that.page,page_size:that.page_size}).then(res=>{ that.$api.bookingList({page:that.page,page_size:that.page_size}).then(res=>{
if(res.results.length < that.pageSize){
that.status = 'noMore';
}else{
that.status = 'more';
}
if(that.page == 1){
that.dataList = res.results; that.dataList = res.results;
}) uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
}else{
that.dataList = that.dataList.concat(res.results)
}
uni.stopPullDownRefresh()
}).catch(e=>{uni.stopPullDownRefresh()})
}, },
}, },
} }

View File

@ -38,6 +38,12 @@
this.page = 1; this.page = 1;
this.getmRooms(); this.getmRooms();
}, },
onReachBottom() {
if (this.status === 'more') {
this.page++;
this.getmRooms()
}
},
methods:{ methods:{
getmRooms(){ getmRooms(){
let that = this; let that = this;

View File

@ -12,6 +12,7 @@ export default {
wxmpLogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录 wxmpLogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录
wxmpClogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录(自动创建账号) wxmpClogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录(自动创建账号)
apkCheck: ()=>http('/system/apk/'), //apk检查 apkCheck: ()=>http('/system/apk/'), //apk检查
uploadFile:(data ) => http('/file/', 'POST', data),//上传文件
getTicket:(data) => http('/wf/ticket/', 'GET', data), getTicket:(data) => http('/wf/ticket/', 'GET', data),
getTicketItem:(id) => http(`/wf/ticket/${id}/`, 'GET'), getTicketItem:(id) => http(`/wf/ticket/${id}/`, 'GET'),
@ -23,10 +24,41 @@ export default {
workflowInitkey:(key) => http(`/wf/workflow/${key}/init_key/`, 'GET'), workflowInitkey:(key) => http(`/wf/workflow/${key}/init_key/`, 'GET'),
getMroom:(data) => http('/ofm/mroom/', 'GET', data), getMroom:(data) => http('/ofm/mroom/', 'GET', data),
//会议室预定
bookingList:(data) => http('/ofm/mroombooking/', 'GET', data), bookingList:(data) => http('/ofm/mroombooking/', 'GET', data),
bookingItem:(id,data) => http(`/ofm/mroombooking/${id}/`, 'GET', data), bookingItem:(id,data) => http(`/ofm/mroombooking/${id}/`, 'GET', data),
bookingCreate:(data) => http(`/ofm/mroombooking/`, 'POST', data), bookingCreate:(data) => http(`/ofm/mroombooking/`, 'POST', data),
bookingUpdate:(id,data) => http(`/ofm/mroombooking/${id}/`, 'PUT', data), bookingUpdate:(id,data) => http(`/ofm/mroombooking/${id}/`, 'PUT', data),
bookingDelete:(id) => http(`/ofm/mroombooking/${id}/`, 'DELETE'), bookingDelete:(id) => http(`/ofm/mroombooking/${id}/`, 'DELETE'),
bookingSlot:(data) => http(`/ofm/mroomslot/`, 'GET' , data), bookingSlot:(data) => http(`/ofm/mroomslot/`, 'GET' , data),
//印章外出
sealList:(data) => http(`/ofm/lendingseal/`, 'GET' , data),
sealCreate:(data) => http(`/ofm/lendingseal/`, 'POST' , data),
sealItem:(id,data) => http(`/ofm/lendingseal/${id}/`, 'GET', data),
sealUpdate:(id,data) => http(`/ofm/lendingseal/${id}/`, 'PUT', data),
sealDelete:(id) => http(`/ofm/lendingseal/${id}/`, 'DELETE'),
//文件借阅
borrowList:(data) => http(`/ofm/fileborrow/`, 'GET' , data),
borrowCreate:(data) => http(`/ofm/fileborrow/`, 'POST' , data),
borrowItem:(id,data) => http(`/ofm/fileborrow/${id}/`, 'GET', data),
borrowUpdate:(id,data) => http(`/ofm/fileborrow/${id}/`, 'PUT', data),
borrowDelete:(id) => http(`/ofm/fileborrow/${id}/`, 'DELETE'),
//专利
patentList:(data) => http(`/ofm/patentinfo/`, 'GET' , data),
patentCreate:(data) => http(`/ofm/patentinfo/`, 'POST' , data),
patentItem:(id,data) => http(`/ofm/patentinfo/${id}/`, 'GET', data),
patentUpdate:(id,data) => http(`/ofm/patentinfo/${id}/`, 'PUT', data),
patentDelete:(id) => http(`/ofm/patentinfo/${id}/`, 'DELETE'),
//公告
publicList:(data) => http(`/ofm/publicity/`, 'GET' , data),
publicCreate:(data) => http(`/ofm/publicity/`, 'POST' , data),
publicItem:(id,data) => http(`/ofm/publicity/${id}/`, 'GET', data),
publicUpdate:(id,data) => http(`/ofm/publicity/${id}/`, 'PUT', data),
publicDelete:(id) => http(`/ofm/publicity/${id}/`, 'DELETE'),
//车辆
vehicleList:(data) => http(`/ofm/vehicle/`, 'GET' , data),
vehicleCreate:(data) => http(`/ofm/vehicle/`, 'POST' , data),
vehicleItem:(id,data) => http(`/ofm/vehicle/${id}/`, 'GET', data),
vehicleUpdate:(id,data) => http(`/ofm/vehicle/${id}/`, 'PUT', data),
vehicleDelete:(id) => http(`/ofm/vehicle/${id}/`, 'DELETE'),
} }