Commit a2cf3ed0 authored by 刘文虎's avatar 刘文虎

导出错误

parent cb0fbbd4
Pipeline #2938 canceled with stages
...@@ -46,6 +46,7 @@ export async function repairExport(data) { ...@@ -46,6 +46,7 @@ export async function repairExport(data) {
url: `/rest/repair/export`, url: `/rest/repair/export`,
method: 'POST', method: 'POST',
data, data,
responseType:'ArrayBuffer',
noLoading: true noLoading: true
}) })
} }
......
...@@ -133,6 +133,9 @@ export default { ...@@ -133,6 +133,9 @@ export default {
handleClose() { handleClose() {
this.changeVisibleValue(false) this.changeVisibleValue(false)
}, },
stopLoading(){
this.loading = false
}
}, },
} }
</script> </script>
......
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
"style" : "style" :
{ {
"navigationBarTitleText": "快速登录", "navigationBarTitleText": "快速登录",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"navigationStyle": "custom"
} }
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</view> </view>
</view> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<PopExport :visible.sync="visible" @confirm="handleClickConfirm" /> <PopExport ref='pop-export-bill' :visible.sync="visible" @confirm="handleClickConfirm" />
<mid-popup ref="midPopup" @afterSave="afterSave"></mid-popup> <mid-popup ref="midPopup" @afterSave="afterSave"></mid-popup>
<u-tabbar :list="tabbar" :mid-button="true" :mid-button-size="80" :before-switch="beforeSwitch"></u-tabbar> <u-tabbar :list="tabbar" :mid-button="true" :mid-button-size="80" :before-switch="beforeSwitch"></u-tabbar>
</view> </view>
...@@ -138,8 +138,8 @@ export default { ...@@ -138,8 +138,8 @@ export default {
let startTime = null; let startTime = null;
let endTime = null; let endTime = null;
if (range) { if (range) {
startTime = range[0]; startTime = range[0]+' 00:00:00';
endTime = range[1]; endTime = range[1]+' 23:59:59';
} }
this.downloadExcel({ startTime, endTime }); this.downloadExcel({ startTime, endTime });
// 导出 // 导出
...@@ -164,16 +164,21 @@ export default { ...@@ -164,16 +164,21 @@ export default {
this.saveFile(res); this.saveFile(res);
} catch (e) { } catch (e) {
this.showToast('下载错误'); this.showToast('下载错误');
this.$refs['pop-export-bill'].stopLoading()
console.log('downloadExcel_error', e); console.log('downloadExcel_error', e);
//TODO handle the exception //TODO handle the exception
} }
uni.hideLoading()
}, },
async saveFile(file) { async saveFile(file) {
console.log('saveFile'); console.log('saveFile');
try { try {
let res = await downLoad(file); let res = await downLoad(file);
this.$refs['pop-export-bill'].stopLoading()
this.visible=false
} catch (e) { } catch (e) {
uni.hideLoading(); uni.hideLoading();
this.$refs['pop-export-bill'].stopLoading()
console.log('saveFile_error', e); console.log('saveFile_error', e);
//TODO handle the exception //TODO handle the exception
} }
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<view class="quick-color-cancel" :style="{ 'padding-top': platform == '3' ? 0 : statusBarHeight + 'px' }"><u-icon name="close" @click="toIndex"></u-icon></view> <view class="quick-color-cancel" :style="{ 'padding-top': platform == '3' ? 0 : statusBarHeight + 'px' }"><u-icon name="close" @click="toIndex"></u-icon></view>
</view> </view>
<view class="quick-background"> <view class="quick-background">
<image src="/static/images/login/startup/denglulogo@3x.png" mode="" class="quick-background-logo"></image> <image src="/static/image/login/startup/denglulogo@3x.png" mode="" class="quick-background-logo"></image>
<image src="/static/images/login/startup/shiyongbanshou@3x.png" mode="" class="quick-background-slogn"></image> <image src="/static/image/index/shiyongbanshou@3x.png" mode="" class="quick-background-slogn"></image>
</view> </view>
<view class="quick-mark"> <view class="quick-mark">
<view class="quick-center" v-if="isIOS && platform === '4'"> <view class="quick-center" v-if="isIOS && platform === '4'">
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<view class="quick-center" v-else> <view class="quick-center" v-else>
<view class="submit-button-box"> <view class="submit-button-box">
<view class="submit-button" @click.stop="submit" :loading="loading"> <view class="submit-button" @click.stop="submit" :loading="loading">
<image src="/static/images/login/startup/weixin@3x.png" mode="" class="submit-button-icon" v-if="!(platform == '2' || platform == '3')"></image> <image src="/static/image/index/weixin@3x.png" mode="" class="submit-button-icon" v-if="!(platform == '2' || platform == '3')"></image>
<text>{{ platform == '2' || platform == '3' ? '授权登录' : '微信登录' }}</text> <text>{{ platform == '2' || platform == '3' ? '授权登录' : '微信登录' }}</text>
</view> </view>
</view> </view>
...@@ -180,7 +180,7 @@ export default { ...@@ -180,7 +180,7 @@ export default {
&-color { &-color {
width: 100%; width: 100%;
height: 30%; height: 30%;
background: linear-gradient(180deg, #e9f3ff 0%, #ffffff 100%); background: linear-gradient(180deg, #F4FFFC 0%, #ffffff 100%);
overflow: hidden; overflow: hidden;
&-cancel { &-cancel {
width: 60upx; width: 60upx;
......
This diff is collapsed.
<template> <template>
<view class="login-index"> <view class="quick">
<view class="main"> <view class="quick-color">
<view class="m-top flex flex-column flex-yc"> <view class="quick-color-cancel" :style="{ 'padding-top': platform == '3' ? 0 : statusBarHeight + 'px' }"><u-icon name="close" @click="toIndex"></u-icon></view>
<view class="t-logo"> </view>
<image class="t-logo" src="/static/images/logo_quick_search.png" /> <view class="quick-background">
</view> <image src="/static/images/login/startup/denglulogo@3x.png" mode="" class="quick-background-logo"></image>
<text class="t-title">扳手快查</text> <image src="/static/images/login/startup/shiyongbanshou@3x.png" mode="" class="quick-background-slogn"></image>
</view> </view>
<view class="m-mid"> <view class="quick-mark">
<block v-if="needAuth"> <view class="quick-center">
<view class="auth-tip">我们需要取得您的手机号,以关联您的扳手快查账号</view> <view class="auth-tip">我们需要取得您的手机号,以关联您的扳手快查账号</view>
<view class="flex flex-between"> <view class="quick-center-buttons">
<button class="login-refuse" @tap="refuseAuth">拒绝</button> <button class="login-refuse" @tap="refuseAuth">拒绝</button>
<button class="login-accept" open-type="getPhoneNumber" lang="zh_CN" @getphonenumber="signup">立即登录</button> <button class="login-refuse login-accept" open-type="getPhoneNumber" lang="zh_CN" @getphonenumber="signup">立即登录</button>
</view>
</block>
<block v-else>
<view class="auth-tip">授权成功,立即登录</view>
<button class="login-now" open-type="getPhoneNumber" @getphonenumber="signup">立即登录</button>
</block>
</view>
<view class="m-btm">
<view class="b-list">
<view class="b-item flex flex-yc" v-for="(item, index) in list" :key="index">
<view class="i-img">
<image class="i-img" :src="item.img" />
</view>
<view class="i-right flex flex-column flex-between">
<text class="r-top">{{ item.title }}</text>
<text class="r-btm">{{ item.intro }}</text>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import log from '@/utils/log.js' import log from '@/utils/log.js';
import {showToast} from "@/utils/common.js" import { showToast } from '@/utils/common.js';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
export default { export default {
components: {}, components: {},
...@@ -70,7 +51,8 @@ export default { ...@@ -70,7 +51,8 @@ export default {
], ],
canIUseGetUserProfile: false, canIUseGetUserProfile: false,
agree: false, agree: false,
params: {} params: {},
statusBarHeight: 20
}; };
}, },
computed: { computed: {
...@@ -88,8 +70,15 @@ export default { ...@@ -88,8 +70,15 @@ export default {
this.canIUseGetUserProfile = true; this.canIUseGetUserProfile = true;
break; break;
} }
let { statusBarHeight } = this.systemInfo;
this.statusBarHeight = statusBarHeight;
}, },
methods: { methods: {
toIndex(){
uni.navigateBack({
delta:1
})
},
// setLoginStatus() { // setLoginStatus() {
// // 授权用户信息不为空,说明已经授权过无需重新授权 // // 授权用户信息不为空,说明已经授权过无需重新授权
// if (app.globalData.tmp && app.globalData.tmp.wxUserInfo) { // if (app.globalData.tmp && app.globalData.tmp.wxUserInfo) {
...@@ -125,7 +114,7 @@ export default { ...@@ -125,7 +114,7 @@ export default {
if (this.needAuth) { if (this.needAuth) {
uni.getUserProfile({ uni.getUserProfile({
desc: '用于授权登录', desc: '用于授权登录',
success: res=> { success: res => {
console.log('授权成功', res); console.log('授权成功', res);
const userInfo = res.userInfo || { const userInfo = res.userInfo || {
nickName: '', nickName: '',
...@@ -264,32 +253,38 @@ export default { ...@@ -264,32 +253,38 @@ export default {
} else { } else {
console.log('用户同意', e.detail); console.log('用户同意', e.detail);
const detail = e.detail || {}; const detail = e.detail || {};
let params={ let params = {
encryptedData: detail.encryptedData, encryptedData: detail.encryptedData,
iv: detail.iv, iv: detail.iv
// code: detail.code, // code: detail.code,
} };
this.$store.dispatch('Auto_login',params).then((res)=>{ this.$store
console.log("登录成功",res) .dispatch('Auto_login', params)
this.$store.dispatch('Get_UserInfo').then(()=>{ .then(res => {
showToast('登录成功'); console.log('登录成功', res);
setTimeout(()=>{ this.$store
uni.switchTab({ .dispatch('Get_UserInfo')
url:"/pages/index/index" .then(() => {
showToast('登录成功');
setTimeout(() => {
uni.switchTab({
url: '/pages/index/index'
});
}, 1000);
}) })
},1000) .catch(() => {
}).catch(()=>{ showToast('获取用户信息失败');
showToast('获取用户信息失败'); });
}) })
}).catch((err)=>{ .catch(err => {
showToast('登录失败'); showToast('登录失败');
console.log("登录失败",err) console.log('登录失败', err);
}) });
// let userInfo = (app.globalData.tmp && app.globalData.tmp.wxUserInfo) || { // let userInfo = (app.globalData.tmp && app.globalData.tmp.wxUserInfo) || {
// nickName: '', // nickName: '',
// avatarUrl: '' // avatarUrl: ''
// }; // };
return false return false;
login login
.wxLogin() .wxLogin()
.then(res => { .then(res => {
...@@ -305,7 +300,7 @@ export default { ...@@ -305,7 +300,7 @@ export default {
}) })
.then(res => { .then(res => {
console.log('绑定手机之后接口登录结果:', res, 'token:', api.getToken()); console.log('绑定手机之后接口登录结果:', res, 'token:', api.getToken());
if (res) { if (res) {
if ((res.status && res.data) || api.getToken()) { if ((res.status && res.data) || api.getToken()) {
self.goBackPage(); self.goBackPage();
...@@ -419,116 +414,123 @@ export default { ...@@ -419,116 +414,123 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.login-index .main { .quick {
font-size: 24rpx; width: 100%;
} height: 100vh;
.login-index .main .m-top {
margin-top: 30rpx;
display: flex;
flex-direction: column;
justify-content: center;
}
.login-index .main .m-top .t-logo {
margin-bottom: 15rpx;
width: 138rpx;
height: 138rpx;
background: #ffffff; background: #ffffff;
border-radius: 50%; position: relative;
}
.login-index .main .m-top .t-title {
font-size: 40rpx;
font-weight: bold;
color: #333333;
line-height: 1;
}
.login-index .main .m-mid {
padding: 0 40rpx;
margin-bottom: 24rpx;
}
.login-index .main .m-mid .auth-tip {
margin-top: 80rpx;
margin-bottom: 40rpx;
text-align: center;
font-size: 24rpx;
color: #8d8d8d;
line-height: 1;
}
.login-index .main .m-mid button {
padding: 0;
margin: 0;
}
.login-index .main .m-mid button.login-now {
/* margin-top: 138rpx; */
width: 670rpx;
height: 98rpx;
background: #07c160;
border-radius: 49rpx;
color: #ffffff;
font-weight: bold;
box-shadow: 6rpx 6rpx 40rpx rgba(7, 193, 96, 0.5);
}
.login-index .main .m-mid button.login-refuse,
.login-index .main .m-mid .login-accept {
width: 318rpx;
height: 86rpx;
line-height: 86rpx;
border-radius: 49rpx;
color: #ffffff;
font-weight: bold;
}
.login-index .main .m-mid button.login-refuse {
color: #333333;
background: #ededed;
}
.login-index .main .m-mid button.login-accept {
background: #07c160;
box-shadow: 6rpx 6rpx 40rpx rgba(7, 193, 96, 0.5);
}
.login-index .main .m-btm .b-list {
padding: 80rpx 40rpx 0 40rpx;
}
.login-index .main .m-btm .b-list .b-item {
margin-bottom: 55rpx;
}
.login-index .main .m-btm .b-list .b-item .i-img {
margin-right: 36rpx;
width: 60rpx;
height: 60rpx;
flex-shrink: 0;
}
.login-index .main .m-btm .b-list .b-item .i-right .r-top {
margin-bottom: 21rpx;
font-size: 28rpx;
color: #333333; color: #333333;
} &-color {
.login-index .main .m-btm .b-list .b-item .i-right .r-btm { width: 100%;
font-size: 24rpx; height: 30%;
color: #888888; background: linear-gradient(180deg, #F4FFFC 0%, #ffffff 100%);
} overflow: hidden;
.agree-view { &-cancel {
font-size: 28rpx; width: 60upx;
color: #8d8d8d; height: 60upx;
display: flex; text-align: left;
justify-content: center; margin-top: 20upx;
align-items: center; margin-left: 32upx;
} font-size: 32upx;
}
}
&-background {
position: absolute;
overflow: hidden;
top: 20%;
text-align: center;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
&-logo {
width: 144upx;
height: 144upx;
}
&-slogn {
width: 362upx;
height: 38upx;
margin-top: 46upx;
}
}
&-mark {
// overflow: hidden;
width: 100%;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
&-center {
position: relative;
width: 100%;
.submit-button-box {
width: 100%;
padding: 0 80upx;
margin-bottom: 54upx;
.submit-button {
position: relative;
width: 100%;
height: 104upx;
border-radius: 52upx;
line-height: 104upx;
color: #ffffff;
font-size: 32upx;
font-weight: bold;
text-align: center;
background: #00c802;
box-shadow: 0px 12upx 24upx 0px rgba(0, 200, 2, 0.32);
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
&:active {
background: #41c845;
}
.submit-button-icon {
width: 38upx;
height: 32upx;
margin-right: 16upx;
}
}
}
.auth-tip {
margin-top: 80rpx;
margin-bottom: 40rpx;
text-align: center;
font-size: 24rpx;
color: #8d8d8d;
line-height: 1;
}
&-buttons {
display: flex;
align-items: center;
justify-content: space-between;
}
.login-refuse {
width: 292rpx;
height: 104rpx;
border-radius: 16rpx;
border: 2rpx solid #cccccc;
line-height: 104rpx;
font-size: 32rpx;
color: #8d8d8d;
font-weight: bold;
background: #ffffff;
}
.login-accept {
color: #ffffff;
background: $default-color;
box-shadow: 0px 12rpx 24rpx 0px rgba(2, 160, 116, 0.2);
border: none;
}
.check-circle-view { .cancel-button {
border-radius: 50%; text-align: center;
border: 2rpx solid #3383fe; font-size: 32upx;
width: 36rpx; color: #8d8d8d;
height: 36rpx; }
} }
.icon-view {
width: 56rpx;
height: 56rpx;
display: flex;
justify-content: center;
align-items: center;
}
.agree-text-view {
}
.name-text {
color: #3383fe;
} }
</style> </style>
...@@ -293,8 +293,8 @@ export default { ...@@ -293,8 +293,8 @@ export default {
} }
if (range) { if (range) {
param = { param = {
end: range[0] + ' 00:00:00', end: range[1] + ' 23:59:59',
start: range[1] + ' 00:00:00', start: range[0] + ' 00:00:00',
} }
} }
// 导出 // 导出
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment