This commit is contained in:
cclu 2023-08-17 10:31:12 +08:00
parent 1c20c9b235
commit 79236a6ce1
7 changed files with 108 additions and 70 deletions

Binary file not shown.

View File

@ -1,5 +1,6 @@
<template>
<view style="width: 56rpx;height: 56rpx">
<!-- <image v-if="preferPath" style="width: 56rpx;height: 56rpx" :src="preferPath"></image>-->
<canvas style="width: 56rpx;height: 56rpx" canvas-id="month" id="month"/>
</view>
</template>
@ -11,7 +12,9 @@ var uChartsInstance = {};
export default {
name: "YearCharts",
data() {
return {}
return {
preferPath:''
}
},
props: {
success: {
@ -72,6 +75,26 @@ export default {
}
}
});
setTimeout( ()=>{
// this.canvasToTempImage('month')
},2000)
},
canvasToTempImage(id){
uni.canvasToTempFilePath({
canvasId:id,
complete:(res)=>{
if (res.tempFilePath){
uni.getFileSystemManager().readFile({
filePath: res.tempFilePath,
encoding: 'base64',
success: res => {
let base64 = 'data:image/png;base64,' + res.data;
this.preferPath = base64
}
})
}
}
},this)
},
}
}

View File

@ -86,10 +86,10 @@
<text class="itemLabel">未整改<text class="itemValue">/</text></text>
</view>
<view class="otherItem">
<view class="otherLeft" v-show="rate">
<view class="otherLeft" v-show="!showPop">
<YearCharts :success="rate"/>
</view>
<view class="otherLeft" v-show="!rate"></view>
<view class="otherLeft" v-show="showPop"></view>
<view class="otherDetail">
<text class="itemValue">{{dailyExamineObj.CompleteRate?dailyExamineObj.CompleteRate + '%' :'-' }}</text>
<text class="itemLabel">达标率<text class="itemUnit">/全省</text></text>
@ -194,12 +194,12 @@
<view class="areaList">
<view class="popupDetail">
<view v-if="selectTab===1" >
<scroll-view v-if="showPop" class="detailLeft" :show-scrollbar="false" scroll-with-animation scroll-y="true" enable-flex :scroll-into-view="'item' + selectMenu">
<scroll-view class="detailLeft" :show-scrollbar="false" scroll-y="true" enable-flex :scroll-into-view="'item' + selectMenu">
<view :id="'item'+index" :class="index===selectMenu?'serviceSelect currentSelect':'serviceSelect'" v-for="(item,index) in serviceList" :key="index" @click="handleChangeMenu(index)">{{item.SERVERPART_NAME.split('服务区')[0]}}</view>
</scroll-view>
</view>
<view v-if="selectTab===2" >
<scroll-view v-if="showPop" class="detailLeft" :show-scrollbar="false" scroll-with-animation scroll-y="true" enable-flex :scroll-into-view="'item' + selectMenu">
<scroll-view class="detailLeft" :show-scrollbar="false" scroll-y="true" enable-flex :scroll-into-view="'item' + selectMenu">
<view :id="'item'+index" :class="index===selectMenu?'serviceSelect currentSelect':'serviceSelect'" v-for="(item,index) in dailyServiceList" :key="index" @click="handleChangeMenu(index)">{{item.SERVERPART_NAME.split('服务区')[0]}}</view>
</scroll-view>
</view>
@ -209,11 +209,22 @@
<view class="serviceDetailItem" v-for="(item,index) in currentObj.list" :key="index">
<view class="detailItemTop" >
<view class="fixedName">{{item.REGION_NAME}}</view>
<view class="store" v-if="selectTab===1">{{item.EXAMINE_SCORE}}<text class="unit"></text></view>
</view>
<view v-for="(subItem,subIndex) in item.SERVERPARTList" :key="index">
<view v-for="(subItem,subIndex) in item.SERVERPARTList" :key="index"
:style="{marginBottom:index===item.SERVERPARTList.length-1?'':'24rpx'}">
<view v-if="selectTab===1">
<view class="messageItem" style="align-items: flex-start;text-align: left">
<image class="itemIcon" style="margin-top: 4rpx" src="https://eshangtech.com/ShopICO/ahyd-BID/newExamine/userIcon.svg"/>
<text class="itemValue">{{subItem.EXAMINE_PERSON}}</text>
</view>
<view class="messageItem">
<image class="itemIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/newExamine/timeIcon.svg"/>
<text class="itemValue">{{subItem.EXAMINE_DATE}}</text>
</view>
<view class="detailItemMessage" v-for="(thirdItem,thirdIndex) in subItem.DetailList" :key="thirdIndex">
<view class="messageBox">
<view class="messageBoxTop">
@ -355,31 +366,39 @@ export default {
//
if (query.time){
this.queryTime = query.time
//
const date = new Date(this.queryTime)
let y = date.getFullYear()
this.selectMonth = date.getMonth() + 1
this.single = this.queryTime
console.log('this.single',this.single)
//
const realDate = new Date(this.lastDay)
//
if (this.selectMonth === realDate.getMonth() + 1){
let realDay = realDate.getDate()
this.singleDay = `${y}-${this.selectMonth<10?'0'+this.selectMonth:this.selectMonth}-${realDay}`
}else{
//
//
let day = this.$util.getThisMonthDay(`${y}-${this.selectMonth<10?'0'+this.selectMonth:this.selectMonth}`)
this.singleDay = `${y}-${this.selectMonth<10?'0'+this.selectMonth:this.selectMonth}-${day<10?'0'+day:day}`
console.log('this.singleDay',this.singleDay)
}
}else{
//
const date = new Date(this.lastDay)
this.selectMonth = date.getMonth() + 1
}
// lastDay
//
this.single = timestampToTimeMonth((new Date(this.lastDay).getTime()))
//
this.singleDay = this.lastDay
}
// lastDay
//
const start = new Date(this.lastDay)
this.startDate = `${start.getFullYear()}-01`
this.startDateDay = `${start.getFullYear()}-01-01`
//
this.endData = new Date()
this.endData = this.$util.cutDate(new Date(),'YYYY-MM-DD')
//
let userInfo = uni.getStorageSync('vuex')
userInfo = JSON.parse(userInfo)
@ -391,7 +410,7 @@ export default {
this.handleGetDailyPatrol()
//
this.handleGetExamine()
// onLoad
if (this.selectTab===1){
this.handleNewGetExamine()
}else if(this.selectTab===2){
@ -400,6 +419,8 @@ export default {
},
methods:{
handleSort(){
// reverse sequence
//
if (this.sortType==='sequence'){
this.sortType = 'reverse'
if (this.selectTab===1){
@ -416,12 +437,15 @@ export default {
}
}
},
//
handleDetail(item,index){
this.selectMenu = index
this.currentObj = item
this.showPop = true
this.$forceUpdate()
},
//
//
handleOpenPopup(item,index){
this.selectMenu = index
this.currentObj = item
@ -468,6 +492,7 @@ export default {
this.examineObj = obj
})
},
//
handleNewGetExamine(){
const time = this.$util.cutDate(this.single,'YYYYMM')
const req = {
@ -509,30 +534,13 @@ export default {
uni.hideLoading()
})
},
//
handleNewGetPatrol(){
// let obj = {
// start:null,
// end:null
// }
// const date = new Date(this.singleDay)
// let y = date.getFullYear()
// let m = date.getMonth() + 1
// if (this.selectMonth === m){
// obj.start = this.singleDay
// obj.end = this.singleDay
// }else{
// let day = this.$util.getThisMonthDay(`${y}-${m<10?'0'+m:m}`)
// obj.start = `${y}-${m<10?'0'+m:m}-01`
// obj.end = `${y}-${m<10?'0'+m:m}-${day}`
// }
const req = {
StartDate:this.singleDay,
EndDate:this.singleDay,
provinceCode:this.useInfo.userData.ProvinceCode || '340000'
}
request.$webGet('CommercialApi/Examine/GetPatrolResultList',req).then(data=>{
let list = JSON.parse(JSON.stringify(data.Result_Data.List))
let noList = []
@ -567,13 +575,17 @@ export default {
uni.hideLoading()
})
},
//
bindDateChange(e){
const date = new Date(e.detail.value)
//
this.selectContentTab = 1
//
this.selectMonth = date.getMonth() + 1
uni.showLoading({
title:'正在加载'
})
//
if (this.selectTab===1){
this.single = e.detail.value
this.handleGetExamine()
@ -584,9 +596,6 @@ export default {
this.handleNewGetPatrol()
}
},
handleChangeChild(subItem){
subItem.showChild = !subItem.showChild
},
//
handleAddDate(type){
this.selectContentTab = 1
@ -597,6 +606,7 @@ export default {
uni.showLoading({
title:'正在加载'
})
//
// 1 2
if (type===1){
if (this.selectTab===1){
@ -685,16 +695,6 @@ export default {
}
}
},
//
handleShowImgDetail(subItem){
if (subItem.PATROL_SITUATION){
this.showImg = true
}
},
changeDetail(subItem){
this.showImgUrl = subItem
this.$forceUpdate()
},
previewImage(event,index){
//
wx.previewImage({
@ -702,25 +702,19 @@ export default {
urls: event.currentTarget.dataset.src // http
})
},
//
previewShowImage(event,subItem){
let _this = this
wx.previewImage({
current: event.currentTarget.dataset.src, // http
urls: _this.showImgUrl.PATROLDEAL_URL?[_this.showImgUrl.PATROLDETAIL_URL,_this.showImgUrl.PATROLDEAL_URL]:[_this.showImgUrl.PATROLDETAIL_URL] // http
})
},
//
hidePopup(){
this.showPop = false
//
this.popupTabSelect = 0
},
//
handleChangeContentTab(value){
this.selectContentTab = value
this.sortType = 'sequence'
this.serviceList = this.serviceAllList[value - 1]
},
//
handleChangeMenu(value){
this.selectMenu = value
if (this.selectTab===1){
@ -729,6 +723,7 @@ export default {
this.currentObj = this.dailyServiceList[value]
}
},
//
handleChangeDailyTab(value){
this.sortType = 'sequence'
this.selectDaily = value
@ -741,7 +736,7 @@ export default {
if (value===2){
this.rate = null
setTimeout(()=>{
this.rate = this.dailyExamineObj.CompleteRate
this.rate = this.dailyExamineObj && this.dailyExamineObj.CompleteRate?this.dailyExamineObj.CompleteRate:0
},100)
this.handleNewGetPatrol()
}else if(value===1){
@ -749,6 +744,7 @@ export default {
}
},
//
//
handleBack(){
if (this.come==='index'){
uni.switchTab({
@ -761,10 +757,6 @@ export default {
}
},
hideShowImg(){
this.showImg = false
this.showImgUrl = {}
},
}
}
@ -1472,20 +1464,21 @@ export default {
.detailLeft{
width: 184rpx;
height: calc(85vh - 148rpx);
box-sizing: border-box;
.serviceSelect{
padding:24rpx 32rpx;
font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #160002;
line-height: 44rpx
line-height: 44rpx;
box-sizing: border-box;
position: relative;
}
.currentSelect{
font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
box-sizing: border-box;
font-weight: 500;
color: #EC6C00;
line-height: 44rpx;
position: relative;
}
.currentSelect:before{
@ -1498,6 +1491,28 @@ export default {
left: 0;top: 50%;
transform: translateY(-50%);
}
::-webkit-scrollbar {
width: 4px;
height: 4px;
color:transparent;
}
/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track {
border-radius: 10px;
background-color:transparent;
}
/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb {
border-radius: 10px;
background-color:transparent;
}
.notice{
font-size: 12px;
color: gray;
}
}
.serviceDetail{

View File

@ -173,7 +173,7 @@ export default {
</script>
<style scoped lang="scss">
@import '/static/public/font/stylesheet.css';
//@import '/static/public/font/stylesheet.css';
.main{
width: 100%;
min-height: 100vh;

View File

@ -174,7 +174,7 @@ export default {
</script>
<style scoped lang="scss">
@import '/static/public/font/stylesheet.css';
//@import '/static/public/font/stylesheet.css';
.main{
width: 100%;
min-height: 100vh;

View File

@ -670,7 +670,7 @@ export default {
}
</script>
<style scoped lang="scss">
@import '/static/public/font/stylesheet.css';
//@import '/static/public/font/stylesheet.css';
.main{
width: 100%;
min-height: 100vh;

View File

@ -245,7 +245,7 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
{
id:'30f0e7d0-4e01-4a63-a65b-613e1f427335',
name: '考评考核',
homeUrl: '/pages/examine/index',
homeUrl: '/pages/newamine/index',
imagePath: '/static/images/user/assessment.svg',
isNotice:false,
notice:0,