This commit is contained in:
cclu 2023-05-18 19:15:42 +08:00
parent 6a8d324702
commit 51a9802407
10 changed files with 962 additions and 334 deletions

View File

@ -287,6 +287,78 @@ function playVideo(opt) {
return new EZUIPlayer(opt) return new EZUIPlayer(opt)
} }
// 输入年份和月份 输出该月的天数 是一个数组 格式为 *月**日
function getThisMonthDateList(value){
let date = new Date(value)
let y = date.getFullYear()
let m = date.getMonth() + 1
let howDay;
let flag = false
if( y%4 ===0 && y%100!==0 || y%400===0 ){
flag = true
}
switch (m){
case 1: case 3: case 5: case 7: case 8: case 10: case 12:
howDay=31
break
case 4: case 6: case 9: case 11:
howDay=30
break
case 2 :
if(flag){
howDay=29
}else{
howDay = 28
}
break
}
let list = []
for (let i = 0;i <= howDay,++i;) {
if (i>howDay){
break
}else{
list.push({label:`${m}${i}`,value:`${y}-${m}-${i}`})
}
}
return list
}
// 传入 老的时间和要变成的时间 老时间要日期 新时间不用 月份为1无效
function handleReduceAMonth(nowTime,newTime){
const oldDate = new Date(nowTime)
let y = oldDate.getFullYear()
let m = oldDate.getMonth() + 1
let d = oldDate.getDate()
const newDate = new Date(newTime)
let newY = newDate.getFullYear()
let newM = newDate.getMonth() + 1
let howDay = this.getThisMonthDay(`${y}-${m}`)
let newHowDay = this.getThisMonthDay(`${newY}-${newM}`)
if (d === howDay){
console.log('111',`${y}-${newM}-${newHowDay}`)
return `${newY}-${newM}-${newHowDay}`
}else{
if (newM===2){
if (d>newHowDay){
console.log('222',`${newY}-${newM}-${newHowDay}`)
return `${newY}-${newM}-${newHowDay}`
}else{
console.log('222',`${newY}-${newM}-${d}`)
return `${newY}-${newM}-${d}`
}
}else{
console.log('333',`${y}-${newM}-${d}`)
return `${newY}-${newM}-${d}`
}
}
}
export default { export default {
netChange, netChange,
cutDate, cutDate,
@ -302,5 +374,7 @@ export default {
getFieldEnumByField, // 获取枚举参数 getFieldEnumByField, // 获取枚举参数
// calculateDistance, // calculateDistance,
// bMapToQQMap, // bMapToQQMap,
playVideo playVideo,
getThisMonthDateList,
handleReduceAMonth
} }

View File

@ -1,127 +1,127 @@
<template> <!--<template>-->
<view class="main"> <!-- <view class="main">-->
<view class="heard"> <!-- <view class="heard">-->
<image class="headerBg" src="/static/images/plan/blueBack.png"></image> <!-- <image class="headerBg" src="/static/images/plan/blueBack.png"></image>-->
<view class="content"> <!-- <view class="content">-->
<view class="block"></view> <!-- <view class="block"></view>-->
<p class="title">年度经营计划</p> <!-- <p class="title">年度经营计划</p>-->
<view class="monthTabs"> <!-- <view class="monthTabs">-->
<scroll-view class="big" :show-scrollbar="false" scroll-with-animation scroll-x="true" enable-flex :scrollIntoView="current" @scroll="handleScroll"> <!-- <scroll-view class="big" :show-scrollbar="false" scroll-with-animation scroll-x="true" enable-flex :scrollIntoView="current" @scroll="handleScroll">-->
<div :id="'item'+item.value" :class="selectMonth===item.value?'monthItem selectItem':'monthItem'" v-for="(item,index) in monthList" >{{item.label}}</div> <!-- <div :id="'item'+item.value" :class="selectMonth===item.value?'monthItem selectItem':'monthItem'" v-for="(item,index) in monthList" >{{item.label}}</div>-->
</scroll-view> <!-- </scroll-view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
</template> <!--</template>-->
<script> <!--<script>-->
export default{ <!--export default{-->
name: "yearPlan", <!-- name: "yearPlan",-->
data(){ <!-- data(){-->
return { <!-- 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}, <!-- 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}], <!-- {label:'8月',value:8},{label:'9月',value:9},{label:'10月',value:10},{label:'11月',value:11},{label:'12月',value:12}],-->
selectMonth:0, <!-- selectMonth:0,-->
current:'' <!-- current:''-->
} <!-- }-->
}, <!-- },-->
onLoad(){ <!-- onLoad(){-->
}, <!-- },-->
onReady(){ <!-- onReady(){-->
var _this = this; <!-- var _this = this;-->
_this.getThisMonth() <!-- _this.getThisMonth()-->
}, <!-- },-->
methods:{ <!-- methods:{-->
getThisMonth(){ <!-- getThisMonth(){-->
const date = new Date() <!-- const date = new Date()-->
const month = date.getMonth() + 1 <!-- const month = date.getMonth() + 1-->
this.selectMonth = month <!-- this.selectMonth = month-->
this.current='item'+month <!-- this.current='item'+month-->
console.log('this.current',this.current) <!-- console.log('this.current',this.current)-->
}, <!-- },-->
handleScroll(e){ <!-- handleScroll(e){-->
console.log('e',e) <!-- console.log('e',e)-->
} <!-- }-->
} <!-- }-->
} <!--}-->
</script> <!--</script>-->
<style scoped lang="scss"> <!--<style scoped lang="scss">-->
@import '/static/public/stylesheet.css'; <!--@import '/static/public/stylesheet.css';-->
.main{ <!--.main{-->
width: 100%; <!-- width: 100%;-->
.heard{ <!-- .heard{-->
width: 100%; <!-- width: 100%;-->
height: 366px; <!-- height: 366px;-->
position: relative; <!-- position: relative;-->
.content{ <!-- .content{-->
width: 100%; <!-- width: 100%;-->
height: 100%; <!-- height: 100%;-->
position: absolute; <!-- position: absolute;-->
box-sizing: border-box; <!-- box-sizing: border-box;-->
padding: 0 16px; <!-- padding: 0 16px;-->
top: 0;left: 0; <!-- top: 0;left: 0;-->
z-index: 2; <!-- z-index: 2;-->
.block{ <!-- .block{-->
width: 100%; <!-- width: 100%;-->
height: 83px; <!-- height: 83px;-->
} <!-- }-->
.title{ <!-- .title{-->
font-size: 28px; <!-- font-size: 28px;-->
font-family: "Alimama ShuHeiTi"; <!-- font-family: "Alimama ShuHeiTi";-->
color: #160002; <!-- color: #160002;-->
line-height: 39px; <!-- line-height: 39px;-->
font-weight: 600; <!-- font-weight: 600;-->
text-shadow: 0 4px 8px rgba(2,32,202,0.2); <!-- text-shadow: 0 4px 8px rgba(2,32,202,0.2);-->
background: linear-gradient(180deg, #FEFFFE 0%, #B0BBFF 100%); <!-- background: linear-gradient(180deg, #FEFFFE 0%, #B0BBFF 100%);-->
-webkit-background-clip: text; <!-- -webkit-background-clip: text;-->
-webkit-text-fill-color: transparent; <!-- -webkit-text-fill-color: transparent;-->
margin: 14px 8px; <!-- margin: 14px 8px;-->
} <!-- }-->
.monthTabs{ <!-- .monthTabs{-->
width: 100%; <!-- width: 100%;-->
height: 32px; <!-- height: 32px;-->
border-radius: 17px; <!-- border-radius: 17px;-->
box-sizing: border-box; <!-- box-sizing: border-box;-->
border: 1px solid #798DFF; <!-- border: 1px solid #798DFF;-->
background: linear-gradient(180deg, #4863FF 0%, #768DFF 100%); <!-- background: linear-gradient(180deg, #4863FF 0%, #768DFF 100%);-->
overflow: hidden; <!-- overflow: hidden;-->
padding: 4px 0; <!-- padding: 4px 0;-->
.big{ <!-- .big{-->
text-align: center; <!-- text-align: center;-->
white-space: nowrap; <!-- white-space: nowrap;-->
.monthItem{ <!-- .monthItem{-->
display: inline-block; <!-- display: inline-block;-->
width: 55px; <!-- width: 55px;-->
height: 24px; <!-- height: 24px;-->
font-size: 14px; <!-- font-size: 14px;-->
font-family: PingFangSC-Semibold, PingFang SC; <!-- font-family: PingFangSC-Semibold, PingFang SC;-->
font-weight: 600; <!-- font-weight: 600;-->
color: #B8C2FF; <!-- color: #B8C2FF;-->
line-height: 20px; <!-- line-height: 20px;-->
margin-right: 4px; <!-- margin-right: 4px;-->
text-align: center; <!-- text-align: center;-->
border-radius: 12px; <!-- border-radius: 12px;-->
} <!-- }-->
.selectItem{ <!-- .selectItem{-->
background: #fff; <!-- background: #fff;-->
} <!-- }-->
.monthItem:first-child{ <!-- .monthItem:first-child{-->
margin-left: 4px; <!-- margin-left: 4px;-->
} <!-- }-->
} <!-- }-->
} <!-- }-->
} <!-- }-->
.headerBg{ <!-- .headerBg{-->
position: absolute; <!-- position: absolute;-->
top: 0; <!-- top: 0;-->
left: 0; <!-- left: 0;-->
width: 100%; <!-- width: 100%;-->
height: 100%; <!-- height: 100%;-->
z-index: 1; <!-- z-index: 1;-->
} <!-- }-->
} <!-- }-->
} <!--}-->
</style> <!--</style>-->

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>图标/更多备份_4@2x</title>
<defs>
<linearGradient x1="50%" y1="3.05745013e-15%" x2="50%" y2="99.8934659%" id="linearGradient-1">
<stop stop-color="#AF8CFF" offset="0%"></stop>
<stop stop-color="#7242DE" offset="100%"></stop>
</linearGradient>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="考评考核0515" transform="translate(-460.000000, -2623.000000)">
<g id="编组" transform="translate(460.000000, 2623.000000)">
<rect id="矩形" fill="url(#linearGradient-1)" opacity="0.200000003" x="0" y="0" width="24" height="24" rx="3"></rect>
<g id="compass-3-fill" opacity="0.800000012" transform="translate(12.000000, 12.000000) rotate(-45.000000) translate(-12.000000, -12.000000) translate(4.000000, 4.000000)" fill="#8441F3" fill-rule="nonzero">
<path d="M8,16 C3.58172,16 0,12.41824 0,8 C0,3.58172 3.58172,0 8,0 C12.41824,0 16,3.58172 16,8 C16,12.41824 12.41824,16 8,16 Z M11.6,4.4 L6.4,6.4 L4.4,11.6 L9.6,9.6 L11.6,4.4 Z M8,8.8 C7.55816,8.8 7.2,8.44184 7.2,8 C7.2,7.55816 7.55816,7.2 8,7.2 C8.44184,7.2 8.8,7.55816 8.8,8 C8.8,8.44184 8.44184,8.8 8,8.8 Z" id="形状"></path>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

View File

@ -1,11 +0,0 @@
<?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>

Before

Width:  |  Height:  |  Size: 920 B

View File

@ -1,54 +0,0 @@
<?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>

Before

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -1,20 +0,0 @@
<?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>

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>图标/更多备份_8@2x</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="考评考核0515" transform="translate(-320.000000, -2623.000000)" fill="#A69E9F" fill-rule="nonzero">
<g id="图标/更多备份-8" transform="translate(312.000000, 2615.000000)">
<g id="形状结合" transform="translate(8.000000, 8.000000)">
<path d="M8,0 C12.418278,0 16,3.581722 16,8 C16,12.418278 12.418278,16 8,16 C3.581722,16 0,12.418278 0,8 C0,3.581722 3.581722,0 8,0 Z M8,1.25 C4.27207794,1.25 1.25,4.27207794 1.25,8 C1.25,11.7279221 4.27207794,14.75 8,14.75 C11.7279221,14.75 14.75,11.7279221 14.75,8 C14.75,4.27207794 11.7279221,1.25 8,1.25 Z M7.5,4 L8.75,4 L8.75,7.5 L12,7.5 L12,8.75 L7.5,8.75 L7.5,4 Z"></path>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>图标/更多备份_7@2x</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="考评考核0515" transform="translate(-288.000000, -2623.000000)" fill="#A69E9F" fill-rule="nonzero">
<g id="图标/更多备份-7" transform="translate(280.000000, 2607.000000)">
<g id="形状结合" transform="translate(8.000000, 16.000000)">
<path d="M8,0 C12.418278,0 16,3.581722 16,8 C16,12.418278 12.418278,16 8,16 C3.581722,16 0,12.418278 0,8 C0,3.581722 3.581722,0 8,0 Z M8,11.25 C6.28403874,11.25 4.74363766,12.0016625 3.6900947,13.1936897 C4.85915962,14.1661233 6.36139396,14.75 8,14.75 C9.63860604,14.75 11.1408404,14.1661233 12.3100025,13.1950706 C11.256618,12.0017873 9.71610365,11.25 8,11.25 Z M8,1.25 C4.27207794,1.25 1.25,4.27207794 1.25,8 C1.25,9.63860604 1.83387666,11.1408404 2.80492943,12.3100025 C4.08560898,10.8909096 5.93876295,10 8,10 C10.0613311,10 11.9145601,10.8909908 13.1955736,12.3088591 C14.1661233,11.1408404 14.75,9.63860604 14.75,8 C14.75,4.27207794 11.7279221,1.25 8,1.25 Z M8,3 C9.65685425,3 11,4.34314575 11,6 C11,7.65685425 9.65685425,9 8,9 C6.34314575,9 5,7.65685425 5,6 C5,4.34314575 6.34314575,3 8,3 Z M8,4.25 C7.03350169,4.25 6.25,5.03350169 6.25,6 C6.25,6.96649831 7.03350169,7.75 8,7.75 C8.96649831,7.75 9.75,6.96649831 9.75,6 C9.75,5.03350169 8.96649831,4.25 8,4.25 Z"></path>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB