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