This commit is contained in:
cclu 2023-05-17 15:04:31 +08:00
parent ec430c2de5
commit 1bb6617cd3
12 changed files with 532 additions and 65 deletions

View File

@ -27,7 +27,6 @@ export default{
}
},
onLoad(){
this.selectMonth = 10
},
onReady(){
var _this = this;

View File

@ -1,16 +1,376 @@
<template>
<view class="main">
<view class="heard">
<image class="headerBg" src="/static/images/examine/bg.png"></image>
<view class="content">
<!-- 顶部标题 -->
<view class="top" :style="{height:menu.bottom+'px'}">
<view class="titleModule" :style="{height:(menu.bottom-menu.top)+'px'}">
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/navigation-left.svg"></image>
<text class="title">考评考核</text>
</view>
</view>
<!-- 选择片区 -->
<div class="picker">
<div class="selectService" @click="handleShowPopup">
<image class="img" src="/static/images/examine/fixed.svg"></image>
<view class="select">
<view class="selectContent">
<view class="name">皖中</view>
<p class="area">片区</p>
<image class="rightArrow" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
</view>
</view>
</div>
</div>
<!-- 选择月份 -->
<view class="monthTabs">
<scroll-view class="big" :show-scrollbar="false" scroll-with-animation scroll-x="true" enable-flex :scrollIntoView="current" >
<div :id="'item'+item.value" :class="selectMonth===item.value?'monthItem selectItem':'monthItem'" v-for="(item,index) in monthList" :key="index" @click="handleSelectMonth(item.value)">{{item.label}}</div>
</scroll-view>
</view>
</view>
</view>
<view class="content">
<view class="tab">
<view :class="selectTab===item.value?'tabItem selectItem':'tabItem'" v-for="(item,index) in tabList" :key="index" @click="handleChangeTab(item.value)">{{item.label}}</view>
</view>
<view class="serviceList">
<view class="serviceItem">
<view class="itemTitle">
<text class="title">新桥服务区</text>
<text class="unit">月度</text>
</view>
<view class=""></view>
</view>
</view>
</view>
<uniPopup type="bottom" :round="true" :show="showPop" @hidePopup="hidePopup">
<view class="popup">
<view class="top">
<text class="popupTitle">选择片区</text>
<image class="close" src="/static/images/examine/close.svg"></image>
</view>
<view class="list">
<view class="item" v-for="(item,index) in areaList" :key="index">{{item.label}}<text class="unit">片区</text></view>
</view>
</view>
</uniPopup>
</view>
</template>
<script>
import uniPopup from '@/components/uni-popup'
export default {
components:{
uniPopup
},
data(){
return {
monthList:[{label:'1月',value:1},{label:'2月',value:2},{label:'3月',value:3},{label:'4月',value:4},{label:'5月',value:5},{label:'6月',value:6},{label:'7月',value:7},
{label:'8月',value:8},{label:'9月',value:9},{label:'10月',value:10},{label:'11月',value:11},{label:'12月',value:12}],
selectMonth:0,
current:'',
menu:{},
statusBarHeight:'',
showPop:false,
areaList:[{label:'皖中',value:'皖中'},{label:'皖中',value:'皖中'},{label:'皖中',value:'皖中'}],//
tabList:[{label:'考核管理',value:1},{label:'日常巡检',value:2},{label:'晨会管理',value:3}],// tab
selectTab:1,// tab
serviceList:[],//
}
},
onLoad(){
//
let systemInfo = uni.getSystemInfoSync()
this.statusBarHeight = Number(systemInfo.statusBarHeight)
this.menu = uni.getMenuButtonBoundingClientRect()
console.log('this.menu',this.menu)
const date = new Date()
let month = date.getMonth() + 1
this.monthList = this.monthList.filter(item=>item.value<=month)
},
onReady(){
var _this = this;
_this.getThisMonth()
},
methods:{
//
getThisMonth(){
const date = new Date()
const month = date.getMonth() + 1
this.selectMonth = month
this.current='item'+month
console.log('this.current',this.current)
},
//
handleShowPopup(){
this.showPop = true
},
//
hidePopup(){
this.showPop = false
},
//
handleSelectMonth(value){
this.selectMonth = value
},
//
handleChangeTab(value){
this.selectTab = value
}
}
}
</script>
<style scoped>
<style scoped lang="scss">
@import '/static/public/font/stylesheet.css';
.main{
width: 100%;
.heard{
width: 100%;
height: 366px;
position: relative;
.content{
width: 100%;
height: 100%;
position: absolute;
box-sizing: border-box;
padding: 0 16px;
top: 0;left: 0;
z-index: 2;
.top{
width: 100%;
position: relative;
.titleModule{
width: 100%;
bottom: 0;
position: absolute;
display: flex;
justify-content: center;
.img{
width: 24px;
height: 24px;
position: absolute;
left: 0px;
}
.title{
font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
line-height: 28px;
}
}
}
.picker{
.selectService{
display: flex;
align-items: center;
.img{
width: 40px;
height: 40px;
z-index: 2;
}
.select{
height: 32px;
min-width: 110px;
background: #F8F8FA;
border-radius: 0 16px 16px 0;
transform: translateX(-20px);
box-sizing: border-box;
padding-left: 25px;
display: flex;
align-items: center;
position: relative;
.selectContent{
display: flex;
align-items: center;
.name{
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
}
.area{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
margin-left: 2px;
}
.rightArrow{
position: absolute;
right: 2px;
width: 24px;
height: 12px;
}
}
}
}
}
.monthTabs{
width: 100%;
height: 32px;
border-radius: 17px;
box-sizing: border-box;
border: 1px solid #BF99FE;
background: linear-gradient(180deg, #8338FF 0%, #A976FF 100%);
overflow: hidden;
padding: 2px 0;
margin-top: 16px;
.big{
text-align: center;
white-space: nowrap;
.monthItem{
display: inline-block;
width: 55px;
height: 24px;
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #B8C2FF;
line-height: 24px;
margin-right: 4px;
text-align: center;
border-radius: 12px;
}
.selectItem{
background: #fff;
}
.monthItem:first-child{
margin-left: 4px;
}
}
}
}
.headerBg{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
}
}
.content{
width: 100%;
height:200px;
box-sizing: border-box;
padding: 16px 16px 0;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
.tab{
width: 100%;
height: 38px;
background: #F3F1F5;
border-radius: 4px;
box-sizing: border-box;
padding: 4px;
display: flex;
justify-content: space-between;
align-items: center;
.tabItem{
width: 33%;
height: 100%;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
text-align: center;
line-height: 30px;
}
.selectItem{
background: #fff;
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #8441F3;
border-radius: 4px;
}
}
.serviceList{
width: 100%;
background: url("https://eshangtech.com/ShopICO/ahyd-BID/examine/serviceItemBg.svg")no-repeat;
background-size: contain;
.serviceItem{
width: 100%;
height: 270px;
box-sizing: border-box;
padding: 16px;
border-radius: 8px;
margin-top: 12px;
.itemTitle{
display: flex;
align-items: center;
.title{
font-size: 18px;
font-family: AlimamaShuHeiTi;
color: #33077A;
line-height: 26px;
}
.unit{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #3B48E3;
line-height: 12px;
padding: 3px 4px;
background: rgba(59, 72, 227, 0.1);
margin-left: 8px;
border-radius: 2px;
}
}
}
}
}
.popup{
width: 100%;
height: 60vh;
box-sizing: border-box;
padding: 16px;
.top{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.popupTitle{
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 22px;
}
.close{
width: 20px;
height: 20px;
}
}
.list{
width: 100%;
margin-top: 12px;
.item{
width: 100%;
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 20px;
text-align: left;
padding:12px 0;
.unit{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
line-height: 18px;
}
}
}
}
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<view class="main">
<view class="header">
<view class="header" :style="{height:loadMore?'290px':'500px'}">
<image class="headerBg" src="https://eshangtech.com/ShopICO/ahyd-BID/index/indexBg.png"></image>
<div class="headerTop" :style="{ height: menu.bottom + 5 + 'px'}">
<view class="selectTime" :style="{ top: menu.top + (menu.height - 22) / 2 + 'px' }">
@ -11,12 +11,12 @@
<text class="day">{{ thisDay }}</text>
<view class="uni-input" style="background: transparent;padding: 0;height:100%">{{ single }}</view>
<image class="icon" src="/static/images/index/arrow_bottom.svg"></image>
</view>
</view>
</picker>
</view>
</view>
</div>
<view class="other">
<view v-if="user.Membership_Id" >
<view v-if="user.Membership_Id" >
<view class="topTitle">
<p class="title">对客营收</p>
<text class="smallTitle">{{monthAmountAdd?monthAmountAdd:'-'}}<text class="month">({{thisMonth?thisMonth:'-'}}月累计)</text></text>
@ -125,15 +125,13 @@
</view>
</view>
<div class="more" @click="handleChangeLoadMore">
<image :class="loadMore?'img':'img rate'" src="/static/images/index/downArrow.svg"></image>
</div>
</view>
<div class="more" :style="{top:loadMore?'-270px':'-65px',paddingTop:loadMore?'16px':'12px'}" @click="handleChangeLoadMore">
<image :class="loadMore?'img':'img rate'" src="/static/images/index/downArrow.svg"></image>
</div>
<!-- 首页除顶部外,剩下的部分是自适应的高度,但是上移本身高度不变内容变了就会在底部留白,所以计算好内容的高度 在切换是否展示的时候 改变高度-->
<!-- 暂无更优法 -->
<view class="menu" :style="{top:loadMore?'-270px':'-65px',height:loadMore?
selectTab===3?'calc(1445px + env(safe-area-inset-bottom) + env(safe-area-inset-top) + env(safe-area-inset-bottom))':selectTab===2?'calc(1130px + env(safe-area-inset-bottom) + env(safe-area-inset-top))':'calc(965px + env(safe-area-inset-bottom) + env(safe-area-inset-top))':
selectTab===3?'calc(1445px + env(safe-area-inset-bottom) + env(safe-area-inset-top) + env(safe-area-inset-bottom))':selectTab===2?'calc(1130px + env(safe-area-inset-bottom) + env(safe-area-inset-top))':'calc(965px + env(safe-area-inset-bottom) + env(safe-area-inset-top))'}">
<view class="menu">
<image class="topBg" src="https://eshangtech.com/ShopICO/ahyd-BID/index/menuBg.png"></image>
<view class="content">
<div class="tabType">
@ -489,45 +487,49 @@ export default {
user:{
// onLoad user
handler:function (value){
console.log('value',value)
let userInfo = uni.getStorageSync('vuex')
userInfo = JSON.parse(userInfo)
console.log('userInfo11',userInfo)
//
if (userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee']===1){
this.isReturn = false
}else{
uni.redirectTo({
url:`/pages/commercialBI/noData?type=noAuthor`
})
}
if (this.isReturn===true){
//
if (userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee']===1){
this.isReturn = false
}else{
uni.redirectTo({
url:`/pages/commercialBI/noData?type=noAuthor`
})
}
if (userInfo.userData.AuthorityInfo['e2fb458b-d1bd-48fa-805e-fc93dc71efb7'] === 1 || userInfo.userData.AuthorityInfo['ea2fc404-d924-4c88-98de-1f4d96137745'] === 1){
this.getSuggestion()
}
//
this.seat = uni.getStorageSync('seatInfo')
if (!this.seat){
//stroge
wx.getFuzzyLocation({
type:'gcj02',
altitude:true,
success: (res) =>{
let seatInfo = {
latitude:res.latitude,
longitude:res.longitude
if (userInfo.userData.AuthorityInfo['e2fb458b-d1bd-48fa-805e-fc93dc71efb7'] === 1 || userInfo.userData.AuthorityInfo['ea2fc404-d924-4c88-98de-1f4d96137745'] === 1){
this.getSuggestion()
}
//
this.seat = uni.getStorageSync('seatInfo')
if (!this.seat){
//stroge
wx.getFuzzyLocation({
type:'gcj02',
altitude:true,
success: (res) =>{
let seatInfo = {
latitude:res.latitude,
longitude:res.longitude
}
uni.setStorageSync('seatInfo', seatInfo);
this.seat = seatInfo
}
uni.setStorageSync('seatInfo', seatInfo);
this.seat = seatInfo
}
})
}else{
//
this.nearestService()
}
if (!this.isReturn){
this.getData(this.option)
this.handleNoticeMonth()
this.handleNoticeYear()
})
}else{
//
this.nearestService()
}
if (!this.isReturn){
this.getData(this.option)
console.log('watch')
this.handleNoticeMonth()
this.handleNoticeYear()
}
}
},
deep:true
@ -596,8 +598,8 @@ export default {
this.endData = new Date()
this.thisDay = getThisDay(date.getDay())
this.thisMonth = this.$util.getThisTimeMonth(this.lastDay)
//
uni.setStorageSync('lastDay',this.lastDay)
//
uni.setStorageSync('lastDay',this.lastDay)
//
let userInfo = uni.getStorageSync('vuex')
userInfo = JSON.parse(userInfo)
@ -609,7 +611,9 @@ export default {
url:`/pages/commercialBI/noData?type=noAuthor`
})
}
console.log('onLoad',this.isReturn)
if (!this.isReturn){
console.log('onLoad2',this.isReturn)
let userInfo = uni.getStorageSync('vuex')
userInfo = JSON.parse(userInfo)
//
@ -1241,12 +1245,11 @@ export default {
<style scoped lang="scss">
$iphoneHeight: env(safe-area-inset-bottom);
.main {
height: 100vh;
width: 100%;
padding-bottom: calc( env(safe-area-inset-bottom));
box-sizing: border-box;
padding-bottom: calc( 45px + env(safe-area-inset-bottom));
.header {
width: 100%;
height: 512px;
box-sizing: border-box;
padding: 0 16px;
position: relative;
@ -1531,21 +1534,23 @@ $iphoneHeight: env(safe-area-inset-bottom);
}
}
}
}
.more{
width: 100%;
display: flex;
justify-content: center;
position: relative;
padding-bottom: 12px;
.img{
width: 16px;
height: 16px;
}
.rate{
transform: rotate(180deg)!important;
.more{
width: calc(100% - 32px);
display: flex;
justify-content: center;
position: absolute;
bottom: 12px;
padding-bottom: 12px;
.img{
width: 16px;
height: 16px;
}
.rate{
transform: rotate(180deg)!important;
}
}
}
.menu {
width: 100vw;
position: relative;

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>图标/更多备份@2x</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="考评考核0515" transform="translate(-352.000000, -2623.000000)" fill="#A69E9F" fill-rule="nonzero">
<g id="close-circle-fill" transform="translate(352.000000, 2623.000000)">
<path d="M10,20 C4.47715,20 0,15.5228 0,10 C0,4.47715 4.47715,0 10,0 C15.5228,0 20,4.47715 20,10 C20,15.5228 15.5228,20 10,20 Z M10,8.5858 L7.17157,5.75736 L5.75736,7.17157 L8.5858,10 L5.75736,12.8284 L7.17157,14.2426 L10,11.4142 L12.8284,14.2426 L14.2426,12.8284 L11.4142,10 L14.2426,7.17157 L12.8284,5.75736 L10,8.5858 Z" id="形状"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 920 B

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="40px" height="40px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>图标/更多@2x</title>
<defs>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#A874FD" offset="0%"></stop>
<stop stop-color="#D3BEF6" offset="56.5829048%"></stop>
<stop stop-color="#EDCFFF" offset="100%"></stop>
</linearGradient>
<path d="M9,21 C15,16.3137085 18,12.3137085 18,9 C18,4.02943725 13.9705627,0 9,0 C4.02943725,0 0,4.02943725 0,9 C0,12.3137085 3,16.3137085 9,21 Z" id="path-2"></path>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-4">
<stop stop-color="#9558FB" offset="0%"></stop>
<stop stop-color="#9759FC" offset="100%"></stop>
</linearGradient>
<filter x="-50.0%" y="-42.9%" width="200.0%" height="185.7%" filterUnits="objectBoundingBox" id="filter-5">
<feGaussianBlur stdDeviation="3" in="SourceGraphic"></feGaussianBlur>
</filter>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-6">
<stop stop-color="#BB92FF" offset="0%"></stop>
<stop stop-color="#9C62FC" offset="100%"></stop>
</linearGradient>
<linearGradient x1="50%" y1="0.595498252%" x2="50%" y2="100%" id="linearGradient-7">
<stop stop-color="#E9CCFF" offset="0%"></stop>
<stop stop-color="#B489FA" offset="100%"></stop>
</linearGradient>
<circle id="path-8" cx="9" cy="8" r="3"></circle>
<filter x="-116.7%" y="-83.3%" width="333.3%" height="333.3%" filterUnits="objectBoundingBox" id="filter-9">
<feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0.517647059 0 0 0 0 0.254901961 0 0 0 0 0.952941176 0 0 0 1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="考评考核0515" transform="translate(-540.000000, -2623.000000)">
<g id="图标/更多备份" transform="translate(540.000000, 2623.000000)">
<circle id="椭圆形" stroke="#FFFFFF" stroke-width="2" fill="url(#linearGradient-1)" cx="20" cy="20" r="19"></circle>
<g id="编组" transform="translate(11.000000, 10.000000)">
<g id="椭圆形备份-9">
<mask id="mask-3" fill="white">
<use xlink:href="#path-2"></use>
</mask>
<use id="蒙版" fill="#BE97FF" xlink:href="#path-2"></use>
<path d="M5,21 C11,16.3137085 14,12.3137085 14,9 C14,4.02943725 9.97056275,0 5,0 C0.0294372518,0 -4,4.02943725 -4,9 C-4,12.3137085 -1,16.3137085 5,21 Z" fill="url(#linearGradient-4)" filter="url(#filter-5)" mask="url(#mask-3)"></path>
</g>
<path d="M9,21 C15,16.3137085 18,12.3137085 18,9 C18,4.02943725 13.9705627,0 9,0 C4.02943725,0 0,4.02943725 0,9 C0,12.3137085 3,16.3137085 9,21 Z" id="椭圆形备份-10" fill="url(#linearGradient-6)" opacity="0.400000006"></path>
<g id="椭圆形">
<use fill="black" fill-opacity="1" filter="url(#filter-9)" xlink:href="#path-8"></use>
<use fill="url(#linearGradient-7)" fill-rule="evenodd" xlink:href="#path-8"></use>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="343px" height="168px" viewBox="0 0 343 168" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>蒙版@2x</title>
<defs>
<linearGradient x1="100%" y1="61.4145423%" x2="0%" y2="38.6163006%" id="linearGradient-1">
<stop stop-color="#FFF1F8" offset="0%"></stop>
<stop stop-color="#F2F2FF" offset="31.8603111%"></stop>
<stop stop-color="#FCFAFF" offset="53.7641017%"></stop>
<stop stop-color="#FCF6FF" offset="70.0721697%"></stop>
<stop stop-color="#F2EAFF" offset="100%"></stop>
</linearGradient>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="考评考核0515" transform="translate(-615.000000, -2703.000000)" fill="url(#linearGradient-1)">
<g id="蒙版" transform="translate(615.000000, 2703.000000)">
<rect x="0" y="0" width="343" height="168"></rect>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,9 @@
@font-face {
font-family: 'Alimama ShuHeiTi';
src: url("/static/public/font/AlimamaShuHeiTi-Bold.woff2") format('woff2'),
url('/static/public/font/AlimamaShuHeiTi-Bold.woff') format('woff');
font-weight: bold;
font-style: normal;
font-display: swap;
}

View File

@ -0,0 +1,9 @@
@font-face {
font-family: 'Alimama ShuHeiTi';
src: url("https://eshangtech.com/ShopICO/ahyd-BID/style/woff2.txt") format('woff2'),
url('https://eshangtech.com/ShopICO/ahyd-BID/style/woff.txt') format('woff');
font-weight: bold;
font-style: normal;
font-display: swap;
}