ocr下载修改
This commit is contained in:
@@ -301,20 +301,84 @@
|
||||
},
|
||||
methods: {
|
||||
handleChange(info) {
|
||||
if (info.file.status !== 'uploading') {
|
||||
// console.log(info.file, info.fileList)
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
console.log('info', info)
|
||||
this.fileList = []
|
||||
this.myfileList = info.fileList
|
||||
this.formInline.attId = info.file.response.result.id
|
||||
this.$message.success(`${info.file.name}上传成功`)
|
||||
}else if (info.file.status === 'error') {
|
||||
this.$message.error(`${info.file.name}上传失败`)
|
||||
} else if (info.file.status === 'uploading') {
|
||||
this.myfileList = info.fileList
|
||||
// console.log(info.file, info.fileList)
|
||||
let { file } = info;
|
||||
const status = info.file.status;
|
||||
info.fileList.forEach((val,index)=>{
|
||||
if(val.response && !val.response.result){
|
||||
this.$message.error(val.response.message);
|
||||
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)
|
||||
}
|
||||
})
|
||||
// console.log('remove',this.fileList)
|
||||
// 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 > 1) {
|
||||
info.fileList.splice(1)
|
||||
// this.myfileList = info.fileList;
|
||||
|
||||
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)
|
||||
// console.log('fileList111',this.fileList)
|
||||
this.formInline.attId=this.myfileList[0].response.result.id
|
||||
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{
|
||||
this.$message.warning('不支持上传该类型的文件!')
|
||||
}
|
||||
|
||||
},
|
||||
@@ -404,7 +468,7 @@
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.db_field_txt + '不能为空',
|
||||
trigger: 'blur'
|
||||
trigger: 'change'
|
||||
})
|
||||
if (res.db_field_name == 'standNumber') {
|
||||
rule.push(
|
||||
|
||||
@@ -15,16 +15,16 @@
|
||||
<span slot="operation" slot-scope="record">
|
||||
<a class="text" v-for="(ol,index) in OperationList"
|
||||
@click="OperationClick(ol,record)">
|
||||
<span v-if="ol.text==$t('SyncLibrary')">
|
||||
<span v-if="ol.text==$t('SyncLibrary')" v-has="'ocr:ocrRecord:syncToDocument'">
|
||||
{{record.resultContent=='转换成功'&&record.syncState=='未同步'&&record.fileSource=='1'?ol.text:''}}
|
||||
</span>
|
||||
<span v-if="ol.text==$t('check')">
|
||||
<span v-if="ol.text==$t('check')" v-has="''">
|
||||
{{record.resultContent=='转换成功'&&record.syncState=='未同步'?ol.text:''}}
|
||||
</span>
|
||||
<span v-if="ol.text==$t('download')">
|
||||
<span v-if="ol.text==$t('download')" v-has="'ocr:ocrRestful:downFile'">
|
||||
{{record.resultContent=='转换成功'?ol.text:''}}
|
||||
</span>
|
||||
<span v-if="ol.text==$t('delete')">
|
||||
<span v-if="ol.text==$t('delete')" v-has="'ocr:ocrRecord:delete'">
|
||||
{{ol.text}}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
<search :flag="'2'" :url="url"/>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleUpload">
|
||||
<div class="operator-text" @click="handleUpload" v-has="'ocr:ocrRestful:addOcrRecord'">
|
||||
<a-icon type="plus" />
|
||||
{{ $t('upload1') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleFileExport">
|
||||
<div class="operator-text" @click="handleFileExport" v-has="'document:ocrPageInfo'">
|
||||
<a-icon type="export" />
|
||||
{{ $t('RetrieveFiles') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleDel">
|
||||
<div class="operator-text" @click="handleDel" v-has="'ocr:ocrRecord:deleteBatch'">
|
||||
<a-icon type="delete" />
|
||||
{{ $t('BatchDelete') }}
|
||||
</div>
|
||||
@@ -311,8 +311,11 @@
|
||||
},
|
||||
//下载
|
||||
actionDown(val){
|
||||
let fileName=val.docRealName.split('_')
|
||||
fileName=fileName[fileName.length-1]
|
||||
let fileNames=val.docRealName.split('_')
|
||||
let name = fileNames.shift()
|
||||
let fileName=fileNames.join('_')
|
||||
// let fileName=val.fileName.split('.')[0]
|
||||
|
||||
downloadFile('ocr/OcrRestful/downFile', fileName, { fileName: val.docRealName })
|
||||
},
|
||||
//删除
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<a-icon type="plus" />
|
||||
{{$t('add')}}
|
||||
</div>
|
||||
<div class="operator-text" @click="batDelete">
|
||||
<div class="operator-text" @click="batDelete" v-has="dictVal=='list'?'dictItem:logicDeleteBatch':'sys:category:logicDeleteBatch'">
|
||||
<a-icon type="delete" />
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
@@ -245,6 +245,7 @@
|
||||
|
||||
}else if(this.dictVal='tree'){
|
||||
this.parentVisible=true
|
||||
this.editPId=''
|
||||
}
|
||||
},
|
||||
//保存
|
||||
@@ -401,7 +402,7 @@
|
||||
//树形选中行
|
||||
selectedKeys(val){
|
||||
this.selectedIds=val
|
||||
console.log('seleVal',val)
|
||||
// console.log('seleVal',val)
|
||||
},
|
||||
//批量删除
|
||||
batDelete(){
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<template slot="action" slot-scope="text, record">
|
||||
<a class="action-edit" href="javascript:;" @click="actionEdit(record)">{{$t('edit')}}</a>
|
||||
<a class="action-delete" href="javascript:;" @click="onDelete(record)">{{$t('delete')}}</a>
|
||||
<a class="action-delete" href="javascript:;" @click="onDelete(record)" v-has="'dictItem:logicDelete'">{{$t('delete')}}</a>
|
||||
</template>
|
||||
</a-table>
|
||||
<div class="page" v-if="tableData.length > 0">
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
>
|
||||
<template slot="action" slot-scope="text, record">
|
||||
<a class="action-edit" href="javascript:;" @click="actionEdit(record)">{{$t('edit')}}</a>
|
||||
<a class="action-delete" href="javascript:;" @click="onDelete(record)">{{$t('delete')}}</a>
|
||||
<a class="action-delete" href="javascript:;" @click="onDelete(record)" v-has="'sys:category:logicDelete'">{{$t('delete')}}</a>
|
||||
</template>
|
||||
</a-table>
|
||||
<div class="page" v-if="tabData.length > 0">
|
||||
@@ -39,7 +39,7 @@
|
||||
props:{
|
||||
tabletreeData:Array,
|
||||
record:Object,
|
||||
total:String,
|
||||
total:Number,
|
||||
queryParams:Object
|
||||
},
|
||||
data(){
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleAdd">
|
||||
<div class="operator-text" @click="handleAdd" v-has="'dict:add'">
|
||||
<a-icon type="plus" />
|
||||
{{$t('add')}}
|
||||
</div>
|
||||
<div class="operator-text" @click="batDelete">
|
||||
<div class="operator-text" @click="batDelete" v-has="'dict:logicDeleteBatch'">
|
||||
<a-icon type="delete" />
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<a-icon type="rocket" :rotate="45" />
|
||||
{{$t('ExhibitionAreaManagement')}}
|
||||
</div>
|
||||
<div class="operator-text" @click="batDelete">
|
||||
<div class="operator-text" @click="batDelete" v-has="'tag:logicDeleteBatch'">
|
||||
<a-icon type="delete" />
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user