Commit df1744b8 by 李伟康

commit 话术质检

1 parent 50639c7d
......@@ -89,5 +89,10 @@ export default {
getCustomerClueStatistics(data) {
return api.post('dj.api.smartcarlife.customer.clue.statistics.status', data)
},
/**分页查询接待批次列表 */
getInspectionList(data){
return api.post('dj.api.smartcarlife.inspection.conversation.batch.page', data ,[], '/rop-dj-smartcarlife/router')
}
}
\ No newline at end of file
// packageEquity/pages/aiInspection/aiInspection.js
import carLifeApi from '../../carEquityApi'
Page({
/**
......@@ -6,42 +8,23 @@ Page({
*/
data: {
flag: true,
list: [new Array(10)]
list: [new Array(10)],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
num: 88
})
setTimeout(() => {
this.selectComponent('#arc').drawData()
setTimeout(() => {
this.setData({
num: 10
})
this.selectComponent('#arc').drawData()
setTimeout(() => {
this.setData({
num: 50
})
this.selectComponent('#arc').drawData()
setTimeout(() => {
this.setData({
num: 44
})
this.selectComponent('#arc').drawData()
}, 2e3)
}, 2e3)
}, 2e3)
}, 2e3)
this.getInspectionList()
},
changeDate(e) {
console.log(e)
},
async getInspectionList() {
const res = await carLifeApi.getInspectionList({})
console.log(res)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
......
......@@ -57,6 +57,8 @@ Component({
y: width / 2,
innerRadius: this.toRpx(58),
outerRadius: this.toRpx(34),
lineWidth: this.toRpx(22),
arcRadius: this.toRpx(46)
}
this.canvas = canvas
this.drawBackground()
......@@ -89,11 +91,12 @@ Component({
ctx.save()
this.drawTips()
},
drawData(){
const {num} = this.data
this.drawBackground()
drawData() {
const {
num
} = this.data
this.part = Math.ceil(num / 20)
this.fillArc(Start_Angle, 0, Start_Angle + Angle)
if (num) this.fillArc(Start_Angle, 0, Start_Angle + Angle)
},
drawTips(data) {
let {
......@@ -101,8 +104,8 @@ Component({
y,
} = this.arcInfo
x = x / 2
// if (data)
this.ctx.clearRect(x + 15, y / 2 + 15, this.toRpx(45), this.toRpx(60))
this.ctx.clearRect(x + 10, y / 2 + 20, this.toRpx(52), this.toRpx(30))
this.ctx.clearRect(x + 10, y / 2 + 60, this.toRpx(50), this.toRpx(30))
this.drawText({
text: data || '···',
x,
......@@ -124,7 +127,7 @@ Component({
textBaseline: 'middle'
})
},
fillArc(startAngle, index, endAngle) {
const {
ctx,
......@@ -132,8 +135,8 @@ Component({
arcInfo: {
x,
y,
innerRadius,
outerRadius
lineWidth,
arcRadius
},
data: {
num
......@@ -142,10 +145,10 @@ Component({
a = startAngle
let b = startAngle + Math.PI / 70
ctx.beginPath()
ctx.fillStyle = Arc_Data_Background[index]
ctx.arc(x, y, innerRadius, a, b)
ctx.arc(x, y, outerRadius, b, a, true)
ctx.fill()
ctx.strokeStyle = Arc_Data_Background[index]
ctx.lineWidth = lineWidth
ctx.arc(x, y, arcRadius, a, b)
ctx.stroke()
ctx.save()
this.drawImg()
setTimeout(() => {
......@@ -173,23 +176,22 @@ Component({
arcInfo: {
x,
y,
innerRadius,
outerRadius
lineWidth,
arcRadius
}
} = this
let startAngle = Start_Angle
for (let i = 0; i < part; i++) {
ctx.beginPath()
ctx.strokeStyle = Arc_Data_Background[i]
ctx.lineWidth = lineWidth
if (i == part - 1) {
ctx.arc(x, y, innerRadius, startAngle, remainder)
ctx.arc(x, y, outerRadius, remainder, startAngle, true)
ctx.arc(x, y, arcRadius, startAngle, remainder)
} else {
ctx.arc(x, y, innerRadius, startAngle, startAngle + Angle)
ctx.arc(x, y, outerRadius, startAngle + Angle, startAngle, true)
ctx.arc(x, y, arcRadius, startAngle, startAngle + Angle)
}
ctx.fillStyle = Arc_Data_Background[i]
// ctx.fillStyle = Arc_Data_Background[i]
ctx.stroke()
ctx.fill()
startAngle += Angle
}
ctx.save()
......
......@@ -33,7 +33,23 @@ page {
height: 100%;
flex-direction: column;
justify-content: center;
position: relative;
&::after {
content: '';
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
width: var(--fontSize1);
height: var(--fontSize56);
background-color: #E4E8EE;
}
&:last-of-type{
&::after{
display: none;
}
}
.title {
font-weight: 500;
font-size: var(--fontSize22);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!