diff --git a/pages/statistics/modules/AttackEvent/AttackEvent.js b/pages/statistics/modules/AttackEvent/AttackEvent.js index 66ebca8..2811cb3 100644 --- a/pages/statistics/modules/AttackEvent/AttackEvent.js +++ b/pages/statistics/modules/AttackEvent/AttackEvent.js @@ -35,7 +35,7 @@ Component({ icEventList(params).then(res => { console.log(res,"sdkjldsf"); this.setData({ - data: res.data + tableList: res.data.list }) }) }, @@ -48,6 +48,13 @@ Component({ wx.navigateTo({ url: '/subpages/statistics/pages/problem/problem?type='+this.data.tabValue+'&data='+JSON.stringify(data) }) + }, + toNumber(data){ + let token=wx.getStorageSync('token') + let iceventid=data.currentTarget.dataset.iceventid + wx.navigateTo({ + url: '/pages/webView/webView?worktoken='+token+'&iceventid='+iceventid+'&AttackEvent='+'https://epmet-preview.elinkservice.cn/epmet-work-h5/#/HotlineDetail', + }) } }, diff --git a/pages/statistics/modules/AttackEvent/AttackEvent.wxml b/pages/statistics/modules/AttackEvent/AttackEvent.wxml index b397a27..c534093 100644 --- a/pages/statistics/modules/AttackEvent/AttackEvent.wxml +++ b/pages/statistics/modules/AttackEvent/AttackEvent.wxml @@ -1,25 +1,25 @@ - - + + - 工单号:{{item.amount}} + 工单号:{{item.icEventId}} - - - - {{item.content}} - - - - - {{item.mobile}} - - - - {{item.name ? item.name : ''}} {{item.address}} - + + + + {{item.solved}} + - + + {{item.satisfactionName}} + + + + + {{item.eventContent}} + + + diff --git a/pages/statistics/modules/AttackEvent/AttackEvent.wxss b/pages/statistics/modules/AttackEvent/AttackEvent.wxss index 854925a..fb32746 100644 --- a/pages/statistics/modules/AttackEvent/AttackEvent.wxss +++ b/pages/statistics/modules/AttackEvent/AttackEvent.wxss @@ -1,97 +1,143 @@ .tag-list { - display: flex; - margin: 0 -8rpx; - justify-content: space-between; - margin-bottom: 15px; + display: flex; + margin: 0 -8rpx; + justify-content: space-between; + margin-bottom: 15px; } .tag-list .tag { - padding: 10rpx 20rpx; - font-size: 28rpx; - margin: 0 8rpx; - color: #3A80E7; - background: #F1F6FF; - border: 1px solid #3A80E7; - border-radius: 1000rpx; + padding: 10rpx 20rpx; + font-size: 28rpx; + margin: 0 8rpx; + color: #3A80E7; + background: #F1F6FF; + border: 1px solid #3A80E7; + border-radius: 1000rpx; } .tag-list .tag.cur { - background: #3A80E7; - color: #ffff; + background: #3A80E7; + color: #ffff; } .problem-item { - background: #F7F7F7; - border-radius: 20rpx; - padding: 30rpx 20rpx; - display: flex; - flex-direction: column; - margin-top: 15px; + background: #F7F7F7; + border-radius: 20rpx; + padding: 30rpx 20rpx; + display: flex; + flex-direction: column; + margin-top: 15px; } .frequency { - margin-right: 20rpx; - border-radius: 20rpx; - text-align: center; - display: flex; - align-items: center; - + margin-right: 20rpx; + border-radius: 20rpx; + display: flex; + flex-direction: column; } .frequency_title{ +display: flex; +flex-direction: row; +font-size:30rpx; +color: #000000; +font-weight: bold; +} +.frequency_content{ +display: flex; +flex-direction: row; +margin-top: 10rpx; +justify-content: space-between; +} + +.content_categoryAllName{ + width: 70%; + white-space: nowrap; /* 防止文本换行 */ + overflow: hidden; /* 隐藏超出的文本 */ + text-overflow: ellipsis; /* 如果文本超出容器,显示省略号 */ + font-size: 26rpx; + color: #999999; + line-height: 40rpx; +} +.frequency_footer{ display: flex; flex-direction: row; - font-size:30rpx; - color: #000000; - font-weight: bold; + margin-top: 10rpx; + justify-content: space-between; + font-family: PingFang SC; + font-weight: 500; + font-size: 32rpx; + color: #333333; + line-height: 42rpx; + } + .content_eventContent{ + display: -webkit-box; /* 必须设置为 box 模式 */ + -webkit-line-clamp: 2; /* 限制显示两行 */ + -webkit-box-orient: vertical; /* 设置排列方向为垂直 */ + overflow: hidden; /* 隐藏超出部分 */ + text-overflow: ellipsis; /* 显示省略号 */ + } +.content_workOrde { + font-family: PingFang SC; + font-weight: 500; + font-size: 26rpx; + color: #FC5231; + line-height: 42rpx; +} +.content_workOrde1 { + font-family: PingFang SC; + font-weight: 500; + font-size: 26rpx; + color: #FFA312; + line-height: 42rpx; } .workOrde{ - margin-left: 20rpx; +margin-left: 20rpx; } .frequency.orange { - background: #FFEBE2; - color: #FC7031; + background: #FFEBE2; + color: #FC7031; } .frequency.purple { - background: #E2E2FF; - color: #8482F7; + background: #E2E2FF; + color: #8482F7; } .frequency.blue { - background: #D3EDFF; - color: #4AA2E2; + background: #D3EDFF; + color: #4AA2E2; } .right-con { - flex: 0 0 calc(100% - 100rpx); - width: calc(100% - 100rpx); + flex: 0 0 calc(100% - 100rpx); + width: calc(100% - 100rpx); } .right-con .right-con-txt { - font-size: 30rpx; - color: #333333; - line-height: 42rpx; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - height: 84rpx; + font-size: 30rpx; + color: #333333; + line-height: 42rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + height: 84rpx; } .right-con-address { - display: flex; - align-items: center; - margin-right: 14rpx; - margin-top: 30rpx; + display: flex; + align-items: center; + margin-right: 14rpx; + margin-top: 30rpx; } .right-con-address .icon { - width: 24rpx; - height: 30rpx; + width: 24rpx; + height: 30rpx; } .right-con-address .right-con-address-txt { - font-size: 28rpx; - font-weight: 500; - color: #999999; - line-height: 40rpx; + font-size: 28rpx; + font-weight: 500; + color: #999999; + line-height: 40rpx; } \ No newline at end of file diff --git a/pages/statistics/modules/HotlineRates/HotlineRates.js b/pages/statistics/modules/HotlineRates/HotlineRates.js index 94e898a..cf1843c 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(); @@ -14,7 +13,8 @@ const formatCurrentAndLastMonthDay = () => { const lastDay = lastMonthDate.getDate(); return { currentDay: [year, month, day].map(formatNumber).join('-'), - lastMonthDay: [lastYear, lastMonth-1, lastDay].map(formatNumber).join('-'), + //lastMonthDay: [lastYear, lastMonth-1, lastDay].map(formatNumber).join('-'), + lastMonthDay: [lastYear, 1, 1].map(formatNumber).join('-'), }; }; Component({ @@ -23,32 +23,134 @@ 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:"returnTotal", + value:4 + }, + { + label:"overTimeTotal", + 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){ + wx.showToast({ + title: '正在计算排序', + icon: 'loading', + duration: 7000, + mask: true + }) + 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=2 + this.setData({ + sortList:this.data.sortList, + orderBy:evenNumbers+"Down" + } + ) + } + this.getEventList() + }, + toNumber(data) { - console.log(data.currentTarget.dataset,"dskljflksdfjl"); let type=data.currentTarget.dataset.type let staffId=data.currentTarget.dataset.staffid let token=wx.getStorageSync('token') wx.navigateTo({ - url: '/pages/webView/webView?worktoken='+token+'&staffId='+staffId+'&type='+type+'&day='+this.data.day+'&day2='+this.data.day2, + url: '/pages/webView/webView?worktoken='+token+'&staffId='+staffId+'&type='+type+'&day='+this.data.day+'&day2='+this.data.day2+'&Hotline='+'https://epmet-preview.elinkservice.cn/epmet-work-h5/#/Hotline', }) }, onChange(e) { @@ -91,9 +193,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, } @@ -101,10 +205,11 @@ 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) // }) + wx.hideToast() this.setData({ list: res.data }) diff --git a/pages/statistics/modules/HotlineRates/HotlineRates.wxml b/pages/statistics/modules/HotlineRates/HotlineRates.wxml index 6f85aca..e107dfc 100644 --- a/pages/statistics/modules/HotlineRates/HotlineRates.wxml +++ b/pages/statistics/modules/HotlineRates/HotlineRates.wxml @@ -1,42 +1,39 @@ - - - {{ day }} - - - + + + {{ day }} + + - - - {{ day2 }} - - - + + + {{ day2 }} + + - - 查询 + 查询 + + + + {{item.lable}} + +
+ + + + +
+
+ +
+ - - {{item.operateName }} {{item.assignOrgName}} @@ -48,7 +45,7 @@ + 不满意 {{item.notSatisfiedTotal}} 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 2ea561f..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) { @@ -55,5 +55,11 @@ Page({ this.setData({ tabValue: detail }) + }, + gotoAttack(){ + let worktoken=wx.getStorageSync('token') + wx.navigateTo({ + url: '/pages/webView/webView?worktoken='+worktoken+'&AttackEvent='+'https://epmet-preview.elinkservice.cn/epmet-work-h5/#/AttackEvent', + }) } }) \ No newline at end of file diff --git a/pages/webView/webView.js b/pages/webView/webView.js index 5229f98..6507ea3 100644 --- a/pages/webView/webView.js +++ b/pages/webView/webView.js @@ -6,34 +6,63 @@ * @FilePath: \epmet-work-mp\pages\webView\webView.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ -const app = getApp() +const App = getApp() Page({ data: { worktoken: '', staffId:"", type:"", day:"", - day2:"" + day2:"", + iceventid:"", + Hotline:"", + url:"", }, onLoad: function (options) { + let agencyId=App.globalData.user.agencyId + console.log(App.globalData.user.agencyId,"App.globalData.user.agencyId"); + console.log(options,"dslkjfsldfk"); if (options.token) { this.setData({ worktoken: `${options.worktoken}`, }); - console.log('url', this.data.worktoken); } else { - console.log(options, "dslfjlksd"); - this.setData({ - worktoken: decodeURIComponent(options.worktoken), - staffId: options.staffId, - type: `${options.type}`, - day: options.day, - day2: options.day2 - }) + if (options.Hotline) { + if (options.staffId){ + const url = `${options.Hotline}?worktoken=${decodeURIComponent(options.worktoken)}&staffId=${options.staffId}&type=${options.type}&day=${options.day}&day2=${options.day2}`; + console.log('生成的 URL:', url); + this.setData({ + url: url + }) + console.log(this.data.url,"ds;lkjdflks"); + }else{ + const url = `${options.Hotline}?worktoken=${decodeURIComponent(options.worktoken)}`; + console.log('生成的 URL:', url); + this.setData({ + url: url + }) + } + }else{ + if (options.iceventid) { + const url = `${options.AttackEvent}?worktoken=${decodeURIComponent(options.worktoken)}&iceventid=${options.iceventid}`; + console.log('生成的 URL:', url); + this.setData({ + url: url + }) + }else{ + const url = `${options.AttackEvent}?worktoken=${decodeURIComponent(options.worktoken)}`; + console.log('生成的 URL:', url); + this.setData({ + url: url + }) + } + + } + } - const url = `https://epmet-preview.elinkservice.cn/epmet-work-h5/#/Hotline?worktoken=${this.data.worktoken}&staffId=${this.data.staffId}&type=${this.data.type}&day=${this.data.day}&day2=${this.data.day2}`; - console.log('生成的 URL:', url); + + }, onShow() { this.onLoad() diff --git a/pages/webView/webView.wxml b/pages/webView/webView.wxml index dfc5c48..0c502fd 100644 --- a/pages/webView/webView.wxml +++ b/pages/webView/webView.wxml @@ -1,3 +1,3 @@ - + diff --git a/pages/work2/work2.js b/pages/work2/work2.js index 54fb7f9..a10b447 100644 --- a/pages/work2/work2.js +++ b/pages/work2/work2.js @@ -122,11 +122,10 @@ Page({ }, onHotlineCompletion(){ let token=wx.getStorageSync('token') - console.log(token,"jhgjgjjhbj"); - console.log('https://epmet-preview.elinkservice.cn/epmet-work-h5/#/Hotline?worktoken='+token) wx.navigateTo({ - url: '/pages/webView/webView?worktoken='+token, + url: '/pages/webView/webView?worktoken='+token+'&Hotline='+'https://epmet-preview.elinkservice.cn/epmet-work-h5/#/Hotline', }) + } // onAddHouse(){