Browse Source

攻坚事件

v5.0
是小王呀\24601 7 months ago
parent
commit
f81e4cc7b9
  1. 2
      pages/statistics/modules/AttackEvent/AttackEvent.wxml
  2. 102
      pages/statistics/modules/HotlineRates/HotlineRates.js
  3. 36
      pages/statistics/modules/HotlineRates/HotlineRates.wxml
  4. 15
      pages/statistics/modules/HotlineRates/HotlineRates.wxss
  5. 5
      pages/statistics/statistics.js

2
pages/statistics/modules/AttackEvent/AttackEvent.wxml

@ -6,7 +6,7 @@
<view class="workOrde">工单号:{{item.icEventId}}</view> <view class="workOrde">工单号:{{item.icEventId}}</view>
</view> </view>
<view class="frequency_content"> <view class="frequency_content">
<view class="content_categoryAllName">{{item.categoryAllName}}</view> <view class="content_categoryAllName">{{item.categoryAllName?item.categoryAllName:""}}</view>
<view style="display: flex; flex-direction: row;"> <view style="display: flex; flex-direction: row;">
<view wx:if="{{item.solved=='未解决'}}" class="content_workOrde1">{{item.solved}}</view> <view wx:if="{{item.solved=='未解决'}}" class="content_workOrde1">{{item.solved}}</view>
<view wx:if="{{item.satisfactionName=='不满意'}}" class="content_workOrde1">、</view> <view wx:if="{{item.satisfactionName=='不满意'}}" class="content_workOrde1">、</view>

102
pages/statistics/modules/HotlineRates/HotlineRates.js

