|
@@ -1,32 +1,74 @@
|
|
|
<template>
|
|
|
<div class="historyListBody">
|
|
|
<div class="historyItem" v-for="item in historyList">
|
|
|
- <div class="tags">会议室</div>
|
|
|
- <div class="historyItemTitle">主题主题主题主题主题主题主题主题主题主题主题主题主题</div>
|
|
|
- <div class="historyItemInfo">使用日期:7月30日</div>
|
|
|
- <div class="historyItemInfo">资源名称:党建会议室</div>
|
|
|
- <div class="historyItemInfo">位置:A栋一楼</div>
|
|
|
- <div class="historyItemInfo">预约时间:2024.07.21 12:30</div>
|
|
|
+ <div class="tags">{{item.resourceTypeStr}}</div>
|
|
|
+ <div class="historyItemTitle">{{item.subject}}</div>
|
|
|
+ <div class="historyItemInfo">使用日期:{{item.useTime}}</div>
|
|
|
+ <div class="historyItemInfo">资源名称:{{item.resourceName}}</div>
|
|
|
+ <div class="historyItemInfo">位置:{{item.position}}</div>
|
|
|
+ <div class="historyItemInfo">预约时间:{{item.appointTime}}</div>
|
|
|
<div class="historyItemBottom">
|
|
|
- <span class="typeInfo" :class="item.type==='已通过'?'tgType':item.type==='已取消'?'qxType':''">{{item.type}}</span>
|
|
|
- <button class="btn" :class="item.type==='暂存'?'zcBtn':''" v-if="item.type !=='已取消'">{{item.type==='暂存'?'暂存':'取消'}}</button>
|
|
|
+ <span class="typeInfo" :class="item.stateStr==='已通过'?'tgType':item.stateStr==='已取消'?'qxType':''">{{item.stateStr}}</span>
|
|
|
+ <button @tap="toAdd(item)" class="btn" :class="item.stateStr==='暂存'?'zcBtn':''" v-if="item.stateStr !=='已取消'">{{item.stateStr==='暂存'?'编辑':'取消'}}</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import {getByCodes, getMeetingAppointListApp, getUserLocalStorageInfo} from "@/js_sdk/http";
|
|
|
+
|
|
|
export default {
|
|
|
name: "appointmentHistory",
|
|
|
data(){
|
|
|
return{
|
|
|
+ getUserLocalStorageInfo: getUserLocalStorageInfo(),
|
|
|
historyList:[
|
|
|
- {type:'审核中'},
|
|
|
- {type:'已通过'},
|
|
|
- {type:'已取消'},
|
|
|
- {type:'暂存'},
|
|
|
+ {stateStr:'审核中'},
|
|
|
+ {stateStr:'已通过'},
|
|
|
+ {stateStr:'已取消'},
|
|
|
+ {stateStr:'暂存'},
|
|
|
]
|
|
|
}
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ getList() {
|
|
|
+ const _this = this
|
|
|
+ _this.historyList = []
|
|
|
+ const data = {
|
|
|
+ pageNum : 1,
|
|
|
+ pageSize : 100,
|
|
|
+ createdId : getUserLocalStorageInfo().userId,
|
|
|
+ states: '1,5,6,7'
|
|
|
+ }
|
|
|
+ getMeetingAppointListApp(data).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ res.data.forEach(function (item) {
|
|
|
+ const jsonMap = _this.getItemJson(item)
|
|
|
+ _this.historyList.push(jsonMap)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getItemJson(item) {
|
|
|
+ return item
|
|
|
+ },
|
|
|
+ toAdd(data) {
|
|
|
+ if(data.stateStr == '暂存'){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/subPackages/resourceReservation_manage/add?id=' + data.id
|
|
|
+ })
|
|
|
+ }else if(data.stateStr == '审核中'){
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|