|
|
@@ -104,6 +104,21 @@ |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
|
|
|
|
<el-select |
|
|
|
v-model="queryParams.attendanceGroupIds" |
|
|
|
placeholder="请选择考勤组" |
|
|
|
size="mini" |
|
|
|
clearable |
|
|
|
multiple |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="dict in attendanceGroups" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" /> |
|
|
@@ -325,7 +340,8 @@ import { |
|
|
|
delOperationWarnresult, |
|
|
|
addOperationWarnresult, |
|
|
|
updateOperationWarnresult, |
|
|
|
exportExcel |
|
|
|
exportExcel, |
|
|
|
queryAttendanceGroup |
|
|
|
} from '@/api/daka/daka-record' |
|
|
|
|
|
|
|
import map from '@/views/components/daka/map'; |
|
|
@@ -372,7 +388,8 @@ export default { |
|
|
|
exportRange: undefined, |
|
|
|
strDay: undefined, |
|
|
|
strMonth: undefined, |
|
|
|
modelType: undefined |
|
|
|
modelType: undefined, |
|
|
|
attendanceGroupIds: undefined |
|
|
|
}, |
|
|
|
modelTypeDate: [{label: '国内', value: 'guonei'},{label: '日本', value: 'riben'}], |
|
|
|
// 表单参数 |
|
|
@@ -387,17 +404,28 @@ export default { |
|
|
|
}, |
|
|
|
daka_check_in_status: [{label: '未打卡', value: '0'},{label: '上班已打卡', value: '1'},{label: '下班已打卡', value: '2'}, |
|
|
|
{label: '迟到打卡', value: '3'},{label: '早退打卡', value: '4'}, {label: '更新打卡', value: '5'}], |
|
|
|
|
|
|
|
attendanceGroups: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getList() |
|
|
|
this.queryAttendanceGroup() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
queryAttendanceGroup(){ |
|
|
|
queryAttendanceGroup().then((response) => { |
|
|
|
// console.log(response) |
|
|
|
const data = response.data |
|
|
|
const newData = data.map(d => { |
|
|
|
return {label: d.name, value: d.id} |
|
|
|
}) |
|
|
|
this.attendanceGroups = newData |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** 查询结果列表 */ |
|
|
|
getList() { |
|
|
|
this.loading = true |
|
|
|
console.log(this.queryParams) |
|
|
|
// console.log(this.queryParams) |
|
|
|
queryList(this.queryParams).then((response) => { |
|
|
|
this.resultList = response.rows |
|
|
|
this.total = response.total |
|
|
@@ -545,6 +573,10 @@ export default { |
|
|
|
this.$modal.msgError('必须选择模版!') |
|
|
|
return |
|
|
|
} |
|
|
|
if(!this.queryParams.attendanceGroupIds){ |
|
|
|
this.$modal.msgError('必须选择所属考勤组!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.download( |
|
|
|
'dk/record/exportNew', |
|
|
|
{ |
|
|
@@ -552,26 +584,6 @@ export default { |
|
|
|
}, |
|
|
|
`result_${new Date().getTime()}.xlsx` |
|
|
|
) |
|
|
|
// exportExcel(this.queryParams).then(response => { |
|
|
|
// console.log(response) |
|
|
|
// // 创建Blob对象 |
|
|
|
// const blob = new Blob([response.data], { |
|
|
|
// type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', |
|
|
|
// }); |
|
|
|
// // 创建下载链接 |
|
|
|
// const url = window.URL.createObjectURL(blob); |
|
|
|
// const a = document.createElement('a'); |
|
|
|
// a.href = url; |
|
|
|
// a.download = '用户数据.xlsx'; // 文件名 |
|
|
|
|
|
|
|
// // 触发下载 |
|
|
|
// document.body.appendChild(a); |
|
|
|
// a.click(); |
|
|
|
|
|
|
|
// // 释放资源 |
|
|
|
// document.body.removeChild(a); |
|
|
|
// window.URL.revokeObjectURL(url); |
|
|
|
// }) |
|
|
|
} |
|
|
|
} |
|
|
|
} |