@ -6,7 +6,6 @@ const formatCurrentAndLastMonthDay = () => {
const year = today.getFullYear(); const year = today.getFullYear();
const month = today.getMonth() + 1; const month = today.getMonth() + 1;
const day = today.getDate(); const day = today.getDate();
// 上个月的日期 // 上个月的日期
const lastMonthDate = new Date(year, month - 1, day); const lastMonthDate = new Date(year, month - 1, day);
const lastYear = lastMonthDate.getFullYear(); const lastYear = lastMonthDate.getFullYear();
@ -23,25 +22,122 @@ Component({
type: String, type: String,
value: '1', value: '1',
observer: function () { observer: function () {
const { currentDay, lastMonthDay } = formatCurrentAndLastMonthDay();
console.log(currentDay, lastMonthDay, "sdflkjdslfkj");
this.setData({
day: lastMonthDay,
day2: currentDay
})
console.log(this.data.day, this.data.day2, "123");
this.getList(); this.getList();
} }
} }
}, },
data: { data: {
orderBy:"",
sortList:[
{
lable:"收件数",
value:1,
type:0 //0为正常排序, 1为正序,2为倒叙
},
{
lable:"不满意",
value:2,
type:0
},
{
lable:"未解决",
value:3,
type:0
},
{
lable:"退件次数",
value:4,
type:0
},
{
lable:"超期退件",
value:5,
type:0
},
],
list: [], list: [],
sortNameList: [
{
label:"total",
value:1
},
{
label:"notSatisfiedTotal",
value:2
},
{
label:"unresolveTotal",
value:3
},
{
label:"overTimeTotal",
value:4
},
{
label:"returnTotal",
value:5
},
],
day: '', day: '',
day2: '', day2: '',
showitem: 3, showitem: 3,
}, },
ready() { ready() {
const { currentDay, lastMonthDay } = formatCurrentAndLastMonthDay(); const { currentDay, lastMonthDay } = formatCurrentAndLastMonthDay();
console.log(currentDay,lastMonthDay,"sdflkjdslfkj");
this.setData({ this.setData({
day:lastMonthDay, day:lastMonthDay,
day2: currentDay day2: currentDay
}) })
console.log(this.data.day,this.data.day2,"123");
this.getList() this.getList()
}, },
methods: { methods: {
toSort(value){
let sortlist= value.currentTarget.dataset.sortlist
const evenNumbers= this.data.sortNameList.filter(item=>{
return item.value===sortlist.value
})[0].label
if (this.data.sortList[sortlist.value-1].type==1) {
this.data.sortList[sortlist.value-1].type=2
this.setData({
sortList:this.data.sortList,
orderBy:evenNumbers+"Down"
}
)
}else if (this.data.sortList[sortlist.value-1].type==2) {
let sortlist= value.currentTarget.dataset.sortlist
this.data.sortList[sortlist.value-1].type=1
this.setData({
sortList:this.data.sortList,
orderBy:evenNumbers+"Up"
}
)
}else{
this.data.sortList.map(item=>{
if (item.type==1||item.type==2) {
item.type=0
}
})
let sortlist= value.currentTarget.dataset.sortlist
this.data.sortList[sortlist.value-1].type=1
this.setData({
sortList:this.data.sortList,
orderBy:evenNumbers+"Up"
}
)
}
this.getEventList()
},
toNumber(data) { toNumber(data) {
let type=data.currentTarget.dataset.type let type=data.currentTarget.dataset.type
let staffId=data.currentTarget.dataset.staffid let staffId=data.currentTarget.dataset.staffid
@ -90,7 +186,9 @@ Component({
} }
}, },
getEventList(deptFlag) { getEventList(deptFlag) {
console.log(this.data.day,this.data.day2,"这里的值");
let parm = { let parm = {
orderBy: this.data.orderBy,
startDate: this.data.day.toString() + ' ' + '00:00:00', startDate: this.data.day.toString() + ' ' + '00:00:00',
endDate: this.data.day2.toString() + ' ' + '23:59:59', endDate: this.data.day2.toString() + ' ' + '23:59:59',
usableFlag: true, usableFlag: true,
@ -100,7 +198,7 @@ Component({
parm.recountFlag=1 parm.recountFlag=1
} }
event12345Rates(parm).then(res => { event12345Rates(parm).then(res => {
console.log('++++++++++++',res.data) console.log(res.data)
// res.data.list.forEach(item => { // res.data.list.forEach(item => {
// item.reportTime = this.formatTime(item.reportTime) // item.reportTime = this.formatTime(item.reportTime)
// }) // })

36
pages/statistics/modules/HotlineRates/HotlineRates.wxml

@ -1,34 +1,36 @@
<view class="container"> <view class="container">
<view class="screen"> <view class="screen">
<picker <picker mode="date" model:value="{{ day }}" fields="day" bind:change="onChange">
mode="date"
model:value="{{ day }}"
fields="day"
bind:change="onChange"
>
<view class="picker"> <view class="picker">
<text>{{ day }}</text> <text>{{ day }}</text>
<image src="../../../../images/statistics/down.png" mode="widthFix" /> <image src="../../../../images/statistics/down.png" mode="widthFix" />
</view> </view>
</picker> </picker>
<picker <picker mode="date" model:value="{{ day2 }}" fields="day" bind:change="onChange2">
mode="date"
model:value="{{ day2 }}"
fields="day"
bind:change="onChange2"
>
<view class="picker"> <view class="picker">
<text>{{ day2 }}</text> <text>{{ day2 }}</text>
<image src="../../../../images/statistics/down.png" mode="widthFix" /> <image src="../../../../images/statistics/down.png" mode="widthFix" />
</view> </view>
</picker> </picker>
<view class="btn" bindtap="onSearch"> <view class="btn" bindtap="onSearch">
查询 查询
</view> </view>
</view> </view>
<view class="sort" >
<view wx:for="{{sortList}}" class="sort_header" bind:tap="toSort" data-SortList="{{item}}">
<view data-type="Receiving">
<view style="color:#666 ;font-size: 26rpx;">{{item.lable}}</view>
</view>
<div class="sort_image" >
<image wx:if="{{item.type==1}}" style="width: 16rpx; height: 16rpx;" src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/dev/20250110/4d67c378231b40dead3df7fb544897cc.png"></image>
<image wx:if="{{item.type==2}}" style="width: 15rpx; height: 15rpx;" src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/dev/20250110/f2a094e24dbe496d90e56a5d891515bc.png"></image>
<image wx:if="{{item.type==0}}" style="width: 16rpx; height: 16rpx;" src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/dev/20250110/a674d56b1847477abd5a11b9cc4e4482.png"></image>
<image wx:if="{{item.type==0}}" style="width: 15rpx; height: 15rpx;" src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/dev/20250110/cfa447095aba4d26aa3655d1e81e00a1.png"></image>
</div>
</view>
</view>
<view class="stay-list" wx:if="{{list.length}}"> <view class="stay-list" wx:if="{{list.length}}">
<view class="hotline-rate" wx:for="{{list}}" wx:for-index="idx" wx-if="{{idx<showitem}}" wx:if="{{item.operateName}}"> <view class="hotline-rate" wx:for="{{list}}" wx:for-index="idx" wx-if="{{idx<showitem}}" wx:if="{{item.operateName}}">
<view class="name"> <view class="name">
@ -56,11 +58,11 @@
bind:tap="toNumber" data-staffId="{{item.operateOrgLeader}}" data-type="returnTotal" bind:tap="toNumber" data-staffId="{{item.operateOrgLeader}}" data-type="returnTotal"
> >
<view class="lab" style="color: #FF9900!important;">退件次数</view> <view class="lab" style="color: #FF9900!important;">退件次数</view>
<view class="val">{{item.returnTotal?item.returnTotal:0}}</view> <view class="val">{{item.returnTotal?item.overTimeTotal:0}}</view>
</view> </view>
<view class="child" style="color: red !important;" bind:tap="toNumber" data-staffId="{{item.operateOrgLeader}}" data-type="overTime"> <view class="child" style="color: red !important;" bind:tap="toNumber" data-staffId="{{item.operateOrgLeader}}" data-type="overTime">
<view class="lab" style="color: red !important;">超期退件</view> <view class="lab" style="color: red !important;">超期退件</view>
<view class="val">{{item.overTimeTotal}}</view> <view class="val">{{item.returnTotal}}</view>
</view> </view>
</view> </view>
<view class="num"> <view class="num">

15
pages/statistics/modules/HotlineRates/HotlineRates.wxss

@ -118,3 +118,18 @@
line-height:40px; line-height:40px;
color:blue; color:blue;
} }
.sort{
display: flex;
justify-content: space-between;
align-content: space-around;
margin-bottom: 20rpx
}
.sort_header{
display: flex;
align-items: center;
}
.sort_image {
display: flex;
flex-direction: column;
margin-left: 10rpx;
}

5
pages/statistics/statistics.js

@ -19,7 +19,7 @@ Page({
}], }],
monthIndex: 0, monthIndex: 0,
stayVal: '1', stayVal: '1',
curVal: '1', curVal: '2',
tabValue: '' tabValue: ''
}, },
onLoad(options) { onLoad(options) {
@ -58,9 +58,8 @@ Page({
}, },
gotoAttack(){ gotoAttack(){
let worktoken=wx.getStorageSync('token') let worktoken=wx.getStorageSync('token')
console.log(worktoken,"执行一次");
wx.navigateTo({ wx.navigateTo({
url: '/pages/webView/webView?worktoken='+worktoken+'&AttackEvent='+'https://epmet-preview.elinkservice.cn/#/AttackEvent', url: '/pages/webView/webView?worktoken='+worktoken+'&AttackEvent='+'https://epmet-preview.elinkservice.cn/epmet-work-h5/#/AttackEvent',
}) })
} }
}) })
Loading…
Cancel
Save