Commit da91f5bc by 李伟康

commit 增加画笔

1 parent 61c12612
...@@ -970,7 +970,7 @@ export default { ...@@ -970,7 +970,7 @@ export default {
position: absolute; position: absolute;
background: rgba(0, 0, 0, 0); background: rgba(0, 0, 0, 0);
pointer-events: none; pointer-events: none;
z-index: 9; z-index: 99;
} }
.draw-canvas { .draw-canvas {
pointer-events: auto; pointer-events: auto;
......
<template> <template>
<view class="container" @click="hideSelect"> <view
class="container"
@click="hideSelect"
>
<wnCanvas
:canvasId="`c-${madiaId}`"
:drawStatus="penSwitch"
custom
:scaleSwitch="false"
ref="caseCanvas"
>
<template slot="customContent">
<view class="bg"></view> <view class="bg"></view>
<view class="box"> <view class="box">
<view class="select-box"> <view class="select-box">
<view class="select" @click.stop="selectType"> <view
class="select"
@click.stop="selectType"
>
{{selectIndex}} {{selectIndex}}
<view class="sprite-icon icon-arrow-bottom"></view> <view class="sprite-icon icon-arrow-bottom"></view>
</view> </view>
<view class="pop-box" v-show="isSelect"> <view
<view v-for="i in selectList" :key="i.label" class="type-item" :class="i.value == selectIndex ? 'active' : ''" @click="chooseType(i)">{{i.label}}</view> class="pop-box"
v-show="isSelect"
>
<view
v-for="i in selectList"
:key="i.label"
class="type-item"
:class="i.value == selectIndex ? 'active' : ''"
@click="chooseType(i)"
>{{i.label}}</view>
<!-- <view class="type-item active">全部</view> <!-- <view class="type-item active">全部</view>
<view class="type-item">视频</view> <view class="type-item">视频</view>
<view class="type-item">图片</view> <view class="type-item">图片</view>
...@@ -85,6 +108,8 @@ ...@@ -85,6 +108,8 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</template>
</wnCanvas>
<view <view
class="popup-box" class="popup-box"
v-if="popupShow" v-if="popupShow"
...@@ -137,11 +162,9 @@ export default { ...@@ -137,11 +162,9 @@ export default {
} }
}, },
props: { props: {
views: { show: Boolean,
type: Array, madiaId: Number,
default: () => [] penSwitch: Boolean,
},
show: Boolean
}, },
computed: { computed: {
watchStatus () { watchStatus () {
...@@ -150,7 +173,7 @@ export default { ...@@ -150,7 +173,7 @@ export default {
}, },
watch: { watch: {
watchStatus: { watchStatus: {
handler(val) { handler (val) {
this.selectIndex = '全部' this.selectIndex = '全部'
// console.log(val) // console.log(val)
// this.name = ''; // this.name = '';
...@@ -161,19 +184,19 @@ export default { ...@@ -161,19 +184,19 @@ export default {
immediate: true immediate: true
}, },
show: { show: {
handler(newValue) { handler (newValue) {
if(newValue) this.init() if (newValue) this.init()
}, },
immediate:true immediate: true
} }
}, },
mounted() { mounted () {
this.init() this.init()
this.getCategory() this.getCategory()
}, },
methods: { methods: {
playVideo (item) { playVideo (item) {
this.$emit('preview',item) this.$emit('preview', item)
}, },
focus () { focus () {
this.isSearch = true this.isSearch = true
...@@ -192,27 +215,30 @@ export default { ...@@ -192,27 +215,30 @@ export default {
this.name = '' this.name = ''
this.isSearch = false this.isSearch = false
this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex) this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex)
this.clearCanvas()
}, },
input(e) { input (e) {
this.name = e.detail.value this.name = e.detail.value
if (this.name == '') if (this.name == '')
this.isSearch = false this.isSearch = false
// this.list = this.searchList.filter(i => i.name.includes(this.name)) // this.list = this.searchList.filter(i => i.name.includes(this.name))
this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex, this.name) this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex, this.name)
this.clearCanvas()
}, },
selectType() { selectType () {
this.isSelect = !this.isSelect this.isSelect = !this.isSelect
}, },
hideSelect() { hideSelect () {
this.isSelect = false this.isSelect = false
}, },
chooseType(val) { chooseType (val) {
console.log(val) console.log(val)
this.selectIndex = val.value this.selectIndex = val.value
this.isSelect = false this.isSelect = false
this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex, this.name) this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex, this.name)
this.clearCanvas()
}, },
async getCaseList(category = '', name = '') { async getCaseList (category = '', name = '') {
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo; // 44217687 { shopMerchantId } = userInfo; // 44217687
const params = { merchantId: shopMerchantId, category } const params = { merchantId: shopMerchantId, category }
...@@ -226,7 +252,7 @@ export default { ...@@ -226,7 +252,7 @@ export default {
this.scrollTop = 0 this.scrollTop = 0
}, 100); }, 100);
}, },
async getCategory() { async getCategory () {
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo; { shopMerchantId } = userInfo;
const res = await uni.$api.boutiqueApi.getCategory({ merchantId: shopMerchantId }) const res = await uni.$api.boutiqueApi.getCategory({ merchantId: shopMerchantId })
...@@ -238,7 +264,10 @@ export default { ...@@ -238,7 +264,10 @@ export default {
} }
}) })
this.selectList = [...this.selectList, ..._list] this.selectList = [...this.selectList, ..._list]
} },
clearCanvas () {
this.$refs.caseCanvas.clearBoard()
},
}, },
} }
</script> </script>
...@@ -282,7 +311,7 @@ export default { ...@@ -282,7 +311,7 @@ export default {
.pop-box { .pop-box {
width: 368rpx; width: 368rpx;
// height: 248rpx; // height: 248rpx;
background: #FFFFFF; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
padding: 16rpx 0; padding: 16rpx 0;
.type-item { .type-item {
...@@ -294,7 +323,7 @@ export default { ...@@ -294,7 +323,7 @@ export default {
margin-bottom: 0; margin-bottom: 0;
} }
&.active { &.active {
background-color: #ECF1FF; background-color: #ecf1ff;
} }
} }
} }
......
...@@ -146,7 +146,7 @@ export default { ...@@ -146,7 +146,7 @@ export default {
}, },
methods: { methods: {
init () { init () {
if(!this.show) return if (!this.show) return
let { optionals } = this.boutiqueMediaConfig[this.currentCar] let { optionals } = this.boutiqueMediaConfig[this.currentCar]
optionals.map(e => e.checked = false) optionals.map(e => e.checked = false)
this.optionalsList = optionals this.optionalsList = optionals
...@@ -172,6 +172,7 @@ export default { ...@@ -172,6 +172,7 @@ export default {
height: calc(100vh - 236rpx); height: calc(100vh - 236rpx);
box-sizing: border-box; box-sizing: border-box;
margin: 236rpx auto 0; margin: 236rpx auto 0;
animation: show-view-opacity 0.15s forwards;
.views-title-box { .views-title-box {
height: 96rpx; height: 96rpx;
background: #edf2ff; background: #edf2ff;
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
:canvasId="`c-${madiaId}`" :canvasId="`c-${madiaId}`"
:drawStatus="penSwitch" :drawStatus="penSwitch"
custom custom
@scale="$emit('scale',$event)"
:scaleSwitch="false" :scaleSwitch="false"
ref="receptionCanvas" ref="receptionCanvas"
> >
...@@ -186,7 +185,7 @@ export default { ...@@ -186,7 +185,7 @@ export default {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
if (newval) { if (newval) {
if (newval && this.currentItem && this.tabIndex == 0) this.changePreView(this.currentItem, false) if (newval && this.currentItem && this.tabIndex == 0) this.changePreView(this.currentItem, false, false)
} }
} }
} }
...@@ -222,7 +221,7 @@ export default { ...@@ -222,7 +221,7 @@ export default {
}, },
hasOptionals () { hasOptionals () {
let flag = false let flag = false
if(this.show) flag = this.boutiqueMediaConfig[this.currentCarString].optionals && this.boutiqueMediaConfig[this.currentCarString].optionals.length if (this.show) flag = this.boutiqueMediaConfig[this.currentCarString].optionals && this.boutiqueMediaConfig[this.currentCarString].optionals.length
return flag return flag
} }
...@@ -235,7 +234,7 @@ export default { ...@@ -235,7 +234,7 @@ export default {
this.updateViewKey = Date.now() this.updateViewKey = Date.now()
this.clearCanvas() this.clearCanvas()
}, },
changePreView (e, leave = true) { changePreView (e, leave = true, clearBoard = true) {
let { currentItem } = this, let { currentItem } = this,
{ id, carModelName, name, materialType } = e, { id, carModelName, name, materialType } = e,
key = `${carModelName}_${id}`, key = `${carModelName}_${id}`,
...@@ -244,7 +243,7 @@ export default { ...@@ -244,7 +243,7 @@ export default {
this.currentItem = e this.currentItem = e
this.updateViewKey = Date.now() this.updateViewKey = Date.now()
if (this.isPreview) return if (this.isPreview) return
this.clearCanvas() if (clearBoard) this.clearCanvas()
if (value) { if (value) {
value.openCount += 1 value.openCount += 1
value.entryTime = Date.now() value.entryTime = Date.now()
...@@ -374,6 +373,7 @@ export default { ...@@ -374,6 +373,7 @@ export default {
height: calc(100vh - 144rpx); height: calc(100vh - 144rpx);
margin-top: 144rpx; margin-top: 144rpx;
padding: 0 0 64rpx 64rpx; padding: 0 0 64rpx 64rpx;
animation: show-view-opacity 0.15s forwards;
.left-content { .left-content {
width: 1328rpx; width: 1328rpx;
height: 100%; height: 100%;
......
...@@ -433,13 +433,5 @@ export default { ...@@ -433,13 +433,5 @@ export default {
} }
} }
} }
@keyframes show-view-opacity {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<view class="container"> <view class="container">
<wnCanvas
:canvasId="`c-${madiaId}`"
:drawStatus="penSwitch"
custom
:scaleSwitch="false"
ref="historyCanvas"
>
<template slot="customContent">
<view class="bg"></view> <view class="bg"></view>
<view class="box"> <view class="box">
<view class="data-tabs-box"> <view class="data-tabs-box">
...@@ -103,6 +111,8 @@ ...@@ -103,6 +111,8 @@
</template> </template>
</scroll-view> </scroll-view>
</view> </view>
</template>
</wnCanvas>
<MessageBox <MessageBox
ref="historyRef" ref="historyRef"
title="订单商品" title="订单商品"
...@@ -145,7 +155,9 @@ export default { ...@@ -145,7 +155,9 @@ export default {
name: '', name: '',
mixins: [Record], mixins: [Record],
props: { props: {
show: Boolean show: Boolean,
madiaId: Number,
penSwitch: Boolean,
}, },
data () { data () {
return { return {
...@@ -214,6 +226,7 @@ export default { ...@@ -214,6 +226,7 @@ export default {
this.pageNum = 1 this.pageNum = 1
this.groupIndex = index this.groupIndex = index
this.getRecordList() this.getRecordList()
if (!isStart) this.$refs.historyCanvas.clearBoard()
}, },
getRecordList () { getRecordList () {
const { pageNum, pageSize, groupIndex } = this, const { pageNum, pageSize, groupIndex } = this,
......
<template> <template>
<view class="container"> <view class="container">
<wnCanvas
:canvasId="`c-${madiaId}`"
:drawStatus="penSwitch"
custom
:scaleSwitch="false"
ref="invitationCanvas"
>
<template slot="customContent">
<view class="bg"></view> <view class="bg"></view>
<view class="box"> <view class="box">
<view class="input-box"> <view class="input-box">
...@@ -11,14 +19,15 @@ ...@@ -11,14 +19,15 @@
@blur="input($event)" @blur="input($event)"
@focus="focus" @focus="focus"
/> />
<view class="input-tips" v-if="!isSearch" <view
class="input-tips"
v-if="!isSearch"
>搜索客户姓名/电话<uni-icons >搜索客户姓名/电话<uni-icons
type="search" type="search"
class="icon" class="icon"
color="#999" color="#999"
size="20" size="20"
></uni-icons ></uni-icons></view>
></view>
<uni-icons <uni-icons
v-if="isSearch" v-if="isSearch"
type="closeempty" type="closeempty"
...@@ -37,16 +46,20 @@ ...@@ -37,16 +46,20 @@
<template v-if="flag"> <template v-if="flag">
<template v-if="list.length"> <template v-if="list.length">
<template v-for="item in list"> <template v-for="item in list">
<view class="item" :key="item.id" @click="reception(item)">
<view <view
:class="['status flex', 'status_' + formatInvite(item)]" class="item"
>{{ inviteStatus[formatInvite(item)] }}</view :key="item.id"
@click="reception(item)"
> >
<view :class="['status flex', 'status_' + formatInvite(item)]">{{ inviteStatus[formatInvite(item)] }}</view>
<view class="name"> <view class="name">
{{ item.customerName }} {{ item.customerName }}
</view> </view>
<template v-for="(k, ind) in itemObject"> <template v-for="(k, ind) in itemObject">
<view class="info flex" :key="ind"> <view
class="info flex"
:key="ind"
>
<view class="label">{{ k.label }}</view> <view class="label">{{ k.label }}</view>
<view class="value">{{ <view class="value">{{
k.format k.format
...@@ -74,6 +87,8 @@ ...@@ -74,6 +87,8 @@
</template> </template>
</scroll-view> </scroll-view>
</view> </view>
</template>
</wnCanvas>
<MessageBox <MessageBox
ref="receptionTips" ref="receptionTips"
content="是否接待当前客户,确定接待直接进入\n「车型加装选购页」" content="是否接待当前客户,确定接待直接进入\n「车型加装选购页」"
...@@ -89,7 +104,9 @@ import Record from "@/mixin/record"; ...@@ -89,7 +104,9 @@ import Record from "@/mixin/record";
export default { export default {
mixins: [Record], mixins: [Record],
props: { props: {
show: Boolean show: Boolean,
madiaId: Number,
penSwitch: Boolean,
}, },
data () { data () {
return { return {
...@@ -107,13 +124,13 @@ export default { ...@@ -107,13 +124,13 @@ export default {
chooseItem: {} chooseItem: {}
} }
}, },
watch:{ watch: {
show:{ show: {
handler(val) { handler (val) {
if(val) this.init() if (val) this.init()
this.$refs.receptionTips?.close() this.$refs.receptionTips?.close()
}, },
immediate:true immediate: true
} }
}, },
...@@ -121,12 +138,12 @@ export default { ...@@ -121,12 +138,12 @@ export default {
init () { init () {
this.customerNameOrPhone = ''; this.customerNameOrPhone = '';
console.log('init') console.log('init')
setTimeout(()=>{ setTimeout(() => {
this.isSearch = false this.isSearch = false
this.pageNum = 1 this.pageNum = 1
this.flag = false this.flag = false
this.getRecordList() this.getRecordList()
},300) }, 300)
}, },
//已预约的并且预约时间小于当前时间的,显示超时未到店,否则显示已预约 //已预约的并且预约时间小于当前时间的,显示超时未到店,否则显示已预约
...@@ -158,12 +175,14 @@ export default { ...@@ -158,12 +175,14 @@ export default {
this.pageNum = 1 this.pageNum = 1
this.flag = false this.flag = false
this.getRecordList() this.getRecordList()
this.clearCanvas()
}, },
focus () { focus () {
this.isSearch = true this.isSearch = true
}, },
handleClear () { handleClear () {
this.init() this.init()
this.clearCanvas()
}, },
getRecordList () { getRecordList () {
const { pageNum, pageSize, customerNameOrPhone } = this, const { pageNum, pageSize, customerNameOrPhone } = this,
...@@ -184,7 +203,11 @@ export default { ...@@ -184,7 +203,11 @@ export default {
this.$emit('reception', { this.$emit('reception', {
item: this.chooseItem item: this.chooseItem
}) })
}, 200) }, 200),
clearCanvas () {
this.$refs.invitationCanvas.clearBoard()
},
}, },
} }
</script> </script>
...@@ -203,7 +226,7 @@ export default { ...@@ -203,7 +226,7 @@ export default {
height: 800rpx; height: 800rpx;
position: absolute; position: absolute;
left: 0; left: 0;
background-image: url("../../assets/images/boutique/record-bg.png"); background-image: url('../../assets/images/boutique/record-bg.png');
background-size: 100% 100%; background-size: 100% 100%;
top: 0; top: 0;
} }
......
...@@ -8,10 +8,12 @@ ...@@ -8,10 +8,12 @@
font-family: 'number-700'; font-family: 'number-700';
src: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-700-Bold.ttf'); src: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-700-Bold.ttf');
} }
@font-face { @font-face {
font-family: 'number-400'; font-family: 'number-400';
src: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-400-Regular.ttf'); src: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-400-Regular.ttf');
} }
@keyframes show-view { @keyframes show-view {
0% { 0% {
opacity: 0; opacity: 0;
...@@ -73,17 +75,29 @@ ...@@ -73,17 +75,29 @@
} }
@media screen and (min-width: 500px){ @media screen and (min-width: 500px) {
.fixforpc-width{ .fixforpc-width {
min-width: auto !important; min-width: auto !important;
width: fit-content !important; width: fit-content !important;
padding: 20rpx 46rpx !important; padding: 20rpx 46rpx !important;
} }
} }
.select-box{
.select-item{ .select-box {
.select-item {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
} }
@keyframes show-view-opacity {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
\ No newline at end of file \ 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!