Commit 39ae7a67 by 李伟康

feat: 增加违规原因弹窗及相关交互功能

1 parent 190b503d
...@@ -152,6 +152,17 @@ Component({ ...@@ -152,6 +152,17 @@ Component({
} = e.currentTarget.dataset } = e.currentTarget.dataset
this.triggerEvent('tagsTap', item) this.triggerEvent('tagsTap', item)
}, },
showViolationReasonFun(){
this.setData({
showViolationReason:true
})
},
closePopup(){
this.setData({
showViolationReason:false
})
}
}, },
attached() { attached() {
let _this = this let _this = this
......
...@@ -375,3 +375,40 @@ ...@@ -375,3 +375,40 @@
} }
} }
} }
.violation-reason-popup {
width: 622rpx;
height: 754rpx;
border-radius: 20rpx;
display: flex;
flex-direction: column;
.violation-reason-title {
font-size: 32rpx;
font-weight: 500;
line-height: 48rpx;
text-align: center;
padding: 48rpx 0 28rpx;
}
.violation-reason-content {
margin: 0 48rpx;
overflow-y: auto;
height: 472rpx;
word-break: break-all;
font-size: 28rpx;
line-height: 39.2rpx;
color: rgba(41, 45, 51, 1);
}
.violation-reason-btn {
margin-top: auto;
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size: 32rpx;
font-weight: 500;
color: rgba(52, 123, 255, 1);
border-top: 2rpx solid #ebedf0;
}
}
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<wxs src="../../../../index.wxs" module="filter" /> <wxs src="../../../../index.wxs" module="filter" />
<view class="content"> <view class="content">
<block wx:if="{{hideScore && showReason && itemInfo.violationReason}}"> <block wx:if="{{hideScore && showReason && itemInfo.violationReason}}">
<view class="violation-reason" catchtap="showViolationReason">处理意见</view> <view class="violation-reason" catchtap="showViolationReasonFun">处理意见</view>
</block> </block>
<view class="record-header"> <view class="record-header">
<view class="base-message"> <view class="base-message">
...@@ -85,3 +85,12 @@ ...@@ -85,3 +85,12 @@
</view> </view>
</view> </view>
</view> </view>
<van-popup model:show="{{showViolationReason}}" round bind:close="closePopup" close-on-click-overlay="{{false}}">
<view class="violation-reason-popup">
<view class="violation-reason-title">处理意见</view>
<view class="violation-reason-content">{{itemInfo.violationReason}}</view>
<view class="violation-reason-btn" bindtap="closePopup">知道了</view>
</view>
</van-popup>
\ No newline at end of file \ No newline at end of file
...@@ -1541,6 +1541,6 @@ Component({ ...@@ -1541,6 +1541,6 @@ Component({
}) })
this.getReceptionList() this.getReceptionList()
wx.$track.setTrackData(0, 'staff_reception_search', this.getParams()) wx.$track.setTrackData(0, 'staff_reception_search', this.getParams())
} },
}, },
}); });
\ No newline at end of file \ No newline at end of file
...@@ -514,7 +514,7 @@ swiper{ ...@@ -514,7 +514,7 @@ swiper{
position: sticky; position: sticky;
top: var(--fontSize80); top: var(--fontSize80);
left: 0; left: 0;
z-index: 1000; z-index: 100;
background: #F7F8FA; background: #F7F8FA;
} }
.list-box{ .list-box{
......
...@@ -37,7 +37,11 @@ Component({ ...@@ -37,7 +37,11 @@ Component({
*/ */
data: { data: {
progress: 0, progress: 0,
dialogueList: [] dialogueList: [],
violationStatusEnum: {
1: '疑似违规',
2: '过度承诺'
}
}, },
/** /**
...@@ -110,7 +114,7 @@ Component({ ...@@ -110,7 +114,7 @@ Component({
} = e.currentTarget.dataset, { } = e.currentTarget.dataset, {
activeId activeId
} = this.data } = this.data
if(!item) return if (!item) return
thisPage.seek(item.mergedOffset) thisPage.seek(item.mergedOffset)
this.setTopId(item, scroll) this.setTopId(item, scroll)
if (report) this.setTrackData('dialogue_time_point') if (report) this.setTrackData('dialogue_time_point')
...@@ -183,7 +187,6 @@ Component({ ...@@ -183,7 +187,6 @@ Component({
e.time = this.formatTime(e.mergedOffset) e.time = this.formatTime(e.mergedOffset)
e.text_id = `text_${e.id}` e.text_id = `text_${e.id}`
e.showCheckDetail = false e.showCheckDetail = false
if (e.defenceDetail) { if (e.defenceDetail) {
e.defenceTitle = `第${numberToChinese(defenceNum)}次攻防` e.defenceTitle = `第${numberToChinese(defenceNum)}次攻防`
defenceNum++ defenceNum++
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
display: flex; display: flex;
width: 100%; width: 100%;
background: #F0F6FF; background: #F0F6FF;
height: 80rpx; height: var(--fontSize80);
} }
.avatar-box { .avatar-box {
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
.time { .time {
width: var(--fontSize72); width: var(--fontSize72);
height: var(--fontSize28); height: var(--fontSize28);
line-height: 28rpx; line-height: var(--fontSize28);
background: #FFFFFF; background: #FFFFFF;
border: var(--fontSize2) solid #F0F6FF; border: var(--fontSize2) solid #F0F6FF;
border-radius: var(--fontSize28); border-radius: var(--fontSize28);
...@@ -78,14 +78,40 @@ ...@@ -78,14 +78,40 @@
margin-left: var(--fontSize16); margin-left: var(--fontSize16);
line-height: var(--fontSize40); line-height: var(--fontSize40);
} }
.color-2{
color: #FF6053; .color-2,
.color-1 {
font-weight: 700 !important; font-weight: 700 !important;
display: block;
.violation-text {
width: fit-content;
margin-top: var(--fontSize8);
font-size: var(--fontSize22);
height: var(--fontSize32);
line-height: var(--fontSize32);
border-radius: var(--fontSize16);
padding: 0 var(--fontSize8);
border: var(--fontSize2) solid;
} }
.color-1{ }
.color-2 {
color: #FF6053;
.violation-text {
border-color: #ff60531a;
background: #fff4f2;
}
}
.color-1 {
color: #7F80FE; color: #7F80FE;
font-weight: 700 !important; .violation-text {
border-color: #7f80fe1a;
background: #f2f2fe;
}
} }
.appeal-btn { .appeal-btn {
display: none; display: none;
margin-left: var(--fontSize46); margin-left: var(--fontSize46);
...@@ -97,7 +123,7 @@ ...@@ -97,7 +123,7 @@
line-height: var(--fontSize44); line-height: var(--fontSize44);
font-size: var(--fontSize24); font-size: var(--fontSize24);
box-sizing: border-box; box-sizing: border-box;
border: 2rpx solid #F56C50; border: var(--fontSize2) solid #F56C50;
} }
.appeal-disabled { .appeal-disabled {
...@@ -219,7 +245,7 @@ ...@@ -219,7 +245,7 @@
} }
.ai-btn { .ai-btn {
width: 536rpx; width: var(--fontSize536);
padding: var(--fontSize20) 0; padding: var(--fontSize20) 0;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -232,9 +258,9 @@ ...@@ -232,9 +258,9 @@
justify-content: center; justify-content: center;
.icon { .icon {
width: 32rpx; width: var(--fontSize32);
height: 32rpx; height: var(--fontSize32);
margin-right: 8rpx; margin-right: var(--fontSize8);
} }
} }
} }
...@@ -278,7 +304,7 @@ ...@@ -278,7 +304,7 @@
} }
.suggestions-box { .suggestions-box {
margin: 24rpx 0 0; margin: var(--fontSize24) 0 0;
} }
} }
} }
...@@ -346,7 +372,7 @@ ...@@ -346,7 +372,7 @@
height: calc(100% - var(--fontSize140)); height: calc(100% - var(--fontSize140));
transform: translateY(-50%); transform: translateY(-50%);
z-index: 8; z-index: 8;
width: 36rpx; width: var(--fontSize36);
right: -28rpx; right: -28rpx;
.axis-bar { .axis-bar {
...@@ -354,7 +380,7 @@ ...@@ -354,7 +380,7 @@
top: 0; top: 0;
left: 0; left: 0;
// right: -8rpx; // right: -8rpx;
width: 16rpx; width: var(--fontSize16);
height: 100%; height: 100%;
background-color: #E7E7E7; background-color: #E7E7E7;
border-radius: var(--fontSize8); border-radius: var(--fontSize8);
...@@ -375,7 +401,7 @@ ...@@ -375,7 +401,7 @@
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
z-index: -1; z-index: -1;
width: 8rpx; width: var(--fontSize8);
} }
.yellow-tag { .yellow-tag {
...@@ -415,15 +441,20 @@ ...@@ -415,15 +441,20 @@
left: 50%; left: 50%;
top: 0; top: 0;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
width: 20rpx; width: var(--fontSize20);
height: 20rpx; height: var(--fontSize20);
background: #FFFFFF; background: #FFFFFF;
border: var(--fontSize4) solid transparent; border: var(--fontSize4) solid transparent;
box-shadow: 0 var(--fontSize4) var(--fontSize16) 0 #7a7a7a33; box-shadow: 0 var(--fontSize4) var(--fontSize16) 0 #7a7a7a33;
border-radius: 100%; border-radius: 100%;
box-sizing: border-box; box-sizing: border-box;
} }
.default-axis-dot{
width: var(--fontSize36);
height: var(--fontSize36);
border: var(--fontSize6) solid #347BFF;
z-index: 9;
}
.axis-text { .axis-text {
position: absolute; position: absolute;
right: var(--fontSize20); right: var(--fontSize20);
...@@ -432,7 +463,7 @@ ...@@ -432,7 +463,7 @@
display: inline-block; display: inline-block;
height: var(--fontSize36); height: var(--fontSize36);
border-radius: var(--fontSize16); border-radius: var(--fontSize16);
padding: 0 22rpx 0 12rpx; padding: 0 var(--fontSize22) 0 var(--fontSize12);
transform: translateY(-50%); transform: translateY(-50%);
white-space: nowrap; white-space: nowrap;
/* 防止文本换行 */ /* 防止文本换行 */
...@@ -484,8 +515,8 @@ ...@@ -484,8 +515,8 @@
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
background-color: #fff; background-color: #fff;
width: 26rpx; width: var(--fontSize26);
height: 26rpx; height: var(--fontSize26);
} }
} }
...@@ -498,7 +529,7 @@ ...@@ -498,7 +529,7 @@
color: #FFFFFF !important; color: #FFFFFF !important;
background-color: #347BFF !important; background-color: #347BFF !important;
border-radius: var(--fontSize16) 0 0 var(--fontSize16); border-radius: var(--fontSize16) 0 0 var(--fontSize16);
right: 18rpx; right: var(--fontSize18);
z-index: 2; z-index: 2;
} }
...@@ -514,8 +545,8 @@ ...@@ -514,8 +545,8 @@
position: absolute; position: absolute;
top: 50%; top: 50%;
right: 100%; right: 100%;
width: 80rpx; width: var(--fontSize80);
height: 40rpx; height: var(--fontSize40);
transform: translateY(-50%); transform: translateY(-50%);
} }
} }
......
...@@ -11,7 +11,14 @@ ...@@ -11,7 +11,14 @@
</view> </view>
<view class="time">{{item.time}}</view> <view class="time">{{item.time}}</view>
</view> </view>
<view class="text {{item.violationFlag? 'color-' + recordData.violationStatus :''}}">{{item.content}}</view> <view class="text {{item.violationFlag? 'color-' + recordData.violationStatus :''}}">
{{item.content}}
<block wx:if="{{item.violationFlag}}">
<view class="violation-text">
{{violationStatusEnum[recordData.violationStatus]}}
</view>
</block>
</view>
<block wx:if="{{item.appealText && !recordData.hideScore}}"> <block wx:if="{{item.appealText && !recordData.hideScore}}">
<view class="appeal-btn {{item.appealClass}}" catchtap="handleAppeal" data-index="{{index}}" data-item="{{item}}">{{item.appealText}}</view> <view class="appeal-btn {{item.appealClass}}" catchtap="handleAppeal" data-index="{{index}}" data-item="{{item}}">{{item.appealText}}</view>
</block> </block>
...@@ -144,6 +151,9 @@ ...@@ -144,6 +151,9 @@
</block> </block>
</view> </view>
</block> </block>
<block wx:else>
<view class="axis-dot default-axis-dot" style="top:{{progress + '%'}}"></view>
</block>
</view> </view>
</view> </view>
<appeal model:show="{{showAppeal}}" item="{{chooseItem}}" bindconfirm="confirm"></appeal> <appeal model:show="{{showAppeal}}" item="{{chooseItem}}" bindconfirm="confirm"></appeal>
......
// packageEquity/pages/receptionDetail/components/violationPopup/violationPopup.js
import api from "~/utils/request/request.js";
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
value: false,
observer(n) {
this.setData({
violationReason: '',
wghsStatus: 2
})
}
}
},
/**
* 组件的初始数据
*/
data: {
radioList: [{
text: '已违规',
value: 2
},
{
text: '未违规',
value: 0
},
],
violationReason: '',
wghsStatus: 2
},
/**
* 组件的方法列表
*/
methods: {
async confirm() {
if (this.submitStatus) return
try {
wx.$util.showLoading('提交中...')
this.submitStatus = true
const {
violationReason,
wghsStatus
} = this.data, {
data,
code,
message
} = await api.post('dj.api.smartcarlife.recepiton.violationConfirmation', {
wghsStatus,
violationReason
})
if (code == 0) {
if (data) {
this.submitStatus = false
wx.hideLoading()
wx.showToast({
title: '录音已确认完成',
mask: true
})
setTimeout(() => {
this.setData({
show: false
})
wx.$router.back(page => {
page.refreshListData && page.refreshListData()
})
}, 1500)
} else throw message
} else throw message
} catch (error) {
wx.hideLoading()
wx.$util.showToast(error)
this.submitStatus = false
}
},
bindKeyInput(e) {
let {
value
} = e.detail
this.setData({
violationReason: value
})
},
change(e) {
let {
value
} = e.currentTarget.dataset
this.setData({
wghsStatus: value
})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/receptionDetail/components/violationPopup/violationPopup.wxss */
.content {
.title {
color: #222222;
font-size: 28rpx;
margin: 32rpx 0 12rpx;
}
.radio-box {
height: 80rpx;
border-radius: 8rpx;
background: #f7f8fa;
display: flex;
align-items: center;
padding: 0 12rpx;
gap: 0 60rpx;
.radio {
display: flex;
align-items: center;
color: #292d33;
font-size: 28rpx;
transition: all .15s;
.arc {
width: 32rpx;
height: 32rpx;
border: 2rpx solid #d0d2d6;
box-sizing: border-box;
border-radius: 100%;
margin-right: 20rpx;
transition: all .15s;
}
}
.active {
color: #347bff;
.arc {
border: 11rpx solid #347bff;
}
}
}
.textarea {
height: 572rpx;
box-sizing: border-box;
padding: 24rpx;
border-radius: 12rpx;
background: #f4f5f7;
border: 2rpx solid #eff0f2;
}
}
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/pages/mentorshipManage/components/businessSelectPopup/businessSelectPopup.wxml-->
<popup title="疑似违规确认" model:show="{{ show }}" bindconfirm="confirm" height="70vh" bindcancel="hidePopup">
<view class="content">
<view class="title">
请确认此录音是否违规
</view>
<view class="radio-box">
<block wx:for="{{radioList}}" wx:key="index">
<view class="radio {{wghsStatus == item.value ?'active':''}}" bindtap="change" data-value="{{item.value}}">
<view class="arc"></view>
{{item.text}}
</view>
</block>
</view>
<view class="title">请输入您的处理意见</view>
<view class="textarea">
<gl-textarea bindinput="bindKeyInput" maxlength="{{200}}" value="{{violationReason}}" placeholderColor="#3333334d" placeholder="请输入" color="#292d33" textStyle="font-size:28rpx;line-height:32rpx;" />
</view>
</view>
</popup>
\ No newline at end of file \ No newline at end of file
...@@ -157,13 +157,15 @@ Page({ ...@@ -157,13 +157,15 @@ Page({
this.track_businessParam = { this.track_businessParam = {
batchId: options.batchId batchId: options.batchId
} //埋点业务参数 } //埋点业务参数
let {typeLists} = this.data let {
typeLists
} = this.data
this.setData({ this.setData({
record: options, record: options,
typeLists:options.hideScore ? typeLists.splice(0,1) : typeLists, typeLists: options.hideScore ? typeLists.splice(0, 1) : typeLists,
showViolationBtn: options.hideScore && options.violationStatus == 1 showViolationBtn:true
// showViolationBtn: options.hideScore && options.violationStatus == 1
}, () => { }, () => {
console.log('000')
this.setAudio() this.setAudio()
}) })
} }
...@@ -177,7 +179,7 @@ Page({ ...@@ -177,7 +179,7 @@ Page({
0: 'dialogue', 0: 'dialogue',
1: 'quality_inspection', 1: 'quality_inspection',
2: 'offense_and_defense' 2: 'offense_and_defense'
}[index]) } [index])
this.setData({ this.setData({
activeIndex: index activeIndex: index
}) })
...@@ -195,8 +197,18 @@ Page({ ...@@ -195,8 +197,18 @@ Page({
wx.$util.getViewInfo('.reception-wrap', ({ wx.$util.getViewInfo('.reception-wrap', ({
height height
}) => { }) => {
console.log(1) let {
showViolationBtn
} = this.data
if (showViolationBtn) {
wx.$util.getViewInfo('.violation-btn-box', ({
height: btnHeight
}) => {
this.setData({ this.setData({
receptionWrapHeight: `${(height + btnHeight) * 2}rpx`
})
})
} else this.setData({
receptionWrapHeight: `${height * 2}rpx` receptionWrapHeight: `${height * 2}rpx`
}) })
}) })
...@@ -216,7 +228,7 @@ Page({ ...@@ -216,7 +228,7 @@ Page({
1: '成交', 1: '成交',
2: '战败', 2: '战败',
3: '未知' 3: '未知'
}[record.orderStatus], { } [record.orderStatus], {
endTime, endTime,
totalDuration, totalDuration,
fileUrl, fileUrl,
...@@ -250,6 +262,11 @@ Page({ ...@@ -250,6 +262,11 @@ Page({
keepScreenOn keepScreenOn
}) })
}, },
violationPopupToggle() {
this.setData({
showViolationPopup: true
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
"quality": "./components/quality/index", "quality": "./components/quality/index",
"attack":"./components/attack/index", "attack":"./components/attack/index",
"record-item": "../index/components/record-item/recordItem", "record-item": "../index/components/record-item/recordItem",
"dialogue":"./components/dialogue/dialogue" "dialogue":"./components/dialogue/dialogue",
"violation-popup":"./components/violationPopup/violationPopup"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/receptionDetail/receptionDetail.wxss */ /* packageEquity/pages/receptionDetail/receptionDetail.wxss */
page { page {
background-color: #FAFAFA !important; background-color: #FAFAFA !important;
overflow:hidden; overflow: hidden;
} }
.navigation-title { .navigation-title {
...@@ -58,7 +58,8 @@ page { ...@@ -58,7 +58,8 @@ page {
color: #5A5E66; color: #5A5E66;
font-weight: 400; font-weight: 400;
text-align: center; text-align: center;
.avg{
.avg {
font-size: var(--fontSize20); font-size: var(--fontSize20);
font-family: 'numberNor'; font-family: 'numberNor';
} }
...@@ -98,11 +99,27 @@ page { ...@@ -98,11 +99,27 @@ page {
font-weight: 400; font-weight: 400;
font-size: var(--fontSize26); font-size: var(--fontSize26);
color: #757980; color: #757980;
margin-left:var(--fontSize4); margin-left: var(--fontSize4);
} }
} }
} }
} }
.type-wrap{
.type-wrap {
padding: 0 var(--fontSize28); padding: 0 var(--fontSize28);
} }
.violation-btn-box {
padding: 40rpx 64rpx;
.violation-btn {
color: #ffffff;
font-size: 32rpx;
font-weight: 500;
height: 88rpx;
border-radius: 12rpx;
background: #347bff;
line-height: 88rpx;
text-align: center;
}
}
\ No newline at end of file \ No newline at end of file
...@@ -37,5 +37,9 @@ ...@@ -37,5 +37,9 @@
</block> </block>
</view> </view>
<block wx:if="{{showViolationBtn}}"> <block wx:if="{{showViolationBtn}}">
去确认 <view class="violation-btn-box">
<view class="violation-btn" bindtap="violationPopupToggle">去确认</view>
</view>
</block> </block>
<violation-popup model:show="{{showViolationPopup}}"></violation-popup>
\ No newline at end of file \ No newline at end of file
...@@ -49,11 +49,14 @@ Page({ ...@@ -49,11 +49,14 @@ Page({
let { let {
recordTabList recordTabList
} = this.data, } = this.data,
tabIndex = recordTabList.findIndex(e => e.value == options.tabValue) || 0 tabIndex = recordTabList.findIndex(e => e.value == options.tabValue),
violationStatus = 1
if(options.tabValue != null) violationStatus = options.tabValue
if(tabIndex == -1) tabIndex = 0
this.setData({ this.setData({
hideScore: true, hideScore: true,
tabIndex, tabIndex,
violationStatus: options.tabValue violationStatus
}) })
} }
let userInfo = wx.$util.getUserInfo() || {} let userInfo = wx.$util.getUserInfo() || {}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!