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" :columns="columns"
@change="tableOnChange" @change="tableOnChange"
> >
<span slot="operation" slot-scope="record"> <span slot="operation" slot-scope="text,record">
<a v-for="(ol,index) in OperationList" <a v-for="(ol,index) in OperationList"
@click="OperationClick(ol,record)"> @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}} {{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> </a>
</span> </span>
</a-table> </a-table>
+16 -10
View File
@@ -2,7 +2,7 @@
<div> <div>
<a-modal v-model="visible" :maskClosable="false" :footer="[]" :title="title"> <a-modal v-model="visible" :maskClosable="false" :footer="[]" :title="title">
<a-upload-dragger <a-upload-dragger
accept='*.*' :accept='accept'
:disabled="disabled" :disabled="disabled"
class="ant-upload-list" class="ant-upload-list"
name="file" name="file"
@@ -31,7 +31,7 @@
export default { export default {
name: 'file', name: 'file',
props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType','title','listType','splitVisible'], props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType','accept','title','listType','splitVisible'],
data() { data() {
return { return {
visible: false, visible: false,
@@ -43,7 +43,7 @@
isLoding: false, isLoding: false,
headers:'', headers:'',
previewImage:{}, previewImage:{},
accept:'image/*' // accept:'image/*'
} }
}, },
created() { created() {
@@ -68,14 +68,20 @@
} }
}, },
beforeUpload(file) { beforeUpload(file) {
let fileTypes=this.accept.split(',')
if(file.type.split('/')[0]!='image'){ let fileFlag=false
this.$message.warning(this.$t('onlyPicture')) fileTypes.forEach(item=>{
if(item==file.type){
fileFlag=true
}
})
console.log('filetype',fileFlag)
if(!fileFlag){
this.$message.warning('文件格式不正确')
this.fileTypeSatus = false this.fileTypeSatus = false
}else{ }else{
// let thisFileType = this.thisFileType.replace(/\s+/g, ""); // let thisFileType = this.thisFileType.replace(/\s+/g, "");
this.fileTypeSatus = true this.fileTypeSatus = true
this.$message.destroy() this.$message.destroy()
// 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量! // 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量!
this.errorMessage = file.name + '文件大小超出1000MB限制, 请压缩或降低文件质量!' this.errorMessage = file.name + '文件大小超出1000MB限制, 请压缩或降低文件质量!'
@@ -90,7 +96,7 @@
window.open(url, '_blank') window.open(url, '_blank')
}, },
handleChange(info) { handleChange(info) {
console.log('file',info) // console.log('file',info)
let { file,fileList } = info let { file,fileList } = info
const status = info.file.status const status = info.file.status
info.fileList.forEach((val, index) => { info.fileList.forEach((val, index) => {
@@ -149,7 +155,7 @@
} }
}) })
this.$emit('uploadSuccess', this.fileList,fileList) this.$emit('uploadSuccess', this.fileList,fileList)
console.log('uplossss',this.fileList,fileList) // console.log('uplossss',this.fileList,fileList)
if (this.myfileList.length > 0) { if (this.myfileList.length > 0) {
this.$message.destroy() this.$message.destroy()
this.$message.success(`${info.file.name} `+this.$t('uploadSuccessful')) this.$message.success(`${info.file.name} `+this.$t('uploadSuccessful'))
@@ -166,7 +172,7 @@
this.fileList = [] this.fileList = []
}, },
preview(file) { preview(file) {
console.log('file111',file) // console.log('file111',file)
this.previewImage = file.response.path; this.previewImage = file.response.path;
} }
} }
@@ -184,18 +184,17 @@
axios({ axios({
url: '/jero-boot/split/sarFileSplitInfo/deleteBatch', url: '/jero-boot/split/sarFileSplitInfo/deleteBatch',
method: 'get', method: 'get',
data: params,
params:params, params:params,
headers: { headers: {
// 'Content-Type': 'multipart/form-data', 'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token':this.token 'X-Access-Token':this.token
} }
}).then(res => { }).then(res => {
if (res.data.success) { if (res.data.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
if(this.selectedRowKeys&&this.selectedRowKeys.length==this.tableData.length){ // if(this.selectedRowKeys&&this.selectedRowKeys.length==this.tableData.length){
this.queryParams.pageNo=this.queryParams.pageNo-1 // this.queryParams.pageNo=this.queryParams.pageNo-1
} // }
this.selectedRowKeys=[] this.selectedRowKeys=[]
eventBUs.$emit('searchReset') eventBUs.$emit('searchReset')
// this.loadData() // this.loadData()
@@ -220,9 +219,9 @@
getAction(`split/sarFileSplitInfo/delete`, { id: val.id }).then((res) => { getAction(`split/sarFileSplitInfo/delete`, { id: val.id }).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
if (this.tableData && this.tableData.length == 1 && this.queryParams.pageNo != 1) { // if (this.tableData && this.tableData.length == 1 && this.queryParams.pageNo != 1) {
this.queryParams.pageNo = this.queryParams.pageNo - 1 // this.queryParams.pageNo = this.queryParams.pageNo - 1
} // }
eventBUs.$emit('searchReset') eventBUs.$emit('searchReset')
// this.loadData() // this.loadData()
} else { } else {
@@ -276,14 +275,31 @@
fileName:val.fileName, fileName:val.fileName,
connectId:val.connectId connectId:val.connectId
} }
getAction(`split/sarFileSplitInfo/bindToDocumentLibrary`, params).then((res) => { axios({
if (res.success) { url: '/jero-boot/split/sarFileSplitInfo/bindToDocumentLibrary',
this.$message.success(res.message) method: 'get',
this.loadData() params:params,
} else { headers: {
this.$message.warning(res.message) // '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-table-content">
<div class="imports-header"> <div class="imports-header">
<search :url="url" :flag="'condition'"></search> <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> </div>
<div class="imports-table-detail"> <div class="imports-table-detail">
@@ -43,21 +23,6 @@
:OperationList="OperationList" :OperationList="OperationList"
@onSelectChange="onSelectChange" @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>
<div class="imports-files"> <div class="imports-files">
<a-form-model <a-form-model
@@ -85,7 +50,7 @@
<a-button class="imports-btn" type="primary" @click="cancleImports">{{$t('cancel')}}</a-button> <a-button class="imports-btn" type="primary" @click="cancleImports">{{$t('cancel')}}</a-button>
</div> </div>
</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> </a-drawer>
</div> </div>
</template> </template>
@@ -162,12 +127,20 @@
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //搜索字段 seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //搜索字段
tableList: 'document/bussDocumentLibraryEO/ocrPageInfo', //表格数据 tableList: 'document/bussDocumentLibraryEO/ocrPageInfo', //表格数据
}, },
OperationList:[] OperationList:[],
upload1:this.$t('upload1'),
accept:'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/msword'
} }
}, },
props:{ props:{
importsVisible:Boolean importsVisible:Boolean
}, },
watch:{
'form.file'(val){
console.log(val)
}
},
mounted() { mounted() {
this.visible=this.importsVisible this.visible=this.importsVisible
// console.log('visibleSplit',this.visible) // console.log('visibleSplit',this.visible)
@@ -224,13 +197,15 @@
}, },
//上传文件 //上传文件
uploadSuccess(data) { uploadSuccess(data) {
console.log('updata',data) // console.log('updata',data)
let attIdList = [] let attIdList = []
data.map(item => { data.map(item => {
attIdList.push(item.id || data.name) attIdList.push(item.id || data.name)
}) })
console.log('file',attIdList)
// /** 赋值给当前对应的表单文件 */ // /** 赋值给当前对应的表单文件 */
this.form.file = attIdList.join(',') this.form.file = attIdList.join(',')
// console.log('this.form.file',this.form.file)
}, },
//模板下载 //模板下载
downLoad(){ downLoad(){
@@ -259,7 +234,7 @@
margin:20px 0; margin:20px 0;
.file-down{ .file-down{
position: absolute; position: absolute;
left: 260px; left: 320px;
top: 5px; top: 5px;
} }
} }
@@ -238,46 +238,8 @@
</a-row> </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> <span class="con-divider">{{$t('contentValidity')}}</span>
<a-divider dashed /> <a-divider dashed />
<div class="table-operator"> <div class="table-operator">
@@ -550,7 +550,7 @@
onOk: onOk:
async () => { async () => {
axios({ axios({
url: '/jero-boot/split/sarFileSplitMenu/copyMenuNotChildren', url: '/jero-boot/split/sarFileSplitMenu/copyMenuNotChildrenall',
method: 'get', method: 'get',
params: params, params: params,
// transformRequest: [function (data) { // transformRequest: [function (data) {