|
@@ -485,9 +485,11 @@
|
|
//下载电子信息牌
|
|
//下载电子信息牌
|
|
async createImage() {
|
|
async createImage() {
|
|
try {
|
|
try {
|
|
- const canvas = await html2canvas(this.$refs.canvasImg) // 在这里,将需要转换成图片的部分作为参数传入html2canvas
|
|
|
|
|
|
+ const config = {
|
|
|
|
+ useCORS: true,
|
|
|
|
+ };
|
|
|
|
+ const canvas = await html2canvas(this.$refs.canvasImg,config) // 在这里,将需要转换成图片的部分作为参数传入html2canvas
|
|
const image = canvas.toDataURL() // 将生成的canvas转换为DataURL格式
|
|
const image = canvas.toDataURL() // 将生成的canvas转换为DataURL格式
|
|
- console.log(image) // 可以将image自行存储
|
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.downloadQrCode(image);
|
|
this.downloadQrCode(image);
|
|
})
|
|
})
|
|
@@ -536,6 +538,16 @@
|
|
const blob = new Blob(byteArrays, { type: contentType })
|
|
const blob = new Blob(byteArrays, { type: contentType })
|
|
return blob
|
|
return blob
|
|
},
|
|
},
|
|
|
|
+ getBase64Image(img) {
|
|
|
|
+ let canvas = document.createElement("canvas");
|
|
|
|
+ canvas.width = img.width;
|
|
|
|
+ canvas.height = img.height;
|
|
|
|
+ let ctx = canvas.getContext("2d");
|
|
|
|
+ ctx.drawImage(img, 0, 0, img.width, img.height);
|
|
|
|
+ let dataURL = canvas.toDataURL("image/png");
|
|
|
|
+ return dataURL
|
|
|
|
+ // return dataURL.replace("data:image/png;base64,", "");
|
|
|
|
+ },
|
|
//获取实验室详情 type:1.详情 2.编辑
|
|
//获取实验室详情 type:1.详情 2.编辑
|
|
getSubInfo(row,type){
|
|
getSubInfo(row,type){
|
|
laboratorySubRelInfoGetDetailInfo({ infoId: row.infoId }).then(response => {
|
|
laboratorySubRelInfoGetDetailInfo({ infoId: row.infoId }).then(response => {
|
|
@@ -883,7 +895,7 @@
|
|
flex:1;
|
|
flex:1;
|
|
padding-top:9px;
|
|
padding-top:9px;
|
|
p{
|
|
p{
|
|
- color:#333;
|
|
|
|
|
|
+ color:#000;
|
|
margin:7px 29px 11px 29px;
|
|
margin:7px 29px 11px 29px;
|
|
height:24px;
|
|
height:24px;
|
|
line-height:24px;
|
|
line-height:24px;
|
|
@@ -929,11 +941,11 @@
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
border-bottom-left-radius: 10px;
|
|
border-bottom-left-radius: 10px;
|
|
border-bottom-right-radius: 10px;
|
|
border-bottom-right-radius: 10px;
|
|
- padding:12px 14px;
|
|
|
|
|
|
+ padding:5px 14px;
|
|
p{
|
|
p{
|
|
- font-size:12px;
|
|
|
|
- color:#3D3D3D;
|
|
|
|
- line-height:18px;
|
|
|
|
|
|
+ font-size:14px;
|
|
|
|
+ color:#000;
|
|
|
|
+ line-height:24px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.data-for-img{
|
|
.data-for-img{
|
|
@@ -947,7 +959,7 @@
|
|
display: inline-block;
|
|
display: inline-block;
|
|
height:80px;
|
|
height:80px;
|
|
width:80px;
|
|
width:80px;
|
|
- margin:10px 0 0 6px;
|
|
|
|
|
|
+ margin:18px 0 0 6px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -974,11 +986,11 @@
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
border-bottom-left-radius: 10px;
|
|
border-bottom-left-radius: 10px;
|
|
border-bottom-right-radius: 10px;
|
|
border-bottom-right-radius: 10px;
|
|
- padding:12px 14px;
|
|
|
|
|
|
+ padding:5px 14px;
|
|
p{
|
|
p{
|
|
- font-size:12px;
|
|
|
|
- color:#3D3D3D;
|
|
|
|
- line-height:18px;
|
|
|
|
|
|
+ font-size:14px;
|
|
|
|
+ color:#000;
|
|
|
|
+ line-height:24px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.data-for-img{
|
|
.data-for-img{
|
|
@@ -992,7 +1004,7 @@
|
|
display: inline-block;
|
|
display: inline-block;
|
|
height:80px;
|
|
height:80px;
|
|
width:80px;
|
|
width:80px;
|
|
- margin:10px 0 0 6px;
|
|
|
|
|
|
+ margin:18px 0 0 6px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1020,11 +1032,11 @@
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
border-bottom-left-radius: 10px;
|
|
border-bottom-left-radius: 10px;
|
|
border-bottom-right-radius: 10px;
|
|
border-bottom-right-radius: 10px;
|
|
- padding:12px 14px;
|
|
|
|
|
|
+ padding:9px 14px;
|
|
p{
|
|
p{
|
|
- font-size:12px;
|
|
|
|
- color:#3D3D3D;
|
|
|
|
- line-height:18px;
|
|
|
|
|
|
+ font-size:14px;
|
|
|
|
+ color:#000;
|
|
|
|
+ line-height:24px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.data-for-img{
|
|
.data-for-img{
|
|
@@ -1038,7 +1050,7 @@
|
|
display: inline-block;
|
|
display: inline-block;
|
|
height:80px;
|
|
height:80px;
|
|
width:80px;
|
|
width:80px;
|
|
- margin:16px 0 0 16px;
|
|
|
|
|
|
+ margin:10px 0 0 16px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|