update
This commit is contained in:
parent
1c20c9b235
commit
79236a6ce1
BIN
ahyd_DIB.zip
BIN
ahyd_DIB.zip
Binary file not shown.
@ -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,7 +75,27 @@ 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)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -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)
|
||||
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)
|
||||
// 正常的有效时间实例
|
||||
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}`
|
||||
}
|
||||
}else{
|
||||
// 首页没有传入时间时 用最近的有效时间进行初始化 两个时间
|
||||
const date = new Date(this.lastDay)
|
||||
this.selectMonth = date.getMonth() + 1
|
||||
// 顶部时间显示的月份的
|
||||
this.single = timestampToTimeMonth((new Date(this.lastDay).getTime()))
|
||||
// 顶部时间显示到日期的
|
||||
this.singleDay = this.lastDay
|
||||
}
|
||||
|
||||
// 先拿到首页的时间 作为调用接口的统一时间 存的lastDay存当前月份的具体日期切换回本月的日期判断有用
|
||||
|
||||
// 顶部时间显示的月份的
|
||||
this.single = timestampToTimeMonth((new Date(this.lastDay).getTime()))
|
||||
// 顶部时间显示到日期的
|
||||
this.singleDay = this.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{
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user