This commit is contained in:
2025-06-18 18:03:32 +08:00
parent 3f5b1a08bd
commit a9d651822a
7 changed files with 206 additions and 367 deletions

View File

@@ -4,7 +4,7 @@
<view class="userInfo-wrap">
<view class="userInfo">
<text class="p1">{{$store.getters.userInfo !== '' ? JSON.parse($store.getters.userInfo).user_name : ''}}</text>
<text class="p2">欢迎进入立讯手持系统</text>
<text class="p2">欢迎进入恒森ACS手持系统</text>
</view>
<view class="exit" @tap="Quit">
<view class="icon-exit"></view>

View File

@@ -1,30 +1,20 @@
<template>
<view class="zd_content bg">
<view class="p1">欢迎来到</view>
<view class="p2">立讯手持系统</view>
<view class="input-box">
<input class="large-input" type="text" placeholder="请输入用户名" v-model="user">
</view>
<div class="input-box">
<input class="large-input" :password="!showPassword" placeholder="请输入密码" v-model="password">
<span class="iconfont icon_eye_close" :class="[showPassword ? 'icon_eye_active' : '']" @tap="changePassword">&#xe6a0;</span>
</div>
<view class="radio-box">
<view class="radio-wrap">
<span class="iconfont icon_unchecked" :class="{'icon_checked': saveUser}" @tap="toSaveUser">&#xe66b;</span>
<text class="radio-label">记住用户名</text>
<view class="p2">恒森ACS手持系统</view>
<view class="input-box" style="margin-bottom: 20px">
<view class="input-wrap">
<view class="input-label">服务器地址</view>
<input type="text" class="setup-input" placeholder="请输入服务器地址" v-model="addrip">
</view>
<text class="setup-text" @tap="setup">设置</text>
<text class="setup-text" @tap="isUpdate">升级版本</text>
</view>
<button class="login-btn" :disabled="disabled" @tap="toLogin">确认登录</button>
<button class="login-btn" @tap="toLogin">进入</button>
<view v-if="version !== ''" class="version-name">v{{version}}</view>
<Up-grade v-if="grade === true" @closeUpdate="closeUpdate" :androidUrl="androidUrl"></up-grade>
</view>
</template>
<script>
import { RSAencrypt } from '@/utils/jsencrypt.js'
import {handLogin, pdaUpdate} from '@/utils/getData2.js'
import UpGrade from './upgrade.vue'
export default {
@@ -33,11 +23,7 @@
},
data() {
return {
user: this.$store.getters.loginName ? this.$store.getters.loginName : '',
password: '',
showPassword: false,
saveUser: this.$store.getters.loginName ? true : false,
disabled: false,
addrip: this.$store.getters.baseUrl,
version: '',
versionCode: '',
grade: false,
@@ -55,58 +41,19 @@
//#endif
},
methods: {
isUpdate () {
this._pdaUpdate()
},
toSaveUser() {
this.saveUser = !this.saveUser
},
changePassword() {
this.showPassword = !this.showPassword
},
setup () {
toLogin() {
if (this.addrip === '') {
uni.showToast({
title: '服务器地址不能为空',
icon: 'none'
})
return
}
this.$store.dispatch('setConfig',{baseUrl: this.addrip})
uni.redirectTo({
url: '/pages/login/setup'
url: '/pages/home/home'
})
},
async toLogin() {
// uni.redirectTo({
// url: '/pages/home/home'
// })
this.disabled = true
if (this.user === '') {
uni.showToast({
title: '用户名不能为空',
icon: 'none'
})
this.disabled = false
return
}
if (this.password === '') {
uni.showToast({
title: '密码不能为空',
icon: 'none'
})
this.disabled = false
return
}
try {
let res = await handLogin(this.user, RSAencrypt(this.password))
if (this.saveUser) {
this.$store.dispatch('saveLoginName', this.user)
} else {
this.$store.dispatch('delLoginName', '')
}
this.$store.dispatch('saveUserInfo', JSON.stringify(res.result))
// this.$store.dispatch('saveToken', res.token)
uni.redirectTo({
url: '/pages/home/home'
})
this.disabled = false
} catch (e) {
this.disabled = false
}
},
async _pdaUpdate () {
let res = await pdaUpdate()
if (res.versionName === this.version) {
@@ -129,37 +76,27 @@
<style lang="stylus" scoped>
@import '../../common/style/mixin.styl';
.p1
_font(60rpx,75rpx,#444)
_font(60rpx,75rpx,#222)
padding-top: 90rpx
.p2
_font(50rpx,1,#444)
_font(50rpx,1,#222)
padding: 40rpx 0 25rpx
.input-box
_fj()
margin-top 68rpx
height 75rpx
border-bottom 1rpx solid #e2e2e2
.large-input
_wh(calc(100% - 40rpx), 74rpx)
_font(32rpx,74rpx,#999)
padding-left 10rpx
.radio-box
_fj()
margin: 25rpx 0 70rpx 0
height: 34rpx
.radio-wrap
_fj(flex-start)
height: 34rpx
flex: 2
.radio-label
_font(28rpx, 28rpx,#333)
padding-left: 10rpx
.setup-text
_font(28rpx, 28rpx,$red,,right)
padding-left 25rpx
margin-bottom 10vh
.input-wrap
width 100%
margin-bottom 10vh
.input-label
_font(30rpx,70rpx,#333)
margin-bottom 2vh
.setup-input
height 70rpx
background #fff
_font(30rpx,70rpx,#787878)
border-bottom 1px solid #eeeeee
.bg
background-color: #fff;
_bis('../../static/image/login_bg.png', 100%,,bottom)
padding: 92rpx 30rpx 82rpx 30rpx;
.login-btn
width 100%
border-radius 46rpx

View File

@@ -1,80 +0,0 @@
<template>
<view class="zd_container">
<nav-bar title="设置" :inner2="true" @goIn="goIn" :show1="false"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="input-wrap">
<view class="input-label">服务器地址</view>
<input type="text" class="setup-input" placeholder="请输入服务器地址" v-model="addrip">
</view>
</view>
<!-- <view class="zd_wrapper">
<view class="input-wrap">
<view class="input-label">刷新时间(s)</view>
<input type="text" class="setup-input" placeholder="请输入刷新时间" v-model="setTime">
</view>
</view> -->
</view>
<view class="submit-bar">
<button class="submit-button" @click="_submit">确认</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
export default {
components: {
NavBar
},
data() {
return {
addrip: this.$store.getters.baseUrl,
setTime: this.$store.getters.setTime / 1000
};
},
methods: {
goIn () {
uni.redirectTo({
url: '/pages/login/login'
})
},
_submit () {
if (this.addrip === '') {
uni.showToast({
title: '服务器地址',
icon: 'none'
})
return
}
// if (this.setTime === '') {
// uni.showToast({
// title: '请填写刷新时间',
// icon: 'none'
// })
// return
// }
// 存值
this.$store.dispatch('setConfig',{baseUrl: this.addrip, setTime: this.setTime * 1000})
uni.redirectTo({
url: '/pages/login/login'
})
}
}
}
</script>
<style lang="stylus">
@import '../../common/style/mixin.styl';
.input-wrap
width 100%
_fj()
.input-label
wh(200rpx, 58rpx)
_font(28rpx,58rpx,#464646)
.setup-input
_wh(calc(100% - 200rpx), 58rpx)
background #fff
_font(28rpx,58rpx,#323232)
padding 0 10rpx
</style>

View File

@@ -1,34 +1,34 @@
<template>
<view class="mask flex-center">
<view class="content botton-radius">
<view class="content-top">
<text class="content-top-text">发现新版本</text>
<image class="content-top" style="top: 0;" width="100%" height="100%" src="../../static/image/bg_top.png">
</image>
</view>
<view class="content-header"></view>
<view class="content-body">
<view class="title">
<text>立讯又有新版本了升级到最新版本享受更丰富稳定快速的功能和体验</text>
</view>
<view class="footer flex-center">
<template>
<template v-if="!downloadSuccess">
<view class="progress-box flex-column" v-if="downloading">
<progress class="progress" border-radius="35" :percent="downLoadPercent" activeColor="#3DA7FF" show-info stroke-width="10" />
<view style="width:100%;font-size: 28rpx;display: flex;justify-content: space-around;">
<template>
<view class="mask flex-center">
<view class="content botton-radius">
<view class="content-top">
<text class="content-top-text">发现新版本</text>
<image class="content-top" style="top: 0;" width="100%" height="100%" src="../../static/image/bg_top.png">
</image>
</view>
<view class="content-header"></view>
<view class="content-body">
<view class="title">
<text>恒森ACS又有新版本了升级到最新版本享受更丰富稳定快速的功能和体验</text>
</view>
<view class="footer flex-center">
<template>
<template v-if="!downloadSuccess">
<view class="progress-box flex-column" v-if="downloading">
<progress class="progress" border-radius="35" :percent="downLoadPercent" activeColor="#3DA7FF" show-info stroke-width="10" />
<view style="width:100%;font-size: 28rpx;display: flex;justify-content: space-around;">
<text>安装包下载中请稍后</text>
<text>({{downloadedSize}}/{{packageFileSize}}M)</text>
</view>
</view>
<button v-else class="content-button" style="border: none;color: #fff;" plain @click="updateApp">立即升级</button>
</template>
</template>
</view>
</view>
<image v-if="is_mandatory" class="close-img" src="../../static/image/app_update_close.png" @click.stop="closeUpdate"></image>
</view>
</view>
<text>({{downloadedSize}}/{{packageFileSize}}M)</text>
</view>
</view>
<button v-else class="content-button" style="border: none;color: #fff;" plain @click="updateApp">立即升级</button>
</template>
</template>
</view>
</view>
<image v-if="is_mandatory" class="close-img" src="../../static/image/app_update_close.png" @click.stop="closeUpdate"></image>
</view>
</view>
</template>
<script>
@@ -89,141 +89,141 @@
}
}
}
</script>
<style>
page {
background: transparent;
}
.flex-center {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
align-items: center;
}
.mask {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, .65);
}
.botton-radius {
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
}
.content {
position: relative;
top: 0;
width: 600rpx;
background-color: #fff;
box-sizing: border-box;
padding: 0 50rpx;
font-family: Source Han Sans CN;
}
.text {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
line-height: 200px;
text-align: center;
color: #FFFFFF;
}
.content-top {
position: absolute;
top: -195rpx;
left: 0;
width: 600rpx;
height: 270rpx;
}
.content-top-text {
font-size: 45rpx;
font-weight: bold;
color: #F8F8FA;
position: absolute;
top: 120rpx;
left: 50rpx;
z-index: 1;
}
.content-header {
height: 80rpx;
}
.title {
font-size: 33rpx;
font-weight: bold;
color: #3DA7FF;
</script>
<style>
page {
background: transparent;
}
.flex-center {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
align-items: center;
}
.mask {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, .65);
}
.botton-radius {
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
}
.content {
position: relative;
top: 0;
width: 600rpx;
background-color: #fff;
box-sizing: border-box;
padding: 0 50rpx;
font-family: Source Han Sans CN;
}
.text {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
line-height: 200px;
text-align: center;
color: #FFFFFF;
}
.content-top {
position: absolute;
top: -195rpx;
left: 0;
width: 600rpx;
height: 270rpx;
}
.content-top-text {
font-size: 45rpx;
font-weight: bold;
color: #F8F8FA;
position: absolute;
top: 120rpx;
left: 50rpx;
z-index: 1;
}
.content-header {
height: 80rpx;
}
.title {
font-size: 33rpx;
font-weight: bold;
color: #3DA7FF;
line-height: 38rpx;
color: #333;
}
.footer {
height: 150rpx;
display: flex;
align-items: center;
justify-content: space-around;
}
.box-des-scroll {
box-sizing: border-box;
padding: 0 40rpx;
height: 50rpx;
text-align: left;
}
.box-des {
font-size: 26rpx;
color: #000000;
line-height: 50rpx;
}
.progress-box {
width: 100%;
}
.progress {
width: 90%;
height: 40rpx;
border-radius: 35px;
}
.close-img {
width: 70rpx;
height: 70rpx;
z-index: 1000;
position: absolute;
bottom: -120rpx;
left: calc(50% - 70rpx / 2);
}
.content-button {
text-align: center;
flex: 1;
font-size: 30rpx;
font-weight: 400;
color: #FFFFFF;
border-radius: 40rpx;
margin: 0 18rpx;
height: 80rpx;
line-height: 80rpx;
background: linear-gradient(to right, #1785ff, #3DA7FF);
}
.flex-column {
display: flex;
flex-direction: column;
align-items: center;
}
color: #333;
}
.footer {
height: 150rpx;
display: flex;
align-items: center;
justify-content: space-around;
}
.box-des-scroll {
box-sizing: border-box;
padding: 0 40rpx;
height: 50rpx;
text-align: left;
}
.box-des {
font-size: 26rpx;
color: #000000;
line-height: 50rpx;
}
.progress-box {
width: 100%;
}
.progress {
width: 90%;
height: 40rpx;
border-radius: 35px;
}
.close-img {
width: 70rpx;
height: 70rpx;
z-index: 1000;
position: absolute;
bottom: -120rpx;
left: calc(50% - 70rpx / 2);
}
.content-button {
text-align: center;
flex: 1;
font-size: 30rpx;
font-weight: 400;
color: #FFFFFF;
border-radius: 40rpx;
margin: 0 18rpx;
height: 80rpx;
line-height: 80rpx;
background: linear-gradient(to right, #1785ff, #3DA7FF);
}
.flex-column {
display: flex;
flex-direction: column;
align-items: center;
}
</style>

View File

@@ -18,7 +18,6 @@
<view class="site_item" v-for="(el, i) in e.pointArr" :key="i">
<view class="site_item_box" :class="['bggray', 'bggreen'][Number(el.status)]" @click="setcode(el)">
<text class="title_1">{{el.device_name}}</text>
<text class="title_2">来源:{{el.source_device}}</text>
</view>
</view>
</view>
@@ -28,11 +27,11 @@
<view class="submit-bar">
<view class="dot_item">
<view class="p1">起始点</view>
<view class="p2">设备号{{sObj.device_name}}</view>
<view class="p2">{{sObj.device_name}}</view>
</view>
<view class="dot_item">
<view class="p1">目标点</view>
<view class="p2">设备号{{nObj.device_name}}</view>
<view class="p2">{{nObj.device_name}}</view>
</view>
<view class="btn_block">
<button class="submit-button" :class="{'btn-disabled': JSON.stringify(sObj) === '{}' && JSON.stringify(nObj) === '{}'}" @click="cancle">清空</button>
@@ -59,8 +58,7 @@
regobj: {},
disabled1: false,
sObj: {},
nObj: {},
isS: false
nObj: {}
};
},
created () {
@@ -111,12 +109,10 @@
}
},
setcode (el) {
if (this.isS === false) {
if (JSON.stringify(this.sObj) === '{}') {
this.sObj = el
this.isS = true
} else if (this.isS) {
} else if (JSON.stringify(this.sObj) !== '{}' && JSON.stringify(this.nObj) === '{}') {
this.nObj = el
this.isS = false
}
},
/** 清空点位选择 */
@@ -199,17 +195,10 @@
_font(30rpx,40rpx,#333,bold)
font-style italic
.title_1
_wh(100%, 60%)
_wh(100%, 100%)
_fj(center)
overflow hidden
_font(28rpx,28rpx,#303133,500, center)
.title_2
_wh(100%, 40%)
_fj(center)
overflow hidden
_font(24rpx,25rpx,#303133,500, center)
opacity .69
white-space: nowrap
.submit-bar
justify-content space-between
padding 10rpx

View File

@@ -18,7 +18,6 @@
<view class="site_item" v-for="(el, i) in e.pointArr" :key="i">
<view class="site_item_box" :class="['bggray', 'bggreen'][Number(el.status)]" @click="setcode(el)">
<text class="title_1">{{el.device_name}}</text>
<text class="title_2">来源:{{el.source_device}}</text>
</view>
</view>
</view>
@@ -201,7 +200,7 @@
_font(30rpx,40rpx,#333,bold)
font-style italic
.title_1
_wh(100%, 60%)
_wh(100%, 100%)
_fj(center)
overflow hidden
_font(28rpx,28rpx,#303133,500, center)