Commit 140ce5a0 by 李伟康

commit 修复

1 parent c9c79915
......@@ -228,7 +228,7 @@ export default {
},
computed: {
watchStatus () {
return this.$store.state.user.canvasStatus
return this.$store.state.user.historyStatus
},
},
mounted (opt) {
......@@ -330,8 +330,16 @@ export default {
this.drawContext.draw(true);
},
// 绘制线条结束
lineEnd () {
console.log(this.startX, this.startY)
lineEnd (x, y) {
if (this.startX == x && this.startY == y && !this.lastX && !this.lastY) {
this.drawContext.beginPath()
this.drawContext.moveTo(this.startX - 1, this.startY - 1)
this.drawContext.lineTo(x + 1, y + 1);
this.drawContext.stroke();
this.drawContext.draw(true);
}
this.lastX = ''
this.lastY = ''
this.drawContext.closePath();
this.begin = false;
},
......@@ -608,11 +616,11 @@ export default {
// console.log("touch结束");
switch (this.mode) {
case "pen":
this.lineEnd()
this.lineEnd(x, y)
break;
case "eraser":
this.drawContext.setFillStyle(this.currentColor)
this.lineEnd()
this.lineEnd(x, y)
break;
case "rect":
this.drawRect(x, y, true);
......
......@@ -118,6 +118,7 @@ export default {
this.setReasonType(0);
uni.$storage.set("storageFile", "");
} catch (error) {
this.$store.dispatch("clearCustomerInfo");
console.log(error)
}
},
......
......@@ -163,6 +163,19 @@ export default {
receptionStatus: -1,
}
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
},
watch: {
watchStatus: {
immediate: true,
handler (newval) {
if (newval) this.receptionStatus = -1
}
},
},
mounted () {
},
......@@ -181,6 +194,7 @@ export default {
},
close () {
this.errorTip = false
this.receptionStatus = -1
this.$refs.formRef.close()
},
// 保存
......
......@@ -109,7 +109,7 @@ export default {
},
computed: {
watchStatus () {
return this.$store.state.user.canvasStatus
return this.$store.state.user.historyStatus
},
penSwitch () {
return this.type != 'preview' && this.drawStatus
......
......@@ -134,7 +134,7 @@
</view>
<view
class="footer-btn cancel flex"
@click="done"
@click="backHome"
>
仍要退出<text>(不推荐)</text>
</view>
......@@ -207,6 +207,7 @@ export default {
return false;
},
onShow () {
this.getSoure();
},
async onReachBottom () {
......@@ -231,6 +232,7 @@ export default {
});
return;
}
this.clearHistory()
this.startAudio();
this.id = this.moduleList[0].id;
this.type = "edit";
......@@ -256,6 +258,7 @@ export default {
let { id } = this.chooseItem;
this.type = "preview";
this.id = id;
this.clearHistory()
this.$refs.previewRef.close();
},
// 完成接待
......@@ -266,15 +269,18 @@ export default {
setTimeout(() => {
this.id = "";
this.type = "";
this.$store.dispatch("clearCanvas", true);
this.$store.dispatch("clearHistory", true);
this.setReceptionStatus(e);
}, 1500);
},
back () {
if (!this.id) return uni.navigateBack();
if (this.type != "preview") return this.$refs.finish.open();
this.$store.dispatch("clearCustomerInfo");
this.$store.dispatch("clearCanvas", true);
this.backHome()
},
backHome () {
this.$refs.finish.close()
this.clearHistory()
this.id = "";
this.type = "";
},
......@@ -291,10 +297,9 @@ export default {
this.type = "preview";
this.id = id;
},
nextStep () {
let { id } = this.moduleList[0]
this.type = 'preview'
this.id = id
clearHistory(){
this.$store.dispatch("clearCustomerInfo");
this.$store.dispatch("clearHistory", true);
},
openStep () {
this.$refs.finish.close()
......
......@@ -149,7 +149,7 @@ export default {
this.stopAudio();
this.infoList = INFO_LIST.map((item) => delete item.imgUrl);
setTimeout(() => {
uni.reLaunch({
uni.redirectTo({
url: "/pages/home/home",
});
}, 1500);
......
......@@ -18,7 +18,7 @@ export default {
salesUuid: "",
staffName: "",
},
canvasStatus:false,
historyStatus:false,
carBrands:[],
employeeList:[],
};
......@@ -51,8 +51,8 @@ export default {
clearCustomerInfo({ commit }) {
commit("clearCustomerInfo");
},
clearCanvas({state}, value = false){
state.canvasStatus = value
clearHistory({state}, value = false){
state.historyStatus = value
},
setCarBrandsList({state},value){
state.carBrands = value
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!