Commit 8cb87810 by 张权

三轮bug修复

1 parent 6dacf546
......@@ -106,7 +106,6 @@ export default {
}
},
mounted() {
console.log(this.$globalState, '222323')
if (this.$globalState) {
this.userId = this.$globalState.session.id
}
......
......@@ -124,7 +124,6 @@ export default {
},
addCardLink() {
let span = document.createElement('span')
console.log(this.value, 'this.value')
// span.id = this.getGuid()
// span.setAttribute('style', '-webkit-user-modify: read-only !important;')
let text = '车主朋友,您好!<br>我是您的福利官,欢迎您领取电子质保卡,<br>请点击下方链接进行领取及查看:<br><span style="color:#409eff;">https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/</span><br>祝您用车愉快!<br>'
......@@ -318,7 +317,6 @@ export default {
watch: {
value(val) {
// 非锁定状态下,实时更新innerHTML
console.log(val, 'val')
if (val == '<span><br></span>') {
this.$refs.wTextareaContent.innerHTML = ''
this.value = ''
......
......@@ -218,6 +218,14 @@ export default {
},
// 上传图片
handleImgChange(e, targetItem) {
const imgList = this.previewList.filter(item=>{
return item.attType == 2
})
if(imgList.length==9){
this.$message.error('最多只能上传9张图片!')
document.querySelector('.upload-img').value = ''
return;
}
var reader = new FileReader()
var file = e.srcElement.files[0]
// 默认1MB
......@@ -225,6 +233,7 @@ export default {
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
this.$message.error('上传图片大小不能超过' + limitSize + 'MB!')
document.querySelector('.upload-img').value = ''
return true
}
this.loading = true
......@@ -238,8 +247,8 @@ export default {
image.src = e.target.result
image.onload = () => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
console.log(this.$apis, 789789)
let name = file.name.split('.')
const base64 = name[name.length-1] + '@' + imgFile.split(',')[1]
pictureUpload({ file: base64 }).then(res => {
if (res) {
let len = this.previewList.length - 1
......
......@@ -181,13 +181,19 @@ export default {
}
let preList = [...this.$refs.welcome.previewList]
preList.forEach(item => {
if(item.attType ==1 && !item.attContent.trim()){
item.attContent = '\n'
}
if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
})
preList= preList.filter(item=>{
return item.attType !=1 || item.attContent.trim()
const typeItem = preList.find(item=>{
return item.attType ==1
})
if(!typeItem){
preList.unshift({attType:'1',attContent:'\n'})
}
const targetItem = this.numberTypeList.find(item => {
return item.dictLabel == this.clientType
})
......@@ -307,7 +313,10 @@ export default {
}
.form {
/deep/.el-form-item {
height: 36px;
&:nth-child(-n+2){
height: 36px;
}
// height: 36px;
line-height: 36px;
margin-bottom: 20px;
& > .el-form-item__label {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!