28 changed files with 2062 additions and 730 deletions
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 36 KiB |
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@ |
|||||
<view class="branch-van"> |
<view class="branch-van"> |
||||
<select-street bind:chooseStreetId="chooseStreetId" bind:chooseTimeId="chooseTimeId"></select-street> |
<select-street bind:chooseStreetId="chooseStreetId" bind:chooseTimeId="chooseTimeId"></select-street> |
||||
<tab-item typeList="{{typeList}}" bind:chooseType="chooseType"></tab-item> |
<!-- <tab-item typeList="{{typeList}}" bind:chooseType="chooseType"></tab-item> --> |
||||
<basic-situation wx:if="{{selectTab === 'basic-situation'}}" condition="{{condition}}" streetId="{{streetId}}" timeId="{{timeId}}"></basic-situation> |
<basic-situation wx:if="{{selectTab === 'basic-situation'}}" condition="{{condition}}" streetId="{{streetId}}" timeId="{{timeId}}"></basic-situation> |
||||
<enter-situation condition="{{condition}}" wx:elif="{{selectTab === 'enter-situation'}}"></enter-situation> |
<enter-situation condition="{{condition}}" wx:elif="{{selectTab === 'enter-situation'}}"></enter-situation> |
||||
<bring-into-play-situation condition="{{condition}}" wx:elif="{{selectTab === 'bring-into-play-situation'}}"></bring-into-play-situation> |
<bring-into-play-situation condition="{{condition}}" wx:elif="{{selectTab === 'bring-into-play-situation'}}"></bring-into-play-situation> |
||||
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,10 @@ |
|||||
|
{ |
||||
|
"navigationBarTitleText": "满意度", |
||||
|
"usingComponents": { |
||||
|
"people-list": "../components/list/list", |
||||
|
"ec-canvas": "../../../../../components/ec-canvas/ec-canvas", |
||||
|
"preload-item": "../components/preloadItem/preloadItem", |
||||
|
"load-more": "../../../../../components/loadMore/loadMore", |
||||
|
"no-data": "../components/peopleNodata/peopleNodata" |
||||
|
} |
||||
|
} |
@ -0,0 +1,265 @@ |
|||||
|
page { |
||||
|
width: 100%; |
||||
|
height: auto; |
||||
|
min-height: 100vh; |
||||
|
overflow-y: auto; |
||||
|
background-color: #f7f6fb |
||||
|
} |
||||
|
|
||||
|
.diff-plugg { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
background: #f7f6fb; |
||||
|
|
||||
|
.banner { |
||||
|
width: 100%; |
||||
|
height: 270rpx; |
||||
|
|
||||
|
image { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.tab-bar { |
||||
|
width: 100%; |
||||
|
height: 80rpx; |
||||
|
background: #fff; |
||||
|
display: flex; |
||||
|
justify-content: space-around; |
||||
|
position: relative; |
||||
|
|
||||
|
.tab { |
||||
|
flex: 1; |
||||
|
height: 80rpx; |
||||
|
line-height: 80rpx; |
||||
|
text-align:center; |
||||
|
width: 50%; |
||||
|
color: #999; |
||||
|
font-size: 30rpx; |
||||
|
} |
||||
|
|
||||
|
.select-tab { |
||||
|
color: #29B9A5; |
||||
|
font-size: 32rpx; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
|
||||
|
.select-bar { |
||||
|
width: 30rpx; |
||||
|
height: 10rpx; |
||||
|
border-radius: 5rpx; |
||||
|
background: #29B9A5; |
||||
|
position: absolute; |
||||
|
bottom: 0rpx; |
||||
|
} |
||||
|
.select-bar.tab1 { |
||||
|
left: calc(16% - 15rpx); |
||||
|
transition: left linear 0.4s; |
||||
|
} |
||||
|
.select-bar.tab2 { |
||||
|
left: calc(50% - 15rpx); |
||||
|
transition: left linear 0.4s; |
||||
|
} |
||||
|
.select-bar.tab3 { |
||||
|
left: calc(83% - 15rpx); |
||||
|
transition: left linear 0.4s; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.content { |
||||
|
width: 100%; |
||||
|
|
||||
|
.line{ |
||||
|
height: 1rpx; |
||||
|
background-color: #fff; |
||||
|
|
||||
|
.line-padding{ |
||||
|
margin: 0 20rpx; |
||||
|
height: 1rpx; |
||||
|
background-color: #eee; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.category-type { |
||||
|
width: 100%; |
||||
|
height: 140rpx; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
background-color: #FFFFFF; |
||||
|
justify-content: space-around; |
||||
|
|
||||
|
button { |
||||
|
width: 200rpx; |
||||
|
height: 55rpx; |
||||
|
border-radius: 28rpx; |
||||
|
border: 1rpx solid #29B9A5; |
||||
|
font-weight: 500; |
||||
|
background: #fff; |
||||
|
font-size: 28rpx; |
||||
|
color: #29B9A5; |
||||
|
padding: 0; |
||||
|
margin: 0; |
||||
|
line-height: 55rpx; |
||||
|
min-height: 55rpx !important; |
||||
|
box-sizing: content-box !important; |
||||
|
} |
||||
|
|
||||
|
.hover-btn { |
||||
|
background: #29B9A5; |
||||
|
color: #fff; |
||||
|
} |
||||
|
|
||||
|
.select-btn { |
||||
|
background: #29B9A5; |
||||
|
color: #fff; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.chart-main{ |
||||
|
width: 100%; |
||||
|
height: 400rpx; |
||||
|
background-color: #fff; |
||||
|
box-sizing: border-box; |
||||
|
|
||||
|
.chart-left{ |
||||
|
width: 328rpx; |
||||
|
height: 328rpx; |
||||
|
margin:35rpx 0 35rpx 75rpx; |
||||
|
float: left; |
||||
|
} |
||||
|
|
||||
|
.chart-right{ |
||||
|
height: 328rpx; |
||||
|
margin:35rpx 0 35rpx 30rpx; |
||||
|
float: left; |
||||
|
|
||||
|
.chart-right-one{ |
||||
|
height: 24rpx; |
||||
|
margin-top: 50rpx; |
||||
|
} |
||||
|
|
||||
|
.chart-right-two{ |
||||
|
height: 24rpx; |
||||
|
margin-top: 18rpx; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.list-name{ |
||||
|
margin-top: 20rpx; |
||||
|
height: 100rpx; |
||||
|
padding: 0 20rpx; |
||||
|
line-height: 100rpx; |
||||
|
font-size:32rpx; |
||||
|
font-weight:500; |
||||
|
color:rgba(102,102,102,1); |
||||
|
background-color: #fff; |
||||
|
border-bottom: 1rpx solid #eee; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.circular{ |
||||
|
width: 10rpx; |
||||
|
height: 10rpx; |
||||
|
margin-top: 6rpx; |
||||
|
border-radius: 50%; |
||||
|
background-color: #AD6DFE; |
||||
|
float: left; |
||||
|
} |
||||
|
.circular1{ |
||||
|
background-color: #FFA270; |
||||
|
} |
||||
|
.circular2{ |
||||
|
background-color: #29B9A5; |
||||
|
} |
||||
|
.circular3{ |
||||
|
background-color: #63CFED; |
||||
|
} |
||||
|
.circular4{ |
||||
|
background-color: #679CF7; |
||||
|
} |
||||
|
.circular5{ |
||||
|
background-color: #FFC600; |
||||
|
} |
||||
|
.name{ |
||||
|
height:24rpx; |
||||
|
width: 150rpx; |
||||
|
font-size:20rpx; |
||||
|
margin-left: 5rpx; |
||||
|
line-height: 24rpx; |
||||
|
font-weight:500; |
||||
|
color:rgba(153,153,153,1); |
||||
|
float: left; |
||||
|
} |
||||
|
.number{ |
||||
|
height:24rpx; |
||||
|
font-size:24rpx; |
||||
|
margin-left: 20rpx; |
||||
|
line-height: 24rpx; |
||||
|
font-weight:bold; |
||||
|
color:rgba(102,102,102,1); |
||||
|
float: left; |
||||
|
} |
||||
|
.percentage{ |
||||
|
height:24rpx; |
||||
|
font-size:24rpx; |
||||
|
margin-left: 20rpx; |
||||
|
line-height: 24rpx; |
||||
|
font-weight:bold; |
||||
|
|
||||
|
float: left; |
||||
|
} |
||||
|
.color{ |
||||
|
color:#AD6DFE; |
||||
|
} |
||||
|
.color1{ |
||||
|
color:#FFA270; |
||||
|
} |
||||
|
|
||||
|
.color2{ |
||||
|
color:#29B9A5; |
||||
|
} |
||||
|
.color3{ |
||||
|
color:#63CFED; |
||||
|
} |
||||
|
.color4{ |
||||
|
color:#679CF7; |
||||
|
} |
||||
|
.color5{ |
||||
|
color:#FFC600; |
||||
|
} |
||||
|
.bottom-all{ |
||||
|
width: 100%; |
||||
|
margin-top: 34rpx; |
||||
|
padding: 0 20rpx 30rpx 20rpx; |
||||
|
height: auto; |
||||
|
box-sizing: border-box; |
||||
|
} |
||||
|
.bottom-all-name{ |
||||
|
width: 100%; |
||||
|
margin-top: 12rpx; |
||||
|
box-sizing: border-box; |
||||
|
} |
||||
|
.nameB{ |
||||
|
height:24rpx; |
||||
|
font-size:20rpx; |
||||
|
margin-left: 5rpx; |
||||
|
line-height: 24rpx; |
||||
|
font-weight:500; |
||||
|
color:rgba(153,153,153,1); |
||||
|
float: left; |
||||
|
} |
||||
|
.chart-main .chart-leftB{ |
||||
|
width: 328rpx; |
||||
|
height: 328rpx; |
||||
|
margin: 0 auto; |
||||
|
} |
||||
|
.heightA{ |
||||
|
height: 400rpx !important; |
||||
|
} |
||||
|
.heightB{ |
||||
|
height: auto !important; |
||||
|
} |
||||
|
.cle{clear: both} |
@ -0,0 +1,447 @@ |
|||||
|
// subpages/reality/pages/peopleSatisfied/peopleSatisfied.js
|
||||
|
// @ts-ignore
|
||||
|
import * as echarts from "../../../../../components/ec-canvas/echarts.js" |
||||
|
import { getEvaluateCountList } from "../../../../../api/reality" |
||||
|
function setOption (chart, chartData, color) { |
||||
|
var option = { |
||||
|
color: color, |
||||
|
series: [ |
||||
|
{ |
||||
|
type: "pie", |
||||
|
radius: ["70%", "95%"], |
||||
|
silent: true, |
||||
|
avoidLabelOverlap: false, |
||||
|
label: { |
||||
|
show: false |
||||
|
}, |
||||
|
labelLine: { |
||||
|
show: false, |
||||
|
normal: { |
||||
|
show: false |
||||
|
} |
||||
|
}, |
||||
|
itemStyle: { |
||||
|
borderColor: "#fff", |
||||
|
borderWidth: "2", |
||||
|
}, |
||||
|
data: chartData |
||||
|
} |
||||
|
] |
||||
|
}; |
||||
|
chart.setOption(option); |
||||
|
} |
||||
|
Page({ |
||||
|
|
||||
|
/** |
||||
|
* 页面的初始数据 |
||||
|
*/ |
||||
|
data: { |
||||
|
selectTab: "tab1", |
||||
|
type: "first", |
||||
|
allnum: 0,//总数
|
||||
|
pageSize:10, |
||||
|
pageIndex:1, |
||||
|
listLength:0, |
||||
|
evaluateCountList: [], |
||||
|
chartData: [], |
||||
|
loadVisible:true, |
||||
|
loadType: "more", |
||||
|
isShow:false, |
||||
|
preloadVisible: true, |
||||
|
color: [], |
||||
|
ec: {}, |
||||
|
isShowLoading:true,//true加载中,false加载完毕
|
||||
|
}, |
||||
|
/** |
||||
|
* 生命周期函数--监听页面加载 |
||||
|
*/ |
||||
|
onLoad: function () { |
||||
|
this.ecComponent = this.selectComponent("#mychart-dom-bar") |
||||
|
|
||||
|
this.getEvaluateCountList() |
||||
|
this.selectComponent("#peopleList").getList(this.data) |
||||
|
}, |
||||
|
/** |
||||
|
* 子页面传值 |
||||
|
*/ |
||||
|
onGetCode: function (e: { detail: { val: any } }) { |
||||
|
this.setData({ |
||||
|
listLength: e.detail.listLength |
||||
|
}) |
||||
|
}, |
||||
|
/** |
||||
|
* 页面上拉触底事件的处理函数 |
||||
|
*/ |
||||
|
onReachBottom: function () { |
||||
|
// 判断是否需要在加载数据
|
||||
|
if (this.data.listLength !== this.data.pageSize) { |
||||
|
this.setData({ |
||||
|
loadType: "none", |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
this.setData({ |
||||
|
loadType: "more", |
||||
|
}) |
||||
|
let obj = { |
||||
|
pageIndex: ++this.data.pageIndex, |
||||
|
pageSize: this.data.pageSize, |
||||
|
} |
||||
|
this.selectComponent("#peopleList").getList(this.data) |
||||
|
}, |
||||
|
// 获取数据
|
||||
|
getEvaluateCountList () { |
||||
|
this.setData({ |
||||
|
isShow: false, |
||||
|
isShowLoading:true |
||||
|
}) |
||||
|
let that = this |
||||
|
let evaluateType = "1"//评价类别:1.非常满意,2.基本满意,3.不满意
|
||||
|
if (that.data.selectTab == "tab1") { |
||||
|
evaluateType = "1" |
||||
|
} else if (that.data.selectTab == "tab2"){ |
||||
|
evaluateType = "2" |
||||
|
} else if (that.data.selectTab == "tab3"){ |
||||
|
evaluateType = "3" |
||||
|
} |
||||
|
let cotegoryType = "1"//分类类别:1.一级,2.二级,3.三级
|
||||
|
if (that.data.type == "first") {//一级
|
||||
|
cotegoryType = "1" |
||||
|
} else if (that.data.type == "second") {//二级
|
||||
|
cotegoryType = "2" |
||||
|
} else if (that.data.type == "third") {//三级
|
||||
|
cotegoryType = "3" |
||||
|
} |
||||
|
getEvaluateCountList(evaluateType, cotegoryType).then(function (res: { data: any }) { |
||||
|
that.setData.evaluateCountList = [] |
||||
|
that.setData.allnum = 0 |
||||
|
let datalength = res.data.length |
||||
|
|
||||
|
if (datalength == 0) { |
||||
|
that.setData({ |
||||
|
loadVisible: false, |
||||
|
preloadVisible:false, |
||||
|
isShow: true, |
||||
|
isShowLoading:false |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
for (var i = 0; i < res.data.length; i++) { |
||||
|
that.setData({ |
||||
|
allnum: that.data.allnum + res.data[i].count |
||||
|
}); |
||||
|
} |
||||
|
if (datalength == 1) { |
||||
|
if (res.data[0].count != 0) { |
||||
|
that.setData({ |
||||
|
evaluateCountList: res.data, |
||||
|
color: ["#AD6DFE"], |
||||
|
chartData: [ |
||||
|
{ |
||||
|
value: res.data[0].count / that.data.allnum, |
||||
|
name: "1" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
} else if (datalength == 2) { |
||||
|
if (res.data[1].count == 0) { |
||||
|
that.setData({ |
||||
|
evaluateCountList: res.data, |
||||
|
color: ["#AD6DFE"], |
||||
|
chartData: [ |
||||
|
{ |
||||
|
value: res.data[0].count / that.data.allnum, |
||||
|
name: "1" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
} else { |
||||
|
that.setData({ |
||||
|
evaluateCountList: res.data, |
||||
|
color: ["#AD6DFE", "#FFA270"], |
||||
|
chartData: [ |
||||
|
{ |
||||
|
value: res.data[0].count / that.data.allnum, |
||||
|
name: "1" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[1].count / that.data.allnum, |
||||
|
name: "2" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
} |
||||
|
} else if (datalength == 3) { |
||||
|
if (res.data[2].count == 0) { |
||||
|
that.setData({ |
||||
|
evaluateCountList: res.data, |
||||
|
color: ["#AD6DFE", "#FFA270"], |
||||
|
chartData: [ |
||||
|
{ |
||||
|
value: res.data[0].count / that.data.allnum, |
||||
|
name: "1" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[1].count / that.data.allnum, |
||||
|
name: "2" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
} else { |
||||
|
that.setData({ |
||||
|
evaluateCountList: res.data, |
||||
|
color: ["#AD6DFE", "#FFA270", "#29B9A5"], |
||||
|
chartData: [ |
||||
|
{ |
||||
|
value: res.data[0].count / that.data.allnum, |
||||
|
name: "1" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[1].count / that.data.allnum, |
||||
|
name: "2" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[2].count / that.data.allnum, |
||||
|
name: "3" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
} |
||||
|
} else if (datalength == 4) { |
||||
|
if (res.data[3].count == 0) { |
||||
|
that.setData({ |
||||
|
evaluateCountList: res.data, |
||||
|
color: ["#AD6DFE", "#FFA270", "#29B9A5"], |
||||
|
chartData: [ |
||||
|
{ |
||||
|
value: res.data[0].count / that.data.allnum, |
||||
|
name: "1" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[1].count / that.data.allnum, |
||||
|
name: "2" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[2].count / that.data.allnum, |
||||
|
name: "3" |
||||
|
}, |
||||
|
], |
||||
|
}); |
||||
|
} else { |
||||
|
that.setData({ |
||||
|
evaluateCountList: res.data, |
||||
|
color: ["#AD6DFE", "#FFA270", "#29B9A5", "#63CFED"], |
||||
|
chartData: [ |
||||
|
{ |
||||
|
value: res.data[0].count / that.data.allnum, |
||||
|
name: "1" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[1].count / that.data.allnum, |
||||
|
name: "2" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[2].count / that.data.allnum, |
||||
|
name: "3" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[3].count / that.data.allnum, |
||||
|
name: "4" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
} else if (datalength == 5) { |
||||
|
if (res.data[4].count == 0) { |
||||
|
that.setData({ |
||||
|
evaluateCountList: res.data, |
||||
|
color: ["#AD6DFE", "#FFA270", "#29B9A5", "#63CFED"], |
||||
|
chartData: [ |
||||
|
{ |
||||
|
value: res.data[0].count / that.data.allnum, |
||||
|
name: "1" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[1].count / that.data.allnum, |
||||
|
name: "2" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[2].count / that.data.allnum, |
||||
|
name: "3" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[3].count / that.data.allnum, |
||||
|
name: "4" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
} else { |
||||
|
that.setData({ |
||||
|
evaluateCountList: res.data, |
||||
|
color: ["#AD6DFE", "#FFA270", "#29B9A5", "#63CFED", "#679CF7"], |
||||
|
chartData: [ |
||||
|
{ |
||||
|
value: res.data[0].count / that.data.allnum, |
||||
|
name: "1" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[1].count / that.data.allnum, |
||||
|
name: "2" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[2].count / that.data.allnum, |
||||
|
name: "3" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[3].count / that.data.allnum, |
||||
|
name: "4" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[4].count / that.data.allnum, |
||||
|
name: "5" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
} else if (datalength == 6) { |
||||
|
if (res.data[5].count == 0) { |
||||
|
that.setData({ |
||||
|
evaluateCountList: res.data, |
||||
|
color: ["#AD6DFE", "#FFA270", "#29B9A5", "#63CFED", "#679CF7"], |
||||
|
chartData: [ |
||||
|
{ |
||||
|
value: res.data[0].count / that.data.allnum, |
||||
|
name: "1" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[1].count / that.data.allnum, |
||||
|
name: "2" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[2].count / that.data.allnum, |
||||
|
name: "3" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[3].count / that.data.allnum, |
||||
|
name: "4" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[4].count / that.data.allnum, |
||||
|
name: "5" |
||||
|
}, |
||||
|
], |
||||
|
}); |
||||
|
} else { |
||||
|
that.setData({ |
||||
|
evaluateCountList: res.data, |
||||
|
color: ["#AD6DFE", "#FFA270", "#29B9A5", "#63CFED", "#679CF7", "#FFC600"], |
||||
|
chartData: [ |
||||
|
{ |
||||
|
value: res.data[0].count / that.data.allnum, |
||||
|
name: "1" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[1].count / that.data.allnum, |
||||
|
name: "2" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[2].count / that.data.allnum, |
||||
|
name: "3" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[3].count / that.data.allnum, |
||||
|
name: "4" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[4].count / that.data.allnum, |
||||
|
name: "5" |
||||
|
}, |
||||
|
{ |
||||
|
value: res.data[5].count / that.data.allnum, |
||||
|
name: "6" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
that.init() |
||||
|
}) |
||||
|
}, |
||||
|
init () { |
||||
|
this.setData({ |
||||
|
isShowLoading:true |
||||
|
}) |
||||
|
// @ts-ignore
|
||||
|
this.ecComponent.init((canvas: any, width: any, height: any) => { |
||||
|
const chart = echarts.init(canvas, null, { |
||||
|
width: width, |
||||
|
height: height |
||||
|
}) |
||||
|
setOption(chart, this.data.chartData, this.data.color) |
||||
|
return chart |
||||
|
}) |
||||
|
if (this.data.chartData.length > 0){ |
||||
|
let that = this |
||||
|
that.setData({ |
||||
|
preloadVisible: false, |
||||
|
isShowLoading:false |
||||
|
}) |
||||
|
} |
||||
|
this.setData({ |
||||
|
isShowLoading:false |
||||
|
}) |
||||
|
}, |
||||
|
// tab 切换
|
||||
|
onTabChange (e: AnyObject) { |
||||
|
if (this.data.isShowLoading) { |
||||
|
wx.showToast({ |
||||
|
title: "正在加载中请稍后切换", //提示的内容,
|
||||
|
icon: "none", //图标,
|
||||
|
duration: 2000, //延迟时间,
|
||||
|
mask: true, //显示透明蒙层,防止触摸穿透,
|
||||
|
}); |
||||
|
return |
||||
|
} |
||||
|
this.setData({ |
||||
|
chartData: [], |
||||
|
color: [], |
||||
|
selectTab: e.currentTarget.dataset.tab, |
||||
|
pageSize: 10, |
||||
|
pageIndex: 1, |
||||
|
loadType: "more", |
||||
|
isShow: false, |
||||
|
preloadVisible: true, |
||||
|
evaluateCountList:[] |
||||
|
}) |
||||
|
this.init() |
||||
|
this.getEvaluateCountList(); |
||||
|
this.selectComponent("#peopleList").getList(this.data) |
||||
|
}, |
||||
|
// 类目切换
|
||||
|
onButtonChange (e: AnyObject) { |
||||
|
if (this.data.isShowLoading) { |
||||
|
wx.showToast({ |
||||
|
title: "正在加载中请稍后切换", //提示的内容,
|
||||
|
icon: "none", //图标,
|
||||
|
duration: 2000, //延迟时间,
|
||||
|
mask: true, //显示透明蒙层,防止触摸穿透,
|
||||
|
}); |
||||
|
return |
||||
|
} |
||||
|
this.setData({ |
||||
|
chartData: [], |
||||
|
color: [], |
||||
|
type: e.currentTarget.dataset.type, |
||||
|
preloadVisible: true, |
||||
|
evaluateCountList:[] |
||||
|
}) |
||||
|
this.init() |
||||
|
this.getEvaluateCountList() |
||||
|
}, |
||||
|
}) |
@ -0,0 +1,91 @@ |
|||||
|
<view class="diff-plugg"> |
||||
|
<view class="banner"> |
||||
|
<image src="../../../images/mydsbackground.png" /> |
||||
|
</view> |
||||
|
|
||||
|
<!-- tabbar --> |
||||
|
<view class="tab-bar"> |
||||
|
<view |
||||
|
class="tab tab1 {{selectTab === 'tab1' ? 'select-tab' : ''}}" |
||||
|
data-tab="tab1" |
||||
|
bindtap="onTabChange">非常满意</view> |
||||
|
<view |
||||
|
class="tab tab2 {{selectTab === 'tab2' ? 'select-tab' : ''}}" |
||||
|
data-tab="tab2" |
||||
|
bindtap="onTabChange">基本满意</view> |
||||
|
<view |
||||
|
class="tab tab3 {{selectTab === 'tab3' ? 'select-tab' : ''}}" |
||||
|
data-tab="tab3" |
||||
|
bindtap="onTabChange">不满意</view> |
||||
|
<view class="select-bar {{selectTab === 'tab1' ? 'tab1' : selectTab === 'tab2' ? 'tab2' : 'tab3'}}"></view> |
||||
|
</view> |
||||
|
|
||||
|
<view class="content"> |
||||
|
<view class="line"> |
||||
|
<view class="line-padding"></view> |
||||
|
</view> |
||||
|
<view class="category-type"> |
||||
|
<button |
||||
|
hover-class="hover-btn" |
||||
|
class="{{type === 'first' ? 'select-btn' : ''}}" |
||||
|
bindtap="onButtonChange" |
||||
|
data-type="first">一级类目</button> |
||||
|
<button |
||||
|
hover-class="hover-btn" |
||||
|
class="{{type === 'second' ? 'select-btn' : ''}}" |
||||
|
bindtap="onButtonChange" |
||||
|
data-type="second">二级类目</button> |
||||
|
<button |
||||
|
hover-class="hover-btn" |
||||
|
class="{{type === 'third' ? 'select-btn' : ''}}" |
||||
|
bindtap="onButtonChange" |
||||
|
data-type="third">三级类目</button> |
||||
|
</view> |
||||
|
<preload-item |
||||
|
wx:if="{{preloadVisible}}"> |
||||
|
</preload-item> |
||||
|
<!-- 三级类目 --> |
||||
|
|
||||
|
<view class="chart-main" style="height: {{ type === 'third'? 'auto' : '400rpx' }}"> |
||||
|
<no-data isShow="{{isShow}}"></no-data> |
||||
|
<block wx:if='{{!isShow}}'></block> |
||||
|
<view class="{{type === 'third'?'chart-leftB':'chart-left'}}"> |
||||
|
<ec-canvas id="mychart-dom-bar" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas> |
||||
|
</view> |
||||
|
<block wx:if="{{type == 'third'}}"> |
||||
|
<view class="bottom-all"> |
||||
|
<view class="bottom-all-name" wx:for="{{evaluateCountList}}" wx:key="index" > |
||||
|
<view wx:if="{{index == 0}}" class="circular"></view> |
||||
|
<view wx:else class="circular {{index == 1?'circular1':index == 2?'circular2':index == 3?'circular3':index == 4?'circular4':index == 5?'circular5':''}}"></view> |
||||
|
<view class="nameB">{{item.cotegoryName}}</view> |
||||
|
<view class="number">{{item.count}}</view> |
||||
|
|
||||
|
<view class="" class="percentage {{index == 0?'color':index == 1?'color1':index == 2?'color2':index == 3?'color3':index == 4?'color4':index == 5?'color5':''}} ">{{item.percentum}}</view> |
||||
|
<view class="cle"></view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</block> |
||||
|
<block wx:else> |
||||
|
<view class="chart-right"> |
||||
|
<view wx:for="{{evaluateCountList}}" wx:key="index" class="{{index=='0'?'chart-right-one':'chart-right-two'}}"> |
||||
|
<view wx:if="{{index == 0}}" class="circular"></view> |
||||
|
<view wx:else class="circular {{index == 1?'circular1':index == 2?'circular2':index == 3?'circular3':index == 4?'circular4':index == 5?'circular5':''}}"></view> |
||||
|
<view class="name">{{item.cotegoryName}}</view> |
||||
|
<view class="number">{{item.count}}</view> |
||||
|
<view class="" class="percentage {{index == 0?'color':index == 1?'color1':index == 2?'color2':index == 3?'color3':index == 4?'color4':index == 5?'color5':''}} ">{{item.percentum}}</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</block> |
||||
|
</view> |
||||
|
|
||||
|
<view class="list-name"> |
||||
|
事件列表 |
||||
|
</view> |
||||
|
<people-list bind:myevent="onGetCode" id="peopleList" state="1"></people-list> |
||||
|
<load-more |
||||
|
loadVisible="{{loadVisible}}" |
||||
|
loadType="{{loadType}}"> |
||||
|
</load-more> |
||||
|
<no-data isShow="{{isShow}}"></no-data> |
||||
|
</view> |
||||
|
</view> |
Loading…
Reference in new issue