|
@@ -12,7 +12,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="box">
|
|
<view class="box">
|
|
- <view class="text">{{box_title}}</view>
|
|
|
|
|
|
+ <view class="text" v-if="box_title">{{box_title}}</view>
|
|
<view class="text">需下井次数: <text style="font-size: 40rpx; color: #F0AD4E;"> {{box_paln}} </text> 次
|
|
<view class="text">需下井次数: <text style="font-size: 40rpx; color: #F0AD4E;"> {{box_paln}} </text> 次
|
|
</view>
|
|
</view>
|
|
<view class="text">已下井次数: <text style="color: #3DA7FF;"> {{box_real}} </text> 次</view>
|
|
<view class="text">已下井次数: <text style="color: #3DA7FF;"> {{box_real}} </text> 次</view>
|
|
@@ -27,20 +27,22 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
<!-- 月份 -->
|
|
<!-- 月份 -->
|
|
<view class="month_list">
|
|
<view class="month_list">
|
|
<scroll-view scroll-x>
|
|
<scroll-view scroll-x>
|
|
<view class="list">
|
|
<view class="list">
|
|
- <view class="item" v-for="(item,index) in month_list" :key="index" @click="change_month(item,index)">
|
|
|
|
- <view class="name" :class="index==active?'active':''">{{item.year}}年{{item.month}}月{{item.times}}次</view>
|
|
|
|
|
|
+ <view class="item" v-for="(item,index) in month_list" :key="index"
|
|
|
|
+ @click="change_month(item,index)">
|
|
|
|
+ <view class="name" :class="index==active?'active':''">
|
|
|
|
+ {{item.year}}年{{item.month}}月{{item.times}}次</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
<!-- 下井记录 -->
|
|
<!-- 下井记录 -->
|
|
<view class="info_list">
|
|
<view class="info_list">
|
|
<view class="list">
|
|
<view class="list">
|
|
@@ -50,7 +52,8 @@
|
|
<view class="text text_3">上井时间</view>
|
|
<view class="text text_3">上井时间</view>
|
|
<view class="text text_4">下井时长</view>
|
|
<view class="text text_4">下井时长</view>
|
|
</view>
|
|
</view>
|
|
- <view class="item" v-for="(item,index) in info_list" :key="index" @click="go_people_track(item.date,item.downtime)">
|
|
|
|
|
|
+ <view class="item" v-for="(item,index) in info_list" :key="index"
|
|
|
|
+ @click="go_people_track(item.date,item.downtime)">
|
|
<view class="text text_1">
|
|
<view class="text text_1">
|
|
<view>{{item.date}}</view>
|
|
<view>{{item.date}}</view>
|
|
<view>{{item.week}}</view>
|
|
<view>{{item.week}}</view>
|
|
@@ -64,8 +67,8 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -76,7 +79,7 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- mine:"",
|
|
|
|
|
|
+ mine: "",
|
|
// 用户信息
|
|
// 用户信息
|
|
name: "",
|
|
name: "",
|
|
depart_name: "",
|
|
depart_name: "",
|
|
@@ -86,14 +89,15 @@
|
|
people_num: 0,
|
|
people_num: 0,
|
|
|
|
|
|
// 下井统计
|
|
// 下井统计
|
|
|
|
+ box_title: "",
|
|
box_paln: 0,
|
|
box_paln: 0,
|
|
box_real: 0,
|
|
box_real: 0,
|
|
|
|
|
|
|
|
|
|
month_list: [],
|
|
month_list: [],
|
|
- info_list:[],
|
|
|
|
|
|
+ info_list: [],
|
|
|
|
|
|
- active:0,
|
|
|
|
|
|
+ active: 0,
|
|
|
|
|
|
|
|
|
|
chartData: {
|
|
chartData: {
|
|
@@ -121,7 +125,18 @@
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
- // console.log(option)
|
|
|
|
|
|
+ console.log(option)
|
|
|
|
+
|
|
|
|
+ if (option.people_num == 'undefined' || option.people_num == 'null') {
|
|
|
|
+
|
|
|
|
+ uni.redirectTo({
|
|
|
|
+ url: "../../../workbench/downhole_statistics_user/downhole_statistics_user?depart_name=" +
|
|
|
|
+ option.depart_name + "&name=" + option.name + "&mine=" + option.mine
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
this.mine = option.mine
|
|
this.mine = option.mine
|
|
|
|
|
|
// 设置用户信息
|
|
// 设置用户信息
|
|
@@ -144,20 +159,22 @@
|
|
}
|
|
}
|
|
|
|
|
|
this.get_personnel_downwell_monthlist_once()
|
|
this.get_personnel_downwell_monthlist_once()
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
get_personnel_downwell_monthlist_once() {
|
|
get_personnel_downwell_monthlist_once() {
|
|
this.$p_api.personnel_downwell_monthlist_once({
|
|
this.$p_api.personnel_downwell_monthlist_once({
|
|
staff_num: this.people_num,
|
|
staff_num: this.people_num,
|
|
- mine:this.mine
|
|
|
|
|
|
+ mine: this.mine
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
console.log(res.data.data)
|
|
console.log(res.data.data)
|
|
this.month_list = res.data.data
|
|
this.month_list = res.data.data
|
|
|
|
|
|
- this.get_personnel_downwell_month_once(res.data.data[0].year, res.data.data[0].month, res.data.data[0].times)
|
|
|
|
- this.get_personnel_downwell_month_info(res.data.data[0].year, res.data.data[0].month, res.data.data[0].times)
|
|
|
|
|
|
+ this.get_personnel_downwell_month_once(res.data.data[0].year, res.data.data[0].month, res.data
|
|
|
|
+ .data[0].times)
|
|
|
|
+ this.get_personnel_downwell_month_info(res.data.data[0].year, res.data.data[0].month, res.data
|
|
|
|
+ .data[0].times)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 下井统计
|
|
// 下井统计
|
|
@@ -166,46 +183,48 @@
|
|
month: year + '-' + month,
|
|
month: year + '-' + month,
|
|
staff_num: this.people_num,
|
|
staff_num: this.people_num,
|
|
downtime: downtime,
|
|
downtime: downtime,
|
|
- mine:this.mine
|
|
|
|
|
|
+ mine: this.mine
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
console.log(res.data.data)
|
|
console.log(res.data.data)
|
|
this.box_paln = res.data.data.plan
|
|
this.box_paln = res.data.data.plan
|
|
this.box_real = res.data.data.real
|
|
this.box_real = res.data.data.real
|
|
this.box_title = res.data.data.date
|
|
this.box_title = res.data.data.date
|
|
-
|
|
|
|
- this.arcbar.subtitle.name = (((parseInt(this.box_real) / parseInt(this.box_paln)).toFixed(4))*100).toFixed(2) + '%'
|
|
|
|
|
|
+
|
|
|
|
+ this.arcbar.subtitle.name = (((parseInt(this.box_real) / parseInt(this.box_paln)).toFixed(4)) *
|
|
|
|
+ 100).toFixed(2) + '%'
|
|
console.log(parseInt(this.box_real) / parseInt(this.box_paln))
|
|
console.log(parseInt(this.box_real) / parseInt(this.box_paln))
|
|
this.chartData.series[0].data = (parseInt(this.box_real) / parseInt(this.box_paln)).toFixed(1)
|
|
this.chartData.series[0].data = (parseInt(this.box_real) / parseInt(this.box_paln)).toFixed(1)
|
|
console.log(this.chartData.series[0].data)
|
|
console.log(this.chartData.series[0].data)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
// 下井记录
|
|
// 下井记录
|
|
- get_personnel_downwell_month_info(year, month, downtime){
|
|
|
|
|
|
+ get_personnel_downwell_month_info(year, month, downtime) {
|
|
this.$p_api.personnel_downwell_month_info({
|
|
this.$p_api.personnel_downwell_month_info({
|
|
month: year + '-' + month,
|
|
month: year + '-' + month,
|
|
staff_num: this.people_num,
|
|
staff_num: this.people_num,
|
|
downtime: downtime,
|
|
downtime: downtime,
|
|
- mine:this.mine
|
|
|
|
|
|
+ mine: this.mine
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
console.log(res.data.data)
|
|
console.log(res.data.data)
|
|
this.info_list = res.data.data
|
|
this.info_list = res.data.data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
//切换月份
|
|
//切换月份
|
|
- change_month(item,index){
|
|
|
|
- console.log(item)
|
|
|
|
- this.active = index
|
|
|
|
- this.get_personnel_downwell_month_info(item.year, item.month, item.times)
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- // 下井轨迹
|
|
|
|
- go_people_track(date,time){
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url:"../people_track/people_track?people_num="+this.people_num+"&time="+date+time+"&mine="+this.mine
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ change_month(item, index) {
|
|
|
|
+ console.log(item)
|
|
|
|
+ this.active = index
|
|
|
|
+ this.get_personnel_downwell_month_info(item.year, item.month, item.times)
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 下井轨迹
|
|
|
|
+ go_people_track(date, time) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: "../people_track/people_track?people_num=" + this.people_num + "&time=" + date + time +
|
|
|
|
+ "&mine=" + this.mine
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -214,6 +233,7 @@
|
|
page {
|
|
page {
|
|
background-color: #f0f0f0;
|
|
background-color: #f0f0f0;
|
|
}
|
|
}
|
|
|
|
+
|
|
.section_info {
|
|
.section_info {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
@@ -270,9 +290,9 @@
|
|
.right {
|
|
.right {
|
|
margin-top: 120rpx;
|
|
margin-top: 120rpx;
|
|
width: 300rpx;
|
|
width: 300rpx;
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
/* 请根据需求修改图表容器尺寸,如果父容器没有高度图表则会显示异常 */
|
|
/* 请根据需求修改图表容器尺寸,如果父容器没有高度图表则会显示异常 */
|
|
.charts-box {
|
|
.charts-box {
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -280,16 +300,19 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
- .month_list{
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ .month_list {
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 20rpx;
|
|
padding: 20rpx;
|
|
- .list{
|
|
|
|
|
|
+
|
|
|
|
+ .list {
|
|
display: flex;
|
|
display: flex;
|
|
- .item{
|
|
|
|
|
|
+
|
|
|
|
+ .item {
|
|
margin-right: 20rpx;
|
|
margin-right: 20rpx;
|
|
- .name{
|
|
|
|
|
|
+
|
|
|
|
+ .name {
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 10rpx;
|
|
padding: 10rpx;
|
|
// background-color: #009FE8;
|
|
// background-color: #009FE8;
|
|
@@ -301,35 +324,39 @@
|
|
font-size: 32rpx;
|
|
font-size: 32rpx;
|
|
border-radius: 15rpx;
|
|
border-radius: 15rpx;
|
|
}
|
|
}
|
|
- .active{
|
|
|
|
|
|
+
|
|
|
|
+ .active {
|
|
background-color: #009FE8;
|
|
background-color: #009FE8;
|
|
color: #fff;
|
|
color: #fff;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- .info_list{
|
|
|
|
|
|
+
|
|
|
|
+ .info_list {
|
|
background-color: #FFFFFF;
|
|
background-color: #FFFFFF;
|
|
margin-bottom: 50rpx;
|
|
margin-bottom: 50rpx;
|
|
- .list{
|
|
|
|
|
|
+
|
|
|
|
+ .list {
|
|
font-size: 32rpx;
|
|
font-size: 32rpx;
|
|
- .item{
|
|
|
|
|
|
+
|
|
|
|
+ .item {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
border-bottom: 1rpx solid #f0f0f0;
|
|
border-bottom: 1rpx solid #f0f0f0;
|
|
-
|
|
|
|
- .text{
|
|
|
|
|
|
+
|
|
|
|
+ .text {
|
|
width: 187.5rpx;
|
|
width: 187.5rpx;
|
|
text-align: center;
|
|
text-align: center;
|
|
padding: 15rpx 0;
|
|
padding: 15rpx 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .item:first-child{
|
|
|
|
|
|
+
|
|
|
|
+ .item:first-child {
|
|
color: #009FE8;
|
|
color: #009FE8;
|
|
border-bottom: 1rpx solid #009FE8;
|
|
border-bottom: 1rpx solid #009FE8;
|
|
line-height: 80rpx;
|
|
line-height: 80rpx;
|