lcny-admin-mobile-vue/src/App.vue

644 lines
11 KiB
Vue

<script>
import store from './store/index.js'
export default {
onLaunch: function() {
console.log('App Launch')
if(!(store.state.user_access_token&&store.state.userInfo['id'])){//未登录
uni.redirectTo({
url:'/pages/login/login'
})
}else{
// console.log(store.state.user_access_token)
}
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
@windicss;
</style>
<style lang="scss">
@import "uview-ui/index.scss";
/*每个页面公共css */
.bg-page{
width: 100%;
min-height: 100%;
background-color: #eeeeef;
position: absolute;
left: 0;
top: 0;
}
.mt24{
margin-top: 24rpx;
}
.mt12{
margin-top: 12rpx;
}
.mt20{
margin-top: 20rpx;
}
.mr20{
margin-right: 20rpx;
}
.mr30{
margin-right: 30rpx;
}
.ml20{
margin-left: 20rpx;
}
.mr20{
margin-right: 20rpx;
}
.pdlr30{
padding-left: 30rpx;
padding-right: 30rpx;
}
.pdlr12{
padding-left: 12rpx;
padding-right: 12rpx;
}
.pdlr24{
padding-left: 24rpx;
padding-right: 24rpx;
}
.pdlr18{
padding-left: 18rpx;
padding-right: 18rpx;
}
.pdl40{
padding-left: 40rpx;
}
.pdlr12{
padding-left: 12rpx;
padding-right: 12rpx;
}
.flex-column{
display: flex;
flex-direction: column;
}
.flex-row{
display: flex;
flex-direction: row;
}
.flex-1{
flex: 1;
}
.align-items{
align-items: center;
}
.align-items-c{
align-items: center;
}
.clamp {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}
.clamp-2 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.cu-btn{
height: 60rpx;
flex-shrink: 0;
font-size: 24rpx;
position: relative;
border: 0rpx;
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 0 30rpx;
line-height: 1;
text-align: center;
text-decoration: none;
overflow: visible;
margin-left: initial;
transform: translate(0rpx, 0rpx);
margin-right: initial;
}
.cu-btn.round{
border-radius: 1000rpx;
border: none;
}
.cu-btn::after {
display: none;
}
.cu-btn[class*="bg-"]::after {
display: none;
}
.cu-btn.round[class*="line"]::after {
border-radius: 1000rpx;
}
.cu-btn.button-hover {
transform: translate(1rpx, 1rpx);
}
.cu-btn[class*="line"] {
background-color: transparent;
}
.handle-btn .u-btn.u-btn--warning--disabled{
color: #ffffff !important;
border-color: #C0C0C0 !important;
background-color: #C0C0C0 !important;
}
.cu-btn[class*="line"]::after {
content: " ";
display: block;
width: 200%;
height: 200%;
position: absolute;
top: 0;
left: 0;
border: 1rpx solid currentColor;
transform: scale(0.5);
transform-origin: 0 0;
box-sizing: border-box;
border-radius: 12rpx;
z-index: 1;
pointer-events: none;
}
.safe-area-inset-bottom{
padding-bottom: 0;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
.status_bar_top {
padding-top: var(--status-bar-height);
}
.input-placeholder,.textarea-placeholder{
color: #c3c3c3;
}
.list_arrowR::after{
content: '';
width: 15rpx;
height: 25rpx;
position: absolute;
right: 10rpx;
top: 50%;
transform: translateY(-50%);
background: url('./static/img/my_arrow_right.png') no-repeat center;
background-size: 100%;
}
.bg_colorf8{
background-color: #f8f8f8;
}
//公用 顶部筛选样式
.secreen-section{
.slot-content{
padding: 30rpx;
}
.dropdown-box{
&.downClose{
.u-dropdown__content{
visibility: hidden;
}
}
}
.select-date{
padding: 30rpx;
display: flex;
align-items: center;
font-size: 28rpx;
margin-bottom: 40rpx;
.time_box{
display: flex;
align-items: center;
height: 44rpx;
.tip_txt{
color: #ccc;
}
.delete_btn{
padding: 15rpx;
margin-left: 15rpx;
}
}
}
.btn_group{
display: flex;
justify-content: space-around;
.btn{
width: 300rpx;
}
}
.quick_times{
padding: 18rpx 24rpx 24rpx 24rpx;
.tab-section{
display: flex;
flex-direction: row;
align-items: center;
overflow: hidden;
position: relative;
height: 72rpx;
background-color: rgb(238, 238, 239);
padding: 6rpx;
border-radius: 10rpx;
.tab-item{
flex: 1;
text-align: center;
font-size: 28rpx;
height: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
color: #303133;
padding: 0 6rpx;
&.active{
font-weight: bold;
background-color: rgb(255, 255, 255);
}
}
}
}
}
// 图表标题通用
.chart_section{
.top_box{
display: flex;
align-items: center;
justify-content: space-between;
padding: 24rpx 30rpx;
margin-bottom: 20rpx;
font-size: 28rpx;
.tit{
font-size: 28rpx;
font-weight: bold;
.unit{
font-weight: 500;
margin-left: 16rpx;
font-size: 24rpx;
}
}
}
}
//弹出预警温度
.u-popup-section{
height: 100%;
display: flex;
flex-direction: column;
.top_box{
height: 96rpx;
padding: 0 40rpx;
.title{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
font-weight: bold;
}
}
.form_cont{
padding: 0 30rpx;
.title2{
font-size: 30rpx;
font-weight: bold;
padding: 20rpx 0;
}
.label_tit{
padding-top: 28rpx;
}
}
.label_tit{
padding: 18rpx 0;
}
.scroll-y{
flex: 1;
flex-shrink: 0;
min-height: 1px;
}
.input_unit_ibox{
padding: 0 24rpx;
}
.buttom_section{
display: flex;
justify-content: space-around;
padding: 40rpx 24rpx 40rpx 24rpx;
.btn{
width: 220rpx;
}
}
}
//公用底部弹出详情
.popup-form-info{
min-height: 450rpx;
padding-bottom: 75rpx;
.top_box{
height: 96rpx;
padding: 0 40rpx;
.title{
padding: 20rpx;
text-align: center;
font-size: 32rpx;
font-weight: bold;
}
.handle-btns{
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 30rpx;
.btn_del{
color:#fa3534;
}
.btn_edit{
color:#2979ff;
}
}
}
.form_edit{
padding: 0 30rpx;
}
.plist{
display: flex;
padding: 20rpx 40rpx;
.label_t{
width: 100px;
}
.flex-1{
word-break: break-all;
}
}
}
//弹窗表单详情编辑
.popup-form-ubox{
height: 100%;
display: flex;
flex-direction: column;
.top_box{
height: 96rpx;
padding: 0 40rpx;
.title{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
font-weight: bold;
}
}
.form_edit{
padding: 0 30rpx;
.label_tit{
padding-top: 28rpx;
}
.input_box{
width: 100%;
padding: 0 12rpx;
}
}
.label_tit{
padding: 18rpx 0;
}
.scroll-y{
flex: 1;
flex-shrink: 0;
min-height: 1px;
}
.buttom_section{
display: flex;
justify-content: space-around;
padding: 40rpx 24rpx 40rpx 24rpx;
.btn{
width: 220rpx;
}
}
}
// 公用 swiper列表样式
.tb_swipe_list{
margin-bottom: 24rpx;
border-radius: 6rpx;
.tb_body{
padding: 16rpx;
background-color: #fff;
position: relative;
.row_box{
font-size: 28rpx;
line-height: 40rpx;
color: #333;
&:nth-of-type(1){
font-size: 30rpx;
margin-bottom: 5rpx;
padding-right: 100rpx;
}
}
.tag_status{
position: absolute;
right: 30rpx;
top: 20rpx;
}
}
}
.tip_err_text{
font-size: 28rpx;
color: #fa3534;
}
.secreen-show-box{
display: flex;
align-items: center;
background-color: #fff;
padding: 20rpx 30rpx;
color: #666;
}
.placeholder{
color: rgb(192, 196, 204);
}
.u-select-list{
display: flex;
position: relative;
padding-right: 70rpx;
.value{
line-height: initial;
}
.placeholder{
line-height: initial;
}
.right{
position: absolute;
top: 0;
right: 0;
display: flex;
align-items: center;
}
}
.popup-select-section{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
.top_section{
padding: 30rpx;
.title{
font-size: 32rpx;
}
}
.scrollY{
flex: 1;
width: 100%;
min-height: 300rpx;
}
.info_cont{
padding: 0 30rpx;
}
.buttom_section{
display: flex;
padding: 30rpx;
justify-content: space-around;
.btn{
width: 240rpx;
}
}
.select-box{
display: flex;
flex-wrap: wrap;
padding-bottom: 30rpx;
.select-item{
border: 1px solid #2979ff;
color: #2979ff;
padding: 4rpx 28rpx;
border-radius: 72rpx;
margin-top: 20rpx;
margin-right: 20rpx;
&.active{
color: #fff;
background-color: #2979ff;
}
}
}
}
.page-top-title-box{
display: flex;
align-items: center;
padding: 24rpx 30rpx;
background-color: #fff;
justify-content: space-between;
border-top: 12rpx solid #eeeeef;
.title{
font-size: 32rpx;
font-weight: bold;
}
.handle-option{
.btn{
font-size: 32rpx;
height: 60rpx;
padding: 0 40rpx;
background-color: rgb(42, 125, 201);
}
}
}
.nav_slot_right_box{
padding-right: 20rpx;
.custom_btn{
color: #fff;
font-size: 32rpx;
padding: 20rpx;
}
}
.search-box{
background-color: #fff;
padding: 20rpx;
.search-input-vh{
padding: 12rpx 20rpx;
border-radius: 30rpx;
font-size: 28rpx;
&::after{
border-radius: 30rpx;
border-color: #ddd;
}
.placeholder_text{
color: #c3c3c3;
}
}
}
.popup-screen-groups{
padding-top: 46px;
background-color: #fff;
height: 100%;
display: flex;
flex-direction: column;
.row_ul{
padding-top: 30rpx;
}
.row_list{
padding: 0 20rpx;
margin-bottom: 16rpx;
.label_tit{
width: 120rpx;
text-align: right;
margin-right: 20rpx;
&.small{
width: 90rpx;
}
}
}
.scroll-y{
flex: 1;
flex-shrink: 0;
min-height: 1px;
}
.buttom_section{
display: flex;
justify-content: space-around;
padding: 30rpx 24rpx;
.btn{
width: 220rpx;
&.small_btn{
width: 300rpx;
height: 64rpx;
}
}
}
}
.scrollY{
width: 100%;
height: 100%;
}
.u-select-input-list{
position: relative;
flex: 1;
display: flex;
flex-direction: row;
border-radius: 8rpx;
min-height: 72rpx;
border: 1px solid #dcdfe6;
padding: 0 20rpx;
.select_wrapper{
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
font-size: 28rpx;
color: #000;
}
.right-icon{
.u-icon__icon{
margin-left: 10rpx;
color: rgb(192, 196, 204);
}
}
}
</style>