Commit 47f36a99 by 李伟康

commit 提交

1 parent 11ed422e
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
background-position: calc(100vmin * (1173 / 768) * -0.48934356351236147) calc(100vmin * (1173 / 768) * -0.4215686274509804);} background-position: calc(100vmin * (1173 / 768) * -0.48934356351236147) calc(100vmin * (1173 / 768) * -0.4215686274509804);}
.icon-customer-file { width: calc(100vmin * (1173 / 768) * 0.0443307757885763); height: calc(100vmin * (1173 / 768) * 0.0443307757885763); .icon-customer-file { width: calc(100vmin * (1173 / 768) * 0.0443307757885763); height: calc(100vmin * (1173 / 768) * 0.0443307757885763);
background-position: calc(100vmin * (1173 / 768) * -0.5400682011935208) calc(100vmin * (1173 / 768) * -0.4215686274509804);} background-position: calc(100vmin * (1173 / 768) * -0.5400682011935208) calc(100vmin * (1173 / 768) * -0.4215686274509804);}
.icon-customer-flow { width: calc(100vmin * (1173 / 768) * 0.12617220801364024); height: calc(100vmin * (1173 / 768) * 0.08994032395566923);
background-position: calc(100vmin * (1173 / 768) * -0.5068201193520887) calc(100vmin * (1173 / 768) * 0);}
.icon-day-points { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646); .icon-day-points { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646);
background-position: calc(100vmin * (1173 / 768) * -0.639386189258312) calc(100vmin * (1173 / 768) * -0.47570332480818417);} background-position: calc(100vmin * (1173 / 768) * -0.639386189258312) calc(100vmin * (1173 / 768) * -0.47570332480818417);}
.icon-detail-btn { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655); .icon-detail-btn { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
...@@ -231,10 +233,6 @@ ...@@ -231,10 +233,6 @@
background-position: calc(100vmin * (1173 / 768) * 0) calc(100vmin * (1173 / 768) * -0.340153452685422);} background-position: calc(100vmin * (1173 / 768) * 0) calc(100vmin * (1173 / 768) * -0.340153452685422);}
.icon-setting { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646); .icon-setting { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646);
background-position: calc(100vmin * (1173 / 768) * -0.033674339300937765) calc(100vmin * (1173 / 768) * -0.597612958226769);} background-position: calc(100vmin * (1173 / 768) * -0.033674339300937765) calc(100vmin * (1173 / 768) * -0.597612958226769);}
.icon-short-first-nav { width: calc(100vmin * (1173 / 768) * 0.1773231031543052); height: calc(100vmin * (1173 / 768) * 0.0443307757885763);
background-position: calc(100vmin * (1173 / 768) * -0.2041773231031543) calc(100vmin * (1173 / 768) * -0.4215686274509804);}
.icon-short-second-nav { width: calc(100vmin * (1173 / 768) * 0.1977834612105712); height: calc(100vmin * (1173 / 768) * 0.0443307757885763);
background-position: calc(100vmin * (1173 / 768) * 0) calc(100vmin * (1173 / 768) * -0.4215686274509804);}
.icon-start-text { width: calc(100vmin * (1173 / 768) * 0.0733162830349531); height: calc(100vmin * (1173 / 768) * 0.017050298380221655); .icon-start-text { width: calc(100vmin * (1173 / 768) * 0.0733162830349531); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.329923273657289) calc(100vmin * (1173 / 768) * -0.17689684569479966);} background-position: calc(100vmin * (1173 / 768) * -0.329923273657289) calc(100vmin * (1173 / 768) * -0.17689684569479966);}
.icon-store-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323); .icon-store-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
...@@ -289,5 +287,7 @@ ...@@ -289,5 +287,7 @@
background-position: calc(100vmin * (1173 / 768) * -0.5852514919011083) calc(100vmin * (1173 / 768) * -0.597612958226769);} background-position: calc(100vmin * (1173 / 768) * -0.5852514919011083) calc(100vmin * (1173 / 768) * -0.597612958226769);}
.icon-zj-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323); .icon-zj-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.3205456095481671) calc(100vmin * (1173 / 768) * -0.6312872975277067);} background-position: calc(100vmin * (1173 / 768) * -0.3205456095481671) calc(100vmin * (1173 / 768) * -0.6312872975277067);}
.icon-customer-flow { width: calc(100vmin * (1173 / 768) * 0.12617220801364024); height: calc(100vmin * (1173 / 768) * 0.08994032395566923);
background-position: calc(100vmin * (1173 / 768) * -0.5068201193520887) calc(100vmin * (1173 / 768) * 0);}
\ No newline at end of file \ No newline at end of file
.icon-short-first-nav { width: calc(100vmin * (1173 / 768) * 0.1773231031543052); height: calc(100vmin * (1173 / 768) * 0.0443307757885763);
background-position: calc(100vmin * (1173 / 768) * -0.2041773231031543) calc(100vmin * (1173 / 768) * -0.4215686274509804);}
.icon-short-second-nav { width: calc(100vmin * (1173 / 768) * 0.1977834612105712); height: calc(100vmin * (1173 / 768) * 0.0443307757885763);
background-position: calc(100vmin * (1173 / 768) * 0) calc(100vmin * (1173 / 768) * -0.4215686274509804);}
\ No newline at end of file \ No newline at end of file
<template> <template>
<view class="record-box"> <view class="record-box">
<view :class="['record-content',`${showInfo?'hide-record':'show-record'}`]"> <view class="record-content">
<view class="data-container"> <view class="data-container">
<view class="control-box flex"> <view class="control-box flex">
<view class="tabs flex"> <view class="tabs">
<template> <page-tabs
<view :list="dateList"
v-for="(i, index) in dateList" @changeTab="changeIndex"
:class="['tab flex', { active: dateIndex == index }]" />
:key="index"
@click="changeIndex(index)"
>
{{ i.text }}
</view>
</template>
<view :class="['active-btn', `active-btn-${dateIndex}`]"></view>
</view> </view>
<view class="select-box-list select-component flex"> <view class="select-box-list select-component flex">
<view <view
...@@ -115,7 +108,7 @@ ...@@ -115,7 +108,7 @@
class="icon" class="icon"
src="../../../../assets/images/home/nothing.webp" src="../../../../assets/images/home/nothing.webp"
/> />
暂无接待记录 暂无预录记录
</view> </view>
</template> </template>
</template> </template>
...@@ -126,61 +119,22 @@ ...@@ -126,61 +119,22 @@
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<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="refresh"
/>
<customer-tags
ref="customerTagstVisible"
@select="handleSelect"
title="筛选"
cancelText="清除筛选"
:chooseList="tagsList"
:disabledSwitch="false"
clearSwitch
:sceneNumber="caseParams.scene"
></customer-tags>
</view> </view>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import dayjs from 'dayjs' import dayjs from 'dayjs'
import CustomerInfo from './CustomerInfo.vue' import PageTabs from '@/components/PageTabs.vue'
import CustomerTags from './CustomerTags.vue'
export default { export default {
components: { components: {
CustomerInfo, PageTabs
CustomerTags
}, },
name: '', name: '',
data () { data () {
return { return {
tagsList: [],
typeList: [
{ tabName: '未接待' },
{ tabName: '已接待' },
{ tabName: '客户案例广场' },
],
firstLeft: ['first', 'second', 'three'],
firstClass: ['first-nav', 'second-nav', 'second-nav'],
dateList: [ dateList: [
{ text: '今日到店' }, { text: '今日到店' },
{ text: '全部客户' } { text: '全部客户' },
],
sceneList: [
{ text: '会员权益/升级', id: 0 },
{ text: '轻改升级', id: 1 },
], ],
itemObject: [ itemObject: [
{ label: '车主电话', key: 'ownerPhone' }, { label: '车主电话', key: 'ownerPhone' },
...@@ -197,14 +151,7 @@ export default { ...@@ -197,14 +151,7 @@ export default {
flag: false, flag: false,
nothing: false, nothing: false,
pageSize: 10, pageSize: 10,
customerId: '',
showInfo: false,
caseParams: {
scene: 0,
status: 1,
showChannel: 2,
},
allMerchantStatus: true
} }
}, },
...@@ -277,26 +224,11 @@ export default { ...@@ -277,26 +224,11 @@ export default {
this.flag = true this.flag = true
} }
}, },
formatTime (num) {
let minutes = Math.floor(num / 60) || '0',
seconds = num % 60 || '0'
seconds = seconds < 10 ? `0${seconds}` : seconds
return {
minutes,
seconds
}
},
changeIndex (index) { changeIndex (index) {
if (this.dateIndex == index) return if (this.dateIndex == index) return
this.dateIndex = index this.dateIndex = index
this.refresh() this.refresh()
}, },
changeScene (id) {
if (this.caseParams.scene == id) return
this.tagsList = []
this.caseParams.scene = id
this.refresh()
},
pageonReachBottom () { pageonReachBottom () {
let { pageNum, total, nothing, pageSize } = this let { pageNum, total, nothing, pageSize } = this
if (!nothing) nothing = 'nothing' if (!nothing) nothing = 'nothing'
...@@ -339,8 +271,7 @@ export default { ...@@ -339,8 +271,7 @@ export default {
this.$forceUpdate() this.$forceUpdate()
}, },
editItem (item) { editItem (item) {
this.customerId = item.id || '' this.$emit('editCustomer', item.id || '')
this.showInfo = true
}, },
async delItem (id, index, ind) { async delItem (id, index, ind) {
try { try {
...@@ -348,7 +279,7 @@ export default { ...@@ -348,7 +279,7 @@ export default {
if (res) { if (res) {
this.list[index].splice(ind, 1) this.list[index].splice(ind, 1)
this.$forceUpdate() this.$forceUpdate()
this.$refs.successRef.open() this.$emit('showSuccess')
} }
} catch (error) { } catch (error) {
uni.showToast({ uni.showToast({
...@@ -364,14 +295,6 @@ export default { ...@@ -364,14 +295,6 @@ export default {
animationDuration: 100 animationDuration: 100
}) })
}, },
handleSelect (list) {
this.tagsList = list
this.refresh()
},
allMerchantSwitch () {
this.allMerchantStatus = !this.allMerchantStatus
this.refresh()
}
} }
} }
</script> </script>
...@@ -387,87 +310,27 @@ export default { ...@@ -387,87 +310,27 @@ export default {
border-radius: toRpx(48); border-radius: toRpx(48);
height: 100%; height: 100%;
box-shadow: inset 0 0 toRpx(16) 0 #ffffff; box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border: toRpx(2) solid #fff;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
.control-box { .control-box {
height: 164rpx; height: toRpx(164);
.tabs { .tabs {
display: flex;
justify-content: space-between;
width: toRpx(392); width: toRpx(392);
height: toRpx(84); height: toRpx(84);
background-color: #f2f2f2;
border-radius: toRpx(16);
margin-left: toRpx(44); margin-left: toRpx(44);
position: relative;
&::after {
position: absolute;
z-index: -2;
background: #ffffff;
width: 100%;
height: 100%;
left: 0;
top: 0;
content: '';
}
.tab {
width: toRpx(192);
height: toRpx(76);
justify-content: center;
color: #666666;
font-size: 28rpx;
z-index: 10;
position: relative;
}
.active {
color: #333333;
}
.active-btn {
position: absolute;
width: toRpx(192);
height: toRpx(76);
background: #ffffff;
top: 50%;
transform: translateY(-50%);
transition: all 0.15s;
border-radius: toRpx(16);
}
.active-btn-0 {
left: toRpx(4);
}
.active-btn-1 {
left: toRpx(196);
}
} }
.select-box-list { .select-box-list {
margin-left: auto; margin-left: auto;
gap: 0 40rpx; gap: 0 toRpx(40);
} }
.select-component { .select-component {
margin-right: 44rpx; margin-right: toRpx(44);
} }
} }
} }
} }
.hide-record {
opacity: 0;
}
.show-record {
opacity: 1;
position: relative;
animation: show-box 0.15s forwards;
}
@keyframes show-box {
0% {
left: 100%;
}
100% {
left: 0;
}
}
.record-list { .record-list {
height: calc(100% - #{toRpx(164)}); height: calc(100% - #{toRpx(164)});
box-sizing: border-box; box-sizing: border-box;
...@@ -478,10 +341,9 @@ export default { ...@@ -478,10 +341,9 @@ export default {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: toRpx(40) toRpx(46); gap: toRpx(40) toRpx(46);
padding: 2rpx toRpx(44) 0; padding: toRpx(2) toRpx(44) 0;
.item { .item {
width: toRpx(608); width: toRpx(610);
// width: 608rpx;
background: #ffffff; background: #ffffff;
box-sizing: border-box; box-sizing: border-box;
padding: toRpx(24) toRpx(32); padding: toRpx(24) toRpx(32);
...@@ -601,10 +463,10 @@ export default { ...@@ -601,10 +463,10 @@ export default {
} }
.add-btn { .add-btn {
width: toRpx(244); width: toRpx(244);
height: 72rpx; height: toRpx(72);
border-radius: 16rpx; border-radius: toRpx(16);
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%); background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
font-size: 30rpx; font-size: toRpx(30);
color: #ffffff; color: #ffffff;
justify-content: center; justify-content: center;
.sprite-icon { .sprite-icon {
...@@ -744,7 +606,7 @@ export default { ...@@ -744,7 +606,7 @@ export default {
.nothing { .nothing {
width: 100%; width: 100%;
flex-direction: column; flex-direction: column;
margin-top: toRpx(112); margin-top: toRpx(260);
font-size: toRpx(28); font-size: toRpx(28);
color: #999999; color: #999999;
.icon { .icon {
......
...@@ -2,11 +2,30 @@ ...@@ -2,11 +2,30 @@
<view class="customer-flow-box"> <view class="customer-flow-box">
<view class="customer-flow-title">门店客流情况</view> <view class="customer-flow-title">门店客流情况</view>
<view class="sprite-icon icon-customer-flow"></view> <view class="sprite-icon icon-customer-flow"></view>
<view class="deliveries flex">
累计交付数
<view class="num">{{formattedNumber('deliveries')}}</view>
</view>
<view class="touchpoints flex">
实际触客数
<view class="num">{{formattedNumber('touchpoints')}}</view>
</view>
<view class="touchpoint-rate">
实际触客率
<view :class="['num',{'rate-color':dataShow && pageData.touchpointRate}]">{{formattedNumber('touchpointRate', '%')}}</view>
</view>
</view> </view>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { export default {
props: {
pageData: {
type: Object,
default: () => { }
},
dataShow: Boolean
},
name: '', name: '',
data () { data () {
return { return {
...@@ -15,6 +34,13 @@ export default { ...@@ -15,6 +34,13 @@ export default {
mounted () { mounted () {
}, },
methods: { methods: {
formattedNumber (key, unit) {
let { dataShow, pageData } = this,
num = pageData[key]
if (unit && num) num += unit
if (!dataShow || !num) num = '--'
return num
}
} }
} }
</script> </script>
...@@ -22,18 +48,59 @@ export default { ...@@ -22,18 +48,59 @@ export default {
<style scoped lang='scss'> <style scoped lang='scss'>
.customer-flow-box { .customer-flow-box {
position: relative; position: relative;
height: 422rpx; height: toRpx(422);
.customer-flow-title {
color: #333333; color: #333333;
font-size: 28rpx; .customer-flow-title {
font-size: toRpx(28);
font-weight: 500; font-weight: 500;
padding: 24rpx 32rpx 0; padding: toRpx(24) toRpx(32) 0;
} }
.sprite-icon{ .sprite-icon {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
zoom: 2; zoom: 2;
} }
.deliveries,
.touchpoints,
.touchpoint-rate {
position: absolute;
font-size: 20rpx;
box-sizing: border-box;
flex-direction: column;
.num{
transition: all .15s;
}
}
.deliveries,
.touchpoints {
color: #ffffff;
width: 400rpx;
height: 128rpx;
left: 32rpx;
.num {
font-size: 24rpx;
font-weight: 500;
}
}
.deliveries {
top: 108rpx;
padding-top: 54rpx;
}
.touchpoints {
top: 236rpx;
padding-top: 37rpx;
}
.touchpoint-rate {
top: 208rpx;
left: 424rpx;
.num {
font-size: 28rpx;
font-weight: 700;
}
.rate-color {
color: #4673ff;
}
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<view class="line-bar-box"> <view class="line-bar-box">
<view class="tabs">
<page-tabs
:list="tabList"
@changeTab="changeTab"
/>
</view>
<view class="canvas">
<qiun-data-charts
type="bar"
:opts="opts"
:chartData="chartData"
/>
</view>
</view> </view>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { import PageTabs from '@/components/PageTabs.vue'
export default {
components: {
PageTabs
},
name: '', name: '',
data () { data () {
return { return {
tabList: ['本月转化率', '本月客单价'],
chartData: {},
//您可以通过修改 config-ucharts.js 文件中下标为 ['bar'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
opts: {
fontColor: '#333',
fontSize: 10,
color: ["#2C66F7"],
padding: [9, 80, 0, 0],
enableScroll: false,
legend: {
show: false
},
xAxis: {
disabled: true,
gridColor: '#fff',
},
yAxis: {
axisLineColor: '#cfd4e3'
},
extra: {
bar: {
type: "group",
width: 6,
customColor: ['#389FFF', '#2C66F7'],
barColorList: [
['#389FFF', '#2C66F7'],
['#708DFF', '#6858F5'],
['#94CBFF', '#3283FB']
],
barBorderRadius: [0, 2, 2, 0],
linearType: 'custom',
barBorderCircle: true,
}
}
}
} }
}, },
mounted () { mounted () {
this.getServerData();
}, },
methods: { methods: {
getServerData () {
//模拟从服务器获取数据时的延时
setTimeout(() => {
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
let res = {
categories: ['优秀门店均值', '本门店', '个人'],
series: [
{
textSize: 14,
textColor: '#333',
data: [11370, 12370, 10001],
beforeUnit: '¥',
formatter (value) {
return `¥${value}`
} }
} }
],
};
this.chartData = JSON.parse(JSON.stringify(res));
}, 500);
},
changeTab (index) {
}
}
}
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.line-bar-box{ .line-bar-box {
height: 388rpx; height: toRpx(388);
box-sizing: border-box; box-sizing: border-box;
padding: 24rpx; padding: toRpx(24);
.tabs {
width: 544rpx;
height: 64rpx;
}
.canvas {
height: 210rpx;
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -18,6 +18,6 @@ ...@@ -18,6 +18,6 @@
<style scoped lang='scss'> <style scoped lang='scss'>
.output-value-box{ .output-value-box{
height: 366rpx; height: toRpx(366);
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -2,21 +2,11 @@ ...@@ -2,21 +2,11 @@
<view class="record-box"> <view class="record-box">
<view class="data-container"> <view class="data-container">
<view class="control-box flex"> <view class="control-box flex">
<view class="tabs flex"> <view class="tabs">
<template> <page-tabs
<view :list="tabList"
v-for="(i, index) in tabList" @changeTab="changeTab"
:class="['tab flex', { active: tabIndex == index }]" />
:key="index"
@click="changeTab(index)"
>
{{ i.text }}
<template v-if="index == 1 && preRecordFailList.length">
<view class="dot"></view>
</template>
</view>
</template>
<view :class="['active-btn', `active-btn-${tabIndex}`]"></view>
</view> </view>
<view class="select-box-list select-component flex"> <view class="select-box-list select-component flex">
<template v-if="tabIndex == 0"> <template v-if="tabIndex == 0">
...@@ -48,9 +38,11 @@ ...@@ -48,9 +38,11 @@
:key="item.id" :key="item.id"
@click="jumpDetail(item)" @click="jumpDetail(item)"
> >
<template v-if="tabIndex == 0">
<view :class="['status flex', { deal: item.orderFinishFlag }]"> <view :class="['status flex', { deal: item.orderFinishFlag }]">
{{item.orderFinishFlag? '成交': '战败'}} {{item.orderFinishFlag? '成交': '战败'}}
</view> </view>
</template>
<view class="name"> <view class="name">
{{ item.customerName ? item.customerName : '未填写姓名' }} {{ item.customerName ? item.customerName : '未填写姓名' }}
</view> </view>
...@@ -62,7 +54,7 @@ ...@@ -62,7 +54,7 @@
:key="ind" :key="ind"
> >
<view class="label">{{ k.label }}</view> <view class="label">{{ k.label }}</view>
<view class="value">{{ formatValue(item[k.key], k.key) || '-' }}</view> <view class="value">{{ formatValue(item[k.key], k.key) || '——' }}</view>
</view> </view>
</template> </template>
</view> </view>
...@@ -92,10 +84,11 @@ ...@@ -92,10 +84,11 @@
import dayjs from 'dayjs' import dayjs from 'dayjs'
import SelectComponent from '@/components/SelectComponent.vue' import SelectComponent from '@/components/SelectComponent.vue'
import PageTabs from '@/components/PageTabs.vue'
export default { export default {
inject: ['getRecorder'], inject: ['getRecorder'],
name: '', name: '',
components: { SelectComponent }, components: { SelectComponent, PageTabs },
inject: ['getRecorder'], inject: ['getRecorder'],
data () { data () {
return { return {
...@@ -353,75 +346,22 @@ export default { ...@@ -353,75 +346,22 @@ export default {
border-radius: toRpx(48); border-radius: toRpx(48);
height: 100%; height: 100%;
box-shadow: inset 0 0 toRpx(16) 0 #ffffff; box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border: toRpx(2) solid #fff;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
.control-box { .control-box {
height: 164rpx; height: toRpx(164);
.tabs { .tabs {
display: flex;
justify-content: space-between;
width: toRpx(336); width: toRpx(336);
height: toRpx(84); height: toRpx(84);
background-color: #f2f2f2;
border-radius: toRpx(16);
margin-left: toRpx(44); margin-left: toRpx(44);
position: relative;
&::after {
position: absolute;
z-index: -2;
background: #ffffff;
width: 100%;
height: 100%;
left: 0;
top: 0;
content: '';
}
.tab {
width: toRpx(164);
height: toRpx(76);
justify-content: center;
color: #666666;
font-size: 28rpx;
z-index: 10;
position: relative;
.dot {
position: absolute;
top: 8rpx;
right: 28rpx;
width: 12rpx;
height: 12rpx;
background: #f24724;
border-radius: 100%;
}
}
.active {
color: #333333;
}
.active-btn {
position: absolute;
width: toRpx(164);
height: toRpx(76);
background: #ffffff;
top: 50%;
transform: translateY(-50%);
transition: all 0.15s;
border-radius: toRpx(16);
}
.active-btn-0 {
left: toRpx(4);
}
.active-btn-1 {
left: toRpx(168);
}
} }
.select-box-list { .select-box-list {
margin-left: auto; margin-left: auto;
gap: 0 40rpx; gap: 0 toRpx(40);
} }
.select-component { .select-component {
margin-right: 44rpx; margin-right: toRpx(44);
} }
} }
} }
...@@ -435,9 +375,9 @@ export default { ...@@ -435,9 +375,9 @@ export default {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: toRpx(40) toRpx(46); gap: toRpx(40) toRpx(46);
padding: 2rpx toRpx(44) 0; padding: toRpx(2) toRpx(44) 0;
.item { .item {
width: toRpx(608); width: toRpx(610);
background: #ffffff; background: #ffffff;
box-sizing: border-box; box-sizing: border-box;
padding: toRpx(24) toRpx(32); padding: toRpx(24) toRpx(32);
......
<template> <template>
<view class="reception-box"> <view class="reception-box">
<view :class="['record-box-content',{'hide-record':!showRecord}]"> <view :class="['record-box-content',`${showInfo || !showRecord?'hide-record':'show-record'}`]">
<view class="left box-class"> <view class="left box-class">
<view class="common-title"> <view class="common-title">
业绩看板 业绩看板
...@@ -22,7 +22,10 @@ ...@@ -22,7 +22,10 @@
</view> </view>
</view> </view>
<view class="customer-box box"> <view class="customer-box box">
<customer-flow /> <customer-flow
:pageData="pageData"
:dataShow="dataShow"
/>
</view> </view>
<view class="linebar-box box"> <view class="linebar-box box">
<line-bar /> <line-bar />
...@@ -48,15 +51,20 @@ ...@@ -48,15 +51,20 @@
</view> </view>
</view> </view>
</view> </view>
<view :class="['right-content']"> <view class="mask-box"></view>
<customer-file /> <view :class="['right-content',`${tabIndex != 0?'hide-record':'show-record'}`]">
<customer-file
@showSuccess="$refs.successRef.open()"
ref="customerFile"
@editCustomer="editCustomer"
/>
</view> </view>
<!-- <view class="right-content"> <view :class="['right-content',`${tabIndex != 1?'hide-record':'show-record'}`]">
<record-list <record-list
@openRecordPage="openRecordPage" @openRecordPage="openRecordPage"
ref="recordListRef" ref="recordListRef"
/> />
</view> --> </view>
</view> </view>
</view> </view>
<template v-if="!showRecord"> <template v-if="!showRecord">
...@@ -68,6 +76,23 @@ ...@@ -68,6 +76,23 @@
></save-record> ></save-record>
</view> </view>
</template> </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> </view>
</template> </template>
...@@ -79,6 +104,7 @@ import OutputValue from './OutputValue.vue' ...@@ -79,6 +104,7 @@ import OutputValue from './OutputValue.vue'
import RecordList from './RecordList.vue' import RecordList from './RecordList.vue'
import saveRecord from './saveRecord.vue' import saveRecord from './saveRecord.vue'
import CustomerFile from './CustomerFile.vue' import CustomerFile from './CustomerFile.vue'
import CustomerInfo from './CustomerInfo.vue'
export default { export default {
components: { components: {
CustomerFlow, CustomerFlow,
...@@ -86,7 +112,8 @@ export default { ...@@ -86,7 +112,8 @@ export default {
OutputValue, OutputValue,
RecordList, RecordList,
saveRecord, saveRecord,
CustomerFile CustomerFile,
CustomerInfo,
}, },
name: '', name: '',
...@@ -104,6 +131,13 @@ export default { ...@@ -104,6 +131,13 @@ export default {
]), ]),
firstLeft: Object.freeze(['first', 'second']), firstLeft: Object.freeze(['first', 'second']),
firstClass: Object.freeze(['first-nav', 'second-nav']), firstClass: Object.freeze(['first-nav', 'second-nav']),
showInfo: false,
customerId: '',
pageData: {
deliveries: 1000000,
touchpoints: 100000,
touchpointRate: 1000.6
}
} }
}, },
mounted () { mounted () {
...@@ -134,6 +168,10 @@ export default { ...@@ -134,6 +168,10 @@ export default {
this.handleCancel() this.handleCancel()
this.$refs.recordListRef.submitRecord(val) this.$refs.recordListRef.submitRecord(val)
}, },
editCustomer (id) {
this.customerId = id
this.showInfo = true
}
} }
} }
</script> </script>
...@@ -144,11 +182,11 @@ export default { ...@@ -144,11 +182,11 @@ export default {
position: relative; position: relative;
height: 100vh; height: 100vh;
box-sizing: border-box; box-sizing: border-box;
padding: 64rpx 0 80rpx; padding: toRpx(64) 0 toRpx(80);
display: flex; display: flex;
gap: 0 48rpx; gap: 0 toRpx(48);
visibility: visible; visibility: visible;
transition: all .15s; transition: all 0.15s;
opacity: 1; opacity: 1;
} }
.hide-record { .hide-record {
...@@ -156,6 +194,19 @@ export default { ...@@ -156,6 +194,19 @@ export default {
z-index: -1; z-index: -1;
visibility: hidden; 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 { .box-class {
height: 100%; height: 100%;
background: #ffffff59; background: #ffffff59;
...@@ -165,28 +216,28 @@ export default { ...@@ -165,28 +216,28 @@ export default {
overflow: hidden; overflow: hidden;
} }
.left { .left {
width: 656rpx; width: toRpx(656);
.common-title { .common-title {
.sprite-icon { .sprite-icon {
margin-left: 16rpx; margin-left: toRpx(16);
zoom: 1.5; zoom: 1.5;
} }
.time-box { .time-box {
position: absolute; position: absolute;
left: 48rpx; left: toRpx(48);
bottom: 8rpx; bottom: toRpx(8);
color: #999999; color: #999999;
font-size: 20rpx; font-size: toRpx(20);
.time-bar { .time-bar {
width: 200rpx; width: toRpx(200);
height: 16rpx; height: toRpx(16);
border-radius: 8rpx; border-radius: toRpx(8);
background: #ffffff; background: #ffffff;
overflow: hidden; overflow: hidden;
margin: 0 12rpx; margin: 0 toRpx(12);
.time-line { .time-line {
height: 100%; height: 100%;
border-radius: 8rpx; border-radius: toRpx(8);
background: linear-gradient(90deg, #75bcff 0%, #2c66f7 100%); background: linear-gradient(90deg, #75bcff 0%, #2c66f7 100%);
} }
} }
...@@ -197,23 +248,34 @@ export default { ...@@ -197,23 +248,34 @@ export default {
} }
} }
.box { .box {
border-radius: 32rpx; border-radius: toRpx(32);
background: #ffffff; background: #ffffff;
backdrop-filter: blur(16rpx); backdrop-filter: blur(toRpx(16));
box-shadow: inset 0 0 16rpx 0 #ffffff; box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
margin: 20rpx 32rpx 0; margin: toRpx(20) toRpx(32) 0;
} }
.customer-box { .customer-box {
margin: 24rpx 32rpx 20rpx; margin: toRpx(24) toRpx(32) toRpx(20);
} }
} }
.right { .right {
width: 1354rpx; width: toRpx(1354);
.mask-box {
position: absolute;
height: calc(100% - #{toRpx(128)});
width: 100%;
background: #fff;
left: 0;
top: toRpx(128);
border-radius: toRpx(48);
}
&-content { &-content {
border-radius: 48rpx; width: 100%;
position: absolute;
border-radius: toRpx(48);
background: #ffffff; background: #ffffff;
height: calc(100% - 128rpx); height: calc(100% - #{toRpx(128)});
transform: translateY(-32rpx); transform: translateY(toMinusRpx(32));
} }
.type-box { .type-box {
position: relative; position: relative;
...@@ -291,7 +353,7 @@ export default { ...@@ -291,7 +353,7 @@ export default {
} }
@keyframes left-out { @keyframes left-out {
0% { 0% {
left:0; left: 0;
} }
100% { 100% {
left: 100%; left: 100%;
......
<template>
<view class="tabs-component flex">
<template>
<view
v-for="(i, index) in list"
:class="['tab flex', { active: activeIndex == index }]"
:key="index"
@click="changeTab(index)"
:style="{
width:blockWidth
}"
>
{{ i[tabKey] || i }}
</view>
</template>
<view
class="active-btn"
:style="{
width:blockWidth,
left:activeBlockLeft
}"
></view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
list: Array,
defaultIndex: {
type: Number,
default: 0
},
tabKey: {
type: String,
default: 'text'
}
},
name: '',
watch: {
defaultIndex: {
immediate: true,
handler (newval) {
this.activeIndex = newval || 0
}
}
},
data () {
return {
activeIndex: 0
}
},
computed: {
blockWidth () {
let { list } = this,
width = 1 / list.length * 100
return `calc(${width}% - 4rpx)`
},
activeBlockLeft () {
let { list, activeIndex } = this,
width = 1 / list.length * 100,
left = activeIndex == 0 ? '4rpx' : `${activeIndex * width}%`
return left
}
},
mounted () {
},
methods: {
changeTab (index) {
this.activeIndex = index
this.$emit('changeTab', index)
}
}
}
</script>
<style scoped lang='scss'>
.tabs-component {
display: flex;
justify-content: space-between;
width: 100%;
height: 100%;
background-color: #f2f2f2;
border-radius: toRpx(16);
position: relative;
box-sizing: border-box;
padding: toRpx(4);
&::after {
position: absolute;
z-index: -2;
background: #ffffff;
width: 100%;
height: 100%;
left: 0;
top: 0;
content: '';
}
.tab {
height: calc(100% - #{toRpx(8)});
justify-content: center;
color: #666666;
font-size: toRpx(28);
z-index: 10;
position: relative;
}
.active {
color: #333333;
}
.active-btn {
position: absolute;
height: calc(100% - #{toRpx(8)});
background: #ffffff;
top: 50%;
transform: translateY(-50%);
transition: all 0.15s;
border-radius: toRpx(16);
}
// .active-btn-0 {
// left: toRpx(4);
// }
// .active-btn-1 {
// left: toRpx(196);
// }
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -61,11 +61,11 @@ export default { ...@@ -61,11 +61,11 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
height: 84rpx; height: toRpx(84);
border-radius: 16rpx; border-radius: toRpx(16);
opacity: 1; opacity: 1;
background: #f2f2f2; background: #f2f2f2;
padding: 0 24rpx 0 40rpx; padding: 0 toRpx(24) 0 toRpx(40);
} }
.arrow-bottom { .arrow-bottom {
width: toRpx(48); width: toRpx(48);
...@@ -73,11 +73,11 @@ export default { ...@@ -73,11 +73,11 @@ export default {
} }
.pop-box { .pop-box {
position: absolute; position: absolute;
top: 100rpx; top: toRpx(100);
left: 0; left: 0;
width: 100%; width: 100%;
background: #ffffff; background: #ffffff;
box-shadow: 0 0 16rpx 0 #99999933; box-shadow: 0 0 toRpx(16) 0 #99999933;
border-radius: toRpx(16); border-radius: toRpx(16);
padding: toRpx(16) 0; padding: toRpx(16) 0;
text-align: center; text-align: center;
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</template> </template>
</view> </view>
<view class="component-box"> <view class="component-box">
<dialogue <!-- <dialogue
:class="['component-item',{hide: tabId != 1}]" :class="['component-item',{hide: tabId != 1}]"
:batchId="pageData.batchId" :batchId="pageData.batchId"
:qualityData="qualityData" :qualityData="qualityData"
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
@onPlay="onPlay" @onPlay="onPlay"
@onPause="onPause" @onPause="onPause"
@changeOperate="isOperate = $event" @changeOperate="isOperate = $event"
/> /> -->
<quality <quality
:qualityData="qualityData" :qualityData="qualityData"
:class="['component-item',{hide: tabId != 2}]" :class="['component-item',{hide: tabId != 2}]"
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
</view> </view>
</view> </view>
<view class="reception-right-box"> <view class="reception-right-box">
<template v-if="qualityData.length"> <!-- <template v-if="qualityData.length">
<tags :batchId="pageData.batchId" /> <tags :batchId="pageData.batchId" />
<quality-table :qualityData="qualityData" /> <quality-table :qualityData="qualityData" />
</template> </template>
...@@ -102,10 +102,11 @@ ...@@ -102,10 +102,11 @@
<view class="sprite-icon icon-quality-no-data"></view> <view class="sprite-icon icon-quality-no-data"></view>
分析中,稍等... 分析中,稍等...
</view> </view>
</template> </template> -->
</view> </view>
</view> </view>
</template> </template>
<web-view :src="AIUrl"></web-view>
</view> </view>
</template> </template>
...@@ -126,25 +127,26 @@ export default { ...@@ -126,25 +127,26 @@ export default {
data () { data () {
return { return {
tab: Object.freeze([ tab: Object.freeze([
{ // {
id: 1, // id: 1,
name: '对话', // name: '对话',
componentName: 'dialogue' // componentName: 'dialogue'
}, // },
{ {
id: 2, id: 2,
name: '质检', name: '质检',
componentName: 'quality' componentName: 'quality'
} }
]), ]),
tabId: 1, tabId: 2,
qualityData: [], qualityData: [],
pageData: {}, pageData: {},
qualityAudio: {}, qualityAudio: {},
currentTime: '00:00', currentTime: '00:00',
status: 'pause', status: 'pause',
isOperate: true, isOperate: true,
showPlayControl: false showPlayControl: false,
AIUrl: 'https://www.baidu.com'
} }
}, },
onLoad (options) { onLoad (options) {
...@@ -155,6 +157,8 @@ export default { ...@@ -155,6 +157,8 @@ export default {
_this.pageData = data || {} _this.pageData = data || {}
if (data.batchId) _this.findCheckResultByBatchId(data.batchId) if (data.batchId) _this.findCheckResultByBatchId(data.batchId)
_this.setAudio(data.recordingUrl) _this.setAudio(data.recordingUrl)
_this.setWebviewStyle()
}) })
}, },
onHide () { onHide () {
...@@ -164,9 +168,9 @@ export default { ...@@ -164,9 +168,9 @@ export default {
this.qualityAudio.stop() this.qualityAudio.stop()
}, },
computed: { computed: {
dialogueRef () { // dialogueRef () {
return this.$refs.dialogueRef // return this.$refs.dialogueRef
}, // },
qualityRef () { qualityRef () {
return this.$refs.qualityRef return this.$refs.qualityRef
} }
...@@ -188,7 +192,7 @@ export default { ...@@ -188,7 +192,7 @@ export default {
const { const {
tabId tabId
} = this } = this
this.dialogueRef.isPlayIng = false // this.dialogueRef.isPlayIng = false
this.qualityAudio.pause() this.qualityAudio.pause()
}, },
//播放 //播放
...@@ -221,7 +225,7 @@ export default { ...@@ -221,7 +225,7 @@ export default {
this.qualityAudio.onEnded(() => { this.qualityAudio.onEnded(() => {
this.status = 'ending' this.status = 'ending'
this.currentTime = this.formatTime(this.qualityAudio.duration) this.currentTime = this.formatTime(this.qualityAudio.duration)
this.dialogueRef.isPlayIng = false // this.dialogueRef.isPlayIng = false
this.isOperate = true this.isOperate = true
}) })
}, },
...@@ -229,9 +233,8 @@ export default { ...@@ -229,9 +233,8 @@ export default {
const { const {
tabId tabId
} = this } = this
this.currentTime = this.formatTime(this.qualityAudio.currentTime) this.currentTime = this.formatTime(this.qualityAudio.currentTime)
this.dialogueRef?.onTimeUpdate() // this.dialogueRef?.onTimeUpdate()
this.qualityRef?.onTimeUpdate() this.qualityRef?.onTimeUpdate()
}, },
formatTime (num) { formatTime (num) {
...@@ -338,6 +341,36 @@ export default { ...@@ -338,6 +341,36 @@ export default {
}) })
} }
}, },
setWebviewStyle () {
//修改UA为PC端
const setWebviewStyleWithRetry = () => {
const currentWebview = this.$scope.$getAppWebview()
const wv = currentWebview.children()[0]
if (wv) {
wv.setStyle({
left: '40.75%',
top: '10.4%',
height: '85.42%',
width: '56.52%'
});
return true; // 成功设置样式
} else {
return false; // 未找到wv
}
};
const retrySetWebviewStyle = () => {
if (!setWebviewStyleWithRetry()) {
// 如果未成功,继续重试
setTimeout(retrySetWebviewStyle, 50);
} else {
// 成功设置样式,结束循环
console.log('Webview样式设置成功');
}
};
setTimeout(retrySetWebviewStyle, 100);
}
} }
} }
</script> </script>
...@@ -545,7 +578,7 @@ export default { ...@@ -545,7 +578,7 @@ export default {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
color: #808291; color: #808291;
font-size: 28rpx; font-size: toRpx(28);
background: #fff; background: #fff;
} }
} }
......
...@@ -2060,6 +2060,8 @@ function calYAxisData (series, opts, config, context) { ...@@ -2060,6 +2060,8 @@ function calYAxisData (series, opts, config, context) {
if (opts.type === 'bar') { if (opts.type === 'bar') {
opts.yAxis.data[0].categories = opts.categories; opts.yAxis.data[0].categories = opts.categories;
opts.yAxis.data[0].type = 'categories'; opts.yAxis.data[0].type = 'categories';
//条状图Y轴配置
opts.yAxis.data[0].axisLineColor = opts.yAxis.axisLineColor
} }
} }
} }
...@@ -2377,7 +2379,7 @@ function drawMountPointText (points, series, config, context, opts, zeroPoints) ...@@ -2377,7 +2379,7 @@ function drawMountPointText (points, series, config, context, opts, zeroPoints)
} }
}); });
} }
/**条状图右侧文案 */
function drawBarPointText (points, series, config, context, opts) { function drawBarPointText (points, series, config, context, opts) {
// 绘制数据文案 // 绘制数据文案
var data = series.data; var data = series.data;
...@@ -2392,7 +2394,10 @@ function drawBarPointText (points, series, config, context, opts) { ...@@ -2392,7 +2394,10 @@ function drawBarPointText (points, series, config, context, opts) {
if (typeof data[index] === 'object' && data[index] !== null) { if (typeof data[index] === 'object' && data[index] !== null) {
value = data[index].value; value = data[index].value;
} }
var formatVal = series.formatter ? series.formatter(value, index, series, opts) : value; var formatVal = series.formatter ? series.formatter(value, index, series, opts) : value;
if (series.beforeUnit) formatVal = `${series.beforeUnit}${formatVal}`
if (series.afterUnit) formatVal = `${formatVal}${series.afterUnit}`
context.setTextAlign('left'); context.setTextAlign('left');
context.fillText(String(formatVal), item.x + 4 * opts.pix, item.y + fontSize / 2 - 3); context.fillText(String(formatVal), item.x + 4 * opts.pix, item.y + fontSize / 2 - 3);
context.closePath(); context.closePath();
...@@ -3477,10 +3482,17 @@ function drawBarDataPoints (series, opts, config, context) { ...@@ -3477,10 +3482,17 @@ function drawBarDataPoints (series, opts, config, context) {
grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity)); grd.addColorStop(0, hexToRgb(fillColor, columnOption.linearOpacity));
grd.addColorStop(1, hexToRgb(fillColor, 1)); grd.addColorStop(1, hexToRgb(fillColor, 1));
} else { } else {
if (columnOption.barColorList) {
let [startColor, endColor] = columnOption.barColorList[i]
grd.addColorStop(0, hexToRgb(startColor || fillColor, columnOption.linearOpacity))
grd.addColorStop(1, hexToRgb(endColor || fillColor, columnOption.linearOpacity));
} else {
grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity)); grd.addColorStop(0, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity)); grd.addColorStop(columnOption.colorStop, hexToRgb(columnOption.customColor[eachSeries.linearIndex], columnOption.linearOpacity));
grd.addColorStop(1, hexToRgb(fillColor, 1)); grd.addColorStop(1, hexToRgb(fillColor, 1));
} }
}
fillColor = grd fillColor = grd
} }
// 圆角边框 // 圆角边框
...@@ -4764,6 +4776,7 @@ function drawYAxis (series, opts, config, context) { ...@@ -4764,6 +4776,7 @@ function drawYAxis (series, opts, config, context) {
context.setTextAlign('center'); context.setTextAlign('center');
tmpstrat = tStartLeft - yAxisWidth.width / 2 tmpstrat = tStartLeft - yAxisWidth.width / 2
} }
// 坐标值标题
context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix); context.fillText(String(item), tmpstrat, pos + yAxisFontSize / 2 - 3 * opts.pix);
} else if (yAxisWidth.position == 'right') { } else if (yAxisWidth.position == 'right') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!