From f81e4cc7b902da7fb5d621d1dae57aa4977d4e0f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?=
<819653817@qq.com>
Date: Mon, 13 Jan 2025 14:58:10 +0800
Subject: [PATCH] =?UTF-8?q?=E6=94=BB=E5=9D=9A=E4=BA=8B=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/AttackEvent/AttackEvent.wxml | 2 +-
.../modules/HotlineRates/HotlineRates.js | 106 +++++++++++++++++-
.../modules/HotlineRates/HotlineRates.wxml | 54 ++++-----
.../modules/HotlineRates/HotlineRates.wxss | 15 +++
pages/statistics/statistics.js | 5 +-
5 files changed, 148 insertions(+), 34 deletions(-)
diff --git a/pages/statistics/modules/AttackEvent/AttackEvent.wxml b/pages/statistics/modules/AttackEvent/AttackEvent.wxml
index d6993e0..c534093 100644
--- a/pages/statistics/modules/AttackEvent/AttackEvent.wxml
+++ b/pages/statistics/modules/AttackEvent/AttackEvent.wxml
@@ -6,7 +6,7 @@
工单号:{{item.icEventId}}
- {{item.categoryAllName}}
+ {{item.categoryAllName?item.categoryAllName:""}}
{{item.solved}}
、
diff --git a/pages/statistics/modules/HotlineRates/HotlineRates.js b/pages/statistics/modules/HotlineRates/HotlineRates.js
index f2e07fd..0486a9b 100644
--- a/pages/statistics/modules/HotlineRates/HotlineRates.js
+++ b/pages/statistics/modules/HotlineRates/HotlineRates.js
@@ -6,7 +6,6 @@ const formatCurrentAndLastMonthDay = () => {
const year = today.getFullYear();
const month = today.getMonth() + 1;
const day = today.getDate();
-
// 上个月的日期
const lastMonthDate = new Date(year, month - 1, day);
const lastYear = lastMonthDate.getFullYear();
@@ -23,25 +22,122 @@ Component({
type: String,
value: '1',
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();
}
}
},
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: [],
+ sortNameList: [
+ {
+ label:"total",
+ value:1
+ },
+ {
+ label:"notSatisfiedTotal",
+ value:2
+ },
+ {
+ label:"unresolveTotal",
+ value:3
+ },
+ {
+ label:"overTimeTotal",
+ value:4
+ },
+ {
+ label:"returnTotal",
+ value:5
+ },
+ ],
day: '',
day2: '',
showitem: 3,
},
ready() {
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()
},
- 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) {
let type=data.currentTarget.dataset.type
let staffId=data.currentTarget.dataset.staffid
@@ -90,9 +186,11 @@ Component({
}
},
getEventList(deptFlag) {
+ console.log(this.data.day,this.data.day2,"这里的值");
let parm = {
+ orderBy: this.data.orderBy,
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,
}
@@ -100,7 +198,7 @@ Component({
parm.recountFlag=1
}
event12345Rates(parm).then(res => {
- console.log('++++++++++++',res.data)
+ console.log(res.data)
// res.data.list.forEach(item => {
// item.reportTime = this.formatTime(item.reportTime)
// })
diff --git a/pages/statistics/modules/HotlineRates/HotlineRates.wxml b/pages/statistics/modules/HotlineRates/HotlineRates.wxml
index c0cba28..56ed51f 100644
--- a/pages/statistics/modules/HotlineRates/HotlineRates.wxml
+++ b/pages/statistics/modules/HotlineRates/HotlineRates.wxml
@@ -1,34 +1,36 @@
-
-
- {{ day }}
-
-
-
+
+
+ {{ day }}
+
+
-
-
- {{ day2 }}
-
-
-
+
+
+ {{ day2 }}
+
+
-
- 查询
+ 查询
+
+
+
+
+
@@ -56,11 +58,11 @@
bind:tap="toNumber" data-staffId="{{item.operateOrgLeader}}" data-type="returnTotal"
>
退件次数
- {{item.returnTotal?item.returnTotal:0}}
+ {{item.returnTotal?item.overTimeTotal:0}}
超期退件
- {{item.overTimeTotal}}
+ {{item.returnTotal}}
diff --git a/pages/statistics/modules/HotlineRates/HotlineRates.wxss b/pages/statistics/modules/HotlineRates/HotlineRates.wxss
index e7dc874..be7c6f1 100644
--- a/pages/statistics/modules/HotlineRates/HotlineRates.wxss
+++ b/pages/statistics/modules/HotlineRates/HotlineRates.wxss
@@ -117,4 +117,19 @@
height:40px;
line-height:40px;
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;
}
\ No newline at end of file
diff --git a/pages/statistics/statistics.js b/pages/statistics/statistics.js
index 7407a14..976d06c 100644
--- a/pages/statistics/statistics.js
+++ b/pages/statistics/statistics.js
@@ -19,7 +19,7 @@ Page({
}],
monthIndex: 0,
stayVal: '1',
- curVal: '1',
+ curVal: '2',
tabValue: ''
},
onLoad(options) {
@@ -58,9 +58,8 @@ Page({
},
gotoAttack(){
let worktoken=wx.getStorageSync('token')
- console.log(worktoken,"执行一次");
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',
})
}
})
\ No newline at end of file