feat:调试上传文件接口;fix:修复系统管理bug;todo:上传接口暂未调通
This commit is contained in:
parent
c737eb8b59
commit
202566144f
@ -24,10 +24,7 @@ export const apiEmployeessItuation = data => {
|
||||
return http({ url: '/lz_management/staff/info/statistical', method: 'get', params: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件上传
|
||||
*/
|
||||
// 文件上传列表
|
||||
export const apiSysOssList = params => {
|
||||
return http({ url: '/lz_management/sys/oss/list', method: 'get', params })
|
||||
// 文件上传
|
||||
export const apiUploadFile = params => {
|
||||
return http({ url: '/lz_management/staff/info/batchImport', method: 'post', data: params })
|
||||
}
|
||||
|
||||
@ -33,9 +33,9 @@
|
||||
<span class="contant-name">{{info.signingCompany}}</span>
|
||||
</div>
|
||||
|
||||
<div class="contant" v-if="info.entryTime">
|
||||
<div class="contant" v-if="info.signingCompany">
|
||||
<span class="contant-label">劳动合同签订公司:</span>
|
||||
<span class="contant-name">{{info.entryTime}}</span>
|
||||
<span class="contant-name">{{info.signingCompany}}</span>
|
||||
</div>
|
||||
|
||||
<div class="contant" v-if="info.jobBeginTime">
|
||||
|
||||
@ -41,7 +41,17 @@
|
||||
</el-form>
|
||||
<el-form :inline="true">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-plus">批量导入员工档案</el-button>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action="/"
|
||||
:auto-upload="false"
|
||||
:show-file-list="false"
|
||||
:on-change="handleChange"
|
||||
accept=".xlsx, .csv"
|
||||
:disabled="isUploading"
|
||||
>
|
||||
<el-button type="primary" :loading="isUploading" icon="el-icon-plus">批量导入员工档案</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@ -122,7 +132,8 @@ import menuTree from '@/components/menu-tree'
|
||||
import basis from './componments/basis.vue'
|
||||
import professional from './componments/professional'
|
||||
import education from './componments/education'
|
||||
import { apiOrganizationList, apiEmployeesList } from '@/api/api_staff'
|
||||
import { apiOrganizationList, apiEmployeesList, apiUploadFile } from '@/api/api_staff'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
menuTree,
|
||||
@ -132,6 +143,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
isUploading: false, // 上传状态
|
||||
activeName: 'first',
|
||||
dialogVisible: false,
|
||||
defaultProps: {
|
||||
@ -173,6 +185,19 @@ export default {
|
||||
this.handleGetTableList(this.current)
|
||||
},
|
||||
methods: {
|
||||
// 上传文件
|
||||
async handleChange (file) {
|
||||
let data = new FormData()
|
||||
data.append('filename', file)
|
||||
this.isUploading = true
|
||||
let result = await apiUploadFile(data)
|
||||
this.isUploading = false
|
||||
if (result.code === 0) {
|
||||
|
||||
} else {
|
||||
this.$message.error(result.msg)
|
||||
}
|
||||
},
|
||||
async getEmployeesInfo (data) {
|
||||
this.dialogVisible = true
|
||||
|
||||
@ -188,6 +213,7 @@ export default {
|
||||
handleNodeClick (data) {
|
||||
// highlight - current
|
||||
this.query.departmentId = data.departmentId
|
||||
this.getTable()
|
||||
console.log('data', data)
|
||||
},
|
||||
// 获取侧边架构列表
|
||||
@ -238,6 +264,12 @@ export default {
|
||||
console.log(tab, event)
|
||||
},
|
||||
async handleView (data) {
|
||||
this.$message({
|
||||
message: '编辑暂未开放',
|
||||
showClose: true,
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
console.log('data: ', data)
|
||||
this.activeName = 'first'
|
||||
await this.getEmployeesInfo(data.staffId)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user