Commit c3011841 authored by 陈明豪's avatar 陈明豪

Merge remote-tracking branch 'origin/master'

parents 8dbe1f77 d4103beb
......@@ -208,14 +208,18 @@ export default {
const suffix = img === 'jpg' || img === 'png' || img === 'jpeg'
if (!suffix) {
this.$message.error('文件格式不正确, 请上传png/jpg/jpeg图片格式文件')
this.$refs.imageUpload.clearFiles()
// this.$refs.imageUpload.clearFiles()
const arrayLength = this.fileList.length
this.fileList = arrayLength > 0 ? [...this.fileList] : []
return false
}
if (this.fileSize) {
const isLt = file.size / 1024 / 1024 < this.fileSize
if (!isLt) {
this.$modal.msgError(`上传图片大小不能超过 ${this.fileSize} MB`)
this.$refs.imageUpload.clearFiles()
// this.$refs.imageUpload.clearFiles()
const arrayLength = this.fileList.length
this.fileList = arrayLength > 0 ? [...this.fileList] : []
return false
}
}
......@@ -223,7 +227,9 @@ export default {
console.log('nameTest', !nameTest.test(fileName))
if (!nameTest.test(fileName)) {
this.$modal.msgError('不能含有~!@#$^&()_+-[]{};\',.等特殊字符')
this.$refs.imageUpload.clearFiles()
// this.$refs.imageUpload.clearFiles()
const arrayLength = this.fileList.length
this.fileList = arrayLength > 0 ? [...this.fileList] : []
return false
}
// URL.createObjectURL的参数只能是blob或者file类型
......
......@@ -209,14 +209,18 @@ export default {
const suffix = img === 'jpg' || img === 'png' || img === 'jpeg'
if (!suffix) {
this.$message.error('文件格式不正确, 请上传png/jpg/jpeg图片格式文件')
this.$refs.imageUpload.clearFiles()
// this.$refs.imageUpload.clearFiles()
const arrayLength = this.fileList.length
this.fileList = arrayLength > 0 ? [...this.fileList] : []
return false
}
if (this.fileSize) {
const isLt = file.size / 1024 / 1024 < this.fileSize
if (!isLt) {
this.$modal.msgError(`上传图片大小不能超过 ${this.fileSize} MB`)
this.$refs.imageUpload.clearFiles()
// this.$refs.imageUpload.clearFiles()
const arrayLength = this.fileList.length
this.fileList = arrayLength > 0 ? [...this.fileList] : []
return false
}
}
......@@ -224,7 +228,9 @@ export default {
console.log('nameTest', !nameTest.test(fileName))
if (!nameTest.test(fileName)) {
this.$modal.msgError('不能含有~!@#$^&()_+-[]{};\',.等特殊字符')
this.$refs.imageUpload.clearFiles()
// this.$refs.imageUpload.clearFiles()
const arrayLength = this.fileList.length
this.fileList = arrayLength > 0 ? [...this.fileList] : []
return false
}
// URL.createObjectURL的参数只能是blob或者file类型
......
......@@ -99,7 +99,7 @@ color: #333333;"
@change="changePetChildBreedId"
>
<el-option
v-for="(item, index) in petOptions[detailInfo.petBreedId]"
v-for="(item, index) in getChildOptions"
:key="index"
:label="item.label"
:value="item.value"
......@@ -1784,6 +1784,13 @@ export default {
}
},
computed: {
getChildOptions() {
if (this.detailInfo.petBreedId) {
return this.dict.type[this.detailInfo.petBreedId]
} else {
return []
}
},
getSallNum() {
return (data) => {
console.log('111111111111111111111111', data, this.drugOptions)
......@@ -1948,9 +1955,11 @@ export default {
* 设置宠物品种信息
*/
setPetBreed() {
const temp = {}
this.dict.type.pet_breed.forEach(item => {
this.petOptions[item.value] = this.dict.type[item.value]
temp[item.value] = this.dict.type[item.value]
})
this.petOptions = { ...temp }
},
/**
* 改变父级宠物品种回调
......
......@@ -399,3 +399,10 @@ export default {
margin-left: -32px;
}
</style>
<style lang="scss">
.register-modle{
.el-table::before{
display: none;
}
}
</style>
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