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 {
color: #333;
padding: 0rpx 12rpx;
background-color: #fff;
}
.uni-forms-item {
margin-bottom: 8rpx !important;

View File

@ -32,13 +32,50 @@
{
"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",
"style" :
{
"navigationBarTitleText" : "会议室"
}
},{
},
{
"path" : "pages/ofm/booking",
"style" :
{

View File

@ -1,55 +1,41 @@
<template>
<view class="container">
<image src="/static/banner_c.png" mode="widthFix" style="width:100%"></image>
<uni-section :title="welTitle" type="circle" titleFontSize="15px" titleColor="#0000CD"
@click="goUserInfo">
<template v-slot:right>
<span style="color:gray">{{currentDate}}</span>
</template>
</uni-section>
<view style="height: 12rpx;"></view>
<uni-row :gutter="12">
<uni-col :span="12" style="border-radius: 20upx;">
<navigator class="middleNavigator" url="../wf/index?category=duty">
<span>待办</span>
<span class="numSpan">3</span>
</navigator>
</uni-col>
<uni-col :span="12">
<navigator class="middleNavigator" url="../wf/index?category=owner">
<span>我的</span>
<span class="numSpan">3</span>
</navigator>
</uni-col>
</uni-row>
<view style="height: 12rpx;"></view>
<uni-section title="功能入口" type="line">
<uni-grid :column="5" :show-border="false" :square="false">
<uni-grid-item v-for="(item ,index) in moduleList" :index="index" :key="index">
<view class="grid-item-box" @click="pageEnter(item)">
<image class="image" :src="item.url" mode="aspectFill" />
<text class="text">{{item.text}}</text>
<view v-if="item.badge" class="grid-dot">
<uni-badge :text="item.badge" :type="item.type" />
<view class="container container1">
<image src="/static/banner_c.png" mode="widthFix" style="width:100%"></image>
<uni-section :title="welTitle" type="circle" titleFontSize="15px" titleColor="#0000CD"
@click="goUserInfo">
<template v-slot:right>
<span style="color:gray">{{currentDate}}</span>
</template>
</uni-section>
<view style="height: 12rpx;"></view>
<uni-row :gutter="12">
<uni-col :span="12" style="border-radius: 20upx;">
<navigator class="middleNavigator" url="../wf/index?category=duty">
<span>待办</span>
<span class="numSpan">3</span>
</navigator>
</uni-col>
<uni-col :span="12">
<navigator class="middleNavigator" url="../wf/index?category=owner">
<span>我的</span>
<span class="numSpan">3</span>
</navigator>
</uni-col>
</uni-row>
<view style="height: 12rpx;"></view>
<uni-section title="功能入口" type="line">
<uni-grid :column="5" :show-border="false" :square="false">
<uni-grid-item v-for="(item ,index) in moduleList" :index="index" :key="index">
<view class="grid-item-box" @click="pageEnter(item)">
<image class="image" :src="item.url" mode="aspectFill" />
<text class="text">{{item.text}}</text>
<view v-if="item.badge" class="grid-dot">
<uni-badge :text="item.badge" :type="item.type" />
</view>
</view>
</view>
</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-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> -->
</uni-grid-item>
</uni-grid>
</uni-section>
</view>
</template>
@ -61,30 +47,48 @@
welTitle: "",
imageSrc:"",
currentDate: tool.getTodayDate(),
moduleList: [{
moduleList: [
{
navigate:'/pages/ofm/booking_form?mode=add',
url: '/static/yuding.png',
text: '会议预定',
type: "primary",
},
{
navigate:'/pages/ofm/booking',
navigate:'/pages/ofm/sealForm?mode=add',
url: '/static/meetingRecord.png',
text: '预定记录',
text: '印章申请',
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',
text: '会议室',
text: '宣传报道',
type: "warning"
},
{
navigate:'/pages/ofm/patent_form?mode=add',
url: '/static/huiyishi.png',
text: '专利审批',
type: "warning"
}
]
}
},
mounted() {
this.initWelTitle();
this.initWelTitle();
},
onShow() {
// #ifdef MP-WEIXIN
@ -124,6 +128,9 @@
}
</script>
<style lang="scss">
.container1{
background-color: rgba(255,255,255,0);
}
.image {
width: 60upx;
height: 60upx;

View File

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

View File

@ -12,6 +12,7 @@ export default {
wxmpLogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录
wxmpClogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录(自动创建账号)
apkCheck: ()=>http('/system/apk/'), //apk检查
uploadFile:(data ) => http('/file/', 'POST', data),//上传文件
getTicket:(data) => http('/wf/ticket/', 'GET', data),
getTicketItem:(id) => http(`/wf/ticket/${id}/`, 'GET'),
@ -23,10 +24,41 @@ export default {
workflowInitkey:(key) => http(`/wf/workflow/${key}/init_key/`, 'GET'),
getMroom:(data) => http('/ofm/mroom/', 'GET', data),
//会议室预定
bookingList:(data) => http('/ofm/mroombooking/', 'GET', data),
bookingItem:(id,data) => http(`/ofm/mroombooking/${id}/`, 'GET', data),
bookingCreate:(data) => http(`/ofm/mroombooking/`, 'POST', data),
bookingUpdate:(id,data) => http(`/ofm/mroombooking/${id}/`, 'PUT', data),
bookingDelete:(id) => http(`/ofm/mroombooking/${id}/`, 'DELETE'),
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'),
}