Merge remote-tracking branch 'origin/master'

This commit is contained in:
lixuetao
2022-03-31 02:46:19 +08:00
6 changed files with 76 additions and 108 deletions
+12 -3
View File
@@ -12,12 +12,21 @@
:columns="columns"
@change="tableOnChange"
>
<span slot="operation" slot-scope="record">
<span slot="operation" slot-scope="text,record">
<a v-for="(ol,index) in OperationList"
@click="OperationClick(ol,record)">
<span class="text">
<!-- <span class="text">-->
<!-- {{ol.text}}-->
<!-- </span>-->
<span v-if="ol.text==$t('backDocument')&&record.flag==0" class="text">
{{ol.text}}
</span>
</span>
<span v-if="ol.text==$t('See')" class="text">
{{ol.text}}
</span>
<span v-if="ol.text==$t('delete')">
{{ol.text}}
</span>
</a>
</span>
</a-table>
+16 -10
View File
@@ -2,7 +2,7 @@
<div>
<a-modal v-model="visible" :maskClosable="false" :footer="[]" :title="title">
<a-upload-dragger
accept='*.*'
:accept='accept'
:disabled="disabled"
class="ant-upload-list"
name="file"
@@ -31,7 +31,7 @@
export default {
name: 'file',
props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType','title','listType','splitVisible'],
props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType','accept','title','listType','splitVisible'],
data() {
return {
visible: false,
@@ -43,7 +43,7 @@
isLoding: false,
headers:'',
previewImage:{},
accept:'image/*'
// accept:'image/*'
}
},
created() {
@@ -68,14 +68,20 @@
}
},
beforeUpload(file) {
if(file.type.split('/')[0]!='image'){
this.$message.warning(this.$t('onlyPicture'))
let fileTypes=this.accept.split(',')
let fileFlag=false
fileTypes.forEach(item=>{
if(item==file.type){
fileFlag=true
}
})
console.log('filetype',fileFlag)
if(!fileFlag){
this.$message.warning('文件格式不正确')
this.fileTypeSatus = false
}else{
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
this.fileTypeSatus = true
this.$message.destroy()
// 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量!
this.errorMessage = file.name + '文件大小超出1000MB限制, 请压缩或降低文件质量!'
@@ -90,7 +96,7 @@
window.open(url, '_blank')
},
handleChange(info) {
console.log('file',info)
// console.log('file',info)
let { file,fileList } = info
const status = info.file.status
info.fileList.forEach((val, index) => {
@@ -149,7 +155,7 @@
}
})
this.$emit('uploadSuccess', this.fileList,fileList)
console.log('uplossss',this.fileList,fileList)
// console.log('uplossss',this.fileList,fileList)
if (this.myfileList.length > 0) {
this.$message.destroy()
this.$message.success(`${info.file.name} `+this.$t('uploadSuccessful'))
@@ -166,7 +172,7 @@
this.fileList = []
},
preview(file) {
console.log('file111',file)
// console.log('file111',file)
this.previewImage = file.response.path;
}
}
@@ -184,18 +184,17 @@
axios({
url: '/jero-boot/split/sarFileSplitInfo/deleteBatch',
method: 'get',
data: params,
params:params,
headers: {
// 'Content-Type': 'multipart/form-data',
'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token':this.token
}
}).then(res => {
if (res.data.success) {
this.$message.success(this.$t('OperationSuccessful'))
if(this.selectedRowKeys&&this.selectedRowKeys.length==this.tableData.length){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
// if(this.selectedRowKeys&&this.selectedRowKeys.length==this.tableData.length){
// this.queryParams.pageNo=this.queryParams.pageNo-1
// }
this.selectedRowKeys=[]
eventBUs.$emit('searchReset')
// this.loadData()
@@ -220,9 +219,9 @@
getAction(`split/sarFileSplitInfo/delete`, { id: val.id }).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
if (this.tableData && this.tableData.length == 1 && this.queryParams.pageNo != 1) {
this.queryParams.pageNo = this.queryParams.pageNo - 1
}
// if (this.tableData && this.tableData.length == 1 && this.queryParams.pageNo != 1) {
// this.queryParams.pageNo = this.queryParams.pageNo - 1
// }
eventBUs.$emit('searchReset')
// this.loadData()
} else {
@@ -276,14 +275,31 @@
fileName:val.fileName,
connectId:val.connectId
}
getAction(`split/sarFileSplitInfo/bindToDocumentLibrary`, params).then((res) => {
if (res.success) {
this.$message.success(res.message)
this.loadData()
} else {
this.$message.warning(res.message)
}
})
axios({
url: '/jero-boot/split/sarFileSplitInfo/bindToDocumentLibrary',
method: 'get',
params:params,
headers: {
// 'Content-Type': 'multipart/form-data',
'X-Access-Token':this.token
}
}).then(res => {
if (res.data.success) {
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
// getAction(`split/sarFileSplitInfo/bindToDocumentLibrary`, params).then((res) => {
// if (res.success) {
// this.$message.success(res.message)
// this.loadData()
// } else {
// this.$message.warning(res.message)
// }
// })
}
})
},
@@ -12,26 +12,6 @@
<div class="imports-table-content">
<div class="imports-header">
<search :url="url" :flag="'condition'"></search>
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :md="6" :sm="12">-->
<!-- <a-form-item :label="$t('standard')">-->
<!-- <j-input :placeholder="$t('enterNumber')" v-model="queryParams.standNumber"></j-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :md="6" :sm="12">-->
<!-- <a-form-item :label="$t('title')">-->
<!-- <j-input :placeholder="$t('enterTitle')" v-model="queryParams.standName"></j-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :md="6" :sm="8">-->
<!-- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">-->
<!-- <a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>-->
<!-- <a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>-->
<!-- </span>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- </a-form>-->
</div>
</div>
<div class="imports-table-detail">
@@ -43,21 +23,6 @@
:OperationList="OperationList"
@onSelectChange="onSelectChange"
/>
<!-- <a-spin :spinning="spinning">-->
<!-- <a-table :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >-->
<!-- </a-table>-->
<!-- </a-spin>-->
<!-- <div class="page" v-if="tableSource.length > 0">-->
<!-- <a-pagination-->
<!-- :show-total="total => $t('total')+` ${total} `+ $t('strip')"-->
<!-- show-quick-jumper-->
<!-- show-size-changer-->
<!-- :page-size.sync="queryParams.pageSize"-->
<!-- :total="total"-->
<!-- @change="onChangePage"-->
<!-- @showSizeChange="SizeChange"-->
<!-- />-->
<!-- </div>-->
</div>
<div class="imports-files">
<a-form-model
@@ -85,7 +50,7 @@
<a-button class="imports-btn" type="primary" @click="cancleImports">{{$t('cancel')}}</a-button>
</div>
</div>
<split-upload ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></split-upload>
<split-upload ref="uploadFile" :disabled="disabled" :title="upload1" :accept="accept" @uploadSuccess="uploadSuccess"></split-upload>
</a-drawer>
</div>
</template>
@@ -162,12 +127,20 @@
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //搜索字段
tableList: 'document/bussDocumentLibraryEO/ocrPageInfo', //表格数据
},
OperationList:[]
OperationList:[],
upload1:this.$t('upload1'),
accept:'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/msword'
}
},
props:{
importsVisible:Boolean
},
watch:{
'form.file'(val){
console.log(val)
}
},
mounted() {
this.visible=this.importsVisible
// console.log('visibleSplit',this.visible)
@@ -224,13 +197,15 @@
},
//上传文件
uploadSuccess(data) {
console.log('updata',data)
// console.log('updata',data)
let attIdList = []
data.map(item => {
attIdList.push(item.id || data.name)
})
console.log('file',attIdList)
// /** 赋值给当前对应的表单文件 */
this.form.file = attIdList.join(',')
// console.log('this.form.file',this.form.file)
},
//模板下载
downLoad(){
@@ -259,7 +234,7 @@
margin:20px 0;
.file-down{
position: absolute;
left: 260px;
left: 320px;
top: 5px;
}
}
@@ -238,46 +238,8 @@
</a-row>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile>
<uploadFile ref="uploadFile" :accept="accept" @uploadSuccess="uploadSuccess"></uploadFile>
<!-- 条款号-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <a-form-model-item :label="$t('clauseNo')" prop="number">-->
<!-- <a-input v-model="form.number" :placeholder="$t('pleaseEnter')+$t('clauseNo')" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!--&lt;!&ndash; 条款名称&ndash;&gt;-->
<!-- <a-col :span="12">-->
<!-- <a-form-model-item :label="$t('clauseName')" prop="name">-->
<!-- <a-input v-model="form.name" :placeholder="$t('pleaseEnter')+$t('clauseName')" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!--&lt;!&ndash; 功能领域&ndash;&gt;-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <a-form-model-item :label="$t('functionalAreas')" prop="funArea">-->
<!-- <j-dict-select-tag type="list" v-model="form.funArea" dictCode="function_territory" :placeholder="$t('pleaseSelect')+$t('functionalAreas')" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!--&lt;!&ndash; 技术领域&ndash;&gt;-->
<!-- <a-col :span="12">-->
<!-- <a-form-model-item :label="$t('technicalField')" prop="tecArea">-->
<!-- <j-dict-select-tag type="list" v-model="form.tecArea" dictCode="technology_territory" :placeholder="$t('pleaseSelect')+$t('technicalField')" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!--&lt;!&ndash; 信息类别&ndash;&gt;-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <a-form-model-item :label="$t('informationCategory')" prop="infoType">-->
<!-- <j-dict-select-tag type="list" v-model="form.infoType" dictCode="xxx" :placeholder="$t('pleaseSelect')+$t('informationCategory')" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- 内容简介-->
<span class="con-divider">{{$t('contentValidity')}}</span>
<a-divider dashed />
<div class="table-operator">
@@ -550,7 +550,7 @@
onOk:
async () => {
axios({
url: '/jero-boot/split/sarFileSplitMenu/copyMenuNotChildren',
url: '/jero-boot/split/sarFileSplitMenu/copyMenuNotChildrenall',
method: 'get',
params: params,
// transformRequest: [function (data) {