123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <template>
- <div class="historyListBody">
- <div class="historyItem" v-for="item in historyList">
- <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.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:[
- {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>
- <style lang="scss">
- .historyListBody{
- margin-top: 24rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- padding-bottom: 100rpx;
- .historyItem{
- width: 686rpx;
- padding: 24rpx 0;
- background: white;
- box-sizing: border-box;
- position: relative;
- border-radius: 16rpx;
- margin-bottom: 24rpx;
- .tags{
- width: 148rpx;
- height: 56rpx;
- position: absolute;
- top: 0;
- right: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 26rpx;
- color: rgba(3, 101, 249, 1);
- background: url('https://www.idea-co-sf.com/gardenProduct/image/bj04.png') no-repeat;
- background-size: 100%;
- }
- .historyItemTitle{
- padding: 8rpx 32rpx;
- width: 480rpx;
- color: rgba(34, 34, 34, 1);
- font-size: 32rpx;
- line-height: 40rpx;
- font-weight: 500;
- }
- .historyItemInfo{
- color: rgba(102, 102, 102, 1);
- font-size: 28rpx;
- padding: 10rpx 32rpx;
- }
- .historyItemBottom{
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 28rpx 32rpx 0 32rpx;
- border-top: 1px solid rgba(232, 237, 245, 1);
- margin-top: 22rpx;
- .typeInfo{
- font-size: 28rpx;
- color: rgba(226, 81, 0, 1);
- }
- .tgType{
- color: rgba(3, 101, 249, 1);
- }
- .qxType{
- color:rgba(242, 25, 18, 1);
- }
- .btn{
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 28rpx;
- width: 160rpx;
- height: 60rpx;
- border-radius: 32rpx;
- border: 2rpx solid rgba(255, 107, 24, 1);
- color:rgba(255, 107, 24, 1);
- &::after{
- border: none;
- }
- }
- .zcBtn{
- background: linear-gradient( 316deg, #84AAFF 0%, #0365F9 100%);
- color: white;
- border: none;
- }
- }
- }
- }
- </style>
|