Commit 39ae7a67 by 李伟康

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

1 parent 190b503d
......@@ -152,6 +152,17 @@ Component({
} = e.currentTarget.dataset
this.triggerEvent('tagsTap', item)
},
showViolationReasonFun(){
this.setData({
showViolationReason:true
})
},
closePopup(){
this.setData({
showViolationReason:false
})
}
},
attached() {
let _this = this
......
......@@ -374,4 +374,41 @@
}
}
}
}
.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
......@@ -2,7 +2,7 @@
<wxs src="../../../../index.wxs" module="filter" />
<view class="content">
<block wx:if="{{hideScore && showReason && itemInfo.violationReason}}">
<view class="violation-reason" catchtap="showViolationReason">处理意见</view>
<view class="violation-reason" catchtap="showViolationReasonFun">处理意见</view>
</block>
<view class="record-header">
<view class="base-message">
......@@ -84,4 +84,13 @@
<view class="time-bt pad-4">{{itemInfo.endTimeStr}}</view>
</view>
</view>
</view>
\ No newline at end of file
</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
......@@ -1541,6 +1541,6 @@ Component({
})
this.getReceptionList()
wx.$track.setTrackData(0, 'staff_reception_search', this.getParams())
}
},
},
});
\ No newline at end of file
......@@ -514,7 +514,7 @@ swiper{
position: sticky;
top: var(--fontSize80);
left: 0;
z-index: 1000;
z-index: 100;
background: #F7F8FA;
}
.list-box{
......
......@@ -37,7 +37,11 @@ Component({
*/
data: {
progress: 0,
dialogueList: []
dialogueList: [],
violationStatusEnum: {
1: '疑似违规',
2: '过度承诺'
}
},
/**
......@@ -110,7 +114,7 @@ Component({
} = e.currentTarget.dataset, {
activeId
} = this.data
if(!item) return
if (!item) return
thisPage.seek(item.mergedOffset)
this.setTopId(item, scroll)
if (report) this.setTrackData('dialogue_time_point')
......@@ -183,7 +187,6 @@ Component({
e.time = this.formatTime(e.mergedOffset)
e.text_id = `text_${e.id}`
e.showCheckDetail = false
if (e.defenceDetail) {
e.defenceTitle = `第${numberToChinese(defenceNum)}次攻防`
defenceNum++
......
......@@ -31,7 +31,7 @@
display: flex;
width: 100%;
background: #F0F6FF;
height: 80rpx;
height: var(--fontSize80);
}
.avatar-box {
......@@ -54,7 +54,7 @@
.time {
width: var(--fontSize72);
height: var(--fontSize28);
line-height: 28rpx;
line-height: var(--fontSize28);
background: #FFFFFF;
border: var(--fontSize2) solid #F0F6FF;
border-radius: var(--fontSize28);
......@@ -78,14 +78,40 @@
margin-left: var(--fontSize16);
line-height: var(--fontSize40);
}
.color-2{
color: #FF6053;
.color-2,
.color-1 {
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-2 {
color: #FF6053;
.violation-text {
border-color: #ff60531a;
background: #fff4f2;
}
}
.color-1{
.color-1 {
color: #7F80FE;
font-weight: 700 !important;
.violation-text {
border-color: #7f80fe1a;
background: #f2f2fe;
}
}
.appeal-btn {
display: none;
margin-left: var(--fontSize46);
......@@ -97,7 +123,7 @@
line-height: var(--fontSize44);
font-size: var(--fontSize24);
box-sizing: border-box;
border: 2rpx solid #F56C50;
border: var(--fontSize2) solid #F56C50;
}
.appeal-disabled {
......@@ -219,7 +245,7 @@
}
.ai-btn {
width: 536rpx;
width: var(--fontSize536);
padding: var(--fontSize20) 0;
display: flex;
align-items: center;
......@@ -232,9 +258,9 @@
justify-content: center;
.icon {
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
width: var(--fontSize32);
height: var(--fontSize32);
margin-right: var(--fontSize8);
}
}
}
......@@ -278,7 +304,7 @@
}
.suggestions-box {
margin: 24rpx 0 0;
margin: var(--fontSize24) 0 0;
}
}
}
......@@ -346,7 +372,7 @@
height: calc(100% - var(--fontSize140));
transform: translateY(-50%);
z-index: 8;
width: 36rpx;
width: var(--fontSize36);
right: -28rpx;
.axis-bar {
......@@ -354,7 +380,7 @@
top: 0;
left: 0;
// right: -8rpx;
width: 16rpx;
width: var(--fontSize16);
height: 100%;
background-color: #E7E7E7;
border-radius: var(--fontSize8);
......@@ -375,7 +401,7 @@
left: 50%;
transform: translateX(-50%);
z-index: -1;
width: 8rpx;
width: var(--fontSize8);
}
.yellow-tag {
......@@ -415,15 +441,20 @@
left: 50%;
top: 0;
transform: translate(-50%, -50%);
width: 20rpx;
height: 20rpx;
width: var(--fontSize20);
height: var(--fontSize20);
background: #FFFFFF;
border: var(--fontSize4) solid transparent;
box-shadow: 0 var(--fontSize4) var(--fontSize16) 0 #7a7a7a33;
border-radius: 100%;
box-sizing: border-box;
}
.default-axis-dot{
width: var(--fontSize36);
height: var(--fontSize36);
border: var(--fontSize6) solid #347BFF;
z-index: 9;
}
.axis-text {
position: absolute;
right: var(--fontSize20);
......@@ -432,7 +463,7 @@
display: inline-block;
height: var(--fontSize36);
border-radius: var(--fontSize16);
padding: 0 22rpx 0 12rpx;
padding: 0 var(--fontSize22) 0 var(--fontSize12);
transform: translateY(-50%);
white-space: nowrap;
/* 防止文本换行 */
......@@ -484,8 +515,8 @@
left: 50%;
transform: translate(-50%, -50%);
background-color: #fff;
width: 26rpx;
height: 26rpx;
width: var(--fontSize26);
height: var(--fontSize26);
}
}
......@@ -498,7 +529,7 @@
color: #FFFFFF !important;
background-color: #347BFF !important;
border-radius: var(--fontSize16) 0 0 var(--fontSize16);
right: 18rpx;
right: var(--fontSize18);
z-index: 2;
}
......@@ -514,8 +545,8 @@
position: absolute;
top: 50%;
right: 100%;
width: 80rpx;
height: 40rpx;
width: var(--fontSize80);
height: var(--fontSize40);
transform: translateY(-50%);
}
}
......
......@@ -11,7 +11,14 @@
</view>
<view class="time">{{item.time}}</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}}">
<view class="appeal-btn {{item.appealClass}}" catchtap="handleAppeal" data-index="{{index}}" data-item="{{item}}">{{item.appealText}}</view>
</block>
......@@ -144,6 +151,9 @@
</block>
</view>
</block>
<block wx:else>
<view class="axis-dot default-axis-dot" style="top:{{progress + '%'}}"></view>
</block>
</view>
</view>
<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
{
"component": true,
"usingComponents": {}
}
\ 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
<!--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
......@@ -157,13 +157,15 @@ Page({
this.track_businessParam = {
batchId: options.batchId
} //埋点业务参数
let {typeLists} = this.data
let {
typeLists
} = this.data
this.setData({
record: options,
typeLists:options.hideScore ? typeLists.splice(0,1) : typeLists,
showViolationBtn: options.hideScore && options.violationStatus == 1
typeLists: options.hideScore ? typeLists.splice(0, 1) : typeLists,
showViolationBtn:true
// showViolationBtn: options.hideScore && options.violationStatus == 1
}, () => {
console.log('000')
this.setAudio()
})
}
......@@ -177,7 +179,7 @@ Page({
0: 'dialogue',
1: 'quality_inspection',
2: 'offense_and_defense'
}[index])
} [index])
this.setData({
activeIndex: index
})
......@@ -195,8 +197,18 @@ Page({
wx.$util.getViewInfo('.reception-wrap', ({
height
}) => {
console.log(1)
this.setData({
let {
showViolationBtn
} = this.data
if (showViolationBtn) {
wx.$util.getViewInfo('.violation-btn-box', ({
height: btnHeight
}) => {
this.setData({
receptionWrapHeight: `${(height + btnHeight) * 2}rpx`
})
})
} else this.setData({
receptionWrapHeight: `${height * 2}rpx`
})
})
......@@ -216,7 +228,7 @@ Page({
1: '成交',
2: '战败',
3: '未知'
}[record.orderStatus], {
} [record.orderStatus], {
endTime,
totalDuration,
fileUrl,
......@@ -250,6 +262,11 @@ Page({
keepScreenOn
})
},
violationPopupToggle() {
this.setData({
showViolationPopup: true
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
......
......@@ -3,7 +3,8 @@
"quality": "./components/quality/index",
"attack":"./components/attack/index",
"record-item": "../index/components/record-item/recordItem",
"dialogue":"./components/dialogue/dialogue"
"dialogue":"./components/dialogue/dialogue",
"violation-popup":"./components/violationPopup/violationPopup"
},
"navigationStyle": "custom"
}
\ No newline at end of file
/* packageEquity/pages/receptionDetail/receptionDetail.wxss */
page {
background-color: #FAFAFA !important;
overflow:hidden;
overflow: hidden;
}
.navigation-title {
......@@ -58,9 +58,10 @@ page {
color: #5A5E66;
font-weight: 400;
text-align: center;
.avg{
font-size: var(--fontSize20);
font-family: 'numberNor';
.avg {
font-size: var(--fontSize20);
font-family: 'numberNor';
}
}
......@@ -98,11 +99,27 @@ page {
font-weight: 400;
font-size: var(--fontSize26);
color: #757980;
margin-left:var(--fontSize4);
margin-left: var(--fontSize4);
}
}
}
}
.type-wrap{
.type-wrap {
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
......@@ -37,5 +37,9 @@
</block>
</view>
<block wx:if="{{showViolationBtn}}">
去确认
</block>
\ No newline at end of file
<view class="violation-btn-box">
<view class="violation-btn" bindtap="violationPopupToggle">去确认</view>
</view>
</block>
<violation-popup model:show="{{showViolationPopup}}"></violation-popup>
\ No newline at end of file
......@@ -49,11 +49,14 @@ Page({
let {
recordTabList
} = 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({
hideScore: true,
tabIndex,
violationStatus: options.tabValue
violationStatus
})
}
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!