Commit 70ecdeb1 by Lyan

bug

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