Commit 36bc1f12 by 胡悦

feat(接待中心): 新增接待中心功能模块

实现接待中心相关页面和组件,包括接待记录、客户档案、质检明细等功能
添加接待复盘、客户预录、话术标签等组件
实现接待记录保存、客户信息编辑、质检结果展示等功能
1 parent 0d9fa8ba
......@@ -69,6 +69,12 @@ export default {
name: 'HomeSlot'
},
{
label: "接待中心",
icon: "record",
name: 'ReceptionCenter',
eventCode: 'app_reception_center'
},
{
label: "订单",
icon: "scene",
name: 'Order'
......@@ -112,9 +118,6 @@ export default {
this.clickHome()
},
async changeIndex (index, item) {
if (item.eventCode) uni.$track.add({
eventCode: item.eventCode
})
this.$emit('update:tabIndex', index)
this.$emit("changeTab", {
item,
......
<template>
<view class="reception-box">
<view :class="['record-box-content',`${showInfo || !showRecord?'hide-record':'show-record'}`]">
<view class="right box-class only-right">
<type-tab-component
:typeList="typeList"
:tabIndex.sync="tabIndex"
></type-tab-component>
<view :class="['right-content',`${tabIndex != 0?'hide-record':'show-record'}`]">
<record-list
@openRecordPage="openRecordPage"
ref="recordListRef"
:show="tabIndex == 0"
/>
</view>
<view :class="['right-content',`${tabIndex != 1?'hide-record':'show-record'}`]">
<customer-file
@showSuccess="$refs.successRef.open()"
ref="customerFile"
@editCustomer="editCustomer"
:show="tabIndex == 1"
/>
</view>
</view>
</view>
<template v-if="!showRecord">
<view :class="['save-record-box',backClass]">
<save-record
@cancel="handleCancel"
@submit="handleSubmit"
:customerInfoVal="customerInfo"
></save-record>
</view>
</template>
<uni-popup
ref="successRef"
type="message"
>
<uni-popup-message
type="success"
message="删除成功"
:duration="1500"
></uni-popup-message>
</uni-popup>
<customer-info
:customerId="customerId"
:show.sync="showInfo"
@refresh="$refs.customerFile.refresh()"
/>
</view>
</template>
<script type='text/ecmascript-6'>
import dayjs from 'dayjs'
// import LineBar from './LineBar.vue'
// import OutputValue from './OutputValue.vue'
import RecordList from './RecordList.vue'
import saveRecord from './saveRecord.vue'
import CustomerFile from './CustomerFile.vue'
// import CustomerInfo from './CustomerInfo.vue'
import TypeTabComponent from '@/components/TypeTabComponent.vue'
import SelectComponent from '@/components/SelectComponent.vue'
export default {
components: {
// LineBar,
// OutputValue,
RecordList,
saveRecord,
CustomerFile,
// CustomerInfo,
TypeTabComponent,
SelectComponent
},
name: '',
data () {
return {
backClass: '',
showRecord: true,
customerInfo: {},
dataShow: true,
timeProgress: '',
tabIndex: 0,
typeList: Object.freeze([
{ tabName: '接待复盘' },
// { tabName: '客户预录' },
]),
showInfo: false,
customerId: '',
bussinessType: 1
}
},
computed: {
isHarmony () {
const { channelType } = uni.$storage.get('userInfo')
return channelType == 1
},
performanceTypeList () {
let list = []
if (this.isHarmony) list = [
{ label: '问界', value: 1 },
{ label: '鸿蒙', value: 2 },
]
else list = [
{ label: '延保', value: 1 },
{ label: '权益', value: 3 },
]
return list
},
sceneType () {
return uni.$storage.get('userInfo').sceneType
}
},
mounted () {
this.setTimeProgress()
},
methods: {
setTimeProgress () {
let nowNum = dayjs().date(),
monthDayNum = dayjs().daysInMonth()
this.timeProgress = Math.round(nowNum / monthDayNum * 100)
},
changeType (index, name) {
if (this[name] == index) return // 点击同一个
},
openRecordPage (item) {
this.showRecord = false
this.customerInfo = item
},
handleCancel () {
this.backClass = 'backClass'
setTimeout(() => {
this.showRecord = true;
this.backClass = ''
}, 300)
},
handleSubmit (val) {
this.handleCancel()
this.$refs.recordListRef.submitRecord(val)
},
editCustomer (id) {
this.customerId = id
this.showInfo = true
},
}
}
</script>
<style scoped lang='scss'>
.reception-box {
.record-box-content {
position: relative;
height: 100vh;
box-sizing: border-box;
padding: toRpx(64) 0 toRpx(80);
display: flex;
gap: 0 toRpx(48);
visibility: visible;
transition: all 0.15s;
opacity: 1;
}
.hide-record {
opacity: 0;
z-index: -1;
visibility: hidden;
}
.show-record {
opacity: 1;
position: relative;
animation: show-box 0.15s forwards;
}
@keyframes show-box {
0% {
left: 100%;
}
100% {
left: 0;
}
}
.box-class {
height: 100%;
background: #ffffff59;
backdrop-filter: blur(toRpx(16));
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border-radius: toRpx(48);
overflow: hidden;
}
.left {
width: toRpx(656);
.common-title {
position: relative;
.sprite-icon {
margin-left: toRpx(16);
zoom: 1.5;
}
.time-box {
position: absolute;
left: toRpx(48);
bottom: toRpx(8);
color: #999999;
font-size: toRpx(20);
.time-bar {
width: toRpx(200);
height: toRpx(16);
border-radius: toRpx(8);
background: #ffffff;
overflow: hidden;
margin: 0 toRpx(12);
.time-line {
height: 100%;
border-radius: toRpx(8);
background: linear-gradient(90deg, #75bcff 0%, #2c66f7 100%);
}
}
.progress {
color: #4673ff;
font-weight: 500;
}
}
.reception-select {
position: absolute;
top: toRpx(36);
right: toRpx(32);
/deep/.select {
width: toRpx(148);
height: toRpx(48);
border-radius: toRpx(12);
background: #ffffff59;
backdrop-filter: blur(toRpx(16));
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
color: #333333;
font-size: toRpx(26);
padding-left: toRpx(32);
.icon-arrow-bottom {
zoom: 0.75;
}
}
/deep/.pop-box {
top: toRpx(64);
color: #292d33;
font-size: toRpx(28);
.type-item {
height: toRpx(56);
}
}
}
}
.box {
border-radius: toRpx(32);
background: #ffffff;
backdrop-filter: blur(toRpx(16));
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
margin: toRpx(20) toRpx(32) 0;
}
.customer-box {
margin: toRpx(24) toRpx(32) toRpx(20);
}
.loading {
width: 100%;
height: 100%;
justify-content: center;
.gif {
width: toRpx(64);
height: toRpx(64);
}
.icon {
animation: rotate 1s infinite;
}
@keyframes rotate {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
}
}
.right {
width: calc(100% - #{toRpx(752)});
border: toRpx(2) solid #fff;
box-sizing: border-box;
&.only-right {
width: calc(100% - #{toRpx(64)});
}
&-content {
width: 100%;
position: absolute;
border-radius: toRpx(48);
background: #ffffff;
height: calc(100% - #{toRpx(128)});
transform: translateY(toMinusRpx(32));
}
}
.save-record-box {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
animation: left-in 0.25s forwards;
}
.backClass {
animation: left-out 0.25s forwards;
}
@keyframes left-in {
0% {
left: 100%;
}
100% {
left: 0;
}
}
@keyframes left-out {
0% {
left: 0;
}
100% {
left: 100%;
}
}
}
</style>
<template>
<view class="data-container">
<view class="nav-bar" @click="$emit('cancel')">
<view class="back" @click="$emit('update:showPayPage', false)">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title">接待记录</view>
</view>
<view class="error-tip" v-if="errorTip">以下信息不能为空,请完善信息后保存</view>
<view class="form">
<template v-for="(i, index) in formObject">
<view :class="['form-item', { active: focusIndex == index }]" :key="index">
<view class="label required">{{ i.label }}</view>
<view :class="['value', { error: showError(i.key) }]">
<template v-if="i.type == 'input'">
<input :type="i.inputType" :maxlength="i.maxlength" v-model="customerInfo[i.key]" class="input" :placeholder="i.placeholder" @focus="focusIndex = index" @blur="resetFocusIndex" />
</template>
<template v-else>
<view :class="['select flex', { placeholderStyle: !customerInfo[i.key] }]" @click="showPopup(i.popKey, index)">
<view class="text-hide">{{ customerInfo[i.key] || i.placeholder }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons>
</view>
</template>
</view>
</view>
</template>
</view>
<view class="footer-box">
<view class="cancel-btn" @click="$emit('cancel')">取消</view>
<view class="submit-btn" @click="handleSave">提交</view>
</view>
<car-brands ref="carBrandListVisible" @select="handleSelect($event, 'carBrandListVisible')" />
<employee ref="employeeBoxVisible" :salesPropsUuid="customerInfo.salesUuid" @select="handleSelect($event, 'employeeBoxVisible')" />
<MessageBox ref="receptionStatusVisible" position="bottom" :isFooter="false" title="请选择接待结果" :maxHeight="1000">
<view class="select-box">
<view class="select-item" :class="{ checked: customerInfo.receptionStatus == item.label }" @click="selectReception(item.label)" v-for="(item, index) in receptionList" :key="index">
{{ item.label }}
</view>
</view>
</MessageBox>
</view>
</template>
<script type="text/ecmascript-6">
import CarBrands from '@/components/CarBrands.vue'
import Employee from '@/components/Employee.vue'
import CustomerAutocomplete from '@/components/CustomerAutocomplete.vue'
const phoneRex = /^[1]([3-9])[0-9]{9}$/;
import utils from "@/utils/utils";
export default {
components: {
CarBrands,
Employee,
CustomerAutocomplete
},
props: {
customerInfoVal: {
type: Object,
default: () => ({})
}
},
data() {
return {
errorTip:false,
receptionList: Object.freeze([{
label: '成交',
value: 1
},
{
label: '战败',
value: 0
}
]),
formObject: Object.freeze([{
label: "车主姓名",
placeholder: '车主姓名',
key: 'customerName',
type: 'input',
inputType: 'text',
maxlength: 50
},
{
label: "车主电话",
placeholder: '车主电话',
key: 'phoneNumber',
type: 'input',
inputType: 'tel',
maxlength: 11
},
{
label: "品牌车型",
placeholder: '品牌车型',
key: 'carModel',
type: 'select',
popKey: 'carBrandListVisible'
},
{
label: "接待结果",
key: "receptionStatus",
type: "select",
popKey: "receptionStatusVisible",
placeholder: '请选择',
},
{
label: "销售姓名",
key: "salesName",
type: "select",
popKey: "employeeBoxVisible",
placeholder: '请选择',
},
]),
focusIndex: -1,
customerInfo:{}
}
},
mounted() {
this.customerInfo = utils.deepClone(this.customerInfoVal)
const i = this.receptionList.findIndex(e => e.value === this.customerInfo.receptionStatus)
this.$set(this.customerInfo, 'receptionStatus', i == -1?'':this.receptionList[i].label)
},
methods: {
selectReception(value) {
this.customerInfo.receptionStatus = value
this.$refs.receptionStatusVisible.close()
},
showError(key) {
let flag = !this.customerInfo[key]
if (key == 'phoneNumber' && this.customerInfo[key]) flag = !phoneRex.test(this.customerInfo[key])
return flag
},
handleSave() {
const result = this.check(true)
if (!result) return this.errorTip = true
const i = this.receptionList.findIndex(e => e.label == this.customerInfo.receptionStatus)
this.customerInfo.receptionStatus = this.receptionList[i].value
this.$emit('submit',this.customerInfo)
},
check(all = false) {
let flag = true
try {
this.formObject.map(e => {
if (!this.customerInfo[e.key]) throw false
if (!all && e.key == 'phoneNumber' && !phoneRex.test(this.customerInfo[e.key])) {
uni.showToast({
title: "请输入正确的车主电话",
icon: "none",
});
throw false
}
})
} catch (error) {
flag = error
}
return flag
},
handleSelect(item, popkey) {
this.$refs[popkey].close()
if (popkey == 'employeeBoxVisible') {
this.customerInfo.salesUuid = item.uuid
this.customerInfo.salesName = item.staffName
} else {
this.$refs.carBrandListVisible.close()
this.customerInfo.carModel = item.name
this.customerInfo.carBrand = item.carChildsBrandName
this.customerInfo.carBrandId = item.carChildsBrandId
this.customerInfo.oneCarBrand = item.carBrand
this.customerInfo.oneCarBrandId = item.carBrandId
}
this.resetFocusIndex()
this.errorTip = false
},
showPopup(e, index) {
this.focusIndex = index
this.$refs[e].open()
},
resetFocusIndex() {
this.focusIndex = -1
this.errorTip = false
}
}
}
</script>
<style scoped lang="scss">
.error-tip {
font-size: toRpx(28);
padding: toRpx(32) toRpx(60) toRpx(24);
margin-top: toRpx(100);
margin-bottom: toMinusRpx(80);
text-align: center;
background-color: rgb(254, 237, 234);
color: #f45c3d;
}
.data-container {
background: #ffffff59;
border-radius: toRpx(48);
margin: toRpx(80) toRpx(66) toRpx(80) 0;
height: calc(100% - #{toRpx(160)});
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border: toRpx(2) solid #fff;
box-sizing: border-box;
position: relative;
.nav-bar {
position: absolute;
width: 100%;
height: toRpx(96);
left: 0;
top: toRpx(28);
z-index: 9;
text-align: center;
font-weight: 700;
font-size: toRpx(32);
color: #1a1a1a;
line-height: toRpx(96);
.back {
position: absolute;
left: 0;
top: 0;
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
}
}
.form {
display: flex;
flex-wrap: wrap;
gap: toRpx(80) toRpx(160);
padding: toRpx(80);
margin-top: toRpx(60);
&-item {
width: calc(50% - #{toRpx(80)});
display: flex;
align-items: center;
color: #6c6c70;
font-size: toRpx(30);
height: toRpx(80);
box-sizing: border-box;
.label {
position: relative;
margin-left: auto;
flex-shrink: 0;
width: toRpx(124);
margin-right: toRpx(30);
}
.required {
&::before {
content: '*';
color: #ff0000;
position: absolute;
left: toMinusRpx(20);
top: 50%;
transform: translate(0, -50%);
}
}
.value {
height: toRpx(80);
flex: 1;
border: toRpx(2) solid #e8e8ea;
background: #ffffff;
margin-left: toRpx(32);
box-sizing: border-box;
padding: 0 toRpx(40);
border-radius: toRpx(8);
&.error {
border: toRpx(2) solid #f24724;
border-radius: toRpx(8);
}
.input,
.select {
width: 100%;
height: 100%;
border: none !important;
outline: none;
padding: 0 !important;
font-size: toRpx(30);
color: #333;
&::placeholder {
color: #c9c9c9;
}
}
.placeholderStyle {
color: #999999;
}
.arrow {
color: #999 !important;
margin-left: auto;
flex-shrink: 0;
}
}
}
}
.footer-box {
display: flex;
align-items: center;
justify-content: center;
gap: toRpx(34);
padding: 0 toRpx(280);
.cancel-btn {
height: toRpx(80);
background: #dae9ff;
border-radius: toRpx(48);
line-height: toRpx(80);
text-align: center;
color: #2c66f7;
flex: 1;
}
.submit-btn {
height: toRpx(80);
background-image: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
border-radius: toRpx(48);
line-height: toRpx(80);
text-align: center;
flex: 1;
color: #ffffff;
}
}
}
.select-box {
margin: toRpx(40) 0;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: toRpx(20);
overflow-y: scroll;
max-height: 50vh;
padding-bottom: toRpx(60);
.select-item {
text-align: center;
height: toRpx(68);
line-height: toRpx(68);
opacity: 1;
border: toRpx(2) solid #dce0e6;
color: #292d33;
font-size: toRpx(28);
border-radius: toRpx(8);
&.checked {
border: toRpx(2) solid #292d33;
}
}
}
</style>
......@@ -82,6 +82,7 @@
</view>
</template>
<script>
import ReceptionCenter from './components/ReceptionCenter/index.vue'
// import myClick from '@/mixin/click'
import timeout from '@/mixin/timeout'
import recorder from '@/mixin/record/recorder'
......@@ -92,7 +93,7 @@ import LeftSide from './components/LeftSide.vue'
import Material from '@/components/MaterialIndex.vue'
export default {
mixins: [recorder, uploader, timeout, versionCheck],
components: { LeftSide, Material },
components: { LeftSide, Material, ReceptionCenter },
props: {
id: [String, Number],
finishDoneText: String,
......
<template>
<view class="select-box">
<view
class="select"
@click.stop="isSelect = !isSelect"
>
{{selectList[selectIndex].label}}
<view class="sprite-icon icon-arrow-bottom"></view>
</view>
<view
class="pop-box"
v-if="isSelect"
>
<view
v-for="(i,index) in selectList"
:key="index"
class="type-item flex"
:class="index == selectIndex ? 'active' : ''"
@click="chooseType(index, i)"
>{{i[labelKey]}}</view>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
selectList: Array,
labelKey: {
type: String,
default: 'label'
}
},
name: '',
data () {
return {
selectIndex: 0,
isSelect: false
}
},
mounted () {
},
methods: {
hideSelect () {
this.isSelect = false
},
chooseType (index, item) {
this.selectIndex = index
this.isSelect = false
this.$emit('chooseType', { item, index })
},
}
}
</script>
<style scoped lang='scss'>
.select-box {
position: relative;
z-index: 5;
.select {
display: flex;
align-items: center;
justify-content: flex-end;
height: toRpx(84);
border-radius: toRpx(16);
opacity: 1;
background: #f2f2f2;
padding: 0 toRpx(24) 0 toRpx(40);
}
.arrow-bottom {
width: toRpx(48);
height: toRpx(48);
}
.pop-box {
position: absolute;
top: toRpx(100);
left: 0;
width: 100%;
background: #ffffff;
box-shadow: 0 0 toRpx(16) 0 #99999933;
border-radius: toRpx(16);
padding: toRpx(16) 0;
text-align: center;
animation: show-view-opacity 0.15s forwards;
.type-item {
padding: 0 toRpx(28);
margin-bottom: toRpx(8);
height: toRpx(84);
justify-content: center;
&:last-child {
margin-bottom: 0;
}
&.active {
background-color: #ecf1ff;
}
}
}
}
</style>
\ No newline at end of file
<template>
<view class="type-tab">
<view class="type-box">
<view
class="tab-item"
v-for="(i, index) in typeList"
:key="index"
@click="tabClick(index)"
>
<view
:class="['sprite-icon',tabClass(index)]"
:style="{
left:blockLeft
}"
></view>
<view
class="text"
:class="[tabIndex == index ? `active` : '']"
>
{{ i[nameKey] }}
</view>
</view>
</view>
<view class="mask-box"></view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
typeList: Array,
tabIndex: {
type: Number,
default: 0
},
nameKey: {
type: String,
default: 'tabName'
}
},
name: '',
data () {
return {
firstClass: Object.freeze(['first-nav', 'second-nav']),
}
},
computed: {
blockLeft () {
let { tabIndex } = this
return `${(tabIndex * 400) - (tabIndex == 0 ? 0 : 48)}rpx`
}
},
mounted () {
},
methods: {
tabClass (index) {
let className = ''
if (this.tabIndex == index) {
className = 'active icon-'
if (index == 0) className += 'first-nav'
else className += 'second-nav'
}
return className
},
tabClick (index) {
this.$emit('update:tabIndex', index)
this.$emit('tabClick',index)
}
}
}
</script>
<style scoped lang='scss'>
.type-tab {
position: relative;
.type-box {
position: relative;
display: flex;
width: 100%;
background-color: #eef4fe;
height: toRpx(160);
line-height: toRpx(128);
border-radius: toRpx(48) toRpx(48) 0 0;
overflow: hidden;
z-index: 0;
.tab-item {
width: toRpx(400);
text-align: center;
font-weight: 500;
font-size: toRpx(40);
color: #1f2133;
.text {
position: relative;
text-align: center;
width: toRpx(400);
}
.active {
position: absolute;
top: 0;
z-index: -1;
font-weight: 700;
font-size: toRpx(40);
color: #2c66f7;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: toRpx(48);
height: toRpx(8);
background-color: #2c66f7;
border-radius: toRpx(16);
}
}
.sprite-icon {
transition: left 0.15s;
}
}
}
.mask-box {
position: absolute;
height: 100vh;
width: 100%;
background: #fff;
left: 0;
top: toRpx(128);
border-radius: toRpx(48);
overflow: hidden;
}
}
</style>
\ No newline at end of file
......@@ -30,6 +30,12 @@
}
},
{
"path": "pages/common/receptionDetail/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup",
"style": {
"disableScroll": true,
......
<template>
<view class="view">
<template v-if="qualityData.length">
<view class="classify-wrap">
<template v-for="(item,index) in qualityData">
<view
:class="['classify-item flex',{active: index == activeIndex}]"
:key="index"
@click="tabClick(item,index)"
>
<view class="title">{{item.tagGroupName}}</view>
<view class="score">{{item.formatScore}}</view>
</view>
</template>
</view>
<scroll-view
class="scroll-view"
enhanced
scroll-y
scroll-with-animation
:scroll-into-view="activeId"
>
<template v-if="qualityData[activeIndex]">
<view class="quality-block">
<view class="title flex">
{{qualityData[activeIndex].tagGroupName}}
<view :class="['matched-btn flex', qualityData[activeIndex].matchedClass]">{{qualityData[activeIndex].matchedText}}</view>
</view>
<template v-for="(item,index) in qualityData[activeIndex].conversationDetailDTOList">
<block :key="index">
<view
v-if="item.text_id"
:id="item.text_id"
:class="['quality-item flex',{active:item.text_id == activeId}]"
@click="seekPlay(item)"
>
<view class="avatar-box">
<view :class="['sprite-icon',`icon-role-${item.role}`]"></view>
<view class="time">{{item.time}}</view>
</view>
<view class="text flex">{{item.content}}</view>
</view>
<template v-if="item.scriptRec">
<view class="script-rec">
<view class="suggestions-box">
<view class="suggestions-title">
<view class="sprite-icon icon-suggestions-icon"></view>
话术推荐
</view>
<view class="text">
<rich-text :nodes="item.scriptRec"></rich-text>
</view>
</view>
</view>
</template>
</block>
</template>
</view>
</template>
</scroll-view>
</template>
<template v-else>
<view class="nothing flex">
<view class="sprite-icon icon-quality-no-data"></view>
分析中,稍等...
</view>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
props: {
qualityData: {
type: Array,
default: () => []
},
qualityAudio: {
type: Object,
default: () => ({})
},
disabled: {
type: Boolean,
default: false
},
disabledText: String
},
data () {
return {
activeIndex: 0,
activeId: ''
}
},
mounted () {
},
methods: {
onTimeUpdate () {
const {
mergedOffset
} = this.setProgress()
this.activeId = `text_${mergedOffset}`
},
setProgress () {
const {
currentTime
} = this.qualityAudio,
mergedOffset = Math.ceil(currentTime)
return {
currentTime,
mergedOffset
}
},
seekPlay (item) {
let { activeId } = this
this.$emit('seek', item.mergedOffset)
if (item.text_id == activeId) {
const {
paused
} = this.qualityAudio
if (paused) this.$emit('onPlay')
else this.$emit('onPause')
this.$emit('changeOperate', !paused)
} else {
this.$emit('onPlay')
this.$emit('changeOperate', false)
}
},
tabClick (item, index) {
if (this.activeIndex == index) return
if (this.disabled && this.disabledText) return uni.showToast({
title: this.disabledText,
icon: 'none',
mask: true,
duration: 2e3
})
this.activeIndex = index
this.$emit('tabClick', item)
}
}
}
</script>
<style scoped lang='scss'>
.view {
height: 100%;
width: 100%;
position: relative;
.classify-wrap {
width: 100%;
height: toRpx(112);
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
.classify-item {
min-width: toRpx(160);
height: 100%;
padding: 0 toRpx(24);
flex-shrink: 0;
justify-content: center;
flex-direction: column;
line-height: toRpx(40);
font-size: toRpx(28);
transition: all 0.15s;
background: #f5f9ff;
.title {
color: #757980;
}
.score {
color: #347bff;
font-weight: 600;
}
}
.active {
border-radius: toRpx(16) toRpx(16) 0 0;
background: #ffffff;
.title {
color: #292d33;
font-weight: 600;
}
}
}
.scroll-view {
height: calc(100% - #{toRpx(112)});
}
.quality-block {
.title {
height: toRpx(80);
background: linear-gradient(119.9deg, #e1f7fc 0%, #f3f7ff 27%, #f7f2ff 41%, #e8f1ff 66%, #f7f2ff 100%);
font-size: toRpx(28);
font-weight: 600;
padding: 0 toRpx(20);
&::before {
content: '';
width: toRpx(8);
height: toRpx(8);
background: #000000;
border-radius: 100%;
display: block;
margin-right: toRpx(16);
}
.matched-btn {
margin-left: auto;
height: toRpx(56);
border-radius: toRpx(28);
background: #ffffff;
padding: 0 toRpx(36);
color: #eb4e4e;
font-size: toRpx(24);
font-weight: 600;
}
.hit {
color: #35c376;
}
}
.quality-item {
padding: toRpx(20) toRpx(24);
background: #fff;
.avatar-box {
position: relative;
width: toRpx(68);
height: toRpx(96);
flex-shrink: 0;
display: flex;
align-items: center;
flex-direction: column;
.sprite-icon {
border-radius: 100%;
overflow: hidden;
flex-shrink: 0;
}
.time {
width: toRpx(70);
height: toRpx(28);
background: #ffffff;
border: toRpx(2) solid #f0f6ff;
border-radius: toRpx(28);
font-size: toRpx(20);
color: #999ea8;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
}
.text {
width: toRpx(722);
min-height: toRpx(80);
color: #292d33;
font-size: toRpx(26);
margin-left: toRpx(16);
line-height: toRpx(44);
}
}
.active {
background: #f0f6ff;
.text {
font-weight: 500;
}
}
.script-rec {
padding: toRpx(24);
.suggestions-box {
background: #ffffff;
border-radius: toRpx(16);
padding: toRpx(24) toRpx(28);
box-sizing: border-box;
.suggestions-title {
display: flex;
align-items: center;
font-weight: 500;
font-size: toRpx(28);
color: #333333;
margin-bottom: toRpx(20);
.sprite-icon {
margin-right: toRpx(12);
}
}
.text {
color: #292d33;
font-size: toRpx(26);
line-height: toRpx(44);
}
.suggestions-text {
padding-bottom: toRpx(22);
border-bottom: toRpx(2) solid #f0f6ff;
margin-bottom: toRpx(24);
}
}
}
.active {
background: #f0f6ff;
.text {
font-weight: 500;
}
}
}
.nothing {
width: 100%;
height: 100%;
flex-direction: column;
justify-content: center;
color: #808291;
font-size: toRpx(28);
background: #fff;
}
}
</style>
\ No newline at end of file
<template>
<div class="quality-table-box">
<reception-title
title="质检明细"
icon="reception-2"
/>
<div class="quality-table">
<view class="quality-title-box flex">
<template v-for="(i,index) in qualityTitle">
<view
:class="['title-item flex',`row-${index + 1}`]"
:key="index"
>{{i}}</view>
</template>
</view>
<view class="quality-content">
<scroll-view
class="table"
scroll-y
>
<template v-if="flag">
<template v-for="(i,index) in qualityData">
<view
class="quality-item"
:key="index"
>
<template v-for="(key,ind) in keyList">
<div
:key="`${index}-${ind}`"
:class="['flex item',`row-${ind + 1}`]"
>
<template v-if="key == 'hitTextList'">
<view class="text-two-line">
<template v-if="i[key] && i[key].length">
<template v-for="(k,kindex) in i[key]">
<rich-text
@click="open(i)"
:key="`text_${index}_${kindex}`"
:nodes="k"
></rich-text>
</template>
</template>
<template v-else>暂无命中文本</template>
</view>
</template>
<template v-else>
{{i[key]}}
</template>
</div>
</template>
</view>
</template>
</template>
</scroll-view>
</view>
</div>
<uni-popup
ref="popup"
type="bottom"
>
<view class="detail-box">
<view
class="close-box flex"
@click="close"
>
<uni-icons
type="clear"
:size="28"
color="#76787f"
></uni-icons>
</view>
<view class="title">{{hitTextDetail.tagGroupName}} {{hitTextDetail.formatScore}}</view>
<view class="content">
<template v-for="(k,kindex) in hitTextDetail.hitTextList">
<rich-text
:key="`text_${kindex}`"
:nodes="k"
></rich-text>
</template>
</view>
</view>
</uni-popup>
</div>
</template>
<script type='text/ecmascript-6'>
import ReceptionTitle from './ReceptionTitle.vue'
export default {
components: {
ReceptionTitle
},
name: '',
props: {
qualityData: {
type: Array,
default: () => []
}
},
data () {
return {
qualityTitle: Object.freeze(['一级分类', '质检得分', '命中文本']),
flag: true,
qualityList: [],
keyList: Object.freeze(['tagGroupName', 'formatScore', 'hitTextList']),
hitTextDetail: []
}
},
mounted () {
},
methods: {
open (hitTextDetail) {
this.hitTextDetail = hitTextDetail
this.$refs.popup.open("center");
},
close () {
this.$refs.popup.close()
}
}
}
</script>
<style scoped lang='scss'>
.quality-table-box {
height: calc(100% - #{toRpx(268)});
.quality-table {
height: calc(100% - #{toRpx(136)});
width: 100%;
box-sizing: border-box;
border-radius: toRpx(16);
overflow: hidden;
.quality-title-box {
height: toRpx(88);
background: #edf3ff;
border-radius: toRpx(16) toRpx(16) 0 0;
font-size: toRpx(26);
line-height: toRpx(40);
.title-item {
height: toRpx(88);
justify-content: center;
box-sizing: border-box;
flex-shrink: 0;
color: #000;
}
}
.row-1 {
width: toRpx(272);
}
.row-2 {
width: toRpx(248);
border-right: toRpx(4) solid #fff;
border-left: toRpx(4) solid #fff;
}
.row-3 {
width: calc(100% - #{toRpx(520)});
}
.quality-content {
height: calc(100% - #{toRpx(88)});
display: flex;
box-sizing: border-box;
border-top: toRpx(4) solid #ffffff;
.table {
height: 100%;
.quality-item {
display: flex;
border-bottom: toRpx(4) solid #ffffff;
color: #333;
.item {
min-height: toRpx(84);
background: #f7f8fa;
height: auto;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
box-sizing: border-box;
}
.row-3 {
padding: toRpx(24) toRpx(48);
justify-content: flex-start;
}
}
}
}
}
}
.detail-box {
position: relative;
width: toRpx(1020);
max-height: toRpx(640);
border-radius: toRpx(40);
padding: 0 toRpx(64) toRpx(88);
box-sizing: border-box;
overflow: hidden;
&::before {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: toRpx(240);
background-image: linear-gradient(180deg, #e5edfe 0%, #ffffff 100%);
content: '';
z-index: -1;
}
&::after {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
content: '';
background-color: #fff;
z-index: -2;
}
.icon-bao {
position: absolute;
top: toRpx(48);
right: toRpx(68);
}
.close-box {
position: absolute;
width: toRpx(136);
height: toRpx(136);
top: 0;
right: 0;
justify-content: center;
z-index: 2;
}
.title {
font-weight: 500;
font-size: toRpx(40);
color: #292d33;
line-height: toRpx(64);
padding: toRpx(24) 0;
}
.content {
max-height: toRpx(400);
font-size: toRpx(30);
color: #292d33;
line-height: toRpx(48);
overflow-y: auto;
word-break: break-all;
}
}
</style>
\ No newline at end of file
<template>
<div class="title flex">
<div :class="['sprite-icon',`icon-${icon}`]"></div>
{{title}}
</div>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
title: String,
icon: String
},
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.title {
padding: toRpx(24) 0;
color: #333333;
font-size: toRpx(32);
font-weight: 500;
line-height: toRpx(40);
.sprite-icon {
margin-right: toRpx(12);
}
}
</style>
\ No newline at end of file
<template>
<div class="tags-box">
<reception-title
title="话术标签"
icon="reception-1"
/>
<div class="tags-flex flex">
<template v-for="(i ,index) in tags">
<div
:key="index"
class="tag flex"
>{{i}}</div>
</template>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import ReceptionTitle from './ReceptionTitle.vue'
export default {
components: {
ReceptionTitle
},
data () {
return {
tags: []
}
},
props: {
batchId: [String, Number]
},
watch: {
batchId: {
handler (val) {
if (val) this.getTags(val)
},
immediate: true
}
},
mounted () {
},
methods: {
async getTags (batchId) {
const res = await uni.$api.receptionApi.findRecordingTagByBatchId({
batchId
})
let tags = []
res.map(e =>{
tags.push(`${e.tagGroupName}-${e.tagName}`)
})
this.tags = tags
}
}
}
</script>
<style scoped lang='scss'>
.tags-box {
padding-bottom: toRpx(24);
.tags-flex {
gap: toRpx(20);
flex-wrap: wrap;
.tag {
height: toRpx(64);
border-radius: toRpx(16);
background: #edf3ff;
padding: 0 toRpx(20);
color: #4673ff;
font-size: toRpx(28);
}
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!