This commit is contained in:
parent
271dd7a8de
commit
988b84d378
|
|
@ -42,3 +42,12 @@ export const getEntryPersonListAPI = (data) => {
|
||||||
params: data,
|
params: data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 人员入场 导入人员接口
|
||||||
|
export const importEntryPersonAPI = (data) => {
|
||||||
|
return requestFormData({
|
||||||
|
url: '/bmw/worker/workerEinImport',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,8 @@
|
||||||
:handleShow.sync="handleShow"
|
:handleShow.sync="handleShow"
|
||||||
:indexNumShow.sync="indexNumShow"
|
:indexNumShow.sync="indexNumShow"
|
||||||
:selectionShow.sync="selectionShow"
|
:selectionShow.sync="selectionShow"
|
||||||
|
:isSelectShow="isSelectShow"
|
||||||
|
:showOperation="showOperation"
|
||||||
/>
|
/>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
|
|
@ -145,10 +147,11 @@
|
||||||
v-if="selectionShow && isSelectShow"
|
v-if="selectionShow && isSelectShow"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
fixed
|
||||||
width="55"
|
width="55"
|
||||||
align="center"
|
|
||||||
label="序号"
|
label="序号"
|
||||||
type="index"
|
type="index"
|
||||||
|
align="center"
|
||||||
:index="
|
:index="
|
||||||
indexContinuation(queryParams.pageNum, queryParams.pageSize)
|
indexContinuation(queryParams.pageNum, queryParams.pageSize)
|
||||||
"
|
"
|
||||||
|
|
@ -318,7 +321,7 @@ export default {
|
||||||
// 搜索区域是否隐藏
|
// 搜索区域是否隐藏
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 是否显示复选框
|
// 是否显示复选框
|
||||||
selectionShow: this.isSelectShow,
|
selectionShow: true,
|
||||||
// 是否显示序号
|
// 是否显示序号
|
||||||
indexNumShow: true,
|
indexNumShow: true,
|
||||||
// 是否显示操作列
|
// 是否显示操作列
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
>
|
>
|
||||||
<el-button size="mini" circle icon="el-icon-menu" />
|
<el-button size="mini" circle icon="el-icon-menu" />
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item>
|
<el-dropdown-item v-if="isSelectShow">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
:checked="selectionShow"
|
:checked="selectionShow"
|
||||||
@change="
|
@change="
|
||||||
|
|
@ -67,10 +67,11 @@
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
>序号</el-checkbox
|
|
||||||
>
|
>
|
||||||
|
序号
|
||||||
|
</el-checkbox>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item>
|
<el-dropdown-item v-if="showOperation">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
:checked="handleShow"
|
:checked="handleShow"
|
||||||
@change="
|
@change="
|
||||||
|
|
@ -81,8 +82,9 @@
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
>操作</el-checkbox
|
|
||||||
>
|
>
|
||||||
|
操作
|
||||||
|
</el-checkbox>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
|
||||||
<template v-for="(item, index) in columns">
|
<template v-for="(item, index) in columns">
|
||||||
|
|
@ -156,6 +158,17 @@ export default {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 10,
|
default: 10,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* 是否显示复选框 */
|
||||||
|
isSelectShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
/* 是否显示复选框 */
|
||||||
|
showOperation: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
style() {
|
style() {
|
||||||
|
|
|
||||||
|
|
@ -355,7 +355,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
id: e.id,
|
id: e.id,
|
||||||
url: e.lsUrl,
|
url: e.lsUrl,
|
||||||
name: e.fileName,
|
name: e.originFileName,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -366,7 +366,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
id: e.id,
|
id: e.id,
|
||||||
url: e.lsUrl,
|
url: e.lsUrl,
|
||||||
name: e.fileName,
|
name: e.originFileName,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -377,7 +377,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
id: e.id,
|
id: e.id,
|
||||||
url: e.lsUrl,
|
url: e.lsUrl,
|
||||||
name: e.fileName,
|
name: e.originFileName,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -388,7 +388,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
id: e.id,
|
id: e.id,
|
||||||
url: e.lsUrl,
|
url: e.lsUrl,
|
||||||
name: e.fileName,
|
name: e.originFileName,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -375,7 +375,7 @@ export default {
|
||||||
newVal.contractFile.map((e) => {
|
newVal.contractFile.map((e) => {
|
||||||
return {
|
return {
|
||||||
url: e.lsUrl,
|
url: e.lsUrl,
|
||||||
name: e.fileName,
|
name: e.originFileName,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,23 @@
|
||||||
>
|
>
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-upload"
|
||||||
|
@click="onHandleImportData()"
|
||||||
|
>
|
||||||
|
导入数据
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-download"
|
||||||
|
@click="onHandleDownloadTemplate()"
|
||||||
|
>
|
||||||
|
模板下载
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 出入场状态 -->
|
<!-- 出入场状态 -->
|
||||||
|
|
@ -71,6 +88,12 @@
|
||||||
@closeDialogOuter="handleCloseDialogOuter"
|
@closeDialogOuter="handleCloseDialogOuter"
|
||||||
>
|
>
|
||||||
<template slot="outerContent">
|
<template slot="outerContent">
|
||||||
|
<template
|
||||||
|
v-if="
|
||||||
|
dialogConfig.outerTitle === '新增人员' ||
|
||||||
|
dialogConfig.outerTitle === '修改人员'
|
||||||
|
"
|
||||||
|
>
|
||||||
<AddOrEditForm
|
<AddOrEditForm
|
||||||
:formType="formType"
|
:formType="formType"
|
||||||
:einStatus="einStatus"
|
:einStatus="einStatus"
|
||||||
|
|
@ -79,7 +102,10 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-row class="dialog-footer-btn">
|
<el-row class="dialog-footer-btn">
|
||||||
<el-button size="medium" @click="handleCloseDialogOuter">
|
<el-button
|
||||||
|
size="medium"
|
||||||
|
@click="handleCloseDialogOuter"
|
||||||
|
>
|
||||||
取消
|
取消
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -91,6 +117,31 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-else>
|
||||||
|
<UploadFileFormData
|
||||||
|
:limit="1"
|
||||||
|
:file-size="50"
|
||||||
|
:multiple="false"
|
||||||
|
:file-type="['xls', 'xlsx']"
|
||||||
|
uploadTip="请导入xls、xlsx格式文件"
|
||||||
|
:file-list.sync="importFileList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-row class="dialog-footer-btn">
|
||||||
|
<el-button size="medium" @click="onHandleCancelImport">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="medium"
|
||||||
|
type="primary"
|
||||||
|
@click="onHandleConfirmImport"
|
||||||
|
>
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
</DialogModel>
|
</DialogModel>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -99,10 +150,12 @@
|
||||||
import TableModel from '@/components/TableModel'
|
import TableModel from '@/components/TableModel'
|
||||||
import DialogModel from '@/components/DialogModel'
|
import DialogModel from '@/components/DialogModel'
|
||||||
import AddOrEditForm from './add-or-edit-form'
|
import AddOrEditForm from './add-or-edit-form'
|
||||||
|
import UploadFileFormData from '@/components/UploadFileFormData'
|
||||||
import { formLabel, columnsList, dialogConfig } from './config'
|
import { formLabel, columnsList, dialogConfig } from './config'
|
||||||
import {
|
import {
|
||||||
getEntryPersonListAPI,
|
getEntryPersonListAPI,
|
||||||
deleteEntryPersonAPI,
|
deleteEntryPersonAPI,
|
||||||
|
importEntryPersonAPI,
|
||||||
} from '@/api/construction-person/entry-and-exit-manage/person-entry'
|
} from '@/api/construction-person/entry-and-exit-manage/person-entry'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
@ -117,6 +170,7 @@ export default {
|
||||||
TableModel,
|
TableModel,
|
||||||
DialogModel,
|
DialogModel,
|
||||||
AddOrEditForm,
|
AddOrEditForm,
|
||||||
|
UploadFileFormData,
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -128,6 +182,7 @@ export default {
|
||||||
queryDetailsId: '', // 查询详情id
|
queryDetailsId: '', // 查询详情id
|
||||||
einStatus: 1, // 在场状态
|
einStatus: 1, // 在场状态
|
||||||
formType: 1, // 表单类型
|
formType: 1, // 表单类型
|
||||||
|
importFileList: [], // 导入文件列表
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -146,6 +201,9 @@ export default {
|
||||||
// 新增或修改
|
// 新增或修改
|
||||||
onHandleAddOrEditPersonEntry(type, data) {
|
onHandleAddOrEditPersonEntry(type, data) {
|
||||||
this.dialogConfig.outerTitle = type === 1 ? '新增人员' : '修改人员'
|
this.dialogConfig.outerTitle = type === 1 ? '新增人员' : '修改人员'
|
||||||
|
this.dialogConfig.outerWidth = '90%'
|
||||||
|
this.dialogConfig.minHeight = '98vh'
|
||||||
|
this.dialogConfig.maxHeight = '98vh'
|
||||||
this.formType = type
|
this.formType = type
|
||||||
if (type === 2) {
|
if (type === 2) {
|
||||||
this.queryDetailsId = data.id
|
this.queryDetailsId = data.id
|
||||||
|
|
@ -195,6 +253,45 @@ export default {
|
||||||
this.$refs.addOrEditFormContentRef.resetForm()
|
this.$refs.addOrEditFormContentRef.resetForm()
|
||||||
this.dialogConfig.outerVisible = false
|
this.dialogConfig.outerVisible = false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 导入数据
|
||||||
|
onHandleImportData() {
|
||||||
|
this.dialogConfig.outerTitle = '导入数据'
|
||||||
|
this.dialogConfig.outerWidth = '50%'
|
||||||
|
this.dialogConfig.minHeight = ''
|
||||||
|
this.dialogConfig.maxHeight = ''
|
||||||
|
this.dialogConfig.outerVisible = true
|
||||||
|
},
|
||||||
|
|
||||||
|
// 下载模板
|
||||||
|
async onHandleDownloadTemplate() {
|
||||||
|
// this.download(
|
||||||
|
// '/bmw/download/workerEinTemplate',
|
||||||
|
// {},
|
||||||
|
// '失信人员导入模板.xlsx',
|
||||||
|
// )
|
||||||
|
},
|
||||||
|
|
||||||
|
// 取消上传
|
||||||
|
onHandleCancelImport() {
|
||||||
|
this.importFileList = []
|
||||||
|
this.dialogConfig.outerVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
// 确定上传
|
||||||
|
async onHandleConfirmImport() {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('file', this.importFileList[0].raw)
|
||||||
|
const res = await importEntryPersonAPI(formData)
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$modal.msgSuccess('导入成功')
|
||||||
|
this.importFileList = []
|
||||||
|
this.dialogConfig.outerVisible = false
|
||||||
|
this.$refs.dishonestyPersonTableRef.getTableList()
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError(res.msg)
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
async created() {
|
async created() {
|
||||||
|
|
|
||||||
|
|
@ -186,6 +186,13 @@ export default {
|
||||||
// 导出按钮
|
// 导出按钮
|
||||||
onHandleExportAllProject(queryParams) {
|
onHandleExportAllProject(queryParams) {
|
||||||
console.log(queryParams, '导出')
|
console.log(queryParams, '导出')
|
||||||
|
this.download(
|
||||||
|
'/bmw/workerExit/workerExitExport',
|
||||||
|
{
|
||||||
|
...queryParams,
|
||||||
|
},
|
||||||
|
'人员出场.xlsx',
|
||||||
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 批量出场
|
// 批量出场
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue