|
@@ -18,8 +18,8 @@
|
|
:on-progress="onProgress"
|
|
:on-progress="onProgress"
|
|
:on-success="onSuccess"
|
|
:on-success="onSuccess"
|
|
:on-error="onError"
|
|
:on-error="onError"
|
|
- :width="width"
|
|
|
|
- :height="height"
|
|
|
|
|
|
+ :width="480"
|
|
|
|
+ :height="480"
|
|
>
|
|
>
|
|
<!-- <el-button v-if="listType !== 'picture-card'" :type="type" ref="upload"> -->
|
|
<!-- <el-button v-if="listType !== 'picture-card'" :type="type" ref="upload"> -->
|
|
<el-button
|
|
<el-button
|
|
@@ -103,7 +103,8 @@ export default {
|
|
type: String,
|
|
type: String,
|
|
default: "",
|
|
default: "",
|
|
},
|
|
},
|
|
- // 文件名
|
|
|
|
|
|
+
|
|
|
|
+ // 文件名 multipartFile
|
|
name: {
|
|
name: {
|
|
type: String,
|
|
type: String,
|
|
default: "multipartFile",
|
|
default: "multipartFile",
|
|
@@ -175,13 +176,11 @@ export default {
|
|
|
|
|
|
created() {
|
|
created() {
|
|
// 根据上传类型 变更 上传地址
|
|
// 根据上传类型 变更 上传地址
|
|
- console.log("gadfqwerqewrqr===00==" + this.listType);
|
|
|
|
if (this.listTypes == "picture-rgb") {
|
|
if (this.listTypes == "picture-rgb") {
|
|
this.action = this.obj[this.listTypes];
|
|
this.action = this.obj[this.listTypes];
|
|
} else {
|
|
} else {
|
|
this.action = this.obj[this.listType];
|
|
this.action = this.obj[this.listType];
|
|
}
|
|
}
|
|
- console.log("gadfqwerqewrqr===11==" + this.action);
|
|
|
|
// 回显图片
|
|
// 回显图片
|
|
this.form.file = this.url;
|
|
this.form.file = this.url;
|
|
},
|
|
},
|
|
@@ -192,6 +191,11 @@ export default {
|
|
var platformId = this.$props.platformId;
|
|
var platformId = this.$props.platformId;
|
|
this.form.platformId = platformId;
|
|
this.form.platformId = platformId;
|
|
this.data.platformId = platformId;
|
|
this.data.platformId = platformId;
|
|
|
|
+ this.form.width = this.width;
|
|
|
|
+ this.data.width = this.width;
|
|
|
|
+ this.form.height = this.height;
|
|
|
|
+ this.data.height = this.height;
|
|
|
|
+
|
|
// console.log("beforeUpload:", this.width, this.height)
|
|
// console.log("beforeUpload:", this.width, this.height)
|
|
if (this.width && this.height) {
|
|
if (this.width && this.height) {
|
|
// var w = Number(this.width);
|
|
// var w = Number(this.width);
|
|
@@ -203,6 +207,7 @@ export default {
|
|
typeof this.height === "String" ? Number(this.height) : this.height;
|
|
typeof this.height === "String" ? Number(this.height) : this.height;
|
|
// console.log("传入的:", w, h, "666", typeof this.height === 'string')
|
|
// console.log("传入的:", w, h, "666", typeof this.height === 'string')
|
|
const data = await this.readerImg(file);
|
|
const data = await this.readerImg(file);
|
|
|
|
+
|
|
let _width =
|
|
let _width =
|
|
data.width % w === 0 || w % data.width === 0 ? true : false;
|
|
data.width % w === 0 || w % data.width === 0 ? true : false;
|
|
let _height =
|
|
let _height =
|