Commit 696dc91d authored by miaohaoyun's avatar miaohaoyun

Merge branch 'mhy' into 'master'

Mhy

See merge request !57
parents 08fd94e7 0ff4d752
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -12,6 +12,7 @@
"dependencies": {
"axios": "^0.18.0",
"babel-polyfill": "^6.26.0",
"echarts": "^4.2.1",
"element-ui": "^2.4.6",
"font-awesome": "^4.7.0",
"js-cookie": "^2.2.0",
......
......@@ -169,14 +169,16 @@ export default {
this.dataForm = {
id: 0,
name: '',
remark: ''
remark: '',
}
this.sealUrl = [];
},
// 显示编辑界面
handleEdit: function (params) {
this.dialogVisible = true
this.operation = false
this.dataForm = Object.assign({}, params.row)
this.sealUrl = [];
},
// 编辑
submitForm: function () {
......@@ -302,28 +304,20 @@ export default {
       },
changeSeal(file) {
var This = this;
this.sealUrl.length = 0;
this.sealUrl = [];
this.sealUrl.push(file);
if (this.sealUrl.length > 0) {
var aa;
aa = this.convertImageToBase64();
console.log(aa);
console.log(this.dataForm);
this.convertImageToBase64(function (base64) {
This.dataForm.sealStr = base64;
});
}
},
convertImageToBase64() {
var This = this;
var base64;
convertImageToBase64(callback) {
let reader = new FileReader();
reader.readAsDataURL(this.sealUrl[0].raw);
reader.onload = function (e) {
console.log(this.result.substring(this.result.indexOf(",") + 1));
base64 = this.result.substring(this.result.indexOf(",") + 1);
This.sealUrl[0] = this.result.substring(this.result.indexOf(",") + 1);
callback.call(this, this.result.substring(this.result.indexOf(",") + 1));
}
console.log(This.sealUrl[0]);
console.log(base64);
return base64;
}
},
mounted() {
......
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