bug修改
This commit is contained in:
@@ -271,9 +271,8 @@
|
||||
},
|
||||
methods: {
|
||||
sumber() {
|
||||
console.log('vilidate',this.formInline)
|
||||
// console.log('vilidate',this.formInline)
|
||||
this.$refs.ruleForm1.validate(valid => {
|
||||
console.log('va',valid)
|
||||
if (valid) {
|
||||
let url = ''
|
||||
if (this.formInline.id) {
|
||||
@@ -310,7 +309,12 @@
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.formInline[this.uploadName] = attIdList.join(',')
|
||||
this.formInline = { ...this.formInline }
|
||||
console.log('form',this.formInline)
|
||||
// console.log('form',this.formInline)
|
||||
}else{
|
||||
this.formInline[this.uploadName]=''
|
||||
this.formInline = { ...this.formInline }
|
||||
// console.log('form',this.formInline)
|
||||
|
||||
}
|
||||
},
|
||||
handleInput(value) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
class="ant-upload-list"
|
||||
name="file"
|
||||
:file-list="myfileList"
|
||||
:multiple="true"
|
||||
:multiple="false"
|
||||
:action = 'uploadAction'
|
||||
:headers="headers"
|
||||
:before-upload="beforeUpload"
|
||||
@@ -47,19 +47,23 @@
|
||||
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
|
||||
},
|
||||
methods:{
|
||||
beforeUpload(file) {
|
||||
// console.log(file)
|
||||
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
|
||||
if(file.type==this.accept){
|
||||
this.fileTypeSatus = true;
|
||||
this.$message.destroy()
|
||||
// 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量!
|
||||
this.errorMessage = file.name + "文件大小超出100MB限制, 请压缩或降低文件质量!";
|
||||
beforeUpload(file,fileList) {
|
||||
if(this.myfileList&&this.myfileList.length>=1){
|
||||
this.$message.warning('只能上传一个文件')
|
||||
return false
|
||||
}else{
|
||||
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
|
||||
if(file.type==this.accept){
|
||||
this.fileTypeSatus = true;
|
||||
this.$message.destroy()
|
||||
// 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量!
|
||||
this.errorMessage = file.name + "文件大小超出100MB限制, 请压缩或降低文件质量!";
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
remove(){
|
||||
this.fileTypeSatus = true;
|
||||
// console.log('rrr',this.myfileList)
|
||||
},
|
||||
handleChange(info) {
|
||||
// console.log('info',info)
|
||||
@@ -71,38 +75,18 @@
|
||||
info.fileList.splice(index,1)
|
||||
}
|
||||
})
|
||||
if (this.fileTypeSatus) {
|
||||
if (file.size > 100000000) {
|
||||
this.$message.error(this.errorMessage)
|
||||
return
|
||||
}else {
|
||||
if (status === 'error') {
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
this.$message.destroy()
|
||||
this.$message.error(`${info.file.name} 文件上传失败。`);
|
||||
} else if (status === 'removed') {
|
||||
this.myfileList = info.fileList;
|
||||
this.fileList = []
|
||||
this.myfileList.forEach((res) => {
|
||||
if (res.response) {
|
||||
this.fileList.push(res.response.result)
|
||||
} else {
|
||||
this.fileList.push(res)
|
||||
}
|
||||
})
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
if(this.myfileList.length > 0){
|
||||
if (this.fileTypeSatus) {
|
||||
if (file.size > 100000000) {
|
||||
this.$message.error(this.errorMessage)
|
||||
return
|
||||
}else {
|
||||
if (status === 'error') {
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
this.$message.destroy()
|
||||
this.$message.success(`${info.file.name} 删除成功。`);
|
||||
}
|
||||
} else if (status === 'done') {
|
||||
this.fileList = []
|
||||
this.myfileList = info.fileList;
|
||||
// console.log('file3333',info.fileList)
|
||||
if (info.fileList.length > 20) {
|
||||
info.fileList.splice(20)
|
||||
// this.myfileList = info.fileList;
|
||||
|
||||
this.$message.error(`${info.file.name} 文件上传失败。`);
|
||||
} else if (status === 'removed') {
|
||||
this.myfileList = info.fileList;
|
||||
this.fileList = []
|
||||
this.myfileList.forEach((res) => {
|
||||
if (res.response) {
|
||||
this.fileList.push(res.response.result)
|
||||
@@ -110,36 +94,55 @@
|
||||
this.fileList.push(res)
|
||||
}
|
||||
})
|
||||
// console.log('file1111',this.fileList)
|
||||
// console.log('remove',this.fileList)
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
this.$message.destroy()
|
||||
this.$message.error('最多只能上传二十个');
|
||||
return
|
||||
}
|
||||
// console.log('my222',this.myfileList)
|
||||
this.myfileList.forEach((res) => {
|
||||
if (res.response) {
|
||||
this.fileList.push(res.response.result)
|
||||
// console.log('flist',res.response)
|
||||
} else {
|
||||
this.fileList.push(res)
|
||||
}
|
||||
})
|
||||
this.$message.success(`${info.file.name} 删除成功。`);
|
||||
} else if (status === 'done') {
|
||||
this.fileList = []
|
||||
this.myfileList = info.fileList;
|
||||
// console.log('file3333',info.fileList)
|
||||
if (info.fileList.length > 1) {
|
||||
info.fileList.splice(1)
|
||||
// this.myfileList = info.fileList;
|
||||
|
||||
if(this.myfileList.length > 0){
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
this.$message.destroy()
|
||||
this.$message.success(`${info.file.name} 文件上传成功。`);
|
||||
this.myfileList.forEach((res) => {
|
||||
if (res.response) {
|
||||
this.fileList.push(res.response.result)
|
||||
} else {
|
||||
this.fileList.push(res)
|
||||
}
|
||||
})
|
||||
// console.log('file1111',this.fileList)
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
this.$message.destroy()
|
||||
this.$message.error('最多只能上传一个文件');
|
||||
return
|
||||
}
|
||||
// console.log('my222',this.myfileList)
|
||||
this.myfileList.forEach((res) => {
|
||||
if (res.response) {
|
||||
this.fileList.push(res.response.result)
|
||||
// console.log('flist',res.response)
|
||||
} else {
|
||||
this.fileList.push(res)
|
||||
}
|
||||
})
|
||||
|
||||
if(this.myfileList.length > 0){
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
this.$message.destroy()
|
||||
this.$message.success(`${info.file.name} 文件上传成功。`);
|
||||
}
|
||||
} else if (status === 'uploading') {
|
||||
this.myfileList = info.fileList;
|
||||
this.$emit('uploadSuccess')
|
||||
// this.$message.success(`${info.file.name} 文件上传成功。`);
|
||||
}
|
||||
} else if (status === 'uploading') {
|
||||
this.myfileList = info.fileList;
|
||||
this.$emit('uploadSuccess')
|
||||
// this.$message.success(`${info.file.name} 文件上传成功。`);
|
||||
}
|
||||
}else{
|
||||
this.$message.warning('不支持上传该类型的文件!')
|
||||
}
|
||||
}else{
|
||||
this.$message.warning('不支持上传该类型的文件!')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
deleteAction(`tag/onlCgformArea/delete`, { id: val }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'));
|
||||
this.queryParams.pageNo=1
|
||||
this.loadData()
|
||||
}else{
|
||||
this.$message.warning(this.$t('operationFailed'));
|
||||
|
||||
@@ -353,6 +353,7 @@
|
||||
deleteAction(`sys/dictItem/delete`, params).then(res => {
|
||||
if(res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'));
|
||||
this.queryParams.pageNo=1
|
||||
this.loadData()
|
||||
}else{
|
||||
this.$message.warning(this.$t('operationFailed'));
|
||||
@@ -381,6 +382,7 @@
|
||||
async () => {
|
||||
deleteAction(`sys/category/deleteBatch`, params).then(res => {
|
||||
if(res.success){
|
||||
this.queryParams.pageNo=1
|
||||
this.loadData()
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
}else{
|
||||
@@ -394,7 +396,7 @@
|
||||
}
|
||||
},
|
||||
ok(val){
|
||||
this.queryParams.pageNo=val.pageSize
|
||||
this.queryParams.pageNo=val.pageNo
|
||||
this.queryParams.pageSize=val.pageSize
|
||||
this.loadData()
|
||||
}
|
||||
|
||||
@@ -32,17 +32,17 @@
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-form-model-item ref="tagName" :label="$t('LabeItemName')" prop="dictName">
|
||||
<a-form-model-item ref="tagName" :label="$t('LabeItemName')" prop="dictName" class="tag-item">
|
||||
<a-input
|
||||
v-model="form.dictName"
|
||||
:placeholder="$t('PleaseEnterLabelName')"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('LabelType')" prop="attributeType" v-if="isEdit==1">
|
||||
<a-form-model-item :label="$t('LabelType')" prop="attributeType" v-if="isEdit==1" class="tag-item">
|
||||
<j-dict-select-tag type="list" v-model="form.attributeType" dictCode="attribute_type" :placeholder="$t('PleaseSelectLabelType')" />
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item ref="describe" :label="$t('describe')" prop="description">
|
||||
<a-form-model-item ref="describe" :label="$t('describe')" prop="description" class="tag-item">
|
||||
<a-input
|
||||
v-model="form.description"
|
||||
:placeholder="$t('PleaseEnterDescription')"
|
||||
@@ -141,10 +141,10 @@
|
||||
form:{},
|
||||
rules:{
|
||||
dictName:[{ required: true, message: this.$t('PleaseEnterLabelName'), trigger: 'change' },
|
||||
{ min: 1, max: 100, message: this.$t('LengthBe1to100'), trigger: 'blur' }],
|
||||
{ min:1, max: 30, message: this.$t('cantExeed')+'30'+this.$t('characters'), trigger: 'blur' },],
|
||||
attributeType:[
|
||||
{ required: true, message: this.$t('PleaseSelectLabelType'), trigger: 'blur' },
|
||||
|
||||
{ min:1, max: 300, message: this.$t('cantExeed')+'300'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
// typeVisible:{},
|
||||
@@ -326,6 +326,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.page{
|
||||
margin-top: 20px;
|
||||
text-align: right;
|
||||
@@ -351,6 +352,13 @@
|
||||
.ant-modal-footer{
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.tag-content{
|
||||
.tag-item{
|
||||
.ant-col-4{
|
||||
min-width: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user