|
@@ -6,10 +6,16 @@
|
|
|
:visible="visible"
|
|
|
:confirmLoading="confirmLoading"
|
|
|
:getContainer ='()=>$refs.replyModal'
|
|
|
- @ok="handleOk"
|
|
|
@cancel="handleCancel"
|
|
|
destroyOnClose
|
|
|
>
|
|
|
+ <template #footer>
|
|
|
+ <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" @change="handleImportExcel" :customRequest="implementImport" >
|
|
|
+ <a-button type="primary">导入</a-button>
|
|
|
+ </a-upload>
|
|
|
+ <a-button @click="handleCancel" style="margin-left: 8px;">取消</a-button>
|
|
|
+ <a-button type="primary" @click="handleOk">保存</a-button>
|
|
|
+ </template>
|
|
|
<div class="table-page-search-wrapper">
|
|
|
<a-form-model layout="inline" ref="form" :model="formState" :rules="validatorRules">
|
|
|
<a-row :gutter="24">
|
|
@@ -186,6 +192,7 @@
|
|
|
import { FormTypes } from '@/utils/JEditableTableUtil'
|
|
|
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
|
|
import {personList,subimtList} from '@api/oa/cd-personnel-files'
|
|
|
+ import {fileDetail} from '@api/oa/cd-sy-carry'
|
|
|
import { putAction,getAction } from '@/api/manage'
|
|
|
|
|
|
export default {
|
|
@@ -496,6 +503,24 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ // 导入
|
|
|
+ implementImport(file) {
|
|
|
+ const formData = new FormData()
|
|
|
+ formData.append('file', file.file)
|
|
|
+ fileDetail(formData).then(res => {
|
|
|
+ // this.loading = false
|
|
|
+ if (res.success) {
|
|
|
+ // this.visible = true
|
|
|
+ this.message = res.message.split(';').filter((element) => {
|
|
|
+ return element !== "";
|
|
|
+ });
|
|
|
+ this.file = file
|
|
|
+ this.$message.success('导入成功')
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//关闭
|
|
|
handleCancel(){
|
|
|
this.syCarryBTable.dataSource=[]
|