拆分图片显示修改

This commit is contained in:
caoyang
2022-04-21 16:16:18 +08:00
parent 71f705c08a
commit ccc08a5cc2
6 changed files with 73 additions and 46 deletions
+2
View File
@@ -695,6 +695,8 @@ module.exports = {
incorrectsubmitted:'The data status is incorrect; Only data with status to be confirmed can be submitted',
date:'date',
time:'time',
uploadMaximumATime:'upload a maximum of 20 images at a time',
confirmationOfRegulationsList:'Confirmation of regulations list',
regulatoryTaskConfirmation:'Regulatory task confirmation',
certificationStart:'Certification start',
+3
View File
@@ -698,6 +698,9 @@ module.exports = {
finalizationTime:'定版时间',
setting:'设定',
date:'日期',
time:'时间',
uploadMaximumATime:'一次最多上传二十张图片',
time:'时间',
confirmationOfRegulationsList:'法规清单确认',
regulatoryTaskConfirmation:'法规任务确认',
+25 -18
View File
@@ -35,7 +35,7 @@
data() {
return {
visible: false,
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
uploadAction: window._CONFIG['domianURL'] + '/split/sarFileSplitItems/upload',
upDataList: [],
downLoadFileUrl: window._CONFIG['domianURL'] + '/sys/common/static',
fileList: [],
@@ -83,7 +83,10 @@
this.fileTypeSatus = false
}else{
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
this.uploadFileFlag++
if(this.uploadFileFlag<20){
this.uploadFileFlag++
}
this.fileTypeSatus = true
this.$message.destroy()
// 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量!
@@ -107,6 +110,7 @@
this.$message.error(val.response.message)
info.fileList.splice(index, 1)
}
})
if (this.fileTypeSatus) {
if (file.size > 1000000000) {
@@ -138,7 +142,10 @@
this.uploadFileFlag--
this.fileList = []
this.myfileList = info.fileList
console.log('listLength11111',info.fileList.length)
if (info.fileList.length > 20) {
this.$message.destroy()
this.$message.error(this.$t('uploadMaximumATime'))
info.fileList.splice(20)
this.myfileList = info.fileList
this.myfileList.forEach((res) => {
@@ -148,25 +155,25 @@
this.fileList.push(res)
}
})
this.$emit('uploadSuccess', this.fileList,fileList,this.uploadFileFlag)
this.$message.destroy()
this.$message.error('最多只能上传二十个')
return
}
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}else{
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}
})
// console.log('file111111',this.fileList,fileList,file,this.uploadFileFlag)
this.$emit('uploadSuccess',file, this.fileList,fileList,this.uploadFileFlag)
// console.log('uplossss',this.fileList,fileList)
if (this.myfileList.length > 0) {
this.$message.destroy()
this.$message.success(`${info.file.name} `+this.$t('uploadSuccessful'))
}
})
console.log('file111111',this.fileList,fileList,file,this.uploadFileFlag)
this.$emit('uploadSuccess',file, this.fileList,fileList,this.uploadFileFlag)
// console.log('uplossss',this.fileList,fileList)
if (this.myfileList.length > 0) {
this.$message.destroy()
this.$message.success(`${info.file.name} `+this.$t('uploadSuccessful'))
}
} else if (status === 'uploading') {
// this.uploadFileFlag++
this.myfileList = info.fileList
@@ -811,7 +811,7 @@
},
//上传文件
uploadSuccess1(file,data,imgs,uploadFileFlag) {
uploadSuccess1(file,data,imgs ,uploadFileFlag) {
// console.log('dataimg',file,data,imgs,uploadFileFlag)
for(let i = this.contentList.length;i>this.addIndex;i--){
@@ -821,7 +821,7 @@
id:'',
type:'IMG',
itemContent:file.response.result.id,
thumbUrl:file.thumbUrl
thumbUrl:file.response.result.url
}
// let lengthImg=imgs.length
@@ -835,16 +835,17 @@
// id:'',
// type:'IMG',
// itemContent:item.response.result.id,
// thumbUrl:item.thumbUrl
// thumbUrl:item.response.result.url
// }
// })
// }
// this.$refs.uploadFile2.visible=false
if(uploadFileFlag==0){
this.splitVisible=false
}
console.log('conteend',data,this.contentList)
// console.log('conteend',imgs,this.contentList)
},
//点击图片预览
preImg(item){
@@ -15,14 +15,19 @@
<p class="tag-info">{{$t('essentialInformation')}}</p>
<a-divider dashed />
<!-- 所属模块-->
<a-col :span="24">
<a-col :span="24" v-if="submitKey == 1">
<a-form-model-item :label="$t('Module')" prop="isModel">
<!-- <j-dict-select-tag type="list" v-model="form.isModel" dictCode="module" :placeholder="$t('PleaseSelectModule')" />-->
<a-select :placeholder="$t('PleaseSelectModule')" v-model="form.isModel" @change="handleChange" :disabled="disableEdit">
<a-select-option :key="'1'" :value="'1'" v-if="submitKey == 1">
<a-select :placeholder="$t('PleaseSelectModule')" v-model="form.isModel">
<a-select-option :key="'1'" :value="'1'" >
{{$t('DocumentLibrary')}}
</a-select-option>
<a-select-option :key="'0'" :value="'0'" v-if="submitKey == 2">
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24" v-if="submitKey == 2">
<a-form-model-item :label="$t('Module')" prop="isModel">
<a-select :placeholder="$t('PleaseSelectModule')" v-model="form.isModel">
<a-select-option :key="'0'" :value="'0'">
{{$t('DocumentSplitting')}}
</a-select-option>
</a-select>
@@ -86,7 +91,7 @@
:placeholder="$t('selectDisplayList')" />
</a-form-model-item>
</a-col>
<a-col :span="24" v-if="moduleShow">
<a-col :span="24" v-if="submitKey == 1">
<a-form-model-item :label="$t('DisplayArea')" prop="showArea">
<a-select :placeholder="$t('SelectDisplayArea')" v-model="form.showArea" @change="handleChange">
<a-select-option v-for="(item,index) in areaOptions" :key="item.id" :value="item.id">
@@ -102,14 +107,14 @@
</a-form-model-item>
</a-col>
<p class="tag-info" v-if="moduleShow">{{$t('DisplayOtherModules')}}</p>
<a-divider dashed v-if="moduleShow" />
<a-col :span="24" v-if="moduleShow">
<p class="tag-info" v-if="submitKey == 1">{{$t('DisplayOtherModules')}}</p>
<a-divider dashed v-if="submitKey == 1" />
<a-col :span="24" v-if="submitKey == 1">
<a-form-model-item :label="$t('RegulationsListDisplay')" prop="isShowLawsList">
<j-dict-select-tag type="list" v-model="form.isShowLawsList" dictCode="yn" :placeholder="$t('selectDisplayListRegulations')" />
</a-form-model-item>
</a-col>
<a-col :span="24" v-if="moduleShow">
<a-col :span="24" v-if="submitKey == 1">
<a-form-model-item :label="$t('SearchCenterDisplay')" prop="isShowSearch">
<j-dict-select-tag type="list" v-model="form.isShowSearch" dictCode="yn" :placeholder="$t('selectSearchCenterDisplayed')" />
</a-form-model-item>
@@ -289,15 +294,7 @@ export default {
disableEdit(){
},
'form.isModel'(val){
console.log('val',val)
if(val=='1'){
this.moduleShow=true
}else if(val=='0'){
this.moduleShow=false
}
}
},
computed: {
changeType(val){
@@ -329,18 +326,29 @@ export default {
// console.log('disableEdit',this.disableEdit)
this.loadContent()
this.loadShowArea()
// console.log('edit',this.submitEdit)
// console.log('edit',this.submitKey)
if(this.submitEdit==='add'){
if(this.submitKey==='1'){
this.form.isModel='1'
}else if(this.submitKey==='2'){
this.moduleShow=true
}else if(this.submitKey=='2'){
this.form.isModel='0'
this.moduleShow=false
}
this.disabledEdit=false
// this.disabledEdit=false
}else if(this.submitEdit==='edit'){
this.disabledEdit=true
this.form={...this.editData}
if(this.submitKey==='1'){
this.form.isModel='1'
this.moduleShow=true
}else if(this.submitKey=='2'){
this.form.isModel='0'
this.moduleShow=false
}
// this.disabledEdit=true
}
this.form={...this.editData}
// console.log('this.form.isModel',this.form.isModel)
},
methods: {
//获取选项内容
@@ -439,7 +447,7 @@ export default {
}
})
// console.log('form',this.form)
console.log('model',this.form.isModel)
// console.log('model',this.form.isModel)
let onlineId=''
let url=''
if(this.form.isModel=='1'){
@@ -420,6 +420,12 @@
},
handleAddPop(val){
this.editData={}
if(this.submitKey=='1'){
this.editData.isModel='1'
}else if(this.submitKey=='2'){
this.editData.isModel='0'
}
this.disableEdit=false
this.drawerVisible=true
this.titleTag=this.$t('NewLabelItem')