From 49e3612d8f4f0dbd3ce261b17f20ad59da59db55 Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期四, 22 十二月 2022 14:18:58 +0800
Subject: [PATCH] 日发运计划接口同步后台更新。数字键盘动作更新。主页、申请页列表功能按钮更新(撤回,编辑,删除)。完善页面细节
---
pages/home/home.vue | 117 ++++++++++++++++++++++++----------------------------------
1 files changed, 48 insertions(+), 69 deletions(-)
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 77b20e8..8676b1f 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -50,10 +50,10 @@
<view class="bottom-container">
<!-- 鎸夐挳鍖哄煙 -->
<view class="bottom-content__chulizhong bottom-content__item">
- <view @click="withDrawClick(item.procInstId)" v-if="item.status == 1">
+ <!-- <view @click="withDrawClick(item.procInstId)" v-if="item.status == 1">
<image src="@/static/home/cehui.png" mode=""></image>
<view>鎾ゅ洖</view>
- </view>
+ </view> -->
<view @click="checkTheScheduleClick(item.procInstId)" v-if="item.status == 1">
<image src="@/static/home/jindu.png" mode=""></image>
<view>鏌ョ湅杩涘害</view>
@@ -66,18 +66,18 @@
<image src="@/static/home/history.png" mode=""></image>
<view>閲嶆柊鐢宠</view>
</view> -->
- <view @click="editMyApplication(item)" v-if="item.status == 1 && item.processName == '鍙戣繍閫氱煡鍗�'">
+ <!-- <view @click="editMyApplication(item)" v-if="item.status == 1 && item.processName == '鍙戣繍閫氱煡鍗�'">
<image src="@/static/home/history.png" mode=""></image>
<view>缂栬緫</view>
- </view>
+ </view> -->
<view @click="approvalHistoryClick(item.procInstId)" v-if="item.status == 2 || item.status == 3">
<image src="@/static/home/history.png" mode=""></image>
<view>瀹℃壒鍘嗗彶</view>
</view>
- <view @click="deleteWithDrawApplication(item.tableId)" v-if="item.status == 3">
+ <!-- <view @click="deleteWithDrawApplication(item.tableId)" v-if="item.status == 3">
<image src="@/static/home/delete.png" mode=""></image>
<view>鍒犻櫎</view>
- </view>
+ </view> -->
</view>
<!-- 宸茬粨鏉熷皬缁勬寜閽� -->
<!-- <view class="bottom-content__chulizhong bottom-content__item" v-if="item.status == 2">
@@ -125,9 +125,9 @@
<!-- 寰呭姙鎸夐挳 -->
<view class="bottom-content__item">
<view @click="theFormDataClick(item.tableId)">
- <image src="@/static/home/jindu.png" mode=""></image>
- <view>鐢宠璇︽儏</view>
- </view>
+ <image src="@/static/home/jindu.png" mode=""></image>
+ <view>鐢宠璇︽儏</view>
+ </view>
<view @click="adopClick(item)">
<image src="@/static/home/tongguo.png" mode=""></image>
<view>閫氳繃</view>
@@ -175,7 +175,7 @@
</view>
<view class="center-content__three center-margin">
<view class="">
- <text>瀹℃壒鎰忚锛歿{ item.comment=='undefined'?'鏈~鍐�':item.comment || '鏈~鍐�' }}</text>
+ <text>瀹℃壒鎰忚锛歿{ item.comment == 'undefined' ? '鏈~鍐�' : item.comment || '鏈~鍐�' }}</text>
</view>
<view class="">
<text>
@@ -218,7 +218,7 @@
<!-- 鏃ヨ鍒� -->
<combined-title title="鏃ュ彂杩愯鍒�" detailsPath="/pages/jihua/jihua" v-if="rijihuaMenu"></combined-title>
- <view class="card-group bottomChild" >
+ <view class="card-group bottomChild">
<combination-card class="card" :showTop="false" v-for="(item, index) in fyData.slice(0, 2)" :key="item.id" v-if="rijihuaMenu">
<template v-slot:top></template>
<template v-slot:center>
@@ -333,9 +333,19 @@
import combinedTitle from '@/components/common/combined-title/combined-title.vue';
import combinationCard from '@/components/common/combination-card/combination-card.vue';
import { setAccessToken, redirectLogin } from '@/utils/status.js';
+import { logout } from '@/api/global.js';
export default {
name: 'home',
+ onLaunch() {
+ let that = this;
+ uni.addInterceptor('redirectTo', {
+ //鐩戝惉鍏抽棴鏈〉闈㈣烦杞�
+ success(e) {
+ that.watchRouter();
+ }
+ });
+ },
computed: {
rijihuaMenu() {
return this.$store.state.rijihuaMenu;
@@ -456,24 +466,7 @@
onUnload(event) {
//澶氬眰绾ц烦杞箣鍚庯紝鐩戝惉宸︿笂瑙掕繑鍥炰簨浠讹紝鐩存帴閫�鍥炲埌index
console.log('鐩戝惉宸︿笂瑙�', event);
- uni
- .request({
- url: `${BaseUrl}/auth/token/logout`,
- method: 'DELETE',
- header: {
- 'TENANT-ID': 5,
- Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
- VERSION: 'zzl'
- }
- })
- .then(res => {
- console.log('缂撳瓨娓呯悊鎴愬姛');
- })
- .catch(err => {
- uni.showToast({
- title: '缂撳瓨娓呯悊澶辫触锛�'
- });
- });
+ this.logout();
},
onShow() {
// 鑿滃崟娉ㄩ噴锛坅pp寰呯敤锛�
@@ -488,6 +481,9 @@
// popupMenu
},
methods: {
+ watchRouter() {
+ console.log('璺敱璺宠浆');
+ },
init() {
this.getUserInfo(); // 鐢ㄦ埛淇℃伅
this.getProcessDataList(); // 鐢宠鍒楄〃
@@ -606,19 +602,19 @@
this.withDrawData.procInstId = procInstId;
},
withDrawConfirm() {
- this.$reqPost('cancel', this.withDrawData).then(res => {
- this.withDrawShow = false;
- if (res.code == 0) {
- uni.showToast({
- title: res.data,
- duration: 2000
- });
- }
- // 鍒锋柊鍒楄〃
- this.getProcessDataList();
- this.todoList();
- this.doneList();
- });
+ this.$reqPost('cancel', this.withDrawData).then(res => {
+ this.withDrawShow = false;
+ if (res.code == 0) {
+ uni.showToast({
+ title: res.data,
+ duration: 2000
+ });
+ }
+ // 鍒锋柊鍒楄〃
+ this.getProcessDataList();
+ this.todoList();
+ this.doneList();
+ });
},
withDrawCancel() {
this.withDrawShow = false;
@@ -645,7 +641,7 @@
this.$u.toast('閫氳繃澶辫触!!');
}
this.todoList(); // 鎴戠殑寰呭姙
- this.doneList();
+ this.doneList();
});
},
adoptModalCancel() {
@@ -668,7 +664,7 @@
this.$u.toast('鎿嶄綔澶辫触锛侊紒锛�');
}
this.todoList(); // 鎴戠殑寰呭姙
- this.doneList();
+ this.doneList();
});
},
rejectModalCancel() {
@@ -709,32 +705,16 @@
});
},
// 鍒犻櫎鎾ゅ洖鐢宠
- deleteWithDrawApplication(id){
- uni
- .request({
- url: `${BaseUrl}/yunxiao/xswaybill/${id}`,
- method: 'DELETE',
- header: {
- 'TENANT-ID': 5,
- Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
- VERSION: 'zzl'
+ deleteWithDrawApplication(id) {
+ this.deleteWithDrawApplicationGlobal(id)
+ .then(res => {
+ if (res.code == 0) {
+ // 鍒锋柊鍒楄〃
+ this.getProcessDataList();
}
})
- .then(res => {
- uni.showToast({
- title:'鍒犻櫎鎴愬姛',
- icon:'none'
- })
-
- // 鍒锋柊鍒楄〃
- this.getProcessDataList();
-
- })
.catch(err => {
- uni.showToast({
- title:'鍒犻櫎鍑洪敊',
- icon:'none'
- })
+ console.log('鍒犻櫎鎾ゅ洖鐢宠寮傚父');
});
},
// 閲嶆柊鐢宠
@@ -827,7 +807,6 @@
url: `/pages/approval-history/approval-history?index=${v}`
});
},
-
redirectLogin() {
redirectLogin();
},
@@ -906,7 +885,7 @@
}
}
}
- .bottomChild{
+ .bottomChild {
margin-bottom: vww(20);
}
--
Gitblit v1.9.1