Commit a3e5de16 authored by 13841799530's avatar 13841799530

跳转电子签名返回时候 切换到问题记录,回显问题记录

解润东
2021102902
parent ea1bdbfc
...@@ -107,13 +107,17 @@ export default { ...@@ -107,13 +107,17 @@ export default {
this.init() this.init()
//从session中获取签名生成的图片 //从session中获取签名生成的图片
if(sessionStorage.getItem('resultImg')){ if(sessionStorage.getItem('resultImg')){
console.log(sessionStorage.getItem('resultImg'))
this.resultImg=sessionStorage.getItem('resultImg') this.resultImg=sessionStorage.getItem('resultImg')
} }
//获取图片是否显示的布尔值 //获取图片是否显示的布尔值
if(this.$route.query.isImg){ if(this.$route.query.isImg){
console.log(this.$route.query)
this.istext=false this.istext=false
this.isImg=true this.isImg=true
this.active=1
this.value=this.$route.query.value
this.checkedAll=this.$route.query.checkedAll
this.result=this.$route.query.result
} }
}, },
methods: { methods: {
...@@ -178,7 +182,6 @@ export default { ...@@ -178,7 +182,6 @@ export default {
/* 时间戳转换 */ /* 时间戳转换 */
onConfirm(date) { onConfirm(date) {
this.value = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`; this.value = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
console.log(this.value)
this.showCalendar = false; this.showCalendar = false;
}, },
cancel(){ cancel(){
...@@ -202,8 +205,9 @@ export default { ...@@ -202,8 +205,9 @@ export default {
}, },
//电子签名 //电子签名
sign(){ sign(){
//点击电子签名,保存用户选择的日期和复选框回显值
if(this.finish=='false'){ if(this.finish=='false'){
this.$router.push('/sign') this.$router.push({name:'sign',query:{value:this.value,result:this.result,checkedAll:this.checkedAll}})
} }
}, },
//提交问题记录 //提交问题记录
......
...@@ -27,9 +27,19 @@ export default { ...@@ -27,9 +27,19 @@ export default {
lineColor: 'red', lineColor: 'red',
bgColor: '', bgColor: '',
resultImg: '', resultImg: '',
isCrop: false isCrop: false,
value:'',
result:[],
checkedAll:''
}; };
}, },
mounted(){
if(this.$route.name=='sign'){
this.value=this.$route.query.value
this.result=this.$route.query.result
this.checkedAll=this.$route.query.checkedAll
}
},
methods: { methods: {
handleReset () { handleReset () {
...@@ -41,7 +51,8 @@ export default { ...@@ -41,7 +51,8 @@ export default {
this.$refs.esign.generate().then(res => { this.$refs.esign.generate().then(res => {
this.resultImg = res //把base64赋给img this.resultImg = res //把base64赋给img
//生成图片后存储到session中并跳转把图片是否显示的boolean带过去 //生成图片后存储到session中并跳转把图片是否显示的boolean带过去
this.$router.push({name:'noticeList',query:{isImg:true}}) console.log(this.value)
this.$router.push({name:'noticeList',query:{isImg:true,value:this.value,result:this.result,checkedAll:this.checkedAll}})
sessionStorage.setItem('resultImg',this.resultImg) sessionStorage.setItem('resultImg',this.resultImg)
}).catch(err => { }).catch(err => {
// 画布没有签字时会执行这里 // 画布没有签字时会执行这里
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment