Commit 70ecdeb1 by Lyan

bug

parent 3e705fee
......@@ -234,6 +234,7 @@
// 上传之前校验
beforeAvatarUpload (file) {
this.fileUrl = new FormData()
if (file) {
var windowURL = window.URL || window.webkitURL
this.fileUrlStr = windowURL.createObjectURL(file)
......
......@@ -151,9 +151,9 @@
title: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
brief: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// brief: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
levels: [
{ required: true, message: '不能为空', trigger: 'blur' }
]
......@@ -309,6 +309,7 @@
},
// 上传之前校验
beforeAvatarUpload (file) {
this.imgUrl = new FormData()
const isJPG = file.type === 'image/jpeg'
const isPNG = file.type === 'image/png'
const isLt2M = file.size / 1024 / 1024 < 2
......
......@@ -24,7 +24,7 @@
<p v-show="showInfo">{{dataForm.directpath}}</p>
</el-form-item>
<el-form-item label="栏目:" prop="classid">
<el-select v-model="dataForm.classid" @change="getCclassList2" style='width:121px!important' v-show="!showInfo">
<el-select v-model="dataForm.classid" @change="getCclassList2" style='width:121px!important' v-show="!showInfo" clearable>
<!-- <el-option
ref = 'sel1'
v-for="item in classidList"
......@@ -43,7 +43,7 @@
<el-option value="38" label="质检中心"></el-option>
<el-option value="42" label="条码通"></el-option>
</el-select>
<el-select v-model="dataForm.cclassid" style='width:121px!important' v-if="!showInfo" v-show="cclassShow" >
<el-select v-model="dataForm.cclassid" style='width:121px!important' v-if="!showInfo" v-show="cclassShow" clearable>
<el-option
v-for="item in cclassidList"
:key="item.id"
......@@ -211,6 +211,7 @@
created () {
// this.getClassList([5, 9])
this.getCclassList(5)
this.dataForm.cclassid = ''
},
mounted () {
console.log(this.classidList)
......@@ -404,6 +405,7 @@
// 上传之前校验
beforeAvatarUpload (file) {
this.imgUrl = new FormData()
const isJPG = file.type === 'image/jpeg'
const isPNG = file.type === 'image/png'
const isLt2M = file.size / 1024 / 1024 < 2
......
......@@ -273,6 +273,7 @@
// 上传之前校验
beforeAvatarUpload (file) {
this.imgUrl = new FormData()
const isJPG = file.type === 'image/jpeg'
const isPNG = file.type === 'image/png'
const isLt2M = file.size / 1024 / 1024 < 2
......@@ -312,6 +313,7 @@
},
beforeUploadVideo (file) {
this.videoUrl = new FormData()
const isLt100M = file.size / 1024 / 1024 < 10
if (['video/mp4'].indexOf(file.type) === -1) {
this.$message.error('请上传正确的视频格式')
......
......@@ -298,6 +298,7 @@
},
// 上传之前校验
beforeAvatarUpload (file) {
this.imgUrl = new FormData()
const isJPG = file.type === 'image/jpeg'
const isPNG = file.type === 'image/png'
const isLt2M = file.size / 1024 / 1024 < 2
......
......@@ -298,7 +298,7 @@ export default {
method: 'post',
data: this.$http.adornData({
'id': id,
'checkflag': status
'status': status
})
}).then(({data}) => {
if (data && data.code === 0) {
......
......@@ -275,6 +275,7 @@ export default {
},
// 上传之前校验
beforeAvatarUpload (file) {
this.imgUrl = new FormData()
const isJPG = file.type === 'image/jpeg'
const isPNG = file.type === 'image/png'
const isLt2M = file.size / 1024 / 1024 < 2
......
......@@ -240,6 +240,7 @@
},
// 上传之前校验
beforeAvatarUpload (file) {
this.imgUrl = new FormData()
const isJPG = file.type === 'image/jpeg'
const isPNG = file.type === 'image/png'
const isLt2M = file.size / 1024 / 1024 < 2
......
......@@ -237,6 +237,7 @@
},
// 上传之前校验
beforeAvatarUpload (file) {
this.imgUrl = new FormData()
const isJPG = file.type === 'image/jpeg'
const isPNG = file.type === 'image/png'
const isLt2M = file.size / 1024 / 1024 < 2
......
......@@ -240,6 +240,7 @@
},
// 上传之前校验
beforeAvatarUpload (file) {
this.imgUrl = new FormData()
const isJPG = file.type === 'image/jpeg'
const isPNG = file.type === 'image/png'
const isLt2M = file.size / 1024 / 1024 < 2
......
......@@ -240,6 +240,7 @@
},
// 上传之前校验
beforeAvatarUpload (file) {
this.imgUrl = new FormData()
const isJPG = file.type === 'image/jpeg'
const isPNG = file.type === 'image/png'
const isLt2M = file.size / 1024 / 1024 < 2
......
......@@ -333,6 +333,7 @@ export default {
// 上传之前校验
beforeAvatarUpload (file) {
this.imgUrl = new FormData()
const isJPG = file.type === 'image/jpeg'
const isPNG = file.type === 'image/png'
const isLt2M = file.size / 1024 / 1024 < 2
......
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