Commit d5d9fd9a by 胡悦

Merge branch 'SAAS+V4.55.0' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V4.55.0

2 parents bfcc3779 0b3a39a8
......@@ -34,7 +34,16 @@ module.exports = {
projectName: 'boutique',
...data
})
}
},
/**业绩看板 */
getMerchantPerformance(data){
return http.post({
method: 'dj.api.car.boutique.inspection.findMerchantPerformance',
projectName: 'boutique',
...data
})
},
}
......@@ -63,7 +63,8 @@
</view>
<view class="input-box num-second" v-if="form.goodsTypeList.length">
<template v-for="(item, index) in form.goodsTypeList">
<view class="input-item" :key="index">
<block :key="index">
<view class="input-item" >
<view :class="{ 'label-mark': true, 'label-m': !item.showName }">{{ item.showName }}</view>
<view class="input-label">订单数</view>
<input type="number" class="input" maxlength="3" @input="item.subOrderCount = item.subOrderCount.replace(/\D/g, '')" placeholder="请输入" v-model="item.subOrderCount" />
......@@ -72,6 +73,7 @@
<view class="input-label">产值</view>
<input type="number" class="input" maxlength="7" @input="item.totalPrice = item.totalPrice.replace(/\D/g, '')" placeholder="请输入" v-model="item.totalPrice" />
</view>
</block>
</template>
</view>
</view>
......@@ -117,7 +119,7 @@
</view>
<view class="ratio-panel">
<view class="ratio-item flex-between" v-for="(output, i) in salaryDetail.goodsTypeList">
<view class="ratio-item flex-between" v-for="(output, i) in salaryDetail.goodsTypeList" :key="i">
<view class="ratio-label">{{ output.showName }}提成比例</view>
<view class="ratio-num">{{ output.outputCommissionRatio }}%</view>
</view>
......@@ -147,7 +149,7 @@
</view>
<view class="value-detail">
<template v-for="(output, i) in outputDetail">
<view class="detail-item">
<view class="detail-item" :key="i">
<view class="detail-label">{{ output.label }}</view>
<view class="detail-num">{{ getOutput(output, item) }}{{ output.unit }}</view>
</view>
......
......@@ -50,7 +50,7 @@
</view> -->
<view
class="btn"
@click="$refs.sceneTypeRef.open()"
@click="openScenePopup"
>
<view class="sprite-icon icon-scene-change"></view>
</view>
......@@ -108,18 +108,21 @@ export default {
{
label: "接待中心",
icon: "record",
name: 'ReceptionCenter'
name: 'ReceptionCenter',
eventCode: 'app_reception_center'
},
{
label: "学习中心",
icon: "study",
isTrack: true,
name: 'StudyCenter'
name: 'StudyCenter',
eventCode: 'app_study_center'
},
{
label: "场景集市",
icon: "scene",
name: 'SceneMarket'
name: 'SceneMarket',
eventCode: 'app_scene_market'
}
],
messageData: {
......@@ -253,6 +256,9 @@ export default {
})
},
async changeIndex (index, item) {
if (item.eventCode) uni.$track.add({
eventCode: item.eventCode
})
// if (this.tabIndex == index) return;
// 点击学习中心要跳从北森回后台配置的学习中心,学习中心为3
if (this.tabIndex == index && !item.isTrack) return;
......@@ -382,6 +388,9 @@ export default {
},
jumpPersonCenter () {
if (this.hasPerson) {
uni.$track.add({
eventCode: 'app_personal_center'
})
this.clickHome()
this.$emit('update:tabIndex', 99)
}
......@@ -403,6 +412,12 @@ export default {
uni.reLaunch({
url
})
},
openScenePopup () {
this.$refs.sceneTypeRef.open()
uni.$track.add({
eventCode: 'app_scene_change'
})
}
},
beforeCreate () {
......
......@@ -4,15 +4,15 @@
<view class="sprite-icon icon-customer-flow"></view>
<view class="deliveries flex">
累计交付数
<view class="num">{{formattedNumber('deliveries')}}</view>
<view class="num">{{formattedNumber('cumulativeDeliveryCount')}}</view>
</view>
<view class="touchpoints flex">
实际触客数
<view class="num">{{formattedNumber('touchpoints')}}</view>
<view class="num">{{formattedNumber('actualContactCount')}}</view>
</view>
<view class="touchpoint-rate">
实际触客率
<view :class="['num',{'rate-color':dataShow && pageData.touchpointRate}]">{{formattedNumber('touchpointRate', '%')}}</view>
<view :class="['num',{'rate-color':dataShow && pageData.contactRate}]">{{formattedNumber('contactRate', '%')}}</view>
</view>
</view>
</template>
......@@ -68,7 +68,7 @@ export default {
.touchpoints,
.touchpoint-rate {
position: absolute;
font-size: 20rpx;
font-size: toRpx(20);
box-sizing: border-box;
flex-direction: column;
.num {
......@@ -78,27 +78,27 @@ export default {
.deliveries,
.touchpoints {
color: #ffffff;
width: 400rpx;
height: 128rpx;
left: 32rpx;
width: toRpx(400);
height: toRpx(128);
left: toRpx(32);
.num {
font-size: 24rpx;
font-size: toRpx(24);
font-weight: 500;
}
}
.deliveries {
top: 108rpx;
padding-top: 54rpx;
top: toRpx(108);
padding-top: toRpx(54);
}
.touchpoints {
top: 236rpx;
padding-top: 37rpx;
top: toRpx(236);
padding-top: toRpx(37);
}
.touchpoint-rate {
top: 208rpx;
left: 424rpx;
top: toRpx(208);
left: toRpx(424);
.num {
font-size: 28rpx;
font-size: toRpx(28);
font-weight: 700;
}
.rate-color {
......
......@@ -23,6 +23,10 @@ export default {
PageTabs
},
props: {
pageData: {
type: Object,
default: () => { }
},
dataShow: {
type: Boolean,
default: true
......@@ -79,27 +83,36 @@ export default {
},
methods: {
getServerData () {
//模拟从服务器获取数据时的延时
setTimeout(() => {
let { dataShow, tabIndex } = this,
series = {
hideData: !dataShow,
textSize: 14,
textColor: '#333',
data: [11370, 12370, 10001],
}
if (tabIndex == 0) series.afterUnit = '%'
else series.beforeUnit = '¥'
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
let res = {
categories: ['优秀门店均值', '本门店', '个人'],
series: [series],
let { dataShow, tabIndex, pageData } = this,
{
excellentStoreAvgDealRate,
thisStoreDealRate,
personalDealRate,
excellentStoreAvgDeal,
thisStoreKdj,
personalKdj
} = pageData,
data = tabIndex == 0 ? [
excellentStoreAvgDealRate || 0,
thisStoreDealRate || 0,
personalDealRate || 0
] : [
excellentStoreAvgDeal || 0,
thisStoreKdj || 0,
personalKdj || 0
],
series = {
hideData: !dataShow,
textSize: 14,
textColor: '#333',
data
}
this.chartData = JSON.parse(JSON.stringify(res));
}, 100);
if (tabIndex == 0) series.afterUnit = '%'
else series.beforeUnit = '¥'
this.chartData = {
categories: ['优秀门店均值', '本门店', '个人'],
series: [series],
}
},
changeTab (index) {
this.tabIndex = index
......@@ -115,11 +128,11 @@ export default {
box-sizing: border-box;
padding: toRpx(24);
.tabs {
width: 544rpx;
height: 64rpx;
width: toRpx(544);
height: toRpx(64);
}
.canvas {
height: 260rpx;
height: toRpx(260);
}
}
</style>
\ No newline at end of file
......@@ -3,10 +3,10 @@
<view class="output-value-title">本月产值</view>
<view class="output-value">
<view class="value">
{{formattedNumber('sumOutput')}}<view class="unit">万</view>
{{formattedNumber('actualProduction')}}<view class="unit">万</view>
</view>
<view class="sub-value flex">
个人产值<view class="num">{{formattedNumber('output')}}万</view>
个人产值<view class="num">{{formattedNumber('personalProduction')}}万</view>
</view>
</view>
<view class="output-canvas">
......@@ -17,15 +17,16 @@
/>
</view>
<view class="output-view flex">
<view class="item flex">目标<view class="num">{{formattedNumber('target')}}万</view>
<view class="item flex">目标<view class="num">{{formattedNumber('targetProduction')}}万</view>
</view>
<view class="item flex">达成比例<view class="num">{{formattedNumber('proportion','%')}}</view>
<view class="item flex">达成比例<view class="num">{{formattedNumber('achievementRatio','%')}}</view>
</view>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
import NP from 'number-precision'
export default {
name: '',
props: {
......@@ -42,6 +43,12 @@ export default {
dataShow: {
immediate: true,
handler (newval) {
if (Object.keys(this.chartData).length) this.getServerData()
}
},
pageData: {
immediate: true,
handler (newval) {
this.getServerData()
}
}
......@@ -57,7 +64,6 @@ export default {
color: "#333"
},
subtitle: {
name: "52%",
fontSize: 14,
color: "#4673FF"
},
......@@ -80,20 +86,16 @@ export default {
},
methods: {
getServerData () {
//模拟从服务器获取数据时的延时
setTimeout(() => {
let { dataShow } = this
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
let res = {
series: [
{
hideData: !dataShow,
data: 0.52
}
]
};
this.chartData = JSON.parse(JSON.stringify(res));
}, 100);
let { dataShow } = this
this.opts.subtitle.name = `${NP.times(this.pageData.productionContribution || 0, 100)}%`
this.chartData = {
series: [
{
hideData: !dataShow,
data: this.pageData.productionContribution || 0
}
]
}
},
formattedNumber (key, unit) {
let { dataShow, pageData } = this,
......@@ -116,61 +118,61 @@ export default {
padding: toRpx(24) toRpx(32) 0;
}
.output-value {
padding: 54rpx 0 0 52rpx;
padding: toRpx(54) 0 0 toRpx(52);
.value {
display: flex;
align-items: baseline;
color: #4673ff;
font-size: 40rpx;
line-height: 48rpx;
font-size: toRpx(40);
line-height: toRpx(48);
font-weight: 700;
margin-bottom: 14rpx;
margin-bottom: toRpx(14);
.unit {
color: #333333;
font-size: 26rpx;
font-size: toRpx(26);
font-weight: 400;
margin-left: 4rpx;
line-height: 36rpx;
margin-left: toRpx(4);
line-height: toRpx(36);
}
}
.sub-value {
color: #333333;
font-size: 24rpx;
font-size: toRpx(24);
.num {
color: #4673ff;
font-size: 28rpx;
font-size: toRpx(28);
font-weight: 700;
margin-left: 8rpx;
margin-left: toRpx(8);
}
}
}
.output-canvas {
position: absolute;
right: 40rpx;
top: 60rpx;
width: 200rpx;
height: 200rpx;
right: toRpx(40);
top: toRpx(60);
width: toRpx(200);
height: toRpx(200);
}
.output-view {
position: absolute;
left: 50%;
bottom: 32rpx;
bottom: toRpx(32);
transform: translateX(-50%);
width: 528rpx;
height: 58rpx;
border-radius: 450rpx;
width: toRpx(528);
height: toRpx(58);
border-radius: toRpx(450);
background: #4673ff0d;
color: #333333;
font-size: 24rpx;
font-size: toRpx(24);
&::after {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
content: '';
width: 2rpx;
height: 28rpx;
width: toRpx(2);
height: toRpx(28);
background: #cfd4e3;
}
.item {
......@@ -178,9 +180,9 @@ export default {
width: 50%;
flex-shrink: 0;
.num {
margin-left: 8rpx;
margin-left: toRpx(8);
color: #4673ff;
font-size: 28rpx;
font-size: toRpx(28);
font-weight: 700;
}
}
......
......@@ -10,8 +10,14 @@
</view>
<view class="select-box-list select-component flex">
<template v-if="tabIndex == 0">
<select-component :selectList="orderTypeList" />
<select-component :selectList="receptionTypeList" />
<select-component
:selectList="orderTypeList"
@chooseType="searchReceptionList($event,'orderFinishFlag')"
/>
<select-component
:selectList="receptionTypeList"
@chooseType="searchReceptionList($event,'reviewFlag')"
/>
</template>
</view>
<template v-if="tabIndex == 1">
......@@ -27,6 +33,18 @@
scroll-y
@scrolltolower="pageonReachBottom"
>
<view
class="record-tips flex"
v-if="isPrePage && list.length && list[0] && list[0].length"
>
<uni-icons
type="info"
:size="16"
color="#FF9D0A"
class="icon"
></uni-icons>
以下非正常结束的接待记录,需要进行信息确认后才能提交到系统。
</view>
<view class="list">
<template v-if="flag">
<template v-if="list.length && list[0] && list[0].length">
......@@ -38,16 +56,33 @@
:key="item.id"
@click="jumpDetail(item)"
>
<template v-if="tabIndex == 0">
<view :class="['status flex', { deal: item.orderFinishFlag }]">
{{item.orderFinishFlag? '成交': '战败'}}
</view>
</template>
<template v-else>
<view :class="['status flex disabled']">
{{isPrePage? '待提交': '待上传'}}
</view>
</template>
<view class="top-right-box flex">
<template v-if="tabIndex == 0">
<view :class="['status flex',`${item.reviewFlag == 0?'deal':'disabled'}`]">
{{item.reviewFlag == 0 ?'已复盘':'未复盘'}}
</view>
<view :class="['status flex', { 'deal': item.orderFinishFlag }]">
{{item.orderFinishFlag? '成交': '战败'}}
</view>
</template>
<template v-else>
<view :class="[
'status flex',
{'disabled':item.receptionStatus !== 1 && item.receptionStatus !== 0 },
{ 'deal': item.receptionStatus == 1 }
]">
<template v-if="item.receptionStatus === 1 || item.receptionStatus === 0">
{{ {
1: '成交',
0: '战败'
}[item.receptionStatus]}}
</template>
<template v-else>
未知
</template>
</view>
</template>
</view>
<view class="name">
{{ item.customerName ? item.customerName : '未填写姓名' }}
</view>
......@@ -59,7 +94,7 @@
:key="ind"
>
<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>
</template>
</view>
......@@ -102,12 +137,12 @@ export default {
{ text: '未提交', dot: () => this.preRecordFailList.length },
]),
orderTypeList: Object.freeze([
{ label: '战败' },
{ label: '成交' },
{ label: '战败', value: 0 },
{ label: '成交', value: 1 },
]),
receptionTypeList: Object.freeze([
{ label: '未复盘' },
{ label: '已复盘' },
{ label: '未复盘', value: 0 },
{ label: '已复盘', value: 1 },
]),
uploadTypeList: Object.freeze([
{ label: '待上传' },
......@@ -129,7 +164,9 @@ export default {
flag: false,
nothing: false,
pageSize: 10,
isPrePage: false
isPrePage: false,
reviewFlag: 0,
orderFinishFlag: 0
}
},
mounted () {
......@@ -162,6 +199,7 @@ export default {
},
jumpDetail (item) {
if (this.tabIndex == 0) { // 已上传 && 新质检
uni.$track.add({ eventCode: item.orderFinishFlag ? 'app_reception_deal' : 'app_reception_defeat' })
const { sceneType } = uni.$storage.get("userInfo");
if (sceneType == 1 || item.checkHistoryFlag != 0) return uni.showToast({
title: '该接待尚不支持复盘',
......@@ -242,15 +280,15 @@ export default {
uni.showLoading({
mask: true
})
const { tabIndex, pageNum, pageSize } = this,
const { tabIndex, pageNum, pageSize, reviewFlag, orderFinishFlag } = this,
userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId, sceneType } = userInfo,
{ list, total } = await uni.$api.commonApi.getReceptionList({
merchantId: shopMerchantId,
pageNum,
pageSize,
startTime: '2024-01-01 00:00:00',
endTime: '2025-07-31 23:59:59',
reviewFlag,
orderFinishFlag,
bussinessType: sceneType == 0 ? 1 : 2, // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
})
uni.hideLoading()
......@@ -300,9 +338,7 @@ export default {
},
pageonReachBottom () {
let { pageNum, total, nothing, pageSize } = this
if (this.firstIndex == 1) {
return
}
if (this.tabIndex == 1) return
if (!nothing) nothing = 'nothing'
if (Math.ceil(total / pageSize) > pageNum) {
this.pageNum += 1
......@@ -315,6 +351,7 @@ export default {
else this.getPreRecordFail()
},
async submitRecord (val) {
this.flag = false
delete val.duration
delete val.startTime
const { maxUploadNum = 10 } = uni.$storage.get('mock_data')
......@@ -337,7 +374,13 @@ export default {
await this.recorder.save(val)
this.getRecordNum()
await this.getPreRecordFail()
},
searchReceptionList ({ item }, name) {
this[name] = item.value
this.resetData()
this.getReceptionList()
}
}
}
</script>
......@@ -375,6 +418,19 @@ export default {
height: calc(100% - #{toRpx(164)});
position: relative;
z-index: 4;
.record-tips {
height: toRpx(76);
background: #f58e341a;
border-radius: toRpx(16);
font-size: toRpx(28);
color: #f58e34;
width: calc(100% - #{toRpx(88)});
margin: 0 auto toRpx(40);
justify-content: center;
.icon {
margin-right: toRpx(8);
}
}
}
.list {
display: flex;
......@@ -389,27 +445,32 @@ export default {
position: relative;
box-shadow: 0 toRpx(8) toRpx(24) 0 #2c66f71a;
border-radius: toRpx(16);
.status {
.top-right-box {
position: absolute;
top: toRpx(24);
right: toRpx(32);
width: toRpx(88);
height: toRpx(44);
background: #fdece9;
color: #f24724;
border-radius: toRpx(4);
font-weight: 500;
font-size: toRpx(24);
justify-content: center;
&.disabled {
gap: 0 toRpx(16);
.status {
width: toRpx(88);
height: toRpx(44);
background: #fdece9;
color: #f24724;
border-radius: toRpx(4);
font-weight: 500;
font-size: toRpx(24);
justify-content: center;
}
.disabled {
background: #f2f2f2;
color: #999999;
}
.deal {
background: #eaf9f1;
color: #35c376;
}
}
.deal {
background: #eaf9f1;
color: #35c376;
}
.name {
font-weight: 500;
font-size: toRpx(32);
......
......@@ -28,7 +28,10 @@
/>
</view>
<view class="linebar-box box">
<line-bar :dataShow="dataShow" />
<line-bar
:dataShow="dataShow"
:pageData="pageData"
/>
</view>
<view class="box">
<output-value
......@@ -124,24 +127,37 @@ export default {
showInfo: false,
customerId: '',
pageData: {
deliveries: 1000000,
touchpoints: 100000,
touchpointRate: 1000.6,
sumOutput: 188.88,
output: 88.88,
target: 2008,
proportion: 9
//门店客流
cumulativeDeliveryCount: 0, //累计交付数
actualContactCount: 0, // 实际触客数
contactRate: 0, // 触客率(实际触客数 / 累计交付数)
excellentStoreAvgDealRate: 0, // 优秀门店均值成交率
thisStoreDealRate: 0, // 本门店成交率
personalDealRate: 0, // 个人成交率
excellentStoreAvgDeal: 0, // 优秀门店均值客单价
thisStoreKdj: 0, // 本门店客单价
personalKdj: 0, // 个人客单价
//本月产值
actualProduction: 0, // 实际完成产值(万元)
personalProduction: 0, // 个人产值(累计成交金额)
targetProduction: 0, // 目标产值(万元)
achievementRatio: 0, // 达成比例 = 实际产值 ÷ 目标产值
productionContribution: 0 // 产值贡献 = 个人产值 ÷ 实际完成产值
}
}
},
mounted () {
this.setTimeProgress()
this.getMerchantPerformance()
},
methods: {
setTimeProgress () {
let nowNum = dayjs().date(),
monthDayNum = dayjs().daysInMonth()
this.timeProgress = parseInt(nowNum / monthDayNum * 100)
this.timeProgress = Math.round(nowNum / monthDayNum * 100)
},
changeType (index, name) {
if (this[name] == index) return // 点击同一个
......@@ -165,7 +181,17 @@ export default {
editCustomer (id) {
this.customerId = id
this.showInfo = true
}
},
async getMerchantPerformance () {
const { shopMerchantId, sceneType } = uni.$storage.get("userInfo"),
res = await uni.$api.receptionApi.getMerchantPerformance({
merchantIdList: shopMerchantId,
sceneType,
startDate: dayjs().startOf('month').format('YYYY-MM-DD'),
endDate: dayjs().endOf('month').format('YYYY-MM-DD')
})
this.pageData = res
},
}
}
</script>
......
......@@ -65,10 +65,11 @@ export default {
},
async jump () {
let { item, sceneMarketLevelTwoItem } = this,
params = `id=${item.id}&specialFlag=1`
// params = `id=${item.id}&specialFlag=${sceneMarketLevelTwoItem.specialFlag ? 1 : 0}`
// params = `id=${item.id}&specialFlag=1`
params = `id=${item.id}&specialFlag=${sceneMarketLevelTwoItem.specialFlag ? 1 : 0}`
// 类型:0-图片;1-视频;2-pdf;3-富文本; 4-Excel; 5-Word
let url = `/pages/common/caseDetail?${params}`
uni.$track.add({ eventCode: 'scene_market', businessId: item.id })
if (item.type != 3) {
uni.showLoading({
mask: true
......@@ -96,19 +97,19 @@ export default {
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 0 16rpx;
padding: 0 toRpx(16);
.status {
position: absolute;
right: 0;
top: 0;
height: 40rpx;
line-height: 40rpx;
height: toRpx(40);
line-height: toRpx(40);
width: fit-content;
padding: 0 12rpx;
font-size: 22rpx;
padding: 0 toRpx(12);
font-size: toRpx(22);
color: #999999;
background: #9999991a;
border-radius: 4rpx;
border-radius: toRpx(4);
}
.status-green {
......@@ -117,69 +118,68 @@ export default {
}
.icon {
width: 128rpx;
height: 128rpx;
margin-right: 16rpx;
width: toRpx(128);
height: toRpx(128);
margin-right: toRpx(16);
flex-shrink: 0;
position: relative;
.image {
width: 100%;
height: 100%;
border-radius: 8rpx;
border-radius: toRpx(8);
overflow: hidden;
}
.label {
display: flex;
align-items: center;
padding: 0 6rpx;
padding: 0 toRpx(6);
position: absolute;
width: fit-content;
color: #ffffff;
left: 8rpx;
top: 8rpx;
height: 28rpx;
left: toRpx(8);
top: toRpx(8);
height: toRpx(28);
background: #00000066;
font-size: 20rpx;
font-size: toRpx(20);
}
}
.text {
width: calc(100% - 144rpx);
width: calc(100% - #{toRpx(144)});
.title {
width: 100%;
// width: calc(100% - 98rpx);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #333333;
font-size: 30rpx;
font-size: toRpx(30);
font-weight: 700;
}
.tags {
display: flex;
align-items: center;
gap: 0 8rpx;
margin: 8rpx 0;
gap: 0 toRpx(8);
margin: toRpx(8) 0;
.tag {
display: flex;
align-items: center;
height: 40rpx;
height: toRpx(40);
background: #75bcff1a;
padding: 0 12rpx;
padding: 0 toRpx(12);
width: fit-content;
color: #2d66f7;
font-size: 22rpx;
border-radius: 4rpx;
font-size: toRpx(22);
border-radius: toRpx(4);
}
}
.date {
color: #999999;
font-size: 24rpx;
font-size: toRpx(24);
}
}
}
......
......@@ -88,30 +88,30 @@ export default {
<style scoped lang='scss'>
.scene-market-box {
height: calc(100vh - 144rpx);
margin: 64rpx 48rpx 0;
border-radius: 48rpx;
height: calc(100vh - #{toRpx(144)});
margin: toRpx(64) toRpx(48) 0;
border-radius: toRpx(48);
background: #ffffff59;
backdrop-filter: blur(16rpx);
box-shadow: inset 0 0 16rpx 0 #ffffff;
backdrop-filter: blur(toRpx(16));
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
box-sizing: border-box;
overflow: hidden;
.scene-market-content {
width: 100%;
height: calc(100% - 128rpx);
height: calc(100% - #{toRpx(128)});
background: #ffffff;
transform: translateY(-32rpx);
transform: translateY(toMinusRpx(32));
box-sizing: border-box;
.tabs {
gap: 24rpx;
padding: 40rpx 44rpx;
gap: toRpx(24);
padding: toRpx(40) toRpx(44);
.tab {
height: 80rpx;
height: toRpx(80);
background: #f2f2f2;
padding: 0 32rpx;
padding: 0 toRpx(32);
color: #666666;
font-size: 28rpx;
border-radius: 16rpx;
font-size: toRpx(28);
border-radius: toRpx(16);
}
.active {
background: #2d66f71a;
......@@ -120,7 +120,7 @@ export default {
}
}
.scene-list {
height: calc(100% - 160rpx);
height: calc(100% - #{toRpx(160)});
}
}
}
......
......@@ -22,7 +22,7 @@
<view :class="['app-content-box right-content',{'show-content-box':tabIndex == 0}]">
<view
class="start"
@click="$emit('start')"
@click="start"
>
<view class="sprite-icon icon-start-text"></view>
</view>
......@@ -273,7 +273,7 @@ export default {
this.tabIndex = 2
return
}
this.$emit('start')
this.start()
},
handleShowPage (name, transfer) {
this.transfer = transfer
......@@ -371,12 +371,21 @@ export default {
}
},
swiperClick (e) {
uni.$track.add({
eventCode: 'app_product_Introduction'
})
this.previewOff = true
this.$emit('swiperClick', e)
},
previewHandler (name, off = false) {
this.previewOff = off
this.$emit(name)
},
start () {
uni.$track.add({
eventCode: 'app_reception_begins'
})
this.$emit('start')
}
}
}
......@@ -425,7 +434,7 @@ export default {
position: fixed;
width: 100%;
height: 100%;
z-index: 1;
z-index: 2;
top: 0;
left: 0;
}
......
......@@ -14,6 +14,8 @@ import utils from './utils/utils'
import logger from './utils/logger'
import { Storage } from './utils/cache/index'
import api from './api/index'
import Track from './utils/Track'
uni.$api = api
// uni.$lock = false
uni.$storage = new Storage()
......@@ -23,6 +25,7 @@ uni.$logger = logger
// uni.$recordManager = RecordManager.getInstance()
uni.$dbTempRecord = new DBRecord()
uni.$dbManager = new DBManager()
uni.$track = new Track()
!(async _ => {
await uni.$dbManager.init()
await uni.$dbTempRecord.init()
......
......@@ -7,12 +7,12 @@ export default {
mounted () {
},
methods: {
async getAiagent (options, agentCode = 'AI7') {
async getAiagent (options, agentCode = 'AI6') {
const { phone } = uni.$storage.get('userInfo'),
[data] = await uni.$api.sceneMarketApi.getAiagent({
ownerShipType: 1,
accountPhone: phone,
agentCode//AI6
agentCode
})
if (data) {
const { sceneType, uuid, phone, channelType = 1 } = uni.$storage.get('userInfo'),
......
......@@ -446,7 +446,7 @@ export default {
.left-menu {
position: absolute;
top: 0;
left: 2.7;
left: 2.7%;
width: 20.4%;
height: toRpx(1296);
border-radius: toRpx(16);
......
......@@ -355,7 +355,7 @@ export default {
[data] = await uni.$api.sceneMarketApi.getAiagent({
ownerShipType: 1,
accountPhone: phone,
agentCode: 'AI7' //AI6
agentCode: 'AI7'
})
if (data) {
const { sceneType, uuid, phone, channelType = 1 } = uni.$storage.get('userInfo'),
......@@ -372,6 +372,7 @@ export default {
if (checkDate) url += `&date=${checkDate}`
if (taskStatus) url += `&practice_status=${taskStatus}`
this.AIUrl = url
// this.AIUrl = 'http://192.168.1.237:3000/chat/fpC9ZzKASEEtzjjD?business_type=12&brand=2444&one_id=266&platformType=1&date=2025-06-25&position=1&businessType=1&brandType=1001&phone=13823254919&no_header=1&practice_status=3&presuppositionProblem=&domain=https%3A%2F%2Faiassistant.glsx.com.cn'
this.setWebviewStyle()
} else uni.showToast({
title: '获取智能体失败',
......@@ -391,8 +392,9 @@ export default {
left: '40.85%',
top: '16.65%',
height: '78.17%',
width: '56.52%',
width: '56.52%'
});
// wv.setCssText( '.chat-panel-bg{background:#f5f9ff !important;}' )
return true; // 成功设置样式
} else {
return false; // 未找到wv
......@@ -412,10 +414,7 @@ export default {
setTimeout(retrySetWebviewStyle, 100);
},
tabClick (item) {
if (item.sumScore > item.score && this.wv) {
// item.tagGroupName
// this.wv.evalJS()
}
if (item.sumScore > item.score && this.wv) this.wv.evalJS(`sendMessage({type:'reset_chat',payload:{message:'${item.tagGroupName}'}})`)
}
}
}
......@@ -624,8 +623,8 @@ export default {
width: 100%;
height: 100%;
.AI-title {
height: 96rpx;
font-size: 36rpx;
height: toRpx(96);
font-size: toRpx(36);
font-weight: 500;
justify-content: center;
color: #333333;
......
......@@ -5237,7 +5237,7 @@ function drawArcbarDataPoints (series, opts, config, context) {
context.setStrokeStyle(fillColor);
context.setLineCap(arcbarOption.lineCap);
context.beginPath();
context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, arcbarOption.startAngle * Math.PI, eachSeries._proportion_ * Math.PI, arcbarOption.direction == 'ccw');
if(eachSeries.data) context.arc(centerPosition.x, centerPosition.y, radius - (arcbarOption.width * opts.pix + arcbarOption.gap * opts.pix) * i, arcbarOption.startAngle * Math.PI, eachSeries._proportion_ * Math.PI, arcbarOption.direction == 'ccw');
context.stroke();
}
drawRingTitle(opts, config, context, centerPosition);
......
const TRACK_INTERVAL_TIME = 30 * 1e3
let TRACK_TIME
import dayjs from 'dayjs'
class Track {
constructor() {
console.log('---------------- 埋点初始化 ----------------')
this.sendTrack()
}
add (data = {}) {
const {
phone: phoneNumber,
name: loginAccount,
uuid,
sceneType: scene,
userType
} = uni.$storage.get('userInfo') || {},
trackList = uni.getStorageSync('TRACK_LIST') || []
let item = {
userType,
loginAccount,
phoneNumber,
uuid,
scene,
prePagePath: '/',
eventTime: dayjs(Date.now()).format('YYYY-MM-DD HH:mm:ss'),
systemSource: 3,
eventType: data.eventType || 0
}
if (data.batchId) item.batchId = data.batchId
if (data.eventCode) item.eventCode = data.eventCode
if (data.businessParam) item.businessParam = JSON.stringify(data.businessParam)
if (data.pagePath) item.pagePath = data.pagePath
if (data.businessId) item.businessId = data.businessId
trackList.push(item)
uni.setStorageSync('TRACK_LIST', trackList)
if (trackList.length > 9) this.sendTrackData()
}
/**定时发送埋点数据 */
sendTrack () {
TRACK_TIME = setInterval(() => {
this.sendTrackData()
}, TRACK_INTERVAL_TIME)
}
async sendTrackData () {
const recordList = uni.getStorageSync('TRACK_LIST') || []
if (recordList.length) {
const res = await uni.$api.commonApi.recordInsert({ recordList })
if (res) uni.setStorageSync('TRACK_LIST', [])
}
}
}
export default Track
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!